@metamask/subscription-controller 8.0.1 → 9.0.0

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 (110) hide show
  1. package/CHANGELOG.md +38 -1
  2. package/dist/{SubscriptionController-method-action-types.d.mts → SubscriptionController-method-action-types.d.ts} +14 -3
  3. package/dist/SubscriptionController-method-action-types.d.ts.map +1 -0
  4. package/dist/{SubscriptionController-method-action-types.mjs → SubscriptionController-method-action-types.js} +1 -1
  5. package/dist/SubscriptionController-method-action-types.js.map +1 -0
  6. package/dist/{SubscriptionController.d.mts → SubscriptionController.d.ts} +29 -19
  7. package/dist/SubscriptionController.d.ts.map +1 -0
  8. package/dist/{SubscriptionController.mjs → SubscriptionController.js} +391 -190
  9. package/dist/SubscriptionController.js.map +1 -0
  10. package/dist/{SubscriptionService-method-action-types.d.mts → SubscriptionService-method-action-types.d.ts} +12 -3
  11. package/dist/SubscriptionService-method-action-types.d.ts.map +1 -0
  12. package/dist/{SubscriptionService-method-action-types.mjs → SubscriptionService-method-action-types.js} +1 -1
  13. package/dist/SubscriptionService-method-action-types.js.map +1 -0
  14. package/dist/{SubscriptionService-structs.d.mts → SubscriptionService-structs.d.ts} +302 -134
  15. package/dist/SubscriptionService-structs.d.ts.map +1 -0
  16. package/dist/{SubscriptionService-structs.mjs → SubscriptionService-structs.js} +55 -4
  17. package/dist/SubscriptionService-structs.js.map +1 -0
  18. package/dist/{SubscriptionService.d.cts → SubscriptionService.d.ts} +16 -10
  19. package/dist/SubscriptionService.d.ts.map +1 -0
  20. package/dist/{SubscriptionService.mjs → SubscriptionService.js} +159 -141
  21. package/dist/SubscriptionService.js.map +1 -0
  22. package/dist/{constants.d.cts → constants.d.ts} +2 -1
  23. package/dist/constants.d.ts.map +1 -0
  24. package/dist/{constants.mjs → constants.js} +4 -3
  25. package/dist/constants.js.map +1 -0
  26. package/dist/{errors.d.cts → errors.d.ts} +2 -2
  27. package/dist/errors.d.ts.map +1 -0
  28. package/dist/{errors.mjs → errors.js} +5 -1
  29. package/dist/errors.js.map +1 -0
  30. package/dist/index.d.ts +12 -0
  31. package/dist/index.d.ts.map +1 -0
  32. package/dist/index.js +7 -0
  33. package/dist/index.js.map +1 -0
  34. package/dist/logger.d.ts +4 -0
  35. package/dist/logger.d.ts.map +1 -0
  36. package/dist/logger.js +5 -0
  37. package/dist/logger.js.map +1 -0
  38. package/dist/selectors.d.ts +38 -0
  39. package/dist/selectors.d.ts.map +1 -0
  40. package/dist/selectors.js +46 -0
  41. package/dist/selectors.js.map +1 -0
  42. package/dist/{types.d.mts → types.d.ts} +112 -41
  43. package/dist/types.d.ts.map +1 -0
  44. package/dist/{types.mjs → types.js} +11 -1
  45. package/dist/types.js.map +1 -0
  46. package/package.json +22 -25
  47. package/dist/SubscriptionController-method-action-types.cjs +0 -7
  48. package/dist/SubscriptionController-method-action-types.cjs.map +0 -1
  49. package/dist/SubscriptionController-method-action-types.d.cts +0 -250
  50. package/dist/SubscriptionController-method-action-types.d.cts.map +0 -1
  51. package/dist/SubscriptionController-method-action-types.d.mts.map +0 -1
  52. package/dist/SubscriptionController-method-action-types.mjs.map +0 -1
  53. package/dist/SubscriptionController.cjs +0 -744
  54. package/dist/SubscriptionController.cjs.map +0 -1
  55. package/dist/SubscriptionController.d.cts +0 -258
  56. package/dist/SubscriptionController.d.cts.map +0 -1
  57. package/dist/SubscriptionController.d.mts.map +0 -1
  58. package/dist/SubscriptionController.mjs.map +0 -1
  59. package/dist/SubscriptionService-method-action-types.cjs +0 -7
  60. package/dist/SubscriptionService-method-action-types.cjs.map +0 -1
  61. package/dist/SubscriptionService-method-action-types.d.cts +0 -155
  62. package/dist/SubscriptionService-method-action-types.d.cts.map +0 -1
  63. package/dist/SubscriptionService-method-action-types.d.mts.map +0 -1
  64. package/dist/SubscriptionService-method-action-types.mjs.map +0 -1
  65. package/dist/SubscriptionService-structs.cjs +0 -158
  66. package/dist/SubscriptionService-structs.cjs.map +0 -1
  67. package/dist/SubscriptionService-structs.d.cts +0 -721
  68. package/dist/SubscriptionService-structs.d.cts.map +0 -1
  69. package/dist/SubscriptionService-structs.d.mts.map +0 -1
  70. package/dist/SubscriptionService-structs.mjs.map +0 -1
  71. package/dist/SubscriptionService.cjs +0 -477
  72. package/dist/SubscriptionService.cjs.map +0 -1
  73. package/dist/SubscriptionService.d.cts.map +0 -1
  74. package/dist/SubscriptionService.d.mts +0 -149
  75. package/dist/SubscriptionService.d.mts.map +0 -1
  76. package/dist/SubscriptionService.mjs.map +0 -1
  77. package/dist/constants.cjs +0 -73
  78. package/dist/constants.cjs.map +0 -1
  79. package/dist/constants.d.cts.map +0 -1
  80. package/dist/constants.d.mts +0 -49
  81. package/dist/constants.d.mts.map +0 -1
  82. package/dist/constants.mjs.map +0 -1
  83. package/dist/errors.cjs +0 -72
  84. package/dist/errors.cjs.map +0 -1
  85. package/dist/errors.d.cts.map +0 -1
  86. package/dist/errors.d.mts +0 -34
  87. package/dist/errors.d.mts.map +0 -1
  88. package/dist/errors.mjs.map +0 -1
  89. package/dist/index.cjs +0 -29
  90. package/dist/index.cjs.map +0 -1
  91. package/dist/index.d.cts +0 -11
  92. package/dist/index.d.cts.map +0 -1
  93. package/dist/index.d.mts +0 -11
  94. package/dist/index.d.mts.map +0 -1
  95. package/dist/index.mjs +0 -6
  96. package/dist/index.mjs.map +0 -1
  97. package/dist/logger.cjs +0 -8
  98. package/dist/logger.cjs.map +0 -1
  99. package/dist/logger.d.cts +0 -5
  100. package/dist/logger.d.cts.map +0 -1
  101. package/dist/logger.d.mts +0 -5
  102. package/dist/logger.d.mts.map +0 -1
  103. package/dist/logger.mjs +0 -5
  104. package/dist/logger.mjs.map +0 -1
  105. package/dist/types.cjs +0 -90
  106. package/dist/types.cjs.map +0 -1
  107. package/dist/types.d.cts +0 -574
  108. package/dist/types.d.cts.map +0 -1
  109. package/dist/types.d.mts.map +0 -1
  110. package/dist/types.mjs.map +0 -1
@@ -1,721 +0,0 @@
1
- import type { Struct } from "@metamask/superstruct";
2
- import type { TokenPaymentInfo } from "./types.cjs";
3
- export declare const SubscriptionStruct: Struct<{
4
- id: string;
5
- products: {
6
- name: "shield" | "money_account_plus";
7
- currency: "usd";
8
- unitAmount: number;
9
- unitDecimals: number;
10
- }[];
11
- currentPeriodStart: string;
12
- currentPeriodEnd: string;
13
- status: "incomplete" | "incomplete_expired" | "provisional" | "trialing" | "active" | "past_due" | "unpaid" | "canceled" | "paused";
14
- interval: "month" | "year";
15
- paymentMethod: {
16
- type: "card";
17
- card: {
18
- brand: string;
19
- displayBrand: string;
20
- last4: string;
21
- };
22
- } | {
23
- type: "crypto";
24
- crypto: {
25
- chainId: `0x${string}`;
26
- payerAddress: `0x${string}`;
27
- tokenSymbol: string;
28
- error?: "approval_transaction_too_old" | "approval_transaction_reverted" | "approval_transaction_max_verification_attempts_reached" | "insufficient_balance" | "insufficient_allowance" | undefined;
29
- };
30
- };
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
- trialPeriodDays?: number | undefined;
36
- trialStart?: string | undefined;
37
- trialEnd?: string | undefined;
38
- endDate?: string | undefined;
39
- canceledAt?: string | undefined;
40
- inactiveAt?: string | undefined;
41
- }, {
42
- id: Struct<string, null>;
43
- products: Struct<{
44
- name: "shield" | "money_account_plus";
45
- currency: "usd";
46
- unitAmount: number;
47
- unitDecimals: number;
48
- }[], Struct<{
49
- name: "shield" | "money_account_plus";
50
- currency: "usd";
51
- unitAmount: number;
52
- unitDecimals: number;
53
- }, {
54
- name: Struct<"shield" | "money_account_plus", {
55
- shield: "shield";
56
- money_account_plus: "money_account_plus";
57
- }>;
58
- currency: Struct<"usd", {
59
- usd: "usd";
60
- }>;
61
- unitAmount: Struct<number, null>;
62
- unitDecimals: Struct<number, null>;
63
- }>>;
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", {
68
- incomplete: "incomplete";
69
- incomplete_expired: "incomplete_expired";
70
- provisional: "provisional";
71
- trialing: "trialing";
72
- active: "active";
73
- past_due: "past_due";
74
- unpaid: "unpaid";
75
- canceled: "canceled";
76
- paused: "paused";
77
- }>;
78
- interval: Struct<"month" | "year", {
79
- month: "month";
80
- year: "year";
81
- }>;
82
- paymentMethod: Struct<{
83
- type: "card";
84
- card: {
85
- brand: string;
86
- displayBrand: string;
87
- last4: string;
88
- };
89
- } | {
90
- type: "crypto";
91
- crypto: {
92
- chainId: `0x${string}`;
93
- payerAddress: `0x${string}`;
94
- tokenSymbol: string;
95
- error?: "approval_transaction_too_old" | "approval_transaction_reverted" | "approval_transaction_max_verification_attempts_reached" | "insufficient_balance" | "insufficient_allowance" | undefined;
96
- };
97
- }, null>;
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", {
104
- allowed_immediate: "allowed_immediate";
105
- allowed_at_period_end: "allowed_at_period_end";
106
- not_allowed: "not_allowed";
107
- not_allowed_pending_verification: "not_allowed_pending_verification";
108
- }>;
109
- inactiveAt: Struct<string | undefined, null>;
110
- isEligibleForSupport: Struct<boolean, null>;
111
- billingCycles: Struct<number | undefined, null>;
112
- }>;
113
- export declare const GetSubscriptionsResponseStruct: Struct<{
114
- subscriptions: {
115
- id: string;
116
- products: {
117
- name: "shield" | "money_account_plus";
118
- currency: "usd";
119
- unitAmount: number;
120
- unitDecimals: number;
121
- }[];
122
- currentPeriodStart: string;
123
- currentPeriodEnd: string;
124
- status: "incomplete" | "incomplete_expired" | "provisional" | "trialing" | "active" | "past_due" | "unpaid" | "canceled" | "paused";
125
- interval: "month" | "year";
126
- paymentMethod: {
127
- type: "card";
128
- card: {
129
- brand: string;
130
- displayBrand: string;
131
- last4: string;
132
- };
133
- } | {
134
- type: "crypto";
135
- crypto: {
136
- chainId: `0x${string}`;
137
- payerAddress: `0x${string}`;
138
- tokenSymbol: string;
139
- error?: "approval_transaction_too_old" | "approval_transaction_reverted" | "approval_transaction_max_verification_attempts_reached" | "insufficient_balance" | "insufficient_allowance" | undefined;
140
- };
141
- };
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
- trialPeriodDays?: number | undefined;
147
- trialStart?: string | undefined;
148
- trialEnd?: string | undefined;
149
- endDate?: string | undefined;
150
- canceledAt?: string | undefined;
151
- inactiveAt?: string | undefined;
152
- }[];
153
- trialedProducts: ("shield" | "money_account_plus")[];
154
- customerId?: string | undefined;
155
- lastSubscription?: {
156
- id: string;
157
- products: {
158
- name: "shield" | "money_account_plus";
159
- currency: "usd";
160
- unitAmount: number;
161
- unitDecimals: number;
162
- }[];
163
- currentPeriodStart: string;
164
- currentPeriodEnd: string;
165
- status: "incomplete" | "incomplete_expired" | "provisional" | "trialing" | "active" | "past_due" | "unpaid" | "canceled" | "paused";
166
- interval: "month" | "year";
167
- paymentMethod: {
168
- type: "card";
169
- card: {
170
- brand: string;
171
- displayBrand: string;
172
- last4: string;
173
- };
174
- } | {
175
- type: "crypto";
176
- crypto: {
177
- chainId: `0x${string}`;
178
- payerAddress: `0x${string}`;
179
- tokenSymbol: string;
180
- error?: "approval_transaction_too_old" | "approval_transaction_reverted" | "approval_transaction_max_verification_attempts_reached" | "insufficient_balance" | "insufficient_allowance" | undefined;
181
- };
182
- };
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
- trialPeriodDays?: number | undefined;
188
- trialStart?: string | undefined;
189
- trialEnd?: string | undefined;
190
- endDate?: string | undefined;
191
- canceledAt?: string | undefined;
192
- inactiveAt?: string | undefined;
193
- } | undefined;
194
- rewardAccountId?: `${string}:${string}:${string}` | undefined;
195
- }, {
196
- customerId: Struct<string | undefined, null>;
197
- subscriptions: Struct<{
198
- id: string;
199
- products: {
200
- name: "shield" | "money_account_plus";
201
- currency: "usd";
202
- unitAmount: number;
203
- unitDecimals: number;
204
- }[];
205
- currentPeriodStart: string;
206
- currentPeriodEnd: string;
207
- status: "incomplete" | "incomplete_expired" | "provisional" | "trialing" | "active" | "past_due" | "unpaid" | "canceled" | "paused";
208
- interval: "month" | "year";
209
- paymentMethod: {
210
- type: "card";
211
- card: {
212
- brand: string;
213
- displayBrand: string;
214
- last4: string;
215
- };
216
- } | {
217
- type: "crypto";
218
- crypto: {
219
- chainId: `0x${string}`;
220
- payerAddress: `0x${string}`;
221
- tokenSymbol: string;
222
- error?: "approval_transaction_too_old" | "approval_transaction_reverted" | "approval_transaction_max_verification_attempts_reached" | "insufficient_balance" | "insufficient_allowance" | undefined;
223
- };
224
- };
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
- trialPeriodDays?: number | undefined;
230
- trialStart?: string | undefined;
231
- trialEnd?: string | undefined;
232
- endDate?: string | undefined;
233
- canceledAt?: string | undefined;
234
- inactiveAt?: string | undefined;
235
- }[], Struct<{
236
- id: string;
237
- products: {
238
- name: "shield" | "money_account_plus";
239
- currency: "usd";
240
- unitAmount: number;
241
- unitDecimals: number;
242
- }[];
243
- currentPeriodStart: string;
244
- currentPeriodEnd: string;
245
- status: "incomplete" | "incomplete_expired" | "provisional" | "trialing" | "active" | "past_due" | "unpaid" | "canceled" | "paused";
246
- interval: "month" | "year";
247
- paymentMethod: {
248
- type: "card";
249
- card: {
250
- brand: string;
251
- displayBrand: string;
252
- last4: string;
253
- };
254
- } | {
255
- type: "crypto";
256
- crypto: {
257
- chainId: `0x${string}`;
258
- payerAddress: `0x${string}`;
259
- tokenSymbol: string;
260
- error?: "approval_transaction_too_old" | "approval_transaction_reverted" | "approval_transaction_max_verification_attempts_reached" | "insufficient_balance" | "insufficient_allowance" | undefined;
261
- };
262
- };
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
- trialPeriodDays?: number | undefined;
268
- trialStart?: string | undefined;
269
- trialEnd?: string | undefined;
270
- endDate?: string | undefined;
271
- canceledAt?: string | undefined;
272
- inactiveAt?: string | undefined;
273
- }, {
274
- id: Struct<string, null>;
275
- products: Struct<{
276
- name: "shield" | "money_account_plus";
277
- currency: "usd";
278
- unitAmount: number;
279
- unitDecimals: number;
280
- }[], Struct<{
281
- name: "shield" | "money_account_plus";
282
- currency: "usd";
283
- unitAmount: number;
284
- unitDecimals: number;
285
- }, {
286
- name: Struct<"shield" | "money_account_plus", {
287
- shield: "shield";
288
- money_account_plus: "money_account_plus";
289
- }>;
290
- currency: Struct<"usd", {
291
- usd: "usd";
292
- }>;
293
- unitAmount: Struct<number, null>;
294
- unitDecimals: Struct<number, null>;
295
- }>>;
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", {
300
- incomplete: "incomplete";
301
- incomplete_expired: "incomplete_expired";
302
- provisional: "provisional";
303
- trialing: "trialing";
304
- active: "active";
305
- past_due: "past_due";
306
- unpaid: "unpaid";
307
- canceled: "canceled";
308
- paused: "paused";
309
- }>;
310
- interval: Struct<"month" | "year", {
311
- month: "month";
312
- year: "year";
313
- }>;
314
- paymentMethod: Struct<{
315
- type: "card";
316
- card: {
317
- brand: string;
318
- displayBrand: string;
319
- last4: string;
320
- };
321
- } | {
322
- type: "crypto";
323
- crypto: {
324
- chainId: `0x${string}`;
325
- payerAddress: `0x${string}`;
326
- tokenSymbol: string;
327
- error?: "approval_transaction_too_old" | "approval_transaction_reverted" | "approval_transaction_max_verification_attempts_reached" | "insufficient_balance" | "insufficient_allowance" | undefined;
328
- };
329
- }, null>;
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", {
336
- allowed_immediate: "allowed_immediate";
337
- allowed_at_period_end: "allowed_at_period_end";
338
- not_allowed: "not_allowed";
339
- not_allowed_pending_verification: "not_allowed_pending_verification";
340
- }>;
341
- inactiveAt: Struct<string | undefined, null>;
342
- isEligibleForSupport: Struct<boolean, null>;
343
- billingCycles: Struct<number | undefined, null>;
344
- }>>;
345
- trialedProducts: Struct<("shield" | "money_account_plus")[], Struct<"shield" | "money_account_plus", {
346
- shield: "shield";
347
- money_account_plus: "money_account_plus";
348
- }>>;
349
- lastSubscription: Struct<{
350
- id: string;
351
- products: {
352
- name: "shield" | "money_account_plus";
353
- currency: "usd";
354
- unitAmount: number;
355
- unitDecimals: number;
356
- }[];
357
- currentPeriodStart: string;
358
- currentPeriodEnd: string;
359
- status: "incomplete" | "incomplete_expired" | "provisional" | "trialing" | "active" | "past_due" | "unpaid" | "canceled" | "paused";
360
- interval: "month" | "year";
361
- paymentMethod: {
362
- type: "card";
363
- card: {
364
- brand: string;
365
- displayBrand: string;
366
- last4: string;
367
- };
368
- } | {
369
- type: "crypto";
370
- crypto: {
371
- chainId: `0x${string}`;
372
- payerAddress: `0x${string}`;
373
- tokenSymbol: string;
374
- error?: "approval_transaction_too_old" | "approval_transaction_reverted" | "approval_transaction_max_verification_attempts_reached" | "insufficient_balance" | "insufficient_allowance" | undefined;
375
- };
376
- };
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
- trialPeriodDays?: number | undefined;
382
- trialStart?: string | undefined;
383
- trialEnd?: string | undefined;
384
- endDate?: string | undefined;
385
- canceledAt?: string | undefined;
386
- inactiveAt?: string | undefined;
387
- } | undefined, {
388
- id: Struct<string, null>;
389
- products: Struct<{
390
- name: "shield" | "money_account_plus";
391
- currency: "usd";
392
- unitAmount: number;
393
- unitDecimals: number;
394
- }[], Struct<{
395
- name: "shield" | "money_account_plus";
396
- currency: "usd";
397
- unitAmount: number;
398
- unitDecimals: number;
399
- }, {
400
- name: Struct<"shield" | "money_account_plus", {
401
- shield: "shield";
402
- money_account_plus: "money_account_plus";
403
- }>;
404
- currency: Struct<"usd", {
405
- usd: "usd";
406
- }>;
407
- unitAmount: Struct<number, null>;
408
- unitDecimals: Struct<number, null>;
409
- }>>;
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", {
414
- incomplete: "incomplete";
415
- incomplete_expired: "incomplete_expired";
416
- provisional: "provisional";
417
- trialing: "trialing";
418
- active: "active";
419
- past_due: "past_due";
420
- unpaid: "unpaid";
421
- canceled: "canceled";
422
- paused: "paused";
423
- }>;
424
- interval: Struct<"month" | "year", {
425
- month: "month";
426
- year: "year";
427
- }>;
428
- paymentMethod: Struct<{
429
- type: "card";
430
- card: {
431
- brand: string;
432
- displayBrand: string;
433
- last4: string;
434
- };
435
- } | {
436
- type: "crypto";
437
- crypto: {
438
- chainId: `0x${string}`;
439
- payerAddress: `0x${string}`;
440
- tokenSymbol: string;
441
- error?: "approval_transaction_too_old" | "approval_transaction_reverted" | "approval_transaction_max_verification_attempts_reached" | "insufficient_balance" | "insufficient_allowance" | undefined;
442
- };
443
- }, null>;
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", {
450
- allowed_immediate: "allowed_immediate";
451
- allowed_at_period_end: "allowed_at_period_end";
452
- not_allowed: "not_allowed";
453
- not_allowed_pending_verification: "not_allowed_pending_verification";
454
- }>;
455
- inactiveAt: Struct<string | undefined, null>;
456
- isEligibleForSupport: Struct<boolean, null>;
457
- billingCycles: Struct<number | undefined, null>;
458
- }>;
459
- rewardAccountId: Struct<`${string}:${string}:${string}` | undefined, null>;
460
- }>;
461
- export declare const StartSubscriptionResponseStruct: Struct<{
462
- checkoutSessionUrl: string;
463
- }, {
464
- checkoutSessionUrl: Struct<string, null>;
465
- }>;
466
- export declare const StartCryptoSubscriptionResponseStruct: Struct<{
467
- status: "incomplete" | "incomplete_expired" | "provisional" | "trialing" | "active" | "past_due" | "unpaid" | "canceled" | "paused";
468
- subscriptionId: string;
469
- }, {
470
- subscriptionId: Struct<string, null>;
471
- status: Struct<"incomplete" | "incomplete_expired" | "provisional" | "trialing" | "active" | "past_due" | "unpaid" | "canceled" | "paused", {
472
- incomplete: "incomplete";
473
- incomplete_expired: "incomplete_expired";
474
- provisional: "provisional";
475
- trialing: "trialing";
476
- active: "active";
477
- past_due: "past_due";
478
- unpaid: "unpaid";
479
- canceled: "canceled";
480
- paused: "paused";
481
- }>;
482
- }>;
483
- export declare const UpdatePaymentMethodCardResponseStruct: Struct<{
484
- redirectUrl: string;
485
- }, {
486
- redirectUrl: Struct<string, null>;
487
- }>;
488
- export declare const BillingPortalResponseStruct: Struct<{
489
- url: string;
490
- }, {
491
- url: Struct<string, null>;
492
- }>;
493
- export declare const SubscriptionApiGeneralResponseStruct: Struct<{
494
- success: boolean;
495
- message?: string | undefined;
496
- }, {
497
- success: Struct<boolean, null>;
498
- message: Struct<string | undefined, null>;
499
- }>;
500
- export declare const PricingResponseStruct: Struct<{
501
- products: {
502
- name: "shield" | "money_account_plus";
503
- prices: {
504
- currency: "usd";
505
- unitAmount: number;
506
- unitDecimals: number;
507
- interval: "month" | "year";
508
- trialPeriodDays: number;
509
- minBillingCycles: number;
510
- minBillingCyclesForBalance: number;
511
- }[];
512
- }[];
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;
520
- chains?: {
521
- chainId: `0x${string}`;
522
- paymentAddress: `0x${string}`;
523
- tokens: TokenPaymentInfo[];
524
- delegateAddress?: `0x${string}` | undefined;
525
- isSponsorshipSupported?: boolean | undefined;
526
- }[] | undefined;
527
- })[];
528
- }, {
529
- products: Struct<{
530
- name: "shield" | "money_account_plus";
531
- prices: {
532
- currency: "usd";
533
- unitAmount: number;
534
- unitDecimals: number;
535
- interval: "month" | "year";
536
- trialPeriodDays: number;
537
- minBillingCycles: number;
538
- minBillingCyclesForBalance: number;
539
- }[];
540
- }[], Struct<{
541
- name: "shield" | "money_account_plus";
542
- prices: {
543
- currency: "usd";
544
- unitAmount: number;
545
- unitDecimals: number;
546
- interval: "month" | "year";
547
- trialPeriodDays: number;
548
- minBillingCycles: number;
549
- minBillingCyclesForBalance: number;
550
- }[];
551
- }, {
552
- name: Struct<"shield" | "money_account_plus", {
553
- shield: "shield";
554
- money_account_plus: "money_account_plus";
555
- }>;
556
- prices: Struct<{
557
- currency: "usd";
558
- unitAmount: number;
559
- unitDecimals: number;
560
- interval: "month" | "year";
561
- trialPeriodDays: number;
562
- minBillingCycles: number;
563
- minBillingCyclesForBalance: number;
564
- }[], Struct<{
565
- currency: "usd";
566
- unitAmount: number;
567
- unitDecimals: number;
568
- interval: "month" | "year";
569
- trialPeriodDays: number;
570
- minBillingCycles: number;
571
- minBillingCyclesForBalance: number;
572
- }, {
573
- interval: Struct<"month" | "year", {
574
- month: "month";
575
- year: "year";
576
- }>;
577
- unitAmount: Struct<number, null>;
578
- unitDecimals: Struct<number, null>;
579
- currency: Struct<"usd", {
580
- usd: "usd";
581
- }>;
582
- trialPeriodDays: Struct<number, null>;
583
- minBillingCycles: Struct<number, null>;
584
- minBillingCyclesForBalance: Struct<number, null>;
585
- }>>;
586
- }>>;
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;
594
- chains?: {
595
- chainId: `0x${string}`;
596
- paymentAddress: `0x${string}`;
597
- tokens: TokenPaymentInfo[];
598
- delegateAddress?: `0x${string}` | undefined;
599
- isSponsorshipSupported?: boolean | undefined;
600
- }[] | undefined;
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;
608
- chains?: {
609
- chainId: `0x${string}`;
610
- paymentAddress: `0x${string}`;
611
- tokens: TokenPaymentInfo[];
612
- delegateAddress?: `0x${string}` | undefined;
613
- isSponsorshipSupported?: boolean | undefined;
614
- }[] | undefined;
615
- }, null>>;
616
- }>;
617
- export declare const SubscriptionEligibilityStruct: Struct<{
618
- product: "shield" | "money_account_plus";
619
- canSubscribe?: boolean | undefined;
620
- canViewEntryModal?: boolean | undefined;
621
- modalType?: "A" | "B" | undefined;
622
- cohorts?: {
623
- cohort: string;
624
- eligibilityRate: number;
625
- priority: number;
626
- eligible: boolean;
627
- }[] | undefined;
628
- assignedCohort?: string | null | undefined;
629
- assignedAt?: string | undefined;
630
- hasAssignedCohortExpired?: boolean | undefined;
631
- }, {
632
- product: Struct<"shield" | "money_account_plus", {
633
- shield: "shield";
634
- money_account_plus: "money_account_plus";
635
- }>;
636
- canSubscribe: Struct<boolean | undefined, null>;
637
- canViewEntryModal: Struct<boolean | undefined, null>;
638
- modalType: Struct<"A" | "B" | undefined, {
639
- A: "A";
640
- B: "B";
641
- }>;
642
- cohorts: Struct<{
643
- cohort: string;
644
- eligibilityRate: number;
645
- priority: number;
646
- eligible: boolean;
647
- }[] | undefined, Struct<{
648
- cohort: string;
649
- eligibilityRate: number;
650
- priority: number;
651
- eligible: boolean;
652
- }, {
653
- cohort: Struct<string, null>;
654
- eligibilityRate: Struct<number, null>;
655
- priority: Struct<number, null>;
656
- eligible: Struct<boolean, null>;
657
- }>>;
658
- assignedCohort: Struct<string | null | undefined, null>;
659
- assignedAt: Struct<string | undefined, null>;
660
- hasAssignedCohortExpired: Struct<boolean | undefined, null>;
661
- }>;
662
- export declare const SubscriptionEligibilityArrayStruct: Struct<{
663
- product: "shield" | "money_account_plus";
664
- canSubscribe?: boolean | undefined;
665
- canViewEntryModal?: boolean | undefined;
666
- modalType?: "A" | "B" | undefined;
667
- cohorts?: {
668
- cohort: string;
669
- eligibilityRate: number;
670
- priority: number;
671
- eligible: boolean;
672
- }[] | undefined;
673
- assignedCohort?: string | null | undefined;
674
- assignedAt?: string | undefined;
675
- hasAssignedCohortExpired?: boolean | undefined;
676
- }[], Struct<{
677
- product: "shield" | "money_account_plus";
678
- canSubscribe?: boolean | undefined;
679
- canViewEntryModal?: boolean | undefined;
680
- modalType?: "A" | "B" | undefined;
681
- cohorts?: {
682
- cohort: string;
683
- eligibilityRate: number;
684
- priority: number;
685
- eligible: boolean;
686
- }[] | undefined;
687
- assignedCohort?: string | null | undefined;
688
- assignedAt?: string | undefined;
689
- hasAssignedCohortExpired?: boolean | undefined;
690
- }, {
691
- product: Struct<"shield" | "money_account_plus", {
692
- shield: "shield";
693
- money_account_plus: "money_account_plus";
694
- }>;
695
- canSubscribe: Struct<boolean | undefined, null>;
696
- canViewEntryModal: Struct<boolean | undefined, null>;
697
- modalType: Struct<"A" | "B" | undefined, {
698
- A: "A";
699
- B: "B";
700
- }>;
701
- cohorts: Struct<{
702
- cohort: string;
703
- eligibilityRate: number;
704
- priority: number;
705
- eligible: boolean;
706
- }[] | undefined, Struct<{
707
- cohort: string;
708
- eligibilityRate: number;
709
- priority: number;
710
- eligible: boolean;
711
- }, {
712
- cohort: Struct<string, null>;
713
- eligibilityRate: Struct<number, null>;
714
- priority: Struct<number, null>;
715
- eligible: Struct<boolean, null>;
716
- }>>;
717
- assignedCohort: Struct<string | null | undefined, null>;
718
- assignedAt: Struct<string | undefined, null>;
719
- hasAssignedCohortExpired: Struct<boolean | undefined, null>;
720
- }>>;
721
- //# sourceMappingURL=SubscriptionService-structs.d.cts.map