@adapty/capacitor 3.16.0 → 3.16.2
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/AdaptyCapacitor.podspec +3 -3
- package/Package.swift +1 -1
- package/README.md +1 -1
- package/dist/esm/adapters.d.ts +16 -0
- package/dist/esm/adapters.js +31 -0
- package/dist/esm/adapters.js.map +1 -0
- package/dist/esm/adapty-emitter.js +2 -2
- package/dist/esm/adapty-emitter.js.map +1 -1
- package/dist/esm/adapty.d.ts +8 -6
- package/dist/esm/adapty.js +40 -78
- package/dist/esm/adapty.js.map +1 -1
- package/dist/esm/coders/factory.d.ts +6 -0
- package/dist/esm/coders/factory.js +11 -0
- package/dist/esm/coders/factory.js.map +1 -0
- package/dist/esm/coders/parse-onboarding.d.ts +3 -0
- package/dist/esm/coders/parse-onboarding.js +4 -0
- package/dist/esm/coders/parse-onboarding.js.map +1 -0
- package/dist/esm/coders/parse-paywall.d.ts +3 -0
- package/dist/esm/coders/parse-paywall.js +4 -0
- package/dist/esm/coders/parse-paywall.js.map +1 -0
- package/dist/esm/coders/parse.d.ts +5 -0
- package/dist/esm/coders/parse.js +5 -0
- package/dist/esm/coders/parse.js.map +1 -0
- package/dist/esm/default-configs.js +1 -1
- package/dist/esm/default-configs.js.map +1 -1
- package/dist/esm/index.d.ts +5 -7
- package/dist/esm/index.js +3 -5
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/logger/index.d.ts +2 -0
- package/dist/esm/logger/index.js +2 -0
- package/dist/esm/logger/index.js.map +1 -0
- package/dist/esm/types/adapty-plugin.d.ts +4 -4
- package/dist/esm/types/adapty-plugin.js.map +1 -1
- package/dist/esm/types/configs.d.ts +2 -2
- package/dist/esm/types/configs.js.map +1 -1
- package/dist/esm/types/index.d.ts +5 -0
- package/dist/esm/types/index.js +6 -0
- package/dist/esm/types/index.js.map +1 -0
- package/dist/esm/types/inputs.d.ts +1 -0
- package/dist/esm/types/inputs.js +2 -0
- package/dist/esm/types/inputs.js.map +1 -0
- package/dist/esm/types/method-types.d.ts +1 -0
- package/dist/esm/types/method-types.js +2 -0
- package/dist/esm/types/method-types.js.map +1 -0
- package/dist/esm/types/onboarding-events.d.ts +1 -0
- package/dist/esm/types/onboarding-events.js +2 -0
- package/dist/esm/types/onboarding-events.js.map +1 -0
- package/dist/esm/types/paywall-events.d.ts +1 -0
- package/dist/esm/types/paywall-events.js +2 -0
- package/dist/esm/types/paywall-events.js.map +1 -0
- package/dist/esm/ui-builder/base-view-emitter.d.ts +1 -1
- package/dist/esm/ui-builder/base-view-emitter.js +1 -1
- package/dist/esm/ui-builder/base-view-emitter.js.map +1 -1
- package/dist/esm/ui-builder/create-onboarding-view.d.ts +1 -1
- package/dist/esm/ui-builder/create-onboarding-view.js.map +1 -1
- package/dist/esm/ui-builder/create-paywall-view.d.ts +1 -1
- package/dist/esm/ui-builder/create-paywall-view.js.map +1 -1
- package/dist/esm/ui-builder/onboarding-view-controller.d.ts +1 -1
- package/dist/esm/ui-builder/onboarding-view-controller.js +7 -9
- package/dist/esm/ui-builder/onboarding-view-controller.js.map +1 -1
- package/dist/esm/ui-builder/onboarding-view-emitter.d.ts +2 -2
- package/dist/esm/ui-builder/onboarding-view-emitter.js +2 -2
- package/dist/esm/ui-builder/onboarding-view-emitter.js.map +1 -1
- package/dist/esm/ui-builder/paywall-view-controller.d.ts +1 -1
- package/dist/esm/ui-builder/paywall-view-controller.js +6 -8
- package/dist/esm/ui-builder/paywall-view-controller.js.map +1 -1
- package/dist/esm/ui-builder/paywall-view-emitter.d.ts +2 -2
- package/dist/esm/ui-builder/paywall-view-emitter.js +2 -2
- package/dist/esm/ui-builder/paywall-view-emitter.js.map +1 -1
- package/dist/esm/ui-builder/types.d.ts +3 -3
- package/dist/esm/ui-builder/types.js +1 -1
- package/dist/esm/ui-builder/types.js.map +1 -1
- package/dist/esm/utils/index.d.ts +1 -0
- package/dist/esm/utils/index.js +2 -0
- package/dist/esm/utils/index.js.map +1 -0
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/esm/version.js.map +1 -1
- package/dist/plugin.cjs.js +2882 -2777
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +5321 -5216
- package/dist/plugin.js.map +1 -1
- package/package.json +13 -7
- package/dist/esm/coder-registry.d.ts +0 -27
- package/dist/esm/coder-registry.js +0 -25
- package/dist/esm/coder-registry.js.map +0 -1
- package/dist/esm/shared/adapty-error.d.ts +0 -19
- package/dist/esm/shared/adapty-error.js +0 -46
- package/dist/esm/shared/adapty-error.js.map +0 -1
- package/dist/esm/shared/coders/adapty-access-level.d.ts +0 -10
- package/dist/esm/shared/coders/adapty-access-level.js +0 -113
- package/dist/esm/shared/coders/adapty-access-level.js.map +0 -1
- package/dist/esm/shared/coders/adapty-configuration.d.ts +0 -8
- package/dist/esm/shared/coders/adapty-configuration.js +0 -68
- package/dist/esm/shared/coders/adapty-configuration.js.map +0 -1
- package/dist/esm/shared/coders/adapty-discount-phase.d.ts +0 -10
- package/dist/esm/shared/coders/adapty-discount-phase.js +0 -39
- package/dist/esm/shared/coders/adapty-discount-phase.js.map +0 -1
- package/dist/esm/shared/coders/adapty-identify-params.d.ts +0 -11
- package/dist/esm/shared/coders/adapty-identify-params.js +0 -19
- package/dist/esm/shared/coders/adapty-identify-params.js.map +0 -1
- package/dist/esm/shared/coders/adapty-installation-details.d.ts +0 -7
- package/dist/esm/shared/coders/adapty-installation-details.js +0 -25
- package/dist/esm/shared/coders/adapty-installation-details.js.map +0 -1
- package/dist/esm/shared/coders/adapty-installation-status.d.ts +0 -7
- package/dist/esm/shared/coders/adapty-installation-status.js +0 -42
- package/dist/esm/shared/coders/adapty-installation-status.js.map +0 -1
- package/dist/esm/shared/coders/adapty-native-error.d.ts +0 -14
- package/dist/esm/shared/coders/adapty-native-error.js +0 -21
- package/dist/esm/shared/coders/adapty-native-error.js.map +0 -1
- package/dist/esm/shared/coders/adapty-non-subscription.d.ts +0 -10
- package/dist/esm/shared/coders/adapty-non-subscription.js +0 -31
- package/dist/esm/shared/coders/adapty-non-subscription.js.map +0 -1
- package/dist/esm/shared/coders/adapty-onboarding-builder.d.ts +0 -10
- package/dist/esm/shared/coders/adapty-onboarding-builder.js +0 -14
- package/dist/esm/shared/coders/adapty-onboarding-builder.js.map +0 -1
- package/dist/esm/shared/coders/adapty-onboarding.d.ts +0 -13
- package/dist/esm/shared/coders/adapty-onboarding.js +0 -55
- package/dist/esm/shared/coders/adapty-onboarding.js.map +0 -1
- package/dist/esm/shared/coders/adapty-paywall-builder.d.ts +0 -10
- package/dist/esm/shared/coders/adapty-paywall-builder.js +0 -19
- package/dist/esm/shared/coders/adapty-paywall-builder.js.map +0 -1
- package/dist/esm/shared/coders/adapty-paywall-product.d.ts +0 -11
- package/dist/esm/shared/coders/adapty-paywall-product.js +0 -94
- package/dist/esm/shared/coders/adapty-paywall-product.js.map +0 -1
- package/dist/esm/shared/coders/adapty-paywall.d.ts +0 -13
- package/dist/esm/shared/coders/adapty-paywall.js +0 -75
- package/dist/esm/shared/coders/adapty-paywall.js.map +0 -1
- package/dist/esm/shared/coders/adapty-placement.d.ts +0 -10
- package/dist/esm/shared/coders/adapty-placement.js +0 -23
- package/dist/esm/shared/coders/adapty-placement.js.map +0 -1
- package/dist/esm/shared/coders/adapty-price.d.ts +0 -10
- package/dist/esm/shared/coders/adapty-price.js +0 -29
- package/dist/esm/shared/coders/adapty-price.js.map +0 -1
- package/dist/esm/shared/coders/adapty-profile-parameters.d.ts +0 -10
- package/dist/esm/shared/coders/adapty-profile-parameters.js +0 -30
- package/dist/esm/shared/coders/adapty-profile-parameters.js.map +0 -1
- package/dist/esm/shared/coders/adapty-profile.d.ts +0 -10
- package/dist/esm/shared/coders/adapty-profile.js +0 -47
- package/dist/esm/shared/coders/adapty-profile.js.map +0 -1
- package/dist/esm/shared/coders/adapty-purchase-params.d.ts +0 -7
- package/dist/esm/shared/coders/adapty-purchase-params.js +0 -37
- package/dist/esm/shared/coders/adapty-purchase-params.js.map +0 -1
- package/dist/esm/shared/coders/adapty-purchase-result.d.ts +0 -12
- package/dist/esm/shared/coders/adapty-purchase-result.js +0 -54
- package/dist/esm/shared/coders/adapty-purchase-result.js.map +0 -1
- package/dist/esm/shared/coders/adapty-remote-config.d.ts +0 -13
- package/dist/esm/shared/coders/adapty-remote-config.js +0 -41
- package/dist/esm/shared/coders/adapty-remote-config.js.map +0 -1
- package/dist/esm/shared/coders/adapty-subscription-details.d.ts +0 -11
- package/dist/esm/shared/coders/adapty-subscription-details.js +0 -64
- package/dist/esm/shared/coders/adapty-subscription-details.js.map +0 -1
- package/dist/esm/shared/coders/adapty-subscription-offer-identifier.d.ts +0 -10
- package/dist/esm/shared/coders/adapty-subscription-offer-identifier.js +0 -19
- package/dist/esm/shared/coders/adapty-subscription-offer-identifier.js.map +0 -1
- package/dist/esm/shared/coders/adapty-subscription-offer.d.ts +0 -11
- package/dist/esm/shared/coders/adapty-subscription-offer.js +0 -50
- package/dist/esm/shared/coders/adapty-subscription-offer.js.map +0 -1
- package/dist/esm/shared/coders/adapty-subscription-period.d.ts +0 -10
- package/dist/esm/shared/coders/adapty-subscription-period.js +0 -11
- package/dist/esm/shared/coders/adapty-subscription-period.js.map +0 -1
- package/dist/esm/shared/coders/adapty-subscription.d.ts +0 -10
- package/dist/esm/shared/coders/adapty-subscription.js +0 -116
- package/dist/esm/shared/coders/adapty-subscription.js.map +0 -1
- package/dist/esm/shared/coders/adapty-ui-create-onboarding-view-params.d.ts +0 -8
- package/dist/esm/shared/coders/adapty-ui-create-onboarding-view-params.js +0 -10
- package/dist/esm/shared/coders/adapty-ui-create-onboarding-view-params.js.map +0 -1
- package/dist/esm/shared/coders/adapty-ui-create-paywall-view-params.d.ts +0 -18
- package/dist/esm/shared/coders/adapty-ui-create-paywall-view-params.js +0 -142
- package/dist/esm/shared/coders/adapty-ui-create-paywall-view-params.js.map +0 -1
- package/dist/esm/shared/coders/adapty-ui-media-cache.d.ts +0 -10
- package/dist/esm/shared/coders/adapty-ui-media-cache.js +0 -24
- package/dist/esm/shared/coders/adapty-ui-media-cache.js.map +0 -1
- package/dist/esm/shared/coders/adapty-ui-onboarding-meta.d.ts +0 -10
- package/dist/esm/shared/coders/adapty-ui-onboarding-meta.js +0 -29
- package/dist/esm/shared/coders/adapty-ui-onboarding-meta.js.map +0 -1
- package/dist/esm/shared/coders/adapty-ui-onboarding-state-params.d.ts +0 -10
- package/dist/esm/shared/coders/adapty-ui-onboarding-state-params.js +0 -24
- package/dist/esm/shared/coders/adapty-ui-onboarding-state-params.js.map +0 -1
- package/dist/esm/shared/coders/adapty-ui-onboarding-state-updated-action.d.ts +0 -14
- package/dist/esm/shared/coders/adapty-ui-onboarding-state-updated-action.js +0 -55
- package/dist/esm/shared/coders/adapty-ui-onboarding-state-updated-action.js.map +0 -1
- package/dist/esm/shared/coders/array.d.ts +0 -15
- package/dist/esm/shared/coders/array.js +0 -34
- package/dist/esm/shared/coders/array.js.map +0 -1
- package/dist/esm/shared/coders/bridge-error.d.ts +0 -13
- package/dist/esm/shared/coders/bridge-error.js +0 -78
- package/dist/esm/shared/coders/bridge-error.js.map +0 -1
- package/dist/esm/shared/coders/coder.d.ts +0 -13
- package/dist/esm/shared/coders/coder.js +0 -118
- package/dist/esm/shared/coders/coder.js.map +0 -1
- package/dist/esm/shared/coders/date.d.ts +0 -9
- package/dist/esm/shared/coders/date.js +0 -36
- package/dist/esm/shared/coders/date.js.map +0 -1
- package/dist/esm/shared/coders/error-coder.d.ts +0 -6
- package/dist/esm/shared/coders/error-coder.js +0 -2
- package/dist/esm/shared/coders/error-coder.js.map +0 -1
- package/dist/esm/shared/coders/hashmap.d.ts +0 -7
- package/dist/esm/shared/coders/hashmap.js +0 -25
- package/dist/esm/shared/coders/hashmap.js.map +0 -1
- package/dist/esm/shared/coders/json.d.ts +0 -8
- package/dist/esm/shared/coders/json.js +0 -15
- package/dist/esm/shared/coders/json.js.map +0 -1
- package/dist/esm/shared/coders/parse-onboarding.d.ts +0 -3
- package/dist/esm/shared/coders/parse-onboarding.js +0 -86
- package/dist/esm/shared/coders/parse-onboarding.js.map +0 -1
- package/dist/esm/shared/coders/parse-paywall.d.ts +0 -4
- package/dist/esm/shared/coders/parse-paywall.js +0 -141
- package/dist/esm/shared/coders/parse-paywall.js.map +0 -1
- package/dist/esm/shared/coders/parse.d.ts +0 -6
- package/dist/esm/shared/coders/parse.js +0 -135
- package/dist/esm/shared/coders/parse.js.map +0 -1
- package/dist/esm/shared/coders/product-reference.d.ts +0 -10
- package/dist/esm/shared/coders/product-reference.js +0 -53
- package/dist/esm/shared/coders/product-reference.js.map +0 -1
- package/dist/esm/shared/coders/types.d.ts +0 -23
- package/dist/esm/shared/coders/types.js +0 -2
- package/dist/esm/shared/coders/types.js.map +0 -1
- package/dist/esm/shared/coders/utils.d.ts +0 -18
- package/dist/esm/shared/coders/utils.js +0 -50
- package/dist/esm/shared/coders/utils.js.map +0 -1
- package/dist/esm/shared/constants.d.ts +0 -42
- package/dist/esm/shared/constants.js +0 -37
- package/dist/esm/shared/constants.js.map +0 -1
- package/dist/esm/shared/index.d.ts +0 -3
- package/dist/esm/shared/index.js +0 -4
- package/dist/esm/shared/index.js.map +0 -1
- package/dist/esm/shared/logger/console-sink.d.ts +0 -2
- package/dist/esm/shared/logger/console-sink.js +0 -23
- package/dist/esm/shared/logger/console-sink.js.map +0 -1
- package/dist/esm/shared/logger/index.d.ts +0 -5
- package/dist/esm/shared/logger/index.js +0 -5
- package/dist/esm/shared/logger/index.js.map +0 -1
- package/dist/esm/shared/logger/log-context.d.ts +0 -23
- package/dist/esm/shared/logger/log-context.js +0 -61
- package/dist/esm/shared/logger/log-context.js.map +0 -1
- package/dist/esm/shared/logger/log-scope.d.ts +0 -25
- package/dist/esm/shared/logger/log-scope.js +0 -26
- package/dist/esm/shared/logger/log-scope.js.map +0 -1
- package/dist/esm/shared/logger/log.d.ts +0 -34
- package/dist/esm/shared/logger/log.js +0 -110
- package/dist/esm/shared/logger/log.js.map +0 -1
- package/dist/esm/shared/logger/types.d.ts +0 -20
- package/dist/esm/shared/logger/types.js +0 -2
- package/dist/esm/shared/logger/types.js.map +0 -1
- package/dist/esm/shared/types/bridge.d.ts +0 -50
- package/dist/esm/shared/types/bridge.js +0 -78
- package/dist/esm/shared/types/bridge.js.map +0 -1
- package/dist/esm/shared/types/error.d.ts +0 -325
- package/dist/esm/shared/types/error.js +0 -176
- package/dist/esm/shared/types/error.js.map +0 -1
- package/dist/esm/shared/types/index.d.ts +0 -718
- package/dist/esm/shared/types/index.js +0 -14
- package/dist/esm/shared/types/index.js.map +0 -1
- package/dist/esm/shared/types/inputs.d.ts +0 -238
- package/dist/esm/shared/types/inputs.js +0 -42
- package/dist/esm/shared/types/inputs.js.map +0 -1
- package/dist/esm/shared/types/method-types.d.ts +0 -86
- package/dist/esm/shared/types/method-types.js +0 -13
- package/dist/esm/shared/types/method-types.js.map +0 -1
- package/dist/esm/shared/types/onboarding-events.d.ts +0 -60
- package/dist/esm/shared/types/onboarding-events.js +0 -11
- package/dist/esm/shared/types/onboarding-events.js.map +0 -1
- package/dist/esm/shared/types/paywall-events.d.ts +0 -84
- package/dist/esm/shared/types/paywall-events.js +0 -16
- package/dist/esm/shared/types/paywall-events.js.map +0 -1
- package/dist/esm/shared/utils/compact-object.d.ts +0 -6
- package/dist/esm/shared/utils/compact-object.js +0 -9
- package/dist/esm/shared/utils/compact-object.js.map +0 -1
- package/dist/esm/shared/utils/map-values.d.ts +0 -8
- package/dist/esm/shared/utils/map-values.js +0 -11
- package/dist/esm/shared/utils/map-values.js.map +0 -1
- package/dist/esm/shared/utils/merge-options.d.ts +0 -7
- package/dist/esm/shared/utils/merge-options.js +0 -93
- package/dist/esm/shared/utils/merge-options.js.map +0 -1
- package/dist/esm/shared/utils/platform.d.ts +0 -2
- package/dist/esm/shared/utils/platform.js +0 -5
- package/dist/esm/shared/utils/platform.js.map +0 -1
- package/dist/esm/shared/utils/with-error-context.d.ts +0 -7
- package/dist/esm/shared/utils/with-error-context.js +0 -33
- package/dist/esm/shared/utils/with-error-context.js.map +0 -1
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { SimpleCoder } from './coder';
|
|
2
|
-
import { AdaptyAccessLevelCoder } from './adapty-access-level';
|
|
3
|
-
import { AdaptyNonSubscriptionCoder } from './adapty-non-subscription';
|
|
4
|
-
import { AdaptySubscriptionCoder } from './adapty-subscription';
|
|
5
|
-
import { HashmapCoder } from './hashmap';
|
|
6
|
-
import { ArrayCoder } from './array';
|
|
7
|
-
export class AdaptyProfileCoder extends SimpleCoder {
|
|
8
|
-
constructor() {
|
|
9
|
-
super(...arguments);
|
|
10
|
-
this.properties = {
|
|
11
|
-
accessLevels: {
|
|
12
|
-
key: 'paid_access_levels',
|
|
13
|
-
required: false,
|
|
14
|
-
type: 'object',
|
|
15
|
-
converter: new HashmapCoder(new AdaptyAccessLevelCoder()),
|
|
16
|
-
},
|
|
17
|
-
customAttributes: {
|
|
18
|
-
key: 'custom_attributes',
|
|
19
|
-
required: false,
|
|
20
|
-
type: 'object',
|
|
21
|
-
},
|
|
22
|
-
customerUserId: {
|
|
23
|
-
key: 'customer_user_id',
|
|
24
|
-
required: false,
|
|
25
|
-
type: 'string',
|
|
26
|
-
},
|
|
27
|
-
nonSubscriptions: {
|
|
28
|
-
key: 'non_subscriptions',
|
|
29
|
-
required: false,
|
|
30
|
-
type: 'object',
|
|
31
|
-
converter: new HashmapCoder(new ArrayCoder(AdaptyNonSubscriptionCoder)),
|
|
32
|
-
},
|
|
33
|
-
profileId: {
|
|
34
|
-
key: 'profile_id',
|
|
35
|
-
required: true,
|
|
36
|
-
type: 'string',
|
|
37
|
-
},
|
|
38
|
-
subscriptions: {
|
|
39
|
-
key: 'subscriptions',
|
|
40
|
-
required: false,
|
|
41
|
-
type: 'object',
|
|
42
|
-
converter: new HashmapCoder(new AdaptySubscriptionCoder()),
|
|
43
|
-
},
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
//# sourceMappingURL=adapty-profile.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"adapty-profile.js","sourceRoot":"","sources":["../../../../src/shared/coders/adapty-profile.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AACvE,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAKrC,MAAM,OAAO,kBAAmB,SAAQ,WAAgC;IAAxE;;QACY,eAAU,GAAoC;YACtD,YAAY,EAAE;gBACZ,GAAG,EAAE,oBAAoB;gBACzB,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,QAAQ;gBACd,SAAS,EAAE,IAAI,YAAY,CAAC,IAAI,sBAAsB,EAAE,CAAC;aAC1D;YACD,gBAAgB,EAAE;gBAChB,GAAG,EAAE,mBAAmB;gBACxB,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,QAAQ;aACf;YACD,cAAc,EAAE;gBACd,GAAG,EAAE,kBAAkB;gBACvB,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,QAAQ;aACf;YACD,gBAAgB,EAAE;gBAChB,GAAG,EAAE,mBAAmB;gBACxB,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,QAAQ;gBACd,SAAS,EAAE,IAAI,YAAY,CACzB,IAAI,UAAU,CACZ,0BAA0B,CAC3B,CACF;aACF;YACD,SAAS,EAAE;gBACT,GAAG,EAAE,YAAY;gBACjB,QAAQ,EAAE,IAAI;gBACd,IAAI,EAAE,QAAQ;aACf;YACD,aAAa,EAAE;gBACb,GAAG,EAAE,eAAe;gBACpB,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,QAAQ;gBACd,SAAS,EAAE,IAAI,YAAY,CAAC,IAAI,uBAAuB,EAAE,CAAC;aAC3D;SACF,CAAC;IACJ,CAAC;CAAA","sourcesContent":["import type { AdaptyNonSubscription, AdaptyProfile } from '../types';\nimport type { Def } from '../types/schema';\nimport type { Properties } from './types';\nimport { SimpleCoder } from './coder';\nimport { AdaptyAccessLevelCoder } from './adapty-access-level';\nimport { AdaptyNonSubscriptionCoder } from './adapty-non-subscription';\nimport { AdaptySubscriptionCoder } from './adapty-subscription';\nimport { HashmapCoder } from './hashmap';\nimport { ArrayCoder } from './array';\n\ntype Model = AdaptyProfile;\ntype Serializable = Def['AdaptyProfile'];\n\nexport class AdaptyProfileCoder extends SimpleCoder<Model, Serializable> {\n protected properties: Properties<Model, Serializable> = {\n accessLevels: {\n key: 'paid_access_levels',\n required: false,\n type: 'object',\n converter: new HashmapCoder(new AdaptyAccessLevelCoder()),\n },\n customAttributes: {\n key: 'custom_attributes',\n required: false,\n type: 'object',\n },\n customerUserId: {\n key: 'customer_user_id',\n required: false,\n type: 'string',\n },\n nonSubscriptions: {\n key: 'non_subscriptions',\n required: false,\n type: 'object',\n converter: new HashmapCoder(\n new ArrayCoder<AdaptyNonSubscription, AdaptyNonSubscriptionCoder>(\n AdaptyNonSubscriptionCoder,\n ),\n ),\n },\n profileId: {\n key: 'profile_id',\n required: true,\n type: 'string',\n },\n subscriptions: {\n key: 'subscriptions',\n required: false,\n type: 'object',\n converter: new HashmapCoder(new AdaptySubscriptionCoder()),\n },\n };\n}\n"]}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
function isDeprecatedType(data) {
|
|
2
|
-
return ((data === null || data === void 0 ? void 0 : data.android) &&
|
|
3
|
-
'oldSubVendorProductId' in data.android &&
|
|
4
|
-
'prorationMode' in data.android);
|
|
5
|
-
}
|
|
6
|
-
export class AdaptyPurchaseParamsCoder {
|
|
7
|
-
encode(data) {
|
|
8
|
-
const purchaseParams = {};
|
|
9
|
-
if (isDeprecatedType(data)) {
|
|
10
|
-
if (data.android) {
|
|
11
|
-
purchaseParams['subscription_update_params'] = {
|
|
12
|
-
replacement_mode: data.android.prorationMode,
|
|
13
|
-
old_sub_vendor_product_id: data.android.oldSubVendorProductId,
|
|
14
|
-
};
|
|
15
|
-
if (data.android.isOfferPersonalized) {
|
|
16
|
-
purchaseParams['is_offer_personalized'] =
|
|
17
|
-
data.android.isOfferPersonalized;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
return purchaseParams;
|
|
21
|
-
}
|
|
22
|
-
if (data.android) {
|
|
23
|
-
if (data.android.subscriptionUpdateParams) {
|
|
24
|
-
purchaseParams['subscription_update_params'] = {
|
|
25
|
-
replacement_mode: data.android.subscriptionUpdateParams.prorationMode,
|
|
26
|
-
old_sub_vendor_product_id: data.android.subscriptionUpdateParams.oldSubVendorProductId,
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
if (data.android.isOfferPersonalized !== undefined) {
|
|
30
|
-
purchaseParams['is_offer_personalized'] =
|
|
31
|
-
data.android.isOfferPersonalized;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
return purchaseParams;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
//# sourceMappingURL=adapty-purchase-params.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"adapty-purchase-params.js","sourceRoot":"","sources":["../../../../src/shared/coders/adapty-purchase-params.ts"],"names":[],"mappings":"AAKA,SAAS,gBAAgB,CACvB,IAAS;IAET,OAAO,CACL,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,OAAO;QACb,uBAAuB,IAAI,IAAI,CAAC,OAAO;QACvC,eAAe,IAAI,IAAI,CAAC,OAAO,CAChC,CAAC;AACJ,CAAC;AAED,MAAM,OAAO,yBAAyB;IACpC,MAAM,CAAC,IAAW;QAChB,MAAM,cAAc,GAAiB,EAAE,CAAC;QAExC,IAAI,gBAAgB,CAAC,IAAI,CAAC,EAAE,CAAC;YAC3B,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;gBACjB,cAAc,CAAC,4BAA4B,CAAC,GAAG;oBAC7C,gBAAgB,EAAE,IAAI,CAAC,OAAO,CAAC,aAAa;oBAC5C,yBAAyB,EAAE,IAAI,CAAC,OAAO,CAAC,qBAAqB;iBAC9D,CAAC;gBAEF,IAAI,IAAI,CAAC,OAAO,CAAC,mBAAmB,EAAE,CAAC;oBACrC,cAAc,CAAC,uBAAuB,CAAC;wBACrC,IAAI,CAAC,OAAO,CAAC,mBAAmB,CAAC;gBACrC,CAAC;YACH,CAAC;YACD,OAAO,cAAc,CAAC;QACxB,CAAC;QAED,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YACjB,IAAI,IAAI,CAAC,OAAO,CAAC,wBAAwB,EAAE,CAAC;gBAC1C,cAAc,CAAC,4BAA4B,CAAC,GAAG;oBAC7C,gBAAgB,EAAE,IAAI,CAAC,OAAO,CAAC,wBAAwB,CAAC,aAAa;oBACrE,yBAAyB,EACvB,IAAI,CAAC,OAAO,CAAC,wBAAwB,CAAC,qBAAqB;iBAC9D,CAAC;YACJ,CAAC;YAED,IAAI,IAAI,CAAC,OAAO,CAAC,mBAAmB,KAAK,SAAS,EAAE,CAAC;gBACnD,cAAc,CAAC,uBAAuB,CAAC;oBACrC,IAAI,CAAC,OAAO,CAAC,mBAAmB,CAAC;YACrC,CAAC;QACH,CAAC;QAED,OAAO,cAAc,CAAC;IACxB,CAAC;CACF","sourcesContent":["import type { MakePurchaseParamsInput, AdaptyAndroidSubscriptionUpdateParameters } from '../types/inputs';\n\ntype Model = MakePurchaseParamsInput;\ntype Serializable = Record<string, any>;\n\nfunction isDeprecatedType(\n data: any,\n): data is { android?: AdaptyAndroidSubscriptionUpdateParameters } {\n return (\n data?.android &&\n 'oldSubVendorProductId' in data.android &&\n 'prorationMode' in data.android\n );\n}\n\nexport class AdaptyPurchaseParamsCoder {\n encode(data: Model): Serializable {\n const purchaseParams: Serializable = {};\n\n if (isDeprecatedType(data)) {\n if (data.android) {\n purchaseParams['subscription_update_params'] = {\n replacement_mode: data.android.prorationMode,\n old_sub_vendor_product_id: data.android.oldSubVendorProductId,\n };\n\n if (data.android.isOfferPersonalized) {\n purchaseParams['is_offer_personalized'] =\n data.android.isOfferPersonalized;\n }\n }\n return purchaseParams;\n }\n\n if (data.android) {\n if (data.android.subscriptionUpdateParams) {\n purchaseParams['subscription_update_params'] = {\n replacement_mode: data.android.subscriptionUpdateParams.prorationMode,\n old_sub_vendor_product_id:\n data.android.subscriptionUpdateParams.oldSubVendorProductId,\n };\n }\n\n if (data.android.isOfferPersonalized !== undefined) {\n purchaseParams['is_offer_personalized'] =\n data.android.isOfferPersonalized;\n }\n }\n\n return purchaseParams;\n }\n} "]}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { AdaptyPurchaseResult } from '../types';
|
|
2
|
-
import type { Def } from '../types/schema';
|
|
3
|
-
import type { Properties } from './types';
|
|
4
|
-
import { SimpleCoder } from './coder';
|
|
5
|
-
type Model = AdaptyPurchaseResult;
|
|
6
|
-
type Serializable = Def['AdaptyPurchaseResult'];
|
|
7
|
-
export declare class AdaptyPurchaseResultCoder extends SimpleCoder<Model, Serializable> {
|
|
8
|
-
protected properties: Properties<Model, Serializable>;
|
|
9
|
-
decode(data: Serializable): Model;
|
|
10
|
-
encode(data: Model): Serializable;
|
|
11
|
-
}
|
|
12
|
-
export {};
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { SimpleCoder } from './coder';
|
|
2
|
-
import { AdaptyProfileCoder } from './adapty-profile';
|
|
3
|
-
import { getPlatform } from '../utils/platform';
|
|
4
|
-
export class AdaptyPurchaseResultCoder extends SimpleCoder {
|
|
5
|
-
constructor() {
|
|
6
|
-
super(...arguments);
|
|
7
|
-
this.properties = {
|
|
8
|
-
type: {
|
|
9
|
-
key: 'type',
|
|
10
|
-
required: true,
|
|
11
|
-
type: 'string',
|
|
12
|
-
},
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
decode(data) {
|
|
16
|
-
const baseResult = super.decode(data);
|
|
17
|
-
if (baseResult.type === 'success') {
|
|
18
|
-
if (!data.profile) {
|
|
19
|
-
throw new Error('Profile is required for success type of purchase result');
|
|
20
|
-
}
|
|
21
|
-
const platform = getPlatform();
|
|
22
|
-
const anyData = data;
|
|
23
|
-
return Object.assign(Object.assign(Object.assign(Object.assign({}, baseResult), { profile: new AdaptyProfileCoder().decode(data.profile) }), (platform === 'ios' && anyData.apple_jws_transaction
|
|
24
|
-
? { ios: { jwsTransaction: anyData.apple_jws_transaction } }
|
|
25
|
-
: {})), (platform === 'android' && anyData.google_purchase_token
|
|
26
|
-
? { android: { purchaseToken: anyData.google_purchase_token } }
|
|
27
|
-
: {}));
|
|
28
|
-
}
|
|
29
|
-
return baseResult;
|
|
30
|
-
}
|
|
31
|
-
encode(data) {
|
|
32
|
-
var _a, _b;
|
|
33
|
-
const { type } = data;
|
|
34
|
-
if (type === 'success') {
|
|
35
|
-
if (!('profile' in data)) {
|
|
36
|
-
throw new Error('Profile is required for success type of purchase result');
|
|
37
|
-
}
|
|
38
|
-
const platform = getPlatform();
|
|
39
|
-
const result = {
|
|
40
|
-
type: 'success',
|
|
41
|
-
profile: new AdaptyProfileCoder().encode(data.profile),
|
|
42
|
-
};
|
|
43
|
-
if (platform === 'ios' && ((_a = data.ios) === null || _a === void 0 ? void 0 : _a.jwsTransaction)) {
|
|
44
|
-
result.apple_jws_transaction = data.ios.jwsTransaction;
|
|
45
|
-
}
|
|
46
|
-
if (platform === 'android' && ((_b = data.android) === null || _b === void 0 ? void 0 : _b.purchaseToken)) {
|
|
47
|
-
result.google_purchase_token = data.android.purchaseToken;
|
|
48
|
-
}
|
|
49
|
-
return result;
|
|
50
|
-
}
|
|
51
|
-
return super.encode({ type });
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
//# sourceMappingURL=adapty-purchase-result.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"adapty-purchase-result.js","sourceRoot":"","sources":["../../../../src/shared/coders/adapty-purchase-result.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAKhD,MAAM,OAAO,yBAA0B,SAAQ,WAG9C;IAHD;;QAIY,eAAU,GAAoC;YACtD,IAAI,EAAE;gBACJ,GAAG,EAAE,MAAM;gBACX,QAAQ,EAAE,IAAI;gBACd,IAAI,EAAE,QAAQ;aACf;SACF,CAAC;IAoDJ,CAAC;IAlDU,MAAM,CAAC,IAAkB;QAChC,MAAM,UAAU,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACtC,IAAI,UAAU,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;YAClC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;gBAClB,MAAM,IAAI,KAAK,CACb,yDAAyD,CAC1D,CAAC;YACJ,CAAC;YACD,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;YAC/B,MAAM,OAAO,GAAG,IAAW,CAAC;YAC5B,mEACK,UAAU,KACb,OAAO,EAAE,IAAI,kBAAkB,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,KACnD,CAAC,QAAQ,KAAK,KAAK,IAAI,OAAO,CAAC,qBAAqB;gBACrD,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE,cAAc,EAAE,OAAO,CAAC,qBAAqB,EAAE,EAAE;gBAC5D,CAAC,CAAC,EAAE,CAAC,GACJ,CAAC,QAAQ,KAAK,SAAS,IAAI,OAAO,CAAC,qBAAqB;gBACzD,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,aAAa,EAAE,OAAO,CAAC,qBAAqB,EAAE,EAAE;gBAC/D,CAAC,CAAC,EAAE,CAAC,EACP;QACJ,CAAC;QACD,OAAO,UAAU,CAAC;IACpB,CAAC;IAEQ,MAAM,CAAC,IAAW;;QACzB,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;QAEtB,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;YACvB,IAAI,CAAC,CAAC,SAAS,IAAI,IAAI,CAAC,EAAE,CAAC;gBACzB,MAAM,IAAI,KAAK,CACb,yDAAyD,CAC1D,CAAC;YACJ,CAAC;YAED,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;YAC/B,MAAM,MAAM,GAAQ;gBAClB,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE,IAAI,kBAAkB,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC;aACvD,CAAC;YACF,IAAI,QAAQ,KAAK,KAAK,KAAI,MAAA,IAAI,CAAC,GAAG,0CAAE,cAAc,CAAA,EAAE,CAAC;gBACnD,MAAM,CAAC,qBAAqB,GAAG,IAAI,CAAC,GAAG,CAAC,cAAc,CAAC;YACzD,CAAC;YACD,IAAI,QAAQ,KAAK,SAAS,KAAI,MAAA,IAAI,CAAC,OAAO,0CAAE,aAAa,CAAA,EAAE,CAAC;gBAC1D,MAAM,CAAC,qBAAqB,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC;YAC5D,CAAC;YACD,OAAO,MAAM,CAAC;QAChB,CAAC;QAED,OAAO,KAAK,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC;IAChC,CAAC;CACF","sourcesContent":["import type { AdaptyPurchaseResult } from '../types';\nimport type { Def } from '../types/schema';\nimport type { Properties } from './types';\nimport { SimpleCoder } from './coder';\nimport { AdaptyProfileCoder } from './adapty-profile';\nimport { getPlatform } from '../utils/platform';\n\ntype Model = AdaptyPurchaseResult;\ntype Serializable = Def['AdaptyPurchaseResult'];\n\nexport class AdaptyPurchaseResultCoder extends SimpleCoder<\n Model,\n Serializable\n> {\n protected properties: Properties<Model, Serializable> = {\n type: {\n key: 'type',\n required: true,\n type: 'string',\n },\n };\n\n override decode(data: Serializable): Model {\n const baseResult = super.decode(data);\n if (baseResult.type === 'success') {\n if (!data.profile) {\n throw new Error(\n 'Profile is required for success type of purchase result',\n );\n }\n const platform = getPlatform();\n const anyData = data as any;\n return {\n ...baseResult,\n profile: new AdaptyProfileCoder().decode(data.profile),\n ...(platform === 'ios' && anyData.apple_jws_transaction\n ? { ios: { jwsTransaction: anyData.apple_jws_transaction } }\n : {}),\n ...(platform === 'android' && anyData.google_purchase_token\n ? { android: { purchaseToken: anyData.google_purchase_token } }\n : {}),\n };\n }\n return baseResult;\n }\n\n override encode(data: Model): Serializable {\n const { type } = data;\n\n if (type === 'success') {\n if (!('profile' in data)) {\n throw new Error(\n 'Profile is required for success type of purchase result',\n );\n }\n\n const platform = getPlatform();\n const result: any = {\n type: 'success',\n profile: new AdaptyProfileCoder().encode(data.profile),\n };\n if (platform === 'ios' && data.ios?.jwsTransaction) {\n result.apple_jws_transaction = data.ios.jwsTransaction;\n }\n if (platform === 'android' && data.android?.purchaseToken) {\n result.google_purchase_token = data.android.purchaseToken;\n }\n return result;\n }\n\n return super.encode({ type });\n }\n}\n"]}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { AdaptyRemoteConfig } from '../types';
|
|
2
|
-
import type { Def } from '../types/schema';
|
|
3
|
-
import type { Properties } from './types';
|
|
4
|
-
import { Coder } from './coder';
|
|
5
|
-
type Model = AdaptyRemoteConfig;
|
|
6
|
-
type CodableModel = Omit<Model, 'dataString'>;
|
|
7
|
-
type Serializable = Required<Def['AdaptyPaywall']>['remote_config'];
|
|
8
|
-
export declare class AdaptyRemoteConfigCoder extends Coder<Model, CodableModel, Serializable> {
|
|
9
|
-
protected properties: Properties<CodableModel, Serializable>;
|
|
10
|
-
decode(data: Serializable): Model;
|
|
11
|
-
encode(data: Model): Serializable;
|
|
12
|
-
}
|
|
13
|
-
export {};
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
-
t[p] = s[p];
|
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
-
t[p[i]] = s[p[i]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
import { Coder } from './coder';
|
|
13
|
-
import { JSONCoder } from './json';
|
|
14
|
-
export class AdaptyRemoteConfigCoder extends Coder {
|
|
15
|
-
constructor() {
|
|
16
|
-
super(...arguments);
|
|
17
|
-
this.properties = {
|
|
18
|
-
data: {
|
|
19
|
-
key: 'data',
|
|
20
|
-
required: true,
|
|
21
|
-
type: 'string',
|
|
22
|
-
converter: new JSONCoder(),
|
|
23
|
-
},
|
|
24
|
-
lang: {
|
|
25
|
-
key: 'lang',
|
|
26
|
-
required: true,
|
|
27
|
-
type: 'string',
|
|
28
|
-
},
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
decode(data) {
|
|
32
|
-
const codablePart = super.decode(data);
|
|
33
|
-
const dataString = JSON.stringify(codablePart.data);
|
|
34
|
-
return Object.assign(Object.assign({}, codablePart), { dataString: dataString.length < 4 ? '' : dataString });
|
|
35
|
-
}
|
|
36
|
-
encode(data) {
|
|
37
|
-
const { dataString } = data, codablePart = __rest(data, ["dataString"]);
|
|
38
|
-
return super.encode(codablePart);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
//# sourceMappingURL=adapty-remote-config.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"adapty-remote-config.js","sourceRoot":"","sources":["../../../../src/shared/coders/adapty-remote-config.ts"],"names":[],"mappings":";;;;;;;;;;;AAGA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAMnC,MAAM,OAAO,uBAAwB,SAAQ,KAI5C;IAJD;;QAKY,eAAU,GAA2C;YAC7D,IAAI,EAAE;gBACJ,GAAG,EAAE,MAAM;gBACX,QAAQ,EAAE,IAAI;gBACd,IAAI,EAAE,QAAe;gBACrB,SAAS,EAAE,IAAI,SAAS,EAAE;aAC3B;YACD,IAAI,EAAE;gBACJ,GAAG,EAAE,MAAM;gBACX,QAAQ,EAAE,IAAI;gBACd,IAAI,EAAE,QAAQ;aACf;SACF,CAAC;IAeJ,CAAC;IAbU,MAAM,CAAC,IAAkB;QAChC,MAAM,WAAW,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACvC,MAAM,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QACpD,uCACK,WAAW,KACd,UAAU,EAAE,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,IACnD;IACJ,CAAC;IAEQ,MAAM,CAAC,IAAW;QACzB,MAAM,EAAE,UAAU,KAAqB,IAAI,EAApB,WAAW,UAAK,IAAI,EAArC,cAA8B,CAAO,CAAC;QAC5C,OAAO,KAAK,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;IACnC,CAAC;CACF","sourcesContent":["import type { AdaptyRemoteConfig } from '../types';\nimport type { Def } from '../types/schema';\nimport type { Properties } from './types';\nimport { Coder } from './coder';\nimport { JSONCoder } from './json';\n\ntype Model = AdaptyRemoteConfig;\ntype CodableModel = Omit<Model, 'dataString'>;\ntype Serializable = Required<Def['AdaptyPaywall']>['remote_config'];\n\nexport class AdaptyRemoteConfigCoder extends Coder<\n Model,\n CodableModel,\n Serializable\n> {\n protected properties: Properties<CodableModel, Serializable> = {\n data: {\n key: 'data',\n required: true,\n type: 'string' as any,\n converter: new JSONCoder(),\n },\n lang: {\n key: 'lang',\n required: true,\n type: 'string',\n },\n };\n\n override decode(data: Serializable): Model {\n const codablePart = super.decode(data);\n const dataString = JSON.stringify(codablePart.data);\n return {\n ...codablePart,\n dataString: dataString.length < 4 ? '' : dataString,\n };\n }\n\n override encode(data: Model): Serializable {\n const { dataString, ...codablePart } = data;\n return super.encode(codablePart);\n }\n}\n"]}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { AdaptySubscriptionDetails } from '../types';
|
|
2
|
-
import type { Def } from '../types/schema';
|
|
3
|
-
import type { Properties } from './types';
|
|
4
|
-
import { SimpleCoder } from './coder';
|
|
5
|
-
type Model = AdaptySubscriptionDetails;
|
|
6
|
-
type Serializable = Def['AdaptyPaywallProduct.Subscription'];
|
|
7
|
-
export declare class AdaptySubscriptionDetailsCoder extends SimpleCoder<Model, Serializable> {
|
|
8
|
-
protected properties: Properties<Model, Serializable>;
|
|
9
|
-
decode(data: Serializable): Model;
|
|
10
|
-
}
|
|
11
|
-
export {};
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
-
t[p] = s[p];
|
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
-
t[p[i]] = s[p[i]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
import { SimpleCoder } from './coder';
|
|
13
|
-
import { AdaptySubscriptionPeriodCoder } from './adapty-subscription-period';
|
|
14
|
-
import { AdaptySubscriptionOfferCoder } from './adapty-subscription-offer';
|
|
15
|
-
export class AdaptySubscriptionDetailsCoder extends SimpleCoder {
|
|
16
|
-
constructor() {
|
|
17
|
-
super(...arguments);
|
|
18
|
-
this.properties = {
|
|
19
|
-
subscriptionPeriod: {
|
|
20
|
-
key: 'period',
|
|
21
|
-
required: true,
|
|
22
|
-
type: 'object',
|
|
23
|
-
converter: new AdaptySubscriptionPeriodCoder(),
|
|
24
|
-
},
|
|
25
|
-
localizedSubscriptionPeriod: {
|
|
26
|
-
key: 'localized_period',
|
|
27
|
-
required: false,
|
|
28
|
-
type: 'string',
|
|
29
|
-
},
|
|
30
|
-
offer: {
|
|
31
|
-
key: 'offer',
|
|
32
|
-
required: false,
|
|
33
|
-
type: 'object',
|
|
34
|
-
converter: new AdaptySubscriptionOfferCoder(),
|
|
35
|
-
},
|
|
36
|
-
ios: {
|
|
37
|
-
subscriptionGroupIdentifier: {
|
|
38
|
-
key: 'group_identifier',
|
|
39
|
-
required: false,
|
|
40
|
-
type: 'string',
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
android: {
|
|
44
|
-
basePlanId: {
|
|
45
|
-
key: 'base_plan_id',
|
|
46
|
-
required: true,
|
|
47
|
-
type: 'string',
|
|
48
|
-
},
|
|
49
|
-
renewalType: {
|
|
50
|
-
key: 'renewal_type',
|
|
51
|
-
required: false,
|
|
52
|
-
type: 'string',
|
|
53
|
-
},
|
|
54
|
-
},
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
decode(data) {
|
|
58
|
-
const baseResult = super.decode(data);
|
|
59
|
-
const propToRemove = data.base_plan_id ? 'ios' : 'android';
|
|
60
|
-
const _a = baseResult, _b = propToRemove, _ = _a[_b], partialData = __rest(_a, [typeof _b === "symbol" ? _b : _b + ""]);
|
|
61
|
-
return partialData;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
//# sourceMappingURL=adapty-subscription-details.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"adapty-subscription-details.js","sourceRoot":"","sources":["../../../../src/shared/coders/adapty-subscription-details.ts"],"names":[],"mappings":";;;;;;;;;;;AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,6BAA6B,EAAE,MAAM,8BAA8B,CAAC;AAC7E,OAAO,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAC;AAK3E,MAAM,OAAO,8BAA+B,SAAQ,WAGnD;IAHD;;QAIY,eAAU,GAAoC;YACtD,kBAAkB,EAAE;gBAClB,GAAG,EAAE,QAAQ;gBACb,QAAQ,EAAE,IAAI;gBACd,IAAI,EAAE,QAAQ;gBACd,SAAS,EAAE,IAAI,6BAA6B,EAAE;aAC/C;YACD,2BAA2B,EAAE;gBAC3B,GAAG,EAAE,kBAAkB;gBACvB,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,QAAQ;aACf;YACD,KAAK,EAAE;gBACL,GAAG,EAAE,OAAO;gBACZ,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,QAAQ;gBACd,SAAS,EAAE,IAAI,4BAA4B,EAAE;aAC9C;YACD,GAAG,EAAE;gBACH,2BAA2B,EAAE;oBAC3B,GAAG,EAAE,kBAAkB;oBACvB,QAAQ,EAAE,KAAK;oBACf,IAAI,EAAE,QAAQ;iBACf;aACF;YACD,OAAO,EAAE;gBACP,UAAU,EAAE;oBACV,GAAG,EAAE,cAAc;oBACnB,QAAQ,EAAE,IAAI;oBACd,IAAI,EAAE,QAAQ;iBACf;gBACD,WAAW,EAAE;oBACX,GAAG,EAAE,cAAc;oBACnB,QAAQ,EAAE,KAAK;oBACf,IAAI,EAAE,QAAQ;iBACf;aACF;SACF,CAAC;IAQJ,CAAC;IANU,MAAM,CAAC,IAAkB;QAChC,MAAM,UAAU,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACtC,MAAM,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;QAC3D,MAA8C,KAAA,UAAU,EAAhD,KAAC,YAAa,EAAE,CAAC,SAAA,EAAK,WAAW,cAAnC,uCAAqC,CAAa,CAAC;QACzD,OAAO,WAAW,CAAC;IACrB,CAAC;CACF","sourcesContent":["import type { AdaptySubscriptionDetails } from '../types';\nimport type { Def } from '../types/schema';\nimport type { Properties } from './types';\nimport { SimpleCoder } from './coder';\nimport { AdaptySubscriptionPeriodCoder } from './adapty-subscription-period';\nimport { AdaptySubscriptionOfferCoder } from './adapty-subscription-offer';\n\ntype Model = AdaptySubscriptionDetails;\ntype Serializable = Def['AdaptyPaywallProduct.Subscription'];\n\nexport class AdaptySubscriptionDetailsCoder extends SimpleCoder<\n Model,\n Serializable\n> {\n protected properties: Properties<Model, Serializable> = {\n subscriptionPeriod: {\n key: 'period',\n required: true,\n type: 'object',\n converter: new AdaptySubscriptionPeriodCoder(),\n },\n localizedSubscriptionPeriod: {\n key: 'localized_period',\n required: false,\n type: 'string',\n },\n offer: {\n key: 'offer',\n required: false,\n type: 'object',\n converter: new AdaptySubscriptionOfferCoder(),\n },\n ios: {\n subscriptionGroupIdentifier: {\n key: 'group_identifier',\n required: false,\n type: 'string',\n },\n },\n android: {\n basePlanId: {\n key: 'base_plan_id',\n required: true,\n type: 'string',\n },\n renewalType: {\n key: 'renewal_type',\n required: false,\n type: 'string',\n },\n },\n };\n\n override decode(data: Serializable): Model {\n const baseResult = super.decode(data);\n const propToRemove = data.base_plan_id ? 'ios' : 'android';\n const { [propToRemove]: _, ...partialData } = baseResult;\n return partialData;\n }\n}\n"]}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { AdaptySubscriptionOfferId } from '../types';
|
|
2
|
-
import type { Def } from '../types/schema';
|
|
3
|
-
import type { Properties } from './types';
|
|
4
|
-
import { SimpleCoder } from './coder';
|
|
5
|
-
type Model = AdaptySubscriptionOfferId;
|
|
6
|
-
type Serializable = Def['AdaptySubscriptionOffer.Identifier'];
|
|
7
|
-
export declare class AdaptySubscriptionOfferIdCoder extends SimpleCoder<Model, Serializable> {
|
|
8
|
-
protected properties: Properties<Model, Serializable>;
|
|
9
|
-
}
|
|
10
|
-
export {};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { SimpleCoder } from './coder';
|
|
2
|
-
export class AdaptySubscriptionOfferIdCoder extends SimpleCoder {
|
|
3
|
-
constructor() {
|
|
4
|
-
super(...arguments);
|
|
5
|
-
this.properties = {
|
|
6
|
-
type: {
|
|
7
|
-
key: 'type',
|
|
8
|
-
required: true,
|
|
9
|
-
type: 'string',
|
|
10
|
-
},
|
|
11
|
-
id: {
|
|
12
|
-
key: 'id',
|
|
13
|
-
required: false,
|
|
14
|
-
type: 'string',
|
|
15
|
-
},
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=adapty-subscription-offer-identifier.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"adapty-subscription-offer-identifier.js","sourceRoot":"","sources":["../../../../src/shared/coders/adapty-subscription-offer-identifier.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAKtC,MAAM,OAAO,8BAA+B,SAAQ,WAGnD;IAHD;;QAIY,eAAU,GAAoC;YACtD,IAAI,EAAE;gBACJ,GAAG,EAAE,MAAM;gBACX,QAAQ,EAAE,IAAI;gBACd,IAAI,EAAE,QAAQ;aACf;YACD,EAAE,EAAE;gBACF,GAAG,EAAE,IAAI;gBACT,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,QAAQ;aACf;SACF,CAAC;IACJ,CAAC;CAAA","sourcesContent":["import { AdaptySubscriptionOfferId } from '../types';\nimport type { Def } from '../types/schema';\nimport type { Properties } from './types';\nimport { SimpleCoder } from './coder';\n\ntype Model = AdaptySubscriptionOfferId;\ntype Serializable = Def['AdaptySubscriptionOffer.Identifier'];\n\nexport class AdaptySubscriptionOfferIdCoder extends SimpleCoder<\n Model,\n Serializable\n> {\n protected properties: Properties<Model, Serializable> = {\n type: {\n key: 'type',\n required: true,\n type: 'string',\n },\n id: {\n key: 'id',\n required: false,\n type: 'string',\n },\n };\n}\n"]}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { AdaptySubscriptionOffer } from '../types';
|
|
2
|
-
import type { Def } from '../types/schema';
|
|
3
|
-
import type { Properties } from './types';
|
|
4
|
-
import { SimpleCoder } from './coder';
|
|
5
|
-
type Model = AdaptySubscriptionOffer;
|
|
6
|
-
type Serializable = Def['AdaptySubscriptionOffer'];
|
|
7
|
-
export declare class AdaptySubscriptionOfferCoder extends SimpleCoder<Model, Serializable> {
|
|
8
|
-
protected properties: Properties<Model, Serializable>;
|
|
9
|
-
decode(data: Serializable): Model;
|
|
10
|
-
}
|
|
11
|
-
export {};
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
-
t[p] = s[p];
|
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
-
t[p[i]] = s[p[i]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
import { SimpleCoder } from './coder';
|
|
13
|
-
import { AdaptySubscriptionOfferIdCoder } from './adapty-subscription-offer-identifier';
|
|
14
|
-
import { ArrayCoder } from './array';
|
|
15
|
-
import { AdaptyDiscountPhaseCoder } from './adapty-discount-phase';
|
|
16
|
-
export class AdaptySubscriptionOfferCoder extends SimpleCoder {
|
|
17
|
-
constructor() {
|
|
18
|
-
super(...arguments);
|
|
19
|
-
this.properties = {
|
|
20
|
-
identifier: {
|
|
21
|
-
key: 'offer_identifier',
|
|
22
|
-
required: true,
|
|
23
|
-
type: 'object',
|
|
24
|
-
converter: new AdaptySubscriptionOfferIdCoder(),
|
|
25
|
-
},
|
|
26
|
-
phases: {
|
|
27
|
-
key: 'phases',
|
|
28
|
-
required: true,
|
|
29
|
-
type: 'array',
|
|
30
|
-
converter: new ArrayCoder(AdaptyDiscountPhaseCoder),
|
|
31
|
-
},
|
|
32
|
-
android: {
|
|
33
|
-
offerTags: {
|
|
34
|
-
key: 'offer_tags',
|
|
35
|
-
required: false,
|
|
36
|
-
type: 'array',
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
decode(data) {
|
|
42
|
-
const baseResult = super.decode(data);
|
|
43
|
-
if (!data.offer_tags) {
|
|
44
|
-
const { android } = baseResult, partialData = __rest(baseResult, ["android"]);
|
|
45
|
-
return partialData;
|
|
46
|
-
}
|
|
47
|
-
return baseResult;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
//# sourceMappingURL=adapty-subscription-offer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"adapty-subscription-offer.js","sourceRoot":"","sources":["../../../../src/shared/coders/adapty-subscription-offer.ts"],"names":[],"mappings":";;;;;;;;;;;AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,8BAA8B,EAAE,MAAM,wCAAwC,CAAC;AACxF,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AAKnE,MAAM,OAAO,4BAA6B,SAAQ,WAGjD;IAHD;;QAIY,eAAU,GAAoC;YACtD,UAAU,EAAE;gBACV,GAAG,EAAE,kBAAkB;gBACvB,QAAQ,EAAE,IAAI;gBACd,IAAI,EAAE,QAAQ;gBACd,SAAS,EAAE,IAAI,8BAA8B,EAAE;aAChD;YACD,MAAM,EAAE;gBACN,GAAG,EAAE,QAAQ;gBACb,QAAQ,EAAE,IAAI;gBACd,IAAI,EAAE,OAAO;gBACb,SAAS,EAAE,IAAI,UAAU,CAAC,wBAAwB,CAAC;aACpD;YACD,OAAO,EAAE;gBACP,SAAS,EAAE;oBACT,GAAG,EAAE,YAAY;oBACjB,QAAQ,EAAE,KAAK;oBACf,IAAI,EAAE,OAAO;iBACd;aACF;SACF,CAAC;IAUJ,CAAC;IARU,MAAM,CAAC,IAAkB;QAChC,MAAM,UAAU,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACtC,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC;YACrB,MAAM,EAAE,OAAO,KAAqB,UAAU,EAA1B,WAAW,UAAK,UAAU,EAAxC,WAA2B,CAAa,CAAC;YAC/C,OAAO,WAAW,CAAC;QACrB,CAAC;QACD,OAAO,UAAU,CAAC;IACpB,CAAC;CACF","sourcesContent":["import type { AdaptySubscriptionOffer } from '../types';\nimport type { Def } from '../types/schema';\nimport type { Properties } from './types';\nimport { SimpleCoder } from './coder';\nimport { AdaptySubscriptionOfferIdCoder } from './adapty-subscription-offer-identifier';\nimport { ArrayCoder } from './array';\nimport { AdaptyDiscountPhaseCoder } from './adapty-discount-phase';\n\ntype Model = AdaptySubscriptionOffer;\ntype Serializable = Def['AdaptySubscriptionOffer'];\n\nexport class AdaptySubscriptionOfferCoder extends SimpleCoder<\n Model,\n Serializable\n> {\n protected properties: Properties<Model, Serializable> = {\n identifier: {\n key: 'offer_identifier',\n required: true,\n type: 'object',\n converter: new AdaptySubscriptionOfferIdCoder(),\n },\n phases: {\n key: 'phases',\n required: true,\n type: 'array',\n converter: new ArrayCoder(AdaptyDiscountPhaseCoder),\n },\n android: {\n offerTags: {\n key: 'offer_tags',\n required: false,\n type: 'array',\n },\n },\n };\n\n override decode(data: Serializable): Model {\n const baseResult = super.decode(data);\n if (!data.offer_tags) {\n const { android, ...partialData } = baseResult;\n return partialData;\n }\n return baseResult;\n }\n}\n"]}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { AdaptySubscriptionPeriod } from '../types';
|
|
2
|
-
import type { Def } from '../types/schema';
|
|
3
|
-
import type { Properties } from './types';
|
|
4
|
-
import { SimpleCoder } from './coder';
|
|
5
|
-
type Model = AdaptySubscriptionPeriod;
|
|
6
|
-
type Serializable = Def['AdaptySubscriptionPeriod'];
|
|
7
|
-
export declare class AdaptySubscriptionPeriodCoder extends SimpleCoder<Model, Serializable> {
|
|
8
|
-
protected properties: Properties<Model, Serializable>;
|
|
9
|
-
}
|
|
10
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { SimpleCoder } from './coder';
|
|
2
|
-
export class AdaptySubscriptionPeriodCoder extends SimpleCoder {
|
|
3
|
-
constructor() {
|
|
4
|
-
super(...arguments);
|
|
5
|
-
this.properties = {
|
|
6
|
-
unit: { key: 'unit', required: true, type: 'string' },
|
|
7
|
-
numberOfUnits: { key: 'number_of_units', required: true, type: 'number' },
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=adapty-subscription-period.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"adapty-subscription-period.js","sourceRoot":"","sources":["../../../../src/shared/coders/adapty-subscription-period.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAKtC,MAAM,OAAO,6BAA8B,SAAQ,WAGlD;IAHD;;QAIY,eAAU,GAAoC;YACtD,IAAI,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE;YACrD,aAAa,EAAE,EAAE,GAAG,EAAE,iBAAiB,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE;SAC1E,CAAC;IACJ,CAAC;CAAA","sourcesContent":["import type { AdaptySubscriptionPeriod } from '../types';\nimport type { Def } from '../types/schema';\nimport type { Properties } from './types';\nimport { SimpleCoder } from './coder';\n\ntype Model = AdaptySubscriptionPeriod;\ntype Serializable = Def['AdaptySubscriptionPeriod'];\n\nexport class AdaptySubscriptionPeriodCoder extends SimpleCoder<\n Model,\n Serializable\n> {\n protected properties: Properties<Model, Serializable> = {\n unit: { key: 'unit', required: true, type: 'string' },\n numberOfUnits: { key: 'number_of_units', required: true, type: 'number' },\n };\n}\n"]}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { AdaptySubscription } from '../types';
|
|
2
|
-
import type { Def } from '../types/schema';
|
|
3
|
-
import type { Properties } from './types';
|
|
4
|
-
import { SimpleCoder } from './coder';
|
|
5
|
-
type Model = AdaptySubscription;
|
|
6
|
-
type Serializable = Def['AdaptyProfile.Subscription'];
|
|
7
|
-
export declare class AdaptySubscriptionCoder extends SimpleCoder<Model, Serializable> {
|
|
8
|
-
protected properties: Properties<Model, Serializable>;
|
|
9
|
-
}
|
|
10
|
-
export {};
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
import { SimpleCoder } from './coder';
|
|
2
|
-
import { DateCoder } from './date';
|
|
3
|
-
export class AdaptySubscriptionCoder extends SimpleCoder {
|
|
4
|
-
constructor() {
|
|
5
|
-
super(...arguments);
|
|
6
|
-
this.properties = {
|
|
7
|
-
isActive: {
|
|
8
|
-
key: 'is_active',
|
|
9
|
-
required: true,
|
|
10
|
-
type: 'boolean',
|
|
11
|
-
},
|
|
12
|
-
isLifetime: {
|
|
13
|
-
key: 'is_lifetime',
|
|
14
|
-
required: true,
|
|
15
|
-
type: 'boolean',
|
|
16
|
-
},
|
|
17
|
-
vendorProductId: {
|
|
18
|
-
key: 'vendor_product_id',
|
|
19
|
-
required: true,
|
|
20
|
-
type: 'string',
|
|
21
|
-
},
|
|
22
|
-
store: {
|
|
23
|
-
key: 'store',
|
|
24
|
-
required: true,
|
|
25
|
-
type: 'string',
|
|
26
|
-
},
|
|
27
|
-
vendorTransactionId: {
|
|
28
|
-
key: 'vendor_transaction_id',
|
|
29
|
-
required: true,
|
|
30
|
-
type: 'string',
|
|
31
|
-
},
|
|
32
|
-
vendorOriginalTransactionId: {
|
|
33
|
-
key: 'vendor_original_transaction_id',
|
|
34
|
-
required: true,
|
|
35
|
-
type: 'string',
|
|
36
|
-
},
|
|
37
|
-
activatedAt: {
|
|
38
|
-
key: 'activated_at',
|
|
39
|
-
required: true,
|
|
40
|
-
type: 'string',
|
|
41
|
-
converter: new DateCoder(),
|
|
42
|
-
},
|
|
43
|
-
willRenew: {
|
|
44
|
-
key: 'will_renew',
|
|
45
|
-
required: true,
|
|
46
|
-
type: 'boolean',
|
|
47
|
-
},
|
|
48
|
-
isInGracePeriod: {
|
|
49
|
-
key: 'is_in_grace_period',
|
|
50
|
-
required: true,
|
|
51
|
-
type: 'boolean',
|
|
52
|
-
},
|
|
53
|
-
isRefund: {
|
|
54
|
-
key: 'is_refund',
|
|
55
|
-
required: true,
|
|
56
|
-
type: 'boolean',
|
|
57
|
-
},
|
|
58
|
-
isSandbox: {
|
|
59
|
-
key: 'is_sandbox',
|
|
60
|
-
required: true,
|
|
61
|
-
type: 'boolean',
|
|
62
|
-
},
|
|
63
|
-
renewedAt: {
|
|
64
|
-
key: 'renewed_at',
|
|
65
|
-
required: false,
|
|
66
|
-
type: 'string',
|
|
67
|
-
converter: new DateCoder(),
|
|
68
|
-
},
|
|
69
|
-
expiresAt: {
|
|
70
|
-
key: 'expires_at',
|
|
71
|
-
required: false,
|
|
72
|
-
type: 'string',
|
|
73
|
-
converter: new DateCoder(),
|
|
74
|
-
},
|
|
75
|
-
startsAt: {
|
|
76
|
-
key: 'starts_at',
|
|
77
|
-
required: false,
|
|
78
|
-
type: 'string',
|
|
79
|
-
converter: new DateCoder(),
|
|
80
|
-
},
|
|
81
|
-
unsubscribedAt: {
|
|
82
|
-
key: 'unsubscribed_at',
|
|
83
|
-
required: false,
|
|
84
|
-
type: 'string',
|
|
85
|
-
converter: new DateCoder(),
|
|
86
|
-
},
|
|
87
|
-
billingIssueDetectedAt: {
|
|
88
|
-
key: 'billing_issue_detected_at',
|
|
89
|
-
required: false,
|
|
90
|
-
type: 'string',
|
|
91
|
-
converter: new DateCoder(),
|
|
92
|
-
},
|
|
93
|
-
activeIntroductoryOfferType: {
|
|
94
|
-
key: 'active_introductory_offer_type',
|
|
95
|
-
required: false,
|
|
96
|
-
type: 'string',
|
|
97
|
-
},
|
|
98
|
-
activePromotionalOfferType: {
|
|
99
|
-
key: 'active_promotional_offer_type',
|
|
100
|
-
required: false,
|
|
101
|
-
type: 'string',
|
|
102
|
-
},
|
|
103
|
-
activePromotionalOfferId: {
|
|
104
|
-
key: 'active_promotional_offer_id',
|
|
105
|
-
required: false,
|
|
106
|
-
type: 'string',
|
|
107
|
-
},
|
|
108
|
-
cancellationReason: {
|
|
109
|
-
key: 'cancellation_reason',
|
|
110
|
-
required: false,
|
|
111
|
-
type: 'string',
|
|
112
|
-
},
|
|
113
|
-
};
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
//# sourceMappingURL=adapty-subscription.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"adapty-subscription.js","sourceRoot":"","sources":["../../../../src/shared/coders/adapty-subscription.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAKnC,MAAM,OAAO,uBAAwB,SAAQ,WAAgC;IAA7E;;QACY,eAAU,GAAoC;YACtD,QAAQ,EAAE;gBACR,GAAG,EAAE,WAAW;gBAChB,QAAQ,EAAE,IAAI;gBACd,IAAI,EAAE,SAAS;aAChB;YACD,UAAU,EAAE;gBACV,GAAG,EAAE,aAAa;gBAClB,QAAQ,EAAE,IAAI;gBACd,IAAI,EAAE,SAAS;aAChB;YACD,eAAe,EAAE;gBACf,GAAG,EAAE,mBAAmB;gBACxB,QAAQ,EAAE,IAAI;gBACd,IAAI,EAAE,QAAQ;aACf;YACD,KAAK,EAAE;gBACL,GAAG,EAAE,OAAO;gBACZ,QAAQ,EAAE,IAAI;gBACd,IAAI,EAAE,QAAQ;aACf;YACD,mBAAmB,EAAE;gBACnB,GAAG,EAAE,uBAAuB;gBAC5B,QAAQ,EAAE,IAAI;gBACd,IAAI,EAAE,QAAQ;aACf;YACD,2BAA2B,EAAE;gBAC3B,GAAG,EAAE,gCAAgC;gBACrC,QAAQ,EAAE,IAAI;gBACd,IAAI,EAAE,QAAQ;aACf;YACD,WAAW,EAAE;gBACX,GAAG,EAAE,cAAc;gBACnB,QAAQ,EAAE,IAAI;gBACd,IAAI,EAAE,QAAQ;gBACd,SAAS,EAAE,IAAI,SAAS,EAAE;aAC3B;YACD,SAAS,EAAE;gBACT,GAAG,EAAE,YAAY;gBACjB,QAAQ,EAAE,IAAI;gBACd,IAAI,EAAE,SAAS;aAChB;YACD,eAAe,EAAE;gBACf,GAAG,EAAE,oBAAoB;gBACzB,QAAQ,EAAE,IAAI;gBACd,IAAI,EAAE,SAAS;aAChB;YACD,QAAQ,EAAE;gBACR,GAAG,EAAE,WAAW;gBAChB,QAAQ,EAAE,IAAI;gBACd,IAAI,EAAE,SAAS;aAChB;YACD,SAAS,EAAE;gBACT,GAAG,EAAE,YAAY;gBACjB,QAAQ,EAAE,IAAI;gBACd,IAAI,EAAE,SAAS;aAChB;YACD,SAAS,EAAE;gBACT,GAAG,EAAE,YAAY;gBACjB,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,QAAQ;gBACd,SAAS,EAAE,IAAI,SAAS,EAAE;aAC3B;YACD,SAAS,EAAE;gBACT,GAAG,EAAE,YAAY;gBACjB,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,QAAQ;gBACd,SAAS,EAAE,IAAI,SAAS,EAAE;aAC3B;YACD,QAAQ,EAAE;gBACR,GAAG,EAAE,WAAW;gBAChB,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,QAAQ;gBACd,SAAS,EAAE,IAAI,SAAS,EAAE;aAC3B;YACD,cAAc,EAAE;gBACd,GAAG,EAAE,iBAAiB;gBACtB,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,QAAQ;gBACd,SAAS,EAAE,IAAI,SAAS,EAAE;aAC3B;YACD,sBAAsB,EAAE;gBACtB,GAAG,EAAE,2BAA2B;gBAChC,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,QAAQ;gBACd,SAAS,EAAE,IAAI,SAAS,EAAE;aAC3B;YACD,2BAA2B,EAAE;gBAC3B,GAAG,EAAE,gCAAgC;gBACrC,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,QAAQ;aACf;YACD,0BAA0B,EAAE;gBAC1B,GAAG,EAAE,+BAA+B;gBACpC,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,QAAQ;aACf;YACD,wBAAwB,EAAE;gBACxB,GAAG,EAAE,6BAA6B;gBAClC,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,QAAQ;aACf;YACD,kBAAkB,EAAE;gBAClB,GAAG,EAAE,qBAAqB;gBAC1B,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,QAAQ;aACf;SACF,CAAC;IACJ,CAAC;CAAA","sourcesContent":["import type { AdaptySubscription } from '../types';\nimport type { Def } from '../types/schema';\nimport type { Properties } from './types';\nimport { SimpleCoder } from './coder';\nimport { DateCoder } from './date';\n\ntype Model = AdaptySubscription;\ntype Serializable = Def['AdaptyProfile.Subscription'];\n\nexport class AdaptySubscriptionCoder extends SimpleCoder<Model, Serializable> {\n protected properties: Properties<Model, Serializable> = {\n isActive: {\n key: 'is_active',\n required: true,\n type: 'boolean',\n },\n isLifetime: {\n key: 'is_lifetime',\n required: true,\n type: 'boolean',\n },\n vendorProductId: {\n key: 'vendor_product_id',\n required: true,\n type: 'string',\n },\n store: {\n key: 'store',\n required: true,\n type: 'string',\n },\n vendorTransactionId: {\n key: 'vendor_transaction_id',\n required: true,\n type: 'string',\n },\n vendorOriginalTransactionId: {\n key: 'vendor_original_transaction_id',\n required: true,\n type: 'string',\n },\n activatedAt: {\n key: 'activated_at',\n required: true,\n type: 'string',\n converter: new DateCoder(),\n },\n willRenew: {\n key: 'will_renew',\n required: true,\n type: 'boolean',\n },\n isInGracePeriod: {\n key: 'is_in_grace_period',\n required: true,\n type: 'boolean',\n },\n isRefund: {\n key: 'is_refund',\n required: true,\n type: 'boolean',\n },\n isSandbox: {\n key: 'is_sandbox',\n required: true,\n type: 'boolean',\n },\n renewedAt: {\n key: 'renewed_at',\n required: false,\n type: 'string',\n converter: new DateCoder(),\n },\n expiresAt: {\n key: 'expires_at',\n required: false,\n type: 'string',\n converter: new DateCoder(),\n },\n startsAt: {\n key: 'starts_at',\n required: false,\n type: 'string',\n converter: new DateCoder(),\n },\n unsubscribedAt: {\n key: 'unsubscribed_at',\n required: false,\n type: 'string',\n converter: new DateCoder(),\n },\n billingIssueDetectedAt: {\n key: 'billing_issue_detected_at',\n required: false,\n type: 'string',\n converter: new DateCoder(),\n },\n activeIntroductoryOfferType: {\n key: 'active_introductory_offer_type',\n required: false,\n type: 'string',\n },\n activePromotionalOfferType: {\n key: 'active_promotional_offer_type',\n required: false,\n type: 'string',\n },\n activePromotionalOfferId: {\n key: 'active_promotional_offer_id',\n required: false,\n type: 'string',\n },\n cancellationReason: {\n key: 'cancellation_reason',\n required: false,\n type: 'string',\n },\n };\n}\n"]}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { CreateOnboardingViewParamsInput } from '../../ui-builder/types';
|
|
2
|
-
import type { components } from '../types/api';
|
|
3
|
-
type Req = components['requests'];
|
|
4
|
-
type Serializable = Partial<Pick<Req['AdaptyUICreateOnboardingView.Request'], 'external_urls_presentation'>>;
|
|
5
|
-
export declare class AdaptyUICreateOnboardingViewParamsCoder {
|
|
6
|
-
encode(data: CreateOnboardingViewParamsInput): Serializable;
|
|
7
|
-
}
|
|
8
|
-
export {};
|