@namiml/sdk-core 3.4.4-dev.202606241934 → 3.4.4-dev.202606241952
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +637 -222
- package/dist/index.d.ts +1588 -1297
- package/dist/index.mjs +636 -223
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -109,214 +109,34 @@ interface NamiConditions {
|
|
|
109
109
|
operator?: LogicalOperator;
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
NEXT = "flowNext",
|
|
124
|
-
FINISHED = "flowDone",
|
|
125
|
-
DISMISS = "flowDismiss",
|
|
126
|
-
EXIT = "flowExit",
|
|
127
|
-
HANDOFF = "flowHandoff",
|
|
128
|
-
TRACK = "trackEvent",
|
|
129
|
-
LOG = "logEvent",
|
|
130
|
-
SET_VIDEO = "setVideo",
|
|
131
|
-
FLOW_EVENT = "flowEvent",
|
|
132
|
-
BLOCK_BACK = "blockBackToStep",
|
|
133
|
-
FLOW_ENABLED = "flowInteractionEnabled",
|
|
134
|
-
FLOW_DISABLED = "flowInteractionDisabled",
|
|
135
|
-
SET_TAGS = "setTags",
|
|
136
|
-
SET_TAGS_FROM_FORM = "setTagsFromForm",
|
|
137
|
-
PAUSE = "flowPause",
|
|
138
|
-
RESUME = "flowResume",
|
|
139
|
-
SET_LAUNCH_CONTEXT = "setLaunchContext",
|
|
140
|
-
SET_FLOW_PATH = "setFlowPath"
|
|
141
|
-
}
|
|
142
|
-
type NamiFlowHandoffStepHandler = (handoffTag: string, handoffData?: Record<string, any>) => void;
|
|
143
|
-
type NamiFlowEventHandler = (eventHandler: Record<string, any>) => void;
|
|
144
|
-
interface NamiFlowDTO {
|
|
145
|
-
flow_id?: string;
|
|
146
|
-
object_id?: string;
|
|
147
|
-
object?: NamiFlowObjectDTO;
|
|
148
|
-
url?: string;
|
|
149
|
-
page_urls?: Record<string, string>;
|
|
150
|
-
}
|
|
151
|
-
type NamiFlowWithObject = Omit<NamiFlowDTO, 'object'> & {
|
|
152
|
-
object: NamiFlowObjectDTO;
|
|
153
|
-
};
|
|
154
|
-
interface NamiFlowObjectDTO {
|
|
155
|
-
id?: string;
|
|
156
|
-
name?: string;
|
|
157
|
-
resume_from_bookmark?: boolean;
|
|
158
|
-
screens?: string[];
|
|
159
|
-
form_factors?: FormFactor[];
|
|
160
|
-
version?: string;
|
|
161
|
-
steps?: NamiFlowStep[];
|
|
162
|
-
transition?: NamiFlowTransition;
|
|
163
|
-
}
|
|
164
|
-
type SetVideoAction = {
|
|
165
|
-
name?: string;
|
|
166
|
-
url?: string;
|
|
167
|
-
};
|
|
168
|
-
interface NamiFlowAction {
|
|
169
|
-
id?: string;
|
|
170
|
-
function: `${NamiFlowActionFunction}`;
|
|
171
|
-
parameters?: {
|
|
172
|
-
handoffTag?: string;
|
|
173
|
-
handoffData?: Record<string, any>;
|
|
174
|
-
handoffFormId?: string;
|
|
175
|
-
flowPath?: string;
|
|
176
|
-
step?: string;
|
|
177
|
-
eventName?: string;
|
|
178
|
-
delay?: string | number;
|
|
179
|
-
[key: string]: any;
|
|
180
|
-
} & SetVideoAction;
|
|
181
|
-
conditions?: NamiConditions[];
|
|
182
|
-
}
|
|
183
|
-
interface NamiFlowOn {
|
|
184
|
-
before?: NamiFlowAction[];
|
|
185
|
-
action?: NamiFlowAction[];
|
|
186
|
-
after?: NamiFlowAction[];
|
|
187
|
-
}
|
|
188
|
-
interface NamiFlowStep {
|
|
112
|
+
/**
|
|
113
|
+
* @type NamiSKU
|
|
114
|
+
* This object represents a specific in-app purchase SKU available on a specific platform.
|
|
115
|
+
*
|
|
116
|
+
* It contains some general meta-data about specific SKU and associated [ProductDetails] object from
|
|
117
|
+
* Google Play Billing.
|
|
118
|
+
*
|
|
119
|
+
* Note that in certain cases, depending on cached state of the SDK, [ProductDetails] might not
|
|
120
|
+
* be fully complete object (potentially generated temporarily with minimum required information)
|
|
121
|
+
*/
|
|
122
|
+
type NamiSKU = {
|
|
189
123
|
id: string;
|
|
190
124
|
name?: string;
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
transition: NamiFlowTransition;
|
|
201
|
-
direction: NamiFlowTransitionDirection;
|
|
202
|
-
}
|
|
203
|
-
declare const NamiReservedActions: {
|
|
204
|
-
readonly BUY_SKU: "__buy_sku__";
|
|
205
|
-
readonly DEFAULT: "__default__";
|
|
206
|
-
readonly APPEAR: "__appear__";
|
|
207
|
-
readonly DISAPPEAR: "__disappear__";
|
|
208
|
-
readonly LOGIN_SUCCESS: "__login_success__";
|
|
209
|
-
readonly LOGIN_FAILURE: "__login_failure__";
|
|
210
|
-
readonly LOGOUT_SUCCESS: "__logout_success__";
|
|
211
|
-
readonly LOGOUT_FAILURE: "__logout_failure__";
|
|
212
|
-
readonly PURCHASE_SUCCESS: "__purchase_success__";
|
|
213
|
-
readonly PURCHASE_FAILURE: "__purchase_failure__";
|
|
214
|
-
readonly RESUME: "__resume__";
|
|
215
|
-
readonly REMOTE_BACK: "__remoteback__";
|
|
216
|
-
readonly TAG_UPDATE: "__tag_update__";
|
|
125
|
+
skuId: string;
|
|
126
|
+
appleProduct?: AppleProduct;
|
|
127
|
+
googleProduct?: GoogleProduct;
|
|
128
|
+
amazonProduct?: AmazonProduct;
|
|
129
|
+
type: NamiSKUType;
|
|
130
|
+
promoId?: string | null;
|
|
131
|
+
promoToken?: string | null;
|
|
132
|
+
productDetails?: NamiProductDetails | null;
|
|
133
|
+
entitlements: IEntitlements$1[];
|
|
217
134
|
};
|
|
218
|
-
|
|
219
|
-
/**
|
|
220
|
-
* @type NamiCampaignSegment
|
|
221
|
-
* Represents a segment within a campaign.
|
|
222
|
-
*/
|
|
223
|
-
interface NamiCampaignSegment {
|
|
224
|
-
form_factors: FormFactor[];
|
|
225
|
-
paywall?: string | null;
|
|
226
|
-
paywall_url?: string | null;
|
|
227
|
-
page_urls?: Record<string, string> | null;
|
|
228
|
-
flow?: NamiFlowDTO | null;
|
|
229
|
-
segment: string;
|
|
230
|
-
split: number;
|
|
231
|
-
conversion_event_type?: CampaignRuleConversionEventType | null;
|
|
232
|
-
conversion_event_url?: string | null;
|
|
233
|
-
}
|
|
234
|
-
/**
|
|
235
|
-
* @type NamiAnonymousCampaign
|
|
236
|
-
* Represents the anonymous campaign in Nami.
|
|
237
|
-
*/
|
|
238
|
-
interface NamiAnonymousCampaign {
|
|
239
|
-
rule: string;
|
|
240
|
-
name: string;
|
|
241
|
-
type: string | NamiCampaignRuleType;
|
|
242
|
-
value?: string | null;
|
|
243
|
-
external_segment: string | null;
|
|
244
|
-
segments: NamiCampaignSegment[];
|
|
245
|
-
}
|
|
246
|
-
/**
|
|
247
|
-
* @type NamiCampaign
|
|
248
|
-
* Represents the campaign in Nami.
|
|
249
|
-
*/
|
|
250
|
-
interface NamiCampaign {
|
|
251
|
-
rule: string;
|
|
252
|
-
name: string;
|
|
253
|
-
segment: string;
|
|
254
|
-
paywall?: string | null;
|
|
255
|
-
paywall_url?: string | null;
|
|
256
|
-
page_urls?: Record<string, string> | null;
|
|
257
|
-
type: string | NamiCampaignRuleType;
|
|
258
|
-
value?: string | null;
|
|
259
|
-
form_factors: FormFactor[];
|
|
260
|
-
external_segment: string | null;
|
|
261
|
-
conversion_event_type?: CampaignRuleConversionEventType | null;
|
|
262
|
-
conversion_event_url?: string | null;
|
|
263
|
-
flow?: NamiFlowDTO | null;
|
|
264
|
-
}
|
|
265
|
-
interface NamiFlowCampaign extends NamiCampaign {
|
|
266
|
-
flow: NamiFlowWithObject;
|
|
267
|
-
}
|
|
268
|
-
declare function isNamiFlowCampaign(campaign?: NamiCampaign): campaign is NamiFlowCampaign;
|
|
269
135
|
/**
|
|
270
|
-
* @
|
|
271
|
-
* Types of Nami
|
|
136
|
+
* @type NamiSKUType
|
|
137
|
+
* Types of products from Nami
|
|
272
138
|
*/
|
|
273
|
-
|
|
274
|
-
DEFAULT = "default",
|
|
275
|
-
LABEL = "label",
|
|
276
|
-
UNKNOWN = "unknown",
|
|
277
|
-
URL = "url"
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
declare const NamiAnimationType: {
|
|
281
|
-
readonly Wave: "wave";
|
|
282
|
-
readonly Pulse: "pulse";
|
|
283
|
-
readonly None: "none";
|
|
284
|
-
};
|
|
285
|
-
type NamiAnimationType = typeof NamiAnimationType[keyof typeof NamiAnimationType];
|
|
286
|
-
type PulseSpec = typeof NamiAnimationType.Pulse | {
|
|
287
|
-
type: typeof NamiAnimationType.Pulse;
|
|
288
|
-
duration?: number;
|
|
289
|
-
scale?: number;
|
|
290
|
-
};
|
|
291
|
-
type WaveSpec = typeof NamiAnimationType.Wave | {
|
|
292
|
-
type: typeof NamiAnimationType.Wave;
|
|
293
|
-
duration?: number;
|
|
294
|
-
delay?: number;
|
|
295
|
-
circle1Color?: string;
|
|
296
|
-
circle2Color?: string;
|
|
297
|
-
lineWidth?: number;
|
|
298
|
-
};
|
|
299
|
-
type NoneSpec = typeof NamiAnimationType.None | {
|
|
300
|
-
type: typeof NamiAnimationType.None;
|
|
301
|
-
};
|
|
302
|
-
type NamiAnimationSpec = WaveSpec | PulseSpec | NoneSpec;
|
|
303
|
-
type NamiAnimationObjectSpec = Extract<WaveSpec, {
|
|
304
|
-
type: typeof NamiAnimationType.Wave;
|
|
305
|
-
}> | Extract<PulseSpec, {
|
|
306
|
-
type: typeof NamiAnimationType.Pulse;
|
|
307
|
-
}> | Extract<NoneSpec, {
|
|
308
|
-
type: typeof NamiAnimationType.None;
|
|
309
|
-
}>;
|
|
310
|
-
type Wave = Required<Extract<WaveSpec, {
|
|
311
|
-
type: typeof NamiAnimationType.Wave;
|
|
312
|
-
}>>;
|
|
313
|
-
type Pulse = Required<Extract<PulseSpec, {
|
|
314
|
-
type: typeof NamiAnimationType.Pulse;
|
|
315
|
-
}>>;
|
|
316
|
-
type None = Required<Extract<NoneSpec, {
|
|
317
|
-
type: typeof NamiAnimationType.None;
|
|
318
|
-
}>>;
|
|
319
|
-
type NamiAnimation = Wave | Pulse | None;
|
|
139
|
+
type NamiSKUType = 'unknown' | 'one_time_purchase' | 'subscription';
|
|
320
140
|
|
|
321
141
|
/**
|
|
322
142
|
* @type NamiProductDetails
|
|
@@ -373,1152 +193,1507 @@ type AppleProduct = unknown;
|
|
|
373
193
|
type GoogleProduct = unknown;
|
|
374
194
|
type AmazonProduct = unknown;
|
|
375
195
|
|
|
376
|
-
|
|
377
|
-
* @type NamiSKU
|
|
378
|
-
* This object represents a specific in-app purchase SKU available on a specific platform.
|
|
379
|
-
*
|
|
380
|
-
* It contains some general meta-data about specific SKU and associated [ProductDetails] object from
|
|
381
|
-
* Google Play Billing.
|
|
382
|
-
*
|
|
383
|
-
* Note that in certain cases, depending on cached state of the SDK, [ProductDetails] might not
|
|
384
|
-
* be fully complete object (potentially generated temporarily with minimum required information)
|
|
385
|
-
*/
|
|
386
|
-
type NamiSKU = {
|
|
196
|
+
interface IConfig {
|
|
387
197
|
id: string;
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
};
|
|
399
|
-
/**
|
|
400
|
-
* @type NamiSKUType
|
|
401
|
-
* Types of products from Nami
|
|
402
|
-
*/
|
|
403
|
-
type NamiSKUType = 'unknown' | 'one_time_purchase' | 'subscription';
|
|
404
|
-
|
|
405
|
-
type TImageComponent = TBaseComponent & {
|
|
406
|
-
component: "image";
|
|
407
|
-
url?: string | null;
|
|
408
|
-
aspectRatio?: number;
|
|
409
|
-
imageCropping?: "fill" | "fit";
|
|
410
|
-
alt?: string | null;
|
|
411
|
-
blur?: string | null;
|
|
412
|
-
};
|
|
413
|
-
type TSegmentPicker = TBaseComponent & {
|
|
414
|
-
component: "segmentPicker" | "formSegmentPicker";
|
|
415
|
-
formId?: string;
|
|
416
|
-
components: TSegmentPickerItem[];
|
|
417
|
-
};
|
|
418
|
-
type TSegmentPickerItem = TBaseComponent & {
|
|
419
|
-
component: "segmentPickerItem";
|
|
420
|
-
ref?: any;
|
|
421
|
-
text?: string;
|
|
422
|
-
alignment?: AlignmentType;
|
|
423
|
-
activeFillColor?: string;
|
|
424
|
-
activeBorderColor?: string;
|
|
425
|
-
activeBorderRadius?: number;
|
|
426
|
-
activeBorderWidth?: number;
|
|
427
|
-
activeRoundBorders?: Array<BorderLocationType>;
|
|
428
|
-
activeFontSize?: number;
|
|
429
|
-
activeFontColor?: string;
|
|
430
|
-
activeFontName?: string;
|
|
431
|
-
activeDropShadow?: string;
|
|
432
|
-
inactiveBorderRadius?: number;
|
|
433
|
-
inactiveBorderColor?: string;
|
|
434
|
-
inactiveBorderWidth?: number;
|
|
435
|
-
inactiveRoundBorders?: Array<BorderLocationType>;
|
|
436
|
-
inactiveFontSize?: number;
|
|
437
|
-
inactiveFontName?: string;
|
|
438
|
-
inactiveFontColor?: string;
|
|
439
|
-
inactiveDropShadow?: string;
|
|
440
|
-
leftPadding?: number;
|
|
441
|
-
rightPadding?: number;
|
|
442
|
-
topPadding?: number;
|
|
443
|
-
bottomPadding?: number;
|
|
444
|
-
formId?: string;
|
|
445
|
-
checked?: boolean;
|
|
446
|
-
};
|
|
447
|
-
type TSpacerComponent = TBaseComponent & {
|
|
448
|
-
component: "spacer";
|
|
449
|
-
};
|
|
450
|
-
type TSvgImageComponent = TBaseComponent & {
|
|
451
|
-
component: "svgImage";
|
|
452
|
-
url?: string | null;
|
|
453
|
-
fontColor?: string;
|
|
454
|
-
};
|
|
455
|
-
type TSymbolComponent = Omit<TTextComponent, "component" | "textType" | "text"> & {
|
|
456
|
-
component: "symbol";
|
|
457
|
-
name: string;
|
|
458
|
-
};
|
|
459
|
-
type TTextComponent = TBaseComponent & {
|
|
460
|
-
component: "text";
|
|
461
|
-
textType: "title" | "body" | "legal" | "text";
|
|
462
|
-
androidFontSize?: number;
|
|
463
|
-
fontSize?: number;
|
|
464
|
-
activeFontColor?: string;
|
|
465
|
-
fontColor?: string;
|
|
466
|
-
fontName?: string;
|
|
467
|
-
text: string;
|
|
468
|
-
strikethrough?: boolean | string;
|
|
469
|
-
linkColor?: string;
|
|
470
|
-
dateTimeFormat?: string;
|
|
471
|
-
blur?: number | null;
|
|
472
|
-
capitalize?: boolean;
|
|
473
|
-
};
|
|
474
|
-
type TTextLikeComponent = TTextComponent | TTextListComponent | TSymbolComponent;
|
|
475
|
-
type TTextListComponent = Omit<TTextComponent, "component" | "text"> & {
|
|
476
|
-
component: "text-list";
|
|
477
|
-
texts: string[];
|
|
478
|
-
bulletComponent?: TSymbolComponent;
|
|
479
|
-
};
|
|
480
|
-
type TVideoComponent = TBaseComponent & {
|
|
481
|
-
component: "videoUrl";
|
|
482
|
-
url?: string | null;
|
|
483
|
-
aspectRatio?: number;
|
|
484
|
-
imageCropping?: "fill" | "fit";
|
|
485
|
-
autoplayVideo?: boolean;
|
|
486
|
-
controlsType?: string;
|
|
487
|
-
fallbackImage?: string | null;
|
|
488
|
-
loopVideo?: boolean;
|
|
489
|
-
mute?: boolean;
|
|
490
|
-
screenreaderText?: string;
|
|
491
|
-
};
|
|
492
|
-
type TConditionalComponent = TBaseComponent & {
|
|
493
|
-
component: "condition";
|
|
494
|
-
components?: TComponent[];
|
|
495
|
-
assertions?: TTestObject[];
|
|
496
|
-
orAssertions?: TTestObject[] | undefined;
|
|
497
|
-
};
|
|
498
|
-
type TQRCodeComponent = TBaseComponent & {
|
|
499
|
-
component: "qrCode";
|
|
500
|
-
url: string;
|
|
501
|
-
height: number | string;
|
|
502
|
-
width: number | string;
|
|
503
|
-
color?: string;
|
|
504
|
-
fillColor?: string;
|
|
505
|
-
borderWidth?: number;
|
|
506
|
-
borderColor?: string;
|
|
507
|
-
};
|
|
508
|
-
type TProgressIndicatorComponent = TBaseComponent & {
|
|
509
|
-
component: "progressIndicator";
|
|
510
|
-
activeBorderRadius?: number;
|
|
511
|
-
activeFillColor?: string;
|
|
512
|
-
activeFillColorFallback?: string;
|
|
513
|
-
inactiveBorderRadius?: number;
|
|
514
|
-
inactiveFillColor?: string;
|
|
515
|
-
inactiveFillColorFallback?: string;
|
|
516
|
-
percentage?: "auto" | number;
|
|
517
|
-
innerPadding?: number;
|
|
518
|
-
activeDropShadow?: string;
|
|
519
|
-
inactiveDropShadow?: string;
|
|
520
|
-
};
|
|
521
|
-
type TProgressBarComponent = TBaseComponent & {
|
|
522
|
-
component: "progressBar";
|
|
523
|
-
mode: "determinate" | "indeterminate";
|
|
524
|
-
activeBorderRadius?: number;
|
|
525
|
-
activeFillColor?: string;
|
|
526
|
-
activeFillColorFallback?: string;
|
|
527
|
-
inactiveBorderRadius?: number;
|
|
528
|
-
inactiveFillColor?: string;
|
|
529
|
-
inactiveFillColorFallback?: string;
|
|
530
|
-
percentage?: "auto" | number;
|
|
531
|
-
innerPadding?: number;
|
|
532
|
-
activeDropShadow?: string;
|
|
533
|
-
inactiveDropShadow?: string;
|
|
534
|
-
duration?: "auto" | number;
|
|
535
|
-
delay?: number;
|
|
536
|
-
activeWidth?: number | string;
|
|
537
|
-
screenreaderText?: string;
|
|
198
|
+
capabilities: string[];
|
|
199
|
+
marketplace_app_id?: string | null;
|
|
200
|
+
campaign_cache_ttl?: number | null;
|
|
201
|
+
}
|
|
202
|
+
type InitialConfig = {
|
|
203
|
+
appConfig?: IConfig;
|
|
204
|
+
platform_config?: IConfig;
|
|
205
|
+
products?: PaywallSKU[];
|
|
206
|
+
paywalls?: IPaywall[];
|
|
207
|
+
campaign_rules?: NamiAnonymousCampaign[];
|
|
538
208
|
};
|
|
539
|
-
type
|
|
540
|
-
|
|
541
|
-
components: TComponent[];
|
|
542
|
-
checked?: boolean;
|
|
543
|
-
activeFillColor?: string;
|
|
544
|
-
activeFillColorFallback?: string;
|
|
545
|
-
inactiveFillColor?: string;
|
|
546
|
-
inactiveFillColorFallback?: string;
|
|
547
|
-
activeBorderColor?: string;
|
|
548
|
-
inactiveBorderColor?: string;
|
|
549
|
-
activeBorderWidth?: number;
|
|
550
|
-
inactiveBorderWidth?: number;
|
|
551
|
-
activeDropShadow?: string;
|
|
552
|
-
inactiveDropShadow?: string;
|
|
553
|
-
formId?: string;
|
|
554
|
-
screenreaderText?: string;
|
|
555
|
-
screenreaderHint?: string;
|
|
556
|
-
mode?: "radio" | "toggle";
|
|
557
|
-
value?: string;
|
|
209
|
+
type InitialConfigCompressed = {
|
|
210
|
+
initial_config: string;
|
|
558
211
|
};
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
/** Required flag — the real (misspelled) wire key. `required` never populates. */
|
|
564
|
-
reqed?: boolean;
|
|
565
|
-
validateOn?: "submit" | "change";
|
|
566
|
-
placeholderText?: string;
|
|
567
|
-
placeholderFontColor?: string;
|
|
568
|
-
labelText?: string;
|
|
569
|
-
labelPosition?: "top" | "none";
|
|
570
|
-
labelFontColor?: string;
|
|
571
|
-
labelFontName?: string;
|
|
572
|
-
labelFontSize?: number | string;
|
|
573
|
-
validationMessage?: string;
|
|
574
|
-
validationTextFontColor?: string;
|
|
575
|
-
validationTextFontName?: string;
|
|
576
|
-
validationTextFontSize?: number | string;
|
|
577
|
-
fontColor?: string;
|
|
578
|
-
fontName?: string;
|
|
579
|
-
fontSize?: number | string;
|
|
580
|
-
errorBorderColor?: string;
|
|
581
|
-
errorBorderWidth?: number | string;
|
|
582
|
-
errorBorderRadius?: number | string;
|
|
583
|
-
innerTopPadding?: number | string;
|
|
584
|
-
innerBottomPadding?: number | string;
|
|
585
|
-
innerLeftPadding?: number | string;
|
|
586
|
-
innerRightPadding?: number | string;
|
|
587
|
-
showPrefixIcon?: boolean;
|
|
212
|
+
declare const isInitialConfigCompressed: (config: InitialConfig | InitialConfigCompressed) => config is InitialConfigCompressed;
|
|
213
|
+
type NamiConfigurationState = {
|
|
214
|
+
sdkInitialized: boolean;
|
|
215
|
+
configureState: string;
|
|
588
216
|
};
|
|
589
|
-
type
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
durationSeconds?: number;
|
|
593
|
-
resetOnRemount?: boolean;
|
|
594
|
-
targetDateTime?: string;
|
|
595
|
-
separator?: string;
|
|
596
|
-
zeroPad?: boolean;
|
|
597
|
-
direction?: "horizontal" | "vertical";
|
|
598
|
-
labelPosition?: "none" | "top" | "bottom" | "below" | "above";
|
|
599
|
-
units?: {
|
|
600
|
-
days?: boolean;
|
|
601
|
-
hours?: boolean;
|
|
602
|
-
minutes?: boolean;
|
|
603
|
-
seconds?: boolean;
|
|
604
|
-
};
|
|
605
|
-
labels?: {
|
|
606
|
-
days?: string;
|
|
607
|
-
hours?: string;
|
|
608
|
-
minutes?: string;
|
|
609
|
-
seconds?: string;
|
|
610
|
-
};
|
|
611
|
-
fontSize?: number;
|
|
612
|
-
fontColor?: string;
|
|
613
|
-
fontName?: string;
|
|
614
|
-
labelFontSize?: number;
|
|
615
|
-
labelFontColor?: string;
|
|
616
|
-
labelFontName?: string;
|
|
617
|
-
labelSpacing?: number;
|
|
618
|
-
showWhenCompleted?: "zero" | "hidden";
|
|
619
|
-
screenreaderText?: string;
|
|
620
|
-
screenreaderHint?: string;
|
|
217
|
+
type ExtendedPlatformInfo = {
|
|
218
|
+
platform: string;
|
|
219
|
+
version: string;
|
|
621
220
|
};
|
|
221
|
+
declare enum Capabilities {
|
|
222
|
+
SDK = "sdk",
|
|
223
|
+
ML = "ml",
|
|
224
|
+
THIRD_PARTY_ANALYTICS = "third_party_analytics",
|
|
225
|
+
THIRD_PARTY_TRANSACTIONS = "third_party_transactions",
|
|
226
|
+
PAYWALL_PERSONALIZATION = "paywall_personalization",
|
|
227
|
+
ANONYMOUS_MODE_CAPABILITY = "anonymous_allowed",
|
|
228
|
+
LANGUAGE_MANAGEMENT = "language_management",
|
|
229
|
+
ENTITLEMENT_MANAGEMENT = "entitlement_management"
|
|
230
|
+
}
|
|
622
231
|
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
232
|
+
/**
|
|
233
|
+
* @type NamiLanguageCodes
|
|
234
|
+
* Languages supported by Nami paywalls
|
|
235
|
+
*/
|
|
236
|
+
type NamiLanguageCodes =
|
|
237
|
+
/** Language Afrikaans **/
|
|
238
|
+
"af"
|
|
239
|
+
/** Language Arabic **/
|
|
240
|
+
| "ar"
|
|
241
|
+
/** Language Algerian **/
|
|
242
|
+
| "ar-dz"
|
|
243
|
+
/** Language Asturian **/
|
|
244
|
+
| "ast"
|
|
245
|
+
/** Language Azerbaijani **/
|
|
246
|
+
| "az"
|
|
247
|
+
/** Language Bulgarian **/
|
|
248
|
+
| "bg"
|
|
249
|
+
/** Language Belarusian **/
|
|
250
|
+
| "be"
|
|
251
|
+
/** Language Bengali **/
|
|
252
|
+
| "bn"
|
|
253
|
+
/** Language Breton **/
|
|
254
|
+
| "br"
|
|
255
|
+
/** Language Bosnian **/
|
|
256
|
+
| "bs"
|
|
257
|
+
/** Language Catalan **/
|
|
258
|
+
| "ca"
|
|
259
|
+
/** Language Czech **/
|
|
260
|
+
| "cs"
|
|
261
|
+
/** Language Welsh **/
|
|
262
|
+
| "cy"
|
|
263
|
+
/** Language Danish **/
|
|
264
|
+
| "da"
|
|
265
|
+
/** Language German **/
|
|
266
|
+
| "de"
|
|
267
|
+
/** Language Lower Sorbian **/
|
|
268
|
+
| "dsb"
|
|
269
|
+
/** Language Greek **/
|
|
270
|
+
| "el"
|
|
271
|
+
/** Language English **/
|
|
272
|
+
| "en"
|
|
273
|
+
/** Language Australian English **/
|
|
274
|
+
| "en-au"
|
|
275
|
+
/** Language British English **/
|
|
276
|
+
| "en-gb"
|
|
277
|
+
/** Language Esperanto **/
|
|
278
|
+
| "eo"
|
|
279
|
+
/** Language Spanish **/
|
|
280
|
+
| "es"
|
|
281
|
+
/** Language Argentinian Spanish **/
|
|
282
|
+
| "es-ar"
|
|
283
|
+
/** Language Colombian Spanish **/
|
|
284
|
+
| "es-co"
|
|
285
|
+
/** Language Mexican Spanish **/
|
|
286
|
+
| "es-mx"
|
|
287
|
+
/** Language Nicaraguan Spanish **/
|
|
288
|
+
| "es-ni"
|
|
289
|
+
/** Language Venezuelan Spanish **/
|
|
290
|
+
| "es-ve"
|
|
291
|
+
/** Language Estonian **/
|
|
292
|
+
| "et"
|
|
293
|
+
/** Language Basque **/
|
|
294
|
+
| "eu"
|
|
295
|
+
/** Language Persian **/
|
|
296
|
+
| "fa"
|
|
297
|
+
/** Language Finnish **/
|
|
298
|
+
| "fi"
|
|
299
|
+
/** Language French **/
|
|
300
|
+
| "fr"
|
|
301
|
+
/** Language Frisian **/
|
|
302
|
+
| "fy"
|
|
303
|
+
/** Language Irish **/
|
|
304
|
+
| "ga"
|
|
305
|
+
/** Language Scottish Gaelic **/
|
|
306
|
+
| "gd"
|
|
307
|
+
/** Language Galician **/
|
|
308
|
+
| "gl"
|
|
309
|
+
/** Language Hebrew **/
|
|
310
|
+
| "he"
|
|
311
|
+
/** Language Hindi **/
|
|
312
|
+
| "hi"
|
|
313
|
+
/** Language Croatian **/
|
|
314
|
+
| "hr"
|
|
315
|
+
/** Language Upper Sorbian **/
|
|
316
|
+
| "hsb"
|
|
317
|
+
/** Language Hungarian **/
|
|
318
|
+
| "hu"
|
|
319
|
+
/** Language Armenian **/
|
|
320
|
+
| "hy"
|
|
321
|
+
/** Language Interlingua **/
|
|
322
|
+
| "ia"
|
|
323
|
+
/** Language Indonesian **/
|
|
324
|
+
| "id"
|
|
325
|
+
/** Language Igbo **/
|
|
326
|
+
| "ig"
|
|
327
|
+
/** Language Ido **/
|
|
328
|
+
| "io"
|
|
329
|
+
/** Language Icelandic **/
|
|
330
|
+
| "is"
|
|
331
|
+
/** Language Italian **/
|
|
332
|
+
| "it"
|
|
333
|
+
/** Language Japanese **/
|
|
334
|
+
| "ja"
|
|
335
|
+
/** Language Georgian **/
|
|
336
|
+
| "ka"
|
|
337
|
+
/** Language Kabyle **/
|
|
338
|
+
| "kab"
|
|
339
|
+
/** Language Kazakh **/
|
|
340
|
+
| "kk"
|
|
341
|
+
/** Language Khmer **/
|
|
342
|
+
| "km"
|
|
343
|
+
/** Language Kannada **/
|
|
344
|
+
| "kn"
|
|
345
|
+
/** Language Korean **/
|
|
346
|
+
| "ko"
|
|
347
|
+
/** Language Kyrgyz **/
|
|
348
|
+
| "ky"
|
|
349
|
+
/** Language Luxembourgish **/
|
|
350
|
+
| "lb"
|
|
351
|
+
/** Language Lithuanian **/
|
|
352
|
+
| "lt"
|
|
353
|
+
/** Language Latvian **/
|
|
354
|
+
| "lv"
|
|
355
|
+
/** Language Macedonian **/
|
|
356
|
+
| "mk"
|
|
357
|
+
/** Language Malayalam **/
|
|
358
|
+
| "ml"
|
|
359
|
+
/** Language Mongolian **/
|
|
360
|
+
| "mn"
|
|
361
|
+
/** Language Marathi **/
|
|
362
|
+
| "mr"
|
|
363
|
+
/** Language Burmese **/
|
|
364
|
+
| "my"
|
|
365
|
+
/** Language Norwegian Bokmål **/
|
|
366
|
+
| "nb"
|
|
367
|
+
/** Language Nepali **/
|
|
368
|
+
| "ne"
|
|
369
|
+
/** Language Dutch **/
|
|
370
|
+
| "nl"
|
|
371
|
+
/** Language Norwegian Nynorsk **/
|
|
372
|
+
| "nn"
|
|
373
|
+
/** Language Ossetic **/
|
|
374
|
+
| "os"
|
|
375
|
+
/** Language Punjabi **/
|
|
376
|
+
| "pa"
|
|
377
|
+
/** Language Polish **/
|
|
378
|
+
| "pl"
|
|
379
|
+
/** Language Portuguese **/
|
|
380
|
+
| "pt"
|
|
381
|
+
/** Language Brazilian Portuguese **/
|
|
382
|
+
| "pt-br"
|
|
383
|
+
/** Language Romanian **/
|
|
384
|
+
| "ro"
|
|
385
|
+
/** Language Russian **/
|
|
386
|
+
| "ru"
|
|
387
|
+
/** Language Slovak **/
|
|
388
|
+
| "sk"
|
|
389
|
+
/** Language Slovenian **/
|
|
390
|
+
| "sl"
|
|
391
|
+
/** Language Albanian **/
|
|
392
|
+
| "sq"
|
|
393
|
+
/** Language Serbian **/
|
|
394
|
+
| "sr"
|
|
395
|
+
/** Language Serbian Latin **/
|
|
396
|
+
| "sr-latn"
|
|
397
|
+
/** Language Swedish **/
|
|
398
|
+
| "sv"
|
|
399
|
+
/** Language Swahili **/
|
|
400
|
+
| "sw"
|
|
401
|
+
/** Language Tamil **/
|
|
402
|
+
| "ta"
|
|
403
|
+
/** Language Telugu **/
|
|
404
|
+
| "te"
|
|
405
|
+
/** Language Tajik **/
|
|
406
|
+
| "tg"
|
|
407
|
+
/** Language Thai **/
|
|
408
|
+
| "th"
|
|
409
|
+
/** Language Turkmen **/
|
|
410
|
+
| "tk"
|
|
411
|
+
/** Language Turkish **/
|
|
412
|
+
| "tr"
|
|
413
|
+
/** Language Tatar **/
|
|
414
|
+
| "tt"
|
|
415
|
+
/** Language Udmurt **/
|
|
416
|
+
| "udm"
|
|
417
|
+
/** Language Ukrainian **/
|
|
418
|
+
| "uk"
|
|
419
|
+
/** Language Urdu **/
|
|
420
|
+
| "ur"
|
|
421
|
+
/** Language Uzbek **/
|
|
422
|
+
| "uz"
|
|
423
|
+
/** Language Vietnamese **/
|
|
424
|
+
| "vi"
|
|
425
|
+
/** Language Simplified Chinese **/
|
|
426
|
+
| "zh-hans"
|
|
427
|
+
/** Language Traditional Chinese **/
|
|
428
|
+
| "zh-hant";
|
|
429
|
+
|
|
430
|
+
/**
|
|
431
|
+
* Set the level of logs to print while running the SDK
|
|
432
|
+
*/
|
|
433
|
+
type NamiLogLevel = "error" | "warn" | "info" | "debug";
|
|
434
|
+
declare enum LogLevel {
|
|
435
|
+
DEBUG = 1,
|
|
436
|
+
INFO = 2,
|
|
437
|
+
WARN = 3,
|
|
438
|
+
ERROR = 4
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
/**
|
|
442
|
+
* @type NamiInitialConfig
|
|
443
|
+
*
|
|
444
|
+
* Defines the structure of the initial configuration that can be provided
|
|
445
|
+
* when setting up the Nami SDK.
|
|
446
|
+
*/
|
|
447
|
+
type NamiInitialConfig = InitialConfig | InitialConfigCompressed;
|
|
448
|
+
/**
|
|
449
|
+
* @type NamiConfiguration
|
|
450
|
+
* This is needed to configure and initialize the SDK via [Nami.configure]
|
|
451
|
+
* method
|
|
452
|
+
*
|
|
453
|
+
* @param appPlatformID A UUID for the app. You can find the Nami App Platform ID in the App
|
|
454
|
+
* Settings screen on the Platforms tab in the Nami Control Center.
|
|
455
|
+
* @param logLevel Optional preferable [NamiLogLevel] to set within SDK to get appropriate
|
|
456
|
+
* logging information. Make sure to either not set this param in release build, or set
|
|
457
|
+
* to [NamiLogLevel.ERROR] if you would like Nami error logs to be shown in your release/production
|
|
458
|
+
* app build. Default is set to [NamiLogLevel.WARN]
|
|
459
|
+
* @param namiCommands provides set of external commands useful for SDK.
|
|
460
|
+
* @param initialConfig contains initial configuration, useful in offline mode.
|
|
461
|
+
* @param namiLanguageCode sets the language to be used for paywalls on the device. Select from
|
|
462
|
+
* [NamiLanguageCode]
|
|
463
|
+
* <p>
|
|
464
|
+
* Default is set to `false`. Note that this should be set to `true` only from `debug` or
|
|
465
|
+
* `non-production` version of the app. Setting this to `true` in a `production` build can
|
|
466
|
+
* potentially have unwanted consequences.
|
|
467
|
+
*/
|
|
468
|
+
type NamiConfiguration = {
|
|
469
|
+
appPlatformID: string;
|
|
470
|
+
logLevel?: NamiLogLevel;
|
|
471
|
+
namiCommands?: string[];
|
|
472
|
+
namiLanguageCode?: NamiLanguageCodes;
|
|
473
|
+
initialConfig?: string | NamiInitialConfig;
|
|
474
|
+
formFactor?: string;
|
|
475
|
+
purchaseChannel?: string;
|
|
476
|
+
/** Enable verbose flow lifecycle logging. Debug-only; do not ship in production. */
|
|
477
|
+
maxLogging?: boolean;
|
|
687
478
|
};
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
479
|
+
|
|
480
|
+
/**
|
|
481
|
+
* @enum NamiPaywallAction
|
|
482
|
+
* Types of actions paywall will have
|
|
483
|
+
*/
|
|
484
|
+
declare enum NamiPaywallAction {
|
|
485
|
+
BUY_SKU = "BUY_SKU",
|
|
486
|
+
SELECT_SKU = "SELECT_SKU",
|
|
487
|
+
RESTORE_PURCHASES = "RESTORE_PURCHASES",
|
|
488
|
+
SIGN_IN = "SIGN_IN",
|
|
489
|
+
CLOSE_PAYWALL = "CLOSE_PAYWALL",
|
|
490
|
+
SHOW_PAYWALL = "SHOW_PAYWALL",
|
|
491
|
+
PURCHASE_SELECTED_SKU = "PURCHASE_SELECTED_SKU",
|
|
492
|
+
PURCHASE_SUCCESS = "PURCHASE_SUCCESS",
|
|
493
|
+
PURCHASE_FAILED = "PURCHASE_FAILED",
|
|
494
|
+
PURCHASE_CANCELLED = "PURCHASE_CANCELLED",
|
|
495
|
+
PURCHASE_PENDING = "PURCHASE_PENDING",
|
|
496
|
+
PURCHASE_UNKNOWN = "PURCHASE_UNKNOWN",
|
|
497
|
+
PURCHASE_DEFERRED = "PURCHASE_DEFERRED",
|
|
498
|
+
DEEPLINK = "DEEPLINK",
|
|
499
|
+
TOGGLE_CHANGE = "TOGGLE_CHANGE",
|
|
500
|
+
PAGE_CHANGE = "PAGE_CHANGE",
|
|
501
|
+
SLIDE_CHANGE = "SLIDE_CHANGE",
|
|
502
|
+
COLLAPSIBLE_DRAWER_OPEN = "COLLAPSIBLE_DRAWER_OPEN",
|
|
503
|
+
COLLAPSIBLE_DRAWER_CLOSE = "COLLAPSIBLE_DRAWER_CLOSE",
|
|
504
|
+
VIDEO_STARTED = "VIDEO_STARTED",
|
|
505
|
+
VIDEO_PAUSED = "VIDEO_PAUSED",
|
|
506
|
+
VIDEO_RESUMED = "VIDEO_RESUMED",
|
|
507
|
+
VIDEO_ENDED = "VIDEO_ENDED",
|
|
508
|
+
VIDEO_CHANGED = "VIDEO_CHANGED",
|
|
509
|
+
VIDEO_MUTED = "VIDEO_MUTED",
|
|
510
|
+
VIDEO_UNMUTED = "VIDEO_UNMUTED",
|
|
511
|
+
COUNTDOWN_TIMER_COMPLETED = "COUNTDOWN_TIMER_COMPLETED",
|
|
512
|
+
UNKNOWN = "UNKNOWN"
|
|
513
|
+
}
|
|
514
|
+
/**
|
|
515
|
+
* @type NamiPaywallEvent
|
|
516
|
+
* Represents the events(actions) triggered by rendered paywall
|
|
517
|
+
*/
|
|
518
|
+
type NamiPaywallEvent = {
|
|
519
|
+
/**
|
|
520
|
+
* Any action from [NamiPaywallAction]
|
|
521
|
+
*/
|
|
522
|
+
action: NamiPaywallAction;
|
|
523
|
+
sku?: NamiSKU;
|
|
524
|
+
campaignId?: string;
|
|
525
|
+
campaignName?: string;
|
|
526
|
+
campaignType?: string;
|
|
527
|
+
campaignLabel?: string;
|
|
528
|
+
campaignUrl?: string;
|
|
529
|
+
paywallId?: string;
|
|
530
|
+
paywallName?: string;
|
|
531
|
+
componentChange?: NamiPaywallComponentChange;
|
|
532
|
+
/**
|
|
533
|
+
* segment from [NamiCampaign]
|
|
534
|
+
*/
|
|
535
|
+
segmentId?: string;
|
|
536
|
+
/**
|
|
537
|
+
* external_segment from [NamiCampaign]
|
|
538
|
+
*/
|
|
539
|
+
externalSegmentId: string | null;
|
|
540
|
+
deeplinkUrl?: string;
|
|
541
|
+
purchaseError?: string;
|
|
542
|
+
purchases?: NamiPurchase[];
|
|
543
|
+
/**
|
|
544
|
+
* Total time user has spent on paywall page,
|
|
545
|
+
* From rendering paywall to clicking on close button of paywall
|
|
546
|
+
*/
|
|
547
|
+
timeSpentOnPaywall?: number;
|
|
548
|
+
videoMetaData?: NamiPaywallEventVideoMetadata;
|
|
549
|
+
purchaseChannel?: string;
|
|
705
550
|
};
|
|
706
|
-
type
|
|
707
|
-
|
|
708
|
-
|
|
551
|
+
type NamiPaywallActionHandler = (event: NamiPaywallEvent) => void;
|
|
552
|
+
/**
|
|
553
|
+
* Permitted value types for entries in {@link NamiPaywallLaunchContext.customAttributes}.
|
|
554
|
+
*
|
|
555
|
+
* Values are matched strictly by type: the string "true" and the boolean true are
|
|
556
|
+
* distinct values that never compare equal. A key present with any non-null value —
|
|
557
|
+
* including false or "false" — is considered "set".
|
|
558
|
+
*/
|
|
559
|
+
type NamiCustomAttributeValue = string | boolean | number;
|
|
560
|
+
/**
|
|
561
|
+
* @type NamiPaywallLaunchContext
|
|
562
|
+
* Will be used to pass custom context while launching paywall
|
|
563
|
+
*/
|
|
564
|
+
type NamiPaywallLaunchContext = {
|
|
565
|
+
productGroups?: string[];
|
|
566
|
+
customAttributes: {
|
|
567
|
+
[key: string]: NamiCustomAttributeValue;
|
|
709
568
|
};
|
|
569
|
+
customObject?: {
|
|
570
|
+
[key: string]: any;
|
|
571
|
+
};
|
|
572
|
+
currentGroup?: string;
|
|
710
573
|
};
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
component: "flexProductContainer";
|
|
718
|
-
products: "all" | "subset";
|
|
719
|
-
flexDirection: FlexDirectionObject;
|
|
720
|
-
subsetGroup?: string;
|
|
721
|
-
productFeaturedComponents?: TContainer[];
|
|
722
|
-
productBaseComponents?: TContainer[];
|
|
723
|
-
};
|
|
724
|
-
type FlexDirectionObject = {
|
|
725
|
-
small: "vertical" | "horizontal";
|
|
726
|
-
medium: "vertical" | "horizontal";
|
|
727
|
-
large: "vertical" | "horizontal";
|
|
728
|
-
xlarge: "vertical" | "horizontal";
|
|
729
|
-
};
|
|
730
|
-
type TProductContainer = Omit<TContainer, "component"> & {
|
|
731
|
-
component: "productContainer";
|
|
732
|
-
products: "all" | "subset";
|
|
733
|
-
subsetGroup?: string;
|
|
734
|
-
productFeaturedComponents?: TContainer[];
|
|
735
|
-
productBaseComponents?: TContainer[];
|
|
736
|
-
};
|
|
737
|
-
type TStack = Omit<TContainer, "component"> & {
|
|
738
|
-
component: "stack";
|
|
739
|
-
};
|
|
740
|
-
type TCollapseContainer = TBaseComponent & {
|
|
741
|
-
component: "collapseContainer";
|
|
742
|
-
collapseHeader: TContainer;
|
|
743
|
-
components: TComponent[];
|
|
744
|
-
open: "collapse" | "open";
|
|
745
|
-
backgroundBlur?: number | null;
|
|
574
|
+
/**
|
|
575
|
+
* @type NamiPaywallComponentChange
|
|
576
|
+
*/
|
|
577
|
+
type NamiPaywallComponentChange = {
|
|
578
|
+
id?: string;
|
|
579
|
+
name?: string;
|
|
746
580
|
};
|
|
747
|
-
|
|
581
|
+
/**
|
|
582
|
+
* @type NamiPaywallEventVideoMetadata
|
|
583
|
+
*/
|
|
584
|
+
type NamiPaywallEventVideoMetadata = {
|
|
748
585
|
id?: string;
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
lineColor?: string;
|
|
757
|
-
lineCornerRadius?: number;
|
|
758
|
-
dotSize?: number;
|
|
759
|
-
dotColor?: string;
|
|
760
|
-
dotCornerRadius?: number;
|
|
761
|
-
dotBorderWidth?: number;
|
|
762
|
-
dotBorderColor?: string;
|
|
763
|
-
conditionAttributes?: TConditionalComponent[];
|
|
586
|
+
name?: string;
|
|
587
|
+
url?: string;
|
|
588
|
+
loopVideo: boolean;
|
|
589
|
+
muteByDefault: boolean;
|
|
590
|
+
autoplayVideo: boolean;
|
|
591
|
+
contentTimecode?: number;
|
|
592
|
+
contentDuration?: number;
|
|
764
593
|
};
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
594
|
+
|
|
595
|
+
/**
|
|
596
|
+
* @type NamiEntitlement
|
|
597
|
+
* Represents what features a device has access to in an app.
|
|
598
|
+
*/
|
|
599
|
+
type NamiEntitlement$1 = {
|
|
600
|
+
/**
|
|
601
|
+
* The last known Purchase that unlocked this entitlement. There must be a corresponding
|
|
602
|
+
* NamiSKU associated to this NamiPurchase. That NamiSKU must reside in purchasedSKUs.
|
|
603
|
+
*/
|
|
604
|
+
activePurchases: NamiPurchase[];
|
|
605
|
+
/**
|
|
606
|
+
* Description of entitlement
|
|
607
|
+
*/
|
|
608
|
+
desc: string;
|
|
609
|
+
/**
|
|
610
|
+
* Friendly name of entitlement
|
|
611
|
+
*/
|
|
612
|
+
name: string;
|
|
613
|
+
/**
|
|
614
|
+
* Internal ID for use by the Nami SDK
|
|
615
|
+
*/
|
|
616
|
+
namiId: string;
|
|
617
|
+
/**
|
|
618
|
+
* NamiSKUs purchased by the user that actually unlock this entitlement
|
|
619
|
+
*/
|
|
620
|
+
purchasedSkus: NamiSKU[];
|
|
621
|
+
/**
|
|
622
|
+
* The unique ID of the entitlement defined in the Nami Control Center, use this to refer
|
|
623
|
+
* to the system when referencing an entitlement.
|
|
624
|
+
*/
|
|
625
|
+
referenceId: string;
|
|
626
|
+
/**
|
|
627
|
+
* The list of possible NamiSKU objects that would unlock this entitlement
|
|
628
|
+
*/
|
|
629
|
+
relatedSkus: NamiSKU[];
|
|
774
630
|
};
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
631
|
+
|
|
632
|
+
declare enum LaunchCampaignError {
|
|
633
|
+
DEFAULT_CAMPAIGN_NOT_FOUND = "Default campaign not found",
|
|
634
|
+
LABELED_CAMPAIGN_NOT_FOUND = "Labeled campaign not found",
|
|
635
|
+
CAMPAIGN_DATA_NOT_FOUND = "Campaign data not found",
|
|
636
|
+
PAYWALL_ALREADY_DISPLAYED = "Paywall is already being displayed",
|
|
637
|
+
SDK_NOT_INITIALIZED = "SDK has not been initialized",
|
|
638
|
+
PAYWALL_COULD_NOT_DISPLAY = "Failed to display paywall",
|
|
639
|
+
URL_CAMPAIGN_NOT_FOUND = "URL campaign not found",
|
|
640
|
+
PRODUCT_DATA_NOT_FOUND = "Product data not found",
|
|
641
|
+
PRODUCT_GROUPS_NOT_FOUND = "Product groups not found",
|
|
642
|
+
FLOW_SCREEN_DATA_UNAVILABLE = "Flow unavailable due to missing screen data"
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
/**
|
|
646
|
+
* This data class represents a customer's subscription journey state
|
|
647
|
+
*/
|
|
648
|
+
type CustomerJourneyState = {
|
|
649
|
+
former_subscriber: boolean;
|
|
650
|
+
in_grace_period: boolean;
|
|
651
|
+
in_trial_period: boolean;
|
|
652
|
+
in_intro_offer_period: boolean;
|
|
653
|
+
is_cancelled: boolean;
|
|
654
|
+
in_pause: boolean;
|
|
655
|
+
in_account_hold: boolean;
|
|
787
656
|
};
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
657
|
+
/**
|
|
658
|
+
* This data class represents a device's profile
|
|
659
|
+
*/
|
|
660
|
+
type DeviceProfile = {
|
|
661
|
+
customer_journey_state: CustomerJourneyState;
|
|
662
|
+
};
|
|
663
|
+
|
|
664
|
+
type NamiPurchaseSource = 'CAMPAIGN' | 'MARKETPLACE' | 'UNKNOWN';
|
|
665
|
+
type TransactionRequest = {
|
|
666
|
+
quantity?: string;
|
|
667
|
+
currency?: string;
|
|
668
|
+
purchase_env: string;
|
|
669
|
+
amount?: number;
|
|
670
|
+
impression: string;
|
|
671
|
+
session?: string;
|
|
672
|
+
original_transaction_id?: string;
|
|
673
|
+
transaction_id: string;
|
|
674
|
+
source?: string;
|
|
675
|
+
sku: string;
|
|
676
|
+
localized_description?: string;
|
|
677
|
+
subscription_interval?: string;
|
|
678
|
+
subscription_interval_count?: number;
|
|
679
|
+
purchase_date?: string;
|
|
680
|
+
original_purchase_date?: string;
|
|
681
|
+
app_env: string;
|
|
808
682
|
};
|
|
809
|
-
type
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
inactiveBorderColor?: string;
|
|
820
|
-
inactiveBorderWidth?: number;
|
|
821
|
-
inactiveDropShadow?: string;
|
|
822
|
-
sku?: NamiSKU;
|
|
683
|
+
type PurchaseValidationRequest = {
|
|
684
|
+
app_env: string;
|
|
685
|
+
payload: string;
|
|
686
|
+
sku: string;
|
|
687
|
+
};
|
|
688
|
+
type NamiPurchaseCompleteResult = {
|
|
689
|
+
success: boolean;
|
|
690
|
+
billingResponseCode?: number;
|
|
691
|
+
message?: string;
|
|
692
|
+
purchase?: NamiPurchase;
|
|
823
693
|
};
|
|
824
694
|
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
flag?: null | string;
|
|
833
|
-
context?: {
|
|
834
|
-
[key: string]: any;
|
|
835
|
-
};
|
|
695
|
+
/**
|
|
696
|
+
* @type NamiPurchase
|
|
697
|
+
* This object represents a completed purchase in the SDK. A device purchases a NamiSKU and that
|
|
698
|
+
* purchase makes available a set of NamiEntitlements
|
|
699
|
+
*/
|
|
700
|
+
type NamiPurchase = {
|
|
701
|
+
sku?: NamiSKU;
|
|
836
702
|
/**
|
|
837
|
-
*
|
|
838
|
-
* where it is set, per the TV Full-Page Announcement contract
|
|
839
|
-
* (https://linear.app/nami-product-development/document/tv-full-page-announcement-980f61b96e7c):
|
|
840
|
-
*
|
|
841
|
-
* - **On focusable elements** (buttons, toggles, etc.): the element's own
|
|
842
|
-
* label, spoken when the element receives focus. For subscription-plan
|
|
843
|
-
* CTAs the backend resolves this dynamically to
|
|
844
|
-
* `"{price} {period} [{tier}] subscription plan button"`.
|
|
845
|
-
*
|
|
846
|
-
* - **On containers** (any TBaseComponent-derived container, and TPages):
|
|
847
|
-
* an optional *server-supplied composite override*. When set, SDKs
|
|
848
|
-
* announce this verbatim on first focus of the page's default CTA
|
|
849
|
-
* instead of tree-walking the page's text. When omitted, SDKs derive
|
|
850
|
-
* the composite by walking visible `text` / `text-list` descendants in
|
|
851
|
-
* source order (skipping `image`, `hidden: true`, and non-text leaves)
|
|
852
|
-
* and appending the focused button's label.
|
|
703
|
+
* The store sku reference identifier for this NamiPurchase
|
|
853
704
|
*/
|
|
854
|
-
|
|
705
|
+
skuId: string;
|
|
855
706
|
/**
|
|
856
|
-
*
|
|
857
|
-
* is set on (e.g. "Double-tap to subscribe"). Optional; SDKs that lack a
|
|
858
|
-
* hint affordance may omit it.
|
|
707
|
+
* The purchase order ID record or receipt ID associated to this purchase
|
|
859
708
|
*/
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
borderRadius?: number;
|
|
879
|
-
borderColor?: string;
|
|
880
|
-
borders?: Array<BorderSideType>;
|
|
881
|
-
focusedBorders?: Array<BorderSideType>;
|
|
882
|
-
focusedFillColor?: string;
|
|
883
|
-
focusedFontColor?: string;
|
|
884
|
-
focusedBorderColor?: string;
|
|
885
|
-
focusedBorderWidth?: number;
|
|
886
|
-
focusedBorderRadius?: number;
|
|
887
|
-
roundBorders?: Array<BorderLocationType>;
|
|
888
|
-
focusedRoundBorders?: Array<BorderLocationType>;
|
|
889
|
-
fillColorFallback?: string;
|
|
890
|
-
focusedFillColorFallback?: string;
|
|
891
|
-
zIndex?: number;
|
|
892
|
-
conditionAttributes?: TConditionalAttributes;
|
|
893
|
-
height?: number | string;
|
|
894
|
-
width?: number | string;
|
|
895
|
-
dropShadow?: string;
|
|
896
|
-
onTap?: UserAction;
|
|
897
|
-
actionTap?: string;
|
|
898
|
-
refId?: string;
|
|
899
|
-
_fields?: {
|
|
900
|
-
[attribute: string]: TFieldSettings;
|
|
901
|
-
} & {
|
|
902
|
-
_group: string;
|
|
903
|
-
_label: string;
|
|
904
|
-
_toggleAttr: string | null;
|
|
905
|
-
_toggleValue: any;
|
|
906
|
-
_collapsible: boolean;
|
|
907
|
-
_hint: string | null;
|
|
908
|
-
};
|
|
909
|
-
_fieldGroupLabel?: string;
|
|
910
|
-
_fieldLabel?: string;
|
|
911
|
-
_fieldHint?: string;
|
|
912
|
-
_fieldReadOnly?: boolean;
|
|
913
|
-
_fieldPlaceholder?: string;
|
|
914
|
-
_fieldDescription?: string;
|
|
915
|
-
_fieldOmit?: string[];
|
|
916
|
-
fixedHeight?: number;
|
|
917
|
-
fixedWidth?: number | "fitContent";
|
|
918
|
-
hidden?: boolean;
|
|
919
|
-
animation?: NamiAnimationSpec;
|
|
920
|
-
}
|
|
921
|
-
type TComponent = TButtonContainer | TContainer | TTextListComponent | TTextComponent | TSpacerComponent | TImageComponent | TSvgImageComponent | TSymbolComponent | TCarouselContainer | TProductContainer | TFlexProductContainer | TStack | TConditionalComponent | TSegmentPicker | TSegmentPickerItem | TVideoComponent | TCollapseContainer | TResponsiveGrid | TRepeatingGrid | TVolumeButton | TPlayPauseButton | TQRCodeComponent | TToggleSwitch | TRadioButton | TProgressIndicatorComponent | TToggleButtonComponent | TCountdownTimerTextComponent | TTextInputComponent | TProgressBarComponent;
|
|
922
|
-
type DirectionType = "vertical" | "horizontal";
|
|
923
|
-
type AlignmentType = "center" | "right" | "left" | "top" | "bottom";
|
|
924
|
-
type BorderLocationType = "upperLeft" | "upperRight" | "lowerLeft" | "lowerRight";
|
|
925
|
-
type BorderSideType = 'left' | 'right' | 'top' | 'bottom';
|
|
926
|
-
type TContainerPosition = `${'center' | 'start' | 'end'}-${'top' | 'bottom' | 'left' | 'right'}`;
|
|
927
|
-
declare const BorderMap: Record<BorderLocationType, string>;
|
|
928
|
-
declare const BorderSideMap: Record<BorderSideType, string>;
|
|
929
|
-
type TTestObject = {
|
|
930
|
-
value: any;
|
|
931
|
-
expected: any;
|
|
932
|
-
operator: "equals" | "contains" | "notEquals" | "set" | "notSet" | "notContains" | 'gt' | 'lt' | 'gte' | 'lte';
|
|
933
|
-
};
|
|
934
|
-
type TransformToString<T> = {
|
|
935
|
-
[P in keyof T]: T[P] extends number | boolean ? T[P] | string : T[P];
|
|
936
|
-
};
|
|
937
|
-
type TConditionalAttributes = Array<Omit<TConditionalComponent, "components"> & {
|
|
938
|
-
attributes: Partial<TransformToString<TBaseComponent>> & {
|
|
939
|
-
name?: string;
|
|
940
|
-
text?: string;
|
|
941
|
-
texts?: string[];
|
|
942
|
-
url?: string;
|
|
943
|
-
fontSize?: number;
|
|
944
|
-
screenreaderText?: string;
|
|
945
|
-
fontColor?: string;
|
|
946
|
-
linkColor?: string;
|
|
947
|
-
};
|
|
948
|
-
}>;
|
|
949
|
-
type TField = "image" | "listContainerComponent" | "text" | "url" | "textArea" | "fontSelect" | "splitTextArea" | "color" | "colorGradient" | "number" | "alignment" | "carouselSlides" | "option" | "iconSelect" | "toggle";
|
|
950
|
-
type TContainer = TBaseComponent & {
|
|
951
|
-
component: "container" | "formContainer";
|
|
952
|
-
position?: TContainerPosition;
|
|
953
|
-
fillColor?: string;
|
|
954
|
-
fillImage?: string | null;
|
|
955
|
-
components?: TComponent[];
|
|
956
|
-
loopVariable?: string;
|
|
957
|
-
loopSource?: string | any[];
|
|
958
|
-
backgroundBlur?: number | null;
|
|
709
|
+
transactionIdentifier?: string;
|
|
710
|
+
/**
|
|
711
|
+
* For bypass store purchases only, indicates when this purchase will cease to back
|
|
712
|
+
* an entitlement rendering it as inactive.
|
|
713
|
+
*/
|
|
714
|
+
expires?: Date;
|
|
715
|
+
/**
|
|
716
|
+
* The source a purchase comes from - either on Google Play (marketplace), through a paywall (campaign).
|
|
717
|
+
*/
|
|
718
|
+
purchaseToken?: string;
|
|
719
|
+
/**
|
|
720
|
+
* The date and time when the purchase was initiated
|
|
721
|
+
*/
|
|
722
|
+
purchaseInitiatedTimestamp?: Date;
|
|
723
|
+
/**
|
|
724
|
+
* The source a purchase comes from - either on Google Play (marketplace), through a paywall (campaign).
|
|
725
|
+
*/
|
|
726
|
+
purchaseSource?: NamiPurchaseSource;
|
|
959
727
|
};
|
|
960
|
-
type
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
}[] | null;
|
|
973
|
-
maxLimit: number | null;
|
|
974
|
-
minLimit: number | null;
|
|
975
|
-
aspectRatio: number | null;
|
|
976
|
-
newSlide?: TCarouselSlide;
|
|
977
|
-
carousel?: string;
|
|
978
|
-
darkModeVariable?: string;
|
|
979
|
-
conditions?: TTestObject[];
|
|
980
|
-
showOpacity?: boolean;
|
|
981
|
-
newRow?: any;
|
|
728
|
+
type NamiPurchasesState = 'pending' | 'purchased' | 'consumed' | 'resubscribed' | 'unsubscribed' | 'deferred' | 'failed' | 'cancelled' | 'unknown';
|
|
729
|
+
/**
|
|
730
|
+
* Host-supplied details of a completed purchase, passed to
|
|
731
|
+
* `NamiPaywallManager.buySkuComplete` (and the `purchase` handoff outcome)
|
|
732
|
+
* when the integrating app manages its own billing. Named to match the
|
|
733
|
+
* Apple/Android `NamiPurchaseSuccess` types for a consistent cross-SDK family.
|
|
734
|
+
*/
|
|
735
|
+
type NamiPurchaseSuccess = {
|
|
736
|
+
skuId: string;
|
|
737
|
+
transactionId: string;
|
|
738
|
+
amount?: number;
|
|
739
|
+
currency?: string;
|
|
982
740
|
};
|
|
741
|
+
/**
|
|
742
|
+
* @deprecated Renamed to {@link NamiPurchaseSuccess} for cross-SDK naming
|
|
743
|
+
* consistency. This alias is structurally identical and kept so existing
|
|
744
|
+
* integrations keep compiling; prefer `NamiPurchaseSuccess` in new code.
|
|
745
|
+
*/
|
|
746
|
+
type NamiPurchaseDetails = NamiPurchaseSuccess;
|
|
983
747
|
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
748
|
+
declare const NamiFlowStepType: {
|
|
749
|
+
readonly ENTRY: "entry";
|
|
750
|
+
readonly SCREEN: "screen";
|
|
751
|
+
readonly BRANCH: "branch";
|
|
752
|
+
readonly EXIT: "exit";
|
|
753
|
+
readonly UNKNOWN: "unknown";
|
|
754
|
+
};
|
|
755
|
+
type NamiFlowStepType = (typeof NamiFlowStepType)[keyof typeof NamiFlowStepType];
|
|
756
|
+
declare enum NamiFlowActionFunction {
|
|
757
|
+
NAVIGATE = "flowNav",
|
|
758
|
+
BACK = "flowPrev",
|
|
759
|
+
NEXT = "flowNext",
|
|
760
|
+
FINISHED = "flowDone",
|
|
761
|
+
DISMISS = "flowDismiss",
|
|
762
|
+
EXIT = "flowExit",
|
|
763
|
+
HANDOFF = "flowHandoff",
|
|
764
|
+
TRACK = "trackEvent",
|
|
765
|
+
LOG = "logEvent",
|
|
766
|
+
SET_VIDEO = "setVideo",
|
|
767
|
+
FLOW_EVENT = "flowEvent",
|
|
768
|
+
BLOCK_BACK = "blockBackToStep",
|
|
769
|
+
FLOW_ENABLED = "flowInteractionEnabled",
|
|
770
|
+
FLOW_DISABLED = "flowInteractionDisabled",
|
|
771
|
+
SET_TAGS = "setTags",
|
|
772
|
+
SET_TAGS_FROM_FORM = "setTagsFromForm",
|
|
773
|
+
PAUSE = "flowPause",
|
|
774
|
+
RESUME = "flowResume",
|
|
775
|
+
SET_LAUNCH_CONTEXT = "setLaunchContext",
|
|
776
|
+
SET_FLOW_PATH = "setFlowPath"
|
|
777
|
+
}
|
|
778
|
+
/**
|
|
779
|
+
* Customer-facing handoff tag vocabulary.
|
|
780
|
+
*
|
|
781
|
+
* Keep in sync with `FlowHandoffTag` in nami-platform
|
|
782
|
+
* `services/frontend/src/api/types/flow.types.tsx` (minus the `__*__`
|
|
783
|
+
* internal tags, which never reach host handlers). The builder constrains
|
|
784
|
+
* authoring to this set, but the vocabulary evolves — treat unknown tags as
|
|
785
|
+
* pass-through, never as errors.
|
|
786
|
+
*
|
|
787
|
+
* Note `Tracking` is the legacy `att` authoring convention; the permission
|
|
788
|
+
* enum value is `tracking` and the completion wire value is
|
|
789
|
+
* `tracking_authorized`. Aliasing is intentional — do not rename.
|
|
790
|
+
*/
|
|
791
|
+
declare const NamiHandoffTag: {
|
|
792
|
+
readonly Push: "push";
|
|
793
|
+
readonly Location: "location";
|
|
794
|
+
readonly Tracking: "att";
|
|
795
|
+
readonly Deeplink: "deeplink";
|
|
796
|
+
readonly Complete: "complete";
|
|
797
|
+
readonly SignIn: "signin";
|
|
798
|
+
readonly Restore: "restore";
|
|
799
|
+
readonly SignInMvpd: "signin_mvpd";
|
|
800
|
+
readonly BuySku: "buysku";
|
|
801
|
+
readonly UserData: "userdata";
|
|
802
|
+
};
|
|
803
|
+
type NamiKnownHandoffTag = (typeof NamiHandoffTag)[keyof typeof NamiHandoffTag];
|
|
804
|
+
/** Known tags get autocomplete; future builder-added tags still type-check. */
|
|
805
|
+
type NamiHandoffTagValue = NamiKnownHandoffTag | (string & {});
|
|
806
|
+
/**
|
|
807
|
+
* Permission types reportable through a handoff outcome.
|
|
808
|
+
*
|
|
809
|
+
* Tier 1 (`push`, `location`, `tracking`) map to impression
|
|
810
|
+
* `completion_result` wire values; the remaining tier-2 types are accepted
|
|
811
|
+
* (flow state + lifecycle only) and gain wire values via backend tickets
|
|
812
|
+
* without SDK API churn.
|
|
813
|
+
*/
|
|
814
|
+
declare const NamiPermissionOutcome: {
|
|
815
|
+
readonly Push: "push";
|
|
816
|
+
readonly Location: "location";
|
|
817
|
+
readonly Tracking: "tracking";
|
|
818
|
+
readonly Camera: "camera";
|
|
819
|
+
readonly Microphone: "microphone";
|
|
820
|
+
readonly Photos: "photos";
|
|
821
|
+
readonly Contacts: "contacts";
|
|
822
|
+
readonly Bluetooth: "bluetooth";
|
|
823
|
+
readonly Calendar: "calendar";
|
|
824
|
+
readonly Biometrics: "biometrics";
|
|
825
|
+
readonly Health: "health";
|
|
826
|
+
readonly Motion: "motion";
|
|
827
|
+
readonly Speech: "speech";
|
|
828
|
+
readonly LocalNetwork: "localNetwork";
|
|
829
|
+
};
|
|
830
|
+
type NamiPermissionOutcome = (typeof NamiPermissionOutcome)[keyof typeof NamiPermissionOutcome];
|
|
831
|
+
/**
|
|
832
|
+
* Primitive value allowed in host-asserted handoff attributes — no nesting,
|
|
833
|
+
* so bridge validation and smart-text interpolation stay trivial.
|
|
834
|
+
*/
|
|
835
|
+
type NamiHandoffAttributeValue = string | number | boolean;
|
|
836
|
+
/**
|
|
837
|
+
* Host-asserted login result delivered through a handoff outcome.
|
|
838
|
+
*
|
|
839
|
+
* Only `loginId` is required. `attributes` is open-ended host-asserted
|
|
840
|
+
* experience data (e.g. `subscriberStatus`, `subscribedTier`) that feeds
|
|
841
|
+
* flow state for branching and smart text ONLY — it is never merged into
|
|
842
|
+
* Nami-computed subscriber state and never touches entitlements.
|
|
843
|
+
*/
|
|
844
|
+
interface NamiLoginSuccess {
|
|
845
|
+
loginId: string;
|
|
846
|
+
cdpId?: string;
|
|
847
|
+
attributes?: Record<string, NamiHandoffAttributeValue>;
|
|
989
848
|
}
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
}
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
849
|
+
/**
|
|
850
|
+
* Typed result of a flow handoff, reported via `complete(outcome)`.
|
|
851
|
+
* The outcome is authoritative; the handoff tag is routing only.
|
|
852
|
+
*/
|
|
853
|
+
type NamiHandoffOutcome = {
|
|
854
|
+
kind: 'done';
|
|
855
|
+
} | {
|
|
856
|
+
kind: 'permission';
|
|
857
|
+
permission: NamiPermissionOutcome;
|
|
858
|
+
granted: boolean;
|
|
859
|
+
detail?: string;
|
|
860
|
+
} | {
|
|
861
|
+
kind: 'purchase';
|
|
862
|
+
result: 'success';
|
|
863
|
+
details: NamiPurchaseSuccess;
|
|
864
|
+
} | {
|
|
865
|
+
kind: 'purchase';
|
|
866
|
+
result: 'cancelled';
|
|
867
|
+
} | {
|
|
868
|
+
kind: 'purchase';
|
|
869
|
+
result: 'failed';
|
|
870
|
+
error?: unknown;
|
|
871
|
+
} | {
|
|
872
|
+
kind: 'login';
|
|
873
|
+
result: 'success';
|
|
874
|
+
details: NamiLoginSuccess;
|
|
875
|
+
} | {
|
|
876
|
+
kind: 'login';
|
|
877
|
+
result: 'cancelled';
|
|
878
|
+
} | {
|
|
879
|
+
kind: 'login';
|
|
880
|
+
result: 'failed';
|
|
881
|
+
error?: unknown;
|
|
1008
882
|
};
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
883
|
+
/**
|
|
884
|
+
* Once-only completion callback handed to handoff handlers. Calling it with
|
|
885
|
+
* no argument is equivalent to `complete({ kind: 'done' })` — nothing to
|
|
886
|
+
* report, just resume. The explicit form remains available for audit-trail
|
|
887
|
+
* clarity at call sites.
|
|
888
|
+
*/
|
|
889
|
+
type NamiHandoffComplete = (outcome?: NamiHandoffOutcome) => void;
|
|
890
|
+
/**
|
|
891
|
+
* Structured payload delivered for `userdata` handoffs — Nami handing the
|
|
892
|
+
* host app data the user provided in a Nami-rendered form. Delivery and
|
|
893
|
+
* Nami-side retention are orthogonal: nothing in `fields` is persisted by
|
|
894
|
+
* Nami unless the flow explicitly runs a retention action
|
|
895
|
+
* (`setTagsFromForm`).
|
|
896
|
+
*/
|
|
897
|
+
interface NamiUserDataEnvelope {
|
|
898
|
+
form_id: string;
|
|
899
|
+
step_id: string;
|
|
900
|
+
/** ISO-8601 UTC timestamp of delivery. */
|
|
901
|
+
collected_at: string;
|
|
902
|
+
fields: Record<string, boolean | string>;
|
|
1018
903
|
}
|
|
1019
|
-
|
|
1020
904
|
/**
|
|
1021
|
-
*
|
|
1022
|
-
*
|
|
905
|
+
* Handoff handler: receives a `complete` callback that reports a typed
|
|
906
|
+
* outcome AND resumes the flow in one call.
|
|
907
|
+
*
|
|
908
|
+
* Handlers written against the pre-outcome signature `(tag, data)` still
|
|
909
|
+
* run (the extra argument is ignored at runtime) — their existing
|
|
910
|
+
* `NamiFlowManager.resume()` call degrades to `complete({kind:'done'})`
|
|
911
|
+
* with a migration warning.
|
|
1023
912
|
*/
|
|
1024
|
-
type
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
/** Language Irish **/
|
|
1092
|
-
| "ga"
|
|
1093
|
-
/** Language Scottish Gaelic **/
|
|
1094
|
-
| "gd"
|
|
1095
|
-
/** Language Galician **/
|
|
1096
|
-
| "gl"
|
|
1097
|
-
/** Language Hebrew **/
|
|
1098
|
-
| "he"
|
|
1099
|
-
/** Language Hindi **/
|
|
1100
|
-
| "hi"
|
|
1101
|
-
/** Language Croatian **/
|
|
1102
|
-
| "hr"
|
|
1103
|
-
/** Language Upper Sorbian **/
|
|
1104
|
-
| "hsb"
|
|
1105
|
-
/** Language Hungarian **/
|
|
1106
|
-
| "hu"
|
|
1107
|
-
/** Language Armenian **/
|
|
1108
|
-
| "hy"
|
|
1109
|
-
/** Language Interlingua **/
|
|
1110
|
-
| "ia"
|
|
1111
|
-
/** Language Indonesian **/
|
|
1112
|
-
| "id"
|
|
1113
|
-
/** Language Igbo **/
|
|
1114
|
-
| "ig"
|
|
1115
|
-
/** Language Ido **/
|
|
1116
|
-
| "io"
|
|
1117
|
-
/** Language Icelandic **/
|
|
1118
|
-
| "is"
|
|
1119
|
-
/** Language Italian **/
|
|
1120
|
-
| "it"
|
|
1121
|
-
/** Language Japanese **/
|
|
1122
|
-
| "ja"
|
|
1123
|
-
/** Language Georgian **/
|
|
1124
|
-
| "ka"
|
|
1125
|
-
/** Language Kabyle **/
|
|
1126
|
-
| "kab"
|
|
1127
|
-
/** Language Kazakh **/
|
|
1128
|
-
| "kk"
|
|
1129
|
-
/** Language Khmer **/
|
|
1130
|
-
| "km"
|
|
1131
|
-
/** Language Kannada **/
|
|
1132
|
-
| "kn"
|
|
1133
|
-
/** Language Korean **/
|
|
1134
|
-
| "ko"
|
|
1135
|
-
/** Language Kyrgyz **/
|
|
1136
|
-
| "ky"
|
|
1137
|
-
/** Language Luxembourgish **/
|
|
1138
|
-
| "lb"
|
|
1139
|
-
/** Language Lithuanian **/
|
|
1140
|
-
| "lt"
|
|
1141
|
-
/** Language Latvian **/
|
|
1142
|
-
| "lv"
|
|
1143
|
-
/** Language Macedonian **/
|
|
1144
|
-
| "mk"
|
|
1145
|
-
/** Language Malayalam **/
|
|
1146
|
-
| "ml"
|
|
1147
|
-
/** Language Mongolian **/
|
|
1148
|
-
| "mn"
|
|
1149
|
-
/** Language Marathi **/
|
|
1150
|
-
| "mr"
|
|
1151
|
-
/** Language Burmese **/
|
|
1152
|
-
| "my"
|
|
1153
|
-
/** Language Norwegian Bokmål **/
|
|
1154
|
-
| "nb"
|
|
1155
|
-
/** Language Nepali **/
|
|
1156
|
-
| "ne"
|
|
1157
|
-
/** Language Dutch **/
|
|
1158
|
-
| "nl"
|
|
1159
|
-
/** Language Norwegian Nynorsk **/
|
|
1160
|
-
| "nn"
|
|
1161
|
-
/** Language Ossetic **/
|
|
1162
|
-
| "os"
|
|
1163
|
-
/** Language Punjabi **/
|
|
1164
|
-
| "pa"
|
|
1165
|
-
/** Language Polish **/
|
|
1166
|
-
| "pl"
|
|
1167
|
-
/** Language Portuguese **/
|
|
1168
|
-
| "pt"
|
|
1169
|
-
/** Language Brazilian Portuguese **/
|
|
1170
|
-
| "pt-br"
|
|
1171
|
-
/** Language Romanian **/
|
|
1172
|
-
| "ro"
|
|
1173
|
-
/** Language Russian **/
|
|
1174
|
-
| "ru"
|
|
1175
|
-
/** Language Slovak **/
|
|
1176
|
-
| "sk"
|
|
1177
|
-
/** Language Slovenian **/
|
|
1178
|
-
| "sl"
|
|
1179
|
-
/** Language Albanian **/
|
|
1180
|
-
| "sq"
|
|
1181
|
-
/** Language Serbian **/
|
|
1182
|
-
| "sr"
|
|
1183
|
-
/** Language Serbian Latin **/
|
|
1184
|
-
| "sr-latn"
|
|
1185
|
-
/** Language Swedish **/
|
|
1186
|
-
| "sv"
|
|
1187
|
-
/** Language Swahili **/
|
|
1188
|
-
| "sw"
|
|
1189
|
-
/** Language Tamil **/
|
|
1190
|
-
| "ta"
|
|
1191
|
-
/** Language Telugu **/
|
|
1192
|
-
| "te"
|
|
1193
|
-
/** Language Tajik **/
|
|
1194
|
-
| "tg"
|
|
1195
|
-
/** Language Thai **/
|
|
1196
|
-
| "th"
|
|
1197
|
-
/** Language Turkmen **/
|
|
1198
|
-
| "tk"
|
|
1199
|
-
/** Language Turkish **/
|
|
1200
|
-
| "tr"
|
|
1201
|
-
/** Language Tatar **/
|
|
1202
|
-
| "tt"
|
|
1203
|
-
/** Language Udmurt **/
|
|
1204
|
-
| "udm"
|
|
1205
|
-
/** Language Ukrainian **/
|
|
1206
|
-
| "uk"
|
|
1207
|
-
/** Language Urdu **/
|
|
1208
|
-
| "ur"
|
|
1209
|
-
/** Language Uzbek **/
|
|
1210
|
-
| "uz"
|
|
1211
|
-
/** Language Vietnamese **/
|
|
1212
|
-
| "vi"
|
|
1213
|
-
/** Language Simplified Chinese **/
|
|
1214
|
-
| "zh-hans"
|
|
1215
|
-
/** Language Traditional Chinese **/
|
|
1216
|
-
| "zh-hant";
|
|
1217
|
-
|
|
913
|
+
type NamiFlowHandoffStepHandler = (handoffTag: string, handoffData: Record<string, any> | undefined, complete: NamiHandoffComplete) => void;
|
|
914
|
+
type NamiFlowEventHandler = (eventHandler: Record<string, any>) => void;
|
|
915
|
+
interface NamiFlowDTO {
|
|
916
|
+
flow_id?: string;
|
|
917
|
+
object_id?: string;
|
|
918
|
+
object?: NamiFlowObjectDTO;
|
|
919
|
+
url?: string;
|
|
920
|
+
page_urls?: Record<string, string>;
|
|
921
|
+
}
|
|
922
|
+
type NamiFlowWithObject = Omit<NamiFlowDTO, 'object'> & {
|
|
923
|
+
object: NamiFlowObjectDTO;
|
|
924
|
+
};
|
|
925
|
+
interface NamiFlowObjectDTO {
|
|
926
|
+
id?: string;
|
|
927
|
+
name?: string;
|
|
928
|
+
resume_from_bookmark?: boolean;
|
|
929
|
+
screens?: string[];
|
|
930
|
+
form_factors?: FormFactor[];
|
|
931
|
+
version?: string;
|
|
932
|
+
steps?: NamiFlowStep[];
|
|
933
|
+
transition?: NamiFlowTransition;
|
|
934
|
+
}
|
|
935
|
+
type SetVideoAction = {
|
|
936
|
+
name?: string;
|
|
937
|
+
url?: string;
|
|
938
|
+
};
|
|
939
|
+
interface NamiFlowAction {
|
|
940
|
+
id?: string;
|
|
941
|
+
function: `${NamiFlowActionFunction}`;
|
|
942
|
+
parameters?: {
|
|
943
|
+
handoffTag?: string;
|
|
944
|
+
handoffData?: Record<string, any>;
|
|
945
|
+
handoffFormId?: string;
|
|
946
|
+
flowPath?: string;
|
|
947
|
+
step?: string;
|
|
948
|
+
eventName?: string;
|
|
949
|
+
delay?: string | number;
|
|
950
|
+
[key: string]: any;
|
|
951
|
+
} & SetVideoAction;
|
|
952
|
+
conditions?: NamiConditions[];
|
|
953
|
+
}
|
|
954
|
+
interface NamiFlowOn {
|
|
955
|
+
before?: NamiFlowAction[];
|
|
956
|
+
action?: NamiFlowAction[];
|
|
957
|
+
after?: NamiFlowAction[];
|
|
958
|
+
}
|
|
959
|
+
interface NamiFlowStep {
|
|
960
|
+
id: string;
|
|
961
|
+
name?: string;
|
|
962
|
+
type: NamiFlowStepType;
|
|
963
|
+
screen?: string;
|
|
964
|
+
branch_tags?: string[];
|
|
965
|
+
actions: Partial<Record<string, NamiFlowOn[]>>;
|
|
966
|
+
allow_back_to?: boolean;
|
|
967
|
+
/**
|
|
968
|
+
* Flow-builder "completion step" marker. When `enabled`, the flow is
|
|
969
|
+
* considered meaningfully complete once `condition` is satisfied on this
|
|
970
|
+
* page (e.g. the page is viewed, a purchase succeeds, a permission is
|
|
971
|
+
* granted). `condition` is decoded as a plain string so unrecognized
|
|
972
|
+
* future values degrade gracefully — they simply never match a signal and
|
|
973
|
+
* never report completion. See NAM-1545 / the Flow Completion Step spec.
|
|
974
|
+
*/
|
|
975
|
+
completion_step?: {
|
|
976
|
+
enabled: boolean;
|
|
977
|
+
condition: string;
|
|
978
|
+
} | null;
|
|
979
|
+
}
|
|
1218
980
|
/**
|
|
1219
|
-
*
|
|
981
|
+
* Positive completion conditions a `completion_step` may carry. These double
|
|
982
|
+
* as the `completion_result` wire values reported to the impression PATCH
|
|
983
|
+
* (the positive half of the backend `CompletionResult` enum). Decoded as a
|
|
984
|
+
* plain string on `completion_step.condition`; this union is the SDK-side
|
|
985
|
+
* vocabulary the engine acts on.
|
|
1220
986
|
*/
|
|
1221
|
-
type
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
987
|
+
type NamiFlowCompletionCondition = 'page_view' | 'purchase_success' | 'login_success' | 'push_authorized' | 'location_authorized' | 'tracking_authorized' | 'form_submitted';
|
|
988
|
+
/**
|
|
989
|
+
* Every value the SDK may PATCH as `completion_result`: the positive
|
|
990
|
+
* conditions plus the two non-completion outcomes recorded when a flow
|
|
991
|
+
* terminates without satisfying its condition (feeds the flow-conversion
|
|
992
|
+
* analytics cube). Server-validated; UPDATE-only, last-write-wins.
|
|
993
|
+
*/
|
|
994
|
+
type NamiCompletionResult = NamiFlowCompletionCondition | 'dismiss_page' | 'skip_page';
|
|
995
|
+
type NamiFlowTransition = 'none' | 'slide' | 'verticalSlide' | 'fade';
|
|
996
|
+
type NamiFlowTransitionDirection = 'forward' | 'backward';
|
|
997
|
+
interface NamiFlowAnimation {
|
|
998
|
+
transition: NamiFlowTransition;
|
|
999
|
+
direction: NamiFlowTransitionDirection;
|
|
1227
1000
|
}
|
|
1001
|
+
declare const NamiReservedActions: {
|
|
1002
|
+
readonly BUY_SKU: "__buy_sku__";
|
|
1003
|
+
readonly DEFAULT: "__default__";
|
|
1004
|
+
readonly APPEAR: "__appear__";
|
|
1005
|
+
readonly DISAPPEAR: "__disappear__";
|
|
1006
|
+
readonly LOGIN_SUCCESS: "__login_success__";
|
|
1007
|
+
readonly LOGIN_FAILURE: "__login_failure__";
|
|
1008
|
+
readonly LOGOUT_SUCCESS: "__logout_success__";
|
|
1009
|
+
readonly LOGOUT_FAILURE: "__logout_failure__";
|
|
1010
|
+
readonly PURCHASE_SUCCESS: "__purchase_success__";
|
|
1011
|
+
readonly PURCHASE_FAILURE: "__purchase_failure__";
|
|
1012
|
+
readonly RESUME: "__resume__";
|
|
1013
|
+
readonly REMOTE_BACK: "__remoteback__";
|
|
1014
|
+
readonly TAG_UPDATE: "__tag_update__";
|
|
1015
|
+
readonly PERMISSION_GRANTED: "__permission_granted__";
|
|
1016
|
+
};
|
|
1228
1017
|
|
|
1229
1018
|
/**
|
|
1230
|
-
* @type
|
|
1231
|
-
*
|
|
1232
|
-
* Defines the structure of the initial configuration that can be provided
|
|
1233
|
-
* when setting up the Nami SDK.
|
|
1019
|
+
* @type NamiCampaignSegment
|
|
1020
|
+
* Represents a segment within a campaign.
|
|
1234
1021
|
*/
|
|
1235
|
-
|
|
1022
|
+
interface NamiCampaignSegment {
|
|
1023
|
+
form_factors: FormFactor[];
|
|
1024
|
+
paywall?: string | null;
|
|
1025
|
+
paywall_url?: string | null;
|
|
1026
|
+
page_urls?: Record<string, string> | null;
|
|
1027
|
+
flow?: NamiFlowDTO | null;
|
|
1028
|
+
segment: string;
|
|
1029
|
+
split: number;
|
|
1030
|
+
conversion_event_type?: CampaignRuleConversionEventType | null;
|
|
1031
|
+
conversion_event_url?: string | null;
|
|
1032
|
+
}
|
|
1236
1033
|
/**
|
|
1237
|
-
* @type
|
|
1238
|
-
*
|
|
1239
|
-
* method
|
|
1240
|
-
*
|
|
1241
|
-
* @param appPlatformID A UUID for the app. You can find the Nami App Platform ID in the App
|
|
1242
|
-
* Settings screen on the Platforms tab in the Nami Control Center.
|
|
1243
|
-
* @param logLevel Optional preferable [NamiLogLevel] to set within SDK to get appropriate
|
|
1244
|
-
* logging information. Make sure to either not set this param in release build, or set
|
|
1245
|
-
* to [NamiLogLevel.ERROR] if you would like Nami error logs to be shown in your release/production
|
|
1246
|
-
* app build. Default is set to [NamiLogLevel.WARN]
|
|
1247
|
-
* @param namiCommands provides set of external commands useful for SDK.
|
|
1248
|
-
* @param initialConfig contains initial configuration, useful in offline mode.
|
|
1249
|
-
* @param namiLanguageCode sets the language to be used for paywalls on the device. Select from
|
|
1250
|
-
* [NamiLanguageCode]
|
|
1251
|
-
* <p>
|
|
1252
|
-
* Default is set to `false`. Note that this should be set to `true` only from `debug` or
|
|
1253
|
-
* `non-production` version of the app. Setting this to `true` in a `production` build can
|
|
1254
|
-
* potentially have unwanted consequences.
|
|
1034
|
+
* @type NamiAnonymousCampaign
|
|
1035
|
+
* Represents the anonymous campaign in Nami.
|
|
1255
1036
|
*/
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1037
|
+
interface NamiAnonymousCampaign {
|
|
1038
|
+
rule: string;
|
|
1039
|
+
name: string;
|
|
1040
|
+
type: string | NamiCampaignRuleType;
|
|
1041
|
+
value?: string | null;
|
|
1042
|
+
external_segment: string | null;
|
|
1043
|
+
segments: NamiCampaignSegment[];
|
|
1044
|
+
}
|
|
1045
|
+
/**
|
|
1046
|
+
* @type NamiCampaign
|
|
1047
|
+
* Represents the campaign in Nami.
|
|
1048
|
+
*/
|
|
1049
|
+
interface NamiCampaign {
|
|
1050
|
+
rule: string;
|
|
1051
|
+
name: string;
|
|
1052
|
+
segment: string;
|
|
1053
|
+
paywall?: string | null;
|
|
1054
|
+
paywall_url?: string | null;
|
|
1055
|
+
page_urls?: Record<string, string> | null;
|
|
1056
|
+
type: string | NamiCampaignRuleType;
|
|
1057
|
+
value?: string | null;
|
|
1058
|
+
form_factors: FormFactor[];
|
|
1059
|
+
external_segment: string | null;
|
|
1060
|
+
conversion_event_type?: CampaignRuleConversionEventType | null;
|
|
1061
|
+
conversion_event_url?: string | null;
|
|
1062
|
+
flow?: NamiFlowDTO | null;
|
|
1063
|
+
}
|
|
1064
|
+
interface NamiFlowCampaign extends NamiCampaign {
|
|
1065
|
+
flow: NamiFlowWithObject;
|
|
1066
|
+
}
|
|
1067
|
+
declare function isNamiFlowCampaign(campaign?: NamiCampaign): campaign is NamiFlowCampaign;
|
|
1068
|
+
/**
|
|
1069
|
+
* @enum NamiCampaignRuleType
|
|
1070
|
+
* Types of Nami campaigns
|
|
1071
|
+
*/
|
|
1072
|
+
declare enum NamiCampaignRuleType {
|
|
1073
|
+
DEFAULT = "default",
|
|
1074
|
+
LABEL = "label",
|
|
1075
|
+
UNKNOWN = "unknown",
|
|
1076
|
+
URL = "url"
|
|
1077
|
+
}
|
|
1078
|
+
|
|
1079
|
+
declare const NamiAnimationType: {
|
|
1080
|
+
readonly Wave: "wave";
|
|
1081
|
+
readonly Pulse: "pulse";
|
|
1082
|
+
readonly None: "none";
|
|
1083
|
+
};
|
|
1084
|
+
type NamiAnimationType = typeof NamiAnimationType[keyof typeof NamiAnimationType];
|
|
1085
|
+
type PulseSpec = typeof NamiAnimationType.Pulse | {
|
|
1086
|
+
type: typeof NamiAnimationType.Pulse;
|
|
1087
|
+
duration?: number;
|
|
1088
|
+
scale?: number;
|
|
1089
|
+
};
|
|
1090
|
+
type WaveSpec = typeof NamiAnimationType.Wave | {
|
|
1091
|
+
type: typeof NamiAnimationType.Wave;
|
|
1092
|
+
duration?: number;
|
|
1093
|
+
delay?: number;
|
|
1094
|
+
circle1Color?: string;
|
|
1095
|
+
circle2Color?: string;
|
|
1096
|
+
lineWidth?: number;
|
|
1097
|
+
};
|
|
1098
|
+
type NoneSpec = typeof NamiAnimationType.None | {
|
|
1099
|
+
type: typeof NamiAnimationType.None;
|
|
1100
|
+
};
|
|
1101
|
+
type NamiAnimationSpec = WaveSpec | PulseSpec | NoneSpec;
|
|
1102
|
+
type NamiAnimationObjectSpec = Extract<WaveSpec, {
|
|
1103
|
+
type: typeof NamiAnimationType.Wave;
|
|
1104
|
+
}> | Extract<PulseSpec, {
|
|
1105
|
+
type: typeof NamiAnimationType.Pulse;
|
|
1106
|
+
}> | Extract<NoneSpec, {
|
|
1107
|
+
type: typeof NamiAnimationType.None;
|
|
1108
|
+
}>;
|
|
1109
|
+
type Wave = Required<Extract<WaveSpec, {
|
|
1110
|
+
type: typeof NamiAnimationType.Wave;
|
|
1111
|
+
}>>;
|
|
1112
|
+
type Pulse = Required<Extract<PulseSpec, {
|
|
1113
|
+
type: typeof NamiAnimationType.Pulse;
|
|
1114
|
+
}>>;
|
|
1115
|
+
type None = Required<Extract<NoneSpec, {
|
|
1116
|
+
type: typeof NamiAnimationType.None;
|
|
1117
|
+
}>>;
|
|
1118
|
+
type NamiAnimation = Wave | Pulse | None;
|
|
1119
|
+
|
|
1120
|
+
type TImageComponent = TBaseComponent & {
|
|
1121
|
+
component: "image";
|
|
1122
|
+
url?: string | null;
|
|
1123
|
+
aspectRatio?: number;
|
|
1124
|
+
imageCropping?: "fill" | "fit";
|
|
1125
|
+
alt?: string | null;
|
|
1126
|
+
blur?: string | null;
|
|
1127
|
+
};
|
|
1128
|
+
type TSegmentPicker = TBaseComponent & {
|
|
1129
|
+
component: "segmentPicker" | "formSegmentPicker";
|
|
1130
|
+
formId?: string;
|
|
1131
|
+
components: TSegmentPickerItem[];
|
|
1132
|
+
};
|
|
1133
|
+
type TSegmentPickerItem = TBaseComponent & {
|
|
1134
|
+
component: "segmentPickerItem";
|
|
1135
|
+
ref?: any;
|
|
1136
|
+
text?: string;
|
|
1137
|
+
alignment?: AlignmentType;
|
|
1138
|
+
activeFillColor?: string;
|
|
1139
|
+
activeBorderColor?: string;
|
|
1140
|
+
activeBorderRadius?: number;
|
|
1141
|
+
activeBorderWidth?: number;
|
|
1142
|
+
activeRoundBorders?: Array<BorderLocationType>;
|
|
1143
|
+
activeFontSize?: number;
|
|
1144
|
+
activeFontColor?: string;
|
|
1145
|
+
activeFontName?: string;
|
|
1146
|
+
activeDropShadow?: string;
|
|
1147
|
+
inactiveBorderRadius?: number;
|
|
1148
|
+
inactiveBorderColor?: string;
|
|
1149
|
+
inactiveBorderWidth?: number;
|
|
1150
|
+
inactiveRoundBorders?: Array<BorderLocationType>;
|
|
1151
|
+
inactiveFontSize?: number;
|
|
1152
|
+
inactiveFontName?: string;
|
|
1153
|
+
inactiveFontColor?: string;
|
|
1154
|
+
inactiveDropShadow?: string;
|
|
1155
|
+
leftPadding?: number;
|
|
1156
|
+
rightPadding?: number;
|
|
1157
|
+
topPadding?: number;
|
|
1158
|
+
bottomPadding?: number;
|
|
1159
|
+
formId?: string;
|
|
1160
|
+
checked?: boolean;
|
|
1161
|
+
};
|
|
1162
|
+
type TSpacerComponent = TBaseComponent & {
|
|
1163
|
+
component: "spacer";
|
|
1164
|
+
};
|
|
1165
|
+
type TSvgImageComponent = TBaseComponent & {
|
|
1166
|
+
component: "svgImage";
|
|
1167
|
+
url?: string | null;
|
|
1168
|
+
fontColor?: string;
|
|
1169
|
+
};
|
|
1170
|
+
type TSymbolComponent = Omit<TTextComponent, "component" | "textType" | "text"> & {
|
|
1171
|
+
component: "symbol";
|
|
1172
|
+
name: string;
|
|
1173
|
+
};
|
|
1174
|
+
type TTextComponent = TBaseComponent & {
|
|
1175
|
+
component: "text";
|
|
1176
|
+
textType: "title" | "body" | "legal" | "text";
|
|
1177
|
+
androidFontSize?: number;
|
|
1178
|
+
fontSize?: number;
|
|
1179
|
+
activeFontColor?: string;
|
|
1180
|
+
fontColor?: string;
|
|
1181
|
+
fontName?: string;
|
|
1182
|
+
text: string;
|
|
1183
|
+
strikethrough?: boolean | string;
|
|
1184
|
+
linkColor?: string;
|
|
1185
|
+
dateTimeFormat?: string;
|
|
1186
|
+
blur?: number | null;
|
|
1187
|
+
capitalize?: boolean;
|
|
1188
|
+
};
|
|
1189
|
+
type TTextLikeComponent = TTextComponent | TTextListComponent | TSymbolComponent;
|
|
1190
|
+
type TTextListComponent = Omit<TTextComponent, "component" | "text"> & {
|
|
1191
|
+
component: "text-list";
|
|
1192
|
+
texts: string[];
|
|
1193
|
+
bulletComponent?: TSymbolComponent;
|
|
1194
|
+
};
|
|
1195
|
+
type TVideoComponent = TBaseComponent & {
|
|
1196
|
+
component: "videoUrl";
|
|
1197
|
+
url?: string | null;
|
|
1198
|
+
aspectRatio?: number;
|
|
1199
|
+
imageCropping?: "fill" | "fit";
|
|
1200
|
+
autoplayVideo?: boolean;
|
|
1201
|
+
controlsType?: string;
|
|
1202
|
+
fallbackImage?: string | null;
|
|
1203
|
+
loopVideo?: boolean;
|
|
1204
|
+
mute?: boolean;
|
|
1205
|
+
screenreaderText?: string;
|
|
1206
|
+
};
|
|
1207
|
+
type TConditionalComponent = TBaseComponent & {
|
|
1208
|
+
component: "condition";
|
|
1209
|
+
components?: TComponent[];
|
|
1210
|
+
assertions?: TTestObject[];
|
|
1211
|
+
orAssertions?: TTestObject[] | undefined;
|
|
1212
|
+
};
|
|
1213
|
+
type TQRCodeComponent = TBaseComponent & {
|
|
1214
|
+
component: "qrCode";
|
|
1215
|
+
url: string;
|
|
1216
|
+
height: number | string;
|
|
1217
|
+
width: number | string;
|
|
1218
|
+
color?: string;
|
|
1219
|
+
fillColor?: string;
|
|
1220
|
+
borderWidth?: number;
|
|
1221
|
+
borderColor?: string;
|
|
1222
|
+
};
|
|
1223
|
+
type TProgressIndicatorComponent = TBaseComponent & {
|
|
1224
|
+
component: "progressIndicator";
|
|
1225
|
+
activeBorderRadius?: number;
|
|
1226
|
+
activeFillColor?: string;
|
|
1227
|
+
activeFillColorFallback?: string;
|
|
1228
|
+
inactiveBorderRadius?: number;
|
|
1229
|
+
inactiveFillColor?: string;
|
|
1230
|
+
inactiveFillColorFallback?: string;
|
|
1231
|
+
percentage?: "auto" | number;
|
|
1232
|
+
innerPadding?: number;
|
|
1233
|
+
activeDropShadow?: string;
|
|
1234
|
+
inactiveDropShadow?: string;
|
|
1235
|
+
};
|
|
1236
|
+
type TProgressBarComponent = TBaseComponent & {
|
|
1237
|
+
component: "progressBar";
|
|
1238
|
+
mode: "determinate" | "indeterminate";
|
|
1239
|
+
activeBorderRadius?: number;
|
|
1240
|
+
activeFillColor?: string;
|
|
1241
|
+
activeFillColorFallback?: string;
|
|
1242
|
+
inactiveBorderRadius?: number;
|
|
1243
|
+
inactiveFillColor?: string;
|
|
1244
|
+
inactiveFillColorFallback?: string;
|
|
1245
|
+
percentage?: "auto" | number;
|
|
1246
|
+
innerPadding?: number;
|
|
1247
|
+
activeDropShadow?: string;
|
|
1248
|
+
inactiveDropShadow?: string;
|
|
1249
|
+
duration?: "auto" | number;
|
|
1250
|
+
delay?: number;
|
|
1251
|
+
activeWidth?: number | string;
|
|
1252
|
+
screenreaderText?: string;
|
|
1253
|
+
};
|
|
1254
|
+
type TToggleButtonComponent = TBaseComponent & {
|
|
1255
|
+
component: "toggleButton";
|
|
1256
|
+
components: TComponent[];
|
|
1257
|
+
checked?: boolean;
|
|
1258
|
+
activeFillColor?: string;
|
|
1259
|
+
activeFillColorFallback?: string;
|
|
1260
|
+
inactiveFillColor?: string;
|
|
1261
|
+
inactiveFillColorFallback?: string;
|
|
1262
|
+
activeBorderColor?: string;
|
|
1263
|
+
inactiveBorderColor?: string;
|
|
1264
|
+
activeBorderWidth?: number;
|
|
1265
|
+
inactiveBorderWidth?: number;
|
|
1266
|
+
activeDropShadow?: string;
|
|
1267
|
+
inactiveDropShadow?: string;
|
|
1268
|
+
formId?: string;
|
|
1269
|
+
screenreaderText?: string;
|
|
1270
|
+
screenreaderHint?: string;
|
|
1271
|
+
mode?: "radio" | "toggle";
|
|
1272
|
+
value?: string;
|
|
1273
|
+
};
|
|
1274
|
+
type TTextInputComponent = TBaseComponent & {
|
|
1275
|
+
component: "textInput";
|
|
1276
|
+
type?: "name" | "email";
|
|
1277
|
+
formId: string;
|
|
1278
|
+
/** Required flag — the real (misspelled) wire key. `required` never populates. */
|
|
1279
|
+
reqed?: boolean;
|
|
1280
|
+
validateOn?: "submit" | "change";
|
|
1281
|
+
placeholderText?: string;
|
|
1282
|
+
placeholderFontColor?: string;
|
|
1283
|
+
labelText?: string;
|
|
1284
|
+
labelPosition?: "top" | "none";
|
|
1285
|
+
labelFontColor?: string;
|
|
1286
|
+
labelFontName?: string;
|
|
1287
|
+
labelFontSize?: number | string;
|
|
1288
|
+
validationMessage?: string;
|
|
1289
|
+
validationTextFontColor?: string;
|
|
1290
|
+
validationTextFontName?: string;
|
|
1291
|
+
validationTextFontSize?: number | string;
|
|
1292
|
+
fontColor?: string;
|
|
1293
|
+
fontName?: string;
|
|
1294
|
+
fontSize?: number | string;
|
|
1295
|
+
errorBorderColor?: string;
|
|
1296
|
+
errorBorderWidth?: number | string;
|
|
1297
|
+
errorBorderRadius?: number | string;
|
|
1298
|
+
innerTopPadding?: number | string;
|
|
1299
|
+
innerBottomPadding?: number | string;
|
|
1300
|
+
innerLeftPadding?: number | string;
|
|
1301
|
+
innerRightPadding?: number | string;
|
|
1302
|
+
showPrefixIcon?: boolean;
|
|
1303
|
+
};
|
|
1304
|
+
type TCountdownTimerTextComponent = TBaseComponent & {
|
|
1305
|
+
component: "countdownTimerText";
|
|
1306
|
+
mode?: "duration" | "targetDateTime";
|
|
1307
|
+
durationSeconds?: number;
|
|
1308
|
+
resetOnRemount?: boolean;
|
|
1309
|
+
targetDateTime?: string;
|
|
1310
|
+
separator?: string;
|
|
1311
|
+
zeroPad?: boolean;
|
|
1312
|
+
direction?: "horizontal" | "vertical";
|
|
1313
|
+
labelPosition?: "none" | "top" | "bottom" | "below" | "above";
|
|
1314
|
+
units?: {
|
|
1315
|
+
days?: boolean;
|
|
1316
|
+
hours?: boolean;
|
|
1317
|
+
minutes?: boolean;
|
|
1318
|
+
seconds?: boolean;
|
|
1319
|
+
};
|
|
1320
|
+
labels?: {
|
|
1321
|
+
days?: string;
|
|
1322
|
+
hours?: string;
|
|
1323
|
+
minutes?: string;
|
|
1324
|
+
seconds?: string;
|
|
1325
|
+
};
|
|
1326
|
+
fontSize?: number;
|
|
1327
|
+
fontColor?: string;
|
|
1328
|
+
fontName?: string;
|
|
1329
|
+
labelFontSize?: number;
|
|
1330
|
+
labelFontColor?: string;
|
|
1331
|
+
labelFontName?: string;
|
|
1332
|
+
labelSpacing?: number;
|
|
1333
|
+
showWhenCompleted?: "zero" | "hidden";
|
|
1334
|
+
screenreaderText?: string;
|
|
1335
|
+
screenreaderHint?: string;
|
|
1266
1336
|
};
|
|
1267
1337
|
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
declare enum NamiPaywallAction {
|
|
1273
|
-
BUY_SKU = "BUY_SKU",
|
|
1274
|
-
SELECT_SKU = "SELECT_SKU",
|
|
1275
|
-
RESTORE_PURCHASES = "RESTORE_PURCHASES",
|
|
1276
|
-
SIGN_IN = "SIGN_IN",
|
|
1277
|
-
CLOSE_PAYWALL = "CLOSE_PAYWALL",
|
|
1278
|
-
SHOW_PAYWALL = "SHOW_PAYWALL",
|
|
1279
|
-
PURCHASE_SELECTED_SKU = "PURCHASE_SELECTED_SKU",
|
|
1280
|
-
PURCHASE_SUCCESS = "PURCHASE_SUCCESS",
|
|
1281
|
-
PURCHASE_FAILED = "PURCHASE_FAILED",
|
|
1282
|
-
PURCHASE_CANCELLED = "PURCHASE_CANCELLED",
|
|
1283
|
-
PURCHASE_PENDING = "PURCHASE_PENDING",
|
|
1284
|
-
PURCHASE_UNKNOWN = "PURCHASE_UNKNOWN",
|
|
1285
|
-
PURCHASE_DEFERRED = "PURCHASE_DEFERRED",
|
|
1286
|
-
DEEPLINK = "DEEPLINK",
|
|
1287
|
-
TOGGLE_CHANGE = "TOGGLE_CHANGE",
|
|
1288
|
-
PAGE_CHANGE = "PAGE_CHANGE",
|
|
1289
|
-
SLIDE_CHANGE = "SLIDE_CHANGE",
|
|
1290
|
-
COLLAPSIBLE_DRAWER_OPEN = "COLLAPSIBLE_DRAWER_OPEN",
|
|
1291
|
-
COLLAPSIBLE_DRAWER_CLOSE = "COLLAPSIBLE_DRAWER_CLOSE",
|
|
1292
|
-
VIDEO_STARTED = "VIDEO_STARTED",
|
|
1293
|
-
VIDEO_PAUSED = "VIDEO_PAUSED",
|
|
1294
|
-
VIDEO_RESUMED = "VIDEO_RESUMED",
|
|
1295
|
-
VIDEO_ENDED = "VIDEO_ENDED",
|
|
1296
|
-
VIDEO_CHANGED = "VIDEO_CHANGED",
|
|
1297
|
-
VIDEO_MUTED = "VIDEO_MUTED",
|
|
1298
|
-
VIDEO_UNMUTED = "VIDEO_UNMUTED",
|
|
1299
|
-
COUNTDOWN_TIMER_COMPLETED = "COUNTDOWN_TIMER_COMPLETED",
|
|
1300
|
-
UNKNOWN = "UNKNOWN"
|
|
1301
|
-
}
|
|
1302
|
-
/**
|
|
1303
|
-
* @type NamiPaywallEvent
|
|
1304
|
-
* Represents the events(actions) triggered by rendered paywall
|
|
1305
|
-
*/
|
|
1306
|
-
type NamiPaywallEvent = {
|
|
1307
|
-
/**
|
|
1308
|
-
* Any action from [NamiPaywallAction]
|
|
1309
|
-
*/
|
|
1310
|
-
action: NamiPaywallAction;
|
|
1338
|
+
type TVariablePattern = `\${var.${string}}`;
|
|
1339
|
+
type THeaderFooter = (TContainer | TButtonContainer | TSpacerComponent | TTextComponent | TConditionalComponent)[] | null;
|
|
1340
|
+
type Button = TBaseComponent & {
|
|
1341
|
+
id?: string;
|
|
1311
1342
|
sku?: NamiSKU;
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
* Total time user has spent on paywall page,
|
|
1333
|
-
* From rendering paywall to clicking on close button of paywall
|
|
1334
|
-
*/
|
|
1335
|
-
timeSpentOnPaywall?: number;
|
|
1336
|
-
videoMetaData?: NamiPaywallEventVideoMetadata;
|
|
1337
|
-
purchaseChannel?: string;
|
|
1343
|
+
url?: string;
|
|
1344
|
+
components: Array<TTextComponent | TTextListComponent | TSpacerComponent | TImageComponent | TContainer | TConditionalComponent | TSymbolComponent>;
|
|
1345
|
+
screenreaderText?: string;
|
|
1346
|
+
screenreaderHint?: string;
|
|
1347
|
+
text?: string | null;
|
|
1348
|
+
actionTap?: string | null;
|
|
1349
|
+
};
|
|
1350
|
+
type TButtonContainer = Button & TDisabledButton & {
|
|
1351
|
+
component: "button";
|
|
1352
|
+
focused?: boolean;
|
|
1353
|
+
};
|
|
1354
|
+
type TDisabledButton = {
|
|
1355
|
+
disabled?: boolean;
|
|
1356
|
+
disabledFillColor?: string;
|
|
1357
|
+
disabledLinkColor?: string;
|
|
1358
|
+
disabledBorderColor?: string;
|
|
1359
|
+
disabledBorderWidth?: number;
|
|
1360
|
+
disabledFontColor?: string;
|
|
1361
|
+
disabledFontSize?: number;
|
|
1362
|
+
disabledDropShadow?: string;
|
|
1338
1363
|
};
|
|
1339
|
-
type
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
* including false or "false" — is considered "set".
|
|
1346
|
-
*/
|
|
1347
|
-
type NamiCustomAttributeValue = string | boolean | number;
|
|
1348
|
-
/**
|
|
1349
|
-
* @type NamiPaywallLaunchContext
|
|
1350
|
-
* Will be used to pass custom context while launching paywall
|
|
1351
|
-
*/
|
|
1352
|
-
type NamiPaywallLaunchContext = {
|
|
1353
|
-
productGroups?: string[];
|
|
1354
|
-
customAttributes: {
|
|
1355
|
-
[key: string]: NamiCustomAttributeValue;
|
|
1356
|
-
};
|
|
1357
|
-
customObject?: {
|
|
1358
|
-
[key: string]: any;
|
|
1359
|
-
};
|
|
1360
|
-
currentGroup?: string;
|
|
1364
|
+
type TPlayPauseButton = Button & {
|
|
1365
|
+
component: "playPauseButton";
|
|
1366
|
+
pausedOnTap: UserAction;
|
|
1367
|
+
playingOnTap: UserAction;
|
|
1368
|
+
pausedComponents: TComponent[];
|
|
1369
|
+
playingComponents: TComponent[];
|
|
1361
1370
|
};
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1371
|
+
type TVolumeButton = Button & {
|
|
1372
|
+
component: "volumeButton";
|
|
1373
|
+
mutedComponents: TComponent[];
|
|
1374
|
+
volumeComponents: TComponent[];
|
|
1375
|
+
mutedOnTap: UserAction;
|
|
1376
|
+
volumeOnTap: UserAction;
|
|
1368
1377
|
};
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1378
|
+
type UserAction = {
|
|
1379
|
+
function: string;
|
|
1380
|
+
parameters?: UserActionParameters;
|
|
1381
|
+
};
|
|
1382
|
+
type UserActionParameters = {
|
|
1383
|
+
formId?: string;
|
|
1384
|
+
value?: string;
|
|
1385
|
+
partialState?: Record<string, any>;
|
|
1375
1386
|
url?: string;
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
contentDuration?: number;
|
|
1387
|
+
screen?: string;
|
|
1388
|
+
promo?: string;
|
|
1389
|
+
confirmationMessage?: string;
|
|
1390
|
+
confirmBeforePurchase?: TTestObject[];
|
|
1381
1391
|
};
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
activePurchases: NamiPurchase[];
|
|
1393
|
-
/**
|
|
1394
|
-
* Description of entitlement
|
|
1395
|
-
*/
|
|
1396
|
-
desc: string;
|
|
1397
|
-
/**
|
|
1398
|
-
* Friendly name of entitlement
|
|
1399
|
-
*/
|
|
1400
|
-
name: string;
|
|
1401
|
-
/**
|
|
1402
|
-
* Internal ID for use by the Nami SDK
|
|
1403
|
-
*/
|
|
1404
|
-
namiId: string;
|
|
1405
|
-
/**
|
|
1406
|
-
* NamiSKUs purchased by the user that actually unlock this entitlement
|
|
1407
|
-
*/
|
|
1408
|
-
purchasedSkus: NamiSKU[];
|
|
1409
|
-
/**
|
|
1410
|
-
* The unique ID of the entitlement defined in the Nami Control Center, use this to refer
|
|
1411
|
-
* to the system when referencing an entitlement.
|
|
1412
|
-
*/
|
|
1413
|
-
referenceId: string;
|
|
1414
|
-
/**
|
|
1415
|
-
* The list of possible NamiSKU objects that would unlock this entitlement
|
|
1416
|
-
*/
|
|
1417
|
-
relatedSkus: NamiSKU[];
|
|
1392
|
+
type SKUActionHandler = (sku: NamiSKU) => void;
|
|
1393
|
+
type DeepLinkUrlHandler = (url: string) => void;
|
|
1394
|
+
type CloseHandler = (body?: any) => void;
|
|
1395
|
+
type Callback$1 = () => void;
|
|
1396
|
+
type CarouselIndicator = {
|
|
1397
|
+
width: number;
|
|
1398
|
+
height: number;
|
|
1399
|
+
borderRadius: number;
|
|
1400
|
+
fillColor: string;
|
|
1401
|
+
component: "container";
|
|
1418
1402
|
};
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
type CustomerJourneyState = {
|
|
1437
|
-
former_subscriber: boolean;
|
|
1438
|
-
in_grace_period: boolean;
|
|
1439
|
-
in_trial_period: boolean;
|
|
1440
|
-
in_intro_offer_period: boolean;
|
|
1441
|
-
is_cancelled: boolean;
|
|
1442
|
-
in_pause: boolean;
|
|
1443
|
-
in_account_hold: boolean;
|
|
1403
|
+
type TCarouselContainer = Omit<TContainer, "component"> & {
|
|
1404
|
+
component: "carouselContainer";
|
|
1405
|
+
indicatorColor: string;
|
|
1406
|
+
activeIndicatorColor: string;
|
|
1407
|
+
autoplay: boolean;
|
|
1408
|
+
autoplaySeconds: number;
|
|
1409
|
+
loopSource?: string | TCarouselSlide[];
|
|
1410
|
+
loopVariable?: string;
|
|
1411
|
+
loopSourceConditions?: TTestObject[];
|
|
1412
|
+
showIndicators?: boolean;
|
|
1413
|
+
inactiveSlideScale?: number;
|
|
1414
|
+
nextSlidePadding?: number;
|
|
1415
|
+
previousSlidePadding?: number;
|
|
1416
|
+
slideSpacing?: number;
|
|
1417
|
+
onChange?: UserAction;
|
|
1418
|
+
indicator?: CarouselIndicator;
|
|
1419
|
+
activeIndicator?: CarouselIndicator;
|
|
1444
1420
|
};
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
customer_journey_state: CustomerJourneyState;
|
|
1421
|
+
type TCarouselSlidesState = {
|
|
1422
|
+
[groupId: string]: {
|
|
1423
|
+
[carouselName: string]: TCarouselSlide[];
|
|
1424
|
+
};
|
|
1450
1425
|
};
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1426
|
+
type TCarouselSlide = {
|
|
1427
|
+
id: string;
|
|
1428
|
+
title?: string;
|
|
1429
|
+
[slideAttr: string]: any;
|
|
1430
|
+
};
|
|
1431
|
+
type TFlexProductContainer = Omit<TContainer, "component"> & {
|
|
1432
|
+
component: "flexProductContainer";
|
|
1433
|
+
products: "all" | "subset";
|
|
1434
|
+
flexDirection: FlexDirectionObject;
|
|
1435
|
+
subsetGroup?: string;
|
|
1436
|
+
productFeaturedComponents?: TContainer[];
|
|
1437
|
+
productBaseComponents?: TContainer[];
|
|
1438
|
+
};
|
|
1439
|
+
type FlexDirectionObject = {
|
|
1440
|
+
small: "vertical" | "horizontal";
|
|
1441
|
+
medium: "vertical" | "horizontal";
|
|
1442
|
+
large: "vertical" | "horizontal";
|
|
1443
|
+
xlarge: "vertical" | "horizontal";
|
|
1444
|
+
};
|
|
1445
|
+
type TProductContainer = Omit<TContainer, "component"> & {
|
|
1446
|
+
component: "productContainer";
|
|
1447
|
+
products: "all" | "subset";
|
|
1448
|
+
subsetGroup?: string;
|
|
1449
|
+
productFeaturedComponents?: TContainer[];
|
|
1450
|
+
productBaseComponents?: TContainer[];
|
|
1451
|
+
};
|
|
1452
|
+
type TStack = Omit<TContainer, "component"> & {
|
|
1453
|
+
component: "stack";
|
|
1454
|
+
};
|
|
1455
|
+
type TCollapseContainer = TBaseComponent & {
|
|
1456
|
+
component: "collapseContainer";
|
|
1457
|
+
collapseHeader: TContainer;
|
|
1458
|
+
components: TComponent[];
|
|
1459
|
+
open: "collapse" | "open";
|
|
1460
|
+
backgroundBlur?: number | null;
|
|
1461
|
+
};
|
|
1462
|
+
type TTimelineRail = {
|
|
1463
|
+
id?: string;
|
|
1464
|
+
namiComponentType?: string;
|
|
1465
|
+
width?: number;
|
|
1466
|
+
railSpacing?: number;
|
|
1467
|
+
dotLineSpacing?: number;
|
|
1468
|
+
lineTopOffset?: number;
|
|
1469
|
+
lineBottomOffset?: number;
|
|
1470
|
+
lineWidth?: number;
|
|
1471
|
+
lineColor?: string;
|
|
1472
|
+
lineCornerRadius?: number;
|
|
1473
|
+
dotSize?: number;
|
|
1474
|
+
dotColor?: string;
|
|
1475
|
+
dotCornerRadius?: number;
|
|
1476
|
+
dotBorderWidth?: number;
|
|
1477
|
+
dotBorderColor?: string;
|
|
1478
|
+
conditionAttributes?: TConditionalComponent[];
|
|
1479
|
+
};
|
|
1480
|
+
type TResponsiveGrid = TBaseComponent & {
|
|
1481
|
+
component: "responsiveGrid";
|
|
1482
|
+
components: any;
|
|
1483
|
+
loopVariable?: string;
|
|
1484
|
+
loopSource?: string;
|
|
1485
|
+
loopSourceConditions: TTestObject[];
|
|
1486
|
+
groupBy?: string;
|
|
1487
|
+
groupHeaderTemplate?: TComponent;
|
|
1488
|
+
timeline?: TTimelineRail;
|
|
1489
|
+
};
|
|
1490
|
+
type TRepeatingGrid = TBaseComponent & {
|
|
1491
|
+
component: "repeatingGrid";
|
|
1492
|
+
components: any;
|
|
1493
|
+
loopVariable?: string;
|
|
1494
|
+
loopSource?: string;
|
|
1495
|
+
loopSourceConditions: TTestObject[];
|
|
1496
|
+
columns: number;
|
|
1497
|
+
columnSpacing?: number;
|
|
1498
|
+
rowSpacing?: number;
|
|
1499
|
+
itemAlignment?: string;
|
|
1500
|
+
groupBy?: string;
|
|
1501
|
+
groupHeaderTemplate?: TComponent;
|
|
1470
1502
|
};
|
|
1471
|
-
type
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1503
|
+
type TToggleSwitch = TBaseComponent & {
|
|
1504
|
+
component: 'toggleSwitch';
|
|
1505
|
+
checked?: boolean;
|
|
1506
|
+
formId: string;
|
|
1507
|
+
innerPadding?: TVariablePattern | number;
|
|
1508
|
+
activeHandleFillColor?: string;
|
|
1509
|
+
activeHandleBorderColor?: string;
|
|
1510
|
+
activeHandleBorderWidth?: number;
|
|
1511
|
+
activePlateFillColor?: string;
|
|
1512
|
+
activePlateBorderColor?: string;
|
|
1513
|
+
activePlateBorderWidth?: number;
|
|
1514
|
+
activePlateBorderRadius?: number;
|
|
1515
|
+
inactiveHandleFillColor?: string;
|
|
1516
|
+
inactiveHandleBorderColor?: string;
|
|
1517
|
+
inactiveHandleBorderWidth?: number;
|
|
1518
|
+
inactivePlateFillColor?: string;
|
|
1519
|
+
inactivePlateBorderColor?: string;
|
|
1520
|
+
inactivePlateBorderWidth?: number;
|
|
1521
|
+
inactivePlateBorderRadius?: number;
|
|
1522
|
+
disabled?: boolean;
|
|
1475
1523
|
};
|
|
1476
|
-
type
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1524
|
+
type TRadioButton = TBaseComponent & {
|
|
1525
|
+
component: 'radio';
|
|
1526
|
+
components: TComponent[];
|
|
1527
|
+
active?: boolean;
|
|
1528
|
+
innerPadding?: TVariablePattern | number;
|
|
1529
|
+
activeFillColor?: string;
|
|
1530
|
+
activeBorderColor?: string;
|
|
1531
|
+
activeBorderWidth?: number;
|
|
1532
|
+
activeDropShadow?: string;
|
|
1533
|
+
inactiveFillColor?: string;
|
|
1534
|
+
inactiveBorderColor?: string;
|
|
1535
|
+
inactiveBorderWidth?: number;
|
|
1536
|
+
inactiveDropShadow?: string;
|
|
1537
|
+
sku?: NamiSKU;
|
|
1481
1538
|
};
|
|
1482
1539
|
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
/**
|
|
1495
|
-
* The purchase order ID record or receipt ID associated to this purchase
|
|
1496
|
-
*/
|
|
1497
|
-
transactionIdentifier?: string;
|
|
1498
|
-
/**
|
|
1499
|
-
* For bypass store purchases only, indicates when this purchase will cease to back
|
|
1500
|
-
* an entitlement rendering it as inactive.
|
|
1501
|
-
*/
|
|
1502
|
-
expires?: Date;
|
|
1503
|
-
/**
|
|
1504
|
-
* The source a purchase comes from - either on Google Play (marketplace), through a paywall (campaign).
|
|
1505
|
-
*/
|
|
1506
|
-
purchaseToken?: string;
|
|
1540
|
+
interface TBaseComponent {
|
|
1541
|
+
id?: string;
|
|
1542
|
+
title?: string;
|
|
1543
|
+
testId?: string;
|
|
1544
|
+
component: string;
|
|
1545
|
+
namiComponentType?: string;
|
|
1546
|
+
grow?: boolean;
|
|
1547
|
+
flag?: null | string;
|
|
1548
|
+
context?: {
|
|
1549
|
+
[key: string]: any;
|
|
1550
|
+
};
|
|
1507
1551
|
/**
|
|
1508
|
-
*
|
|
1552
|
+
* Text spoken by the platform screenreader. Plays two roles depending on
|
|
1553
|
+
* where it is set, per the TV Full-Page Announcement contract
|
|
1554
|
+
* (https://linear.app/nami-product-development/document/tv-full-page-announcement-980f61b96e7c):
|
|
1555
|
+
*
|
|
1556
|
+
* - **On focusable elements** (buttons, toggles, etc.): the element's own
|
|
1557
|
+
* label, spoken when the element receives focus. For subscription-plan
|
|
1558
|
+
* CTAs the backend resolves this dynamically to
|
|
1559
|
+
* `"{price} {period} [{tier}] subscription plan button"`.
|
|
1560
|
+
*
|
|
1561
|
+
* - **On containers** (any TBaseComponent-derived container, and TPages):
|
|
1562
|
+
* an optional *server-supplied composite override*. When set, SDKs
|
|
1563
|
+
* announce this verbatim on first focus of the page's default CTA
|
|
1564
|
+
* instead of tree-walking the page's text. When omitted, SDKs derive
|
|
1565
|
+
* the composite by walking visible `text` / `text-list` descendants in
|
|
1566
|
+
* source order (skipping `image`, `hidden: true`, and non-text leaves)
|
|
1567
|
+
* and appending the focused button's label.
|
|
1509
1568
|
*/
|
|
1510
|
-
|
|
1569
|
+
screenreaderText?: string;
|
|
1511
1570
|
/**
|
|
1512
|
-
*
|
|
1571
|
+
* Supplementary hint announced after `screenreaderText` on the element it
|
|
1572
|
+
* is set on (e.g. "Double-tap to subscribe"). Optional; SDKs that lack a
|
|
1573
|
+
* hint affordance may omit it.
|
|
1513
1574
|
*/
|
|
1514
|
-
|
|
1575
|
+
screenreaderHint?: string;
|
|
1576
|
+
moveX?: number | string;
|
|
1577
|
+
moveY?: string | number;
|
|
1578
|
+
direction?: DirectionType;
|
|
1579
|
+
spacing?: number;
|
|
1580
|
+
alignment?: AlignmentType;
|
|
1581
|
+
horizontalAlignment?: AlignmentType;
|
|
1582
|
+
verticalAlignment?: AlignmentType;
|
|
1583
|
+
leftPadding?: number | string;
|
|
1584
|
+
rightPadding?: number | string;
|
|
1585
|
+
topPadding?: number | string;
|
|
1586
|
+
bottomPadding?: number | string;
|
|
1587
|
+
leftMargin?: number | string;
|
|
1588
|
+
rightMargin?: number | string;
|
|
1589
|
+
topMargin?: number | string;
|
|
1590
|
+
bottomMargin?: number | string;
|
|
1591
|
+
fillColor?: string;
|
|
1592
|
+
borderWidth?: number;
|
|
1593
|
+
borderRadius?: number;
|
|
1594
|
+
borderColor?: string;
|
|
1595
|
+
borders?: Array<BorderSideType>;
|
|
1596
|
+
focusedBorders?: Array<BorderSideType>;
|
|
1597
|
+
focusedFillColor?: string;
|
|
1598
|
+
focusedFontColor?: string;
|
|
1599
|
+
focusedBorderColor?: string;
|
|
1600
|
+
focusedBorderWidth?: number;
|
|
1601
|
+
focusedBorderRadius?: number;
|
|
1602
|
+
roundBorders?: Array<BorderLocationType>;
|
|
1603
|
+
focusedRoundBorders?: Array<BorderLocationType>;
|
|
1604
|
+
fillColorFallback?: string;
|
|
1605
|
+
focusedFillColorFallback?: string;
|
|
1606
|
+
zIndex?: number;
|
|
1607
|
+
conditionAttributes?: TConditionalAttributes;
|
|
1608
|
+
height?: number | string;
|
|
1609
|
+
width?: number | string;
|
|
1610
|
+
dropShadow?: string;
|
|
1611
|
+
onTap?: UserAction;
|
|
1612
|
+
actionTap?: string;
|
|
1613
|
+
refId?: string;
|
|
1614
|
+
_fields?: {
|
|
1615
|
+
[attribute: string]: TFieldSettings;
|
|
1616
|
+
} & {
|
|
1617
|
+
_group: string;
|
|
1618
|
+
_label: string;
|
|
1619
|
+
_toggleAttr: string | null;
|
|
1620
|
+
_toggleValue: any;
|
|
1621
|
+
_collapsible: boolean;
|
|
1622
|
+
_hint: string | null;
|
|
1623
|
+
};
|
|
1624
|
+
_fieldGroupLabel?: string;
|
|
1625
|
+
_fieldLabel?: string;
|
|
1626
|
+
_fieldHint?: string;
|
|
1627
|
+
_fieldReadOnly?: boolean;
|
|
1628
|
+
_fieldPlaceholder?: string;
|
|
1629
|
+
_fieldDescription?: string;
|
|
1630
|
+
_fieldOmit?: string[];
|
|
1631
|
+
fixedHeight?: number;
|
|
1632
|
+
fixedWidth?: number | "fitContent";
|
|
1633
|
+
hidden?: boolean;
|
|
1634
|
+
animation?: NamiAnimationSpec;
|
|
1635
|
+
}
|
|
1636
|
+
type TComponent = TButtonContainer | TContainer | TTextListComponent | TTextComponent | TSpacerComponent | TImageComponent | TSvgImageComponent | TSymbolComponent | TCarouselContainer | TProductContainer | TFlexProductContainer | TStack | TConditionalComponent | TSegmentPicker | TSegmentPickerItem | TVideoComponent | TCollapseContainer | TResponsiveGrid | TRepeatingGrid | TVolumeButton | TPlayPauseButton | TQRCodeComponent | TToggleSwitch | TRadioButton | TProgressIndicatorComponent | TToggleButtonComponent | TCountdownTimerTextComponent | TTextInputComponent | TProgressBarComponent;
|
|
1637
|
+
type DirectionType = "vertical" | "horizontal";
|
|
1638
|
+
type AlignmentType = "center" | "right" | "left" | "top" | "bottom";
|
|
1639
|
+
type BorderLocationType = "upperLeft" | "upperRight" | "lowerLeft" | "lowerRight";
|
|
1640
|
+
type BorderSideType = 'left' | 'right' | 'top' | 'bottom';
|
|
1641
|
+
type TContainerPosition = `${'center' | 'start' | 'end'}-${'top' | 'bottom' | 'left' | 'right'}`;
|
|
1642
|
+
declare const BorderMap: Record<BorderLocationType, string>;
|
|
1643
|
+
declare const BorderSideMap: Record<BorderSideType, string>;
|
|
1644
|
+
type TTestObject = {
|
|
1645
|
+
value: any;
|
|
1646
|
+
expected: any;
|
|
1647
|
+
operator: "equals" | "contains" | "notEquals" | "set" | "notSet" | "notContains" | 'gt' | 'lt' | 'gte' | 'lte';
|
|
1515
1648
|
};
|
|
1516
|
-
type
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1649
|
+
type TransformToString<T> = {
|
|
1650
|
+
[P in keyof T]: T[P] extends number | boolean ? T[P] | string : T[P];
|
|
1651
|
+
};
|
|
1652
|
+
type TConditionalAttributes = Array<Omit<TConditionalComponent, "components"> & {
|
|
1653
|
+
attributes: Partial<TransformToString<TBaseComponent>> & {
|
|
1654
|
+
name?: string;
|
|
1655
|
+
text?: string;
|
|
1656
|
+
texts?: string[];
|
|
1657
|
+
url?: string;
|
|
1658
|
+
fontSize?: number;
|
|
1659
|
+
screenreaderText?: string;
|
|
1660
|
+
fontColor?: string;
|
|
1661
|
+
linkColor?: string;
|
|
1662
|
+
};
|
|
1663
|
+
}>;
|
|
1664
|
+
type TField = "image" | "listContainerComponent" | "text" | "url" | "textArea" | "fontSelect" | "splitTextArea" | "color" | "colorGradient" | "number" | "alignment" | "carouselSlides" | "option" | "iconSelect" | "toggle";
|
|
1665
|
+
type TContainer = TBaseComponent & {
|
|
1666
|
+
component: "container" | "formContainer";
|
|
1667
|
+
position?: TContainerPosition;
|
|
1668
|
+
fillColor?: string;
|
|
1669
|
+
fillImage?: string | null;
|
|
1670
|
+
components?: TComponent[];
|
|
1671
|
+
loopVariable?: string;
|
|
1672
|
+
loopSource?: string | any[];
|
|
1673
|
+
backgroundBlur?: number | null;
|
|
1674
|
+
};
|
|
1675
|
+
type TFieldSettings = {
|
|
1676
|
+
type: TField;
|
|
1677
|
+
label: string;
|
|
1678
|
+
hint: string | null;
|
|
1679
|
+
description: string | null;
|
|
1680
|
+
placeholder: string | null;
|
|
1681
|
+
variable: string;
|
|
1682
|
+
readOnly: boolean;
|
|
1683
|
+
markdownHint: boolean;
|
|
1684
|
+
options: {
|
|
1685
|
+
label: string;
|
|
1686
|
+
value: any;
|
|
1687
|
+
}[] | null;
|
|
1688
|
+
maxLimit: number | null;
|
|
1689
|
+
minLimit: number | null;
|
|
1690
|
+
aspectRatio: number | null;
|
|
1691
|
+
newSlide?: TCarouselSlide;
|
|
1692
|
+
carousel?: string;
|
|
1693
|
+
darkModeVariable?: string;
|
|
1694
|
+
conditions?: TTestObject[];
|
|
1695
|
+
showOpacity?: boolean;
|
|
1696
|
+
newRow?: any;
|
|
1522
1697
|
};
|
|
1523
1698
|
|
|
1524
1699
|
type Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>;
|
|
@@ -1883,9 +2058,23 @@ declare class NamiFlowManager$2 {
|
|
|
1883
2058
|
*/
|
|
1884
2059
|
static reset(): void;
|
|
1885
2060
|
handoffStepHandler?: NamiFlowHandoffStepHandler;
|
|
2061
|
+
private pendingHandoff?;
|
|
1886
2062
|
/**
|
|
1887
2063
|
* Registers a handoff step handler and returns an unsubscribe callback.
|
|
1888
2064
|
*
|
|
2065
|
+
* The handler receives `(tag, data, complete)`. Call `complete(outcome)`
|
|
2066
|
+
* exactly once with a typed {@link NamiHandoffOutcome}: completing
|
|
2067
|
+
* reports the outcome AND resumes the flow in one call. A bare
|
|
2068
|
+
* `complete()` is equivalent to `complete({ kind: 'done' })`. The
|
|
2069
|
+
* outcome's routing (lifecycles, purchase/login machinery) runs before
|
|
2070
|
+
* the resume, matching the pre-outcome `buySkuComplete(); resume()`
|
|
2071
|
+
* call order.
|
|
2072
|
+
*
|
|
2073
|
+
* Handlers written against the old `(tag, data)` signature still run —
|
|
2074
|
+
* the extra argument is ignored at runtime, and their existing
|
|
2075
|
+
* `resume()` call degrades to `complete({kind:'done'})` with a
|
|
2076
|
+
* migration warning.
|
|
2077
|
+
*
|
|
1889
2078
|
* The returned callback clears the registered handler only if it is still
|
|
1890
2079
|
* the active one (identity-check guard). This protects against React 18
|
|
1891
2080
|
* StrictMode dev-mode double-mount where a stale unsubscribe from the
|
|
@@ -1900,6 +2089,21 @@ declare class NamiFlowManager$2 {
|
|
|
1900
2089
|
* registration methods return `Callback`. See NAM-1219.
|
|
1901
2090
|
*/
|
|
1902
2091
|
static registerStepHandoff(handoffStepHandler?: NamiFlowHandoffStepHandler): Callback$1;
|
|
2092
|
+
/** Whether a handoff handler is registered. */
|
|
2093
|
+
get hasHandoffHandler(): boolean;
|
|
2094
|
+
/**
|
|
2095
|
+
* Single delivery point for handoffs reaching the host app. Flow code must
|
|
2096
|
+
* route through here (never invoke the handler field directly) so every
|
|
2097
|
+
* handler receives a working `complete` and reserved-tag guarding stays
|
|
2098
|
+
* upstream in the dispatcher.
|
|
2099
|
+
*/
|
|
2100
|
+
deliverHandoff(tag: string, data?: Record<string, any>): void;
|
|
2101
|
+
/**
|
|
2102
|
+
* Applies a typed handoff outcome to the SDK before the flow resumes.
|
|
2103
|
+
* Ordering contract: outcome routing first (its lifecycles may navigate),
|
|
2104
|
+
* `resume()` last — identical to the legacy integrator call order.
|
|
2105
|
+
*/
|
|
2106
|
+
private static routeHandoffOutcome;
|
|
1903
2107
|
eventHandler?: NamiFlowEventHandler;
|
|
1904
2108
|
/**
|
|
1905
2109
|
* Registers an event handler and returns an unsubscribe callback.
|
|
@@ -2010,6 +2214,24 @@ declare class NamiFlow extends BasicNamiFlow {
|
|
|
2010
2214
|
timerStates: {
|
|
2011
2215
|
[timerId: string]: TimerState;
|
|
2012
2216
|
};
|
|
2217
|
+
/**
|
|
2218
|
+
* Flow-scoped state written by typed handoff outcomes (Variant D).
|
|
2219
|
+
* Exposed to branch conditions and smart text via the `login.*` and
|
|
2220
|
+
* `permissions.*` namespaces registered in {@link registerResolvers}.
|
|
2221
|
+
* `login` holds the host's open-ended attributes verbatim, keyed by the
|
|
2222
|
+
* host's own names (e.g. `login.subscriberStatus`, `login.tier`).
|
|
2223
|
+
*/
|
|
2224
|
+
handoffState: {
|
|
2225
|
+
login?: Record<string, NamiHandoffAttributeValue>;
|
|
2226
|
+
permissions: Record<string, boolean>;
|
|
2227
|
+
};
|
|
2228
|
+
/**
|
|
2229
|
+
* Per-raise flow-completion tracking (NAM-1545). Bound to the impression
|
|
2230
|
+
* of the current screen's raise; one completion result per impression
|
|
2231
|
+
* (R4). `pending` holds condition signals that fired before the impression
|
|
2232
|
+
* id arrived (R1) — flushed on bind.
|
|
2233
|
+
*/
|
|
2234
|
+
private completionContext?;
|
|
2013
2235
|
constructor(campaign: NamiFlowCampaign, paywall: PaywallHandle, manager: NamiFlowManager$2, context?: NamiPaywallLaunchContext);
|
|
2014
2236
|
private applyLaunchContextAttributes;
|
|
2015
2237
|
private registerResolvers;
|
|
@@ -2023,7 +2245,41 @@ declare class NamiFlow extends BasicNamiFlow {
|
|
|
2023
2245
|
private isStepActive;
|
|
2024
2246
|
private flowLog;
|
|
2025
2247
|
finished(): void;
|
|
2248
|
+
/**
|
|
2249
|
+
* Dismiss the flow (hard close): records `dismiss_page` against the current
|
|
2250
|
+
* screen's impression (R5) before tearing down. The single choke point for
|
|
2251
|
+
* host-initiated dismissal, the `flowDismiss` action, back-button exits,
|
|
2252
|
+
* and platform swipe-down dismissals — anything that ends the flow without
|
|
2253
|
+
* a user "skip" or a programmatic `flowDone`. Never overwrites a positive
|
|
2254
|
+
* completion (R4 guard inside `signalNonCompletion`).
|
|
2255
|
+
*/
|
|
2256
|
+
dismiss(): void;
|
|
2026
2257
|
back(): void;
|
|
2258
|
+
/**
|
|
2259
|
+
* Binds a freshly-posted impression id to the current screen's raise.
|
|
2260
|
+
* Called via `NamiAPI.impressionListener` whenever an impression posts
|
|
2261
|
+
* while this flow is open. Starts a fresh completion context for the raise
|
|
2262
|
+
* (a re-render — e.g. back-navigation — rebinds with a clean result),
|
|
2263
|
+
* fires `page_view` completion immediately if applicable (R2), and flushes
|
|
2264
|
+
* any condition signals that arrived before the id (R1).
|
|
2265
|
+
*/
|
|
2266
|
+
bindImpression(impressionId: string): void;
|
|
2267
|
+
/**
|
|
2268
|
+
* Reports that `condition` was satisfied on the current page. PATCHes the
|
|
2269
|
+
* completion result only when the current step is a matching, enabled
|
|
2270
|
+
* completion step and no result has been sent for this impression yet.
|
|
2271
|
+
* Signals arriving before the impression id is bound are queued (R1).
|
|
2272
|
+
*/
|
|
2273
|
+
completionSignal(condition: string): void;
|
|
2274
|
+
/**
|
|
2275
|
+
* Records a non-completion outcome (`skip_page` / `dismiss_page`) against
|
|
2276
|
+
* the current page's impression when the flow terminates without
|
|
2277
|
+
* completing (R5 — feeds the flow-conversion cube). Applies to any page,
|
|
2278
|
+
* completion-step or not, but never overwrites a positive result (R4) and
|
|
2279
|
+
* no-ops when no impression is bound (e.g. anonymous mode).
|
|
2280
|
+
*/
|
|
2281
|
+
signalNonCompletion(result: 'skip_page' | 'dismiss_page'): void;
|
|
2282
|
+
private patchCompletion;
|
|
2027
2283
|
next(): void;
|
|
2028
2284
|
private backToPreviousScreenStep;
|
|
2029
2285
|
forward(stepId: string): void;
|
|
@@ -2051,6 +2307,12 @@ declare class NamiFlow extends BasicNamiFlow {
|
|
|
2051
2307
|
private handleScreenStep;
|
|
2052
2308
|
private handleBranchStep;
|
|
2053
2309
|
getFormData(): Record<string, boolean | string>;
|
|
2310
|
+
/**
|
|
2311
|
+
* Structured payload for `userdata` handoffs: Nami delivering the host
|
|
2312
|
+
* app the data the user provided in a Nami-rendered form. Fields ride
|
|
2313
|
+
* verbatim; the customer owns interpretation.
|
|
2314
|
+
*/
|
|
2315
|
+
buildUserDataEnvelope(formId: string): NamiUserDataEnvelope;
|
|
2054
2316
|
flowHandoffFormSequence(): void;
|
|
2055
2317
|
resumeNextHandoff(): void;
|
|
2056
2318
|
}
|
|
@@ -2355,9 +2617,22 @@ interface NamiFlowManagerStatic {
|
|
|
2355
2617
|
*
|
|
2356
2618
|
* This allows you to intercept a handoff step in a Nami Flow and execute custom logic.
|
|
2357
2619
|
*
|
|
2620
|
+
* The handler receives `(handoffTag, handoffData, complete)`. Call
|
|
2621
|
+
* `complete(outcome)` exactly once with a typed `NamiHandoffOutcome`
|
|
2622
|
+
* (permission grant, purchase result, login result, or `{kind:'done'}`).
|
|
2623
|
+
* Completing reports the outcome to Nami AND resumes the flow in one
|
|
2624
|
+
* call. A bare `complete()` — the common "nothing to report" case — is
|
|
2625
|
+
* equivalent to `complete({kind:'done'})`.
|
|
2626
|
+
*
|
|
2627
|
+
* Handlers written against the pre-outcome `(handoffTag, handoffData)`
|
|
2628
|
+
* signature still run — the extra argument is ignored at runtime, and
|
|
2629
|
+
* their existing `NamiFlowManager.resume()` call is treated as
|
|
2630
|
+
* `complete({kind:'done'})` (with a migration warning in the logs).
|
|
2631
|
+
*
|
|
2358
2632
|
* @param handoffStepHandler - A callback function that will be called when a handoff occurs.
|
|
2359
|
-
* It receives the `handoffTag` string (identifying the step)
|
|
2360
|
-
* object with additional context. If `undefined`, the
|
|
2633
|
+
* It receives the `handoffTag` string (identifying the step), an optional `handoffData`
|
|
2634
|
+
* object with additional context, and the `complete` callback. If `undefined`, the
|
|
2635
|
+
* current handler is cleared.
|
|
2361
2636
|
* @returns An unsubscribe `Callback`. Call it to clear the registered handler.
|
|
2362
2637
|
* The unsubscribe is identity-checked — calling it after a different handler has been
|
|
2363
2638
|
* registered is a no-op. See NAM-1219.
|
|
@@ -2435,7 +2710,7 @@ interface NamiPaywallManagerStatic {
|
|
|
2435
2710
|
/** Registers a restore-purchase handler. Returns an unregister function. */
|
|
2436
2711
|
registerRestoreHandler: (handler: Callback$1) => Callback$1;
|
|
2437
2712
|
/** Notifies Nami that a host-managed purchase completed successfully. */
|
|
2438
|
-
buySkuComplete: (purchase:
|
|
2713
|
+
buySkuComplete: (purchase: NamiPurchaseSuccess) => Promise<void>;
|
|
2439
2714
|
/** Notifies Nami that a host-managed purchase was cancelled. */
|
|
2440
2715
|
buySkuCancel: () => void;
|
|
2441
2716
|
/**
|
|
@@ -2856,6 +3131,15 @@ declare class NamiEventEmitter {
|
|
|
2856
3131
|
|
|
2857
3132
|
declare class NamiAPI {
|
|
2858
3133
|
static instance: NamiAPI;
|
|
3134
|
+
/**
|
|
3135
|
+
* Optional observer invoked with each impression id the moment one is
|
|
3136
|
+
* posted. The flow-completion engine registers this (in
|
|
3137
|
+
* `NamiFlowManager.presentFlow`) to bind a freshly-posted impression to
|
|
3138
|
+
* the current flow screen's completion context (NAM-1545, R1). Kept as a
|
|
3139
|
+
* plain hook so `api` never has to import a manager — non-flow impressions
|
|
3140
|
+
* are simply unobserved when no flow is open.
|
|
3141
|
+
*/
|
|
3142
|
+
static impressionListener?: (impressionId: string) => void;
|
|
2859
3143
|
private baseURL;
|
|
2860
3144
|
private platformID;
|
|
2861
3145
|
private get deviceID();
|
|
@@ -2876,6 +3160,13 @@ declare class NamiAPI {
|
|
|
2876
3160
|
logout(): Promise<Record<string, never>>;
|
|
2877
3161
|
startSession(sessionStartTime: Date): Promise<void>;
|
|
2878
3162
|
postImpression(options: Impression): Promise<void>;
|
|
3163
|
+
/**
|
|
3164
|
+
* Reports a flow completion result against a prior impression
|
|
3165
|
+
* (NAM-1545 / Flow Completion Step). UPDATE-only on the server; the
|
|
3166
|
+
* impression must already exist. `keepalive` so a dismiss-triggered PATCH
|
|
3167
|
+
* survives page unload on web.
|
|
3168
|
+
*/
|
|
3169
|
+
patchImpressionCompletion(impressionId: string, completion_result: string, completion_result_date: string): Promise<void>;
|
|
2879
3170
|
postConversion(options: TransactionRequest): Promise<void>;
|
|
2880
3171
|
purchaseValidation(options: PurchaseValidationRequest): Promise<void>;
|
|
2881
3172
|
fetchAPI<T>(path: string, timeout?: number, retries?: number): Promise<T>;
|
|
@@ -3504,7 +3795,7 @@ declare class NamiPaywallManager$1 {
|
|
|
3504
3795
|
*
|
|
3505
3796
|
* @returns {Promise<void>} A Promise that resolves when buying SKU will be complete.
|
|
3506
3797
|
*/
|
|
3507
|
-
static buySkuComplete(purchase:
|
|
3798
|
+
static buySkuComplete(purchase: NamiPurchaseSuccess): Promise<void>;
|
|
3508
3799
|
/**
|
|
3509
3800
|
* Notify the NamiPaywallManager that purchase flow handled by you is cancelled.
|
|
3510
3801
|
* Used to disable product purchase-in-progress loading indicators
|
|
@@ -3610,5 +3901,5 @@ declare namespace internal {
|
|
|
3610
3901
|
};
|
|
3611
3902
|
}
|
|
3612
3903
|
|
|
3613
|
-
export { ALREADY_CONFIGURED, ANONYMOUS_MODE, ANONYMOUS_MODE_ALREADY_OFF, ANONYMOUS_MODE_ALREADY_ON, ANONYMOUS_MODE_LOGIN_NOT_ALLOWED, ANONYMOUS_UUID, APIError, API_ACTIVE_ENTITLEMENTS, API_CAMPAIGN_RULES, API_CAMPAIGN_SESSION_TIMESTAMP, API_CONFIG, API_MAX_CALLS_LIMIT, API_PAYWALLS, API_PRODUCTS, API_RETRY_DELAY_SEC, API_TIMEOUT_LIMIT, API_VERSION, AUTH_DEVICE, AVAILABLE_ACTIVE_ENTITLEMENTS_CHANGED, AVAILABLE_CAMPAIGNS_CHANGED, AccountStateAction, AnonymousCDPError, AnonymousLoginError, AnonymousModeAlreadyOffError, AnonymousModeAlreadyOnError, BASE_STAGING_URL, BASE_URL, BASE_URL_PATH, BadRequestError, BasicNamiFlow, BorderMap, BorderSideMap, CAMPAIGN_NOT_AVAILABLE, CUSTOMER_ATTRIBUTES_KEY_PREFIX, CUSTOMER_JOURNEY_STATE_CHANGED, CUSTOM_HOST_PREFIX, CampaignNotAvailableError, CampaignRuleConversionEventType, CampaignRuleRepository, Capabilities, ClientError, ConfigRepository, ConflictError, CustomerJourneyRepository, DEVELOPMENT, DEVICE_API_TIMEOUT_LIMIT, DEVICE_ID_NOT_SET, DEVICE_ID_REQUIRED, DISABLE_ASYNC_LOGIN_LOGOUT, DeviceIDRequiredError, DeviceRepository, EXTENDED_CLIENT_INFO_DELIMITER, EXTENDED_CLIENT_INFO_PREFIX, EXTENDED_PLATFORM, EXTENDED_PLATFORM_VERSION, EXTERNAL_ID_REQUIRED, EntitlementRepository, EntitlementUtils, ExternalIDRequiredError, FLOW_SCREENS_NOT_AVAILABLE, FlowScreensNotAvailableError, HTML_REGEX, INITIAL_APP_CONFIG, INITIAL_CAMPAIGN_RULES, INITIAL_PAYWALLS, INITIAL_PRODUCTS, INITIAL_SESSION_COUNTER_VALUE, INITIAL_SUCCESS, InternalServerError, KEY_SESSION_COUNTER, LIQUID_VARIABLE_REGEX, LOCAL_NAMI_ENTITLEMENTS, LOG_HTTP_REQUESTS, LOG_HTTP_TRAFFIC, LaunchCampaignError, LaunchContextResolver, LogLevel, NAMI_CONFIGURATION, NAMI_CUSTOMER_JOURNEY_STATE, NAMI_LANGUAGE_CODE, NAMI_LAST_IMPRESSION_ID, NAMI_LAUNCH_ID, NAMI_PROFILE, NAMI_PURCHASE_CHANNEL, NAMI_PURCHASE_IMPRESSION_ID, NAMI_SDK_PACKAGE_VERSION, NAMI_SDK_VERSION, NAMI_SESSION_ID, NAMI_STORAGE_KEYS, Nami, NamiAPI, NamiAnimationType, NamiCampaignManager$2 as NamiCampaignManager, NamiCampaignRuleType, NamiConditionEvaluator, NamiCustomerManager$2 as NamiCustomerManager, NamiEntitlementManager$2 as NamiEntitlementManager, NamiEventEmitter, NamiFlow, NamiFlowActionFunction, NamiFlowManager$1 as NamiFlowManager, NamiFlowStepType, NamiPaywallAction, NamiPaywallManager$2 as NamiPaywallManager, PaywallManagerEvents as NamiPaywallManagerEvents, NamiPurchaseManager$2 as NamiPurchaseManager, NamiRefs, NamiReservedActions, NotFoundError, PAYWALL_ACTION_EVENT, PLATFORM_ID_REQUIRED, PRODUCTION, PaywallManagerEvents, PaywallRepository, PaywallState, PlacementLabelResolver, PlatformIDRequiredError, ProductRepository, RECONFIG_SUCCESS, RetryLimitExceededError, SDKNotInitializedError, SDK_NOT_INITIALIZED, SERVER_NAMI_ENTITLEMENTS, SESSION_REQUIRED, SHOULD_SHOW_LOADING_INDICATOR, SKU_TEXT_REGEX, SMART_TEXT_PATTERN, STARTUP_TELEMETRY, STATUS_BAD_REQUEST, STATUS_CONFLICT, STATUS_INTERNAL_SERVER_ERROR, STATUS_NOT_FOUND, STATUS_SUCCESS, SessionService, SimpleEventTarget, StorageService, UNABLE_TO_UPDATE_CDP_ID, USE_STAGING_API, VALIDATE_PRODUCT_GROUPS, VAR_REGEX, NamiProfileManager$1 as _NamiProfileManager, internal as _internal, activateEntitlementByPurchase, activeEntitlements, aggregateScreenreaderText, allCampaigns, allPaywalls, applyEntitlementActivation, audienceSplitPosition, bestUrlCampaignMatch, bigintToUuid, checkAnySkuHasPromoOffer, checkAnySkuHasTrialOffer, convertISO8601PeriodToText, convertLocale, convertOfferToPricingPhase, createNamiEntitlements, currentSku, empty, extractStandardPricingPhases, formatDate, formattedPrice, generateUUID, getApiCampaigns, getApiPaywalls, getBaseUrl, getBillingPeriodNumber, getCurrencyFormat, getDeviceData, getDeviceFormFactor, getDeviceScaleFactor, getEffectiveWebStyle, getEntitlementRefIdsForSku, getExtendedClientInfo, getFreeTrialPeriod, getInitialCampaigns, getInitialPaywalls, getPaywall, getPaywallDataFromLabel, getPercentagePriceDifference, getPeriodNumberInDays, getPeriodNumberInWeeks, getPlatformAdapters, getPriceDifference, getPricePerMonth, getProductDetail, getPurchaseAdapter, getReferenceSku, getSkuProductDetailKeys, getSkuSmartTextValue, getSlideSmartTextValue, getStandardBillingPeriod, getTranslate, getUrlParams, handleErrors, hasAllPaywalls, hasCapability, hasPurchaseManagement, initialState, invokeHandler, isAnonymousMode, isInitialConfigCompressed, isNamiFlowCampaign, isSubscription, isValidISODate, isValidUrl, logger, mapAnonymousCampaigns, namiBuySKU, normalizeLaunchContext, parseToSemver, postConversion, productDetail, registerPlatformAdapters, registerPurchaseAdapter, resolveLoopSource, selectSegment, setActiveNamiEntitlements, shouldValidateProductGroups, skuItems, skuMapFromEntitlements, storageService, toDouble, toNamiEntitlements, toNamiSKU, tryParseB64Gzip, tryParseJson, updateRelatedSKUsForNamiEntitlement, uuidFromSplitPosition, validateForm, validateMinSDKVersion, validateTextInput };
|
|
3614
|
-
export type { AccountStateHandler$1 as AccountStateHandler, AlignmentType, AmazonProduct, ApiResponse, AppleProduct, AvailableCampaignsResponseHandler, BorderLocationType, BorderSideType, Callback$1 as Callback, CloseHandler, CustomerJourneyState, DeepLinkUrlHandler, Device, DevicePayload, DeviceProfile, DirectionType, ExtendedPlatformInfo, FlexDirectionObject, FlowNavigationOptions, FontCollection, FontDetails, FormFactor, FormFieldValidator, GoogleProduct, IConfig, IDeviceAdapter, IEntitlements$1 as IEntitlements, IPaywall, IPlatformAdapters, IProductsWithComponents, IPurchaseAdapter, ISkuMenu, IStorageAdapter, IUIAdapter, Impression, InitialConfig, InitialConfigCompressed, InitiateStateGroup, LoginResponse, NamiAnimation, NamiAnimationObjectSpec, NamiAnimationSpec, NamiAnonymousCampaign, NamiAppSuppliedVideoDetails, NamiCampaign, NamiCampaignManagerStatic, NamiCampaignSegment, NamiConfiguration, NamiConfigurationState, NamiCustomAttributeValue, NamiCustomerManagerStatic, NamiEntitlement$1 as NamiEntitlement, NamiEntitlementManagerStatic, NamiFlowAction, NamiFlowAnimation, NamiFlowCampaign, NamiFlowDTO, NamiFlowEventHandler, NamiFlowHandoffStepHandler, NamiFlowManagerStatic, NamiFlowObjectDTO, NamiFlowOn, NamiFlowStep, NamiFlowTransition, NamiFlowTransitionDirection, NamiFlowWithObject, NamiInitialConfig, NamiLanguageCodes, NamiLogLevel, NamiPaywallActionHandler, NamiPaywallComponentChange, NamiPaywallEvent, NamiPaywallEventVideoMetadata, NamiPaywallLaunchContext, NamiPaywallManagerStatic, NamiPresentationStyle, NamiProductDetails, NamiProductOffer, NamiProfile, NamiPurchase, NamiPurchaseCompleteResult, NamiPurchaseDetails, NamiPurchaseManagerStatic, NamiPurchasesState, NamiSKU, NamiSKUType, NamiSubscriptionInterval, NamiSubscriptionPeriod, None, NoneSpec, PaywallActionEvent, PaywallHandle, PaywallResultHandler, PaywallSKU, PricingPhase, ProductGroup, Pulse, PulseSpec, PurchaseContext, PurchaseResult, PurchaseValidationRequest, SKU, SKUActionHandler, ScreenInfo, Session, TBaseComponent, TButtonContainer, TCarouselContainer, TCarouselSlide, TCarouselSlidesState, TCollapseContainer, TComponent, TConditionalAttributes, TConditionalComponent, TContainer, TContainerPosition, TCountdownTimerTextComponent, TDevice, TDisabledButton, TField, TFieldSettings, TFlexProductContainer, THeaderFooter, TImageComponent, TInitialState, TMediaTypes, TOffer, TPages, TPaywallContext, TPaywallLaunchContext, TPaywallMedia, TPaywallTemplate, TPlayPauseButton, TProductContainer, TProductGroup, TProgressBarComponent, TProgressIndicatorComponent, TQRCodeComponent, TRadioButton, TRepeatingGrid, TResponsiveGrid, TSegmentPicker, TSegmentPickerItem, TSemverObj, TSpacerComponent, TStack, TSvgImageComponent, TSymbolComponent, TTestObject, TTextComponent, TTextInputComponent, TTextInputType, TTextLikeComponent, TTextListComponent, TTimelineRail, TToggleButtonComponent, TToggleSwitch, TVariablePattern, TVideoComponent, TVolumeButton, TimerState, TransactionRequest, UserAction, UserActionParameters, Wave, WaveSpec };
|
|
3904
|
+
export { ALREADY_CONFIGURED, ANONYMOUS_MODE, ANONYMOUS_MODE_ALREADY_OFF, ANONYMOUS_MODE_ALREADY_ON, ANONYMOUS_MODE_LOGIN_NOT_ALLOWED, ANONYMOUS_UUID, APIError, API_ACTIVE_ENTITLEMENTS, API_CAMPAIGN_RULES, API_CAMPAIGN_SESSION_TIMESTAMP, API_CONFIG, API_MAX_CALLS_LIMIT, API_PAYWALLS, API_PRODUCTS, API_RETRY_DELAY_SEC, API_TIMEOUT_LIMIT, API_VERSION, AUTH_DEVICE, AVAILABLE_ACTIVE_ENTITLEMENTS_CHANGED, AVAILABLE_CAMPAIGNS_CHANGED, AccountStateAction, AnonymousCDPError, AnonymousLoginError, AnonymousModeAlreadyOffError, AnonymousModeAlreadyOnError, BASE_STAGING_URL, BASE_URL, BASE_URL_PATH, BadRequestError, BasicNamiFlow, BorderMap, BorderSideMap, CAMPAIGN_NOT_AVAILABLE, CUSTOMER_ATTRIBUTES_KEY_PREFIX, CUSTOMER_JOURNEY_STATE_CHANGED, CUSTOM_HOST_PREFIX, CampaignNotAvailableError, CampaignRuleConversionEventType, CampaignRuleRepository, Capabilities, ClientError, ConfigRepository, ConflictError, CustomerJourneyRepository, DEVELOPMENT, DEVICE_API_TIMEOUT_LIMIT, DEVICE_ID_NOT_SET, DEVICE_ID_REQUIRED, DISABLE_ASYNC_LOGIN_LOGOUT, DeviceIDRequiredError, DeviceRepository, EXTENDED_CLIENT_INFO_DELIMITER, EXTENDED_CLIENT_INFO_PREFIX, EXTENDED_PLATFORM, EXTENDED_PLATFORM_VERSION, EXTERNAL_ID_REQUIRED, EntitlementRepository, EntitlementUtils, ExternalIDRequiredError, FLOW_SCREENS_NOT_AVAILABLE, FlowScreensNotAvailableError, HTML_REGEX, INITIAL_APP_CONFIG, INITIAL_CAMPAIGN_RULES, INITIAL_PAYWALLS, INITIAL_PRODUCTS, INITIAL_SESSION_COUNTER_VALUE, INITIAL_SUCCESS, InternalServerError, KEY_SESSION_COUNTER, LIQUID_VARIABLE_REGEX, LOCAL_NAMI_ENTITLEMENTS, LOG_HTTP_REQUESTS, LOG_HTTP_TRAFFIC, LaunchCampaignError, LaunchContextResolver, LogLevel, NAMI_CONFIGURATION, NAMI_CUSTOMER_JOURNEY_STATE, NAMI_LANGUAGE_CODE, NAMI_LAST_IMPRESSION_ID, NAMI_LAUNCH_ID, NAMI_PROFILE, NAMI_PURCHASE_CHANNEL, NAMI_PURCHASE_IMPRESSION_ID, NAMI_SDK_PACKAGE_VERSION, NAMI_SDK_VERSION, NAMI_SESSION_ID, NAMI_STORAGE_KEYS, Nami, NamiAPI, NamiAnimationType, NamiCampaignManager$2 as NamiCampaignManager, NamiCampaignRuleType, NamiConditionEvaluator, NamiCustomerManager$2 as NamiCustomerManager, NamiEntitlementManager$2 as NamiEntitlementManager, NamiEventEmitter, NamiFlow, NamiFlowActionFunction, NamiFlowManager$1 as NamiFlowManager, NamiFlowStepType, NamiHandoffTag, NamiPaywallAction, NamiPaywallManager$2 as NamiPaywallManager, PaywallManagerEvents as NamiPaywallManagerEvents, NamiPermissionOutcome, NamiPurchaseManager$2 as NamiPurchaseManager, NamiRefs, NamiReservedActions, NotFoundError, PAYWALL_ACTION_EVENT, PLATFORM_ID_REQUIRED, PRODUCTION, PaywallManagerEvents, PaywallRepository, PaywallState, PlacementLabelResolver, PlatformIDRequiredError, ProductRepository, RECONFIG_SUCCESS, RetryLimitExceededError, SDKNotInitializedError, SDK_NOT_INITIALIZED, SERVER_NAMI_ENTITLEMENTS, SESSION_REQUIRED, SHOULD_SHOW_LOADING_INDICATOR, SKU_TEXT_REGEX, SMART_TEXT_PATTERN, STARTUP_TELEMETRY, STATUS_BAD_REQUEST, STATUS_CONFLICT, STATUS_INTERNAL_SERVER_ERROR, STATUS_NOT_FOUND, STATUS_SUCCESS, SessionService, SimpleEventTarget, StorageService, UNABLE_TO_UPDATE_CDP_ID, USE_STAGING_API, VALIDATE_PRODUCT_GROUPS, VAR_REGEX, NamiProfileManager$1 as _NamiProfileManager, internal as _internal, activateEntitlementByPurchase, activeEntitlements, aggregateScreenreaderText, allCampaigns, allPaywalls, applyEntitlementActivation, audienceSplitPosition, bestUrlCampaignMatch, bigintToUuid, checkAnySkuHasPromoOffer, checkAnySkuHasTrialOffer, convertISO8601PeriodToText, convertLocale, convertOfferToPricingPhase, createNamiEntitlements, currentSku, empty, extractStandardPricingPhases, formatDate, formattedPrice, generateUUID, getApiCampaigns, getApiPaywalls, getBaseUrl, getBillingPeriodNumber, getCurrencyFormat, getDeviceData, getDeviceFormFactor, getDeviceScaleFactor, getEffectiveWebStyle, getEntitlementRefIdsForSku, getExtendedClientInfo, getFreeTrialPeriod, getInitialCampaigns, getInitialPaywalls, getPaywall, getPaywallDataFromLabel, getPercentagePriceDifference, getPeriodNumberInDays, getPeriodNumberInWeeks, getPlatformAdapters, getPriceDifference, getPricePerMonth, getProductDetail, getPurchaseAdapter, getReferenceSku, getSkuProductDetailKeys, getSkuSmartTextValue, getSlideSmartTextValue, getStandardBillingPeriod, getTranslate, getUrlParams, handleErrors, hasAllPaywalls, hasCapability, hasPurchaseManagement, initialState, invokeHandler, isAnonymousMode, isInitialConfigCompressed, isNamiFlowCampaign, isSubscription, isValidISODate, isValidUrl, logger, mapAnonymousCampaigns, namiBuySKU, normalizeLaunchContext, parseToSemver, postConversion, productDetail, registerPlatformAdapters, registerPurchaseAdapter, resolveLoopSource, selectSegment, setActiveNamiEntitlements, shouldValidateProductGroups, skuItems, skuMapFromEntitlements, storageService, toDouble, toNamiEntitlements, toNamiSKU, tryParseB64Gzip, tryParseJson, updateRelatedSKUsForNamiEntitlement, uuidFromSplitPosition, validateForm, validateMinSDKVersion, validateTextInput };
|
|
3905
|
+
export type { AccountStateHandler$1 as AccountStateHandler, AlignmentType, AmazonProduct, ApiResponse, AppleProduct, AvailableCampaignsResponseHandler, BorderLocationType, BorderSideType, Callback$1 as Callback, CloseHandler, CustomerJourneyState, DeepLinkUrlHandler, Device, DevicePayload, DeviceProfile, DirectionType, ExtendedPlatformInfo, FlexDirectionObject, FlowNavigationOptions, FontCollection, FontDetails, FormFactor, FormFieldValidator, GoogleProduct, IConfig, IDeviceAdapter, IEntitlements$1 as IEntitlements, IPaywall, IPlatformAdapters, IProductsWithComponents, IPurchaseAdapter, ISkuMenu, IStorageAdapter, IUIAdapter, Impression, InitialConfig, InitialConfigCompressed, InitiateStateGroup, LoginResponse, NamiAnimation, NamiAnimationObjectSpec, NamiAnimationSpec, NamiAnonymousCampaign, NamiAppSuppliedVideoDetails, NamiCampaign, NamiCampaignManagerStatic, NamiCampaignSegment, NamiCompletionResult, NamiConfiguration, NamiConfigurationState, NamiCustomAttributeValue, NamiCustomerManagerStatic, NamiEntitlement$1 as NamiEntitlement, NamiEntitlementManagerStatic, NamiFlowAction, NamiFlowAnimation, NamiFlowCampaign, NamiFlowCompletionCondition, NamiFlowDTO, NamiFlowEventHandler, NamiFlowHandoffStepHandler, NamiFlowManagerStatic, NamiFlowObjectDTO, NamiFlowOn, NamiFlowStep, NamiFlowTransition, NamiFlowTransitionDirection, NamiFlowWithObject, NamiHandoffAttributeValue, NamiHandoffComplete, NamiHandoffOutcome, NamiHandoffTagValue, NamiInitialConfig, NamiKnownHandoffTag, NamiLanguageCodes, NamiLogLevel, NamiLoginSuccess, NamiPaywallActionHandler, NamiPaywallComponentChange, NamiPaywallEvent, NamiPaywallEventVideoMetadata, NamiPaywallLaunchContext, NamiPaywallManagerStatic, NamiPresentationStyle, NamiProductDetails, NamiProductOffer, NamiProfile, NamiPurchase, NamiPurchaseCompleteResult, NamiPurchaseDetails, NamiPurchaseManagerStatic, NamiPurchaseSuccess, NamiPurchasesState, NamiSKU, NamiSKUType, NamiSubscriptionInterval, NamiSubscriptionPeriod, NamiUserDataEnvelope, None, NoneSpec, PaywallActionEvent, PaywallHandle, PaywallResultHandler, PaywallSKU, PricingPhase, ProductGroup, Pulse, PulseSpec, PurchaseContext, PurchaseResult, PurchaseValidationRequest, SKU, SKUActionHandler, ScreenInfo, Session, TBaseComponent, TButtonContainer, TCarouselContainer, TCarouselSlide, TCarouselSlidesState, TCollapseContainer, TComponent, TConditionalAttributes, TConditionalComponent, TContainer, TContainerPosition, TCountdownTimerTextComponent, TDevice, TDisabledButton, TField, TFieldSettings, TFlexProductContainer, THeaderFooter, TImageComponent, TInitialState, TMediaTypes, TOffer, TPages, TPaywallContext, TPaywallLaunchContext, TPaywallMedia, TPaywallTemplate, TPlayPauseButton, TProductContainer, TProductGroup, TProgressBarComponent, TProgressIndicatorComponent, TQRCodeComponent, TRadioButton, TRepeatingGrid, TResponsiveGrid, TSegmentPicker, TSegmentPickerItem, TSemverObj, TSpacerComponent, TStack, TSvgImageComponent, TSymbolComponent, TTestObject, TTextComponent, TTextInputComponent, TTextInputType, TTextLikeComponent, TTextListComponent, TTimelineRail, TToggleButtonComponent, TToggleSwitch, TVariablePattern, TVideoComponent, TVolumeButton, TimerState, TransactionRequest, UserAction, UserActionParameters, Wave, WaveSpec };
|