@metamask/subscription-controller 8.1.0 → 9.0.1

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 (114) hide show
  1. package/CHANGELOG.md +26 -1
  2. package/dist/{SubscriptionController-method-action-types.d.mts → SubscriptionController-method-action-types.d.ts} +2 -2
  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} +18 -18
  7. package/dist/SubscriptionController.d.ts.map +1 -0
  8. package/dist/{SubscriptionController.mjs → SubscriptionController.js} +371 -274
  9. package/dist/SubscriptionController.js.map +1 -0
  10. package/dist/{SubscriptionService-method-action-types.d.cts → SubscriptionService-method-action-types.d.ts} +2 -2
  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.cts → SubscriptionService-structs.d.ts} +164 -164
  15. package/dist/SubscriptionService-structs.d.ts.map +1 -0
  16. package/dist/{SubscriptionService-structs.mjs → SubscriptionService-structs.js} +4 -4
  17. package/dist/SubscriptionService-structs.js.map +1 -0
  18. package/dist/{SubscriptionService.d.cts → SubscriptionService.d.ts} +10 -10
  19. package/dist/SubscriptionService.d.ts.map +1 -0
  20. package/dist/{SubscriptionService.mjs → SubscriptionService.js} +141 -143
  21. package/dist/SubscriptionService.js.map +1 -0
  22. package/dist/{constants.d.cts → constants.d.ts} +1 -1
  23. package/dist/constants.d.ts.map +1 -0
  24. package/dist/{constants.mjs → constants.js} +3 -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.cts → index.d.ts} +12 -12
  31. package/dist/index.d.ts.map +1 -0
  32. package/dist/{index.mjs → index.js} +7 -7
  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.mts → selectors.d.ts} +3 -3
  39. package/dist/selectors.d.ts.map +1 -0
  40. package/dist/{selectors.mjs → selectors.js} +2 -2
  41. package/dist/selectors.js.map +1 -0
  42. package/dist/{types.d.mts → types.d.ts} +47 -47
  43. package/dist/types.d.ts.map +1 -0
  44. package/dist/{types.mjs → types.js} +1 -1
  45. package/dist/types.js.map +1 -0
  46. package/package.json +19 -23
  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 -261
  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 -844
  54. package/dist/SubscriptionController.cjs.map +0 -1
  55. package/dist/SubscriptionController.d.cts +0 -268
  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.map +0 -1
  62. package/dist/SubscriptionService-method-action-types.d.mts +0 -164
  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 -209
  66. package/dist/SubscriptionService-structs.cjs.map +0 -1
  67. package/dist/SubscriptionService-structs.d.cts.map +0 -1
  68. package/dist/SubscriptionService-structs.d.mts +0 -889
  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 -497
  72. package/dist/SubscriptionService.cjs.map +0 -1
  73. package/dist/SubscriptionService.d.cts.map +0 -1
  74. package/dist/SubscriptionService.d.mts +0 -155
  75. package/dist/SubscriptionService.d.mts.map +0 -1
  76. package/dist/SubscriptionService.mjs.map +0 -1
  77. package/dist/constants.cjs +0 -74
  78. package/dist/constants.cjs.map +0 -1
  79. package/dist/constants.d.cts.map +0 -1
  80. package/dist/constants.d.mts +0 -50
  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 -35
  90. package/dist/index.cjs.map +0 -1
  91. package/dist/index.d.cts.map +0 -1
  92. package/dist/index.d.mts +0 -12
  93. package/dist/index.d.mts.map +0 -1
  94. package/dist/index.mjs.map +0 -1
  95. package/dist/logger.cjs +0 -8
  96. package/dist/logger.cjs.map +0 -1
  97. package/dist/logger.d.cts +0 -5
  98. package/dist/logger.d.cts.map +0 -1
  99. package/dist/logger.d.mts +0 -5
  100. package/dist/logger.d.mts.map +0 -1
  101. package/dist/logger.mjs +0 -5
  102. package/dist/logger.mjs.map +0 -1
  103. package/dist/selectors.cjs +0 -52
  104. package/dist/selectors.cjs.map +0 -1
  105. package/dist/selectors.d.cts +0 -38
  106. package/dist/selectors.d.cts.map +0 -1
  107. package/dist/selectors.d.mts.map +0 -1
  108. package/dist/selectors.mjs.map +0 -1
  109. package/dist/types.cjs +0 -100
  110. package/dist/types.cjs.map +0 -1
  111. package/dist/types.d.cts +0 -645
  112. package/dist/types.d.cts.map +0 -1
  113. package/dist/types.d.mts.map +0 -1
  114. package/dist/types.mjs.map +0 -1
@@ -1,889 +0,0 @@
1
- import type { Struct } from "@metamask/superstruct";
2
- import type { TokenPaymentInfo } from "./types.mjs";
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
- productEntitlements?: {
156
- shield?: {
157
- entitlements: {
158
- shieldClaim: boolean;
159
- prioritySupport: boolean;
160
- };
161
- } | undefined;
162
- money_account_plus?: {
163
- entitlements: {
164
- swapFeeWaiver: boolean;
165
- perpsFeeWaiver: boolean;
166
- predictFreeTx: boolean;
167
- premiumApy: boolean;
168
- };
169
- plan: string;
170
- } | undefined;
171
- } | undefined;
172
- lastSubscription?: {
173
- id: string;
174
- products: {
175
- name: "shield" | "money_account_plus";
176
- currency: "usd";
177
- unitAmount: number;
178
- unitDecimals: number;
179
- }[];
180
- currentPeriodStart: string;
181
- currentPeriodEnd: string;
182
- status: "incomplete" | "incomplete_expired" | "provisional" | "trialing" | "active" | "past_due" | "unpaid" | "canceled" | "paused";
183
- interval: "month" | "year";
184
- paymentMethod: {
185
- type: "card";
186
- card: {
187
- brand: string;
188
- displayBrand: string;
189
- last4: string;
190
- };
191
- } | {
192
- type: "crypto";
193
- crypto: {
194
- chainId: `0x${string}`;
195
- payerAddress: `0x${string}`;
196
- tokenSymbol: string;
197
- error?: "approval_transaction_too_old" | "approval_transaction_reverted" | "approval_transaction_max_verification_attempts_reached" | "insufficient_balance" | "insufficient_allowance" | undefined;
198
- };
199
- };
200
- cancelType: "allowed_immediate" | "allowed_at_period_end" | "not_allowed" | "not_allowed_pending_verification";
201
- isEligibleForSupport: boolean;
202
- billingCycles?: number | undefined;
203
- cancelAtPeriodEnd?: boolean | undefined;
204
- trialPeriodDays?: number | undefined;
205
- trialStart?: string | undefined;
206
- trialEnd?: string | undefined;
207
- endDate?: string | undefined;
208
- canceledAt?: string | undefined;
209
- inactiveAt?: string | undefined;
210
- } | undefined;
211
- rewardAccountId?: `${string}:${string}:${string}` | undefined;
212
- }, {
213
- customerId: Struct<string | undefined, null>;
214
- subscriptions: Struct<{
215
- id: string;
216
- products: {
217
- name: "shield" | "money_account_plus";
218
- currency: "usd";
219
- unitAmount: number;
220
- unitDecimals: number;
221
- }[];
222
- currentPeriodStart: string;
223
- currentPeriodEnd: string;
224
- status: "incomplete" | "incomplete_expired" | "provisional" | "trialing" | "active" | "past_due" | "unpaid" | "canceled" | "paused";
225
- interval: "month" | "year";
226
- paymentMethod: {
227
- type: "card";
228
- card: {
229
- brand: string;
230
- displayBrand: string;
231
- last4: string;
232
- };
233
- } | {
234
- type: "crypto";
235
- crypto: {
236
- chainId: `0x${string}`;
237
- payerAddress: `0x${string}`;
238
- tokenSymbol: string;
239
- error?: "approval_transaction_too_old" | "approval_transaction_reverted" | "approval_transaction_max_verification_attempts_reached" | "insufficient_balance" | "insufficient_allowance" | undefined;
240
- };
241
- };
242
- cancelType: "allowed_immediate" | "allowed_at_period_end" | "not_allowed" | "not_allowed_pending_verification";
243
- isEligibleForSupport: boolean;
244
- billingCycles?: number | undefined;
245
- cancelAtPeriodEnd?: boolean | undefined;
246
- trialPeriodDays?: number | undefined;
247
- trialStart?: string | undefined;
248
- trialEnd?: string | undefined;
249
- endDate?: string | undefined;
250
- canceledAt?: string | undefined;
251
- inactiveAt?: string | undefined;
252
- }[], Struct<{
253
- id: string;
254
- products: {
255
- name: "shield" | "money_account_plus";
256
- currency: "usd";
257
- unitAmount: number;
258
- unitDecimals: number;
259
- }[];
260
- currentPeriodStart: string;
261
- currentPeriodEnd: string;
262
- status: "incomplete" | "incomplete_expired" | "provisional" | "trialing" | "active" | "past_due" | "unpaid" | "canceled" | "paused";
263
- interval: "month" | "year";
264
- paymentMethod: {
265
- type: "card";
266
- card: {
267
- brand: string;
268
- displayBrand: string;
269
- last4: string;
270
- };
271
- } | {
272
- type: "crypto";
273
- crypto: {
274
- chainId: `0x${string}`;
275
- payerAddress: `0x${string}`;
276
- tokenSymbol: string;
277
- error?: "approval_transaction_too_old" | "approval_transaction_reverted" | "approval_transaction_max_verification_attempts_reached" | "insufficient_balance" | "insufficient_allowance" | undefined;
278
- };
279
- };
280
- cancelType: "allowed_immediate" | "allowed_at_period_end" | "not_allowed" | "not_allowed_pending_verification";
281
- isEligibleForSupport: boolean;
282
- billingCycles?: number | undefined;
283
- cancelAtPeriodEnd?: boolean | undefined;
284
- trialPeriodDays?: number | undefined;
285
- trialStart?: string | undefined;
286
- trialEnd?: string | undefined;
287
- endDate?: string | undefined;
288
- canceledAt?: string | undefined;
289
- inactiveAt?: string | undefined;
290
- }, {
291
- id: Struct<string, null>;
292
- products: Struct<{
293
- name: "shield" | "money_account_plus";
294
- currency: "usd";
295
- unitAmount: number;
296
- unitDecimals: number;
297
- }[], Struct<{
298
- name: "shield" | "money_account_plus";
299
- currency: "usd";
300
- unitAmount: number;
301
- unitDecimals: number;
302
- }, {
303
- name: Struct<"shield" | "money_account_plus", {
304
- shield: "shield";
305
- money_account_plus: "money_account_plus";
306
- }>;
307
- currency: Struct<"usd", {
308
- usd: "usd";
309
- }>;
310
- unitAmount: Struct<number, null>;
311
- unitDecimals: Struct<number, null>;
312
- }>>;
313
- currentPeriodStart: Struct<string, null>;
314
- currentPeriodEnd: Struct<string, null>;
315
- cancelAtPeriodEnd: Struct<boolean | undefined, null>;
316
- status: Struct<"incomplete" | "incomplete_expired" | "provisional" | "trialing" | "active" | "past_due" | "unpaid" | "canceled" | "paused", {
317
- incomplete: "incomplete";
318
- incomplete_expired: "incomplete_expired";
319
- provisional: "provisional";
320
- trialing: "trialing";
321
- active: "active";
322
- past_due: "past_due";
323
- unpaid: "unpaid";
324
- canceled: "canceled";
325
- paused: "paused";
326
- }>;
327
- interval: Struct<"month" | "year", {
328
- month: "month";
329
- year: "year";
330
- }>;
331
- paymentMethod: Struct<{
332
- type: "card";
333
- card: {
334
- brand: string;
335
- displayBrand: string;
336
- last4: string;
337
- };
338
- } | {
339
- type: "crypto";
340
- crypto: {
341
- chainId: `0x${string}`;
342
- payerAddress: `0x${string}`;
343
- tokenSymbol: string;
344
- error?: "approval_transaction_too_old" | "approval_transaction_reverted" | "approval_transaction_max_verification_attempts_reached" | "insufficient_balance" | "insufficient_allowance" | undefined;
345
- };
346
- }, null>;
347
- trialPeriodDays: Struct<number | undefined, null>;
348
- trialStart: Struct<string | undefined, null>;
349
- trialEnd: Struct<string | undefined, null>;
350
- endDate: Struct<string | undefined, null>;
351
- canceledAt: Struct<string | undefined, null>;
352
- cancelType: Struct<"allowed_immediate" | "allowed_at_period_end" | "not_allowed" | "not_allowed_pending_verification", {
353
- allowed_immediate: "allowed_immediate";
354
- allowed_at_period_end: "allowed_at_period_end";
355
- not_allowed: "not_allowed";
356
- not_allowed_pending_verification: "not_allowed_pending_verification";
357
- }>;
358
- inactiveAt: Struct<string | undefined, null>;
359
- isEligibleForSupport: Struct<boolean, null>;
360
- billingCycles: Struct<number | undefined, null>;
361
- }>>;
362
- trialedProducts: Struct<("shield" | "money_account_plus")[], Struct<"shield" | "money_account_plus", {
363
- shield: "shield";
364
- money_account_plus: "money_account_plus";
365
- }>>;
366
- productEntitlements: Struct<{
367
- shield?: {
368
- entitlements: {
369
- shieldClaim: boolean;
370
- prioritySupport: boolean;
371
- };
372
- } | undefined;
373
- money_account_plus?: {
374
- entitlements: {
375
- swapFeeWaiver: boolean;
376
- perpsFeeWaiver: boolean;
377
- predictFreeTx: boolean;
378
- premiumApy: boolean;
379
- };
380
- plan: string;
381
- } | undefined;
382
- } | undefined, {
383
- shield: Struct<{
384
- entitlements: {
385
- shieldClaim: boolean;
386
- prioritySupport: boolean;
387
- };
388
- } | undefined, {
389
- entitlements: Struct<{
390
- shieldClaim: boolean;
391
- prioritySupport: boolean;
392
- }, {
393
- shieldClaim: Struct<boolean, null>;
394
- prioritySupport: Struct<boolean, null>;
395
- }>;
396
- }>;
397
- money_account_plus: Struct<{
398
- entitlements: {
399
- swapFeeWaiver: boolean;
400
- perpsFeeWaiver: boolean;
401
- predictFreeTx: boolean;
402
- premiumApy: boolean;
403
- };
404
- plan: string;
405
- } | undefined, {
406
- plan: Struct<string, null>;
407
- entitlements: Struct<{
408
- swapFeeWaiver: boolean;
409
- perpsFeeWaiver: boolean;
410
- predictFreeTx: boolean;
411
- premiumApy: boolean;
412
- }, {
413
- swapFeeWaiver: Struct<boolean, null>;
414
- perpsFeeWaiver: Struct<boolean, null>;
415
- predictFreeTx: Struct<boolean, null>;
416
- premiumApy: Struct<boolean, null>;
417
- }>;
418
- }>;
419
- }>;
420
- lastSubscription: Struct<{
421
- id: string;
422
- products: {
423
- name: "shield" | "money_account_plus";
424
- currency: "usd";
425
- unitAmount: number;
426
- unitDecimals: number;
427
- }[];
428
- currentPeriodStart: string;
429
- currentPeriodEnd: string;
430
- status: "incomplete" | "incomplete_expired" | "provisional" | "trialing" | "active" | "past_due" | "unpaid" | "canceled" | "paused";
431
- interval: "month" | "year";
432
- paymentMethod: {
433
- type: "card";
434
- card: {
435
- brand: string;
436
- displayBrand: string;
437
- last4: string;
438
- };
439
- } | {
440
- type: "crypto";
441
- crypto: {
442
- chainId: `0x${string}`;
443
- payerAddress: `0x${string}`;
444
- tokenSymbol: string;
445
- error?: "approval_transaction_too_old" | "approval_transaction_reverted" | "approval_transaction_max_verification_attempts_reached" | "insufficient_balance" | "insufficient_allowance" | undefined;
446
- };
447
- };
448
- cancelType: "allowed_immediate" | "allowed_at_period_end" | "not_allowed" | "not_allowed_pending_verification";
449
- isEligibleForSupport: boolean;
450
- billingCycles?: number | undefined;
451
- cancelAtPeriodEnd?: boolean | undefined;
452
- trialPeriodDays?: number | undefined;
453
- trialStart?: string | undefined;
454
- trialEnd?: string | undefined;
455
- endDate?: string | undefined;
456
- canceledAt?: string | undefined;
457
- inactiveAt?: string | undefined;
458
- } | undefined, {
459
- id: Struct<string, null>;
460
- products: Struct<{
461
- name: "shield" | "money_account_plus";
462
- currency: "usd";
463
- unitAmount: number;
464
- unitDecimals: number;
465
- }[], Struct<{
466
- name: "shield" | "money_account_plus";
467
- currency: "usd";
468
- unitAmount: number;
469
- unitDecimals: number;
470
- }, {
471
- name: Struct<"shield" | "money_account_plus", {
472
- shield: "shield";
473
- money_account_plus: "money_account_plus";
474
- }>;
475
- currency: Struct<"usd", {
476
- usd: "usd";
477
- }>;
478
- unitAmount: Struct<number, null>;
479
- unitDecimals: Struct<number, null>;
480
- }>>;
481
- currentPeriodStart: Struct<string, null>;
482
- currentPeriodEnd: Struct<string, null>;
483
- cancelAtPeriodEnd: Struct<boolean | undefined, null>;
484
- status: Struct<"incomplete" | "incomplete_expired" | "provisional" | "trialing" | "active" | "past_due" | "unpaid" | "canceled" | "paused", {
485
- incomplete: "incomplete";
486
- incomplete_expired: "incomplete_expired";
487
- provisional: "provisional";
488
- trialing: "trialing";
489
- active: "active";
490
- past_due: "past_due";
491
- unpaid: "unpaid";
492
- canceled: "canceled";
493
- paused: "paused";
494
- }>;
495
- interval: Struct<"month" | "year", {
496
- month: "month";
497
- year: "year";
498
- }>;
499
- paymentMethod: Struct<{
500
- type: "card";
501
- card: {
502
- brand: string;
503
- displayBrand: string;
504
- last4: string;
505
- };
506
- } | {
507
- type: "crypto";
508
- crypto: {
509
- chainId: `0x${string}`;
510
- payerAddress: `0x${string}`;
511
- tokenSymbol: string;
512
- error?: "approval_transaction_too_old" | "approval_transaction_reverted" | "approval_transaction_max_verification_attempts_reached" | "insufficient_balance" | "insufficient_allowance" | undefined;
513
- };
514
- }, null>;
515
- trialPeriodDays: Struct<number | undefined, null>;
516
- trialStart: Struct<string | undefined, null>;
517
- trialEnd: Struct<string | undefined, null>;
518
- endDate: Struct<string | undefined, null>;
519
- canceledAt: Struct<string | undefined, null>;
520
- cancelType: Struct<"allowed_immediate" | "allowed_at_period_end" | "not_allowed" | "not_allowed_pending_verification", {
521
- allowed_immediate: "allowed_immediate";
522
- allowed_at_period_end: "allowed_at_period_end";
523
- not_allowed: "not_allowed";
524
- not_allowed_pending_verification: "not_allowed_pending_verification";
525
- }>;
526
- inactiveAt: Struct<string | undefined, null>;
527
- isEligibleForSupport: Struct<boolean, null>;
528
- billingCycles: Struct<number | undefined, null>;
529
- }>;
530
- rewardAccountId: Struct<`${string}:${string}:${string}` | undefined, null>;
531
- }>;
532
- export declare const SubscriptionBenefitsResponseStruct: Struct<{
533
- products: {
534
- swaps: {
535
- feeBips: string | null;
536
- remainingMicroUsd: number | null;
537
- exhausted: boolean;
538
- capMicroUsd?: number | undefined;
539
- consumedMicroUsd?: number | undefined;
540
- };
541
- perps: {
542
- remainingMicroUsd: number | null;
543
- exhausted: boolean;
544
- builderFeeBips: string | null;
545
- builderCode: string | null;
546
- capMicroUsd?: number | undefined;
547
- consumedMicroUsd?: number | undefined;
548
- };
549
- predict: {
550
- exhausted: boolean;
551
- builderCode: string | null;
552
- remainingTxCount: number | null;
553
- capTxCount?: number | undefined;
554
- consumedTxCount?: number | undefined;
555
- };
556
- };
557
- eligible: boolean;
558
- billingPeriodId: string | null;
559
- }, {
560
- eligible: Struct<boolean, null>;
561
- billingPeriodId: Struct<string | null, null>;
562
- products: Struct<{
563
- swaps: {
564
- feeBips: string | null;
565
- remainingMicroUsd: number | null;
566
- exhausted: boolean;
567
- capMicroUsd?: number | undefined;
568
- consumedMicroUsd?: number | undefined;
569
- };
570
- perps: {
571
- remainingMicroUsd: number | null;
572
- exhausted: boolean;
573
- builderFeeBips: string | null;
574
- builderCode: string | null;
575
- capMicroUsd?: number | undefined;
576
- consumedMicroUsd?: number | undefined;
577
- };
578
- predict: {
579
- exhausted: boolean;
580
- builderCode: string | null;
581
- remainingTxCount: number | null;
582
- capTxCount?: number | undefined;
583
- consumedTxCount?: number | undefined;
584
- };
585
- }, {
586
- swaps: Struct<{
587
- feeBips: string | null;
588
- remainingMicroUsd: number | null;
589
- exhausted: boolean;
590
- capMicroUsd?: number | undefined;
591
- consumedMicroUsd?: number | undefined;
592
- }, {
593
- feeBips: Struct<string | null, null>;
594
- capMicroUsd: Struct<number | undefined, null>;
595
- consumedMicroUsd: Struct<number | undefined, null>;
596
- remainingMicroUsd: Struct<number | null, null>;
597
- exhausted: Struct<boolean, null>;
598
- }>;
599
- perps: Struct<{
600
- remainingMicroUsd: number | null;
601
- exhausted: boolean;
602
- builderFeeBips: string | null;
603
- builderCode: string | null;
604
- capMicroUsd?: number | undefined;
605
- consumedMicroUsd?: number | undefined;
606
- }, {
607
- builderFeeBips: Struct<string | null, null>;
608
- builderCode: Struct<string | null, null>;
609
- capMicroUsd: Struct<number | undefined, null>;
610
- consumedMicroUsd: Struct<number | undefined, null>;
611
- remainingMicroUsd: Struct<number | null, null>;
612
- exhausted: Struct<boolean, null>;
613
- }>;
614
- predict: Struct<{
615
- exhausted: boolean;
616
- builderCode: string | null;
617
- remainingTxCount: number | null;
618
- capTxCount?: number | undefined;
619
- consumedTxCount?: number | undefined;
620
- }, {
621
- builderCode: Struct<string | null, null>;
622
- capTxCount: Struct<number | undefined, null>;
623
- consumedTxCount: Struct<number | undefined, null>;
624
- remainingTxCount: Struct<number | null, null>;
625
- exhausted: Struct<boolean, null>;
626
- }>;
627
- }>;
628
- }>;
629
- export declare const StartSubscriptionResponseStruct: Struct<{
630
- checkoutSessionUrl: string;
631
- }, {
632
- checkoutSessionUrl: Struct<string, null>;
633
- }>;
634
- export declare const StartCryptoSubscriptionResponseStruct: Struct<{
635
- status: "incomplete" | "incomplete_expired" | "provisional" | "trialing" | "active" | "past_due" | "unpaid" | "canceled" | "paused";
636
- subscriptionId: string;
637
- }, {
638
- subscriptionId: Struct<string, null>;
639
- status: Struct<"incomplete" | "incomplete_expired" | "provisional" | "trialing" | "active" | "past_due" | "unpaid" | "canceled" | "paused", {
640
- incomplete: "incomplete";
641
- incomplete_expired: "incomplete_expired";
642
- provisional: "provisional";
643
- trialing: "trialing";
644
- active: "active";
645
- past_due: "past_due";
646
- unpaid: "unpaid";
647
- canceled: "canceled";
648
- paused: "paused";
649
- }>;
650
- }>;
651
- export declare const UpdatePaymentMethodCardResponseStruct: Struct<{
652
- redirectUrl: string;
653
- }, {
654
- redirectUrl: Struct<string, null>;
655
- }>;
656
- export declare const BillingPortalResponseStruct: Struct<{
657
- url: string;
658
- }, {
659
- url: Struct<string, null>;
660
- }>;
661
- export declare const SubscriptionApiGeneralResponseStruct: Struct<{
662
- success: boolean;
663
- message?: string | undefined;
664
- }, {
665
- success: Struct<boolean, null>;
666
- message: Struct<string | undefined, null>;
667
- }>;
668
- export declare const PricingResponseStruct: Struct<{
669
- products: {
670
- name: "shield" | "money_account_plus";
671
- prices: {
672
- currency: "usd";
673
- unitAmount: number;
674
- unitDecimals: number;
675
- interval: "month" | "year";
676
- trialPeriodDays: number;
677
- minBillingCycles: number;
678
- minBillingCyclesForBalance: number;
679
- }[];
680
- }[];
681
- paymentMethods: ({
682
- type: "card";
683
- products?: ("shield" | "money_account_plus")[] | undefined;
684
- } | {
685
- type: "crypto";
686
- products?: ("shield" | "money_account_plus")[] | undefined;
687
- cryptoAuthMethod?: "erc20_approval" | "delegation" | undefined;
688
- chains?: {
689
- chainId: `0x${string}`;
690
- paymentAddress: `0x${string}`;
691
- tokens: TokenPaymentInfo[];
692
- delegateAddress?: `0x${string}` | undefined;
693
- isSponsorshipSupported?: boolean | undefined;
694
- }[] | undefined;
695
- })[];
696
- }, {
697
- products: Struct<{
698
- name: "shield" | "money_account_plus";
699
- prices: {
700
- currency: "usd";
701
- unitAmount: number;
702
- unitDecimals: number;
703
- interval: "month" | "year";
704
- trialPeriodDays: number;
705
- minBillingCycles: number;
706
- minBillingCyclesForBalance: number;
707
- }[];
708
- }[], Struct<{
709
- name: "shield" | "money_account_plus";
710
- prices: {
711
- currency: "usd";
712
- unitAmount: number;
713
- unitDecimals: number;
714
- interval: "month" | "year";
715
- trialPeriodDays: number;
716
- minBillingCycles: number;
717
- minBillingCyclesForBalance: number;
718
- }[];
719
- }, {
720
- name: Struct<"shield" | "money_account_plus", {
721
- shield: "shield";
722
- money_account_plus: "money_account_plus";
723
- }>;
724
- prices: Struct<{
725
- currency: "usd";
726
- unitAmount: number;
727
- unitDecimals: number;
728
- interval: "month" | "year";
729
- trialPeriodDays: number;
730
- minBillingCycles: number;
731
- minBillingCyclesForBalance: number;
732
- }[], Struct<{
733
- currency: "usd";
734
- unitAmount: number;
735
- unitDecimals: number;
736
- interval: "month" | "year";
737
- trialPeriodDays: number;
738
- minBillingCycles: number;
739
- minBillingCyclesForBalance: number;
740
- }, {
741
- interval: Struct<"month" | "year", {
742
- month: "month";
743
- year: "year";
744
- }>;
745
- unitAmount: Struct<number, null>;
746
- unitDecimals: Struct<number, null>;
747
- currency: Struct<"usd", {
748
- usd: "usd";
749
- }>;
750
- trialPeriodDays: Struct<number, null>;
751
- minBillingCycles: Struct<number, null>;
752
- minBillingCyclesForBalance: Struct<number, null>;
753
- }>>;
754
- }>>;
755
- paymentMethods: Struct<({
756
- type: "card";
757
- products?: ("shield" | "money_account_plus")[] | undefined;
758
- } | {
759
- type: "crypto";
760
- products?: ("shield" | "money_account_plus")[] | undefined;
761
- cryptoAuthMethod?: "erc20_approval" | "delegation" | undefined;
762
- chains?: {
763
- chainId: `0x${string}`;
764
- paymentAddress: `0x${string}`;
765
- tokens: TokenPaymentInfo[];
766
- delegateAddress?: `0x${string}` | undefined;
767
- isSponsorshipSupported?: boolean | undefined;
768
- }[] | undefined;
769
- })[], Struct<{
770
- type: "card";
771
- products?: ("shield" | "money_account_plus")[] | undefined;
772
- } | {
773
- type: "crypto";
774
- products?: ("shield" | "money_account_plus")[] | undefined;
775
- cryptoAuthMethod?: "erc20_approval" | "delegation" | undefined;
776
- chains?: {
777
- chainId: `0x${string}`;
778
- paymentAddress: `0x${string}`;
779
- tokens: TokenPaymentInfo[];
780
- delegateAddress?: `0x${string}` | undefined;
781
- isSponsorshipSupported?: boolean | undefined;
782
- }[] | undefined;
783
- }, null>>;
784
- }>;
785
- export declare const SubscriptionEligibilityStruct: Struct<{
786
- product: "shield" | "money_account_plus";
787
- canSubscribe?: boolean | undefined;
788
- canViewEntryModal?: boolean | undefined;
789
- modalType?: "A" | "B" | undefined;
790
- cohorts?: {
791
- eligible: boolean;
792
- cohort: string;
793
- eligibilityRate: number;
794
- priority: number;
795
- }[] | undefined;
796
- assignedCohort?: string | null | undefined;
797
- assignedAt?: string | undefined;
798
- hasAssignedCohortExpired?: boolean | undefined;
799
- }, {
800
- product: Struct<"shield" | "money_account_plus", {
801
- shield: "shield";
802
- money_account_plus: "money_account_plus";
803
- }>;
804
- canSubscribe: Struct<boolean | undefined, null>;
805
- canViewEntryModal: Struct<boolean | undefined, null>;
806
- modalType: Struct<"A" | "B" | undefined, {
807
- A: "A";
808
- B: "B";
809
- }>;
810
- cohorts: Struct<{
811
- eligible: boolean;
812
- cohort: string;
813
- eligibilityRate: number;
814
- priority: number;
815
- }[] | undefined, Struct<{
816
- eligible: boolean;
817
- cohort: string;
818
- eligibilityRate: number;
819
- priority: number;
820
- }, {
821
- cohort: Struct<string, null>;
822
- eligibilityRate: Struct<number, null>;
823
- priority: Struct<number, null>;
824
- eligible: Struct<boolean, null>;
825
- }>>;
826
- assignedCohort: Struct<string | null | undefined, null>;
827
- assignedAt: Struct<string | undefined, null>;
828
- hasAssignedCohortExpired: Struct<boolean | undefined, null>;
829
- }>;
830
- export declare const SubscriptionEligibilityArrayStruct: Struct<{
831
- product: "shield" | "money_account_plus";
832
- canSubscribe?: boolean | undefined;
833
- canViewEntryModal?: boolean | undefined;
834
- modalType?: "A" | "B" | undefined;
835
- cohorts?: {
836
- eligible: boolean;
837
- cohort: string;
838
- eligibilityRate: number;
839
- priority: number;
840
- }[] | undefined;
841
- assignedCohort?: string | null | undefined;
842
- assignedAt?: string | undefined;
843
- hasAssignedCohortExpired?: boolean | undefined;
844
- }[], Struct<{
845
- product: "shield" | "money_account_plus";
846
- canSubscribe?: boolean | undefined;
847
- canViewEntryModal?: boolean | undefined;
848
- modalType?: "A" | "B" | undefined;
849
- cohorts?: {
850
- eligible: boolean;
851
- cohort: string;
852
- eligibilityRate: number;
853
- priority: number;
854
- }[] | undefined;
855
- assignedCohort?: string | null | undefined;
856
- assignedAt?: string | undefined;
857
- hasAssignedCohortExpired?: boolean | undefined;
858
- }, {
859
- product: Struct<"shield" | "money_account_plus", {
860
- shield: "shield";
861
- money_account_plus: "money_account_plus";
862
- }>;
863
- canSubscribe: Struct<boolean | undefined, null>;
864
- canViewEntryModal: Struct<boolean | undefined, null>;
865
- modalType: Struct<"A" | "B" | undefined, {
866
- A: "A";
867
- B: "B";
868
- }>;
869
- cohorts: Struct<{
870
- eligible: boolean;
871
- cohort: string;
872
- eligibilityRate: number;
873
- priority: number;
874
- }[] | undefined, Struct<{
875
- eligible: boolean;
876
- cohort: string;
877
- eligibilityRate: number;
878
- priority: number;
879
- }, {
880
- cohort: Struct<string, null>;
881
- eligibilityRate: Struct<number, null>;
882
- priority: Struct<number, null>;
883
- eligible: Struct<boolean, null>;
884
- }>>;
885
- assignedCohort: Struct<string | null | undefined, null>;
886
- assignedAt: Struct<string | undefined, null>;
887
- hasAssignedCohortExpired: Struct<boolean | undefined, null>;
888
- }>>;
889
- //# sourceMappingURL=SubscriptionService-structs.d.mts.map