@adapty/core 3.15.0-dev.c9adddea2ef565925a6ee9343c88de4abc7c272e

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.
@@ -0,0 +1,2976 @@
1
+ //#region src/adapters/interfaces.d.ts
2
+ type PlatformOS = 'ios' | 'android' | 'web' | 'unknown';
3
+ /**
4
+ * Platform adapter interface for OS-specific behavior
5
+ */
6
+ interface IPlatformAdapter {
7
+ /**
8
+ * Current platform OS
9
+ */
10
+ readonly OS: PlatformOS;
11
+ }
12
+ /**
13
+ * SDK metadata adapter for version and SDK name
14
+ */
15
+ interface ISdkMetadataAdapter {
16
+ /**
17
+ * SDK name (e.g., 'react-native', 'capacitor')
18
+ */
19
+ readonly sdkName: string;
20
+ /**
21
+ * SDK version string
22
+ */
23
+ readonly sdkVersion: string;
24
+ }
25
+ /**
26
+ * Logger adapter interface for platform-specific logging
27
+ */
28
+ interface ILoggerAdapter {
29
+ /**
30
+ * Create logging context for method execution
31
+ */
32
+ createContext(): ILogContext;
33
+ }
34
+ interface ScopeArgs {
35
+ methodName: string;
36
+ }
37
+ interface LogTrace {
38
+ action: string;
39
+ fn: string;
40
+ payload: Record<string, unknown>;
41
+ error?: boolean;
42
+ done?: boolean;
43
+ }
44
+ /**
45
+ * Log context interface for tracking method execution
46
+ */
47
+ interface ILogContext {
48
+ readonly stack: LogTrace[];
49
+ decode(args: ScopeArgs): ILogScope;
50
+ encode(args: ScopeArgs): ILogScope;
51
+ call(args: ScopeArgs): ILogScope;
52
+ bridge(args: ScopeArgs): ILogScope;
53
+ event(args: ScopeArgs): ILogScope;
54
+ }
55
+ /**
56
+ * Log scope interface for logging at execution stages
57
+ */
58
+ interface ILogScope {
59
+ start(payload?: Record<string, unknown>): void;
60
+ failed(message?: string): void;
61
+ success(payload?: Record<string, unknown>): void;
62
+ } //#endregion
63
+ //#region src/logger/index.d.ts
64
+
65
+ //# sourceMappingURL=interfaces.d.ts.map
66
+ /**
67
+ * Noop logger adapter - doesn't log anything
68
+ */
69
+ declare class NoopLoggerAdapter implements ILoggerAdapter {
70
+ createContext(): ILogContext;
71
+ }
72
+
73
+ //#endregion
74
+ //#region src/adapters/defaults.d.ts
75
+ //# sourceMappingURL=index.d.ts.map
76
+ /**
77
+ * Default platform adapter with unknown OS
78
+ */
79
+ declare class DefaultPlatformAdapter implements IPlatformAdapter {
80
+ get OS(): PlatformOS;
81
+ set OS(value: PlatformOS);
82
+ }
83
+ /**
84
+ * Default SDK metadata adapter
85
+ */
86
+ declare class DefaultSdkMetadataAdapter implements ISdkMetadataAdapter {
87
+ readonly sdkName: string;
88
+ readonly sdkVersion: string;
89
+ constructor(sdkName?: string, sdkVersion?: string);
90
+ }
91
+
92
+ //#endregion
93
+ //#region src/types/api.d.ts
94
+ /** OneOf type helpers */
95
+ type Without<T, U> = { [P in Exclude<keyof T, keyof U>]?: never };
96
+ type XOR<T, U> = T | U extends object ? (Without<T, U> & U) | (Without<U, T> & T) : T | U;
97
+ type OneOf<T extends any[]> = T extends [infer Only] ? Only : T extends [infer A, infer B, ...infer Rest] ? OneOf<[XOR<A, B>, ...Rest]> : never;
98
+ interface components {
99
+ requests: {
100
+ 'Activate.Request': {
101
+ method: 'activate';
102
+ configuration: components['defs']['AdaptyConfiguration'];
103
+ };
104
+ 'Activate.Response': OneOf<[{
105
+ error: components['defs']['AdaptyError'];
106
+ }, {
107
+ success: true;
108
+ }]>;
109
+ 'AdaptyUICreatePaywallView.Request': {
110
+ method: 'adapty_ui_create_paywall_view';
111
+ paywall: components['defs']['AdaptyPaywall'];
112
+ load_timeout?: number;
113
+ preload_products?: boolean;
114
+ custom_tags?: components['defs']['AdaptyUI.CustomTagsValues'];
115
+ custom_timers?: components['defs']['AdaptyUI.CustomTimersValues'];
116
+ custom_assets?: components['defs']['AdaptyUI.CustomAssets'];
117
+ product_purchase_parameters?: components['defs']['AdaptyUI.ProductPurchaseParameters'];
118
+ };
119
+ 'AdaptyUICreatePaywallView.Response': OneOf<[{
120
+ error: components['defs']['AdaptyError'];
121
+ }, {
122
+ success: components['defs']['AdaptyUI.PaywallView'];
123
+ }]>;
124
+ 'AdaptyUIDismissPaywallView.Request': {
125
+ method: 'adapty_ui_dismiss_paywall_view';
126
+ id: string;
127
+ destroy?: boolean;
128
+ };
129
+ 'AdaptyUIDismissPaywallView.Response': OneOf<[{
130
+ error: components['defs']['AdaptyError'];
131
+ }, {
132
+ success: true;
133
+ }]>;
134
+ 'AdaptyUIPresentPaywallView.Request': {
135
+ method: 'adapty_ui_present_paywall_view';
136
+ id: string;
137
+ ios_presentation_style?: components['defs']['AdaptyUI.IOSPresentationStyle'];
138
+ };
139
+ 'AdaptyUIPresentPaywallView.Response': OneOf<[{
140
+ error: components['defs']['AdaptyError'];
141
+ }, {
142
+ success: true;
143
+ }]>;
144
+ 'AdaptyUIShowDialog.Request': {
145
+ method: 'adapty_ui_show_dialog';
146
+ id: string;
147
+ configuration: components['defs']['AdaptyUI.DialogConfiguration'];
148
+ };
149
+ 'AdaptyUIShowDialog.Response': OneOf<[{
150
+ error: components['defs']['AdaptyError'];
151
+ }, {
152
+ success: components['defs']['AdaptyUI.DialogActionType'];
153
+ }]>;
154
+ 'AdaptyUICreateOnboardingView.Request': {
155
+ method: 'adapty_ui_create_onboarding_view';
156
+ onboarding: components['defs']['AdaptyOnboarding'];
157
+ external_urls_presentation?: components['defs']['AdaptyWebPresentation'];
158
+ };
159
+ 'AdaptyUICreateOnboardingView.Response': OneOf<[{
160
+ error: components['defs']['AdaptyError'];
161
+ }, {
162
+ success: components['defs']['AdaptyUI.OnboardingView'];
163
+ }]>;
164
+ 'AdaptyUIDismissOnboardingView.Request': {
165
+ method: 'adapty_ui_dismiss_onboarding_view';
166
+ id: string;
167
+ destroy?: boolean;
168
+ };
169
+ 'AdaptyUIDismissOnboardingView.Response': OneOf<[{
170
+ error: components['defs']['AdaptyError'];
171
+ }, {
172
+ success: true;
173
+ }]>;
174
+ 'AdaptyUIPresentOnboardingView.Request': {
175
+ method: 'adapty_ui_present_onboarding_view';
176
+ id: string;
177
+ ios_presentation_style?: components['defs']['AdaptyUI.IOSPresentationStyle'];
178
+ };
179
+ 'AdaptyUIPresentOnboardingView.Response': OneOf<[{
180
+ error: components['defs']['AdaptyError'];
181
+ }, {
182
+ success: true;
183
+ }]>;
184
+ 'GetPaywall.Request': {
185
+ method: 'get_paywall';
186
+ placement_id: string;
187
+ locale?: components['defs']['AdaptyLocale'];
188
+ fetch_policy?: components['defs']['AdaptyPlacementFetchPolicy'];
189
+ load_timeout?: number;
190
+ };
191
+ 'GetPaywall.Response': OneOf<[{
192
+ error: components['defs']['AdaptyError'];
193
+ }, {
194
+ success: components['defs']['AdaptyPaywall'];
195
+ }]>;
196
+ 'GetPaywallForDefaultAudience.Request': {
197
+ method: 'get_paywall_for_default_audience';
198
+ placement_id: string;
199
+ locale?: components['defs']['AdaptyLocale'];
200
+ fetch_policy?: components['defs']['AdaptyPlacementFetchPolicy'];
201
+ };
202
+ 'GetPaywallForDefaultAudience.Response': OneOf<[{
203
+ error: components['defs']['AdaptyError'];
204
+ }, {
205
+ success: components['defs']['AdaptyPaywall'];
206
+ }]>;
207
+ 'GetPaywallProducts.Request': {
208
+ method: 'get_paywall_products';
209
+ paywall: components['defs']['AdaptyPaywall'];
210
+ };
211
+ 'GetPaywallProducts.Response': OneOf<[{
212
+ error: components['defs']['AdaptyError'];
213
+ }, {
214
+ success: components['defs']['AdaptyPaywallProduct.Response'][];
215
+ }]>;
216
+ 'GetOnboarding.Request': {
217
+ method: 'get_onboarding';
218
+ placement_id: string;
219
+ locale?: components['defs']['AdaptyLocale'];
220
+ fetch_policy?: components['defs']['AdaptyPlacementFetchPolicy'];
221
+ load_timeout?: number;
222
+ };
223
+ 'GetOnboarding.Response': OneOf<[{
224
+ error: components['defs']['AdaptyError'];
225
+ }, {
226
+ success: components['defs']['AdaptyOnboarding'];
227
+ }]>;
228
+ 'GetOnboardingForDefaultAudience.Request': {
229
+ method: 'get_onboarding_for_default_audience';
230
+ placement_id: string;
231
+ locale?: components['defs']['AdaptyLocale'];
232
+ fetch_policy?: components['defs']['AdaptyPlacementFetchPolicy'];
233
+ };
234
+ 'GetOnboardingForDefaultAudience.Response': OneOf<[{
235
+ error: components['defs']['AdaptyError'];
236
+ }, {
237
+ success: components['defs']['AdaptyOnboarding'];
238
+ }]>;
239
+ 'GetProfile.Request': {
240
+ method: 'get_profile';
241
+ };
242
+ 'GetProfile.Response': OneOf<[{
243
+ error: components['defs']['AdaptyError'];
244
+ }, {
245
+ success: components['defs']['AdaptyProfile'];
246
+ }]>;
247
+ 'Identify.Request': {
248
+ method: 'identify';
249
+ customer_user_id: string;
250
+ parameters?: components['defs']['CustomerIdentityParameters'];
251
+ };
252
+ 'Identify.Response': OneOf<[{
253
+ error: components['defs']['AdaptyError'];
254
+ }, {
255
+ success: true;
256
+ }]>;
257
+ 'IsActivated.Request': {
258
+ method: 'is_activated';
259
+ };
260
+ 'IsActivated.Response': {
261
+ success: boolean;
262
+ };
263
+ 'GetLogLevel.Request': {
264
+ method: 'get_log_level';
265
+ };
266
+ 'GetLogLevel.Response': {
267
+ success: components['defs']['AdaptyLog.Level'];
268
+ };
269
+ 'SetLogLevel.Request': {
270
+ method: 'set_log_level';
271
+ value: components['defs']['AdaptyLog.Level'];
272
+ };
273
+ 'SetLogLevel.Response': {
274
+ success: true;
275
+ };
276
+ 'Logout.Request': {
277
+ method: 'logout';
278
+ };
279
+ 'Logout.Response': OneOf<[{
280
+ error: components['defs']['AdaptyError'];
281
+ }, {
282
+ success: true;
283
+ }]>;
284
+ 'LogShowPaywall.Request': {
285
+ method: 'log_show_paywall';
286
+ paywall: components['defs']['AdaptyPaywall'];
287
+ };
288
+ 'LogShowPaywall.Response': OneOf<[{
289
+ error: components['defs']['AdaptyError'];
290
+ }, {
291
+ success: true;
292
+ }]>;
293
+ 'MakePurchase.Request': {
294
+ method: 'make_purchase';
295
+ product: components['defs']['AdaptyPaywallProduct.Request'];
296
+ parameters?: components['defs']['AdaptyPurchaseParameters'];
297
+ };
298
+ 'MakePurchase.Response': OneOf<[{
299
+ error: components['defs']['AdaptyError'];
300
+ }, {
301
+ success: components['defs']['AdaptyPurchaseResult'];
302
+ }]>;
303
+ 'OpenWebPaywall.Request': OneOf<[{
304
+ method: 'open_web_paywall';
305
+ product: components['defs']['AdaptyPaywallProduct.Request'];
306
+ open_in?: components['defs']['AdaptyWebPresentation'];
307
+ }, {
308
+ method: 'open_web_paywall';
309
+ paywall: components['defs']['AdaptyPaywall'];
310
+ open_in?: components['defs']['AdaptyWebPresentation'];
311
+ }]>;
312
+ 'OpenWebPaywall.Response': OneOf<[{
313
+ error: components['defs']['AdaptyError'];
314
+ }, {
315
+ success: true;
316
+ }]>;
317
+ 'CreateWebPaywallUrl.Request': OneOf<[{
318
+ method: 'create_web_paywall_url';
319
+ product: components['defs']['AdaptyPaywallProduct.Request'];
320
+ }, {
321
+ method: 'create_web_paywall_url';
322
+ paywall: components['defs']['AdaptyPaywall'];
323
+ }]>;
324
+ 'CreateWebPaywallUrl.Response': OneOf<[{
325
+ error: components['defs']['AdaptyError'];
326
+ }, {
327
+ success: string;
328
+ }]>;
329
+ 'PresentCodeRedemptionSheet.Request': {
330
+ method: 'present_code_redemption_sheet';
331
+ };
332
+ 'PresentCodeRedemptionSheet.Response': {
333
+ success: true;
334
+ };
335
+ 'ReportTransaction.Request': {
336
+ method: 'report_transaction';
337
+ transaction_id: string;
338
+ variation_id?: string;
339
+ };
340
+ 'ReportTransaction.Response': OneOf<[{
341
+ error: components['defs']['AdaptyError'];
342
+ }, {
343
+ success: true;
344
+ }]>;
345
+ 'RestorePurchases.Request': {
346
+ method: 'restore_purchases';
347
+ };
348
+ 'RestorePurchases.Response': OneOf<[{
349
+ error: components['defs']['AdaptyError'];
350
+ }, {
351
+ success: components['defs']['AdaptyProfile'];
352
+ }]>;
353
+ 'GetSDKVersion.Request': {
354
+ method: 'get_sdk_version';
355
+ };
356
+ 'GetSDKVersion.Response': {
357
+ success: string;
358
+ };
359
+ 'GetCurrentInstallationStatus.Request': {
360
+ method: 'get_current_installation_status';
361
+ };
362
+ 'GetCurrentInstallationStatus.Response': OneOf<[{
363
+ error: components['defs']['AdaptyError'];
364
+ }, {
365
+ success: components['defs']['AdaptyInstallationStatus'];
366
+ }]>;
367
+ 'SetFallback.Request': {
368
+ method: 'set_fallback';
369
+ } & OneOf<[{
370
+ asset_id: string;
371
+ }, {
372
+ path: string;
373
+ }]>;
374
+ 'SetFallback.Response': OneOf<[{
375
+ error: components['defs']['AdaptyError'];
376
+ }, {
377
+ success: true;
378
+ }]>;
379
+ 'SetIntegrationIdentifier.Request': {
380
+ method: 'set_integration_identifiers';
381
+ key_values: Record<string, string>;
382
+ };
383
+ 'SetIntegrationIdentifier.Response': OneOf<[{
384
+ error: components['defs']['AdaptyError'];
385
+ }, {
386
+ success: true;
387
+ }]>;
388
+ 'UpdateAttributionData.Request': {
389
+ method: 'update_attribution_data';
390
+ attribution: string;
391
+ source: string;
392
+ };
393
+ 'UpdateAttributionData.Response': OneOf<[{
394
+ error: components['defs']['AdaptyError'];
395
+ }, {
396
+ success: true;
397
+ }]>;
398
+ 'UpdateCollectingRefundDataConsent.Request': {
399
+ method: 'update_collecting_refund_data_consent';
400
+ consent: boolean;
401
+ };
402
+ 'UpdateCollectingRefundDataConsent.Response': OneOf<[{
403
+ error: components['defs']['AdaptyError'];
404
+ }, {
405
+ success: true;
406
+ }]>;
407
+ 'UpdateProfile.Request': {
408
+ method: 'update_profile';
409
+ params: components['defs']['AdaptyProfileParameters'];
410
+ };
411
+ 'UpdateProfile.Response': OneOf<[{
412
+ error: components['defs']['AdaptyError'];
413
+ }, {
414
+ success: true;
415
+ }]>;
416
+ 'UpdateRefundPreference.Request': {
417
+ method: 'update_refund_preference';
418
+ refund_preference: components['defs']['AdaptyRefundPreference'];
419
+ };
420
+ 'UpdateRefundPreference.Response': OneOf<[{
421
+ error: components['defs']['AdaptyError'];
422
+ }, {
423
+ success: true;
424
+ }]>;
425
+ };
426
+ events: {
427
+ 'Event.DidLoadLatestProfile': {
428
+ id: 'did_load_latest_profile';
429
+ profile: components['defs']['AdaptyProfile'];
430
+ };
431
+ 'Event.OnInstallationDetailsSuccess': {
432
+ id: 'on_installation_details_success';
433
+ details: components['defs']['AdaptyInstallationDetails'];
434
+ };
435
+ 'Event.OnInstallationDetailsFail': {
436
+ id: 'on_installation_details_fail';
437
+ error: components['defs']['AdaptyError'];
438
+ };
439
+ 'PaywallViewEvent.DidAppear': {
440
+ id: 'paywall_view_did_appear';
441
+ view: components['defs']['AdaptyUI.PaywallView'];
442
+ };
443
+ 'PaywallViewEvent.DidDisappear': {
444
+ id: 'paywall_view_did_disappear';
445
+ view: components['defs']['AdaptyUI.PaywallView'];
446
+ };
447
+ 'PaywallViewEvent.DidUserAction': {
448
+ id: 'paywall_view_did_perform_action';
449
+ view: components['defs']['AdaptyUI.PaywallView'];
450
+ action: components['defs']['AdaptyUI.UserAction'];
451
+ };
452
+ 'PaywallViewEvent.DidSelectProduct': {
453
+ id: 'paywall_view_did_select_product';
454
+ view: components['defs']['AdaptyUI.PaywallView'];
455
+ product_id: string;
456
+ };
457
+ 'PaywallViewEvent.WillPurchase': {
458
+ id: 'paywall_view_did_start_purchase';
459
+ view: components['defs']['AdaptyUI.PaywallView'];
460
+ product: components['defs']['AdaptyPaywallProduct.Response'];
461
+ };
462
+ 'PaywallViewEvent.DidPurchase': {
463
+ id: 'paywall_view_did_finish_purchase';
464
+ view: components['defs']['AdaptyUI.PaywallView'];
465
+ product: components['defs']['AdaptyPaywallProduct.Response'];
466
+ purchased_result: components['defs']['AdaptyPurchaseResult'];
467
+ };
468
+ 'PaywallViewEvent.DidFailPurchase': {
469
+ id: 'paywall_view_did_fail_purchase';
470
+ view: components['defs']['AdaptyUI.PaywallView'];
471
+ product: components['defs']['AdaptyPaywallProduct.Response'];
472
+ error: components['defs']['AdaptyError'];
473
+ };
474
+ 'PaywallViewEvent.WillRestorePurchase': {
475
+ id: 'paywall_view_did_start_restore';
476
+ view: components['defs']['AdaptyUI.PaywallView'];
477
+ };
478
+ 'PaywallViewEvent.DidRestorePurchase': {
479
+ id: 'paywall_view_did_finish_restore';
480
+ view: components['defs']['AdaptyUI.PaywallView'];
481
+ profile: components['defs']['AdaptyProfile'];
482
+ };
483
+ 'PaywallViewEvent.DidFailRestorePurchase': {
484
+ id: 'paywall_view_did_fail_restore';
485
+ view: components['defs']['AdaptyUI.PaywallView'];
486
+ error: components['defs']['AdaptyError'];
487
+ };
488
+ 'PaywallViewEvent.DidFailRendering': {
489
+ id: 'paywall_view_did_fail_rendering';
490
+ view: components['defs']['AdaptyUI.PaywallView'];
491
+ error: components['defs']['AdaptyError'];
492
+ };
493
+ 'PaywallViewEvent.DidFailLoadingProducts': {
494
+ id: 'paywall_view_did_fail_loading_products';
495
+ view: components['defs']['AdaptyUI.PaywallView'];
496
+ error: components['defs']['AdaptyError'];
497
+ };
498
+ 'PaywallViewEvent.DidFinishWebPaymentNavigation': {
499
+ id: 'paywall_view_did_finish_web_payment_navigation';
500
+ view: components['defs']['AdaptyUI.PaywallView'];
501
+ product?: components['defs']['AdaptyPaywallProduct.Response'];
502
+ error?: components['defs']['AdaptyError'];
503
+ };
504
+ 'OnboardingViewEvent.DidFailWithError': {
505
+ id: 'onboarding_did_fail_with_error';
506
+ view: components['defs']['AdaptyUI.OnboardingView'];
507
+ error: components['defs']['AdaptyError'];
508
+ };
509
+ 'OnboardingViewEvent.OnAnalyticsEvent': {
510
+ id: 'onboarding_on_analytics_action';
511
+ view: components['defs']['AdaptyUI.OnboardingView'];
512
+ meta: components['defs']['AdaptyUI.OnboardingMeta'];
513
+ event: {
514
+ name: 'onboarding_started' | 'screen_presented' | 'screen_completed' | 'second_screen_presented' | 'registration_screen_presented' | 'products_screen_presented' | 'user_email_collected' | 'onboarding_completed' | string;
515
+ element_id?: string;
516
+ reply?: string;
517
+ };
518
+ };
519
+ 'OnboardingViewEvent.DidFinishLoading': {
520
+ id: 'onboarding_did_finish_loading';
521
+ view: components['defs']['AdaptyUI.OnboardingView'];
522
+ meta: components['defs']['AdaptyUI.OnboardingMeta'];
523
+ };
524
+ 'OnboardingViewEvent.OnCloseAction': {
525
+ id: 'onboarding_on_close_action';
526
+ view: components['defs']['AdaptyUI.OnboardingView'];
527
+ meta: components['defs']['AdaptyUI.OnboardingMeta'];
528
+ action_id: string;
529
+ };
530
+ 'OnboardingViewEvent.OnCustomAction': {
531
+ id: 'onboarding_on_custom_action';
532
+ view: components['defs']['AdaptyUI.OnboardingView'];
533
+ meta: components['defs']['AdaptyUI.OnboardingMeta'];
534
+ action_id: string;
535
+ };
536
+ 'OnboardingViewEvent.OnPaywallAction': {
537
+ id: 'onboarding_on_paywall_action';
538
+ view: components['defs']['AdaptyUI.OnboardingView'];
539
+ meta: components['defs']['AdaptyUI.OnboardingMeta'];
540
+ action_id: string;
541
+ };
542
+ 'OnboardingViewEvent.OnStateUpdatedAction': {
543
+ id: 'onboarding_on_state_updated_action';
544
+ view: components['defs']['AdaptyUI.OnboardingView'];
545
+ meta: components['defs']['AdaptyUI.OnboardingMeta'];
546
+ action: {
547
+ element_id: string;
548
+ element_type: 'select';
549
+ value: components['defs']['AdaptyUI.OnboardingsStateParams'];
550
+ } | {
551
+ element_id: string;
552
+ element_type: 'multi_select';
553
+ value: components['defs']['AdaptyUI.OnboardingsStateParams'][];
554
+ } | {
555
+ element_id: string;
556
+ element_type: 'input';
557
+ value: {
558
+ type: 'text' | 'email';
559
+ value: string;
560
+ } | {
561
+ type: 'number';
562
+ value: number;
563
+ };
564
+ } | {
565
+ element_id: string;
566
+ element_type: 'date_picker';
567
+ value: {
568
+ day?: number;
569
+ month?: number;
570
+ year?: number;
571
+ };
572
+ };
573
+ };
574
+ };
575
+ defs: {
576
+ AdaptyError: {
577
+ adapty_code: number;
578
+ message: string;
579
+ detail?: string;
580
+ };
581
+ 'AdaptyLog.Level': 'error' | 'warn' | 'info' | 'verbose' | 'debug';
582
+ AdaptyLocale: string;
583
+ Date: string;
584
+ AdaptyConfiguration: {
585
+ api_key: string;
586
+ customer_user_id?: string;
587
+ customer_identity_parameters?: components['defs']['CustomerIdentityParameters'];
588
+ observer_mode?: boolean;
589
+ apple_idfa_collection_disabled?: boolean;
590
+ google_adid_collection_disabled?: boolean;
591
+ google_enable_pending_prepaid_plans?: boolean;
592
+ google_local_access_level_allowed?: boolean;
593
+ ip_address_collection_disabled?: boolean;
594
+ clear_data_on_backup?: boolean;
595
+ server_cluster?: 'default' | 'eu' | 'cn';
596
+ backend_proxy_host?: string;
597
+ backend_proxy_port?: number;
598
+ log_level?: components['defs']['AdaptyLog.Level'];
599
+ cross_platform_sdk_name?: string;
600
+ cross_platform_sdk_version?: string;
601
+ activate_ui?: boolean;
602
+ media_cache?: {
603
+ memory_storage_total_cost_limit?: number;
604
+ memory_storage_count_limit?: number;
605
+ disk_storage_size_limit?: number;
606
+ };
607
+ };
608
+ CustomerIdentityParameters: {
609
+ app_account_token?: string;
610
+ obfuscated_account_id?: string;
611
+ obfuscated_profile_id?: string;
612
+ };
613
+ 'AdaptyPaywallProduct.Request': {
614
+ vendor_product_id: string;
615
+ adapty_product_id: string;
616
+ access_level_id: string;
617
+ product_type: string;
618
+ paywall_product_index: number;
619
+ subscription_offer_identifier?: components['defs']['AdaptySubscriptionOffer.Identifier'];
620
+ paywall_variation_id: string;
621
+ paywall_ab_test_name: string;
622
+ paywall_name: string;
623
+ web_purchase_url?: string;
624
+ payload_data?: string;
625
+ };
626
+ 'AdaptyPaywallProduct.Response': {
627
+ vendor_product_id: string;
628
+ adapty_product_id: string;
629
+ access_level_id: string;
630
+ product_type: string;
631
+ paywall_product_index: number;
632
+ paywall_variation_id: string;
633
+ paywall_ab_test_name: string;
634
+ paywall_name: string;
635
+ web_purchase_url?: string;
636
+ localized_description: string;
637
+ localized_title: string;
638
+ is_family_shareable?: boolean;
639
+ region_code?: string;
640
+ price: components['defs']['AdaptyPrice'];
641
+ subscription?: components['defs']['AdaptyPaywallProduct.Subscription'];
642
+ payload_data?: string;
643
+ };
644
+ AdaptyPrice: {
645
+ amount: number;
646
+ currency_code?: string;
647
+ currency_symbol?: string;
648
+ localized_string?: string;
649
+ };
650
+ 'AdaptyPaywallProduct.Subscription': {
651
+ group_identifier?: string;
652
+ period: components['defs']['AdaptySubscriptionPeriod'];
653
+ localized_period?: string;
654
+ offer?: components['defs']['AdaptySubscriptionOffer'];
655
+ renewal_type?: 'prepaid' | 'autorenewable';
656
+ base_plan_id?: string;
657
+ };
658
+ AdaptySubscriptionOffer: {
659
+ offer_identifier: components['defs']['AdaptySubscriptionOffer.Identifier'];
660
+ phases: components['defs']['AdaptySubscriptionOffer.Phase'][];
661
+ offer_tags?: string[];
662
+ };
663
+ 'AdaptySubscriptionOffer.Phase': {
664
+ price: components['defs']['AdaptyPrice'];
665
+ subscription_period: components['defs']['AdaptySubscriptionPeriod'];
666
+ number_of_periods: number;
667
+ payment_mode: components['defs']['AdaptySubscriptionOffer.PaymentMode'];
668
+ localized_subscription_period?: string;
669
+ localized_number_of_periods?: string;
670
+ };
671
+ AdaptyPlacement: {
672
+ developer_id: string;
673
+ ab_test_name: string;
674
+ audience_name: string;
675
+ revision: number;
676
+ is_tracking_purchases?: boolean;
677
+ placement_audience_version_id: string;
678
+ };
679
+ AdaptyPaywall: {
680
+ placement: components['defs']['AdaptyPlacement'];
681
+ paywall_id: string;
682
+ paywall_name: string;
683
+ variation_id: string;
684
+ products: components['defs']['AdaptyPaywall.ProductReference'][];
685
+ response_created_at: number;
686
+ remote_config?: components['defs']['AdaptyRemoteConfig'];
687
+ paywall_builder?: components['defs']['AdaptyPaywall.ViewConfiguration'];
688
+ web_purchase_url?: string;
689
+ payload_data?: string;
690
+ request_locale: components['defs']['AdaptyLocale'];
691
+ };
692
+ AdaptyOnboarding: {
693
+ placement: components['defs']['AdaptyPlacement'];
694
+ onboarding_id: string;
695
+ onboarding_name: string;
696
+ variation_id: string;
697
+ response_created_at: number;
698
+ remote_config?: components['defs']['AdaptyRemoteConfig'];
699
+ onboarding_builder?: {
700
+ config_url: string;
701
+ };
702
+ payload_data?: string;
703
+ request_locale: components['defs']['AdaptyLocale'];
704
+ };
705
+ AdaptyPlacementFetchPolicy: OneOf<[{
706
+ type: 'reload_revalidating_cache_data' | 'return_cache_data_else_load';
707
+ }, {
708
+ type: 'return_cache_data_if_not_expired_else_load';
709
+ max_age: number;
710
+ }]>;
711
+ AdaptyRemoteConfig: {
712
+ lang: components['defs']['AdaptyLocale'];
713
+ data: string;
714
+ };
715
+ 'AdaptyPaywall.ProductReference': {
716
+ vendor_product_id: string;
717
+ adapty_product_id: string;
718
+ access_level_id: string;
719
+ product_type: string;
720
+ promotional_offer_id?: string;
721
+ win_back_offer_id?: string;
722
+ base_plan_id?: string;
723
+ offer_id?: string;
724
+ };
725
+ 'AdaptyPaywall.ViewConfiguration': {
726
+ paywall_builder_id: string;
727
+ lang: components['defs']['AdaptyLocale'];
728
+ };
729
+ AdaptySubscriptionPeriod: {
730
+ unit: components['defs']['AdaptySubscriptionPeriod.Unit'];
731
+ number_of_units: number;
732
+ };
733
+ 'AdaptySubscriptionPeriod.Unit': 'day' | 'week' | 'month' | 'year' | 'unknown';
734
+ AdaptyProfile: {
735
+ profile_id: string;
736
+ customer_user_id?: string;
737
+ segment_hash: string;
738
+ is_test_user: boolean;
739
+ timestamp: number;
740
+ custom_attributes?: components['defs']['AdaptyProfile.CustomAttributes'];
741
+ paid_access_levels?: {
742
+ [key: string]: components['defs']['AdaptyProfile.AccessLevel'];
743
+ };
744
+ subscriptions?: {
745
+ [key: string]: components['defs']['AdaptyProfile.Subscription'];
746
+ };
747
+ non_subscriptions?: {
748
+ [key: string]: components['defs']['AdaptyProfile.NonSubscription'][];
749
+ };
750
+ };
751
+ 'AdaptyProfile.AccessLevel': {
752
+ id: string;
753
+ is_active: boolean;
754
+ vendor_product_id: string;
755
+ store: string;
756
+ activated_at: components['defs']['Date'];
757
+ renewed_at?: components['defs']['Date'];
758
+ expires_at?: components['defs']['Date'];
759
+ is_lifetime: boolean;
760
+ active_introductory_offer_type?: string;
761
+ active_promotional_offer_type?: string;
762
+ active_promotional_offer_id?: string;
763
+ offer_id?: string;
764
+ will_renew: boolean;
765
+ is_in_grace_period: boolean;
766
+ unsubscribed_at?: components['defs']['Date'];
767
+ billing_issue_detected_at?: components['defs']['Date'];
768
+ starts_at?: components['defs']['Date'];
769
+ cancellation_reason?: string;
770
+ is_refund: boolean;
771
+ };
772
+ 'AdaptyProfile.NonSubscription': {
773
+ purchase_id: string;
774
+ store: string;
775
+ vendor_product_id: string;
776
+ vendor_transaction_id?: string;
777
+ purchased_at: components['defs']['Date'];
778
+ is_sandbox: boolean;
779
+ is_refund: boolean;
780
+ is_consumable: boolean;
781
+ };
782
+ 'AdaptyProfile.Subscription': {
783
+ store: string;
784
+ vendor_product_id: string;
785
+ vendor_transaction_id: string;
786
+ vendor_original_transaction_id: string;
787
+ is_active: boolean;
788
+ is_lifetime: boolean;
789
+ activated_at: components['defs']['Date'];
790
+ renewed_at?: components['defs']['Date'];
791
+ expires_at?: components['defs']['Date'];
792
+ starts_at?: components['defs']['Date'];
793
+ unsubscribed_at?: components['defs']['Date'];
794
+ billing_issue_detected_at?: components['defs']['Date'];
795
+ is_in_grace_period: boolean;
796
+ is_refund: boolean;
797
+ is_sandbox: boolean;
798
+ will_renew: boolean;
799
+ active_introductory_offer_type?: string;
800
+ active_promotional_offer_type?: string;
801
+ active_promotional_offer_id?: string;
802
+ offer_id?: string;
803
+ cancellation_reason?: string;
804
+ };
805
+ 'AdaptyProfile.CustomAttributes': {
806
+ [key: string]: string | number;
807
+ };
808
+ 'AdaptyProfile.Gender': 'f' | 'm' | 'o';
809
+ AdaptyProfileParameters: {
810
+ first_name?: string;
811
+ last_name?: string;
812
+ gender?: components['defs']['AdaptyProfile.Gender'];
813
+ birthday?: string;
814
+ email?: string;
815
+ phone_number?: string;
816
+ att_status?: number;
817
+ custom_attributes?: components['defs']['AdaptyProfile.CustomAttributes'];
818
+ analytics_disabled?: boolean;
819
+ };
820
+ 'AdaptySubscriptionOffer.Identifier': OneOf<[{
821
+ type: 'introductory';
822
+ id?: string;
823
+ }, {
824
+ type: 'promotional' | 'win_back';
825
+ id: string;
826
+ }]>;
827
+ 'AdaptySubscriptionOffer.PaymentMode': 'pay_as_you_go' | 'pay_up_front' | 'free_trial' | 'unknown';
828
+ AdaptyPurchaseResult: OneOf<[{
829
+ type: 'pending' | 'user_cancelled';
830
+ }, {
831
+ type: 'success';
832
+ profile: components['defs']['AdaptyProfile'];
833
+ apple_jws_transaction?: string;
834
+ google_purchase_token?: string;
835
+ }]>;
836
+ 'AdaptyUI.CustomAssets': (components['assets']['Color'] | components['assets']['ColorGradient'] | components['assets']['Image'] | components['assets']['Video'])[];
837
+ 'AdaptyUI.PaywallView': {
838
+ id: string;
839
+ placement_id: string;
840
+ variation_id: string;
841
+ };
842
+ 'AdaptyUI.OnboardingView': {
843
+ id: string;
844
+ placement_id: string;
845
+ variation_id: string;
846
+ };
847
+ 'AdaptyUI.OnboardingMeta': {
848
+ onboarding_id: string;
849
+ screen_cid: string;
850
+ screen_index: number;
851
+ total_screens: number;
852
+ };
853
+ 'AdaptyUI.OnboardingsStateParams': {
854
+ id: string;
855
+ value: string;
856
+ label: string;
857
+ };
858
+ 'AdaptyUI.UserAction': OneOf<[{
859
+ type: 'close' | 'system_back';
860
+ }, {
861
+ type: 'open_url' | 'custom';
862
+ value: string;
863
+ }]>;
864
+ 'AdaptyUI.CustomTagsValues': {
865
+ [key: string]: string;
866
+ };
867
+ 'AdaptyUI.CustomTimersValues': {
868
+ [key: string]: components['defs']['Date'];
869
+ };
870
+ 'AdaptyUI.ProductPurchaseParameters': {
871
+ [key: string]: components['defs']['AdaptyPurchaseParameters'];
872
+ };
873
+ 'AdaptyUI.IOSPresentationStyle': 'full_screen' | 'page_sheet';
874
+ AdaptyWebPresentation: 'browser_out_app' | 'browser_in_app';
875
+ 'AdaptyUI.DialogConfiguration': {
876
+ default_action_title: string;
877
+ secondary_action_title?: string;
878
+ title?: string;
879
+ content?: string;
880
+ };
881
+ 'AdaptyUI.DialogActionType': 'primary' | 'secondary';
882
+ AdaptyPurchaseParameters: {
883
+ subscription_update_params?: components['defs']['AdaptySubscriptionUpdateParameters'];
884
+ is_offer_personalized?: boolean;
885
+ };
886
+ AdaptySubscriptionUpdateParameters: {
887
+ old_sub_vendor_product_id: string;
888
+ replacement_mode: 'charge_full_price' | 'deferred' | 'without_proration' | 'charge_prorated_price' | 'with_time_proration';
889
+ };
890
+ AdaptyRefundPreference: 'no_preference' | 'grant' | 'decline';
891
+ AdaptyInstallationStatus: OneOf<[{
892
+ status: 'not_available' | 'not_determined';
893
+ }, {
894
+ status: 'determined';
895
+ details: components['defs']['AdaptyInstallationDetails'];
896
+ }]>;
897
+ AdaptyInstallationDetails: {
898
+ install_id?: string;
899
+ install_time: components['defs']['Date'];
900
+ app_launch_count: number;
901
+ payload?: string;
902
+ };
903
+ };
904
+ assets: {
905
+ Color: {
906
+ id: string;
907
+ type: 'color';
908
+ value: string; // Hex string: ^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$
909
+ };
910
+ ColorGradient: {
911
+ id: string;
912
+ type: 'linear-gradient';
913
+ values: {
914
+ color: string;
915
+ p: number;
916
+ }[];
917
+ points: {
918
+ x0: number;
919
+ y0: number;
920
+ x1: number;
921
+ y1: number;
922
+ };
923
+ };
924
+ Image: OneOf<[{
925
+ id: string;
926
+ type: 'image';
927
+ value: string; // base64
928
+ }, {
929
+ id: string;
930
+ type: 'image';
931
+ asset_id: string;
932
+ }, {
933
+ id: string;
934
+ type: 'image';
935
+ path: string;
936
+ }]>;
937
+ Video: OneOf<[{
938
+ id: string;
939
+ type: 'video';
940
+ asset_id: string;
941
+ }, {
942
+ id: string;
943
+ type: 'video';
944
+ path: string;
945
+ }]>;
946
+ };
947
+ } //#endregion
948
+ //#region src/types/schema.d.ts
949
+ type Req = components['requests'];
950
+ type Def = components['defs'];
951
+ type Event = components['events'];
952
+
953
+ //#endregion
954
+ //#region src/types/index.d.ts
955
+ declare const VendorStore: Readonly<{
956
+ AppStore: "app_store";
957
+ PlayStore: "play_store";
958
+ Adapty: "adapty";
959
+ }>;
960
+ type VendorStore = (typeof VendorStore)[keyof typeof VendorStore];
961
+ declare const OfferType: Readonly<{
962
+ FreeTrial: "free_trial";
963
+ PayAsYouGo: "pay_as_you_go";
964
+ PayUpFront: "pay_up_front";
965
+ }>;
966
+ type OfferType = (typeof OfferType)[keyof typeof OfferType];
967
+ declare const CancellationReason: Readonly<{
968
+ VolountarilyCancelled: "voluntarily_cancelled";
969
+ BillingError: "billing_error";
970
+ Refund: "refund";
971
+ PriceIncrease: "price_increase";
972
+ ProductWasNotAvailable: "product_was_not_available";
973
+ Unknown: "unknown";
974
+ }>;
975
+ type CancellationReason = (typeof CancellationReason)[keyof typeof CancellationReason];
976
+ declare const Gender: Readonly<{
977
+ Female: "f";
978
+ Male: "m";
979
+ Other: "o";
980
+ }>;
981
+ type Gender = (typeof Gender)[keyof typeof Gender];
982
+ declare const AppTrackingTransparencyStatus: Readonly<{
983
+ NotDetermined: 0;
984
+ Restricted: 1;
985
+ Denied: 2;
986
+ Authorized: 3;
987
+ Unknown: 4;
988
+ }>;
989
+ type AppTrackingTransparencyStatus = (typeof AppTrackingTransparencyStatus)[keyof typeof AppTrackingTransparencyStatus];
990
+ declare const ProductPeriod: Readonly<{
991
+ Day: "day";
992
+ Week: "week";
993
+ Month: "month";
994
+ Year: "year";
995
+ }>;
996
+ type ProductPeriod = (typeof ProductPeriod)[keyof typeof ProductPeriod];
997
+ interface AdaptyPrice {
998
+ /**
999
+ * Price as number
1000
+ */
1001
+ amount: number;
1002
+ /**
1003
+ * The currency code of the locale
1004
+ * used to format the price of the product.
1005
+ * The ISO 4217 (USD, EUR).
1006
+ */
1007
+ currencyCode?: string;
1008
+ /**
1009
+ * The currency symbol of the locale
1010
+ * used to format the price of the product.
1011
+ * ($, €).
1012
+ */
1013
+ currencySymbol?: string;
1014
+ /**
1015
+ * A price’s language is determined
1016
+ * by the preferred language set on the device.
1017
+ * On Android, the formatted price from Google Play as is.
1018
+ */
1019
+ localizedString?: string;
1020
+ }
1021
+ /**
1022
+ * Describes an object that represents a paywall.
1023
+ * Used in {@link Adapty.getPaywall} method.
1024
+ * @public
1025
+ */
1026
+ interface AdaptyPaywall {
1027
+ readonly placement: AdaptyPlacement;
1028
+ /**
1029
+ * If `true`, it is possible to fetch the view object
1030
+ * and use it with AdaptyUI library.
1031
+ * @readonly
1032
+ */
1033
+ readonly hasViewConfiguration: boolean;
1034
+ /**
1035
+ * A paywall name.
1036
+ * @readonly
1037
+ */
1038
+ readonly name: string;
1039
+ /**
1040
+ * A remote config configured in Adapty Dashboard for this paywall.
1041
+ * @readonly
1042
+ */
1043
+ readonly remoteConfig?: AdaptyRemoteConfig;
1044
+ /**
1045
+ * An identifier of a variation,
1046
+ * used to attribute purchases to this paywall.
1047
+ * @readonly
1048
+ */
1049
+ readonly variationId: string;
1050
+ /**
1051
+ * Array of initial products info
1052
+ * @readonly
1053
+ * @deprecated Use {@link AdaptyPaywall.productIdentifiers} instead
1054
+ */
1055
+ readonly products: ProductReference[];
1056
+ /**
1057
+ * Array of product identifiers for this paywall
1058
+ * @readonly
1059
+ */
1060
+ readonly productIdentifiers: AdaptyProductIdentifier[];
1061
+ id: string;
1062
+ version?: number;
1063
+ webPurchaseUrl?: string;
1064
+ payloadData?: string;
1065
+ requestLocale: string;
1066
+ paywallBuilder?: AdaptyPaywallBuilder;
1067
+ }
1068
+ interface AdaptyOnboarding {
1069
+ readonly placement: AdaptyPlacement;
1070
+ /**
1071
+ * If `true`, it is possible to fetch the view object
1072
+ * and use it with AdaptyUI library.
1073
+ * @readonly
1074
+ */
1075
+ readonly hasViewConfiguration: boolean;
1076
+ /**
1077
+ * A paywall name.
1078
+ * @readonly
1079
+ */
1080
+ readonly name: string;
1081
+ /**
1082
+ * A remote config configured in Adapty Dashboard for this paywall.
1083
+ * @readonly
1084
+ */
1085
+ readonly remoteConfig?: AdaptyRemoteConfig;
1086
+ /**
1087
+ * An identifier of a variation,
1088
+ * used to attribute purchases to this paywall.
1089
+ * @readonly
1090
+ */
1091
+ readonly variationId: string;
1092
+ id: string;
1093
+ version?: number;
1094
+ payloadData?: string;
1095
+ requestLocale: string;
1096
+ onboardingBuilder?: AdaptyOnboardingBuilder;
1097
+ }
1098
+ interface AdaptyPlacement {
1099
+ /**
1100
+ * Parent A/B test name.
1101
+ * @readonly
1102
+ */
1103
+ readonly abTestName: string;
1104
+ /**
1105
+ * A name of an audience to which the paywall belongs.
1106
+ * @readonly
1107
+ */
1108
+ readonly audienceName: string;
1109
+ /**
1110
+ * ID of a placement configured in Adapty Dashboard.
1111
+ * @readonly
1112
+ */
1113
+ readonly id: string;
1114
+ /**
1115
+ * Current revision (version) of a paywall.
1116
+ * Every change within a paywall creates a new revision.
1117
+ * @readonly
1118
+ */
1119
+ readonly revision: number;
1120
+ isTrackingPurchases?: boolean;
1121
+ audienceVersionId: string;
1122
+ }
1123
+ /**
1124
+ * Describes an object that represents a remote config of a paywall.
1125
+ * @public
1126
+ */
1127
+ interface AdaptyRemoteConfig {
1128
+ /**
1129
+ * Identifier of a paywall locale.
1130
+ * @readonly
1131
+ */
1132
+ readonly lang: string;
1133
+ /**
1134
+ * A custom dictionary configured in Adapty Dashboard for this paywall.
1135
+ * @readonly
1136
+ */
1137
+ readonly data: Record<string, any>;
1138
+ /**
1139
+ * A custom JSON string configured in Adapty Dashboard for this paywall.
1140
+ * @readonly
1141
+ */
1142
+ readonly dataString: string;
1143
+ }
1144
+ interface AdaptyPaywallBuilder {
1145
+ readonly id: string;
1146
+ readonly lang: string;
1147
+ }
1148
+ interface AdaptyOnboardingBuilder {
1149
+ readonly url: string;
1150
+ }
1151
+ type AdaptyPurchaseResult = {
1152
+ type: 'pending' | 'user_cancelled';
1153
+ } | {
1154
+ type: 'success';
1155
+ profile: AdaptyProfile;
1156
+ ios?: {
1157
+ jwsTransaction?: string;
1158
+ };
1159
+ android?: {
1160
+ purchaseToken?: string;
1161
+ };
1162
+ };
1163
+ /**
1164
+ * Interface representing a user profile in Adapty,
1165
+ * including details about the user's subscriptions and consumable products.
1166
+ * @public
1167
+ */
1168
+ interface AdaptyProfile {
1169
+ /**
1170
+ * Object that maps access level identifiers (configured by you in Adapty Dashboard)
1171
+ * to the corresponding access level details. The value can be `null`
1172
+ * if the user does not have any access levels.
1173
+ * @readonly
1174
+ */
1175
+ readonly accessLevels?: Record<string, AdaptyAccessLevel>;
1176
+ /**
1177
+ * Object representing custom attributes set for the user using
1178
+ * the {@link Adapty.updateProfile} method.
1179
+ * @readonly
1180
+ */
1181
+ readonly customAttributes?: Record<string, any>;
1182
+ /**
1183
+ * The identifier for a user in your system.
1184
+ * @readonly
1185
+ */
1186
+ readonly customerUserId?: string;
1187
+ /**
1188
+ * Object that maps product ids from the store to an array of
1189
+ * information about the user's non-subscription purchases.
1190
+ * The value can be `null` if the user does not have any purchases.
1191
+ * @readonly
1192
+ */
1193
+ readonly nonSubscriptions?: Record<string, AdaptyNonSubscription[]>;
1194
+ /**
1195
+ * The identifier for a user in Adapty.
1196
+ */
1197
+ readonly profileId: string;
1198
+ /**
1199
+ * Object that maps product ids from a store to
1200
+ * information about the user's subscriptions.
1201
+ * The value can be `null` if the user does not have any subscriptions.
1202
+ * @readonly
1203
+ */
1204
+ readonly subscriptions?: Record<string, AdaptySubscription>;
1205
+ }
1206
+ /**
1207
+ * Interface representing access level details of a user.
1208
+ * @public
1209
+ */
1210
+ interface AdaptyAccessLevel {
1211
+ /**
1212
+ * The date and time when the access level was activated.
1213
+ * @readonly
1214
+ */
1215
+ readonly activatedAt: Date;
1216
+ /**
1217
+ * Type of active introductory offer, if any.
1218
+ * @readonly
1219
+ */
1220
+ readonly activeIntroductoryOfferType?: OfferType;
1221
+ /**
1222
+ * Identifier of the active promotional offer, if any.
1223
+ * @readonly
1224
+ */
1225
+ readonly activePromotionalOfferId?: string;
1226
+ /**
1227
+ * Type of the active promotional offer, if any.
1228
+ * @readonly
1229
+ */
1230
+ readonly activePromotionalOfferType?: OfferType;
1231
+ /**
1232
+ * The date and time when a billing issue was detected.
1233
+ * @readonly
1234
+ */
1235
+ readonly billingIssueDetectedAt?: Date;
1236
+ /**
1237
+ * The reason for the cancellation of the subscription.
1238
+ * @readonly
1239
+ */
1240
+ readonly cancellationReason?: CancellationReason;
1241
+ /**
1242
+ * The expiration date of the access level, if applicable.
1243
+ * @readonly
1244
+ */
1245
+ readonly expiresAt?: Date;
1246
+ /**
1247
+ * Unique identifier of the access level
1248
+ * configured by you in Adapty Dashboard.
1249
+ * @readonly
1250
+ */
1251
+ readonly id: string;
1252
+ /**
1253
+ * Flag indicating whether the access level is currently active.
1254
+ * @readonly
1255
+ */
1256
+ readonly isActive: boolean;
1257
+ /**
1258
+ * Flag indicating whether this auto-renewable subscription is in the grace period.
1259
+ * @readonly
1260
+ */
1261
+ readonly isInGracePeriod: boolean;
1262
+ /**
1263
+ * Flag indicating whether this access level is active for a lifetime.
1264
+ * @readonly
1265
+ */
1266
+ readonly isLifetime: boolean;
1267
+ /**
1268
+ * Flag indicating whether this purchase was refunded.
1269
+ * @readonly
1270
+ */
1271
+ readonly isRefund: boolean;
1272
+ /**
1273
+ * The date and time when the access level was renewed.
1274
+ * @readonly
1275
+ */
1276
+ readonly renewedAt?: Date;
1277
+ /**
1278
+ * The start date of this access level.
1279
+ * @readonly
1280
+ */
1281
+ readonly startsAt?: Date;
1282
+ /**
1283
+ * The store where the purchase that unlocked this access level was made.
1284
+ * @readonly
1285
+ */
1286
+ readonly store: VendorStore;
1287
+ /**
1288
+ * The date and time when the auto-renewable subscription was cancelled.
1289
+ * @readonly
1290
+ */
1291
+ readonly unsubscribedAt?: Date;
1292
+ /**
1293
+ * The identifier of the product in the store that unlocked this access level.
1294
+ * @readonly
1295
+ */
1296
+ readonly vendorProductId: string;
1297
+ /**
1298
+ * Flag indicating whether this auto-renewable subscription is set to renew.
1299
+ * @readonly
1300
+ */
1301
+ readonly willRenew: boolean;
1302
+ android?: {
1303
+ offerId?: string;
1304
+ };
1305
+ }
1306
+ /**
1307
+ * Interface representing a consumable or non-subscription purchase made by the user.
1308
+ * @public
1309
+ */
1310
+ interface AdaptyNonSubscription {
1311
+ /**
1312
+ * Flag indicating whether the product is consumable.
1313
+ * @readonly
1314
+ */
1315
+ readonly isConsumable: boolean;
1316
+ /**
1317
+ * Flag indicating whether the purchase was refunded.
1318
+ * @readonly
1319
+ */
1320
+ readonly isRefund: boolean;
1321
+ /**
1322
+ * Flag indicating whether the product was purchased in a sandbox environment.
1323
+ * @readonly
1324
+ */
1325
+ readonly isSandbox: boolean;
1326
+ /**
1327
+ * The date and time when the purchase was made.
1328
+ * @readonly
1329
+ */
1330
+ readonly purchasedAt: Date;
1331
+ /**
1332
+ * The identifier of the product in the store that was purchased.
1333
+ * @readonly
1334
+ */
1335
+ readonly vendorProductId: string;
1336
+ /**
1337
+ * The identifier of the product in the store that was purchased.
1338
+ * @readonly
1339
+ */
1340
+ readonly vendorTransactionId?: string;
1341
+ /**
1342
+ * The store where the purchase was made.
1343
+ * @readonly
1344
+ */
1345
+ readonly store: VendorStore;
1346
+ /**
1347
+ * An identifier of the purchase in Adapty.
1348
+ * You can use it to ensure that you've already processed this purchase
1349
+ * (for example tracking one time products).
1350
+ * @readonly
1351
+ */
1352
+ readonly purchaseId: string;
1353
+ }
1354
+ /**
1355
+ * Interface representing details about a user's subscription.
1356
+ * @public
1357
+ */
1358
+ interface AdaptySubscription {
1359
+ /**
1360
+ * The date and time when the subscription was activated.
1361
+ * @readonly
1362
+ */
1363
+ readonly activatedAt: Date;
1364
+ /**
1365
+ * Type of active introductory offer, if any.
1366
+ * @readonly
1367
+ */
1368
+ readonly activeIntroductoryOfferType?: OfferType;
1369
+ /**
1370
+ * Identifier of the active promotional offer, if any.
1371
+ * @readonly
1372
+ */
1373
+ readonly activePromotionalOfferId?: string;
1374
+ /**
1375
+ * Type of the active promotional offer, if any.
1376
+ * @readonly
1377
+ */
1378
+ readonly activePromotionalOfferType?: OfferType;
1379
+ /**
1380
+ * The date and time when a billing issue was detected.
1381
+ * @readonly
1382
+ */
1383
+ readonly billingIssueDetectedAt?: Date;
1384
+ /**
1385
+ * The reason for the cancellation of the subscription.
1386
+ * @readonly
1387
+ */
1388
+ readonly cancellationReason?: CancellationReason;
1389
+ /**
1390
+ * The expiration date of the subscription, if applicable.
1391
+ * @readonly
1392
+ */
1393
+ readonly expiresAt?: Date;
1394
+ /**
1395
+ * Flag indicating whether the subscription is currently active.
1396
+ * @readonly
1397
+ */
1398
+ readonly isActive: boolean;
1399
+ /**
1400
+ * Flag indicating whether the subscription is in the grace period.
1401
+ * @readonly
1402
+ */
1403
+ readonly isInGracePeriod: boolean;
1404
+ /**
1405
+ * Flag indicating whether the subscription is set for a lifetime.
1406
+ * @readonly
1407
+ */
1408
+ readonly isLifetime: boolean;
1409
+ /**
1410
+ * Flag indicating whether the subscription was refunded.
1411
+ * @readonly
1412
+ */
1413
+ readonly isRefund: boolean;
1414
+ /**
1415
+ * Flag indicating whether the subscription was purchased in a sandbox environment.
1416
+ * @readonly
1417
+ */
1418
+ readonly isSandbox: boolean;
1419
+ /**
1420
+ * The date and time when the subscription was renewed.
1421
+ * @readonly
1422
+ */
1423
+ readonly renewedAt?: Date;
1424
+ /**
1425
+ * The date and time when the subscription starts.
1426
+ * @readonly
1427
+ */
1428
+ readonly startsAt?: Date;
1429
+ /**
1430
+ * The store where the subscription was made.
1431
+ * @readonly
1432
+ */
1433
+ readonly store: VendorStore;
1434
+ /**
1435
+ * The date and time when the subscription was cancelled.
1436
+ * @readonly
1437
+ */
1438
+ readonly unsubscribedAt?: Date;
1439
+ /**
1440
+ * The identifier of the product in the store that was subscribed to.
1441
+ * @readonly
1442
+ */
1443
+ readonly vendorProductId: string;
1444
+ /**
1445
+ * The identifier of the product in the store that was subscribed to.
1446
+ * @readonly
1447
+ */
1448
+ readonly vendorTransactionId: string;
1449
+ /**
1450
+ * An original transaction id of the purchase in a store that unlocked this subscription.
1451
+ * For auto-renewable subscription, this will be an id of the first transaction in this subscription.
1452
+ * @readonly
1453
+ */
1454
+ readonly vendorOriginalTransactionId: string;
1455
+ /**
1456
+ * Flag indicating whether the subscription is set to auto-renew.
1457
+ * @readonly
1458
+ */
1459
+ readonly willRenew: boolean;
1460
+ }
1461
+ /**
1462
+ * Describes an object that represents a product.
1463
+ * Used in {@link Adapty.getPaywallProducts} method and in {@link Adapty.makePurchase} method.
1464
+ * @public
1465
+ */
1466
+ interface AdaptyPaywallProduct {
1467
+ /**
1468
+ * A description of the product.
1469
+ */
1470
+ readonly localizedDescription: string;
1471
+ /**
1472
+ * The region code of the locale used to format the price of the product.
1473
+ * ISO 3166 ALPHA-2 (US, DE)
1474
+ */
1475
+ readonly regionCode?: string;
1476
+ /**
1477
+ * The name of the product.
1478
+ */
1479
+ readonly localizedTitle: string;
1480
+ /**
1481
+ * Same as `abTestName` property of the parent {@link AdaptyPaywall}.
1482
+ */
1483
+ readonly paywallABTestName: string;
1484
+ /**
1485
+ * Same as `name` property of the parent {@link AdaptyPaywall}.
1486
+ */
1487
+ readonly paywallName: string;
1488
+ readonly accessLevelId: string;
1489
+ readonly productType: string;
1490
+ /**
1491
+ * The cost of the product in the local currency
1492
+ */
1493
+ readonly price?: AdaptyPrice;
1494
+ readonly adaptyId: string;
1495
+ /**
1496
+ * Same as `variationId` property of the parent {@link AdaptyPaywall}.
1497
+ */
1498
+ readonly variationId: string;
1499
+ /**
1500
+ * Unique identifier of a product
1501
+ * from App Store Connect or Google Play Console
1502
+ */
1503
+ readonly vendorProductId: string;
1504
+ paywallProductIndex: number;
1505
+ webPurchaseUrl?: string;
1506
+ payloadData?: string;
1507
+ subscription?: AdaptySubscriptionDetails;
1508
+ ios?: {
1509
+ /**
1510
+ * Boolean value that indicates
1511
+ * whether the product is available for family sharing
1512
+ * in App Store Connect.
1513
+ * Will be `false` for iOS version below 14.0 and macOS version below 11.0.
1514
+ * @see {@link https://developer.apple.com/documentation/storekit/skproduct/3564805-isfamilyshareable}
1515
+ */
1516
+ readonly isFamilyShareable: boolean;
1517
+ };
1518
+ }
1519
+ interface AdaptySubscriptionDetails {
1520
+ /**
1521
+ * The period details for products that are subscriptions.
1522
+ * Will be `null` for iOS version below 11.2 and macOS version below 10.14.4.
1523
+ */
1524
+ subscriptionPeriod: AdaptySubscriptionPeriod;
1525
+ /**
1526
+ * The period’s language is determined
1527
+ * by the preferred language set on the device.
1528
+ */
1529
+ localizedSubscriptionPeriod?: string;
1530
+ /**
1531
+ * A subscription offer if available for the auto-renewable subscription.
1532
+ */
1533
+ offer?: AdaptySubscriptionOffer;
1534
+ ios?: {
1535
+ /**
1536
+ * An identifier of the subscription group
1537
+ * to which the subscription belongs.
1538
+ * Will be `null` for iOS version below 12.0 and macOS version below 10.14.
1539
+ */
1540
+ subscriptionGroupIdentifier?: string;
1541
+ };
1542
+ android?: {
1543
+ basePlanId: string;
1544
+ renewalType?: 'prepaid' | 'autorenewable';
1545
+ };
1546
+ }
1547
+ /**
1548
+ * Subscription offer model to products
1549
+ * @see {@link https://doc.adapty.io/docs/rn-api-reference#adaptysubscriptionoffer}
1550
+ */
1551
+ interface AdaptySubscriptionOffer {
1552
+ readonly identifier: AdaptySubscriptionOfferId;
1553
+ phases: AdaptyDiscountPhase[];
1554
+ android?: {
1555
+ offerTags?: string[];
1556
+ };
1557
+ }
1558
+ type AdaptySubscriptionOfferId = {
1559
+ id?: string;
1560
+ type: 'introductory';
1561
+ } | {
1562
+ id: string;
1563
+ type: 'promotional' | 'win_back';
1564
+ };
1565
+ /**
1566
+ * Discount model to products
1567
+ * @see {@link https://doc.adapty.io/docs/rn-api-reference#adaptyproductdiscount}
1568
+ */
1569
+ interface AdaptyDiscountPhase {
1570
+ /**
1571
+ * A formatted number of periods of a discount for a user’s locale.
1572
+ * @readonly
1573
+ */
1574
+ readonly localizedNumberOfPeriods?: string;
1575
+ /**
1576
+ * A formatted subscription period of a discount for a user’s locale.
1577
+ * @readonly
1578
+ */
1579
+ readonly localizedSubscriptionPeriod?: string;
1580
+ /**
1581
+ * A number of periods this product discount is available.
1582
+ * @readonly
1583
+ */
1584
+ readonly numberOfPeriods: number;
1585
+ /**
1586
+ * Discount price of a product in a local currency.
1587
+ * @readonly
1588
+ */
1589
+ readonly price: AdaptyPrice;
1590
+ /**
1591
+ * An information about period for a product discount.
1592
+ * @readonly
1593
+ */
1594
+ readonly subscriptionPeriod: AdaptySubscriptionPeriod;
1595
+ /**
1596
+ * A payment mode for this product discount.
1597
+ * @readonly
1598
+ */
1599
+ readonly paymentMode: OfferType;
1600
+ }
1601
+ /**
1602
+ * An object containing information about a subscription period.
1603
+ * @public
1604
+ */
1605
+ interface AdaptySubscriptionPeriod {
1606
+ /**
1607
+ * A number of period units.
1608
+ * @readonly
1609
+ */
1610
+ readonly numberOfUnits: number;
1611
+ /**
1612
+ * A unit of time that a subscription period is specified in.
1613
+ * @readonly
1614
+ */
1615
+ readonly unit: ProductPeriod;
1616
+ }
1617
+ interface AdaptyProfileParameters {
1618
+ analyticsDisabled?: boolean;
1619
+ codableCustomAttributes?: {
1620
+ [key: string]: any;
1621
+ };
1622
+ appTrackingTransparencyStatus?: AppTrackingTransparencyStatus;
1623
+ firstName?: string;
1624
+ lastName?: string;
1625
+ gender?: Gender;
1626
+ birthday?: string;
1627
+ email?: string;
1628
+ phoneNumber?: string;
1629
+ }
1630
+ interface ProductReference {
1631
+ vendorId: string;
1632
+ adaptyId: string;
1633
+ accessLevelId: string;
1634
+ productType: string;
1635
+ ios?: {
1636
+ promotionalOfferId?: string;
1637
+ winBackOfferId?: string;
1638
+ };
1639
+ android?: {
1640
+ basePlanId?: string;
1641
+ offerId?: string;
1642
+ };
1643
+ }
1644
+ /**
1645
+ * Interface representing a product identifier with vendor and platform-specific information.
1646
+ * @public
1647
+ */
1648
+ interface AdaptyProductIdentifier {
1649
+ /**
1650
+ * The vendor-specific product identifier (e.g., App Store or Google Play product ID).
1651
+ * @readonly
1652
+ */
1653
+ readonly vendorProductId: string;
1654
+ /**
1655
+ * The base plan identifier for Google Play subscriptions (Android only).
1656
+ * @readonly
1657
+ */
1658
+ readonly basePlanId?: string;
1659
+ /**
1660
+ * Internal Adapty product identifier.
1661
+ * @readonly
1662
+ */
1663
+ readonly adaptyProductId: string;
1664
+ }
1665
+ declare const WebPresentation: Readonly<{
1666
+ BrowserOutApp: "browser_out_app";
1667
+ BrowserInApp: "browser_in_app";
1668
+ }>;
1669
+ type WebPresentation = (typeof WebPresentation)[keyof typeof WebPresentation];
1670
+ declare const RefundPreference: Readonly<{
1671
+ NoPreference: "no_preference";
1672
+ Grant: "grant";
1673
+ Decline: "decline";
1674
+ }>;
1675
+ type RefundPreference = (typeof RefundPreference)[keyof typeof RefundPreference];
1676
+ type AdaptyInstallationStatus = {
1677
+ status: 'not_available' | 'not_determined';
1678
+ } | {
1679
+ status: 'determined';
1680
+ details: AdaptyInstallationDetails;
1681
+ };
1682
+ interface AdaptyInstallationDetails {
1683
+ /**
1684
+ * A unique identifier for this installation.
1685
+ * @readonly
1686
+ */
1687
+ readonly installId?: string;
1688
+ /**
1689
+ * The date and time when the app was installed.
1690
+ * @readonly
1691
+ */
1692
+ readonly installTime: Date;
1693
+ /**
1694
+ * The total number of times the app has been launched.
1695
+ * @readonly
1696
+ */
1697
+ readonly appLaunchCount: number;
1698
+ /**
1699
+ * Custom payload data associated with the installation.
1700
+ * @readonly
1701
+ */
1702
+ readonly payload?: string;
1703
+ } //#endregion
1704
+ //#region src/coders/types.d.ts
1705
+
1706
+ //# sourceMappingURL=index.d.ts.map
1707
+ type StrType<T> = T extends string ? 'string' : T extends Date ? 'string' : T extends boolean ? 'boolean' : T extends number ? 'number' : T extends any[] ? 'array' : 'object';
1708
+ interface Converter<Model = unknown, Serialized = any> {
1709
+ type?: 'data' | 'error';
1710
+ decode: (input: Serialized) => Model;
1711
+ encode: (value: Model) => Serialized;
1712
+ }
1713
+ interface PropertyMeta<Model = unknown, Key extends string | number | symbol = string> {
1714
+ converter?: Converter<NonNullable<Model>>;
1715
+ key: Key;
1716
+ required: undefined extends Model ? false : true;
1717
+ type: StrType<Model>;
1718
+ }
1719
+ type Properties<Model extends Record<string, any>, SerializableData = Record<string, unknown>> = { [K in keyof Omit<Required<Model>, 'ios' | 'android'>]: PropertyMeta<Model[K], keyof SerializableData> } & ('ios' extends keyof Model ? {
1720
+ ios: { [K in keyof Required<Required<Model>['ios']>]: PropertyMeta<Required<Model>['ios'][K], keyof SerializableData> };
1721
+ } : {}) & ('android' extends keyof Model ? {
1722
+ android: { [K in keyof Required<Required<Model>['android']>]: PropertyMeta<Required<Model>['android'][K], keyof SerializableData> };
1723
+ } : {});
1724
+
1725
+ //#endregion
1726
+ //#region src/coders/coder.d.ts
1727
+ //# sourceMappingURL=types.d.ts.map
1728
+ declare abstract class Coder<Model extends Record<string, any>, CodableModel extends Partial<Model>, Serializable extends Record<string, any> = Record<string, any>> implements Converter<CodableModel, Serializable> {
1729
+ protected readonly platform: IPlatformAdapter;
1730
+ protected abstract properties: Properties<CodableModel, Serializable>;
1731
+ constructor(platform?: IPlatformAdapter);
1732
+ encode(data: CodableModel): Serializable;
1733
+ decode(data: Serializable): CodableModel;
1734
+ protected isType(value: unknown, type: StrType<any>): boolean;
1735
+ private getNestedValue;
1736
+ private assignNestedValue;
1737
+ private encodeWithProperties;
1738
+ private decodeWithProperties;
1739
+ }
1740
+ declare abstract class SimpleCoder<Model extends Record<string, any>, Serializable extends Record<string, any> = Record<string, any>> extends Coder<Model, Model, Serializable> {}
1741
+
1742
+ //#endregion
1743
+ //#region src/coders/adapty-access-level.d.ts
1744
+ //# sourceMappingURL=coder.d.ts.map
1745
+ type Model$32 = AdaptyAccessLevel;
1746
+ type Serializable$33 = Def['AdaptyProfile.AccessLevel'];
1747
+ declare class AdaptyAccessLevelCoder extends SimpleCoder<Model$32, Serializable$33> {
1748
+ protected properties: Properties<Model$32, Serializable$33>;
1749
+ }
1750
+
1751
+ //#endregion
1752
+ //#region src/types/error.d.ts
1753
+ declare const ErrorCode: Readonly<{
1754
+ /**
1755
+ * System StoreKit codes
1756
+ */
1757
+ 0: "unknown";
1758
+ /**
1759
+ * Client is not allowed to make a request, etc.
1760
+ */
1761
+ 1: "clientInvalid";
1762
+ /**
1763
+ * Invalid purchase identifier, etc.
1764
+ */
1765
+ 3: "paymentInvalid";
1766
+ /**
1767
+ * This device is not allowed to make the payment.
1768
+ */
1769
+ 4: "paymentNotAllowed";
1770
+ /**
1771
+ * Product is not available in the current storefront.
1772
+ */
1773
+ 5: "storeProductNotAvailable";
1774
+ /**
1775
+ * User has not allowed access to cloud service information.
1776
+ */
1777
+ 6: "cloudServicePermissionDenied";
1778
+ /**
1779
+ * The device could not connect to the network.
1780
+ */
1781
+ 7: "cloudServiceNetworkConnectionFailed";
1782
+ /**
1783
+ * User has revoked permission to use this cloud service.
1784
+ */
1785
+ 8: "cloudServiceRevoked";
1786
+ /**
1787
+ * The user needs to acknowledge Apple's privacy policy.
1788
+ */
1789
+ 9: "privacyAcknowledgementRequired";
1790
+ /**
1791
+ * The app is attempting to use SKPayment's requestData property,
1792
+ * but does not have the appropriate entitlement.
1793
+ */
1794
+ 10: "unauthorizedRequestData";
1795
+ /**
1796
+ * The specified subscription offer identifier is not valid.
1797
+ */
1798
+ 11: "invalidOfferIdentifier";
1799
+ /**
1800
+ * The cryptographic signature provided is not valid.
1801
+ */
1802
+ 12: "invalidSignature";
1803
+ /**
1804
+ * One or more parameters from SKPaymentDiscount is missing.
1805
+ */
1806
+ 13: "missingOfferParams";
1807
+ 14: "invalidOfferPrice";
1808
+ /**
1809
+ * Custom Android codes.
1810
+ */
1811
+ 20: "adaptyNotInitialized";
1812
+ 22: "productNotFound";
1813
+ 24: "currentSubscriptionToUpdateNotFoundInHistory";
1814
+ 97: "billingServiceTimeout";
1815
+ 98: "featureNotSupported";
1816
+ 99: "billingServiceDisconnected";
1817
+ 102: "billingServiceUnavailable";
1818
+ 103: "billingUnavailable";
1819
+ 105: "developerError";
1820
+ 106: "billingError";
1821
+ 107: "itemAlreadyOwned";
1822
+ 108: "itemNotOwned";
1823
+ 112: "billingNetworkError";
1824
+ 1000: "noProductIDsFound";
1825
+ 1002: "productRequestFailed";
1826
+ /**
1827
+ * In-App Purchases are not allowed on this device.
1828
+ */
1829
+ 1003: "cantMakePayments";
1830
+ 1004: "noPurchasesToRestore";
1831
+ 1005: "cantReadReceipt";
1832
+ 1006: "productPurchaseFailed";
1833
+ 1010: "refreshReceiptFailed";
1834
+ 1011: "receiveRestoredTransactionsFailed";
1835
+ /**
1836
+ * You need to be authenticated to perform requests.
1837
+ */
1838
+ 2002: "notActivated";
1839
+ 2003: "badRequest";
1840
+ 2004: "serverError";
1841
+ 2005: "networkFailed";
1842
+ 2006: "decodingFailed";
1843
+ 2009: "encodingFailed";
1844
+ 3000: "analyticsDisabled";
1845
+ /**
1846
+ * Wrong parameter was passed.
1847
+ */
1848
+ 3001: "wrongParam";
1849
+ /**
1850
+ * It is not possible to call `.activate` method more than once.
1851
+ */
1852
+ 3005: "activateOnceError";
1853
+ /**
1854
+ * The user profile was changed during the operation.
1855
+ */
1856
+ 3006: "profileWasChanged";
1857
+ 3007: "unsupportedData";
1858
+ 3100: "persistingDataError";
1859
+ 3101: "fetchTimeoutError";
1860
+ 9000: "operationInterrupted";
1861
+ }>;
1862
+ type ErrorCode = keyof typeof ErrorCode;
1863
+ declare function getErrorCode(error: (typeof ErrorCode)[ErrorCode]): ErrorCode | undefined;
1864
+ declare function getErrorPrompt(code: ErrorCode): (typeof ErrorCode)[ErrorCode];
1865
+
1866
+ //#endregion
1867
+ //#region src/adapty-error.d.ts
1868
+ //# sourceMappingURL=error.d.ts.map
1869
+ interface AdaptyErrorInput {
1870
+ adaptyCode: ErrorCode;
1871
+ message: string;
1872
+ detail?: string | undefined;
1873
+ }
1874
+ declare class AdaptyError extends Error {
1875
+ static prefix: string;
1876
+ static middleware?: (error: AdaptyError) => void;
1877
+ adaptyCode: ErrorCode;
1878
+ localizedDescription: string;
1879
+ detail: string | undefined;
1880
+ constructor(input: AdaptyErrorInput);
1881
+ static set onError(callback: (error: AdaptyError) => void);
1882
+ static failedToDecodeNativeError(message: string, error: unknown): AdaptyError;
1883
+ static failedToEncode(message: string): AdaptyError;
1884
+ static failedToDecode(message: string): AdaptyError;
1885
+ private static getMessage;
1886
+ }
1887
+
1888
+ //#endregion
1889
+ //#region src/ui/types.d.ts
1890
+ //# sourceMappingURL=adapty-error.d.ts.map
1891
+ /**
1892
+ * Purchase parameters keyed by AdaptyProductIdentifier objects
1893
+ */
1894
+ type ProductPurchaseParams = Array<{
1895
+ productId: AdaptyProductIdentifier;
1896
+ params: MakePurchaseParamsInput;
1897
+ }>;
1898
+ /**
1899
+ * Hashmap of possible events to their callbacks
1900
+ *
1901
+ * @see {@link https://adapty.io/docs/react-native-handling-events-1 | [DOC] Handling View Events}
1902
+ */
1903
+
1904
+ type AdaptyUiOnboardingMeta = {
1905
+ onboardingId: string;
1906
+ screenClientId: string;
1907
+ screenIndex: number;
1908
+ totalScreens: number;
1909
+ };
1910
+ type AdaptyUiOnboardingStateParams = {
1911
+ id: string;
1912
+ value: string;
1913
+ label: string;
1914
+ };
1915
+ type OnboardingStateUpdatedAction = {
1916
+ elementId: string;
1917
+ elementType: 'select';
1918
+ value: AdaptyUiOnboardingStateParams;
1919
+ } | {
1920
+ elementId: string;
1921
+ elementType: 'multi_select';
1922
+ value: AdaptyUiOnboardingStateParams[];
1923
+ } | {
1924
+ elementId: string;
1925
+ elementType: 'input';
1926
+ value: {
1927
+ type: 'text' | 'email';
1928
+ value: string;
1929
+ } | {
1930
+ type: 'number';
1931
+ value: number;
1932
+ };
1933
+ } | {
1934
+ elementId: string;
1935
+ elementType: 'date_picker';
1936
+ value: {
1937
+ day?: number;
1938
+ month?: number;
1939
+ year?: number;
1940
+ };
1941
+ };
1942
+ /**
1943
+ * Additional options for creating a paywall view
1944
+ *
1945
+ * @see {@link https://docs.adapty.io/docs/paywall-builder-fetching | [DOC] Creating Paywall View}
1946
+ */
1947
+ interface CreatePaywallViewParamsInput {
1948
+ /**
1949
+ * `true` if you want to prefetch products before presenting a paywall view.
1950
+ */
1951
+ prefetchProducts?: boolean;
1952
+ /**
1953
+ * This value limits the timeout (in milliseconds) for this method.
1954
+ */
1955
+ loadTimeoutMs?: number;
1956
+ /**
1957
+ * If you are going to use custom tags functionality, pass an object with tags and corresponding replacement values
1958
+ *
1959
+ * ```
1960
+ * {
1961
+ * 'USERNAME': 'Bruce',
1962
+ * 'CITY': 'Philadelphia'
1963
+ * }
1964
+ * ```
1965
+ */
1966
+ customTags?: Record<string, string>;
1967
+ /**
1968
+ * If you are going to use custom timer functionality, pass an object with timer ids and corresponding dates the timers should end at
1969
+ */
1970
+ customTimers?: Record<string, Date>;
1971
+ customAssets?: Record<string, AdaptyCustomAsset>;
1972
+ productPurchaseParams?: ProductPurchaseParams;
1973
+ }
1974
+ /**
1975
+ * Additional options for creating an onboarding view
1976
+ *
1977
+ * @see {@link https://adapty.io/docs/react-native-get-onboardings | [DOC] Creating Onboarding View}
1978
+ */
1979
+ interface CreateOnboardingViewParamsInput {
1980
+ /**
1981
+ * If you want to change the presentation behavior of external URLs, pass a preferred value.
1982
+ *
1983
+ * @default {@link WebPresentation.BrowserInApp}
1984
+ */
1985
+ externalUrlsPresentation?: WebPresentation;
1986
+ }
1987
+ interface AdaptyUiMediaCache {
1988
+ memoryStorageTotalCostLimit?: number;
1989
+ memoryStorageCountLimit?: number;
1990
+ diskStorageSizeLimit?: number;
1991
+ }
1992
+ interface AdaptyUiDialogConfig {
1993
+ /**
1994
+ * The action title to display as part of the dialog. If you provide two actions,
1995
+ * be sure `primaryAction` cancels the operation and leaves things unchanged.
1996
+ */
1997
+ primaryActionTitle: string;
1998
+ /**
1999
+ * The secondary action title to display as part of the dialog.
2000
+ */
2001
+ secondaryActionTitle?: string;
2002
+ /**
2003
+ * The title of the dialog.
2004
+ */
2005
+ title?: string;
2006
+ /**
2007
+ * Descriptive text that provides additional details about the reason for the dialog.
2008
+ */
2009
+ content?: string;
2010
+ }
2011
+ type AdaptyCustomAsset = AdaptyCustomImageAsset | AdaptyCustomVideoAsset | AdaptyCustomColorAsset | AdaptyCustomGradientAsset;
2012
+ type AdaptyCustomImageAsset = {
2013
+ type: 'image';
2014
+ base64: string;
2015
+ } | {
2016
+ type: 'image';
2017
+ relativeAssetPath: string;
2018
+ } | {
2019
+ type: 'image';
2020
+ fileLocation: FileLocation;
2021
+ };
2022
+ type AdaptyCustomVideoAsset = {
2023
+ type: 'video';
2024
+ relativeAssetPath: string;
2025
+ } | {
2026
+ type: 'video';
2027
+ fileLocation: FileLocation;
2028
+ };
2029
+ type AdaptyCustomColorAsset = {
2030
+ type: 'color';
2031
+ argb: number;
2032
+ } | {
2033
+ type: 'color';
2034
+ rgb: number;
2035
+ } | {
2036
+ type: 'color';
2037
+ rgba: number;
2038
+ };
2039
+ type AdaptyCustomGradientAsset = {
2040
+ type: 'linear-gradient';
2041
+ values: ({
2042
+ p: number;
2043
+ argb: number;
2044
+ } | {
2045
+ p: number;
2046
+ rgb: number;
2047
+ } | {
2048
+ p: number;
2049
+ rgba: number;
2050
+ })[];
2051
+ points?: {
2052
+ x0?: number;
2053
+ y0?: number;
2054
+ x1?: number;
2055
+ y1?: number;
2056
+ };
2057
+ };
2058
+
2059
+ //#endregion
2060
+ //#region src/mock/types.d.ts
2061
+ /**
2062
+ * iOS presentation style for paywall and onboarding views
2063
+ */
2064
+ /**
2065
+ * Mock types placeholder for platform-agnostic code
2066
+ * Full implementation should be provided by the platform SDK
2067
+ */
2068
+ interface AdaptyMockConfig {
2069
+ [key: string]: unknown;
2070
+ }
2071
+
2072
+ //#endregion
2073
+ //#region src/types/inputs.d.ts
2074
+ //# sourceMappingURL=types.d.ts.map
2075
+
2076
+ /**
2077
+ * Log levels for the SDK
2078
+ *
2079
+ * @remarks
2080
+ * Logging is performed on a native side.
2081
+ * So you are expected to watch logs in Xcode or Android Studio.
2082
+ */
2083
+ declare const LogLevel: Readonly<{
2084
+ /**
2085
+ * Logs any additional information that may be useful during debugging,
2086
+ * such as function calls, API queries, etc.
2087
+ */
2088
+ VERBOSE: "verbose";
2089
+ /**
2090
+ * Logs only errors
2091
+ */
2092
+ ERROR: "error";
2093
+ /**
2094
+ * Logs messages from the SDK
2095
+ * that do not cause critical errors,
2096
+ * but are worth paying attention to
2097
+ */
2098
+ WARN: "warn";
2099
+ /**
2100
+ * Logs various information messages,
2101
+ * such as those that log the lifecycle of various modules
2102
+ */
2103
+ INFO: "info";
2104
+ }>;
2105
+ type LogLevel = (typeof LogLevel)[keyof typeof LogLevel];
2106
+ declare const FetchPolicy: Readonly<{
2107
+ ReloadRevalidatingCacheData: "reload_revalidating_cache_data";
2108
+ ReturnCacheDataElseLoad: "return_cache_data_else_load";
2109
+ ReturnCacheDataIfNotExpiredElseLoad: "return_cache_data_if_not_expired_else_load";
2110
+ }>;
2111
+ type FetchPolicy = (typeof FetchPolicy)[keyof typeof FetchPolicy];
2112
+ type GetPlacementParamsInput = GetPlacementForDefaultAudienceParamsInput & {
2113
+ /**
2114
+ * This value limits the timeout (in milliseconds) for this method.
2115
+ *
2116
+ * @remarks
2117
+ * If the timeout is reached, cached data or local fallback will be returned.
2118
+ */
2119
+ loadTimeoutMs?: number;
2120
+ };
2121
+ type GetPlacementForDefaultAudienceParamsInput = {
2122
+ /**
2123
+ * Fetch policy
2124
+ *
2125
+ * @remarks
2126
+ * By default SDK will try to load data from server and will return cached data in case of failure.
2127
+ * Otherwise use `'return_cache_data_else_load'` to return cached data if it exists.
2128
+ */
2129
+ fetchPolicy?: Exclude<FetchPolicy, 'return_cache_data_if_not_expired_else_load'>;
2130
+ } | {
2131
+ /**
2132
+ * Fetch policy
2133
+ *
2134
+ * @remarks
2135
+ * By default SDK will try to load data from server and will return cached data in case of failure.
2136
+ * Otherwise use `'return_cache_data_else_load'` to return cached data if it exists.
2137
+ */
2138
+ fetchPolicy: Extract<FetchPolicy, 'return_cache_data_if_not_expired_else_load'>;
2139
+ /**
2140
+ * Max age for cached data.
2141
+ *
2142
+ * @remarks
2143
+ * Max time (in seconds) the cache is valid in case of `'return_cache_data_if_not_expired_else_load'` fetch policy.
2144
+ */
2145
+ maxAgeSeconds: number;
2146
+ };
2147
+ /**
2148
+ * Describes optional parameters for the {@link activate} method.
2149
+ */
2150
+ interface ActivateParamsInput {
2151
+ /**
2152
+ * Turn it on if you handle purchases and subscription status yourself
2153
+ * and use Adapty for sending subscription events and analytics
2154
+ *
2155
+ * @defaultValue `false`
2156
+ */
2157
+ observerMode?: boolean;
2158
+ /**
2159
+ * User identifier in your system
2160
+ *
2161
+ * @remarks
2162
+ * If none of the parameters are passed, the SDK will generate an ID
2163
+ * and use it for a current device.
2164
+ * Use your own ID:
2165
+ * 1. If you want to support a cross-device experience
2166
+ * 2. If you have your own authentication system,
2167
+ * and you want to associate adapty profile with your user
2168
+ */
2169
+ customerUserId?: string;
2170
+ /**
2171
+ * Log level for the SDK
2172
+ *
2173
+ * @remarks
2174
+ * Logging is performed on a native side.
2175
+ * So you are expected to watch logs in Xcode or Android Studio.
2176
+ */
2177
+ logLevel?: LogLevel;
2178
+ serverCluster?: 'default' | 'eu' | 'cn';
2179
+ backendProxyHost?: string;
2180
+ backendProxyPort?: number;
2181
+ activateUi?: boolean;
2182
+ mediaCache?: AdaptyUiMediaCache;
2183
+ /**
2184
+ * Locks methods threads until the SDK is ready.
2185
+ * @defaultValue `false`
2186
+ * @deprecated Turned on by default
2187
+ */
2188
+ lockMethodsUntilReady?: boolean;
2189
+ /**
2190
+ * Does not activate SDK until any other method is called
2191
+ * Fixes annoying iOS simulator auhtentication
2192
+ */
2193
+ __debugDeferActivation?: boolean;
2194
+ /**
2195
+ * Ignores multiple activation attempts on fast refresh.
2196
+ * If true, skips activation if SDK is already activated.
2197
+ */
2198
+ __ignoreActivationOnFastRefresh?: boolean;
2199
+ /**
2200
+ * Enables mock mode for web platform
2201
+ * @remarks
2202
+ * When enabled, SDK will use mock implementations instead of native modules.
2203
+ * Useful for Expo Web and testing.
2204
+ * @defaultValue `false`
2205
+ */
2206
+ enableMock?: boolean;
2207
+ /**
2208
+ * Configuration for mock mode
2209
+ * @remarks
2210
+ * Allows customization of mock data returned by the SDK.
2211
+ */
2212
+ mockConfig?: AdaptyMockConfig;
2213
+ /**
2214
+ * Disables IP address collection
2215
+ * @defaultValue `false`
2216
+ */
2217
+ ipAddressCollectionDisabled?: boolean;
2218
+ ios?: {
2219
+ /**
2220
+ * Disables IDFA collection
2221
+ * @default false
2222
+ */
2223
+ idfaCollectionDisabled?: boolean;
2224
+ appAccountToken?: string;
2225
+ /**
2226
+ * Controls whether the SDK will create a new profile when the app is restored from an iCloud backup
2227
+ * @defaultValue `false`
2228
+ */
2229
+ clearDataOnBackup?: boolean;
2230
+ };
2231
+ android?: {
2232
+ /**
2233
+ * Disables Google AdvertisingID collection
2234
+ * @default false
2235
+ */
2236
+ adIdCollectionDisabled?: boolean;
2237
+ pendingPrepaidPlansEnabled?: boolean;
2238
+ localAccessLevelAllowed?: boolean;
2239
+ obfuscatedAccountId?: string;
2240
+ };
2241
+ }
2242
+ interface IdentifyParamsInput {
2243
+ ios?: {
2244
+ appAccountToken?: string;
2245
+ };
2246
+ android?: {
2247
+ obfuscatedAccountId?: string;
2248
+ };
2249
+ }
2250
+ interface GetPaywallProductsParamsInput {}
2251
+ declare const AdaptyAndroidSubscriptionUpdateReplacementMode: Readonly<{
2252
+ ChargeFullPrice: "charge_full_price";
2253
+ Deferred: "deferred";
2254
+ WithoutProration: "without_proration";
2255
+ ChargeProratedPrice: "charge_prorated_price";
2256
+ WithTimeProration: "with_time_proration";
2257
+ }>;
2258
+ type AdaptyAndroidSubscriptionUpdateReplacementMode = (typeof AdaptyAndroidSubscriptionUpdateReplacementMode)[keyof typeof AdaptyAndroidSubscriptionUpdateReplacementMode];
2259
+ /**
2260
+ * Android purchase parameters structure
2261
+ * @public
2262
+ */
2263
+ interface AdaptyAndroidPurchaseParams {
2264
+ /**
2265
+ * Android subscription update parameters
2266
+ * @platform android
2267
+ */
2268
+ subscriptionUpdateParams?: {
2269
+ oldSubVendorProductId: string;
2270
+ prorationMode: AdaptyAndroidSubscriptionUpdateReplacementMode;
2271
+ };
2272
+ /**
2273
+ * Whether the offer is personalized
2274
+ * @platform android
2275
+ * @see {@link https://developer.android.com/google/play/billing/integrate#personalized-price}
2276
+ */
2277
+ isOfferPersonalized?: boolean;
2278
+ }
2279
+ interface AdaptyAndroidSubscriptionUpdateParameters {
2280
+ oldSubVendorProductId: string;
2281
+ prorationMode: AdaptyAndroidSubscriptionUpdateReplacementMode;
2282
+ /**
2283
+ * @deprecated Use {@link AdaptyAndroidPurchaseParams.isOfferPersonalized} instead.
2284
+ * This field has been moved to the upper level in the new structure.
2285
+ *
2286
+ * @example
2287
+ * // OLD (deprecated):
2288
+ * android: {
2289
+ * oldSubVendorProductId: 'old_product_id',
2290
+ * prorationMode: 'charge_prorated_price',
2291
+ * isOfferPersonalized: true // This field is deprecated
2292
+ * }
2293
+ *
2294
+ * // NEW:
2295
+ * android: {
2296
+ * subscriptionUpdateParams: {
2297
+ * oldSubVendorProductId: 'old_product_id',
2298
+ * prorationMode: 'charge_prorated_price'
2299
+ * },
2300
+ * isOfferPersonalized: true // Moved to upper level
2301
+ * }
2302
+ */
2303
+ isOfferPersonalized?: boolean;
2304
+ }
2305
+ type MakePurchaseParamsInput = {
2306
+ /**
2307
+ * Android purchase parameters
2308
+ * @platform android
2309
+ */
2310
+ android?: AdaptyAndroidPurchaseParams;
2311
+ } | {
2312
+ /**
2313
+ * @deprecated Use the new parameter structure instead
2314
+ *
2315
+ * @example
2316
+ * // OLD (deprecated):
2317
+ * makePurchase(product, {
2318
+ * android: {
2319
+ * oldSubVendorProductId: 'old_product_id',
2320
+ * prorationMode: 'charge_prorated_price',
2321
+ * isOfferPersonalized: true
2322
+ * }
2323
+ * });
2324
+ *
2325
+ * // NEW:
2326
+ * makePurchase(product, {
2327
+ * android: {
2328
+ * subscriptionUpdateParams: {
2329
+ * oldSubVendorProductId: 'old_product_id',
2330
+ * prorationMode: 'charge_prorated_price'
2331
+ * },
2332
+ * isOfferPersonalized: true, // Note: moved to upper level
2333
+ * }
2334
+ * });
2335
+ *
2336
+ * @platform android
2337
+ */
2338
+ android?: AdaptyAndroidSubscriptionUpdateParameters;
2339
+ };
2340
+ type FileLocation = {
2341
+ ios: {
2342
+ fileName: string;
2343
+ };
2344
+ android: {
2345
+ relativeAssetPath: string;
2346
+ } | {
2347
+ rawResName: string;
2348
+ };
2349
+ };
2350
+
2351
+ //#endregion
2352
+ //#region src/coders/adapty-configuration.d.ts
2353
+ //# sourceMappingURL=inputs.d.ts.map
2354
+ type Model$31 = ActivateParamsInput;
2355
+ type Serializable$32 = Def['AdaptyConfiguration'];
2356
+ declare class AdaptyConfigurationCoder {
2357
+ private readonly platform;
2358
+ private readonly sdkMetadata;
2359
+ constructor(platform: IPlatformAdapter, sdkMetadata: ISdkMetadataAdapter);
2360
+ encode(apiKey: string, params: Model$31): Serializable$32;
2361
+ }
2362
+
2363
+ //#endregion
2364
+ //#region src/coders/adapty-discount-phase.d.ts
2365
+ type Model$30 = AdaptyDiscountPhase;
2366
+ type Serializable$31 = Def['AdaptySubscriptionOffer.Phase'];
2367
+ declare class AdaptyDiscountPhaseCoder extends SimpleCoder<Model$30, Serializable$31> {
2368
+ protected properties: Properties<Model$30, Serializable$31>;
2369
+ }
2370
+
2371
+ //#endregion
2372
+ //#region src/coders/adapty-identify-params.d.ts
2373
+ type Model$29 = IdentifyParamsInput;
2374
+ type Serializable$30 = {
2375
+ app_account_token?: string;
2376
+ obfuscated_account_id?: string;
2377
+ obfuscated_profile_id?: string;
2378
+ };
2379
+ declare class AdaptyIdentifyParamsCoder {
2380
+ private readonly platform;
2381
+ constructor(platform: IPlatformAdapter);
2382
+ encode(params?: Model$29): Serializable$30 | undefined;
2383
+ }
2384
+
2385
+ //#endregion
2386
+ //#region src/coders/adapty-installation-details.d.ts
2387
+ declare class AdaptyInstallationDetailsCoder implements Converter<AdaptyInstallationDetails, Def['AdaptyInstallationDetails']> {
2388
+ encode(model: AdaptyInstallationDetails): Def['AdaptyInstallationDetails'];
2389
+ decode(json: Def['AdaptyInstallationDetails']): AdaptyInstallationDetails;
2390
+ }
2391
+
2392
+ //#endregion
2393
+ //#region src/coders/adapty-installation-status.d.ts
2394
+ //# sourceMappingURL=adapty-installation-details.d.ts.map
2395
+ declare class AdaptyInstallationStatusCoder implements Converter<AdaptyInstallationStatus, Def['AdaptyInstallationStatus']> {
2396
+ encode(model: AdaptyInstallationStatus): Def['AdaptyInstallationStatus'];
2397
+ decode(json: Def['AdaptyInstallationStatus']): AdaptyInstallationStatus;
2398
+ }
2399
+
2400
+ //#endregion
2401
+ //#region src/platform.d.ts
2402
+ //# sourceMappingURL=adapty-installation-status.d.ts.map
2403
+
2404
+ /**
2405
+ * EmitterSubscription mock for type compatibility
2406
+ */
2407
+ interface EmitterSubscription {
2408
+ remove(): void;
2409
+ }
2410
+
2411
+ //#endregion
2412
+ //#region src/types/bridge.d.ts
2413
+ //# sourceMappingURL=platform.d.ts.map
2414
+ /**
2415
+ * Valid list of callable bridge handlers
2416
+ * Must be the same as
2417
+ * - iOS RNAConstants.MethodName
2418
+ * @internal
2419
+ */
2420
+ declare const MethodNames: readonly ["activate", "adapty_ui_activate", "adapty_ui_create_paywall_view", "adapty_ui_dismiss_paywall_view", "adapty_ui_present_paywall_view", "adapty_ui_show_dialog", "adapty_ui_create_onboarding_view", "adapty_ui_dismiss_onboarding_view", "adapty_ui_present_onboarding_view", "create_web_paywall_url", "get_current_installation_status", "is_activated", "get_paywall", "get_paywall_for_default_audience", "get_paywall_products", "get_onboarding", "get_onboarding_for_default_audience", "get_profile", "identify", "log_show_paywall", "logout", "make_purchase", "open_web_paywall", "present_code_redemption_sheet", "report_transaction", "restore_purchases", "set_fallback", "set_integration_identifiers", "set_log_level", "update_attribution_data", "update_collecting_refund_data_consent", "update_profile", "update_refund_preference"];
2421
+ type MethodName = (typeof MethodNames)[number];
2422
+ /**
2423
+ * Types of values that can be passed
2424
+ * to the bridge without corruption
2425
+ */
2426
+ type Serializable$1 = string | number | boolean | string[] | null | undefined;
2427
+ /**
2428
+ * Interface of error that emit from native SDK
2429
+ */
2430
+ interface AdaptyNativeError {
2431
+ adaptyCode: number;
2432
+ message: string;
2433
+ detail?: string | undefined;
2434
+ }
2435
+ /**
2436
+ * Interface of error that was raised by native bridge
2437
+ */
2438
+ interface AdaptyBridgeError {
2439
+ errorType: string;
2440
+ name?: string;
2441
+ type?: string;
2442
+ underlyingError?: string;
2443
+ description?: string;
2444
+ }
2445
+ interface EventMap {
2446
+ onLatestProfileLoad: string;
2447
+ onInstallationDetailsSuccess: string;
2448
+ onInstallationDetailsFail: string;
2449
+ }
2450
+ type UserEventName = keyof EventMap;
2451
+ type AddListenerGeneric<E extends UserEventName, Data> = (event: E, callback: (data: Data) => void | Promise<void>) => EmitterSubscription;
2452
+ type AddListenerFn = AddListenerGeneric<'onLatestProfileLoad', AdaptyProfile> | AddListenerGeneric<'onInstallationDetailsSuccess', AdaptyInstallationDetails> | AddListenerGeneric<'onInstallationDetailsFail', AdaptyError>;
2453
+
2454
+ //#endregion
2455
+ //#region src/coders/error-coder.d.ts
2456
+ interface ErrorConverter<Model extends Record<string, any>> extends Converter<Model, any> {
2457
+ type: 'error';
2458
+ getError: (data: Model) => AdaptyError;
2459
+ }
2460
+
2461
+ //#endregion
2462
+ //#region src/coders/adapty-native-error.d.ts
2463
+ //# sourceMappingURL=error-coder.d.ts.map
2464
+ type Model$28 = AdaptyNativeError;
2465
+ type Serializable$29 = Def['AdaptyError'];
2466
+ declare class AdaptyNativeErrorCoder extends SimpleCoder<Model$28, Serializable$29> implements ErrorConverter<Model$28> {
2467
+ type: 'error';
2468
+ protected properties: Properties<Model$28, Serializable$29>;
2469
+ getError(data: Model$28): AdaptyError;
2470
+ }
2471
+
2472
+ //#endregion
2473
+ //#region src/coders/adapty-non-subscription.d.ts
2474
+ type Model$27 = AdaptyNonSubscription;
2475
+ type Serializable$28 = Def['AdaptyProfile.NonSubscription'];
2476
+ declare class AdaptyNonSubscriptionCoder extends SimpleCoder<Model$27, Serializable$28> {
2477
+ protected properties: Properties<Model$27, Serializable$28>;
2478
+ }
2479
+
2480
+ //#endregion
2481
+ //#region src/coders/adapty-onboarding-builder.d.ts
2482
+ type Model$26 = AdaptyOnboardingBuilder;
2483
+ type Serializable$27 = Required<Def['AdaptyOnboarding']>['onboarding_builder'];
2484
+ declare class AdaptyOnboardingBuilderCoder extends SimpleCoder<Model$26, Serializable$27> {
2485
+ protected properties: Properties<Model$26, Serializable$27>;
2486
+ }
2487
+
2488
+ //#endregion
2489
+ //#region src/coders/adapty-onboarding.d.ts
2490
+ type Model$25 = AdaptyOnboarding;
2491
+ type CodableModel$3 = Omit<Model$25, 'hasViewConfiguration'>;
2492
+ type Serializable$26 = Def['AdaptyOnboarding'];
2493
+ declare class AdaptyOnboardingCoder extends Coder<Model$25, CodableModel$3, Serializable$26> {
2494
+ protected properties: Properties<CodableModel$3, Serializable$26>;
2495
+ decode(data: Serializable$26): Model$25;
2496
+ encode(data: Model$25): Serializable$26;
2497
+ }
2498
+
2499
+ //#endregion
2500
+ //#region src/coders/adapty-paywall-builder.d.ts
2501
+ type Model$24 = AdaptyPaywallBuilder;
2502
+ type Serializable$25 = Required<Def['AdaptyPaywall']>['paywall_builder'];
2503
+ declare class AdaptyPaywallBuilderCoder extends SimpleCoder<Model$24, Serializable$25> {
2504
+ protected properties: Properties<Model$24, Serializable$25>;
2505
+ }
2506
+
2507
+ //#endregion
2508
+ //#region src/coders/adapty-paywall-product.d.ts
2509
+ type Model$23 = AdaptyPaywallProduct;
2510
+ type Serializable$24 = Def['AdaptyPaywallProduct.Response'];
2511
+ declare class AdaptyPaywallProductCoder extends SimpleCoder<Model$23, Serializable$24> {
2512
+ protected properties: Properties<Model$23, Serializable$24>;
2513
+ getInput(data: Serializable$24): Def['AdaptyPaywallProduct.Request'];
2514
+ }
2515
+
2516
+ //#endregion
2517
+ //#region src/coders/adapty-paywall.d.ts
2518
+ type Model$22 = AdaptyPaywall;
2519
+ type CodableModel$2 = Omit<Model$22, 'hasViewConfiguration' | 'productIdentifiers'>;
2520
+ type Serializable$23 = Def['AdaptyPaywall'];
2521
+ declare class AdaptyPaywallCoder extends Coder<Model$22, CodableModel$2, Serializable$23> {
2522
+ protected properties: Properties<CodableModel$2, Serializable$23>;
2523
+ decode(data: Serializable$23): Model$22;
2524
+ encode(data: Model$22): Serializable$23;
2525
+ }
2526
+
2527
+ //#endregion
2528
+ //#region src/coders/adapty-placement.d.ts
2529
+ type Model$21 = AdaptyPlacement;
2530
+ type Serializable$22 = Def['AdaptyPlacement'];
2531
+ declare class AdaptyPlacementCoder extends SimpleCoder<Model$21, Serializable$22> {
2532
+ protected properties: Properties<Model$21, Serializable$22>;
2533
+ }
2534
+
2535
+ //#endregion
2536
+ //#region src/coders/adapty-price.d.ts
2537
+ type Model$20 = AdaptyPrice;
2538
+ type Serializable$21 = Def['AdaptyPrice'];
2539
+ declare class AdaptyPriceCoder extends SimpleCoder<Model$20, Serializable$21> {
2540
+ protected properties: Properties<Model$20, Serializable$21>;
2541
+ }
2542
+
2543
+ //#endregion
2544
+ //#region src/coders/adapty-profile-parameters.d.ts
2545
+ type Model$19 = AdaptyProfileParameters;
2546
+ type Serializable$20 = Def['AdaptyProfileParameters'];
2547
+ declare class AdaptyProfileParametersCoder extends SimpleCoder<Model$19, Serializable$20> {
2548
+ protected properties: Properties<Model$19, Serializable$20>;
2549
+ }
2550
+
2551
+ //#endregion
2552
+ //#region src/coders/adapty-profile.d.ts
2553
+ type Model$18 = AdaptyProfile;
2554
+ type Serializable$19 = Def['AdaptyProfile'];
2555
+ declare class AdaptyProfileCoder extends SimpleCoder<Model$18, Serializable$19> {
2556
+ protected properties: Properties<Model$18, Serializable$19>;
2557
+ }
2558
+
2559
+ //#endregion
2560
+ //#region src/coders/adapty-purchase-params.d.ts
2561
+ type Model$17 = MakePurchaseParamsInput;
2562
+ type Serializable$18 = Record<string, any>;
2563
+ declare class AdaptyPurchaseParamsCoder {
2564
+ private readonly platform;
2565
+ constructor(platform: IPlatformAdapter);
2566
+ encode(data: Model$17): Serializable$18;
2567
+ }
2568
+
2569
+ //#endregion
2570
+ //#region src/coders/adapty-purchase-result.d.ts
2571
+ type Model$16 = AdaptyPurchaseResult;
2572
+ type Serializable$17 = Def['AdaptyPurchaseResult'];
2573
+ declare class AdaptyPurchaseResultCoder extends SimpleCoder<Model$16, Serializable$17> {
2574
+ protected properties: Properties<Model$16, Serializable$17>;
2575
+ decode(data: Serializable$17): Model$16;
2576
+ encode(data: Model$16): Serializable$17;
2577
+ }
2578
+
2579
+ //#endregion
2580
+ //#region src/coders/adapty-remote-config.d.ts
2581
+ type Model$15 = AdaptyRemoteConfig;
2582
+ type CodableModel$1 = Omit<Model$15, 'dataString'>;
2583
+ type Serializable$16 = Required<Def['AdaptyPaywall']>['remote_config'];
2584
+ declare class AdaptyRemoteConfigCoder extends Coder<Model$15, CodableModel$1, Serializable$16> {
2585
+ protected properties: Properties<CodableModel$1, Serializable$16>;
2586
+ decode(data: Serializable$16): Model$15;
2587
+ encode(data: Model$15): Serializable$16;
2588
+ }
2589
+
2590
+ //#endregion
2591
+ //#region src/coders/adapty-subscription-details.d.ts
2592
+ type Model$14 = AdaptySubscriptionDetails;
2593
+ type Serializable$15 = Def['AdaptyPaywallProduct.Subscription'];
2594
+ declare class AdaptySubscriptionDetailsCoder extends SimpleCoder<Model$14, Serializable$15> {
2595
+ protected properties: Properties<Model$14, Serializable$15>;
2596
+ decode(data: Serializable$15): Model$14;
2597
+ }
2598
+
2599
+ //#endregion
2600
+ //#region src/coders/adapty-subscription-offer-identifier.d.ts
2601
+ type Model$13 = AdaptySubscriptionOfferId;
2602
+ type Serializable$14 = Def['AdaptySubscriptionOffer.Identifier'];
2603
+ declare class AdaptySubscriptionOfferIdCoder extends SimpleCoder<Model$13, Serializable$14> {
2604
+ protected properties: Properties<Model$13, Serializable$14>;
2605
+ }
2606
+
2607
+ //#endregion
2608
+ //#region src/coders/adapty-subscription-offer.d.ts
2609
+ type Model$12 = AdaptySubscriptionOffer;
2610
+ type Serializable$13 = Def['AdaptySubscriptionOffer'];
2611
+ declare class AdaptySubscriptionOfferCoder extends SimpleCoder<Model$12, Serializable$13> {
2612
+ protected properties: Properties<Model$12, Serializable$13>;
2613
+ decode(data: Serializable$13): Model$12;
2614
+ }
2615
+
2616
+ //#endregion
2617
+ //#region src/coders/adapty-subscription-period.d.ts
2618
+ type Model$11 = AdaptySubscriptionPeriod;
2619
+ type Serializable$12 = Def['AdaptySubscriptionPeriod'];
2620
+ declare class AdaptySubscriptionPeriodCoder extends SimpleCoder<Model$11, Serializable$12> {
2621
+ protected properties: Properties<Model$11, Serializable$12>;
2622
+ }
2623
+
2624
+ //#endregion
2625
+ //#region src/coders/adapty-subscription.d.ts
2626
+ type Model$10 = AdaptySubscription;
2627
+ type Serializable$11 = Def['AdaptyProfile.Subscription'];
2628
+ declare class AdaptySubscriptionCoder extends SimpleCoder<Model$10, Serializable$11> {
2629
+ protected properties: Properties<Model$10, Serializable$11>;
2630
+ }
2631
+
2632
+ //#endregion
2633
+ //#region src/coders/adapty-ui-dialog-config.d.ts
2634
+ type Model$9 = AdaptyUiDialogConfig;
2635
+ type Serializable$10 = Def['AdaptyUI.DialogConfiguration'];
2636
+ declare class AdaptyUiDialogConfigCoder extends SimpleCoder<Model$9, Serializable$10> {
2637
+ protected properties: Properties<Model$9, Serializable$10>;
2638
+ }
2639
+
2640
+ //#endregion
2641
+ //#region src/coders/adapty-ui-create-onboarding-view-params.d.ts
2642
+ type Serializable$9 = Pick<Req['AdaptyUICreateOnboardingView.Request'], 'external_urls_presentation'>;
2643
+ declare class AdaptyUICreateOnboardingViewParamsCoder {
2644
+ encode(data: CreateOnboardingViewParamsInput): Serializable$9;
2645
+ }
2646
+
2647
+ //#endregion
2648
+ //#region src/coders/adapty-ui-create-paywall-view-params.d.ts
2649
+ type Model$8 = CreatePaywallViewParamsInput;
2650
+ type Serializable$8 = {
2651
+ preload_products?: boolean;
2652
+ load_timeout?: number;
2653
+ custom_tags?: Def['AdaptyUI.CustomTagsValues'];
2654
+ custom_timers?: Def['AdaptyUI.CustomTimersValues'];
2655
+ custom_assets?: Def['AdaptyUI.CustomAssets'];
2656
+ product_purchase_parameters?: Def['AdaptyUI.ProductPurchaseParameters'];
2657
+ };
2658
+ declare class AdaptyUICreatePaywallViewParamsCoder {
2659
+ private readonly platform;
2660
+ constructor(platform: IPlatformAdapter);
2661
+ encode(data: Model$8): Serializable$8;
2662
+ private encodeCustomTimers;
2663
+ private encodeCustomAssets;
2664
+ private encodeProductPurchaseParams;
2665
+ }
2666
+
2667
+ //#endregion
2668
+ //#region src/coders/adapty-ui-media-cache.d.ts
2669
+ type Model$7 = AdaptyUiMediaCache;
2670
+ type Serializable$7 = Required<Def['AdaptyConfiguration']>['media_cache'];
2671
+ declare class AdaptyUiMediaCacheCoder extends SimpleCoder<Model$7, Serializable$7> {
2672
+ protected properties: Properties<Model$7, Serializable$7>;
2673
+ }
2674
+
2675
+ //#endregion
2676
+ //#region src/coders/adapty-ui-onboarding-meta.d.ts
2677
+ type Model$6 = AdaptyUiOnboardingMeta;
2678
+ type Serializable$6 = Def['AdaptyUI.OnboardingMeta'];
2679
+ declare class AdaptyUiOnboardingMetaCoder extends SimpleCoder<Model$6, Serializable$6> {
2680
+ protected properties: Properties<Model$6, Serializable$6>;
2681
+ }
2682
+
2683
+ //#endregion
2684
+ //#region src/coders/adapty-ui-onboarding-state-params.d.ts
2685
+ type Model$5 = AdaptyUiOnboardingStateParams;
2686
+ type Serializable$5 = Def['AdaptyUI.OnboardingsStateParams'];
2687
+ declare class AdaptyUiOnboardingStateParamsCoder extends SimpleCoder<Model$5, Serializable$5> {
2688
+ protected properties: Properties<Model$5, Serializable$5>;
2689
+ }
2690
+
2691
+ //#endregion
2692
+ //#region src/coders/adapty-ui-onboarding-state-updated-action.d.ts
2693
+ type Model$4 = OnboardingStateUpdatedAction;
2694
+ type BaseModel = Omit<Model$4, 'value'>;
2695
+ type Serializable$4 = Event['OnboardingViewEvent.OnStateUpdatedAction']['action'];
2696
+ declare class AdaptyUiOnboardingStateUpdatedActionCoder extends SimpleCoder<BaseModel, Serializable$4> {
2697
+ private readonly paramCoder;
2698
+ protected properties: Properties<BaseModel, Serializable$4>;
2699
+ decode(data: Serializable$4): OnboardingStateUpdatedAction;
2700
+ encode(data: OnboardingStateUpdatedAction): Serializable$4;
2701
+ }
2702
+
2703
+ //#endregion
2704
+ //#region src/coders/array.d.ts
2705
+ declare class ArrayCoder<Model, Serializable> implements Converter<Model[], Serializable[]> {
2706
+ private readonly coderFactory;
2707
+ constructor(coderFactory: () => Converter<Model, Serializable>);
2708
+ decode(input: Serializable[]): Model[];
2709
+ encode(value: Model[]): Serializable[];
2710
+ }
2711
+
2712
+ //#endregion
2713
+ //#region src/coders/bridge-error.d.ts
2714
+ //# sourceMappingURL=array.d.ts.map
2715
+ type Model$3 = AdaptyBridgeError;
2716
+ type Serializable$3 = Record<string, any>;
2717
+ declare class BridgeErrorCoder extends SimpleCoder<Model$3, Serializable$3> implements ErrorConverter<Model$3> {
2718
+ type: 'error';
2719
+ protected properties: Properties<Model$3, Serializable$3>;
2720
+ getError(data: Model$3): AdaptyError;
2721
+ }
2722
+
2723
+ //#endregion
2724
+ //#region src/coders/date.d.ts
2725
+ /**
2726
+ * Format: yyyy-MM-dd'T'HH:mm:ss.SSSZ
2727
+ * OpenAPI: Output.Date
2728
+ */
2729
+ declare class DateCoder implements Converter<Date, string> {
2730
+ decode(input: string): Date;
2731
+ encode(value: Date): string;
2732
+ }
2733
+
2734
+ //#endregion
2735
+ //#region src/coders/hashmap.d.ts
2736
+ //# sourceMappingURL=date.d.ts.map
2737
+ declare class HashmapCoder<T extends Converter<any, any>> implements Converter<Record<string, any>, Record<string, any>> {
2738
+ private coder;
2739
+ constructor(coder: T | null);
2740
+ decode(input: Record<string, any>): Record<string, any>;
2741
+ encode(value: Record<string, any>): Record<string, unknown>;
2742
+ }
2743
+
2744
+ //#endregion
2745
+ //#region src/coders/json.d.ts
2746
+ //# sourceMappingURL=hashmap.d.ts.map
2747
+ type Model$2 = any;
2748
+ type Serialized$1 = string;
2749
+ declare class JSONCoder implements Converter<Model$2, Serialized$1> {
2750
+ decode(input: Serialized$1): Model$2;
2751
+ encode(value: Model$2): Serialized$1;
2752
+ }
2753
+
2754
+ //#endregion
2755
+ //#region src/coders/product-reference.d.ts
2756
+ type Model$1 = ProductReference;
2757
+ type Serializable$2 = Def['AdaptyPaywall.ProductReference'];
2758
+ declare class ProductReferenceCoder extends SimpleCoder<Model$1, Serializable$2> {
2759
+ protected properties: Properties<Model$1, Serializable$2>;
2760
+ }
2761
+
2762
+ //#endregion
2763
+ //#region src/coders/factory.d.ts
2764
+ /**
2765
+ * Dependencies container for coders
2766
+ */
2767
+ interface CoderDependencies {
2768
+ platform: IPlatformAdapter;
2769
+ sdkMetadata: ISdkMetadataAdapter;
2770
+ logger?: ILoggerAdapter;
2771
+ }
2772
+ /**
2773
+ * Factory for creating coders with injected dependencies
2774
+ */
2775
+ declare class CoderFactory {
2776
+ private readonly deps;
2777
+ constructor(deps: CoderDependencies);
2778
+ createAccessLevelCoder(): AdaptyAccessLevelCoder;
2779
+ createConfigurationCoder(): AdaptyConfigurationCoder;
2780
+ createDateCoder(): DateCoder;
2781
+ createDiscountPhaseCoder(): AdaptyDiscountPhaseCoder;
2782
+ createPurchaseParamsCoder(): AdaptyPurchaseParamsCoder;
2783
+ createPurchaseResultCoder(): AdaptyPurchaseResultCoder;
2784
+ createIdentifyParamsCoder(): AdaptyIdentifyParamsCoder;
2785
+ createInstallationDetailsCoder(): AdaptyInstallationDetailsCoder;
2786
+ createInstallationStatusCoder(): AdaptyInstallationStatusCoder;
2787
+ createJsonCoder(): JSONCoder;
2788
+ createNativeErrorCoder(): AdaptyNativeErrorCoder;
2789
+ createNonSubscriptionCoder(): AdaptyNonSubscriptionCoder;
2790
+ createOnboardingBuilderCoder(): AdaptyOnboardingBuilderCoder;
2791
+ createOnboardingCoder(): AdaptyOnboardingCoder;
2792
+ createPaywallBuilderCoder(): AdaptyPaywallBuilderCoder;
2793
+ createPaywallCoder(): AdaptyPaywallCoder;
2794
+ createPaywallProductCoder(): AdaptyPaywallProductCoder;
2795
+ createPlacementCoder(): AdaptyPlacementCoder;
2796
+ createPriceCoder(): AdaptyPriceCoder;
2797
+ createProductReferenceCoder(): ProductReferenceCoder;
2798
+ createProfileCoder(): AdaptyProfileCoder;
2799
+ createProfileParametersCoder(): AdaptyProfileParametersCoder;
2800
+ createRemoteConfigCoder(): AdaptyRemoteConfigCoder;
2801
+ createSubscriptionCoder(): AdaptySubscriptionCoder;
2802
+ createSubscriptionDetailsCoder(): AdaptySubscriptionDetailsCoder;
2803
+ createSubscriptionOfferCoder(): AdaptySubscriptionOfferCoder;
2804
+ createSubscriptionOfferIdCoder(): AdaptySubscriptionOfferIdCoder;
2805
+ createSubscriptionPeriodCoder(): AdaptySubscriptionPeriodCoder;
2806
+ createUiCreateOnboardingViewParamsCoder(): AdaptyUICreateOnboardingViewParamsCoder;
2807
+ createUiCreatePaywallViewParamsCoder(): AdaptyUICreatePaywallViewParamsCoder;
2808
+ createUiDialogConfigCoder(): AdaptyUiDialogConfigCoder;
2809
+ createUiMediaCacheCoder(): AdaptyUiMediaCacheCoder;
2810
+ createUiOnboardingMetaCoder(): AdaptyUiOnboardingMetaCoder;
2811
+ createUiOnboardingStateParamsCoder(): AdaptyUiOnboardingStateParamsCoder;
2812
+ createUiOnboardingStateUpdatedActionCoder(): AdaptyUiOnboardingStateUpdatedActionCoder;
2813
+ createBridgeErrorCoder(): BridgeErrorCoder;
2814
+ createArrayCoder<Model, Serializable>(coderFactory: () => Converter<Model, Serializable>): ArrayCoder<Model, Serializable>;
2815
+ createPaywallProductArrayCoder(): ArrayCoder<any, any>;
2816
+ createHashmapCoder<T extends Converter<any, any>>(coder: T | null): HashmapCoder<T>;
2817
+ }
2818
+
2819
+ //#endregion
2820
+ //#region src/types/paywall-events.d.ts
2821
+ //# sourceMappingURL=factory.d.ts.map
2822
+ declare const PaywallEventId: {
2823
+ readonly DidAppear: "paywall_view_did_appear";
2824
+ readonly DidDisappear: "paywall_view_did_disappear";
2825
+ readonly DidPerformAction: "paywall_view_did_perform_action";
2826
+ readonly DidSelectProduct: "paywall_view_did_select_product";
2827
+ readonly DidStartPurchase: "paywall_view_did_start_purchase";
2828
+ readonly DidFinishPurchase: "paywall_view_did_finish_purchase";
2829
+ readonly DidFailPurchase: "paywall_view_did_fail_purchase";
2830
+ readonly DidStartRestore: "paywall_view_did_start_restore";
2831
+ readonly DidFinishRestore: "paywall_view_did_finish_restore";
2832
+ readonly DidFailRestore: "paywall_view_did_fail_restore";
2833
+ readonly DidFailRendering: "paywall_view_did_fail_rendering";
2834
+ readonly DidFailLoadingProducts: "paywall_view_did_fail_loading_products";
2835
+ readonly DidFinishWebPaymentNavigation: "paywall_view_did_finish_web_payment_navigation";
2836
+ };
2837
+ type PaywallEventIdType = (typeof PaywallEventId)[keyof typeof PaywallEventId];
2838
+ interface PaywallEventView {
2839
+ id: string;
2840
+ placementId?: string;
2841
+ variationId?: string;
2842
+ }
2843
+ interface BasePaywallEvent {
2844
+ id: PaywallEventIdType;
2845
+ view: PaywallEventView;
2846
+ }
2847
+ interface PaywallDidAppearEvent extends BasePaywallEvent {
2848
+ id: typeof PaywallEventId.DidAppear;
2849
+ }
2850
+ interface PaywallDidDisappearEvent extends BasePaywallEvent {
2851
+ id: typeof PaywallEventId.DidDisappear;
2852
+ }
2853
+ interface PaywallDidPerformActionEvent extends BasePaywallEvent {
2854
+ id: typeof PaywallEventId.DidPerformAction;
2855
+ action: {
2856
+ type: 'close' | 'system_back' | 'open_url' | 'custom';
2857
+ value?: string;
2858
+ };
2859
+ }
2860
+ interface PaywallDidSelectProductEvent extends BasePaywallEvent {
2861
+ id: typeof PaywallEventId.DidSelectProduct;
2862
+ productId: string;
2863
+ }
2864
+ interface PaywallDidStartPurchaseEvent extends BasePaywallEvent {
2865
+ id: typeof PaywallEventId.DidStartPurchase;
2866
+ product: AdaptyPaywallProduct;
2867
+ }
2868
+ interface PaywallDidFinishPurchaseEvent extends BasePaywallEvent {
2869
+ id: typeof PaywallEventId.DidFinishPurchase;
2870
+ purchaseResult: AdaptyPurchaseResult;
2871
+ product: AdaptyPaywallProduct;
2872
+ }
2873
+ interface PaywallDidFailPurchaseEvent extends BasePaywallEvent {
2874
+ id: typeof PaywallEventId.DidFailPurchase;
2875
+ error: AdaptyError;
2876
+ product: AdaptyPaywallProduct;
2877
+ }
2878
+ interface PaywallDidStartRestoreEvent extends BasePaywallEvent {
2879
+ id: typeof PaywallEventId.DidStartRestore;
2880
+ }
2881
+ interface PaywallDidFinishRestoreEvent extends BasePaywallEvent {
2882
+ id: typeof PaywallEventId.DidFinishRestore;
2883
+ profile: AdaptyProfile;
2884
+ }
2885
+ interface PaywallDidFailRestoreEvent extends BasePaywallEvent {
2886
+ id: typeof PaywallEventId.DidFailRestore;
2887
+ error: AdaptyError;
2888
+ }
2889
+ interface PaywallDidFailRenderingEvent extends BasePaywallEvent {
2890
+ id: typeof PaywallEventId.DidFailRendering;
2891
+ error: AdaptyError;
2892
+ }
2893
+ interface PaywallDidFailLoadingProductsEvent extends BasePaywallEvent {
2894
+ id: typeof PaywallEventId.DidFailLoadingProducts;
2895
+ error: AdaptyError;
2896
+ }
2897
+ interface PaywallDidFinishWebPaymentNavigationEvent extends BasePaywallEvent {
2898
+ id: typeof PaywallEventId.DidFinishWebPaymentNavigation;
2899
+ product?: AdaptyPaywallProduct;
2900
+ error?: AdaptyError;
2901
+ }
2902
+ type ParsedPaywallEvent = PaywallDidAppearEvent | PaywallDidDisappearEvent | PaywallDidPerformActionEvent | PaywallDidSelectProductEvent | PaywallDidStartPurchaseEvent | PaywallDidFinishPurchaseEvent | PaywallDidFailPurchaseEvent | PaywallDidStartRestoreEvent | PaywallDidFinishRestoreEvent | PaywallDidFailRestoreEvent | PaywallDidFailRenderingEvent | PaywallDidFailLoadingProductsEvent | PaywallDidFinishWebPaymentNavigationEvent;
2903
+
2904
+ //#endregion
2905
+ //#region src/types/onboarding-events.d.ts
2906
+ declare const OnboardingEventId: {
2907
+ readonly Close: "onboarding_on_close_action";
2908
+ readonly Custom: "onboarding_on_custom_action";
2909
+ readonly Paywall: "onboarding_on_paywall_action";
2910
+ readonly StateUpdated: "onboarding_on_state_updated_action";
2911
+ readonly FinishedLoading: "onboarding_did_finish_loading";
2912
+ readonly Analytics: "onboarding_on_analytics_action";
2913
+ readonly Error: "onboarding_did_fail_with_error";
2914
+ };
2915
+ type OnboardingEventIdType = (typeof OnboardingEventId)[keyof typeof OnboardingEventId];
2916
+ interface OnboardingEventView {
2917
+ id: string;
2918
+ placementId?: string;
2919
+ variationId?: string;
2920
+ }
2921
+ interface BaseOnboardingEvent {
2922
+ id: OnboardingEventIdType;
2923
+ view: OnboardingEventView;
2924
+ }
2925
+ interface OnboardingCloseEvent extends BaseOnboardingEvent {
2926
+ id: typeof OnboardingEventId.Close;
2927
+ actionId: string;
2928
+ meta: AdaptyUiOnboardingMeta;
2929
+ }
2930
+ interface OnboardingCustomEvent extends BaseOnboardingEvent {
2931
+ id: typeof OnboardingEventId.Custom;
2932
+ actionId: string;
2933
+ meta: AdaptyUiOnboardingMeta;
2934
+ }
2935
+ interface OnboardingPaywallEvent extends BaseOnboardingEvent {
2936
+ id: typeof OnboardingEventId.Paywall;
2937
+ actionId: string;
2938
+ meta: AdaptyUiOnboardingMeta;
2939
+ }
2940
+ interface OnboardingStateUpdatedEvent extends BaseOnboardingEvent {
2941
+ id: typeof OnboardingEventId.StateUpdated;
2942
+ action: OnboardingStateUpdatedAction;
2943
+ meta: AdaptyUiOnboardingMeta;
2944
+ }
2945
+ interface OnboardingFinishedLoadingEvent extends BaseOnboardingEvent {
2946
+ id: typeof OnboardingEventId.FinishedLoading;
2947
+ meta: AdaptyUiOnboardingMeta;
2948
+ }
2949
+ interface OnboardingAnalyticsEvent extends BaseOnboardingEvent {
2950
+ id: typeof OnboardingEventId.Analytics;
2951
+ event: {
2952
+ name: string;
2953
+ elementId?: string;
2954
+ reply?: string;
2955
+ };
2956
+ meta: AdaptyUiOnboardingMeta;
2957
+ }
2958
+ interface OnboardingErrorEvent extends BaseOnboardingEvent {
2959
+ id: typeof OnboardingEventId.Error;
2960
+ error: AdaptyError;
2961
+ }
2962
+ type ParsedOnboardingEvent = OnboardingCloseEvent | OnboardingCustomEvent | OnboardingPaywallEvent | OnboardingStateUpdatedEvent | OnboardingFinishedLoadingEvent | OnboardingAnalyticsEvent | OnboardingErrorEvent;
2963
+
2964
+ //#endregion
2965
+ //#region src/index.d.ts
2966
+ /**
2967
+ * @adapty/core - Platform-agnostic core for Adapty SDKs
2968
+ *
2969
+ * This is the main entry point for the library.
2970
+ * Add your exports here as you develop the SDK.
2971
+ */
2972
+ declare const version = "0.0.0-dev.0000000000000000000000000000000000000000";
2973
+
2974
+ //#endregion
2975
+ export { ActivateParamsInput, AdaptyAccessLevel, AdaptyAndroidPurchaseParams, AdaptyAndroidSubscriptionUpdateParameters, AdaptyAndroidSubscriptionUpdateReplacementMode, AdaptyBridgeError, AdaptyDiscountPhase, AdaptyInstallationDetails, AdaptyInstallationStatus, AdaptyNativeError, AdaptyNonSubscription, AdaptyOnboarding, AdaptyOnboardingBuilder, AdaptyPaywall, AdaptyPaywallBuilder, AdaptyPaywallProduct, AdaptyPlacement, AdaptyPrice, AdaptyProductIdentifier, AdaptyProfile, AdaptyProfileParameters, AdaptyPurchaseResult, AdaptyRemoteConfig, AdaptySubscription, AdaptySubscriptionDetails, AdaptySubscriptionOffer, AdaptySubscriptionOfferId, AdaptySubscriptionPeriod, AddListenerFn, AddListenerGeneric, AppTrackingTransparencyStatus, CancellationReason, CoderDependencies, CoderFactory, NoopLoggerAdapter as DefaultLoggerAdapter, DefaultPlatformAdapter, DefaultSdkMetadataAdapter, ErrorCode, FetchPolicy, FileLocation, Gender, GetPaywallProductsParamsInput, GetPlacementForDefaultAudienceParamsInput, GetPlacementParamsInput, ILogContext, ILogScope, ILoggerAdapter, IPlatformAdapter, ISdkMetadataAdapter, IdentifyParamsInput, LogLevel, LogTrace, MakePurchaseParamsInput, MethodName, MethodNames, OfferType, OnboardingAnalyticsEvent, OnboardingCloseEvent, OnboardingCustomEvent, OnboardingErrorEvent, OnboardingEventId, OnboardingEventIdType, OnboardingEventView, OnboardingFinishedLoadingEvent, OnboardingPaywallEvent, OnboardingStateUpdatedEvent, ParsedOnboardingEvent, ParsedPaywallEvent, PaywallDidAppearEvent, PaywallDidDisappearEvent, PaywallDidFailLoadingProductsEvent, PaywallDidFailPurchaseEvent, PaywallDidFailRenderingEvent, PaywallDidFailRestoreEvent, PaywallDidFinishPurchaseEvent, PaywallDidFinishRestoreEvent, PaywallDidFinishWebPaymentNavigationEvent, PaywallDidPerformActionEvent, PaywallDidSelectProductEvent, PaywallDidStartPurchaseEvent, PaywallDidStartRestoreEvent, PaywallEventId, PaywallEventIdType, PaywallEventView, PlatformOS, ProductPeriod, ProductReference, RefundPreference, ScopeArgs, Serializable$1 as Serializable, UserEventName, VendorStore, WebPresentation, getErrorCode, getErrorPrompt, version };
2976
+ //# sourceMappingURL=index.d.cts.map