@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.
Files changed (62) hide show
  1. package/CHANGELOG.md +33 -1
  2. package/dist/SubscriptionController-method-action-types.cjs.map +1 -1
  3. package/dist/SubscriptionController-method-action-types.d.cts +55 -18
  4. package/dist/SubscriptionController-method-action-types.d.cts.map +1 -1
  5. package/dist/SubscriptionController-method-action-types.d.mts +55 -18
  6. package/dist/SubscriptionController-method-action-types.d.mts.map +1 -1
  7. package/dist/SubscriptionController-method-action-types.mjs.map +1 -1
  8. package/dist/SubscriptionController.cjs +165 -45
  9. package/dist/SubscriptionController.cjs.map +1 -1
  10. package/dist/SubscriptionController.d.cts +53 -17
  11. package/dist/SubscriptionController.d.cts.map +1 -1
  12. package/dist/SubscriptionController.d.mts +53 -17
  13. package/dist/SubscriptionController.d.mts.map +1 -1
  14. package/dist/SubscriptionController.mjs +166 -46
  15. package/dist/SubscriptionController.mjs.map +1 -1
  16. package/dist/SubscriptionService-method-action-types.cjs.map +1 -1
  17. package/dist/SubscriptionService-method-action-types.d.cts +5 -1
  18. package/dist/SubscriptionService-method-action-types.d.cts.map +1 -1
  19. package/dist/SubscriptionService-method-action-types.d.mts +5 -1
  20. package/dist/SubscriptionService-method-action-types.d.mts.map +1 -1
  21. package/dist/SubscriptionService-method-action-types.mjs.map +1 -1
  22. package/dist/SubscriptionService-structs.cjs +35 -12
  23. package/dist/SubscriptionService-structs.cjs.map +1 -1
  24. package/dist/SubscriptionService-structs.d.cts +185 -237
  25. package/dist/SubscriptionService-structs.d.cts.map +1 -1
  26. package/dist/SubscriptionService-structs.d.mts +185 -237
  27. package/dist/SubscriptionService-structs.d.mts.map +1 -1
  28. package/dist/SubscriptionService-structs.mjs +37 -14
  29. package/dist/SubscriptionService-structs.mjs.map +1 -1
  30. package/dist/SubscriptionService.cjs +24 -2
  31. package/dist/SubscriptionService.cjs.map +1 -1
  32. package/dist/SubscriptionService.d.cts +5 -1
  33. package/dist/SubscriptionService.d.cts.map +1 -1
  34. package/dist/SubscriptionService.d.mts +5 -1
  35. package/dist/SubscriptionService.d.mts.map +1 -1
  36. package/dist/SubscriptionService.mjs +24 -2
  37. package/dist/SubscriptionService.mjs.map +1 -1
  38. package/dist/constants.cjs +2 -0
  39. package/dist/constants.cjs.map +1 -1
  40. package/dist/constants.d.cts +2 -0
  41. package/dist/constants.d.cts.map +1 -1
  42. package/dist/constants.d.mts +2 -0
  43. package/dist/constants.d.mts.map +1 -1
  44. package/dist/constants.mjs +2 -0
  45. package/dist/constants.mjs.map +1 -1
  46. package/dist/index.cjs +2 -1
  47. package/dist/index.cjs.map +1 -1
  48. package/dist/index.d.cts +3 -3
  49. package/dist/index.d.cts.map +1 -1
  50. package/dist/index.d.mts +3 -3
  51. package/dist/index.d.mts.map +1 -1
  52. package/dist/index.mjs +1 -1
  53. package/dist/index.mjs.map +1 -1
  54. package/dist/types.cjs +27 -1
  55. package/dist/types.cjs.map +1 -1
  56. package/dist/types.d.cts +171 -10
  57. package/dist/types.d.cts.map +1 -1
  58. package/dist/types.d.mts +171 -10
  59. package/dist/types.d.mts.map +1 -1
  60. package/dist/types.mjs +26 -0
  61. package/dist/types.mjs.map +1 -1
  62. package/package.json +1 -1
@@ -1,7 +1,9 @@
1
- export declare const SubscriptionStruct: import("@metamask/superstruct").Struct<{
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: import("@metamask/superstruct").Struct<string, null>;
41
- products: import("@metamask/superstruct").Struct<{
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
- }[], import("@metamask/superstruct").Struct<{
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: import("@metamask/superstruct").Struct<"shield", {
54
+ name: Struct<"shield" | "money_account_plus", {
53
55
  shield: "shield";
56
+ money_account_plus: "money_account_plus";
54
57
  }>;
55
- currency: import("@metamask/superstruct").Struct<"usd", {
58
+ currency: Struct<"usd", {
56
59
  usd: "usd";
57
60
  }>;
58
- unitAmount: import("@metamask/superstruct").Struct<number, null>;
59
- unitDecimals: import("@metamask/superstruct").Struct<number, null>;
61
+ unitAmount: Struct<number, null>;
62
+ unitDecimals: Struct<number, null>;
60
63
  }>>;
61
- currentPeriodStart: import("@metamask/superstruct").Struct<string, null>;
62
- currentPeriodEnd: import("@metamask/superstruct").Struct<string, null>;
63
- cancelAtPeriodEnd: import("@metamask/superstruct").Struct<boolean | undefined, null>;
64
- status: import("@metamask/superstruct").Struct<"incomplete" | "incomplete_expired" | "provisional" | "trialing" | "active" | "past_due" | "unpaid" | "canceled" | "paused", {
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: import("@metamask/superstruct").Struct<"month" | "year", {
78
+ interval: Struct<"month" | "year", {
76
79
  month: "month";
77
80
  year: "year";
78
81
  }>;
79
- paymentMethod: import("@metamask/superstruct").Struct<{
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: import("@metamask/superstruct").Struct<number | undefined, null>;
96
- trialStart: import("@metamask/superstruct").Struct<string | undefined, null>;
97
- trialEnd: import("@metamask/superstruct").Struct<string | undefined, null>;
98
- endDate: import("@metamask/superstruct").Struct<string | undefined, null>;
99
- canceledAt: import("@metamask/superstruct").Struct<string | undefined, null>;
100
- cancelType: import("@metamask/superstruct").Struct<"allowed_immediate" | "allowed_at_period_end" | "not_allowed" | "not_allowed_pending_verification", {
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: import("@metamask/superstruct").Struct<string | undefined, null>;
107
- isEligibleForSupport: import("@metamask/superstruct").Struct<boolean, null>;
108
- billingCycles: import("@metamask/superstruct").Struct<number | undefined, null>;
109
+ inactiveAt: Struct<string | undefined, null>;
110
+ isEligibleForSupport: Struct<boolean, null>;
111
+ billingCycles: Struct<number | undefined, null>;
109
112
  }>;
110
- export declare const GetSubscriptionsResponseStruct: import("@metamask/superstruct").Struct<{
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: import("@metamask/superstruct").Struct<string | undefined, null>;
194
- subscriptions: import("@metamask/superstruct").Struct<{
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
- }[], import("@metamask/superstruct").Struct<{
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: import("@metamask/superstruct").Struct<string, null>;
272
- products: import("@metamask/superstruct").Struct<{
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
- }[], import("@metamask/superstruct").Struct<{
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: import("@metamask/superstruct").Struct<"shield", {
286
+ name: Struct<"shield" | "money_account_plus", {
284
287
  shield: "shield";
288
+ money_account_plus: "money_account_plus";
285
289
  }>;
286
- currency: import("@metamask/superstruct").Struct<"usd", {
290
+ currency: Struct<"usd", {
287
291
  usd: "usd";
288
292
  }>;
289
- unitAmount: import("@metamask/superstruct").Struct<number, null>;
290
- unitDecimals: import("@metamask/superstruct").Struct<number, null>;
293
+ unitAmount: Struct<number, null>;
294
+ unitDecimals: Struct<number, null>;
291
295
  }>>;
292
- currentPeriodStart: import("@metamask/superstruct").Struct<string, null>;
293
- currentPeriodEnd: import("@metamask/superstruct").Struct<string, null>;
294
- cancelAtPeriodEnd: import("@metamask/superstruct").Struct<boolean | undefined, null>;
295
- status: import("@metamask/superstruct").Struct<"incomplete" | "incomplete_expired" | "provisional" | "trialing" | "active" | "past_due" | "unpaid" | "canceled" | "paused", {
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: import("@metamask/superstruct").Struct<"month" | "year", {
310
+ interval: Struct<"month" | "year", {
307
311
  month: "month";
308
312
  year: "year";
309
313
  }>;
310
- paymentMethod: import("@metamask/superstruct").Struct<{
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: import("@metamask/superstruct").Struct<number | undefined, null>;
327
- trialStart: import("@metamask/superstruct").Struct<string | undefined, null>;
328
- trialEnd: import("@metamask/superstruct").Struct<string | undefined, null>;
329
- endDate: import("@metamask/superstruct").Struct<string | undefined, null>;
330
- canceledAt: import("@metamask/superstruct").Struct<string | undefined, null>;
331
- cancelType: import("@metamask/superstruct").Struct<"allowed_immediate" | "allowed_at_period_end" | "not_allowed" | "not_allowed_pending_verification", {
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: import("@metamask/superstruct").Struct<string | undefined, null>;
338
- isEligibleForSupport: import("@metamask/superstruct").Struct<boolean, null>;
339
- billingCycles: import("@metamask/superstruct").Struct<number | undefined, null>;
341
+ inactiveAt: Struct<string | undefined, null>;
342
+ isEligibleForSupport: Struct<boolean, null>;
343
+ billingCycles: Struct<number | undefined, null>;
340
344
  }>>;
341
- trialedProducts: import("@metamask/superstruct").Struct<"shield"[], import("@metamask/superstruct").Struct<"shield", {
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: import("@metamask/superstruct").Struct<{
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: import("@metamask/superstruct").Struct<string, null>;
384
- products: import("@metamask/superstruct").Struct<{
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
- }[], import("@metamask/superstruct").Struct<{
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: import("@metamask/superstruct").Struct<"shield", {
400
+ name: Struct<"shield" | "money_account_plus", {
396
401
  shield: "shield";
402
+ money_account_plus: "money_account_plus";
397
403
  }>;
398
- currency: import("@metamask/superstruct").Struct<"usd", {
404
+ currency: Struct<"usd", {
399
405
  usd: "usd";
400
406
  }>;
401
- unitAmount: import("@metamask/superstruct").Struct<number, null>;
402
- unitDecimals: import("@metamask/superstruct").Struct<number, null>;
407
+ unitAmount: Struct<number, null>;
408
+ unitDecimals: Struct<number, null>;
403
409
  }>>;
404
- currentPeriodStart: import("@metamask/superstruct").Struct<string, null>;
405
- currentPeriodEnd: import("@metamask/superstruct").Struct<string, null>;
406
- cancelAtPeriodEnd: import("@metamask/superstruct").Struct<boolean | undefined, null>;
407
- status: import("@metamask/superstruct").Struct<"incomplete" | "incomplete_expired" | "provisional" | "trialing" | "active" | "past_due" | "unpaid" | "canceled" | "paused", {
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: import("@metamask/superstruct").Struct<"month" | "year", {
424
+ interval: Struct<"month" | "year", {
419
425
  month: "month";
420
426
  year: "year";
421
427
  }>;
422
- paymentMethod: import("@metamask/superstruct").Struct<{
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: import("@metamask/superstruct").Struct<number | undefined, null>;
439
- trialStart: import("@metamask/superstruct").Struct<string | undefined, null>;
440
- trialEnd: import("@metamask/superstruct").Struct<string | undefined, null>;
441
- endDate: import("@metamask/superstruct").Struct<string | undefined, null>;
442
- canceledAt: import("@metamask/superstruct").Struct<string | undefined, null>;
443
- cancelType: import("@metamask/superstruct").Struct<"allowed_immediate" | "allowed_at_period_end" | "not_allowed" | "not_allowed_pending_verification", {
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: import("@metamask/superstruct").Struct<string | undefined, null>;
450
- isEligibleForSupport: import("@metamask/superstruct").Struct<boolean, null>;
451
- billingCycles: import("@metamask/superstruct").Struct<number | undefined, null>;
455
+ inactiveAt: Struct<string | undefined, null>;
456
+ isEligibleForSupport: Struct<boolean, null>;
457
+ billingCycles: Struct<number | undefined, null>;
452
458
  }>;
453
- rewardAccountId: import("@metamask/superstruct").Struct<`${string}:${string}:${string}` | undefined, null>;
459
+ rewardAccountId: Struct<`${string}:${string}:${string}` | undefined, null>;
454
460
  }>;
455
- export declare const StartSubscriptionResponseStruct: import("@metamask/superstruct").Struct<{
461
+ export declare const StartSubscriptionResponseStruct: Struct<{
456
462
  checkoutSessionUrl: string;
457
463
  }, {
458
- checkoutSessionUrl: import("@metamask/superstruct").Struct<string, null>;
464
+ checkoutSessionUrl: Struct<string, null>;
459
465
  }>;
460
- export declare const StartCryptoSubscriptionResponseStruct: import("@metamask/superstruct").Struct<{
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: import("@metamask/superstruct").Struct<string, null>;
465
- status: import("@metamask/superstruct").Struct<"incomplete" | "incomplete_expired" | "provisional" | "trialing" | "active" | "past_due" | "unpaid" | "canceled" | "paused", {
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: import("@metamask/superstruct").Struct<{
483
+ export declare const UpdatePaymentMethodCardResponseStruct: Struct<{
478
484
  redirectUrl: string;
479
485
  }, {
480
- redirectUrl: import("@metamask/superstruct").Struct<string, null>;
486
+ redirectUrl: Struct<string, null>;
481
487
  }>;
482
- export declare const BillingPortalResponseStruct: import("@metamask/superstruct").Struct<{
488
+ export declare const BillingPortalResponseStruct: Struct<{
483
489
  url: string;
484
490
  }, {
485
- url: import("@metamask/superstruct").Struct<string, null>;
491
+ url: Struct<string, null>;
486
492
  }>;
487
- export declare const SubscriptionApiGeneralResponseStruct: import("@metamask/superstruct").Struct<{
493
+ export declare const SubscriptionApiGeneralResponseStruct: Struct<{
488
494
  success: boolean;
489
495
  message?: string | undefined;
490
496
  }, {
491
- success: import("@metamask/superstruct").Struct<boolean, null>;
492
- message: import("@metamask/superstruct").Struct<string | undefined, null>;
497
+ success: Struct<boolean, null>;
498
+ message: Struct<string | undefined, null>;
493
499
  }>;
494
- export declare const PricingResponseStruct: import("@metamask/superstruct").Struct<{
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" | "crypto";
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
- symbol: string;
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: import("@metamask/superstruct").Struct<{
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
- }[], import("@metamask/superstruct").Struct<{
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: import("@metamask/superstruct").Struct<"shield", {
552
+ name: Struct<"shield" | "money_account_plus", {
548
553
  shield: "shield";
554
+ money_account_plus: "money_account_plus";
549
555
  }>;
550
- prices: import("@metamask/superstruct").Struct<{
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
- }[], import("@metamask/superstruct").Struct<{
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: import("@metamask/superstruct").Struct<"month" | "year", {
573
+ interval: Struct<"month" | "year", {
568
574
  month: "month";
569
575
  year: "year";
570
576
  }>;
571
- unitAmount: import("@metamask/superstruct").Struct<number, null>;
572
- unitDecimals: import("@metamask/superstruct").Struct<number, null>;
573
- currency: import("@metamask/superstruct").Struct<"usd", {
577
+ unitAmount: Struct<number, null>;
578
+ unitDecimals: Struct<number, null>;
579
+ currency: Struct<"usd", {
574
580
  usd: "usd";
575
581
  }>;
576
- trialPeriodDays: import("@metamask/superstruct").Struct<number, null>;
577
- minBillingCycles: import("@metamask/superstruct").Struct<number, null>;
578
- minBillingCyclesForBalance: import("@metamask/superstruct").Struct<number, null>;
582
+ trialPeriodDays: Struct<number, null>;
583
+ minBillingCycles: Struct<number, null>;
584
+ minBillingCyclesForBalance: Struct<number, null>;
579
585
  }>>;
580
586
  }>>;
581
- paymentMethods: import("@metamask/superstruct").Struct<{
582
- type: "card" | "crypto";
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
- symbol: string;
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
- }[], import("@metamask/superstruct").Struct<{
597
- type: "card" | "crypto";
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
- symbol: string;
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: import("@metamask/superstruct").Struct<{
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: import("@metamask/superstruct").Struct<"shield", {
632
+ product: Struct<"shield" | "money_account_plus", {
687
633
  shield: "shield";
634
+ money_account_plus: "money_account_plus";
688
635
  }>;
689
- canSubscribe: import("@metamask/superstruct").Struct<boolean | undefined, null>;
690
- canViewEntryModal: import("@metamask/superstruct").Struct<boolean | undefined, null>;
691
- modalType: import("@metamask/superstruct").Struct<"A" | "B" | undefined, {
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: import("@metamask/superstruct").Struct<{
642
+ cohorts: Struct<{
696
643
  cohort: string;
697
644
  eligibilityRate: number;
698
645
  priority: number;
699
646
  eligible: boolean;
700
- }[] | undefined, import("@metamask/superstruct").Struct<{
647
+ }[] | undefined, Struct<{
701
648
  cohort: string;
702
649
  eligibilityRate: number;
703
650
  priority: number;
704
651
  eligible: boolean;
705
652
  }, {
706
- cohort: import("@metamask/superstruct").Struct<string, null>;
707
- eligibilityRate: import("@metamask/superstruct").Struct<number, null>;
708
- priority: import("@metamask/superstruct").Struct<number, null>;
709
- eligible: import("@metamask/superstruct").Struct<boolean, null>;
653
+ cohort: Struct<string, null>;
654
+ eligibilityRate: Struct<number, null>;
655
+ priority: Struct<number, null>;
656
+ eligible: Struct<boolean, null>;
710
657
  }>>;
711
- assignedCohort: import("@metamask/superstruct").Struct<string | null | undefined, null>;
712
- assignedAt: import("@metamask/superstruct").Struct<string | undefined, null>;
713
- hasAssignedCohortExpired: import("@metamask/superstruct").Struct<boolean | undefined, null>;
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: import("@metamask/superstruct").Struct<{
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
- }[], import("@metamask/superstruct").Struct<{
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: import("@metamask/superstruct").Struct<"shield", {
691
+ product: Struct<"shield" | "money_account_plus", {
745
692
  shield: "shield";
693
+ money_account_plus: "money_account_plus";
746
694
  }>;
747
- canSubscribe: import("@metamask/superstruct").Struct<boolean | undefined, null>;
748
- canViewEntryModal: import("@metamask/superstruct").Struct<boolean | undefined, null>;
749
- modalType: import("@metamask/superstruct").Struct<"A" | "B" | undefined, {
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: import("@metamask/superstruct").Struct<{
701
+ cohorts: Struct<{
754
702
  cohort: string;
755
703
  eligibilityRate: number;
756
704
  priority: number;
757
705
  eligible: boolean;
758
- }[] | undefined, import("@metamask/superstruct").Struct<{
706
+ }[] | undefined, Struct<{
759
707
  cohort: string;
760
708
  eligibilityRate: number;
761
709
  priority: number;
762
710
  eligible: boolean;
763
711
  }, {
764
- cohort: import("@metamask/superstruct").Struct<string, null>;
765
- eligibilityRate: import("@metamask/superstruct").Struct<number, null>;
766
- priority: import("@metamask/superstruct").Struct<number, null>;
767
- eligible: import("@metamask/superstruct").Struct<boolean, null>;
712
+ cohort: Struct<string, null>;
713
+ eligibilityRate: Struct<number, null>;
714
+ priority: Struct<number, null>;
715
+ eligible: Struct<boolean, null>;
768
716
  }>>;
769
- assignedCohort: import("@metamask/superstruct").Struct<string | null | undefined, null>;
770
- assignedAt: import("@metamask/superstruct").Struct<string | undefined, null>;
771
- hasAssignedCohortExpired: import("@metamask/superstruct").Struct<boolean | undefined, null>;
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