@adapty/core 4.3.4 → 4.4.0-dev.d43d1fa7e778941647e39a1efc1c413b95ee14d7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +90 -60
- package/dist/index.d.cts +97 -19
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +97 -19
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +90 -60
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -350,10 +350,18 @@ const ErrorCodeMapping = Object.freeze({
|
|
|
350
350
|
3101: "fetchTimeoutError",
|
|
351
351
|
3201: "operationInProgress",
|
|
352
352
|
3202: "resolverFailure",
|
|
353
|
+
4001: "platformNotSupported",
|
|
354
|
+
4002: "adaptyNotActivated",
|
|
355
|
+
4003: "adaptyUINotActivated",
|
|
356
|
+
4005: "activateOnce",
|
|
357
|
+
4103: "wrongComponentType",
|
|
353
358
|
4104: "wrongAssetType",
|
|
354
359
|
4105: "jsException",
|
|
355
360
|
4106: "navigatorNotFound",
|
|
356
361
|
4107: "invalidActionUrl",
|
|
362
|
+
4108: "unsupportedUrlScheme",
|
|
363
|
+
4200: "webKit",
|
|
364
|
+
4300: "platformView",
|
|
357
365
|
9e3: "operationInterrupted"
|
|
358
366
|
});
|
|
359
367
|
const ErrorCode = ErrorCodeMapping;
|
|
@@ -414,10 +422,18 @@ const ErrorCodeName = Object.freeze({
|
|
|
414
422
|
fetchTimeoutError: 3101,
|
|
415
423
|
operationInProgress: 3201,
|
|
416
424
|
resolverFailure: 3202,
|
|
425
|
+
platformNotSupported: 4001,
|
|
426
|
+
adaptyNotActivated: 4002,
|
|
427
|
+
adaptyUINotActivated: 4003,
|
|
428
|
+
activateOnce: 4005,
|
|
429
|
+
wrongComponentType: 4103,
|
|
417
430
|
wrongAssetType: 4104,
|
|
418
431
|
jsException: 4105,
|
|
419
432
|
navigatorNotFound: 4106,
|
|
420
433
|
invalidActionUrl: 4107,
|
|
434
|
+
unsupportedUrlScheme: 4108,
|
|
435
|
+
webKit: 4200,
|
|
436
|
+
platformView: 4300,
|
|
421
437
|
operationInterrupted: 9e3
|
|
422
438
|
});
|
|
423
439
|
function isKnownErrorCode(code) {
|
|
@@ -851,7 +867,7 @@ var AdaptyPriceCoder = class extends SimpleCoder {
|
|
|
851
867
|
},
|
|
852
868
|
currencyCode: {
|
|
853
869
|
key: "currency_code",
|
|
854
|
-
required:
|
|
870
|
+
required: true,
|
|
855
871
|
type: "string"
|
|
856
872
|
},
|
|
857
873
|
currencySymbol: {
|
|
@@ -861,11 +877,14 @@ var AdaptyPriceCoder = class extends SimpleCoder {
|
|
|
861
877
|
},
|
|
862
878
|
localizedString: {
|
|
863
879
|
key: "localized_string",
|
|
864
|
-
required:
|
|
880
|
+
required: true,
|
|
865
881
|
type: "string"
|
|
866
882
|
}
|
|
867
883
|
};
|
|
868
884
|
}
|
|
885
|
+
decode(data) {
|
|
886
|
+
return super.decode(Object.fromEntries(Object.entries(data).filter(([, value]) => value !== null)));
|
|
887
|
+
}
|
|
869
888
|
};
|
|
870
889
|
|
|
871
890
|
//#endregion
|
|
@@ -1921,6 +1940,58 @@ var AdaptyProfileParametersCoder = class extends SimpleCoder {
|
|
|
1921
1940
|
}
|
|
1922
1941
|
};
|
|
1923
1942
|
|
|
1943
|
+
//#endregion
|
|
1944
|
+
//#region src/types/index.ts
|
|
1945
|
+
const VendorStore = Object.freeze({
|
|
1946
|
+
AppStore: "app_store",
|
|
1947
|
+
PlayStore: "play_store",
|
|
1948
|
+
Adapty: "adapty"
|
|
1949
|
+
});
|
|
1950
|
+
const OfferType = Object.freeze({
|
|
1951
|
+
FreeTrial: "free_trial",
|
|
1952
|
+
PayAsYouGo: "pay_as_you_go",
|
|
1953
|
+
PayUpFront: "pay_up_front"
|
|
1954
|
+
});
|
|
1955
|
+
const CancellationReason = Object.freeze({
|
|
1956
|
+
VolountarilyCancelled: "voluntarily_cancelled",
|
|
1957
|
+
BillingError: "billing_error",
|
|
1958
|
+
Refund: "refund",
|
|
1959
|
+
PriceIncrease: "price_increase",
|
|
1960
|
+
ProductWasNotAvailable: "product_was_not_available",
|
|
1961
|
+
Unknown: "unknown"
|
|
1962
|
+
});
|
|
1963
|
+
const Gender = Object.freeze({
|
|
1964
|
+
Female: "f",
|
|
1965
|
+
Male: "m",
|
|
1966
|
+
Other: "o"
|
|
1967
|
+
});
|
|
1968
|
+
const AppTrackingTransparencyStatus = Object.freeze({
|
|
1969
|
+
NotDetermined: 0,
|
|
1970
|
+
Restricted: 1,
|
|
1971
|
+
Denied: 2,
|
|
1972
|
+
Authorized: 3,
|
|
1973
|
+
Unknown: 4
|
|
1974
|
+
});
|
|
1975
|
+
const ProductPeriod = Object.freeze({
|
|
1976
|
+
Day: "day",
|
|
1977
|
+
Week: "week",
|
|
1978
|
+
Month: "month",
|
|
1979
|
+
Year: "year"
|
|
1980
|
+
});
|
|
1981
|
+
const SubscriptionBillingPlan = Object.freeze({
|
|
1982
|
+
UpFront: "up_front",
|
|
1983
|
+
Monthly: "monthly"
|
|
1984
|
+
});
|
|
1985
|
+
const WebPresentation = Object.freeze({
|
|
1986
|
+
BrowserOutApp: "browser_out_app",
|
|
1987
|
+
BrowserInApp: "browser_in_app"
|
|
1988
|
+
});
|
|
1989
|
+
const RefundPreference = Object.freeze({
|
|
1990
|
+
NoPreference: "no_preference",
|
|
1991
|
+
Grant: "grant",
|
|
1992
|
+
Decline: "decline"
|
|
1993
|
+
});
|
|
1994
|
+
|
|
1924
1995
|
//#endregion
|
|
1925
1996
|
//#region src/coders/adapty-subscription.ts
|
|
1926
1997
|
var AdaptySubscriptionCoder = class extends SimpleCoder {
|
|
@@ -2035,7 +2106,7 @@ var AdaptySubscriptionCoder = class extends SimpleCoder {
|
|
|
2035
2106
|
},
|
|
2036
2107
|
billingPlan: {
|
|
2037
2108
|
key: "billing_plan_id",
|
|
2038
|
-
required:
|
|
2109
|
+
required: true,
|
|
2039
2110
|
type: "string"
|
|
2040
2111
|
},
|
|
2041
2112
|
commitmentInfo: {
|
|
@@ -2051,6 +2122,12 @@ var AdaptySubscriptionCoder = class extends SimpleCoder {
|
|
|
2051
2122
|
}
|
|
2052
2123
|
};
|
|
2053
2124
|
}
|
|
2125
|
+
decode(data) {
|
|
2126
|
+
return super.decode({
|
|
2127
|
+
...data,
|
|
2128
|
+
billing_plan_id: data.billing_plan_id ?? SubscriptionBillingPlan.UpFront
|
|
2129
|
+
});
|
|
2130
|
+
}
|
|
2054
2131
|
};
|
|
2055
2132
|
|
|
2056
2133
|
//#endregion
|
|
@@ -2724,58 +2801,6 @@ var CoderFactory = class {
|
|
|
2724
2801
|
}
|
|
2725
2802
|
};
|
|
2726
2803
|
|
|
2727
|
-
//#endregion
|
|
2728
|
-
//#region src/types/index.ts
|
|
2729
|
-
const VendorStore = Object.freeze({
|
|
2730
|
-
AppStore: "app_store",
|
|
2731
|
-
PlayStore: "play_store",
|
|
2732
|
-
Adapty: "adapty"
|
|
2733
|
-
});
|
|
2734
|
-
const OfferType = Object.freeze({
|
|
2735
|
-
FreeTrial: "free_trial",
|
|
2736
|
-
PayAsYouGo: "pay_as_you_go",
|
|
2737
|
-
PayUpFront: "pay_up_front"
|
|
2738
|
-
});
|
|
2739
|
-
const CancellationReason = Object.freeze({
|
|
2740
|
-
VolountarilyCancelled: "voluntarily_cancelled",
|
|
2741
|
-
BillingError: "billing_error",
|
|
2742
|
-
Refund: "refund",
|
|
2743
|
-
PriceIncrease: "price_increase",
|
|
2744
|
-
ProductWasNotAvailable: "product_was_not_available",
|
|
2745
|
-
Unknown: "unknown"
|
|
2746
|
-
});
|
|
2747
|
-
const Gender = Object.freeze({
|
|
2748
|
-
Female: "f",
|
|
2749
|
-
Male: "m",
|
|
2750
|
-
Other: "o"
|
|
2751
|
-
});
|
|
2752
|
-
const AppTrackingTransparencyStatus = Object.freeze({
|
|
2753
|
-
NotDetermined: 0,
|
|
2754
|
-
Restricted: 1,
|
|
2755
|
-
Denied: 2,
|
|
2756
|
-
Authorized: 3,
|
|
2757
|
-
Unknown: 4
|
|
2758
|
-
});
|
|
2759
|
-
const ProductPeriod = Object.freeze({
|
|
2760
|
-
Day: "day",
|
|
2761
|
-
Week: "week",
|
|
2762
|
-
Month: "month",
|
|
2763
|
-
Year: "year"
|
|
2764
|
-
});
|
|
2765
|
-
const SubscriptionBillingPlan = Object.freeze({
|
|
2766
|
-
UpFront: "up_front",
|
|
2767
|
-
Monthly: "monthly"
|
|
2768
|
-
});
|
|
2769
|
-
const WebPresentation = Object.freeze({
|
|
2770
|
-
BrowserOutApp: "browser_out_app",
|
|
2771
|
-
BrowserInApp: "browser_in_app"
|
|
2772
|
-
});
|
|
2773
|
-
const RefundPreference = Object.freeze({
|
|
2774
|
-
NoPreference: "no_preference",
|
|
2775
|
-
Grant: "grant",
|
|
2776
|
-
Decline: "decline"
|
|
2777
|
-
});
|
|
2778
|
-
|
|
2779
2804
|
//#endregion
|
|
2780
2805
|
//#region src/types/bridge.ts
|
|
2781
2806
|
/**
|
|
@@ -2793,6 +2818,7 @@ const MethodNames = [
|
|
|
2793
2818
|
"adapty_ui_dismiss_flow_view",
|
|
2794
2819
|
"adapty_ui_present_flow_view",
|
|
2795
2820
|
"adapty_ui_show_dialog",
|
|
2821
|
+
"adapty_ui_send_app_message",
|
|
2796
2822
|
"adapty_ui_create_onboarding_view",
|
|
2797
2823
|
"adapty_ui_dismiss_onboarding_view",
|
|
2798
2824
|
"adapty_ui_present_onboarding_view",
|
|
@@ -2959,7 +2985,7 @@ function extractFlowCallbackArgs(handlerName, event) {
|
|
|
2959
2985
|
case FlowEventId.DidFailLoadingProducts: return [event.error];
|
|
2960
2986
|
case FlowEventId.DidPerformAction:
|
|
2961
2987
|
if (handlerName === "onUrlPress" && event.action.type === "open_url") return [event.action.value, event.action.openIn];
|
|
2962
|
-
if (handlerName === "onCustomAction" && event.action.type === "custom") return [event.action.value];
|
|
2988
|
+
if (handlerName === "onCustomAction" && event.action.type === "custom") return [event.action.value, event.action.args];
|
|
2963
2989
|
return [];
|
|
2964
2990
|
case FlowEventId.DidFinishWebPaymentNavigation: return [event.product, event.error];
|
|
2965
2991
|
case FlowEventId.DidReceiveAnalyticEvent: return [event.name, event.params];
|
|
@@ -3242,10 +3268,14 @@ function parseFlowUserAction(actionObj) {
|
|
|
3242
3268
|
value: actionObj["value"],
|
|
3243
3269
|
openIn: actionObj["open_in"]
|
|
3244
3270
|
};
|
|
3245
|
-
case "custom":
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3271
|
+
case "custom": {
|
|
3272
|
+
const args = actionObj["arguments"];
|
|
3273
|
+
return {
|
|
3274
|
+
type,
|
|
3275
|
+
value: actionObj["value"],
|
|
3276
|
+
args: typeof args === "object" && args !== null && !Array.isArray(args) ? args : {}
|
|
3277
|
+
};
|
|
3278
|
+
}
|
|
3249
3279
|
case "close":
|
|
3250
3280
|
case "system_back": return { type };
|
|
3251
3281
|
}
|
package/dist/index.d.cts
CHANGED
|
@@ -279,12 +279,32 @@ declare const ErrorCodeMapping: Readonly<{
|
|
|
279
279
|
*/
|
|
280
280
|
3202: "resolverFailure";
|
|
281
281
|
/**
|
|
282
|
-
*
|
|
282
|
+
* AdaptyUI codes.
|
|
283
283
|
*/
|
|
284
|
+
4001: "platformNotSupported";
|
|
285
|
+
/**
|
|
286
|
+
* Adapty SDK must be activated before AdaptyUI.
|
|
287
|
+
*/
|
|
288
|
+
4002: "adaptyNotActivated";
|
|
289
|
+
/**
|
|
290
|
+
* AdaptyUI is not activated (e.g. a view is created without `activateUi`).
|
|
291
|
+
*/
|
|
292
|
+
4003: "adaptyUINotActivated";
|
|
293
|
+
4005: "activateOnce";
|
|
294
|
+
4103: "wrongComponentType";
|
|
284
295
|
4104: "wrongAssetType";
|
|
285
296
|
4105: "jsException";
|
|
286
297
|
4106: "navigatorNotFound";
|
|
287
298
|
4107: "invalidActionUrl";
|
|
299
|
+
/**
|
|
300
|
+
* In-app browser requested for a non-http(s) URL. iOS only.
|
|
301
|
+
*/
|
|
302
|
+
4108: "unsupportedUrlScheme";
|
|
303
|
+
4200: "webKit";
|
|
304
|
+
/**
|
|
305
|
+
* Native platform view failed to initialize.
|
|
306
|
+
*/
|
|
307
|
+
4300: "platformView";
|
|
288
308
|
9000: "operationInterrupted";
|
|
289
309
|
}>;
|
|
290
310
|
declare const ErrorCode: Readonly<{
|
|
@@ -424,12 +444,32 @@ declare const ErrorCode: Readonly<{
|
|
|
424
444
|
*/
|
|
425
445
|
3202: "resolverFailure";
|
|
426
446
|
/**
|
|
427
|
-
*
|
|
447
|
+
* AdaptyUI codes.
|
|
448
|
+
*/
|
|
449
|
+
4001: "platformNotSupported";
|
|
450
|
+
/**
|
|
451
|
+
* Adapty SDK must be activated before AdaptyUI.
|
|
452
|
+
*/
|
|
453
|
+
4002: "adaptyNotActivated";
|
|
454
|
+
/**
|
|
455
|
+
* AdaptyUI is not activated (e.g. a view is created without `activateUi`).
|
|
428
456
|
*/
|
|
457
|
+
4003: "adaptyUINotActivated";
|
|
458
|
+
4005: "activateOnce";
|
|
459
|
+
4103: "wrongComponentType";
|
|
429
460
|
4104: "wrongAssetType";
|
|
430
461
|
4105: "jsException";
|
|
431
462
|
4106: "navigatorNotFound";
|
|
432
463
|
4107: "invalidActionUrl";
|
|
464
|
+
/**
|
|
465
|
+
* In-app browser requested for a non-http(s) URL. iOS only.
|
|
466
|
+
*/
|
|
467
|
+
4108: "unsupportedUrlScheme";
|
|
468
|
+
4200: "webKit";
|
|
469
|
+
/**
|
|
470
|
+
* Native platform view failed to initialize.
|
|
471
|
+
*/
|
|
472
|
+
4300: "platformView";
|
|
433
473
|
9000: "operationInterrupted";
|
|
434
474
|
}>;
|
|
435
475
|
/** A code known to this version of the SDK. */
|
|
@@ -499,10 +539,18 @@ declare const ErrorCodeName: Readonly<{
|
|
|
499
539
|
readonly fetchTimeoutError: 3101;
|
|
500
540
|
readonly operationInProgress: 3201;
|
|
501
541
|
readonly resolverFailure: 3202;
|
|
542
|
+
readonly platformNotSupported: 4001;
|
|
543
|
+
readonly adaptyNotActivated: 4002;
|
|
544
|
+
readonly adaptyUINotActivated: 4003;
|
|
545
|
+
readonly activateOnce: 4005;
|
|
546
|
+
readonly wrongComponentType: 4103;
|
|
502
547
|
readonly wrongAssetType: 4104;
|
|
503
548
|
readonly jsException: 4105;
|
|
504
549
|
readonly navigatorNotFound: 4106;
|
|
505
550
|
readonly invalidActionUrl: 4107;
|
|
551
|
+
readonly unsupportedUrlScheme: 4108;
|
|
552
|
+
readonly webKit: 4200;
|
|
553
|
+
readonly platformView: 4300;
|
|
506
554
|
readonly operationInterrupted: 9000;
|
|
507
555
|
}>;
|
|
508
556
|
type ErrorCodeName = keyof typeof ErrorCodeName;
|
|
@@ -597,7 +645,7 @@ interface AdaptyPrice {
|
|
|
597
645
|
* used to format the price of the product.
|
|
598
646
|
* The ISO 4217 (USD, EUR).
|
|
599
647
|
*/
|
|
600
|
-
currencyCode
|
|
648
|
+
currencyCode: string;
|
|
601
649
|
/**
|
|
602
650
|
* The currency symbol of the locale
|
|
603
651
|
* used to format the price of the product.
|
|
@@ -609,7 +657,7 @@ interface AdaptyPrice {
|
|
|
609
657
|
* by the preferred language set on the device.
|
|
610
658
|
* On Android, the formatted price from Google Play as is.
|
|
611
659
|
*/
|
|
612
|
-
localizedString
|
|
660
|
+
localizedString: string;
|
|
613
661
|
}
|
|
614
662
|
/**
|
|
615
663
|
* Describes a single paywall variation inside a flow.
|
|
@@ -1000,7 +1048,7 @@ interface AdaptyAccessLevel {
|
|
|
1000
1048
|
*/
|
|
1001
1049
|
readonly willRenew: boolean;
|
|
1002
1050
|
/**
|
|
1003
|
-
* Billing plan of the subscription.
|
|
1051
|
+
* Billing plan of the subscription. May be absent when the native SDK does not report it.
|
|
1004
1052
|
* @readonly
|
|
1005
1053
|
*/
|
|
1006
1054
|
readonly billingPlan?: SubscriptionBillingPlan;
|
|
@@ -1179,10 +1227,10 @@ interface AdaptySubscription {
|
|
|
1179
1227
|
*/
|
|
1180
1228
|
readonly willRenew: boolean;
|
|
1181
1229
|
/**
|
|
1182
|
-
* Billing plan of the subscription.
|
|
1230
|
+
* Billing plan of the subscription. `up_front` unless the subscription is billed in installments.
|
|
1183
1231
|
* @readonly
|
|
1184
1232
|
*/
|
|
1185
|
-
readonly billingPlan
|
|
1233
|
+
readonly billingPlan: SubscriptionBillingPlan;
|
|
1186
1234
|
/**
|
|
1187
1235
|
* Commitment progress of a subscription bought with a commitment billing plan.
|
|
1188
1236
|
* Set for App Store purchases only, see {@link store}.
|
|
@@ -1665,6 +1713,7 @@ type FlowUserAction = {
|
|
|
1665
1713
|
} | {
|
|
1666
1714
|
type: 'custom';
|
|
1667
1715
|
value: string;
|
|
1716
|
+
args: Record<string, unknown>;
|
|
1668
1717
|
};
|
|
1669
1718
|
interface FlowDidPerformActionEvent extends BaseFlowEvent {
|
|
1670
1719
|
id: typeof FlowEventId.DidPerformAction;
|
|
@@ -1883,7 +1932,13 @@ interface FlowEventHandlers {
|
|
|
1883
1932
|
* @param {AdaptyError} error - AdaptyError object with error code and message
|
|
1884
1933
|
*/
|
|
1885
1934
|
onLoadingProductsFailed: (error: AdaptyError) => EventHandlerResult;
|
|
1886
|
-
|
|
1935
|
+
/**
|
|
1936
|
+
* Called when the user performs a custom action inside the flow.
|
|
1937
|
+
*
|
|
1938
|
+
* @param actionId - Custom action id configured in the dashboard
|
|
1939
|
+
* @param args - Custom action arguments; empty object when none were configured
|
|
1940
|
+
*/
|
|
1941
|
+
onCustomAction: (actionId: string, args: Record<string, unknown>) => EventHandlerResult;
|
|
1887
1942
|
/**
|
|
1888
1943
|
* Called when the user taps a URL/link inside the paywall.
|
|
1889
1944
|
*
|
|
@@ -2626,6 +2681,17 @@ interface components {
|
|
|
2626
2681
|
}, {
|
|
2627
2682
|
success: true;
|
|
2628
2683
|
}]>;
|
|
2684
|
+
'AdaptyUISendAppMessage.Request': {
|
|
2685
|
+
method: 'adapty_ui_send_app_message';
|
|
2686
|
+
id: string;
|
|
2687
|
+
message_id: string;
|
|
2688
|
+
payload: Record<string, unknown>;
|
|
2689
|
+
};
|
|
2690
|
+
'AdaptyUISendAppMessage.Response': OneOf<[{
|
|
2691
|
+
error: components['defs']['AdaptyError'];
|
|
2692
|
+
}, {
|
|
2693
|
+
success: true;
|
|
2694
|
+
}]>;
|
|
2629
2695
|
'AdaptyUIPresentOnboardingView.Request': {
|
|
2630
2696
|
method: 'adapty_ui_present_onboarding_view';
|
|
2631
2697
|
id: string;
|
|
@@ -3231,7 +3297,6 @@ interface components {
|
|
|
3231
3297
|
CustomerIdentityParameters: {
|
|
3232
3298
|
app_account_token?: string;
|
|
3233
3299
|
obfuscated_account_id?: string;
|
|
3234
|
-
obfuscated_profile_id?: string;
|
|
3235
3300
|
};
|
|
3236
3301
|
'AdaptyPaywallProduct.Response': {
|
|
3237
3302
|
vendor_product_id: string;
|
|
@@ -3254,9 +3319,9 @@ interface components {
|
|
|
3254
3319
|
};
|
|
3255
3320
|
AdaptyPrice: {
|
|
3256
3321
|
amount: number;
|
|
3257
|
-
currency_code
|
|
3322
|
+
currency_code: string;
|
|
3258
3323
|
currency_symbol?: string;
|
|
3259
|
-
localized_string
|
|
3324
|
+
localized_string: string;
|
|
3260
3325
|
};
|
|
3261
3326
|
'AdaptyPromotedProduct.Request': {
|
|
3262
3327
|
purchase_intent_id?: string;
|
|
@@ -3490,7 +3555,7 @@ interface components {
|
|
|
3490
3555
|
active_promotional_offer_id?: string;
|
|
3491
3556
|
offer_id?: string;
|
|
3492
3557
|
cancellation_reason?: string;
|
|
3493
|
-
billing_plan_id
|
|
3558
|
+
billing_plan_id: string;
|
|
3494
3559
|
commitment?: components['defs']['AdaptyProfile.SubscriptionCommitmentInfo'];
|
|
3495
3560
|
};
|
|
3496
3561
|
'AdaptyProfile.SubscriptionCommitmentInfo': {
|
|
@@ -3565,6 +3630,7 @@ interface components {
|
|
|
3565
3630
|
}, {
|
|
3566
3631
|
type: 'custom';
|
|
3567
3632
|
value: string;
|
|
3633
|
+
arguments?: Record<string, unknown>;
|
|
3568
3634
|
}]>;
|
|
3569
3635
|
'AdaptyUI.Permission': 'push' | 'camera' | 'microphone' | 'location_when_use' | 'location_always' | 'location_full_accuracy' | 'photos' | 'contacts' | 'tracking' | 'calendar' | 'bluetooth' | 'motion' | 'reminders' | 'speech' | 'media_library' | 'local_network' | 'focus_status' | 'homekit' | 'health' | 'siri' | 'music' | (string & {});
|
|
3570
3636
|
'AdaptyUI.CustomTagsValues': {
|
|
@@ -3763,11 +3829,7 @@ declare class AdaptyFlowCoder extends Coder<Model$34, CodableModel$3, Serializab
|
|
|
3763
3829
|
//#endregion
|
|
3764
3830
|
//#region src/coders/adapty-identify-params.d.ts
|
|
3765
3831
|
type Model$33 = IdentifyParamsInput;
|
|
3766
|
-
type Serializable$34 =
|
|
3767
|
-
app_account_token?: string;
|
|
3768
|
-
obfuscated_account_id?: string;
|
|
3769
|
-
obfuscated_profile_id?: string;
|
|
3770
|
-
};
|
|
3832
|
+
type Serializable$34 = Def['CustomerIdentityParameters'];
|
|
3771
3833
|
declare class AdaptyIdentifyParamsCoder {
|
|
3772
3834
|
private readonly platform;
|
|
3773
3835
|
constructor(platform: IPlatformAdapter);
|
|
@@ -3801,7 +3863,7 @@ declare class AdaptyInstallationStatusCoder implements Converter<AdaptyInstallat
|
|
|
3801
3863
|
* native side does not register would fail at runtime, not at compile time.
|
|
3802
3864
|
* @internal
|
|
3803
3865
|
*/
|
|
3804
|
-
declare const MethodNames: readonly ["activate", "adapty_ui_create_flow_view", "adapty_ui_destroy_flow_view", "adapty_ui_dismiss_flow_view", "adapty_ui_present_flow_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_flow", "get_flow_for_default_audience", "get_paywall_products", "get_pending_store_message_types", "get_onboarding", "get_onboarding_for_default_audience", "get_profile", "get_log_level", "get_sdk_version", "identify", "log_show_flow", "logout", "make_promoted_purchase", "make_purchase", "open_web_paywall", "preload_flows", "preload_flows_for_default_audience", "present_code_redemption_sheet", "report_transaction", "restore_purchases", "set_fallback", "set_integration_identifiers", "set_log_level", "show_store_messages", "update_collecting_refund_data_consent", "update_external_attribution_data", "update_profile", "update_refund_preference", "flow_view_did_answer_permission", "adapty_ui_open_url", "adapty_ui_request_app_review", "observer_purchase_did_start", "observer_purchase_did_finish", "observer_restore_did_start", "observer_restore_did_finish"];
|
|
3866
|
+
declare const MethodNames: readonly ["activate", "adapty_ui_create_flow_view", "adapty_ui_destroy_flow_view", "adapty_ui_dismiss_flow_view", "adapty_ui_present_flow_view", "adapty_ui_show_dialog", "adapty_ui_send_app_message", "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_flow", "get_flow_for_default_audience", "get_paywall_products", "get_pending_store_message_types", "get_onboarding", "get_onboarding_for_default_audience", "get_profile", "get_log_level", "get_sdk_version", "identify", "log_show_flow", "logout", "make_promoted_purchase", "make_purchase", "open_web_paywall", "preload_flows", "preload_flows_for_default_audience", "present_code_redemption_sheet", "report_transaction", "restore_purchases", "set_fallback", "set_integration_identifiers", "set_log_level", "show_store_messages", "update_collecting_refund_data_consent", "update_external_attribution_data", "update_profile", "update_refund_preference", "flow_view_did_answer_permission", "adapty_ui_open_url", "adapty_ui_request_app_review", "observer_purchase_did_start", "observer_purchase_did_finish", "observer_restore_did_start", "observer_restore_did_finish"];
|
|
3805
3867
|
type MethodName = (typeof MethodNames)[number];
|
|
3806
3868
|
/**
|
|
3807
3869
|
* Types of values that can be passed
|
|
@@ -3935,6 +3997,7 @@ type Model$26 = AdaptyPrice;
|
|
|
3935
3997
|
type Serializable$27 = Def['AdaptyPrice'];
|
|
3936
3998
|
declare class AdaptyPriceCoder extends SimpleCoder<Model$26, Serializable$27> {
|
|
3937
3999
|
protected properties: Properties<Model$26, Serializable$27>;
|
|
4000
|
+
decode(data: Serializable$27): Model$26;
|
|
3938
4001
|
}
|
|
3939
4002
|
|
|
3940
4003
|
//#endregion
|
|
@@ -4067,6 +4130,7 @@ type Model$11 = AdaptySubscription;
|
|
|
4067
4130
|
type Serializable$12 = Def['AdaptyProfile.Subscription'];
|
|
4068
4131
|
declare class AdaptySubscriptionCoder extends SimpleCoder<Model$11, Serializable$12> {
|
|
4069
4132
|
protected properties: Properties<Model$11, Serializable$12>;
|
|
4133
|
+
decode(data: Serializable$12): Model$11;
|
|
4070
4134
|
}
|
|
4071
4135
|
|
|
4072
4136
|
//#endregion
|
|
@@ -4335,8 +4399,22 @@ interface OnboardingErrorEvent extends BaseOnboardingEvent {
|
|
|
4335
4399
|
}
|
|
4336
4400
|
type ParsedOnboardingEvent = OnboardingCloseEvent | OnboardingCustomEvent | OnboardingPaywallEvent | OnboardingStateUpdatedEvent | OnboardingFinishedLoadingEvent | OnboardingAnalyticsEvent | OnboardingErrorEvent;
|
|
4337
4401
|
|
|
4402
|
+
//#endregion
|
|
4403
|
+
//#region src/types/flow-message.d.ts
|
|
4404
|
+
/** JSON value allowed inside an {@link AdaptyFlowMessage}. */
|
|
4405
|
+
type AdaptyFlowMessageValue = string | number | boolean | null | AdaptyFlowMessage | readonly AdaptyFlowMessageValue[];
|
|
4406
|
+
/**
|
|
4407
|
+
* Message exchanged with the flow script: a JSON object, delivered to the
|
|
4408
|
+
* script as the content of an SDK event.
|
|
4409
|
+
* Use finite numbers, omit unset properties or use `null`, avoid cycles.
|
|
4410
|
+
*/
|
|
4411
|
+
type AdaptyFlowMessage = {
|
|
4412
|
+
readonly [key: string]: AdaptyFlowMessageValue;
|
|
4413
|
+
};
|
|
4414
|
+
|
|
4338
4415
|
//#endregion
|
|
4339
4416
|
//#region src/ui-builder/flow-event-mapping.d.ts
|
|
4417
|
+
//# sourceMappingURL=flow-message.d.ts.map
|
|
4340
4418
|
type EventName$1 = keyof FlowEventHandlers;
|
|
4341
4419
|
/**
|
|
4342
4420
|
* Resolves native event to handler name based on event data
|
|
@@ -4449,5 +4527,5 @@ declare function withErrorContext<T extends (...args: never[]) => unknown>(callb
|
|
|
4449
4527
|
//#endregion
|
|
4450
4528
|
//# sourceMappingURL=with-error-context.d.ts.map
|
|
4451
4529
|
|
|
4452
|
-
export { ActivateParamsInput, AdaptyAccessLevel, AdaptyAndroidPurchaseParams, AdaptyAndroidSubscriptionUpdateReplacementMode, AdaptyBridgeError, AdaptyCustomAsset, AdaptyCustomColorAsset, AdaptyCustomGradientAsset, AdaptyCustomImageAsset, AdaptyCustomVideoAsset, AdaptyDiscountPhase, AdaptyError, AdaptyErrorInput, AdaptyExternalAttributionProvider, AdaptyFlow, AdaptyFlowPaywall, AdaptyFlowUiSchema, AdaptyFlowUiSchemaGrid, AdaptyFlowUiSchemaLayout, AdaptyIOSPresentationStyle, AdaptyInstallationDetails, AdaptyInstallationStatus, AdaptyNativeError, AdaptyNonSubscription, AdaptyOnboarding, AdaptyOnboardingBuilder, AdaptyPaywallProduct, AdaptyPermission, AdaptyPlacement, AdaptyPrice, AdaptyProductIdentifier, AdaptyProfile, AdaptyProfileParameters, AdaptyProfileSubscriptionCommitmentInfo, AdaptyPromotedProduct, AdaptyPurchaseResult, AdaptyRemoteConfig, AdaptyStoreMessageType, AdaptySubscription, AdaptySubscriptionCommitmentInfo, AdaptySubscriptionDetails, AdaptySubscriptionOffer, AdaptySubscriptionOfferId, AdaptySubscriptionPeriod, AdaptySubscriptionPricingTerms, AdaptyType, AdaptyUiDialogActionType, AdaptyUiDialogConfig, AdaptyUiMediaCache, AdaptyUiOnboardingMeta, AdaptyUiOnboardingStateParams, AdaptyUiView, AppTrackingTransparencyStatus, ArgType, CancellationReason, CoderDependencies, CoderFactory, Converter, CreateFlowViewParamsInput, CreateOnboardingViewParamsInput, DefaultLoggerAdapter, DefaultPlatformAdapter, DefaultSdkMetadataAdapter, ErrorCode, ErrorCodeName, ErrorConverter, EventHandlerResult, FetchPolicy, FileLocation, FlowDidAppearEvent, FlowDidAskPermissionEvent, FlowDidDisappearEvent, FlowDidFailLoadingProductsEvent, FlowDidFailPurchaseEvent, FlowDidFailRestoreEvent, FlowDidFinishPurchaseEvent, FlowDidFinishRestoreEvent, FlowDidFinishWebPaymentNavigationEvent, FlowDidPerformActionEvent, FlowDidReceiveAnalyticEvent, FlowDidReceiveErrorEvent, FlowDidRequestAppReviewEvent, FlowDidSelectProductEvent, FlowDidStartPurchaseEvent, FlowDidStartRestoreEvent, FlowEventHandlers, FlowEventId, FlowEventIdType, FlowEventView, FlowObserverDidInitiatePurchaseEvent, FlowObserverDidInitiateRestoreEvent, FlowPermissionResponse, FlowPermissionStatus, FlowUserAction, GLOBAL_EVENT_TO_NATIVE_EVENT, Gender, GetPaywallProductsParamsInput, GetPlacementForDefaultAudienceParamsInput, GetPlacementParamsInput, GlobalEventIdType, GlobalEventName, HANDLER_TO_EVENT_CONFIG, HANDLER_TO_NATIVE_EVENT, ILogContext, ILogScope, ILoggerAdapter, IPlatformAdapter, ISdkMetadataAdapter, IdentifyParamsInput, KnownErrorCode, Log, LogArgs, LogContext, LogEvent, LogLevel, LogScope, LogSink, LogTrace, LoggerConfig, MakePurchaseParamsInput, MethodName, MethodNames, NATIVE_EVENT_RESOLVER, NATIVE_EVENT_TO_HANDLERS, ONBOARDING_EVENT_MAPPINGS, OfferType, OnboardingAnalyticsEvent, OnboardingAnalyticsEventName, OnboardingCloseEvent, OnboardingCustomEvent, OnboardingErrorEvent, OnboardingEventHandlers, OnboardingEventId, OnboardingEventIdType, OnboardingEventView, OnboardingFinishedLoadingEvent, OnboardingPaywallEvent, OnboardingStateUpdatedAction, OnboardingStateUpdatedEvent, ParsedFlowEvent, ParsedOnboardingEvent, PlatformOS, PreloadPlacementsParamsInput, ProductPeriod, ProductPurchaseParams, ProductReference, ProductReferencePricingTerms, RefundPreference, ReportTransactionParamsInput, ScopeArgs, Serializable$1 as Serializable, SubscriptionBillingPlan, VendorStore, WebPresentation, components, consoleLogSink, extractFlowCallbackArgs, extractOnboardingCallbackArgs, filterUndefined, generateId, getErrorCode, getErrorCodeName, getErrorPrompt, isKnownErrorCode, mapValues, mergeOptions, parseCommonEvent, parseFlowEvent, parseMethodResult, parseOnboardingEvent, withErrorContext };
|
|
4530
|
+
export { ActivateParamsInput, AdaptyAccessLevel, AdaptyAndroidPurchaseParams, AdaptyAndroidSubscriptionUpdateReplacementMode, AdaptyBridgeError, AdaptyCustomAsset, AdaptyCustomColorAsset, AdaptyCustomGradientAsset, AdaptyCustomImageAsset, AdaptyCustomVideoAsset, AdaptyDiscountPhase, AdaptyError, AdaptyErrorInput, AdaptyExternalAttributionProvider, AdaptyFlow, AdaptyFlowMessage, AdaptyFlowMessageValue, AdaptyFlowPaywall, AdaptyFlowUiSchema, AdaptyFlowUiSchemaGrid, AdaptyFlowUiSchemaLayout, AdaptyIOSPresentationStyle, AdaptyInstallationDetails, AdaptyInstallationStatus, AdaptyNativeError, AdaptyNonSubscription, AdaptyOnboarding, AdaptyOnboardingBuilder, AdaptyPaywallProduct, AdaptyPermission, AdaptyPlacement, AdaptyPrice, AdaptyProductIdentifier, AdaptyProfile, AdaptyProfileParameters, AdaptyProfileSubscriptionCommitmentInfo, AdaptyPromotedProduct, AdaptyPurchaseResult, AdaptyRemoteConfig, AdaptyStoreMessageType, AdaptySubscription, AdaptySubscriptionCommitmentInfo, AdaptySubscriptionDetails, AdaptySubscriptionOffer, AdaptySubscriptionOfferId, AdaptySubscriptionPeriod, AdaptySubscriptionPricingTerms, AdaptyType, AdaptyUiDialogActionType, AdaptyUiDialogConfig, AdaptyUiMediaCache, AdaptyUiOnboardingMeta, AdaptyUiOnboardingStateParams, AdaptyUiView, AppTrackingTransparencyStatus, ArgType, CancellationReason, CoderDependencies, CoderFactory, Converter, CreateFlowViewParamsInput, CreateOnboardingViewParamsInput, DefaultLoggerAdapter, DefaultPlatformAdapter, DefaultSdkMetadataAdapter, ErrorCode, ErrorCodeName, ErrorConverter, EventHandlerResult, FetchPolicy, FileLocation, FlowDidAppearEvent, FlowDidAskPermissionEvent, FlowDidDisappearEvent, FlowDidFailLoadingProductsEvent, FlowDidFailPurchaseEvent, FlowDidFailRestoreEvent, FlowDidFinishPurchaseEvent, FlowDidFinishRestoreEvent, FlowDidFinishWebPaymentNavigationEvent, FlowDidPerformActionEvent, FlowDidReceiveAnalyticEvent, FlowDidReceiveErrorEvent, FlowDidRequestAppReviewEvent, FlowDidSelectProductEvent, FlowDidStartPurchaseEvent, FlowDidStartRestoreEvent, FlowEventHandlers, FlowEventId, FlowEventIdType, FlowEventView, FlowObserverDidInitiatePurchaseEvent, FlowObserverDidInitiateRestoreEvent, FlowPermissionResponse, FlowPermissionStatus, FlowUserAction, GLOBAL_EVENT_TO_NATIVE_EVENT, Gender, GetPaywallProductsParamsInput, GetPlacementForDefaultAudienceParamsInput, GetPlacementParamsInput, GlobalEventIdType, GlobalEventName, HANDLER_TO_EVENT_CONFIG, HANDLER_TO_NATIVE_EVENT, ILogContext, ILogScope, ILoggerAdapter, IPlatformAdapter, ISdkMetadataAdapter, IdentifyParamsInput, KnownErrorCode, Log, LogArgs, LogContext, LogEvent, LogLevel, LogScope, LogSink, LogTrace, LoggerConfig, MakePurchaseParamsInput, MethodName, MethodNames, NATIVE_EVENT_RESOLVER, NATIVE_EVENT_TO_HANDLERS, ONBOARDING_EVENT_MAPPINGS, OfferType, OnboardingAnalyticsEvent, OnboardingAnalyticsEventName, OnboardingCloseEvent, OnboardingCustomEvent, OnboardingErrorEvent, OnboardingEventHandlers, OnboardingEventId, OnboardingEventIdType, OnboardingEventView, OnboardingFinishedLoadingEvent, OnboardingPaywallEvent, OnboardingStateUpdatedAction, OnboardingStateUpdatedEvent, ParsedFlowEvent, ParsedOnboardingEvent, PlatformOS, PreloadPlacementsParamsInput, ProductPeriod, ProductPurchaseParams, ProductReference, ProductReferencePricingTerms, RefundPreference, ReportTransactionParamsInput, ScopeArgs, Serializable$1 as Serializable, SubscriptionBillingPlan, VendorStore, WebPresentation, components, consoleLogSink, extractFlowCallbackArgs, extractOnboardingCallbackArgs, filterUndefined, generateId, getErrorCode, getErrorCodeName, getErrorPrompt, isKnownErrorCode, mapValues, mergeOptions, parseCommonEvent, parseFlowEvent, parseMethodResult, parseOnboardingEvent, withErrorContext };
|
|
4453
4531
|
//# sourceMappingURL=index.d.cts.map
|