@metamask-previews/subscription-controller 7.0.0-preview-9efd0b754 → 7.0.0-preview-4e64b66e8
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 +33 -1
- package/dist/SubscriptionController-method-action-types.cjs.map +1 -1
- package/dist/SubscriptionController-method-action-types.d.cts +55 -18
- package/dist/SubscriptionController-method-action-types.d.cts.map +1 -1
- package/dist/SubscriptionController-method-action-types.d.mts +55 -18
- package/dist/SubscriptionController-method-action-types.d.mts.map +1 -1
- package/dist/SubscriptionController-method-action-types.mjs.map +1 -1
- package/dist/SubscriptionController.cjs +165 -45
- package/dist/SubscriptionController.cjs.map +1 -1
- package/dist/SubscriptionController.d.cts +53 -17
- package/dist/SubscriptionController.d.cts.map +1 -1
- package/dist/SubscriptionController.d.mts +53 -17
- package/dist/SubscriptionController.d.mts.map +1 -1
- package/dist/SubscriptionController.mjs +166 -46
- package/dist/SubscriptionController.mjs.map +1 -1
- package/dist/SubscriptionService-method-action-types.cjs.map +1 -1
- package/dist/SubscriptionService-method-action-types.d.cts +5 -1
- package/dist/SubscriptionService-method-action-types.d.cts.map +1 -1
- package/dist/SubscriptionService-method-action-types.d.mts +5 -1
- package/dist/SubscriptionService-method-action-types.d.mts.map +1 -1
- package/dist/SubscriptionService-method-action-types.mjs.map +1 -1
- package/dist/SubscriptionService-structs.cjs +35 -12
- package/dist/SubscriptionService-structs.cjs.map +1 -1
- package/dist/SubscriptionService-structs.d.cts +185 -237
- package/dist/SubscriptionService-structs.d.cts.map +1 -1
- package/dist/SubscriptionService-structs.d.mts +185 -237
- package/dist/SubscriptionService-structs.d.mts.map +1 -1
- package/dist/SubscriptionService-structs.mjs +37 -14
- package/dist/SubscriptionService-structs.mjs.map +1 -1
- package/dist/SubscriptionService.cjs +24 -2
- package/dist/SubscriptionService.cjs.map +1 -1
- package/dist/SubscriptionService.d.cts +5 -1
- package/dist/SubscriptionService.d.cts.map +1 -1
- package/dist/SubscriptionService.d.mts +5 -1
- package/dist/SubscriptionService.d.mts.map +1 -1
- package/dist/SubscriptionService.mjs +24 -2
- package/dist/SubscriptionService.mjs.map +1 -1
- package/dist/constants.cjs +2 -0
- package/dist/constants.cjs.map +1 -1
- package/dist/constants.d.cts +2 -0
- package/dist/constants.d.cts.map +1 -1
- package/dist/constants.d.mts +2 -0
- package/dist/constants.d.mts.map +1 -1
- package/dist/constants.mjs +2 -0
- package/dist/constants.mjs.map +1 -1
- package/dist/index.cjs +2 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/types.cjs +27 -1
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +171 -10
- package/dist/types.d.cts.map +1 -1
- package/dist/types.d.mts +171 -10
- package/dist/types.d.mts.map +1 -1
- package/dist/types.mjs +26 -0
- package/dist/types.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import type { Struct } from "@metamask/superstruct";
|
|
2
|
+
import type { TokenPaymentInfo } from "./types.mjs";
|
|
3
|
+
export declare const SubscriptionStruct: Struct<{
|
|
2
4
|
id: string;
|
|
3
5
|
products: {
|
|
4
|
-
name: "shield";
|
|
6
|
+
name: "shield" | "money_account_plus";
|
|
5
7
|
currency: "usd";
|
|
6
8
|
unitAmount: number;
|
|
7
9
|
unitDecimals: number;
|
|
@@ -37,31 +39,32 @@ export declare const SubscriptionStruct: import("@metamask/superstruct").Struct<
|
|
|
37
39
|
canceledAt?: string | undefined;
|
|
38
40
|
inactiveAt?: string | undefined;
|
|
39
41
|
}, {
|
|
40
|
-
id:
|
|
41
|
-
products:
|
|
42
|
-
name: "shield";
|
|
42
|
+
id: Struct<string, null>;
|
|
43
|
+
products: Struct<{
|
|
44
|
+
name: "shield" | "money_account_plus";
|
|
43
45
|
currency: "usd";
|
|
44
46
|
unitAmount: number;
|
|
45
47
|
unitDecimals: number;
|
|
46
|
-
}[],
|
|
47
|
-
name: "shield";
|
|
48
|
+
}[], Struct<{
|
|
49
|
+
name: "shield" | "money_account_plus";
|
|
48
50
|
currency: "usd";
|
|
49
51
|
unitAmount: number;
|
|
50
52
|
unitDecimals: number;
|
|
51
53
|
}, {
|
|
52
|
-
name:
|
|
54
|
+
name: Struct<"shield" | "money_account_plus", {
|
|
53
55
|
shield: "shield";
|
|
56
|
+
money_account_plus: "money_account_plus";
|
|
54
57
|
}>;
|
|
55
|
-
currency:
|
|
58
|
+
currency: Struct<"usd", {
|
|
56
59
|
usd: "usd";
|
|
57
60
|
}>;
|
|
58
|
-
unitAmount:
|
|
59
|
-
unitDecimals:
|
|
61
|
+
unitAmount: Struct<number, null>;
|
|
62
|
+
unitDecimals: Struct<number, null>;
|
|
60
63
|
}>>;
|
|
61
|
-
currentPeriodStart:
|
|
62
|
-
currentPeriodEnd:
|
|
63
|
-
cancelAtPeriodEnd:
|
|
64
|
-
status:
|
|
64
|
+
currentPeriodStart: Struct<string, null>;
|
|
65
|
+
currentPeriodEnd: Struct<string, null>;
|
|
66
|
+
cancelAtPeriodEnd: Struct<boolean | undefined, null>;
|
|
67
|
+
status: Struct<"incomplete" | "incomplete_expired" | "provisional" | "trialing" | "active" | "past_due" | "unpaid" | "canceled" | "paused", {
|
|
65
68
|
incomplete: "incomplete";
|
|
66
69
|
incomplete_expired: "incomplete_expired";
|
|
67
70
|
provisional: "provisional";
|
|
@@ -72,11 +75,11 @@ export declare const SubscriptionStruct: import("@metamask/superstruct").Struct<
|
|
|
72
75
|
canceled: "canceled";
|
|
73
76
|
paused: "paused";
|
|
74
77
|
}>;
|
|
75
|
-
interval:
|
|
78
|
+
interval: Struct<"month" | "year", {
|
|
76
79
|
month: "month";
|
|
77
80
|
year: "year";
|
|
78
81
|
}>;
|
|
79
|
-
paymentMethod:
|
|
82
|
+
paymentMethod: Struct<{
|
|
80
83
|
type: "card";
|
|
81
84
|
card: {
|
|
82
85
|
brand: string;
|
|
@@ -92,26 +95,26 @@ export declare const SubscriptionStruct: import("@metamask/superstruct").Struct<
|
|
|
92
95
|
error?: "approval_transaction_too_old" | "approval_transaction_reverted" | "approval_transaction_max_verification_attempts_reached" | "insufficient_balance" | "insufficient_allowance" | undefined;
|
|
93
96
|
};
|
|
94
97
|
}, null>;
|
|
95
|
-
trialPeriodDays:
|
|
96
|
-
trialStart:
|
|
97
|
-
trialEnd:
|
|
98
|
-
endDate:
|
|
99
|
-
canceledAt:
|
|
100
|
-
cancelType:
|
|
98
|
+
trialPeriodDays: Struct<number | undefined, null>;
|
|
99
|
+
trialStart: Struct<string | undefined, null>;
|
|
100
|
+
trialEnd: Struct<string | undefined, null>;
|
|
101
|
+
endDate: Struct<string | undefined, null>;
|
|
102
|
+
canceledAt: Struct<string | undefined, null>;
|
|
103
|
+
cancelType: Struct<"allowed_immediate" | "allowed_at_period_end" | "not_allowed" | "not_allowed_pending_verification", {
|
|
101
104
|
allowed_immediate: "allowed_immediate";
|
|
102
105
|
allowed_at_period_end: "allowed_at_period_end";
|
|
103
106
|
not_allowed: "not_allowed";
|
|
104
107
|
not_allowed_pending_verification: "not_allowed_pending_verification";
|
|
105
108
|
}>;
|
|
106
|
-
inactiveAt:
|
|
107
|
-
isEligibleForSupport:
|
|
108
|
-
billingCycles:
|
|
109
|
+
inactiveAt: Struct<string | undefined, null>;
|
|
110
|
+
isEligibleForSupport: Struct<boolean, null>;
|
|
111
|
+
billingCycles: Struct<number | undefined, null>;
|
|
109
112
|
}>;
|
|
110
|
-
export declare const GetSubscriptionsResponseStruct:
|
|
113
|
+
export declare const GetSubscriptionsResponseStruct: Struct<{
|
|
111
114
|
subscriptions: {
|
|
112
115
|
id: string;
|
|
113
116
|
products: {
|
|
114
|
-
name: "shield";
|
|
117
|
+
name: "shield" | "money_account_plus";
|
|
115
118
|
currency: "usd";
|
|
116
119
|
unitAmount: number;
|
|
117
120
|
unitDecimals: number;
|
|
@@ -147,12 +150,12 @@ export declare const GetSubscriptionsResponseStruct: import("@metamask/superstru
|
|
|
147
150
|
canceledAt?: string | undefined;
|
|
148
151
|
inactiveAt?: string | undefined;
|
|
149
152
|
}[];
|
|
150
|
-
trialedProducts: "shield"[];
|
|
153
|
+
trialedProducts: ("shield" | "money_account_plus")[];
|
|
151
154
|
customerId?: string | undefined;
|
|
152
155
|
lastSubscription?: {
|
|
153
156
|
id: string;
|
|
154
157
|
products: {
|
|
155
|
-
name: "shield";
|
|
158
|
+
name: "shield" | "money_account_plus";
|
|
156
159
|
currency: "usd";
|
|
157
160
|
unitAmount: number;
|
|
158
161
|
unitDecimals: number;
|
|
@@ -190,11 +193,11 @@ export declare const GetSubscriptionsResponseStruct: import("@metamask/superstru
|
|
|
190
193
|
} | undefined;
|
|
191
194
|
rewardAccountId?: `${string}:${string}:${string}` | undefined;
|
|
192
195
|
}, {
|
|
193
|
-
customerId:
|
|
194
|
-
subscriptions:
|
|
196
|
+
customerId: Struct<string | undefined, null>;
|
|
197
|
+
subscriptions: Struct<{
|
|
195
198
|
id: string;
|
|
196
199
|
products: {
|
|
197
|
-
name: "shield";
|
|
200
|
+
name: "shield" | "money_account_plus";
|
|
198
201
|
currency: "usd";
|
|
199
202
|
unitAmount: number;
|
|
200
203
|
unitDecimals: number;
|
|
@@ -229,10 +232,10 @@ export declare const GetSubscriptionsResponseStruct: import("@metamask/superstru
|
|
|
229
232
|
endDate?: string | undefined;
|
|
230
233
|
canceledAt?: string | undefined;
|
|
231
234
|
inactiveAt?: string | undefined;
|
|
232
|
-
}[],
|
|
235
|
+
}[], Struct<{
|
|
233
236
|
id: string;
|
|
234
237
|
products: {
|
|
235
|
-
name: "shield";
|
|
238
|
+
name: "shield" | "money_account_plus";
|
|
236
239
|
currency: "usd";
|
|
237
240
|
unitAmount: number;
|
|
238
241
|
unitDecimals: number;
|
|
@@ -268,31 +271,32 @@ export declare const GetSubscriptionsResponseStruct: import("@metamask/superstru
|
|
|
268
271
|
canceledAt?: string | undefined;
|
|
269
272
|
inactiveAt?: string | undefined;
|
|
270
273
|
}, {
|
|
271
|
-
id:
|
|
272
|
-
products:
|
|
273
|
-
name: "shield";
|
|
274
|
+
id: Struct<string, null>;
|
|
275
|
+
products: Struct<{
|
|
276
|
+
name: "shield" | "money_account_plus";
|
|
274
277
|
currency: "usd";
|
|
275
278
|
unitAmount: number;
|
|
276
279
|
unitDecimals: number;
|
|
277
|
-
}[],
|
|
278
|
-
name: "shield";
|
|
280
|
+
}[], Struct<{
|
|
281
|
+
name: "shield" | "money_account_plus";
|
|
279
282
|
currency: "usd";
|
|
280
283
|
unitAmount: number;
|
|
281
284
|
unitDecimals: number;
|
|
282
285
|
}, {
|
|
283
|
-
name:
|
|
286
|
+
name: Struct<"shield" | "money_account_plus", {
|
|
284
287
|
shield: "shield";
|
|
288
|
+
money_account_plus: "money_account_plus";
|
|
285
289
|
}>;
|
|
286
|
-
currency:
|
|
290
|
+
currency: Struct<"usd", {
|
|
287
291
|
usd: "usd";
|
|
288
292
|
}>;
|
|
289
|
-
unitAmount:
|
|
290
|
-
unitDecimals:
|
|
293
|
+
unitAmount: Struct<number, null>;
|
|
294
|
+
unitDecimals: Struct<number, null>;
|
|
291
295
|
}>>;
|
|
292
|
-
currentPeriodStart:
|
|
293
|
-
currentPeriodEnd:
|
|
294
|
-
cancelAtPeriodEnd:
|
|
295
|
-
status:
|
|
296
|
+
currentPeriodStart: Struct<string, null>;
|
|
297
|
+
currentPeriodEnd: Struct<string, null>;
|
|
298
|
+
cancelAtPeriodEnd: Struct<boolean | undefined, null>;
|
|
299
|
+
status: Struct<"incomplete" | "incomplete_expired" | "provisional" | "trialing" | "active" | "past_due" | "unpaid" | "canceled" | "paused", {
|
|
296
300
|
incomplete: "incomplete";
|
|
297
301
|
incomplete_expired: "incomplete_expired";
|
|
298
302
|
provisional: "provisional";
|
|
@@ -303,11 +307,11 @@ export declare const GetSubscriptionsResponseStruct: import("@metamask/superstru
|
|
|
303
307
|
canceled: "canceled";
|
|
304
308
|
paused: "paused";
|
|
305
309
|
}>;
|
|
306
|
-
interval:
|
|
310
|
+
interval: Struct<"month" | "year", {
|
|
307
311
|
month: "month";
|
|
308
312
|
year: "year";
|
|
309
313
|
}>;
|
|
310
|
-
paymentMethod:
|
|
314
|
+
paymentMethod: Struct<{
|
|
311
315
|
type: "card";
|
|
312
316
|
card: {
|
|
313
317
|
brand: string;
|
|
@@ -323,28 +327,29 @@ export declare const GetSubscriptionsResponseStruct: import("@metamask/superstru
|
|
|
323
327
|
error?: "approval_transaction_too_old" | "approval_transaction_reverted" | "approval_transaction_max_verification_attempts_reached" | "insufficient_balance" | "insufficient_allowance" | undefined;
|
|
324
328
|
};
|
|
325
329
|
}, null>;
|
|
326
|
-
trialPeriodDays:
|
|
327
|
-
trialStart:
|
|
328
|
-
trialEnd:
|
|
329
|
-
endDate:
|
|
330
|
-
canceledAt:
|
|
331
|
-
cancelType:
|
|
330
|
+
trialPeriodDays: Struct<number | undefined, null>;
|
|
331
|
+
trialStart: Struct<string | undefined, null>;
|
|
332
|
+
trialEnd: Struct<string | undefined, null>;
|
|
333
|
+
endDate: Struct<string | undefined, null>;
|
|
334
|
+
canceledAt: Struct<string | undefined, null>;
|
|
335
|
+
cancelType: Struct<"allowed_immediate" | "allowed_at_period_end" | "not_allowed" | "not_allowed_pending_verification", {
|
|
332
336
|
allowed_immediate: "allowed_immediate";
|
|
333
337
|
allowed_at_period_end: "allowed_at_period_end";
|
|
334
338
|
not_allowed: "not_allowed";
|
|
335
339
|
not_allowed_pending_verification: "not_allowed_pending_verification";
|
|
336
340
|
}>;
|
|
337
|
-
inactiveAt:
|
|
338
|
-
isEligibleForSupport:
|
|
339
|
-
billingCycles:
|
|
341
|
+
inactiveAt: Struct<string | undefined, null>;
|
|
342
|
+
isEligibleForSupport: Struct<boolean, null>;
|
|
343
|
+
billingCycles: Struct<number | undefined, null>;
|
|
340
344
|
}>>;
|
|
341
|
-
trialedProducts:
|
|
345
|
+
trialedProducts: Struct<("shield" | "money_account_plus")[], Struct<"shield" | "money_account_plus", {
|
|
342
346
|
shield: "shield";
|
|
347
|
+
money_account_plus: "money_account_plus";
|
|
343
348
|
}>>;
|
|
344
|
-
lastSubscription:
|
|
349
|
+
lastSubscription: Struct<{
|
|
345
350
|
id: string;
|
|
346
351
|
products: {
|
|
347
|
-
name: "shield";
|
|
352
|
+
name: "shield" | "money_account_plus";
|
|
348
353
|
currency: "usd";
|
|
349
354
|
unitAmount: number;
|
|
350
355
|
unitDecimals: number;
|
|
@@ -380,31 +385,32 @@ export declare const GetSubscriptionsResponseStruct: import("@metamask/superstru
|
|
|
380
385
|
canceledAt?: string | undefined;
|
|
381
386
|
inactiveAt?: string | undefined;
|
|
382
387
|
} | undefined, {
|
|
383
|
-
id:
|
|
384
|
-
products:
|
|
385
|
-
name: "shield";
|
|
388
|
+
id: Struct<string, null>;
|
|
389
|
+
products: Struct<{
|
|
390
|
+
name: "shield" | "money_account_plus";
|
|
386
391
|
currency: "usd";
|
|
387
392
|
unitAmount: number;
|
|
388
393
|
unitDecimals: number;
|
|
389
|
-
}[],
|
|
390
|
-
name: "shield";
|
|
394
|
+
}[], Struct<{
|
|
395
|
+
name: "shield" | "money_account_plus";
|
|
391
396
|
currency: "usd";
|
|
392
397
|
unitAmount: number;
|
|
393
398
|
unitDecimals: number;
|
|
394
399
|
}, {
|
|
395
|
-
name:
|
|
400
|
+
name: Struct<"shield" | "money_account_plus", {
|
|
396
401
|
shield: "shield";
|
|
402
|
+
money_account_plus: "money_account_plus";
|
|
397
403
|
}>;
|
|
398
|
-
currency:
|
|
404
|
+
currency: Struct<"usd", {
|
|
399
405
|
usd: "usd";
|
|
400
406
|
}>;
|
|
401
|
-
unitAmount:
|
|
402
|
-
unitDecimals:
|
|
407
|
+
unitAmount: Struct<number, null>;
|
|
408
|
+
unitDecimals: Struct<number, null>;
|
|
403
409
|
}>>;
|
|
404
|
-
currentPeriodStart:
|
|
405
|
-
currentPeriodEnd:
|
|
406
|
-
cancelAtPeriodEnd:
|
|
407
|
-
status:
|
|
410
|
+
currentPeriodStart: Struct<string, null>;
|
|
411
|
+
currentPeriodEnd: Struct<string, null>;
|
|
412
|
+
cancelAtPeriodEnd: Struct<boolean | undefined, null>;
|
|
413
|
+
status: Struct<"incomplete" | "incomplete_expired" | "provisional" | "trialing" | "active" | "past_due" | "unpaid" | "canceled" | "paused", {
|
|
408
414
|
incomplete: "incomplete";
|
|
409
415
|
incomplete_expired: "incomplete_expired";
|
|
410
416
|
provisional: "provisional";
|
|
@@ -415,11 +421,11 @@ export declare const GetSubscriptionsResponseStruct: import("@metamask/superstru
|
|
|
415
421
|
canceled: "canceled";
|
|
416
422
|
paused: "paused";
|
|
417
423
|
}>;
|
|
418
|
-
interval:
|
|
424
|
+
interval: Struct<"month" | "year", {
|
|
419
425
|
month: "month";
|
|
420
426
|
year: "year";
|
|
421
427
|
}>;
|
|
422
|
-
paymentMethod:
|
|
428
|
+
paymentMethod: Struct<{
|
|
423
429
|
type: "card";
|
|
424
430
|
card: {
|
|
425
431
|
brand: string;
|
|
@@ -435,34 +441,34 @@ export declare const GetSubscriptionsResponseStruct: import("@metamask/superstru
|
|
|
435
441
|
error?: "approval_transaction_too_old" | "approval_transaction_reverted" | "approval_transaction_max_verification_attempts_reached" | "insufficient_balance" | "insufficient_allowance" | undefined;
|
|
436
442
|
};
|
|
437
443
|
}, null>;
|
|
438
|
-
trialPeriodDays:
|
|
439
|
-
trialStart:
|
|
440
|
-
trialEnd:
|
|
441
|
-
endDate:
|
|
442
|
-
canceledAt:
|
|
443
|
-
cancelType:
|
|
444
|
+
trialPeriodDays: Struct<number | undefined, null>;
|
|
445
|
+
trialStart: Struct<string | undefined, null>;
|
|
446
|
+
trialEnd: Struct<string | undefined, null>;
|
|
447
|
+
endDate: Struct<string | undefined, null>;
|
|
448
|
+
canceledAt: Struct<string | undefined, null>;
|
|
449
|
+
cancelType: Struct<"allowed_immediate" | "allowed_at_period_end" | "not_allowed" | "not_allowed_pending_verification", {
|
|
444
450
|
allowed_immediate: "allowed_immediate";
|
|
445
451
|
allowed_at_period_end: "allowed_at_period_end";
|
|
446
452
|
not_allowed: "not_allowed";
|
|
447
453
|
not_allowed_pending_verification: "not_allowed_pending_verification";
|
|
448
454
|
}>;
|
|
449
|
-
inactiveAt:
|
|
450
|
-
isEligibleForSupport:
|
|
451
|
-
billingCycles:
|
|
455
|
+
inactiveAt: Struct<string | undefined, null>;
|
|
456
|
+
isEligibleForSupport: Struct<boolean, null>;
|
|
457
|
+
billingCycles: Struct<number | undefined, null>;
|
|
452
458
|
}>;
|
|
453
|
-
rewardAccountId:
|
|
459
|
+
rewardAccountId: Struct<`${string}:${string}:${string}` | undefined, null>;
|
|
454
460
|
}>;
|
|
455
|
-
export declare const StartSubscriptionResponseStruct:
|
|
461
|
+
export declare const StartSubscriptionResponseStruct: Struct<{
|
|
456
462
|
checkoutSessionUrl: string;
|
|
457
463
|
}, {
|
|
458
|
-
checkoutSessionUrl:
|
|
464
|
+
checkoutSessionUrl: Struct<string, null>;
|
|
459
465
|
}>;
|
|
460
|
-
export declare const StartCryptoSubscriptionResponseStruct:
|
|
466
|
+
export declare const StartCryptoSubscriptionResponseStruct: Struct<{
|
|
461
467
|
status: "incomplete" | "incomplete_expired" | "provisional" | "trialing" | "active" | "past_due" | "unpaid" | "canceled" | "paused";
|
|
462
468
|
subscriptionId: string;
|
|
463
469
|
}, {
|
|
464
|
-
subscriptionId:
|
|
465
|
-
status:
|
|
470
|
+
subscriptionId: Struct<string, null>;
|
|
471
|
+
status: Struct<"incomplete" | "incomplete_expired" | "provisional" | "trialing" | "active" | "past_due" | "unpaid" | "canceled" | "paused", {
|
|
466
472
|
incomplete: "incomplete";
|
|
467
473
|
incomplete_expired: "incomplete_expired";
|
|
468
474
|
provisional: "provisional";
|
|
@@ -474,26 +480,26 @@ export declare const StartCryptoSubscriptionResponseStruct: import("@metamask/su
|
|
|
474
480
|
paused: "paused";
|
|
475
481
|
}>;
|
|
476
482
|
}>;
|
|
477
|
-
export declare const UpdatePaymentMethodCardResponseStruct:
|
|
483
|
+
export declare const UpdatePaymentMethodCardResponseStruct: Struct<{
|
|
478
484
|
redirectUrl: string;
|
|
479
485
|
}, {
|
|
480
|
-
redirectUrl:
|
|
486
|
+
redirectUrl: Struct<string, null>;
|
|
481
487
|
}>;
|
|
482
|
-
export declare const BillingPortalResponseStruct:
|
|
488
|
+
export declare const BillingPortalResponseStruct: Struct<{
|
|
483
489
|
url: string;
|
|
484
490
|
}, {
|
|
485
|
-
url:
|
|
491
|
+
url: Struct<string, null>;
|
|
486
492
|
}>;
|
|
487
|
-
export declare const SubscriptionApiGeneralResponseStruct:
|
|
493
|
+
export declare const SubscriptionApiGeneralResponseStruct: Struct<{
|
|
488
494
|
success: boolean;
|
|
489
495
|
message?: string | undefined;
|
|
490
496
|
}, {
|
|
491
|
-
success:
|
|
492
|
-
message:
|
|
497
|
+
success: Struct<boolean, null>;
|
|
498
|
+
message: Struct<string | undefined, null>;
|
|
493
499
|
}>;
|
|
494
|
-
export declare const PricingResponseStruct:
|
|
500
|
+
export declare const PricingResponseStruct: Struct<{
|
|
495
501
|
products: {
|
|
496
|
-
name: "shield";
|
|
502
|
+
name: "shield" | "money_account_plus";
|
|
497
503
|
prices: {
|
|
498
504
|
currency: "usd";
|
|
499
505
|
unitAmount: number;
|
|
@@ -504,25 +510,24 @@ export declare const PricingResponseStruct: import("@metamask/superstruct").Stru
|
|
|
504
510
|
minBillingCyclesForBalance: number;
|
|
505
511
|
}[];
|
|
506
512
|
}[];
|
|
507
|
-
paymentMethods: {
|
|
508
|
-
type: "card"
|
|
513
|
+
paymentMethods: ({
|
|
514
|
+
type: "card";
|
|
515
|
+
products?: ("shield" | "money_account_plus")[] | undefined;
|
|
516
|
+
} | {
|
|
517
|
+
type: "crypto";
|
|
518
|
+
products?: ("shield" | "money_account_plus")[] | undefined;
|
|
519
|
+
cryptoAuthMethod?: "erc20_approval" | "delegation" | undefined;
|
|
509
520
|
chains?: {
|
|
510
521
|
chainId: `0x${string}`;
|
|
511
522
|
paymentAddress: `0x${string}`;
|
|
512
|
-
tokens:
|
|
513
|
-
|
|
514
|
-
address: `0x${string}`;
|
|
515
|
-
decimals: number;
|
|
516
|
-
conversionRate: {
|
|
517
|
-
usd: string;
|
|
518
|
-
};
|
|
519
|
-
}[];
|
|
523
|
+
tokens: TokenPaymentInfo[];
|
|
524
|
+
delegateAddress?: `0x${string}` | undefined;
|
|
520
525
|
isSponsorshipSupported?: boolean | undefined;
|
|
521
526
|
}[] | undefined;
|
|
522
|
-
}[];
|
|
527
|
+
})[];
|
|
523
528
|
}, {
|
|
524
|
-
products:
|
|
525
|
-
name: "shield";
|
|
529
|
+
products: Struct<{
|
|
530
|
+
name: "shield" | "money_account_plus";
|
|
526
531
|
prices: {
|
|
527
532
|
currency: "usd";
|
|
528
533
|
unitAmount: number;
|
|
@@ -532,8 +537,8 @@ export declare const PricingResponseStruct: import("@metamask/superstruct").Stru
|
|
|
532
537
|
minBillingCycles: number;
|
|
533
538
|
minBillingCyclesForBalance: number;
|
|
534
539
|
}[];
|
|
535
|
-
}[],
|
|
536
|
-
name: "shield";
|
|
540
|
+
}[], Struct<{
|
|
541
|
+
name: "shield" | "money_account_plus";
|
|
537
542
|
prices: {
|
|
538
543
|
currency: "usd";
|
|
539
544
|
unitAmount: number;
|
|
@@ -544,10 +549,11 @@ export declare const PricingResponseStruct: import("@metamask/superstruct").Stru
|
|
|
544
549
|
minBillingCyclesForBalance: number;
|
|
545
550
|
}[];
|
|
546
551
|
}, {
|
|
547
|
-
name:
|
|
552
|
+
name: Struct<"shield" | "money_account_plus", {
|
|
548
553
|
shield: "shield";
|
|
554
|
+
money_account_plus: "money_account_plus";
|
|
549
555
|
}>;
|
|
550
|
-
prices:
|
|
556
|
+
prices: Struct<{
|
|
551
557
|
currency: "usd";
|
|
552
558
|
unitAmount: number;
|
|
553
559
|
unitDecimals: number;
|
|
@@ -555,7 +561,7 @@ export declare const PricingResponseStruct: import("@metamask/superstruct").Stru
|
|
|
555
561
|
trialPeriodDays: number;
|
|
556
562
|
minBillingCycles: number;
|
|
557
563
|
minBillingCyclesForBalance: number;
|
|
558
|
-
}[],
|
|
564
|
+
}[], Struct<{
|
|
559
565
|
currency: "usd";
|
|
560
566
|
unitAmount: number;
|
|
561
567
|
unitDecimals: number;
|
|
@@ -564,112 +570,52 @@ export declare const PricingResponseStruct: import("@metamask/superstruct").Stru
|
|
|
564
570
|
minBillingCycles: number;
|
|
565
571
|
minBillingCyclesForBalance: number;
|
|
566
572
|
}, {
|
|
567
|
-
interval:
|
|
573
|
+
interval: Struct<"month" | "year", {
|
|
568
574
|
month: "month";
|
|
569
575
|
year: "year";
|
|
570
576
|
}>;
|
|
571
|
-
unitAmount:
|
|
572
|
-
unitDecimals:
|
|
573
|
-
currency:
|
|
577
|
+
unitAmount: Struct<number, null>;
|
|
578
|
+
unitDecimals: Struct<number, null>;
|
|
579
|
+
currency: Struct<"usd", {
|
|
574
580
|
usd: "usd";
|
|
575
581
|
}>;
|
|
576
|
-
trialPeriodDays:
|
|
577
|
-
minBillingCycles:
|
|
578
|
-
minBillingCyclesForBalance:
|
|
582
|
+
trialPeriodDays: Struct<number, null>;
|
|
583
|
+
minBillingCycles: Struct<number, null>;
|
|
584
|
+
minBillingCyclesForBalance: Struct<number, null>;
|
|
579
585
|
}>>;
|
|
580
586
|
}>>;
|
|
581
|
-
paymentMethods:
|
|
582
|
-
type: "card"
|
|
587
|
+
paymentMethods: Struct<({
|
|
588
|
+
type: "card";
|
|
589
|
+
products?: ("shield" | "money_account_plus")[] | undefined;
|
|
590
|
+
} | {
|
|
591
|
+
type: "crypto";
|
|
592
|
+
products?: ("shield" | "money_account_plus")[] | undefined;
|
|
593
|
+
cryptoAuthMethod?: "erc20_approval" | "delegation" | undefined;
|
|
583
594
|
chains?: {
|
|
584
595
|
chainId: `0x${string}`;
|
|
585
596
|
paymentAddress: `0x${string}`;
|
|
586
|
-
tokens:
|
|
587
|
-
|
|
588
|
-
address: `0x${string}`;
|
|
589
|
-
decimals: number;
|
|
590
|
-
conversionRate: {
|
|
591
|
-
usd: string;
|
|
592
|
-
};
|
|
593
|
-
}[];
|
|
597
|
+
tokens: TokenPaymentInfo[];
|
|
598
|
+
delegateAddress?: `0x${string}` | undefined;
|
|
594
599
|
isSponsorshipSupported?: boolean | undefined;
|
|
595
600
|
}[] | undefined;
|
|
596
|
-
}[],
|
|
597
|
-
type: "card"
|
|
601
|
+
})[], Struct<{
|
|
602
|
+
type: "card";
|
|
603
|
+
products?: ("shield" | "money_account_plus")[] | undefined;
|
|
604
|
+
} | {
|
|
605
|
+
type: "crypto";
|
|
606
|
+
products?: ("shield" | "money_account_plus")[] | undefined;
|
|
607
|
+
cryptoAuthMethod?: "erc20_approval" | "delegation" | undefined;
|
|
598
608
|
chains?: {
|
|
599
609
|
chainId: `0x${string}`;
|
|
600
610
|
paymentAddress: `0x${string}`;
|
|
601
|
-
tokens:
|
|
602
|
-
|
|
603
|
-
address: `0x${string}`;
|
|
604
|
-
decimals: number;
|
|
605
|
-
conversionRate: {
|
|
606
|
-
usd: string;
|
|
607
|
-
};
|
|
608
|
-
}[];
|
|
611
|
+
tokens: TokenPaymentInfo[];
|
|
612
|
+
delegateAddress?: `0x${string}` | undefined;
|
|
609
613
|
isSponsorshipSupported?: boolean | undefined;
|
|
610
614
|
}[] | undefined;
|
|
611
|
-
},
|
|
612
|
-
type: import("@metamask/superstruct").Struct<"card" | "crypto", {
|
|
613
|
-
card: "card";
|
|
614
|
-
crypto: "crypto";
|
|
615
|
-
}>;
|
|
616
|
-
chains: import("@metamask/superstruct").Struct<{
|
|
617
|
-
chainId: `0x${string}`;
|
|
618
|
-
paymentAddress: `0x${string}`;
|
|
619
|
-
tokens: {
|
|
620
|
-
symbol: string;
|
|
621
|
-
address: `0x${string}`;
|
|
622
|
-
decimals: number;
|
|
623
|
-
conversionRate: {
|
|
624
|
-
usd: string;
|
|
625
|
-
};
|
|
626
|
-
}[];
|
|
627
|
-
isSponsorshipSupported?: boolean | undefined;
|
|
628
|
-
}[] | undefined, import("@metamask/superstruct").Struct<{
|
|
629
|
-
chainId: `0x${string}`;
|
|
630
|
-
paymentAddress: `0x${string}`;
|
|
631
|
-
tokens: {
|
|
632
|
-
symbol: string;
|
|
633
|
-
address: `0x${string}`;
|
|
634
|
-
decimals: number;
|
|
635
|
-
conversionRate: {
|
|
636
|
-
usd: string;
|
|
637
|
-
};
|
|
638
|
-
}[];
|
|
639
|
-
isSponsorshipSupported?: boolean | undefined;
|
|
640
|
-
}, {
|
|
641
|
-
chainId: import("@metamask/superstruct").Struct<`0x${string}`, null>;
|
|
642
|
-
paymentAddress: import("@metamask/superstruct").Struct<`0x${string}`, null>;
|
|
643
|
-
tokens: import("@metamask/superstruct").Struct<{
|
|
644
|
-
symbol: string;
|
|
645
|
-
address: `0x${string}`;
|
|
646
|
-
decimals: number;
|
|
647
|
-
conversionRate: {
|
|
648
|
-
usd: string;
|
|
649
|
-
};
|
|
650
|
-
}[], import("@metamask/superstruct").Struct<{
|
|
651
|
-
symbol: string;
|
|
652
|
-
address: `0x${string}`;
|
|
653
|
-
decimals: number;
|
|
654
|
-
conversionRate: {
|
|
655
|
-
usd: string;
|
|
656
|
-
};
|
|
657
|
-
}, {
|
|
658
|
-
symbol: import("@metamask/superstruct").Struct<string, null>;
|
|
659
|
-
address: import("@metamask/superstruct").Struct<`0x${string}`, null>;
|
|
660
|
-
decimals: import("@metamask/superstruct").Struct<number, null>;
|
|
661
|
-
conversionRate: import("@metamask/superstruct").Struct<{
|
|
662
|
-
usd: string;
|
|
663
|
-
}, {
|
|
664
|
-
usd: import("@metamask/superstruct").Struct<string, null>;
|
|
665
|
-
}>;
|
|
666
|
-
}>>;
|
|
667
|
-
isSponsorshipSupported: import("@metamask/superstruct").Struct<boolean | undefined, null>;
|
|
668
|
-
}>>;
|
|
669
|
-
}>>;
|
|
615
|
+
}, null>>;
|
|
670
616
|
}>;
|
|
671
|
-
export declare const SubscriptionEligibilityStruct:
|
|
672
|
-
product: "shield";
|
|
617
|
+
export declare const SubscriptionEligibilityStruct: Struct<{
|
|
618
|
+
product: "shield" | "money_account_plus";
|
|
673
619
|
canSubscribe?: boolean | undefined;
|
|
674
620
|
canViewEntryModal?: boolean | undefined;
|
|
675
621
|
modalType?: "A" | "B" | undefined;
|
|
@@ -683,37 +629,38 @@ export declare const SubscriptionEligibilityStruct: import("@metamask/superstruc
|
|
|
683
629
|
assignedAt?: string | undefined;
|
|
684
630
|
hasAssignedCohortExpired?: boolean | undefined;
|
|
685
631
|
}, {
|
|
686
|
-
product:
|
|
632
|
+
product: Struct<"shield" | "money_account_plus", {
|
|
687
633
|
shield: "shield";
|
|
634
|
+
money_account_plus: "money_account_plus";
|
|
688
635
|
}>;
|
|
689
|
-
canSubscribe:
|
|
690
|
-
canViewEntryModal:
|
|
691
|
-
modalType:
|
|
636
|
+
canSubscribe: Struct<boolean | undefined, null>;
|
|
637
|
+
canViewEntryModal: Struct<boolean | undefined, null>;
|
|
638
|
+
modalType: Struct<"A" | "B" | undefined, {
|
|
692
639
|
A: "A";
|
|
693
640
|
B: "B";
|
|
694
641
|
}>;
|
|
695
|
-
cohorts:
|
|
642
|
+
cohorts: Struct<{
|
|
696
643
|
cohort: string;
|
|
697
644
|
eligibilityRate: number;
|
|
698
645
|
priority: number;
|
|
699
646
|
eligible: boolean;
|
|
700
|
-
}[] | undefined,
|
|
647
|
+
}[] | undefined, Struct<{
|
|
701
648
|
cohort: string;
|
|
702
649
|
eligibilityRate: number;
|
|
703
650
|
priority: number;
|
|
704
651
|
eligible: boolean;
|
|
705
652
|
}, {
|
|
706
|
-
cohort:
|
|
707
|
-
eligibilityRate:
|
|
708
|
-
priority:
|
|
709
|
-
eligible:
|
|
653
|
+
cohort: Struct<string, null>;
|
|
654
|
+
eligibilityRate: Struct<number, null>;
|
|
655
|
+
priority: Struct<number, null>;
|
|
656
|
+
eligible: Struct<boolean, null>;
|
|
710
657
|
}>>;
|
|
711
|
-
assignedCohort:
|
|
712
|
-
assignedAt:
|
|
713
|
-
hasAssignedCohortExpired:
|
|
658
|
+
assignedCohort: Struct<string | null | undefined, null>;
|
|
659
|
+
assignedAt: Struct<string | undefined, null>;
|
|
660
|
+
hasAssignedCohortExpired: Struct<boolean | undefined, null>;
|
|
714
661
|
}>;
|
|
715
|
-
export declare const SubscriptionEligibilityArrayStruct:
|
|
716
|
-
product: "shield";
|
|
662
|
+
export declare const SubscriptionEligibilityArrayStruct: Struct<{
|
|
663
|
+
product: "shield" | "money_account_plus";
|
|
717
664
|
canSubscribe?: boolean | undefined;
|
|
718
665
|
canViewEntryModal?: boolean | undefined;
|
|
719
666
|
modalType?: "A" | "B" | undefined;
|
|
@@ -726,8 +673,8 @@ export declare const SubscriptionEligibilityArrayStruct: import("@metamask/super
|
|
|
726
673
|
assignedCohort?: string | null | undefined;
|
|
727
674
|
assignedAt?: string | undefined;
|
|
728
675
|
hasAssignedCohortExpired?: boolean | undefined;
|
|
729
|
-
}[],
|
|
730
|
-
product: "shield";
|
|
676
|
+
}[], Struct<{
|
|
677
|
+
product: "shield" | "money_account_plus";
|
|
731
678
|
canSubscribe?: boolean | undefined;
|
|
732
679
|
canViewEntryModal?: boolean | undefined;
|
|
733
680
|
modalType?: "A" | "B" | undefined;
|
|
@@ -741,33 +688,34 @@ export declare const SubscriptionEligibilityArrayStruct: import("@metamask/super
|
|
|
741
688
|
assignedAt?: string | undefined;
|
|
742
689
|
hasAssignedCohortExpired?: boolean | undefined;
|
|
743
690
|
}, {
|
|
744
|
-
product:
|
|
691
|
+
product: Struct<"shield" | "money_account_plus", {
|
|
745
692
|
shield: "shield";
|
|
693
|
+
money_account_plus: "money_account_plus";
|
|
746
694
|
}>;
|
|
747
|
-
canSubscribe:
|
|
748
|
-
canViewEntryModal:
|
|
749
|
-
modalType:
|
|
695
|
+
canSubscribe: Struct<boolean | undefined, null>;
|
|
696
|
+
canViewEntryModal: Struct<boolean | undefined, null>;
|
|
697
|
+
modalType: Struct<"A" | "B" | undefined, {
|
|
750
698
|
A: "A";
|
|
751
699
|
B: "B";
|
|
752
700
|
}>;
|
|
753
|
-
cohorts:
|
|
701
|
+
cohorts: Struct<{
|
|
754
702
|
cohort: string;
|
|
755
703
|
eligibilityRate: number;
|
|
756
704
|
priority: number;
|
|
757
705
|
eligible: boolean;
|
|
758
|
-
}[] | undefined,
|
|
706
|
+
}[] | undefined, Struct<{
|
|
759
707
|
cohort: string;
|
|
760
708
|
eligibilityRate: number;
|
|
761
709
|
priority: number;
|
|
762
710
|
eligible: boolean;
|
|
763
711
|
}, {
|
|
764
|
-
cohort:
|
|
765
|
-
eligibilityRate:
|
|
766
|
-
priority:
|
|
767
|
-
eligible:
|
|
712
|
+
cohort: Struct<string, null>;
|
|
713
|
+
eligibilityRate: Struct<number, null>;
|
|
714
|
+
priority: Struct<number, null>;
|
|
715
|
+
eligible: Struct<boolean, null>;
|
|
768
716
|
}>>;
|
|
769
|
-
assignedCohort:
|
|
770
|
-
assignedAt:
|
|
771
|
-
hasAssignedCohortExpired:
|
|
717
|
+
assignedCohort: Struct<string | null | undefined, null>;
|
|
718
|
+
assignedAt: Struct<string | undefined, null>;
|
|
719
|
+
hasAssignedCohortExpired: Struct<boolean | undefined, null>;
|
|
772
720
|
}>>;
|
|
773
721
|
//# sourceMappingURL=SubscriptionService-structs.d.mts.map
|