@metamask-previews/subscription-controller 6.2.2-preview-58a4a8b71 → 6.2.2-preview-4c8a5dfcb

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 (42) hide show
  1. package/CHANGELOG.md +8 -1
  2. package/dist/SubscriptionController.cjs +18 -26
  3. package/dist/SubscriptionController.cjs.map +1 -1
  4. package/dist/SubscriptionController.d.cts +5 -9
  5. package/dist/SubscriptionController.d.cts.map +1 -1
  6. package/dist/SubscriptionController.d.mts +5 -9
  7. package/dist/SubscriptionController.d.mts.map +1 -1
  8. package/dist/SubscriptionController.mjs +18 -26
  9. package/dist/SubscriptionController.mjs.map +1 -1
  10. package/dist/SubscriptionService-method-action-types.cjs +7 -0
  11. package/dist/SubscriptionService-method-action-types.cjs.map +1 -0
  12. package/dist/SubscriptionService-method-action-types.d.cts +151 -0
  13. package/dist/SubscriptionService-method-action-types.d.cts.map +1 -0
  14. package/dist/SubscriptionService-method-action-types.d.mts +151 -0
  15. package/dist/SubscriptionService-method-action-types.d.mts.map +1 -0
  16. package/dist/SubscriptionService-method-action-types.mjs +6 -0
  17. package/dist/SubscriptionService-method-action-types.mjs.map +1 -0
  18. package/dist/SubscriptionService-structs.cjs +135 -0
  19. package/dist/SubscriptionService-structs.cjs.map +1 -0
  20. package/dist/SubscriptionService-structs.d.cts +773 -0
  21. package/dist/SubscriptionService-structs.d.cts.map +1 -0
  22. package/dist/SubscriptionService-structs.d.mts +773 -0
  23. package/dist/SubscriptionService-structs.d.mts.map +1 -0
  24. package/dist/SubscriptionService-structs.mjs +132 -0
  25. package/dist/SubscriptionService-structs.mjs.map +1 -0
  26. package/dist/SubscriptionService.cjs +257 -87
  27. package/dist/SubscriptionService.cjs.map +1 -1
  28. package/dist/SubscriptionService.d.cts +90 -10
  29. package/dist/SubscriptionService.d.cts.map +1 -1
  30. package/dist/SubscriptionService.d.mts +90 -10
  31. package/dist/SubscriptionService.d.mts.map +1 -1
  32. package/dist/SubscriptionService.mjs +257 -87
  33. package/dist/SubscriptionService.mjs.map +1 -1
  34. package/dist/index.cjs +3 -1
  35. package/dist/index.cjs.map +1 -1
  36. package/dist/index.d.cts +4 -3
  37. package/dist/index.d.cts.map +1 -1
  38. package/dist/index.d.mts +4 -3
  39. package/dist/index.d.mts.map +1 -1
  40. package/dist/index.mjs +1 -1
  41. package/dist/index.mjs.map +1 -1
  42. package/package.json +5 -2
@@ -0,0 +1,773 @@
1
+ export declare const SubscriptionStruct: import("@metamask/superstruct").Struct<{
2
+ id: string;
3
+ products: {
4
+ name: "shield";
5
+ currency: "usd";
6
+ unitAmount: number;
7
+ unitDecimals: number;
8
+ }[];
9
+ currentPeriodStart: string;
10
+ currentPeriodEnd: string;
11
+ status: "incomplete" | "incomplete_expired" | "provisional" | "trialing" | "active" | "past_due" | "unpaid" | "canceled" | "paused";
12
+ interval: "month" | "year";
13
+ paymentMethod: {
14
+ type: "card";
15
+ card: {
16
+ brand: string;
17
+ displayBrand: string;
18
+ last4: string;
19
+ };
20
+ } | {
21
+ type: "crypto";
22
+ crypto: {
23
+ chainId: `0x${string}`;
24
+ payerAddress: `0x${string}`;
25
+ tokenSymbol: string;
26
+ error?: "approval_transaction_too_old" | "approval_transaction_reverted" | "approval_transaction_max_verification_attempts_reached" | "insufficient_balance" | "insufficient_allowance" | undefined;
27
+ };
28
+ };
29
+ cancelType: "allowed_immediate" | "allowed_at_period_end" | "not_allowed" | "not_allowed_pending_verification";
30
+ isEligibleForSupport: boolean;
31
+ billingCycles?: number | undefined;
32
+ cancelAtPeriodEnd?: boolean | undefined;
33
+ trialPeriodDays?: number | undefined;
34
+ trialStart?: string | undefined;
35
+ trialEnd?: string | undefined;
36
+ endDate?: string | undefined;
37
+ canceledAt?: string | undefined;
38
+ inactiveAt?: string | undefined;
39
+ }, {
40
+ id: import("@metamask/superstruct").Struct<string, null>;
41
+ products: import("@metamask/superstruct").Struct<{
42
+ name: "shield";
43
+ currency: "usd";
44
+ unitAmount: number;
45
+ unitDecimals: number;
46
+ }[], import("@metamask/superstruct").Struct<{
47
+ name: "shield";
48
+ currency: "usd";
49
+ unitAmount: number;
50
+ unitDecimals: number;
51
+ }, {
52
+ name: import("@metamask/superstruct").Struct<"shield", {
53
+ shield: "shield";
54
+ }>;
55
+ currency: import("@metamask/superstruct").Struct<"usd", {
56
+ usd: "usd";
57
+ }>;
58
+ unitAmount: import("@metamask/superstruct").Struct<number, null>;
59
+ unitDecimals: import("@metamask/superstruct").Struct<number, null>;
60
+ }>>;
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", {
65
+ incomplete: "incomplete";
66
+ incomplete_expired: "incomplete_expired";
67
+ provisional: "provisional";
68
+ trialing: "trialing";
69
+ active: "active";
70
+ past_due: "past_due";
71
+ unpaid: "unpaid";
72
+ canceled: "canceled";
73
+ paused: "paused";
74
+ }>;
75
+ interval: import("@metamask/superstruct").Struct<"month" | "year", {
76
+ month: "month";
77
+ year: "year";
78
+ }>;
79
+ paymentMethod: import("@metamask/superstruct").Struct<{
80
+ type: "card";
81
+ card: {
82
+ brand: string;
83
+ displayBrand: string;
84
+ last4: string;
85
+ };
86
+ } | {
87
+ type: "crypto";
88
+ crypto: {
89
+ chainId: `0x${string}`;
90
+ payerAddress: `0x${string}`;
91
+ tokenSymbol: string;
92
+ error?: "approval_transaction_too_old" | "approval_transaction_reverted" | "approval_transaction_max_verification_attempts_reached" | "insufficient_balance" | "insufficient_allowance" | undefined;
93
+ };
94
+ }, 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", {
101
+ allowed_immediate: "allowed_immediate";
102
+ allowed_at_period_end: "allowed_at_period_end";
103
+ not_allowed: "not_allowed";
104
+ not_allowed_pending_verification: "not_allowed_pending_verification";
105
+ }>;
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
+ }>;
110
+ export declare const GetSubscriptionsResponseStruct: import("@metamask/superstruct").Struct<{
111
+ subscriptions: {
112
+ id: string;
113
+ products: {
114
+ name: "shield";
115
+ currency: "usd";
116
+ unitAmount: number;
117
+ unitDecimals: number;
118
+ }[];
119
+ currentPeriodStart: string;
120
+ currentPeriodEnd: string;
121
+ status: "incomplete" | "incomplete_expired" | "provisional" | "trialing" | "active" | "past_due" | "unpaid" | "canceled" | "paused";
122
+ interval: "month" | "year";
123
+ paymentMethod: {
124
+ type: "card";
125
+ card: {
126
+ brand: string;
127
+ displayBrand: string;
128
+ last4: string;
129
+ };
130
+ } | {
131
+ type: "crypto";
132
+ crypto: {
133
+ chainId: `0x${string}`;
134
+ payerAddress: `0x${string}`;
135
+ tokenSymbol: string;
136
+ error?: "approval_transaction_too_old" | "approval_transaction_reverted" | "approval_transaction_max_verification_attempts_reached" | "insufficient_balance" | "insufficient_allowance" | undefined;
137
+ };
138
+ };
139
+ cancelType: "allowed_immediate" | "allowed_at_period_end" | "not_allowed" | "not_allowed_pending_verification";
140
+ isEligibleForSupport: boolean;
141
+ billingCycles?: number | undefined;
142
+ cancelAtPeriodEnd?: boolean | undefined;
143
+ trialPeriodDays?: number | undefined;
144
+ trialStart?: string | undefined;
145
+ trialEnd?: string | undefined;
146
+ endDate?: string | undefined;
147
+ canceledAt?: string | undefined;
148
+ inactiveAt?: string | undefined;
149
+ }[];
150
+ trialedProducts: "shield"[];
151
+ customerId?: string | undefined;
152
+ lastSubscription?: {
153
+ id: string;
154
+ products: {
155
+ name: "shield";
156
+ currency: "usd";
157
+ unitAmount: number;
158
+ unitDecimals: number;
159
+ }[];
160
+ currentPeriodStart: string;
161
+ currentPeriodEnd: string;
162
+ status: "incomplete" | "incomplete_expired" | "provisional" | "trialing" | "active" | "past_due" | "unpaid" | "canceled" | "paused";
163
+ interval: "month" | "year";
164
+ paymentMethod: {
165
+ type: "card";
166
+ card: {
167
+ brand: string;
168
+ displayBrand: string;
169
+ last4: string;
170
+ };
171
+ } | {
172
+ type: "crypto";
173
+ crypto: {
174
+ chainId: `0x${string}`;
175
+ payerAddress: `0x${string}`;
176
+ tokenSymbol: string;
177
+ error?: "approval_transaction_too_old" | "approval_transaction_reverted" | "approval_transaction_max_verification_attempts_reached" | "insufficient_balance" | "insufficient_allowance" | undefined;
178
+ };
179
+ };
180
+ cancelType: "allowed_immediate" | "allowed_at_period_end" | "not_allowed" | "not_allowed_pending_verification";
181
+ isEligibleForSupport: boolean;
182
+ billingCycles?: number | undefined;
183
+ cancelAtPeriodEnd?: boolean | undefined;
184
+ trialPeriodDays?: number | undefined;
185
+ trialStart?: string | undefined;
186
+ trialEnd?: string | undefined;
187
+ endDate?: string | undefined;
188
+ canceledAt?: string | undefined;
189
+ inactiveAt?: string | undefined;
190
+ } | undefined;
191
+ rewardAccountId?: `${string}:${string}:${string}` | undefined;
192
+ }, {
193
+ customerId: import("@metamask/superstruct").Struct<string | undefined, null>;
194
+ subscriptions: import("@metamask/superstruct").Struct<{
195
+ id: string;
196
+ products: {
197
+ name: "shield";
198
+ currency: "usd";
199
+ unitAmount: number;
200
+ unitDecimals: number;
201
+ }[];
202
+ currentPeriodStart: string;
203
+ currentPeriodEnd: string;
204
+ status: "incomplete" | "incomplete_expired" | "provisional" | "trialing" | "active" | "past_due" | "unpaid" | "canceled" | "paused";
205
+ interval: "month" | "year";
206
+ paymentMethod: {
207
+ type: "card";
208
+ card: {
209
+ brand: string;
210
+ displayBrand: string;
211
+ last4: string;
212
+ };
213
+ } | {
214
+ type: "crypto";
215
+ crypto: {
216
+ chainId: `0x${string}`;
217
+ payerAddress: `0x${string}`;
218
+ tokenSymbol: string;
219
+ error?: "approval_transaction_too_old" | "approval_transaction_reverted" | "approval_transaction_max_verification_attempts_reached" | "insufficient_balance" | "insufficient_allowance" | undefined;
220
+ };
221
+ };
222
+ cancelType: "allowed_immediate" | "allowed_at_period_end" | "not_allowed" | "not_allowed_pending_verification";
223
+ isEligibleForSupport: boolean;
224
+ billingCycles?: number | undefined;
225
+ cancelAtPeriodEnd?: boolean | undefined;
226
+ trialPeriodDays?: number | undefined;
227
+ trialStart?: string | undefined;
228
+ trialEnd?: string | undefined;
229
+ endDate?: string | undefined;
230
+ canceledAt?: string | undefined;
231
+ inactiveAt?: string | undefined;
232
+ }[], import("@metamask/superstruct").Struct<{
233
+ id: string;
234
+ products: {
235
+ name: "shield";
236
+ currency: "usd";
237
+ unitAmount: number;
238
+ unitDecimals: number;
239
+ }[];
240
+ currentPeriodStart: string;
241
+ currentPeriodEnd: string;
242
+ status: "incomplete" | "incomplete_expired" | "provisional" | "trialing" | "active" | "past_due" | "unpaid" | "canceled" | "paused";
243
+ interval: "month" | "year";
244
+ paymentMethod: {
245
+ type: "card";
246
+ card: {
247
+ brand: string;
248
+ displayBrand: string;
249
+ last4: string;
250
+ };
251
+ } | {
252
+ type: "crypto";
253
+ crypto: {
254
+ chainId: `0x${string}`;
255
+ payerAddress: `0x${string}`;
256
+ tokenSymbol: string;
257
+ error?: "approval_transaction_too_old" | "approval_transaction_reverted" | "approval_transaction_max_verification_attempts_reached" | "insufficient_balance" | "insufficient_allowance" | undefined;
258
+ };
259
+ };
260
+ cancelType: "allowed_immediate" | "allowed_at_period_end" | "not_allowed" | "not_allowed_pending_verification";
261
+ isEligibleForSupport: boolean;
262
+ billingCycles?: number | undefined;
263
+ cancelAtPeriodEnd?: boolean | undefined;
264
+ trialPeriodDays?: number | undefined;
265
+ trialStart?: string | undefined;
266
+ trialEnd?: string | undefined;
267
+ endDate?: string | undefined;
268
+ canceledAt?: string | undefined;
269
+ inactiveAt?: string | undefined;
270
+ }, {
271
+ id: import("@metamask/superstruct").Struct<string, null>;
272
+ products: import("@metamask/superstruct").Struct<{
273
+ name: "shield";
274
+ currency: "usd";
275
+ unitAmount: number;
276
+ unitDecimals: number;
277
+ }[], import("@metamask/superstruct").Struct<{
278
+ name: "shield";
279
+ currency: "usd";
280
+ unitAmount: number;
281
+ unitDecimals: number;
282
+ }, {
283
+ name: import("@metamask/superstruct").Struct<"shield", {
284
+ shield: "shield";
285
+ }>;
286
+ currency: import("@metamask/superstruct").Struct<"usd", {
287
+ usd: "usd";
288
+ }>;
289
+ unitAmount: import("@metamask/superstruct").Struct<number, null>;
290
+ unitDecimals: import("@metamask/superstruct").Struct<number, null>;
291
+ }>>;
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
+ incomplete: "incomplete";
297
+ incomplete_expired: "incomplete_expired";
298
+ provisional: "provisional";
299
+ trialing: "trialing";
300
+ active: "active";
301
+ past_due: "past_due";
302
+ unpaid: "unpaid";
303
+ canceled: "canceled";
304
+ paused: "paused";
305
+ }>;
306
+ interval: import("@metamask/superstruct").Struct<"month" | "year", {
307
+ month: "month";
308
+ year: "year";
309
+ }>;
310
+ paymentMethod: import("@metamask/superstruct").Struct<{
311
+ type: "card";
312
+ card: {
313
+ brand: string;
314
+ displayBrand: string;
315
+ last4: string;
316
+ };
317
+ } | {
318
+ type: "crypto";
319
+ crypto: {
320
+ chainId: `0x${string}`;
321
+ payerAddress: `0x${string}`;
322
+ tokenSymbol: string;
323
+ error?: "approval_transaction_too_old" | "approval_transaction_reverted" | "approval_transaction_max_verification_attempts_reached" | "insufficient_balance" | "insufficient_allowance" | undefined;
324
+ };
325
+ }, 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", {
332
+ allowed_immediate: "allowed_immediate";
333
+ allowed_at_period_end: "allowed_at_period_end";
334
+ not_allowed: "not_allowed";
335
+ not_allowed_pending_verification: "not_allowed_pending_verification";
336
+ }>;
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>;
340
+ }>>;
341
+ trialedProducts: import("@metamask/superstruct").Struct<"shield"[], import("@metamask/superstruct").Struct<"shield", {
342
+ shield: "shield";
343
+ }>>;
344
+ lastSubscription: import("@metamask/superstruct").Struct<{
345
+ id: string;
346
+ products: {
347
+ name: "shield";
348
+ currency: "usd";
349
+ unitAmount: number;
350
+ unitDecimals: number;
351
+ }[];
352
+ currentPeriodStart: string;
353
+ currentPeriodEnd: string;
354
+ status: "incomplete" | "incomplete_expired" | "provisional" | "trialing" | "active" | "past_due" | "unpaid" | "canceled" | "paused";
355
+ interval: "month" | "year";
356
+ paymentMethod: {
357
+ type: "card";
358
+ card: {
359
+ brand: string;
360
+ displayBrand: string;
361
+ last4: string;
362
+ };
363
+ } | {
364
+ type: "crypto";
365
+ crypto: {
366
+ chainId: `0x${string}`;
367
+ payerAddress: `0x${string}`;
368
+ tokenSymbol: string;
369
+ error?: "approval_transaction_too_old" | "approval_transaction_reverted" | "approval_transaction_max_verification_attempts_reached" | "insufficient_balance" | "insufficient_allowance" | undefined;
370
+ };
371
+ };
372
+ cancelType: "allowed_immediate" | "allowed_at_period_end" | "not_allowed" | "not_allowed_pending_verification";
373
+ isEligibleForSupport: boolean;
374
+ billingCycles?: number | undefined;
375
+ cancelAtPeriodEnd?: boolean | undefined;
376
+ trialPeriodDays?: number | undefined;
377
+ trialStart?: string | undefined;
378
+ trialEnd?: string | undefined;
379
+ endDate?: string | undefined;
380
+ canceledAt?: string | undefined;
381
+ inactiveAt?: string | undefined;
382
+ } | undefined, {
383
+ id: import("@metamask/superstruct").Struct<string, null>;
384
+ products: import("@metamask/superstruct").Struct<{
385
+ name: "shield";
386
+ currency: "usd";
387
+ unitAmount: number;
388
+ unitDecimals: number;
389
+ }[], import("@metamask/superstruct").Struct<{
390
+ name: "shield";
391
+ currency: "usd";
392
+ unitAmount: number;
393
+ unitDecimals: number;
394
+ }, {
395
+ name: import("@metamask/superstruct").Struct<"shield", {
396
+ shield: "shield";
397
+ }>;
398
+ currency: import("@metamask/superstruct").Struct<"usd", {
399
+ usd: "usd";
400
+ }>;
401
+ unitAmount: import("@metamask/superstruct").Struct<number, null>;
402
+ unitDecimals: import("@metamask/superstruct").Struct<number, null>;
403
+ }>>;
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", {
408
+ incomplete: "incomplete";
409
+ incomplete_expired: "incomplete_expired";
410
+ provisional: "provisional";
411
+ trialing: "trialing";
412
+ active: "active";
413
+ past_due: "past_due";
414
+ unpaid: "unpaid";
415
+ canceled: "canceled";
416
+ paused: "paused";
417
+ }>;
418
+ interval: import("@metamask/superstruct").Struct<"month" | "year", {
419
+ month: "month";
420
+ year: "year";
421
+ }>;
422
+ paymentMethod: import("@metamask/superstruct").Struct<{
423
+ type: "card";
424
+ card: {
425
+ brand: string;
426
+ displayBrand: string;
427
+ last4: string;
428
+ };
429
+ } | {
430
+ type: "crypto";
431
+ crypto: {
432
+ chainId: `0x${string}`;
433
+ payerAddress: `0x${string}`;
434
+ tokenSymbol: string;
435
+ error?: "approval_transaction_too_old" | "approval_transaction_reverted" | "approval_transaction_max_verification_attempts_reached" | "insufficient_balance" | "insufficient_allowance" | undefined;
436
+ };
437
+ }, 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
+ allowed_immediate: "allowed_immediate";
445
+ allowed_at_period_end: "allowed_at_period_end";
446
+ not_allowed: "not_allowed";
447
+ not_allowed_pending_verification: "not_allowed_pending_verification";
448
+ }>;
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>;
452
+ }>;
453
+ rewardAccountId: import("@metamask/superstruct").Struct<`${string}:${string}:${string}` | undefined, null>;
454
+ }>;
455
+ export declare const StartSubscriptionResponseStruct: import("@metamask/superstruct").Struct<{
456
+ checkoutSessionUrl: string;
457
+ }, {
458
+ checkoutSessionUrl: import("@metamask/superstruct").Struct<string, null>;
459
+ }>;
460
+ export declare const StartCryptoSubscriptionResponseStruct: import("@metamask/superstruct").Struct<{
461
+ status: "incomplete" | "incomplete_expired" | "provisional" | "trialing" | "active" | "past_due" | "unpaid" | "canceled" | "paused";
462
+ subscriptionId: string;
463
+ }, {
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", {
466
+ incomplete: "incomplete";
467
+ incomplete_expired: "incomplete_expired";
468
+ provisional: "provisional";
469
+ trialing: "trialing";
470
+ active: "active";
471
+ past_due: "past_due";
472
+ unpaid: "unpaid";
473
+ canceled: "canceled";
474
+ paused: "paused";
475
+ }>;
476
+ }>;
477
+ export declare const UpdatePaymentMethodCardResponseStruct: import("@metamask/superstruct").Struct<{
478
+ redirectUrl: string;
479
+ }, {
480
+ redirectUrl: import("@metamask/superstruct").Struct<string, null>;
481
+ }>;
482
+ export declare const BillingPortalResponseStruct: import("@metamask/superstruct").Struct<{
483
+ url: string;
484
+ }, {
485
+ url: import("@metamask/superstruct").Struct<string, null>;
486
+ }>;
487
+ export declare const SubscriptionApiGeneralResponseStruct: import("@metamask/superstruct").Struct<{
488
+ success: boolean;
489
+ message?: string | undefined;
490
+ }, {
491
+ success: import("@metamask/superstruct").Struct<boolean, null>;
492
+ message: import("@metamask/superstruct").Struct<string | undefined, null>;
493
+ }>;
494
+ export declare const PricingResponseStruct: import("@metamask/superstruct").Struct<{
495
+ products: {
496
+ name: "shield";
497
+ prices: {
498
+ currency: "usd";
499
+ unitAmount: number;
500
+ unitDecimals: number;
501
+ interval: "month" | "year";
502
+ trialPeriodDays: number;
503
+ minBillingCycles: number;
504
+ minBillingCyclesForBalance: number;
505
+ }[];
506
+ }[];
507
+ paymentMethods: {
508
+ type: "card" | "crypto";
509
+ chains?: {
510
+ chainId: `0x${string}`;
511
+ paymentAddress: `0x${string}`;
512
+ tokens: {
513
+ symbol: string;
514
+ address: `0x${string}`;
515
+ decimals: number;
516
+ conversionRate: {
517
+ usd: string;
518
+ };
519
+ }[];
520
+ isSponsorshipSupported?: boolean | undefined;
521
+ }[] | undefined;
522
+ }[];
523
+ }, {
524
+ products: import("@metamask/superstruct").Struct<{
525
+ name: "shield";
526
+ prices: {
527
+ currency: "usd";
528
+ unitAmount: number;
529
+ unitDecimals: number;
530
+ interval: "month" | "year";
531
+ trialPeriodDays: number;
532
+ minBillingCycles: number;
533
+ minBillingCyclesForBalance: number;
534
+ }[];
535
+ }[], import("@metamask/superstruct").Struct<{
536
+ name: "shield";
537
+ prices: {
538
+ currency: "usd";
539
+ unitAmount: number;
540
+ unitDecimals: number;
541
+ interval: "month" | "year";
542
+ trialPeriodDays: number;
543
+ minBillingCycles: number;
544
+ minBillingCyclesForBalance: number;
545
+ }[];
546
+ }, {
547
+ name: import("@metamask/superstruct").Struct<"shield", {
548
+ shield: "shield";
549
+ }>;
550
+ prices: import("@metamask/superstruct").Struct<{
551
+ currency: "usd";
552
+ unitAmount: number;
553
+ unitDecimals: number;
554
+ interval: "month" | "year";
555
+ trialPeriodDays: number;
556
+ minBillingCycles: number;
557
+ minBillingCyclesForBalance: number;
558
+ }[], import("@metamask/superstruct").Struct<{
559
+ currency: "usd";
560
+ unitAmount: number;
561
+ unitDecimals: number;
562
+ interval: "month" | "year";
563
+ trialPeriodDays: number;
564
+ minBillingCycles: number;
565
+ minBillingCyclesForBalance: number;
566
+ }, {
567
+ interval: import("@metamask/superstruct").Struct<"month" | "year", {
568
+ month: "month";
569
+ year: "year";
570
+ }>;
571
+ unitAmount: import("@metamask/superstruct").Struct<number, null>;
572
+ unitDecimals: import("@metamask/superstruct").Struct<number, null>;
573
+ currency: import("@metamask/superstruct").Struct<"usd", {
574
+ usd: "usd";
575
+ }>;
576
+ trialPeriodDays: import("@metamask/superstruct").Struct<number, null>;
577
+ minBillingCycles: import("@metamask/superstruct").Struct<number, null>;
578
+ minBillingCyclesForBalance: import("@metamask/superstruct").Struct<number, null>;
579
+ }>>;
580
+ }>>;
581
+ paymentMethods: import("@metamask/superstruct").Struct<{
582
+ type: "card" | "crypto";
583
+ chains?: {
584
+ chainId: `0x${string}`;
585
+ paymentAddress: `0x${string}`;
586
+ tokens: {
587
+ symbol: string;
588
+ address: `0x${string}`;
589
+ decimals: number;
590
+ conversionRate: {
591
+ usd: string;
592
+ };
593
+ }[];
594
+ isSponsorshipSupported?: boolean | undefined;
595
+ }[] | undefined;
596
+ }[], import("@metamask/superstruct").Struct<{
597
+ type: "card" | "crypto";
598
+ chains?: {
599
+ chainId: `0x${string}`;
600
+ paymentAddress: `0x${string}`;
601
+ tokens: {
602
+ symbol: string;
603
+ address: `0x${string}`;
604
+ decimals: number;
605
+ conversionRate: {
606
+ usd: string;
607
+ };
608
+ }[];
609
+ isSponsorshipSupported?: boolean | undefined;
610
+ }[] | 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
+ }>>;
670
+ }>;
671
+ export declare const SubscriptionEligibilityStruct: import("@metamask/superstruct").Struct<{
672
+ product: "shield";
673
+ canSubscribe?: boolean | undefined;
674
+ canViewEntryModal?: boolean | undefined;
675
+ modalType?: "A" | "B" | undefined;
676
+ cohorts?: {
677
+ cohort: string;
678
+ eligibilityRate: number;
679
+ priority: number;
680
+ eligible: boolean;
681
+ }[] | undefined;
682
+ assignedCohort?: string | null | undefined;
683
+ assignedAt?: string | undefined;
684
+ hasAssignedCohortExpired?: boolean | undefined;
685
+ }, {
686
+ product: import("@metamask/superstruct").Struct<"shield", {
687
+ shield: "shield";
688
+ }>;
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, {
692
+ A: "A";
693
+ B: "B";
694
+ }>;
695
+ cohorts: import("@metamask/superstruct").Struct<{
696
+ cohort: string;
697
+ eligibilityRate: number;
698
+ priority: number;
699
+ eligible: boolean;
700
+ }[] | undefined, import("@metamask/superstruct").Struct<{
701
+ cohort: string;
702
+ eligibilityRate: number;
703
+ priority: number;
704
+ eligible: boolean;
705
+ }, {
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>;
710
+ }>>;
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>;
714
+ }>;
715
+ export declare const SubscriptionEligibilityArrayStruct: import("@metamask/superstruct").Struct<{
716
+ product: "shield";
717
+ canSubscribe?: boolean | undefined;
718
+ canViewEntryModal?: boolean | undefined;
719
+ modalType?: "A" | "B" | undefined;
720
+ cohorts?: {
721
+ cohort: string;
722
+ eligibilityRate: number;
723
+ priority: number;
724
+ eligible: boolean;
725
+ }[] | undefined;
726
+ assignedCohort?: string | null | undefined;
727
+ assignedAt?: string | undefined;
728
+ hasAssignedCohortExpired?: boolean | undefined;
729
+ }[], import("@metamask/superstruct").Struct<{
730
+ product: "shield";
731
+ canSubscribe?: boolean | undefined;
732
+ canViewEntryModal?: boolean | undefined;
733
+ modalType?: "A" | "B" | undefined;
734
+ cohorts?: {
735
+ cohort: string;
736
+ eligibilityRate: number;
737
+ priority: number;
738
+ eligible: boolean;
739
+ }[] | undefined;
740
+ assignedCohort?: string | null | undefined;
741
+ assignedAt?: string | undefined;
742
+ hasAssignedCohortExpired?: boolean | undefined;
743
+ }, {
744
+ product: import("@metamask/superstruct").Struct<"shield", {
745
+ shield: "shield";
746
+ }>;
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, {
750
+ A: "A";
751
+ B: "B";
752
+ }>;
753
+ cohorts: import("@metamask/superstruct").Struct<{
754
+ cohort: string;
755
+ eligibilityRate: number;
756
+ priority: number;
757
+ eligible: boolean;
758
+ }[] | undefined, import("@metamask/superstruct").Struct<{
759
+ cohort: string;
760
+ eligibilityRate: number;
761
+ priority: number;
762
+ eligible: boolean;
763
+ }, {
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>;
768
+ }>>;
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>;
772
+ }>>;
773
+ //# sourceMappingURL=SubscriptionService-structs.d.mts.map