@@ -6,7 +6,7 @@ export interface WhoamiUserInfo {
6
6
last_name ?: string ;
7
7
}
8
8
export interface PurchaseData {
9
- entitlements : [ string ] ;
9
+ entitlements : string [ ] ;
10
10
}
11
11
export interface ServicePassportSuccessResponse {
12
12
code : string ;
@@ -30,13 +30,14 @@ export declare type FetchOptions = RequestInit & {
30
30
retryStatusCodes ?: number [ ] ;
31
31
} ;
32
32
export declare type WaitingRoomQueueDefault = "" ;
33
- export declare type WaitingRoomQueue = WaitingRoomQueueDefault | "auth" | "checkout" | "lefty-in-app-purchase" ;
33
+ export declare type WaitingRoomQueue = WaitingRoomQueueDefault | "auth" | "checkout" | "lefty-in-app-purchase" | "logora" ;
34
34
/**
35
35
* Custom fetch interface which includes the possibility to customize timeouts for fetch requests
36
36
*/
37
37
export declare type Fetch = ( input : RequestInfo , init ?: FetchOptions ) => Promise < Response > ;
38
38
export declare type GetRosettaEnvByKey = ( key : string ) => string | undefined ;
39
39
export declare type WaitForCapacity = ( queue : WaitingRoomQueue ) => Promise < void > ;
40
+ export declare type GetUserCreditBalance = ( ) => Promise < number > ;
40
41
export declare type RegisterIframeMessageListener = ( eventtype : string , listener : ( event : any , iframe : HTMLIFrameElement ) => void ) => void ;
41
42
export interface WhoamiV1 {
42
43
/**
@@ -147,20 +148,20 @@ export interface WhoamiV1 {
147
148
/**
148
149
* will render the Wonderwall in the given container with the given props and call the callback after main functionality is done
149
150
*
150
- * @param container - The HTML element in which the Wonderwall should be rendered.
151
- * The container should be an HTML element.
152
- *
153
- * @param {Object } props - The props that should be passed, which will be passed to the auth component.
154
- * @param {String } props.template - valid choices are "register" and "login"
155
- * @param {String } props.variant - variant of the brand that should be shown e.g bild or welt
156
- * @param {boolean } [props.abortable] - user can leave auth screen if true (not yet implemented)
157
- * @param {String } [props.loginHeadline]
158
- * @param {String } [props.registerHeadline]
159
- * @param {String } [props.loginCta]
160
- * @param {String } [props.registerCta]
151
+ * @param { Object } config - config container object
152
+ * @param { HTMLElement } [config. container] - The HTML element in which the Wonderwall should be rendered in. default = overlay
153
+ * @param { boolean } [config.inlineRender] - Renders Wonderwall directly in container instead of as overlay. default = false
154
+ * @param {Object } config. props - The props which will be passed to the Wonderwall web component.
155
+ * @param {String } config. props.template - valid choices are "register" and "login"
156
+ * @param {String } config. props.variant - variant of the brand that should be shown e.g bild or welt
157
+ * @param {boolean } [config. props.abortable] - user can leave auth screen if true (not yet implemented)
158
+ * @param {String } [config. props.loginHeadline]
159
+ * @param {String } [config. props.registerHeadline]
160
+ * @param {String } [config. props.loginCta]
161
+ * @param {String } [config. props.registerCta]
161
162
*
162
163
*/
163
- renderAuthComponent ( container : HTMLElement , props : WonderwallProps ) : Promise < AuthRes > ;
164
+ renderAuthComponent ( config : AuthComponentConfig ) : Promise < AuthRes > ;
164
165
/**
165
166
* Retrieves a service passport for the specified service.
166
167
* The passport is intended to be used for authenticated communication with the service.
@@ -186,9 +187,15 @@ export declare type WonderwallProps = {
186
187
loginCta ?: string ;
187
188
registerCta ?: string ;
188
189
} ;
190
+ export interface AuthComponentConfig {
191
+ container ?: HTMLElement ;
192
+ inlineRender ?: boolean ;
193
+ props : WonderwallProps ;
194
+ }
189
195
export interface UtilsV1 {
190
196
fetchWithTimeout : Fetch ;
191
197
getRosettaEnvByKey : GetRosettaEnvByKey ;
198
+ getOverwritableRosettaEnvByKey : GetRosettaEnvByKey ;
192
199
registerIframeMessageListener : RegisterIframeMessageListener ;
193
200
}
194
201
export interface AbV1 {
@@ -200,6 +207,9 @@ export interface AbV1 {
200
207
export interface WaitingRoomV1 {
201
208
waitForCapacity : WaitForCapacity ;
202
209
}
210
+ export interface WalletV1 {
211
+ getUserCreditBalance : GetUserCreditBalance ;
212
+ }
203
213
export declare type ILayer = "privacy" | "reject" ;
204
214
export declare type IApp = "offerpage" | "checkout" | "cancellation" ;
205
215
export declare type ITenant = "welt" | "bild" ;
@@ -231,6 +241,7 @@ export declare function whoamiV1(): Promise<WhoamiV1>;
231
241
export declare function utilsV1 ( ) : Promise < UtilsV1 > ;
232
242
export declare function waitingRoomV1 ( ) : Promise < WaitingRoomV1 > ;
233
243
export declare function abV1 ( ) : Promise < AbV1 > ;
244
+ export declare function walletV1 ( ) : Promise < WalletV1 > ;
234
245
export declare function CligV1 ( ) : Promise < ICligV1 > ;
235
246
export declare function CligV2 ( ) : Promise < ICligV2 > ;
236
247
export declare const provideApi : typeof provide ;
0 commit comments