@metamask-previews/subscription-controller 8.0.1-preview-b13d916 → 8.0.1-preview-4f4c98e
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/CHANGELOG.md +1 -0
- package/dist/{SubscriptionController-method-action-types.d.mts → SubscriptionController-method-action-types.d.ts} +2 -2
- package/dist/SubscriptionController-method-action-types.d.ts.map +1 -0
- package/dist/{SubscriptionController-method-action-types.mjs → SubscriptionController-method-action-types.js} +1 -1
- package/dist/SubscriptionController-method-action-types.js.map +1 -0
- package/dist/{SubscriptionController.d.mts → SubscriptionController.d.ts} +18 -18
- package/dist/SubscriptionController.d.ts.map +1 -0
- package/dist/{SubscriptionController.mjs → SubscriptionController.js} +6 -6
- package/dist/SubscriptionController.js.map +1 -0
- package/dist/{SubscriptionService-method-action-types.d.mts → SubscriptionService-method-action-types.d.ts} +2 -2
- package/dist/SubscriptionService-method-action-types.d.ts.map +1 -0
- package/dist/{SubscriptionService-method-action-types.mjs → SubscriptionService-method-action-types.js} +1 -1
- package/dist/SubscriptionService-method-action-types.js.map +1 -0
- package/dist/{SubscriptionService-structs.d.mts → SubscriptionService-structs.d.ts} +134 -134
- package/dist/SubscriptionService-structs.d.ts.map +1 -0
- package/dist/{SubscriptionService-structs.mjs → SubscriptionService-structs.js} +4 -4
- package/dist/SubscriptionService-structs.js.map +1 -0
- package/dist/{SubscriptionService.d.cts → SubscriptionService.d.ts} +10 -10
- package/dist/SubscriptionService.d.ts.map +1 -0
- package/dist/{SubscriptionService.mjs → SubscriptionService.js} +9 -9
- package/dist/SubscriptionService.js.map +1 -0
- package/dist/{constants.d.cts → constants.d.ts} +1 -1
- package/dist/constants.d.ts.map +1 -0
- package/dist/{constants.mjs → constants.js} +2 -2
- package/dist/constants.js.map +1 -0
- package/dist/{errors.d.cts → errors.d.ts} +2 -2
- package/dist/errors.d.ts.map +1 -0
- package/dist/{errors.mjs → errors.js} +1 -1
- package/dist/errors.js.map +1 -0
- package/dist/{index.d.cts → index.d.ts} +11 -11
- package/dist/index.d.ts.map +1 -0
- package/dist/{index.mjs → index.js} +6 -6
- package/dist/index.js.map +1 -0
- package/dist/logger.d.ts +4 -0
- package/dist/logger.d.ts.map +1 -0
- package/dist/logger.js +5 -0
- package/dist/logger.js.map +1 -0
- package/dist/{types.d.mts → types.d.ts} +41 -41
- package/dist/types.d.ts.map +1 -0
- package/dist/{types.mjs → types.js} +1 -1
- package/dist/types.js.map +1 -0
- package/package.json +12 -16
- package/dist/SubscriptionController-method-action-types.cjs +0 -7
- package/dist/SubscriptionController-method-action-types.cjs.map +0 -1
- package/dist/SubscriptionController-method-action-types.d.cts +0 -250
- package/dist/SubscriptionController-method-action-types.d.cts.map +0 -1
- package/dist/SubscriptionController-method-action-types.d.mts.map +0 -1
- package/dist/SubscriptionController-method-action-types.mjs.map +0 -1
- package/dist/SubscriptionController.cjs +0 -744
- package/dist/SubscriptionController.cjs.map +0 -1
- package/dist/SubscriptionController.d.cts +0 -258
- package/dist/SubscriptionController.d.cts.map +0 -1
- package/dist/SubscriptionController.d.mts.map +0 -1
- package/dist/SubscriptionController.mjs.map +0 -1
- package/dist/SubscriptionService-method-action-types.cjs +0 -7
- package/dist/SubscriptionService-method-action-types.cjs.map +0 -1
- package/dist/SubscriptionService-method-action-types.d.cts +0 -155
- package/dist/SubscriptionService-method-action-types.d.cts.map +0 -1
- package/dist/SubscriptionService-method-action-types.d.mts.map +0 -1
- package/dist/SubscriptionService-method-action-types.mjs.map +0 -1
- package/dist/SubscriptionService-structs.cjs +0 -158
- package/dist/SubscriptionService-structs.cjs.map +0 -1
- package/dist/SubscriptionService-structs.d.cts +0 -721
- package/dist/SubscriptionService-structs.d.cts.map +0 -1
- package/dist/SubscriptionService-structs.d.mts.map +0 -1
- package/dist/SubscriptionService-structs.mjs.map +0 -1
- package/dist/SubscriptionService.cjs +0 -477
- package/dist/SubscriptionService.cjs.map +0 -1
- package/dist/SubscriptionService.d.cts.map +0 -1
- package/dist/SubscriptionService.d.mts +0 -149
- package/dist/SubscriptionService.d.mts.map +0 -1
- package/dist/SubscriptionService.mjs.map +0 -1
- package/dist/constants.cjs +0 -73
- package/dist/constants.cjs.map +0 -1
- package/dist/constants.d.cts.map +0 -1
- package/dist/constants.d.mts +0 -49
- package/dist/constants.d.mts.map +0 -1
- package/dist/constants.mjs.map +0 -1
- package/dist/errors.cjs +0 -72
- package/dist/errors.cjs.map +0 -1
- package/dist/errors.d.cts.map +0 -1
- package/dist/errors.d.mts +0 -34
- package/dist/errors.d.mts.map +0 -1
- package/dist/errors.mjs.map +0 -1
- package/dist/index.cjs +0 -29
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts.map +0 -1
- package/dist/index.d.mts +0 -11
- package/dist/index.d.mts.map +0 -1
- package/dist/index.mjs.map +0 -1
- package/dist/logger.cjs +0 -8
- package/dist/logger.cjs.map +0 -1
- package/dist/logger.d.cts +0 -5
- package/dist/logger.d.cts.map +0 -1
- package/dist/logger.d.mts +0 -5
- package/dist/logger.d.mts.map +0 -1
- package/dist/logger.mjs +0 -5
- package/dist/logger.mjs.map +0 -1
- package/dist/types.cjs +0 -90
- package/dist/types.cjs.map +0 -1
- package/dist/types.d.cts +0 -574
- package/dist/types.d.cts.map +0 -1
- package/dist/types.d.mts.map +0 -1
- package/dist/types.mjs.map +0 -1
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import type { Struct } from
|
|
2
|
-
import type { TokenPaymentInfo } from
|
|
1
|
+
import type { Struct } from '@metamask/superstruct';
|
|
2
|
+
import type { TokenPaymentInfo } from './types.js';
|
|
3
3
|
export declare const SubscriptionStruct: Struct<{
|
|
4
4
|
id: string;
|
|
5
5
|
products: {
|
|
6
|
-
name: "
|
|
6
|
+
name: "money_account_plus" | "shield";
|
|
7
7
|
currency: "usd";
|
|
8
8
|
unitAmount: number;
|
|
9
9
|
unitDecimals: number;
|
|
10
10
|
}[];
|
|
11
11
|
currentPeriodStart: string;
|
|
12
12
|
currentPeriodEnd: string;
|
|
13
|
-
|
|
13
|
+
cancelAtPeriodEnd?: boolean | undefined;
|
|
14
|
+
status: "active" | "canceled" | "incomplete" | "incomplete_expired" | "past_due" | "paused" | "provisional" | "trialing" | "unpaid";
|
|
14
15
|
interval: "month" | "year";
|
|
15
16
|
paymentMethod: {
|
|
16
17
|
type: "card";
|
|
@@ -22,38 +23,37 @@ export declare const SubscriptionStruct: Struct<{
|
|
|
22
23
|
} | {
|
|
23
24
|
type: "crypto";
|
|
24
25
|
crypto: {
|
|
25
|
-
chainId: `0x${string}`;
|
|
26
26
|
payerAddress: `0x${string}`;
|
|
27
|
+
chainId: `0x${string}`;
|
|
27
28
|
tokenSymbol: string;
|
|
28
|
-
error?: "
|
|
29
|
+
error?: "approval_transaction_max_verification_attempts_reached" | "approval_transaction_reverted" | "approval_transaction_too_old" | "insufficient_allowance" | "insufficient_balance" | undefined;
|
|
29
30
|
};
|
|
30
31
|
};
|
|
31
|
-
cancelType: "allowed_immediate" | "allowed_at_period_end" | "not_allowed" | "not_allowed_pending_verification";
|
|
32
|
-
isEligibleForSupport: boolean;
|
|
33
|
-
billingCycles?: number | undefined;
|
|
34
|
-
cancelAtPeriodEnd?: boolean | undefined;
|
|
35
32
|
trialPeriodDays?: number | undefined;
|
|
36
33
|
trialStart?: string | undefined;
|
|
37
34
|
trialEnd?: string | undefined;
|
|
38
35
|
endDate?: string | undefined;
|
|
39
36
|
canceledAt?: string | undefined;
|
|
37
|
+
cancelType: "allowed_at_period_end" | "allowed_immediate" | "not_allowed" | "not_allowed_pending_verification";
|
|
40
38
|
inactiveAt?: string | undefined;
|
|
39
|
+
isEligibleForSupport: boolean;
|
|
40
|
+
billingCycles?: number | undefined;
|
|
41
41
|
}, {
|
|
42
42
|
id: Struct<string, null>;
|
|
43
43
|
products: Struct<{
|
|
44
|
-
name: "
|
|
44
|
+
name: "money_account_plus" | "shield";
|
|
45
45
|
currency: "usd";
|
|
46
46
|
unitAmount: number;
|
|
47
47
|
unitDecimals: number;
|
|
48
48
|
}[], Struct<{
|
|
49
|
-
name: "
|
|
49
|
+
name: "money_account_plus" | "shield";
|
|
50
50
|
currency: "usd";
|
|
51
51
|
unitAmount: number;
|
|
52
52
|
unitDecimals: number;
|
|
53
53
|
}, {
|
|
54
|
-
name: Struct<"
|
|
55
|
-
shield: "shield";
|
|
54
|
+
name: Struct<"money_account_plus" | "shield", {
|
|
56
55
|
money_account_plus: "money_account_plus";
|
|
56
|
+
shield: "shield";
|
|
57
57
|
}>;
|
|
58
58
|
currency: Struct<"usd", {
|
|
59
59
|
usd: "usd";
|
|
@@ -64,16 +64,16 @@ export declare const SubscriptionStruct: Struct<{
|
|
|
64
64
|
currentPeriodStart: Struct<string, null>;
|
|
65
65
|
currentPeriodEnd: Struct<string, null>;
|
|
66
66
|
cancelAtPeriodEnd: Struct<boolean | undefined, null>;
|
|
67
|
-
status: Struct<"
|
|
67
|
+
status: Struct<"active" | "canceled" | "incomplete" | "incomplete_expired" | "past_due" | "paused" | "provisional" | "trialing" | "unpaid", {
|
|
68
|
+
active: "active";
|
|
69
|
+
canceled: "canceled";
|
|
68
70
|
incomplete: "incomplete";
|
|
69
71
|
incomplete_expired: "incomplete_expired";
|
|
72
|
+
past_due: "past_due";
|
|
73
|
+
paused: "paused";
|
|
70
74
|
provisional: "provisional";
|
|
71
75
|
trialing: "trialing";
|
|
72
|
-
active: "active";
|
|
73
|
-
past_due: "past_due";
|
|
74
76
|
unpaid: "unpaid";
|
|
75
|
-
canceled: "canceled";
|
|
76
|
-
paused: "paused";
|
|
77
77
|
}>;
|
|
78
78
|
interval: Struct<"month" | "year", {
|
|
79
79
|
month: "month";
|
|
@@ -89,10 +89,10 @@ export declare const SubscriptionStruct: Struct<{
|
|
|
89
89
|
} | {
|
|
90
90
|
type: "crypto";
|
|
91
91
|
crypto: {
|
|
92
|
-
chainId: `0x${string}`;
|
|
93
92
|
payerAddress: `0x${string}`;
|
|
93
|
+
chainId: `0x${string}`;
|
|
94
94
|
tokenSymbol: string;
|
|
95
|
-
error?: "
|
|
95
|
+
error?: "approval_transaction_max_verification_attempts_reached" | "approval_transaction_reverted" | "approval_transaction_too_old" | "insufficient_allowance" | "insufficient_balance" | undefined;
|
|
96
96
|
};
|
|
97
97
|
}, null>;
|
|
98
98
|
trialPeriodDays: Struct<number | undefined, null>;
|
|
@@ -100,9 +100,9 @@ export declare const SubscriptionStruct: Struct<{
|
|
|
100
100
|
trialEnd: Struct<string | undefined, null>;
|
|
101
101
|
endDate: Struct<string | undefined, null>;
|
|
102
102
|
canceledAt: Struct<string | undefined, null>;
|
|
103
|
-
cancelType: Struct<"
|
|
104
|
-
allowed_immediate: "allowed_immediate";
|
|
103
|
+
cancelType: Struct<"allowed_at_period_end" | "allowed_immediate" | "not_allowed" | "not_allowed_pending_verification", {
|
|
105
104
|
allowed_at_period_end: "allowed_at_period_end";
|
|
105
|
+
allowed_immediate: "allowed_immediate";
|
|
106
106
|
not_allowed: "not_allowed";
|
|
107
107
|
not_allowed_pending_verification: "not_allowed_pending_verification";
|
|
108
108
|
}>;
|
|
@@ -111,17 +111,19 @@ export declare const SubscriptionStruct: Struct<{
|
|
|
111
111
|
billingCycles: Struct<number | undefined, null>;
|
|
112
112
|
}>;
|
|
113
113
|
export declare const GetSubscriptionsResponseStruct: Struct<{
|
|
114
|
+
customerId?: string | undefined;
|
|
114
115
|
subscriptions: {
|
|
115
116
|
id: string;
|
|
116
117
|
products: {
|
|
117
|
-
name: "
|
|
118
|
+
name: "money_account_plus" | "shield";
|
|
118
119
|
currency: "usd";
|
|
119
120
|
unitAmount: number;
|
|
120
121
|
unitDecimals: number;
|
|
121
122
|
}[];
|
|
122
123
|
currentPeriodStart: string;
|
|
123
124
|
currentPeriodEnd: string;
|
|
124
|
-
|
|
125
|
+
cancelAtPeriodEnd?: boolean | undefined;
|
|
126
|
+
status: "active" | "canceled" | "incomplete" | "incomplete_expired" | "past_due" | "paused" | "provisional" | "trialing" | "unpaid";
|
|
125
127
|
interval: "month" | "year";
|
|
126
128
|
paymentMethod: {
|
|
127
129
|
type: "card";
|
|
@@ -133,36 +135,35 @@ export declare const GetSubscriptionsResponseStruct: Struct<{
|
|
|
133
135
|
} | {
|
|
134
136
|
type: "crypto";
|
|
135
137
|
crypto: {
|
|
136
|
-
chainId: `0x${string}`;
|
|
137
138
|
payerAddress: `0x${string}`;
|
|
139
|
+
chainId: `0x${string}`;
|
|
138
140
|
tokenSymbol: string;
|
|
139
|
-
error?: "
|
|
141
|
+
error?: "approval_transaction_max_verification_attempts_reached" | "approval_transaction_reverted" | "approval_transaction_too_old" | "insufficient_allowance" | "insufficient_balance" | undefined;
|
|
140
142
|
};
|
|
141
143
|
};
|
|
142
|
-
cancelType: "allowed_immediate" | "allowed_at_period_end" | "not_allowed" | "not_allowed_pending_verification";
|
|
143
|
-
isEligibleForSupport: boolean;
|
|
144
|
-
billingCycles?: number | undefined;
|
|
145
|
-
cancelAtPeriodEnd?: boolean | undefined;
|
|
146
144
|
trialPeriodDays?: number | undefined;
|
|
147
145
|
trialStart?: string | undefined;
|
|
148
146
|
trialEnd?: string | undefined;
|
|
149
147
|
endDate?: string | undefined;
|
|
150
148
|
canceledAt?: string | undefined;
|
|
149
|
+
cancelType: "allowed_at_period_end" | "allowed_immediate" | "not_allowed" | "not_allowed_pending_verification";
|
|
151
150
|
inactiveAt?: string | undefined;
|
|
151
|
+
isEligibleForSupport: boolean;
|
|
152
|
+
billingCycles?: number | undefined;
|
|
152
153
|
}[];
|
|
153
|
-
trialedProducts: ("
|
|
154
|
-
customerId?: string | undefined;
|
|
154
|
+
trialedProducts: ("money_account_plus" | "shield")[];
|
|
155
155
|
lastSubscription?: {
|
|
156
156
|
id: string;
|
|
157
157
|
products: {
|
|
158
|
-
name: "
|
|
158
|
+
name: "money_account_plus" | "shield";
|
|
159
159
|
currency: "usd";
|
|
160
160
|
unitAmount: number;
|
|
161
161
|
unitDecimals: number;
|
|
162
162
|
}[];
|
|
163
163
|
currentPeriodStart: string;
|
|
164
164
|
currentPeriodEnd: string;
|
|
165
|
-
|
|
165
|
+
cancelAtPeriodEnd?: boolean | undefined;
|
|
166
|
+
status: "active" | "canceled" | "incomplete" | "incomplete_expired" | "past_due" | "paused" | "provisional" | "trialing" | "unpaid";
|
|
166
167
|
interval: "month" | "year";
|
|
167
168
|
paymentMethod: {
|
|
168
169
|
type: "card";
|
|
@@ -174,22 +175,21 @@ export declare const GetSubscriptionsResponseStruct: Struct<{
|
|
|
174
175
|
} | {
|
|
175
176
|
type: "crypto";
|
|
176
177
|
crypto: {
|
|
177
|
-
chainId: `0x${string}`;
|
|
178
178
|
payerAddress: `0x${string}`;
|
|
179
|
+
chainId: `0x${string}`;
|
|
179
180
|
tokenSymbol: string;
|
|
180
|
-
error?: "
|
|
181
|
+
error?: "approval_transaction_max_verification_attempts_reached" | "approval_transaction_reverted" | "approval_transaction_too_old" | "insufficient_allowance" | "insufficient_balance" | undefined;
|
|
181
182
|
};
|
|
182
183
|
};
|
|
183
|
-
cancelType: "allowed_immediate" | "allowed_at_period_end" | "not_allowed" | "not_allowed_pending_verification";
|
|
184
|
-
isEligibleForSupport: boolean;
|
|
185
|
-
billingCycles?: number | undefined;
|
|
186
|
-
cancelAtPeriodEnd?: boolean | undefined;
|
|
187
184
|
trialPeriodDays?: number | undefined;
|
|
188
185
|
trialStart?: string | undefined;
|
|
189
186
|
trialEnd?: string | undefined;
|
|
190
187
|
endDate?: string | undefined;
|
|
191
188
|
canceledAt?: string | undefined;
|
|
189
|
+
cancelType: "allowed_at_period_end" | "allowed_immediate" | "not_allowed" | "not_allowed_pending_verification";
|
|
192
190
|
inactiveAt?: string | undefined;
|
|
191
|
+
isEligibleForSupport: boolean;
|
|
192
|
+
billingCycles?: number | undefined;
|
|
193
193
|
} | undefined;
|
|
194
194
|
rewardAccountId?: `${string}:${string}:${string}` | undefined;
|
|
195
195
|
}, {
|
|
@@ -197,14 +197,15 @@ export declare const GetSubscriptionsResponseStruct: Struct<{
|
|
|
197
197
|
subscriptions: Struct<{
|
|
198
198
|
id: string;
|
|
199
199
|
products: {
|
|
200
|
-
name: "
|
|
200
|
+
name: "money_account_plus" | "shield";
|
|
201
201
|
currency: "usd";
|
|
202
202
|
unitAmount: number;
|
|
203
203
|
unitDecimals: number;
|
|
204
204
|
}[];
|
|
205
205
|
currentPeriodStart: string;
|
|
206
206
|
currentPeriodEnd: string;
|
|
207
|
-
|
|
207
|
+
cancelAtPeriodEnd?: boolean | undefined;
|
|
208
|
+
status: "active" | "canceled" | "incomplete" | "incomplete_expired" | "past_due" | "paused" | "provisional" | "trialing" | "unpaid";
|
|
208
209
|
interval: "month" | "year";
|
|
209
210
|
paymentMethod: {
|
|
210
211
|
type: "card";
|
|
@@ -216,33 +217,33 @@ export declare const GetSubscriptionsResponseStruct: Struct<{
|
|
|
216
217
|
} | {
|
|
217
218
|
type: "crypto";
|
|
218
219
|
crypto: {
|
|
219
|
-
chainId: `0x${string}`;
|
|
220
220
|
payerAddress: `0x${string}`;
|
|
221
|
+
chainId: `0x${string}`;
|
|
221
222
|
tokenSymbol: string;
|
|
222
|
-
error?: "
|
|
223
|
+
error?: "approval_transaction_max_verification_attempts_reached" | "approval_transaction_reverted" | "approval_transaction_too_old" | "insufficient_allowance" | "insufficient_balance" | undefined;
|
|
223
224
|
};
|
|
224
225
|
};
|
|
225
|
-
cancelType: "allowed_immediate" | "allowed_at_period_end" | "not_allowed" | "not_allowed_pending_verification";
|
|
226
|
-
isEligibleForSupport: boolean;
|
|
227
|
-
billingCycles?: number | undefined;
|
|
228
|
-
cancelAtPeriodEnd?: boolean | undefined;
|
|
229
226
|
trialPeriodDays?: number | undefined;
|
|
230
227
|
trialStart?: string | undefined;
|
|
231
228
|
trialEnd?: string | undefined;
|
|
232
229
|
endDate?: string | undefined;
|
|
233
230
|
canceledAt?: string | undefined;
|
|
231
|
+
cancelType: "allowed_at_period_end" | "allowed_immediate" | "not_allowed" | "not_allowed_pending_verification";
|
|
234
232
|
inactiveAt?: string | undefined;
|
|
233
|
+
isEligibleForSupport: boolean;
|
|
234
|
+
billingCycles?: number | undefined;
|
|
235
235
|
}[], Struct<{
|
|
236
236
|
id: string;
|
|
237
237
|
products: {
|
|
238
|
-
name: "
|
|
238
|
+
name: "money_account_plus" | "shield";
|
|
239
239
|
currency: "usd";
|
|
240
240
|
unitAmount: number;
|
|
241
241
|
unitDecimals: number;
|
|
242
242
|
}[];
|
|
243
243
|
currentPeriodStart: string;
|
|
244
244
|
currentPeriodEnd: string;
|
|
245
|
-
|
|
245
|
+
cancelAtPeriodEnd?: boolean | undefined;
|
|
246
|
+
status: "active" | "canceled" | "incomplete" | "incomplete_expired" | "past_due" | "paused" | "provisional" | "trialing" | "unpaid";
|
|
246
247
|
interval: "month" | "year";
|
|
247
248
|
paymentMethod: {
|
|
248
249
|
type: "card";
|
|
@@ -254,38 +255,37 @@ export declare const GetSubscriptionsResponseStruct: Struct<{
|
|
|
254
255
|
} | {
|
|
255
256
|
type: "crypto";
|
|
256
257
|
crypto: {
|
|
257
|
-
chainId: `0x${string}`;
|
|
258
258
|
payerAddress: `0x${string}`;
|
|
259
|
+
chainId: `0x${string}`;
|
|
259
260
|
tokenSymbol: string;
|
|
260
|
-
error?: "
|
|
261
|
+
error?: "approval_transaction_max_verification_attempts_reached" | "approval_transaction_reverted" | "approval_transaction_too_old" | "insufficient_allowance" | "insufficient_balance" | undefined;
|
|
261
262
|
};
|
|
262
263
|
};
|
|
263
|
-
cancelType: "allowed_immediate" | "allowed_at_period_end" | "not_allowed" | "not_allowed_pending_verification";
|
|
264
|
-
isEligibleForSupport: boolean;
|
|
265
|
-
billingCycles?: number | undefined;
|
|
266
|
-
cancelAtPeriodEnd?: boolean | undefined;
|
|
267
264
|
trialPeriodDays?: number | undefined;
|
|
268
265
|
trialStart?: string | undefined;
|
|
269
266
|
trialEnd?: string | undefined;
|
|
270
267
|
endDate?: string | undefined;
|
|
271
268
|
canceledAt?: string | undefined;
|
|
269
|
+
cancelType: "allowed_at_period_end" | "allowed_immediate" | "not_allowed" | "not_allowed_pending_verification";
|
|
272
270
|
inactiveAt?: string | undefined;
|
|
271
|
+
isEligibleForSupport: boolean;
|
|
272
|
+
billingCycles?: number | undefined;
|
|
273
273
|
}, {
|
|
274
274
|
id: Struct<string, null>;
|
|
275
275
|
products: Struct<{
|
|
276
|
-
name: "
|
|
276
|
+
name: "money_account_plus" | "shield";
|
|
277
277
|
currency: "usd";
|
|
278
278
|
unitAmount: number;
|
|
279
279
|
unitDecimals: number;
|
|
280
280
|
}[], Struct<{
|
|
281
|
-
name: "
|
|
281
|
+
name: "money_account_plus" | "shield";
|
|
282
282
|
currency: "usd";
|
|
283
283
|
unitAmount: number;
|
|
284
284
|
unitDecimals: number;
|
|
285
285
|
}, {
|
|
286
|
-
name: Struct<"
|
|
287
|
-
shield: "shield";
|
|
286
|
+
name: Struct<"money_account_plus" | "shield", {
|
|
288
287
|
money_account_plus: "money_account_plus";
|
|
288
|
+
shield: "shield";
|
|
289
289
|
}>;
|
|
290
290
|
currency: Struct<"usd", {
|
|
291
291
|
usd: "usd";
|
|
@@ -296,16 +296,16 @@ export declare const GetSubscriptionsResponseStruct: Struct<{
|
|
|
296
296
|
currentPeriodStart: Struct<string, null>;
|
|
297
297
|
currentPeriodEnd: Struct<string, null>;
|
|
298
298
|
cancelAtPeriodEnd: Struct<boolean | undefined, null>;
|
|
299
|
-
status: Struct<"
|
|
299
|
+
status: Struct<"active" | "canceled" | "incomplete" | "incomplete_expired" | "past_due" | "paused" | "provisional" | "trialing" | "unpaid", {
|
|
300
|
+
active: "active";
|
|
301
|
+
canceled: "canceled";
|
|
300
302
|
incomplete: "incomplete";
|
|
301
303
|
incomplete_expired: "incomplete_expired";
|
|
304
|
+
past_due: "past_due";
|
|
305
|
+
paused: "paused";
|
|
302
306
|
provisional: "provisional";
|
|
303
307
|
trialing: "trialing";
|
|
304
|
-
active: "active";
|
|
305
|
-
past_due: "past_due";
|
|
306
308
|
unpaid: "unpaid";
|
|
307
|
-
canceled: "canceled";
|
|
308
|
-
paused: "paused";
|
|
309
309
|
}>;
|
|
310
310
|
interval: Struct<"month" | "year", {
|
|
311
311
|
month: "month";
|
|
@@ -321,10 +321,10 @@ export declare const GetSubscriptionsResponseStruct: Struct<{
|
|
|
321
321
|
} | {
|
|
322
322
|
type: "crypto";
|
|
323
323
|
crypto: {
|
|
324
|
-
chainId: `0x${string}`;
|
|
325
324
|
payerAddress: `0x${string}`;
|
|
325
|
+
chainId: `0x${string}`;
|
|
326
326
|
tokenSymbol: string;
|
|
327
|
-
error?: "
|
|
327
|
+
error?: "approval_transaction_max_verification_attempts_reached" | "approval_transaction_reverted" | "approval_transaction_too_old" | "insufficient_allowance" | "insufficient_balance" | undefined;
|
|
328
328
|
};
|
|
329
329
|
}, null>;
|
|
330
330
|
trialPeriodDays: Struct<number | undefined, null>;
|
|
@@ -332,9 +332,9 @@ export declare const GetSubscriptionsResponseStruct: Struct<{
|
|
|
332
332
|
trialEnd: Struct<string | undefined, null>;
|
|
333
333
|
endDate: Struct<string | undefined, null>;
|
|
334
334
|
canceledAt: Struct<string | undefined, null>;
|
|
335
|
-
cancelType: Struct<"
|
|
336
|
-
allowed_immediate: "allowed_immediate";
|
|
335
|
+
cancelType: Struct<"allowed_at_period_end" | "allowed_immediate" | "not_allowed" | "not_allowed_pending_verification", {
|
|
337
336
|
allowed_at_period_end: "allowed_at_period_end";
|
|
337
|
+
allowed_immediate: "allowed_immediate";
|
|
338
338
|
not_allowed: "not_allowed";
|
|
339
339
|
not_allowed_pending_verification: "not_allowed_pending_verification";
|
|
340
340
|
}>;
|
|
@@ -342,21 +342,22 @@ export declare const GetSubscriptionsResponseStruct: Struct<{
|
|
|
342
342
|
isEligibleForSupport: Struct<boolean, null>;
|
|
343
343
|
billingCycles: Struct<number | undefined, null>;
|
|
344
344
|
}>>;
|
|
345
|
-
trialedProducts: Struct<("
|
|
346
|
-
shield: "shield";
|
|
345
|
+
trialedProducts: Struct<("money_account_plus" | "shield")[], Struct<"money_account_plus" | "shield", {
|
|
347
346
|
money_account_plus: "money_account_plus";
|
|
347
|
+
shield: "shield";
|
|
348
348
|
}>>;
|
|
349
349
|
lastSubscription: Struct<{
|
|
350
350
|
id: string;
|
|
351
351
|
products: {
|
|
352
|
-
name: "
|
|
352
|
+
name: "money_account_plus" | "shield";
|
|
353
353
|
currency: "usd";
|
|
354
354
|
unitAmount: number;
|
|
355
355
|
unitDecimals: number;
|
|
356
356
|
}[];
|
|
357
357
|
currentPeriodStart: string;
|
|
358
358
|
currentPeriodEnd: string;
|
|
359
|
-
|
|
359
|
+
cancelAtPeriodEnd?: boolean | undefined;
|
|
360
|
+
status: "active" | "canceled" | "incomplete" | "incomplete_expired" | "past_due" | "paused" | "provisional" | "trialing" | "unpaid";
|
|
360
361
|
interval: "month" | "year";
|
|
361
362
|
paymentMethod: {
|
|
362
363
|
type: "card";
|
|
@@ -368,38 +369,37 @@ export declare const GetSubscriptionsResponseStruct: Struct<{
|
|
|
368
369
|
} | {
|
|
369
370
|
type: "crypto";
|
|
370
371
|
crypto: {
|
|
371
|
-
chainId: `0x${string}`;
|
|
372
372
|
payerAddress: `0x${string}`;
|
|
373
|
+
chainId: `0x${string}`;
|
|
373
374
|
tokenSymbol: string;
|
|
374
|
-
error?: "
|
|
375
|
+
error?: "approval_transaction_max_verification_attempts_reached" | "approval_transaction_reverted" | "approval_transaction_too_old" | "insufficient_allowance" | "insufficient_balance" | undefined;
|
|
375
376
|
};
|
|
376
377
|
};
|
|
377
|
-
cancelType: "allowed_immediate" | "allowed_at_period_end" | "not_allowed" | "not_allowed_pending_verification";
|
|
378
|
-
isEligibleForSupport: boolean;
|
|
379
|
-
billingCycles?: number | undefined;
|
|
380
|
-
cancelAtPeriodEnd?: boolean | undefined;
|
|
381
378
|
trialPeriodDays?: number | undefined;
|
|
382
379
|
trialStart?: string | undefined;
|
|
383
380
|
trialEnd?: string | undefined;
|
|
384
381
|
endDate?: string | undefined;
|
|
385
382
|
canceledAt?: string | undefined;
|
|
383
|
+
cancelType: "allowed_at_period_end" | "allowed_immediate" | "not_allowed" | "not_allowed_pending_verification";
|
|
386
384
|
inactiveAt?: string | undefined;
|
|
385
|
+
isEligibleForSupport: boolean;
|
|
386
|
+
billingCycles?: number | undefined;
|
|
387
387
|
} | undefined, {
|
|
388
388
|
id: Struct<string, null>;
|
|
389
389
|
products: Struct<{
|
|
390
|
-
name: "
|
|
390
|
+
name: "money_account_plus" | "shield";
|
|
391
391
|
currency: "usd";
|
|
392
392
|
unitAmount: number;
|
|
393
393
|
unitDecimals: number;
|
|
394
394
|
}[], Struct<{
|
|
395
|
-
name: "
|
|
395
|
+
name: "money_account_plus" | "shield";
|
|
396
396
|
currency: "usd";
|
|
397
397
|
unitAmount: number;
|
|
398
398
|
unitDecimals: number;
|
|
399
399
|
}, {
|
|
400
|
-
name: Struct<"
|
|
401
|
-
shield: "shield";
|
|
400
|
+
name: Struct<"money_account_plus" | "shield", {
|
|
402
401
|
money_account_plus: "money_account_plus";
|
|
402
|
+
shield: "shield";
|
|
403
403
|
}>;
|
|
404
404
|
currency: Struct<"usd", {
|
|
405
405
|
usd: "usd";
|
|
@@ -410,16 +410,16 @@ export declare const GetSubscriptionsResponseStruct: Struct<{
|
|
|
410
410
|
currentPeriodStart: Struct<string, null>;
|
|
411
411
|
currentPeriodEnd: Struct<string, null>;
|
|
412
412
|
cancelAtPeriodEnd: Struct<boolean | undefined, null>;
|
|
413
|
-
status: Struct<"
|
|
413
|
+
status: Struct<"active" | "canceled" | "incomplete" | "incomplete_expired" | "past_due" | "paused" | "provisional" | "trialing" | "unpaid", {
|
|
414
|
+
active: "active";
|
|
415
|
+
canceled: "canceled";
|
|
414
416
|
incomplete: "incomplete";
|
|
415
417
|
incomplete_expired: "incomplete_expired";
|
|
418
|
+
past_due: "past_due";
|
|
419
|
+
paused: "paused";
|
|
416
420
|
provisional: "provisional";
|
|
417
421
|
trialing: "trialing";
|
|
418
|
-
active: "active";
|
|
419
|
-
past_due: "past_due";
|
|
420
422
|
unpaid: "unpaid";
|
|
421
|
-
canceled: "canceled";
|
|
422
|
-
paused: "paused";
|
|
423
423
|
}>;
|
|
424
424
|
interval: Struct<"month" | "year", {
|
|
425
425
|
month: "month";
|
|
@@ -435,10 +435,10 @@ export declare const GetSubscriptionsResponseStruct: Struct<{
|
|
|
435
435
|
} | {
|
|
436
436
|
type: "crypto";
|
|
437
437
|
crypto: {
|
|
438
|
-
chainId: `0x${string}`;
|
|
439
438
|
payerAddress: `0x${string}`;
|
|
439
|
+
chainId: `0x${string}`;
|
|
440
440
|
tokenSymbol: string;
|
|
441
|
-
error?: "
|
|
441
|
+
error?: "approval_transaction_max_verification_attempts_reached" | "approval_transaction_reverted" | "approval_transaction_too_old" | "insufficient_allowance" | "insufficient_balance" | undefined;
|
|
442
442
|
};
|
|
443
443
|
}, null>;
|
|
444
444
|
trialPeriodDays: Struct<number | undefined, null>;
|
|
@@ -446,9 +446,9 @@ export declare const GetSubscriptionsResponseStruct: Struct<{
|
|
|
446
446
|
trialEnd: Struct<string | undefined, null>;
|
|
447
447
|
endDate: Struct<string | undefined, null>;
|
|
448
448
|
canceledAt: Struct<string | undefined, null>;
|
|
449
|
-
cancelType: Struct<"
|
|
450
|
-
allowed_immediate: "allowed_immediate";
|
|
449
|
+
cancelType: Struct<"allowed_at_period_end" | "allowed_immediate" | "not_allowed" | "not_allowed_pending_verification", {
|
|
451
450
|
allowed_at_period_end: "allowed_at_period_end";
|
|
451
|
+
allowed_immediate: "allowed_immediate";
|
|
452
452
|
not_allowed: "not_allowed";
|
|
453
453
|
not_allowed_pending_verification: "not_allowed_pending_verification";
|
|
454
454
|
}>;
|
|
@@ -464,20 +464,20 @@ export declare const StartSubscriptionResponseStruct: Struct<{
|
|
|
464
464
|
checkoutSessionUrl: Struct<string, null>;
|
|
465
465
|
}>;
|
|
466
466
|
export declare const StartCryptoSubscriptionResponseStruct: Struct<{
|
|
467
|
-
status: "incomplete" | "incomplete_expired" | "provisional" | "trialing" | "active" | "past_due" | "unpaid" | "canceled" | "paused";
|
|
468
467
|
subscriptionId: string;
|
|
468
|
+
status: "active" | "canceled" | "incomplete" | "incomplete_expired" | "past_due" | "paused" | "provisional" | "trialing" | "unpaid";
|
|
469
469
|
}, {
|
|
470
470
|
subscriptionId: Struct<string, null>;
|
|
471
|
-
status: Struct<"
|
|
471
|
+
status: Struct<"active" | "canceled" | "incomplete" | "incomplete_expired" | "past_due" | "paused" | "provisional" | "trialing" | "unpaid", {
|
|
472
|
+
active: "active";
|
|
473
|
+
canceled: "canceled";
|
|
472
474
|
incomplete: "incomplete";
|
|
473
475
|
incomplete_expired: "incomplete_expired";
|
|
476
|
+
past_due: "past_due";
|
|
477
|
+
paused: "paused";
|
|
474
478
|
provisional: "provisional";
|
|
475
479
|
trialing: "trialing";
|
|
476
|
-
active: "active";
|
|
477
|
-
past_due: "past_due";
|
|
478
480
|
unpaid: "unpaid";
|
|
479
|
-
canceled: "canceled";
|
|
480
|
-
paused: "paused";
|
|
481
481
|
}>;
|
|
482
482
|
}>;
|
|
483
483
|
export declare const UpdatePaymentMethodCardResponseStruct: Struct<{
|
|
@@ -499,12 +499,12 @@ export declare const SubscriptionApiGeneralResponseStruct: Struct<{
|
|
|
499
499
|
}>;
|
|
500
500
|
export declare const PricingResponseStruct: Struct<{
|
|
501
501
|
products: {
|
|
502
|
-
name: "
|
|
502
|
+
name: "money_account_plus" | "shield";
|
|
503
503
|
prices: {
|
|
504
|
-
|
|
504
|
+
interval: "month" | "year";
|
|
505
505
|
unitAmount: number;
|
|
506
506
|
unitDecimals: number;
|
|
507
|
-
|
|
507
|
+
currency: "usd";
|
|
508
508
|
trialPeriodDays: number;
|
|
509
509
|
minBillingCycles: number;
|
|
510
510
|
minBillingCyclesForBalance: number;
|
|
@@ -512,60 +512,60 @@ export declare const PricingResponseStruct: Struct<{
|
|
|
512
512
|
}[];
|
|
513
513
|
paymentMethods: ({
|
|
514
514
|
type: "card";
|
|
515
|
-
products?: ("
|
|
515
|
+
products?: ("money_account_plus" | "shield")[] | undefined;
|
|
516
516
|
} | {
|
|
517
517
|
type: "crypto";
|
|
518
|
-
|
|
519
|
-
|
|
518
|
+
cryptoAuthMethod?: "delegation" | "erc20_approval" | undefined;
|
|
519
|
+
products?: ("money_account_plus" | "shield")[] | undefined;
|
|
520
520
|
chains?: {
|
|
521
521
|
chainId: `0x${string}`;
|
|
522
522
|
paymentAddress: `0x${string}`;
|
|
523
|
-
tokens: TokenPaymentInfo[];
|
|
524
523
|
delegateAddress?: `0x${string}` | undefined;
|
|
524
|
+
tokens: TokenPaymentInfo[];
|
|
525
525
|
isSponsorshipSupported?: boolean | undefined;
|
|
526
526
|
}[] | undefined;
|
|
527
527
|
})[];
|
|
528
528
|
}, {
|
|
529
529
|
products: Struct<{
|
|
530
|
-
name: "
|
|
530
|
+
name: "money_account_plus" | "shield";
|
|
531
531
|
prices: {
|
|
532
|
-
|
|
532
|
+
interval: "month" | "year";
|
|
533
533
|
unitAmount: number;
|
|
534
534
|
unitDecimals: number;
|
|
535
|
-
|
|
535
|
+
currency: "usd";
|
|
536
536
|
trialPeriodDays: number;
|
|
537
537
|
minBillingCycles: number;
|
|
538
538
|
minBillingCyclesForBalance: number;
|
|
539
539
|
}[];
|
|
540
540
|
}[], Struct<{
|
|
541
|
-
name: "
|
|
541
|
+
name: "money_account_plus" | "shield";
|
|
542
542
|
prices: {
|
|
543
|
-
|
|
543
|
+
interval: "month" | "year";
|
|
544
544
|
unitAmount: number;
|
|
545
545
|
unitDecimals: number;
|
|
546
|
-
|
|
546
|
+
currency: "usd";
|
|
547
547
|
trialPeriodDays: number;
|
|
548
548
|
minBillingCycles: number;
|
|
549
549
|
minBillingCyclesForBalance: number;
|
|
550
550
|
}[];
|
|
551
551
|
}, {
|
|
552
|
-
name: Struct<"
|
|
553
|
-
shield: "shield";
|
|
552
|
+
name: Struct<"money_account_plus" | "shield", {
|
|
554
553
|
money_account_plus: "money_account_plus";
|
|
554
|
+
shield: "shield";
|
|
555
555
|
}>;
|
|
556
556
|
prices: Struct<{
|
|
557
|
-
|
|
557
|
+
interval: "month" | "year";
|
|
558
558
|
unitAmount: number;
|
|
559
559
|
unitDecimals: number;
|
|
560
|
-
|
|
560
|
+
currency: "usd";
|
|
561
561
|
trialPeriodDays: number;
|
|
562
562
|
minBillingCycles: number;
|
|
563
563
|
minBillingCyclesForBalance: number;
|
|
564
564
|
}[], Struct<{
|
|
565
|
-
|
|
565
|
+
interval: "month" | "year";
|
|
566
566
|
unitAmount: number;
|
|
567
567
|
unitDecimals: number;
|
|
568
|
-
|
|
568
|
+
currency: "usd";
|
|
569
569
|
trialPeriodDays: number;
|
|
570
570
|
minBillingCycles: number;
|
|
571
571
|
minBillingCyclesForBalance: number;
|
|
@@ -586,36 +586,36 @@ export declare const PricingResponseStruct: Struct<{
|
|
|
586
586
|
}>>;
|
|
587
587
|
paymentMethods: Struct<({
|
|
588
588
|
type: "card";
|
|
589
|
-
products?: ("
|
|
589
|
+
products?: ("money_account_plus" | "shield")[] | undefined;
|
|
590
590
|
} | {
|
|
591
591
|
type: "crypto";
|
|
592
|
-
|
|
593
|
-
|
|
592
|
+
cryptoAuthMethod?: "delegation" | "erc20_approval" | undefined;
|
|
593
|
+
products?: ("money_account_plus" | "shield")[] | undefined;
|
|
594
594
|
chains?: {
|
|
595
595
|
chainId: `0x${string}`;
|
|
596
596
|
paymentAddress: `0x${string}`;
|
|
597
|
-
tokens: TokenPaymentInfo[];
|
|
598
597
|
delegateAddress?: `0x${string}` | undefined;
|
|
598
|
+
tokens: TokenPaymentInfo[];
|
|
599
599
|
isSponsorshipSupported?: boolean | undefined;
|
|
600
600
|
}[] | undefined;
|
|
601
601
|
})[], Struct<{
|
|
602
602
|
type: "card";
|
|
603
|
-
products?: ("
|
|
603
|
+
products?: ("money_account_plus" | "shield")[] | undefined;
|
|
604
604
|
} | {
|
|
605
605
|
type: "crypto";
|
|
606
|
-
|
|
607
|
-
|
|
606
|
+
cryptoAuthMethod?: "delegation" | "erc20_approval" | undefined;
|
|
607
|
+
products?: ("money_account_plus" | "shield")[] | undefined;
|
|
608
608
|
chains?: {
|
|
609
609
|
chainId: `0x${string}`;
|
|
610
610
|
paymentAddress: `0x${string}`;
|
|
611
|
-
tokens: TokenPaymentInfo[];
|
|
612
611
|
delegateAddress?: `0x${string}` | undefined;
|
|
612
|
+
tokens: TokenPaymentInfo[];
|
|
613
613
|
isSponsorshipSupported?: boolean | undefined;
|
|
614
614
|
}[] | undefined;
|
|
615
615
|
}, null>>;
|
|
616
616
|
}>;
|
|
617
617
|
export declare const SubscriptionEligibilityStruct: Struct<{
|
|
618
|
-
product: "
|
|
618
|
+
product: "money_account_plus" | "shield";
|
|
619
619
|
canSubscribe?: boolean | undefined;
|
|
620
620
|
canViewEntryModal?: boolean | undefined;
|
|
621
621
|
modalType?: "A" | "B" | undefined;
|
|
@@ -629,9 +629,9 @@ export declare const SubscriptionEligibilityStruct: Struct<{
|
|
|
629
629
|
assignedAt?: string | undefined;
|
|
630
630
|
hasAssignedCohortExpired?: boolean | undefined;
|
|
631
631
|
}, {
|
|
632
|
-
product: Struct<"
|
|
633
|
-
shield: "shield";
|
|
632
|
+
product: Struct<"money_account_plus" | "shield", {
|
|
634
633
|
money_account_plus: "money_account_plus";
|
|
634
|
+
shield: "shield";
|
|
635
635
|
}>;
|
|
636
636
|
canSubscribe: Struct<boolean | undefined, null>;
|
|
637
637
|
canViewEntryModal: Struct<boolean | undefined, null>;
|
|
@@ -660,7 +660,7 @@ export declare const SubscriptionEligibilityStruct: Struct<{
|
|
|
660
660
|
hasAssignedCohortExpired: Struct<boolean | undefined, null>;
|
|
661
661
|
}>;
|
|
662
662
|
export declare const SubscriptionEligibilityArrayStruct: Struct<{
|
|
663
|
-
product: "
|
|
663
|
+
product: "money_account_plus" | "shield";
|
|
664
664
|
canSubscribe?: boolean | undefined;
|
|
665
665
|
canViewEntryModal?: boolean | undefined;
|
|
666
666
|
modalType?: "A" | "B" | undefined;
|
|
@@ -674,7 +674,7 @@ export declare const SubscriptionEligibilityArrayStruct: Struct<{
|
|
|
674
674
|
assignedAt?: string | undefined;
|
|
675
675
|
hasAssignedCohortExpired?: boolean | undefined;
|
|
676
676
|
}[], Struct<{
|
|
677
|
-
product: "
|
|
677
|
+
product: "money_account_plus" | "shield";
|
|
678
678
|
canSubscribe?: boolean | undefined;
|
|
679
679
|
canViewEntryModal?: boolean | undefined;
|
|
680
680
|
modalType?: "A" | "B" | undefined;
|
|
@@ -688,9 +688,9 @@ export declare const SubscriptionEligibilityArrayStruct: Struct<{
|
|
|
688
688
|
assignedAt?: string | undefined;
|
|
689
689
|
hasAssignedCohortExpired?: boolean | undefined;
|
|
690
690
|
}, {
|
|
691
|
-
product: Struct<"
|
|
692
|
-
shield: "shield";
|
|
691
|
+
product: Struct<"money_account_plus" | "shield", {
|
|
693
692
|
money_account_plus: "money_account_plus";
|
|
693
|
+
shield: "shield";
|
|
694
694
|
}>;
|
|
695
695
|
canSubscribe: Struct<boolean | undefined, null>;
|
|
696
696
|
canViewEntryModal: Struct<boolean | undefined, null>;
|
|
@@ -718,4 +718,4 @@ export declare const SubscriptionEligibilityArrayStruct: Struct<{
|
|
|
718
718
|
assignedAt: Struct<string | undefined, null>;
|
|
719
719
|
hasAssignedCohortExpired: Struct<boolean | undefined, null>;
|
|
720
720
|
}>>;
|
|
721
|
-
//# sourceMappingURL=SubscriptionService-structs.d.
|
|
721
|
+
//# sourceMappingURL=SubscriptionService-structs.d.ts.map
|