@metamask-previews/subscription-controller 8.0.1-preview-3866c0ff1 → 8.0.1-preview-e3275932a

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 (104) hide show
  1. package/CHANGELOG.md +0 -1
  2. package/dist/SubscriptionController-method-action-types.cjs +7 -0
  3. package/dist/SubscriptionController-method-action-types.cjs.map +1 -0
  4. package/dist/{SubscriptionController-method-action-types.d.ts → SubscriptionController-method-action-types.d.cts} +2 -2
  5. package/dist/SubscriptionController-method-action-types.d.cts.map +1 -0
  6. package/dist/SubscriptionController-method-action-types.d.mts +250 -0
  7. package/dist/SubscriptionController-method-action-types.d.mts.map +1 -0
  8. package/dist/{SubscriptionController-method-action-types.js → SubscriptionController-method-action-types.mjs} +1 -1
  9. package/dist/SubscriptionController-method-action-types.mjs.map +1 -0
  10. package/dist/SubscriptionController.cjs +744 -0
  11. package/dist/SubscriptionController.cjs.map +1 -0
  12. package/dist/{SubscriptionController.d.ts → SubscriptionController.d.cts} +18 -18
  13. package/dist/SubscriptionController.d.cts.map +1 -0
  14. package/dist/SubscriptionController.d.mts +258 -0
  15. package/dist/SubscriptionController.d.mts.map +1 -0
  16. package/dist/{SubscriptionController.js → SubscriptionController.mjs} +180 -262
  17. package/dist/SubscriptionController.mjs.map +1 -0
  18. package/dist/SubscriptionService-method-action-types.cjs +7 -0
  19. package/dist/SubscriptionService-method-action-types.cjs.map +1 -0
  20. package/dist/{SubscriptionService-method-action-types.d.ts → SubscriptionService-method-action-types.d.cts} +2 -2
  21. package/dist/SubscriptionService-method-action-types.d.cts.map +1 -0
  22. package/dist/SubscriptionService-method-action-types.d.mts +155 -0
  23. package/dist/SubscriptionService-method-action-types.d.mts.map +1 -0
  24. package/dist/{SubscriptionService-method-action-types.js → SubscriptionService-method-action-types.mjs} +1 -1
  25. package/dist/SubscriptionService-method-action-types.mjs.map +1 -0
  26. package/dist/SubscriptionService-structs.cjs +158 -0
  27. package/dist/SubscriptionService-structs.cjs.map +1 -0
  28. package/dist/{SubscriptionService-structs.d.ts → SubscriptionService-structs.d.cts} +134 -134
  29. package/dist/SubscriptionService-structs.d.cts.map +1 -0
  30. package/dist/SubscriptionService-structs.d.mts +721 -0
  31. package/dist/SubscriptionService-structs.d.mts.map +1 -0
  32. package/dist/{SubscriptionService-structs.js → SubscriptionService-structs.mjs} +4 -4
  33. package/dist/SubscriptionService-structs.mjs.map +1 -0
  34. package/dist/SubscriptionService.cjs +477 -0
  35. package/dist/SubscriptionService.cjs.map +1 -0
  36. package/dist/{SubscriptionService.d.ts → SubscriptionService.d.cts} +10 -10
  37. package/dist/SubscriptionService.d.cts.map +1 -0
  38. package/dist/SubscriptionService.d.mts +149 -0
  39. package/dist/SubscriptionService.d.mts.map +1 -0
  40. package/dist/{SubscriptionService.js → SubscriptionService.mjs} +141 -139
  41. package/dist/SubscriptionService.mjs.map +1 -0
  42. package/dist/constants.cjs +73 -0
  43. package/dist/constants.cjs.map +1 -0
  44. package/dist/{constants.d.ts → constants.d.cts} +1 -1
  45. package/dist/constants.d.cts.map +1 -0
  46. package/dist/constants.d.mts +49 -0
  47. package/dist/constants.d.mts.map +1 -0
  48. package/dist/{constants.js → constants.mjs} +3 -3
  49. package/dist/constants.mjs.map +1 -0
  50. package/dist/errors.cjs +72 -0
  51. package/dist/errors.cjs.map +1 -0
  52. package/dist/{errors.d.ts → errors.d.cts} +2 -2
  53. package/dist/errors.d.cts.map +1 -0
  54. package/dist/errors.d.mts +34 -0
  55. package/dist/errors.d.mts.map +1 -0
  56. package/dist/{errors.js → errors.mjs} +1 -5
  57. package/dist/errors.mjs.map +1 -0
  58. package/dist/index.cjs +29 -0
  59. package/dist/index.cjs.map +1 -0
  60. package/dist/{index.d.ts → index.d.cts} +11 -11
  61. package/dist/index.d.cts.map +1 -0
  62. package/dist/index.d.mts +11 -0
  63. package/dist/index.d.mts.map +1 -0
  64. package/dist/{index.js → index.mjs} +6 -6
  65. package/dist/index.mjs.map +1 -0
  66. package/dist/logger.cjs +8 -0
  67. package/dist/logger.cjs.map +1 -0
  68. package/dist/logger.d.cts +5 -0
  69. package/dist/logger.d.cts.map +1 -0
  70. package/dist/logger.d.mts +5 -0
  71. package/dist/logger.d.mts.map +1 -0
  72. package/dist/logger.mjs +5 -0
  73. package/dist/logger.mjs.map +1 -0
  74. package/dist/types.cjs +90 -0
  75. package/dist/types.cjs.map +1 -0
  76. package/dist/{types.d.ts → types.d.cts} +41 -41
  77. package/dist/types.d.cts.map +1 -0
  78. package/dist/types.d.mts +574 -0
  79. package/dist/types.d.mts.map +1 -0
  80. package/dist/{types.js → types.mjs} +1 -1
  81. package/dist/types.mjs.map +1 -0
  82. package/package.json +16 -12
  83. package/dist/SubscriptionController-method-action-types.d.ts.map +0 -1
  84. package/dist/SubscriptionController-method-action-types.js.map +0 -1
  85. package/dist/SubscriptionController.d.ts.map +0 -1
  86. package/dist/SubscriptionController.js.map +0 -1
  87. package/dist/SubscriptionService-method-action-types.d.ts.map +0 -1
  88. package/dist/SubscriptionService-method-action-types.js.map +0 -1
  89. package/dist/SubscriptionService-structs.d.ts.map +0 -1
  90. package/dist/SubscriptionService-structs.js.map +0 -1
  91. package/dist/SubscriptionService.d.ts.map +0 -1
  92. package/dist/SubscriptionService.js.map +0 -1
  93. package/dist/constants.d.ts.map +0 -1
  94. package/dist/constants.js.map +0 -1
  95. package/dist/errors.d.ts.map +0 -1
  96. package/dist/errors.js.map +0 -1
  97. package/dist/index.d.ts.map +0 -1
  98. package/dist/index.js.map +0 -1
  99. package/dist/logger.d.ts +0 -4
  100. package/dist/logger.d.ts.map +0 -1
  101. package/dist/logger.js +0 -5
  102. package/dist/logger.js.map +0 -1
  103. package/dist/types.d.ts.map +0 -1
  104. package/dist/types.js.map +0 -1
@@ -1,17 +1,16 @@
1
- import type { Struct } from '@metamask/superstruct';
2
- import type { TokenPaymentInfo } from './types.js';
1
+ import type { Struct } from "@metamask/superstruct";
2
+ import type { TokenPaymentInfo } from "./types.cjs";
3
3
  export declare const SubscriptionStruct: Struct<{
4
4
  id: string;
5
5
  products: {
6
- name: "money_account_plus" | "shield";
6
+ name: "shield" | "money_account_plus";
7
7
  currency: "usd";
8
8
  unitAmount: number;
9
9
  unitDecimals: number;
10
10
  }[];
11
11
  currentPeriodStart: string;
12
12
  currentPeriodEnd: string;
13
- cancelAtPeriodEnd?: boolean | undefined;
14
- status: "active" | "canceled" | "incomplete" | "incomplete_expired" | "past_due" | "paused" | "provisional" | "trialing" | "unpaid";
13
+ status: "incomplete" | "incomplete_expired" | "provisional" | "trialing" | "active" | "past_due" | "unpaid" | "canceled" | "paused";
15
14
  interval: "month" | "year";
16
15
  paymentMethod: {
17
16
  type: "card";
@@ -23,37 +22,38 @@ export declare const SubscriptionStruct: Struct<{
23
22
  } | {
24
23
  type: "crypto";
25
24
  crypto: {
26
- payerAddress: `0x${string}`;
27
25
  chainId: `0x${string}`;
26
+ payerAddress: `0x${string}`;
28
27
  tokenSymbol: string;
29
- error?: "approval_transaction_max_verification_attempts_reached" | "approval_transaction_reverted" | "approval_transaction_too_old" | "insufficient_allowance" | "insufficient_balance" | undefined;
28
+ error?: "approval_transaction_too_old" | "approval_transaction_reverted" | "approval_transaction_max_verification_attempts_reached" | "insufficient_balance" | "insufficient_allowance" | undefined;
30
29
  };
31
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;
32
35
  trialPeriodDays?: number | undefined;
33
36
  trialStart?: string | undefined;
34
37
  trialEnd?: string | undefined;
35
38
  endDate?: string | undefined;
36
39
  canceledAt?: string | undefined;
37
- cancelType: "allowed_at_period_end" | "allowed_immediate" | "not_allowed" | "not_allowed_pending_verification";
38
40
  inactiveAt?: string | undefined;
39
- isEligibleForSupport: boolean;
40
- billingCycles?: number | undefined;
41
41
  }, {
42
42
  id: Struct<string, null>;
43
43
  products: Struct<{
44
- name: "money_account_plus" | "shield";
44
+ name: "shield" | "money_account_plus";
45
45
  currency: "usd";
46
46
  unitAmount: number;
47
47
  unitDecimals: number;
48
48
  }[], Struct<{
49
- name: "money_account_plus" | "shield";
49
+ name: "shield" | "money_account_plus";
50
50
  currency: "usd";
51
51
  unitAmount: number;
52
52
  unitDecimals: number;
53
53
  }, {
54
- name: Struct<"money_account_plus" | "shield", {
55
- money_account_plus: "money_account_plus";
54
+ name: Struct<"shield" | "money_account_plus", {
56
55
  shield: "shield";
56
+ money_account_plus: "money_account_plus";
57
57
  }>;
58
58
  currency: Struct<"usd", {
59
59
  usd: "usd";
@@ -64,16 +64,16 @@ export declare const SubscriptionStruct: Struct<{
64
64
  currentPeriodStart: Struct<string, null>;
65
65
  currentPeriodEnd: Struct<string, null>;
66
66
  cancelAtPeriodEnd: Struct<boolean | undefined, null>;
67
- status: Struct<"active" | "canceled" | "incomplete" | "incomplete_expired" | "past_due" | "paused" | "provisional" | "trialing" | "unpaid", {
68
- active: "active";
69
- canceled: "canceled";
67
+ status: Struct<"incomplete" | "incomplete_expired" | "provisional" | "trialing" | "active" | "past_due" | "unpaid" | "canceled" | "paused", {
70
68
  incomplete: "incomplete";
71
69
  incomplete_expired: "incomplete_expired";
72
- past_due: "past_due";
73
- paused: "paused";
74
70
  provisional: "provisional";
75
71
  trialing: "trialing";
72
+ active: "active";
73
+ past_due: "past_due";
76
74
  unpaid: "unpaid";
75
+ canceled: "canceled";
76
+ paused: "paused";
77
77
  }>;
78
78
  interval: Struct<"month" | "year", {
79
79
  month: "month";
@@ -89,10 +89,10 @@ export declare const SubscriptionStruct: Struct<{
89
89
  } | {
90
90
  type: "crypto";
91
91
  crypto: {
92
- payerAddress: `0x${string}`;
93
92
  chainId: `0x${string}`;
93
+ payerAddress: `0x${string}`;
94
94
  tokenSymbol: string;
95
- error?: "approval_transaction_max_verification_attempts_reached" | "approval_transaction_reverted" | "approval_transaction_too_old" | "insufficient_allowance" | "insufficient_balance" | undefined;
95
+ error?: "approval_transaction_too_old" | "approval_transaction_reverted" | "approval_transaction_max_verification_attempts_reached" | "insufficient_balance" | "insufficient_allowance" | undefined;
96
96
  };
97
97
  }, null>;
98
98
  trialPeriodDays: Struct<number | undefined, null>;
@@ -100,9 +100,9 @@ export declare const SubscriptionStruct: Struct<{
100
100
  trialEnd: Struct<string | undefined, null>;
101
101
  endDate: Struct<string | undefined, null>;
102
102
  canceledAt: Struct<string | undefined, null>;
103
- cancelType: Struct<"allowed_at_period_end" | "allowed_immediate" | "not_allowed" | "not_allowed_pending_verification", {
104
- allowed_at_period_end: "allowed_at_period_end";
103
+ cancelType: Struct<"allowed_immediate" | "allowed_at_period_end" | "not_allowed" | "not_allowed_pending_verification", {
105
104
  allowed_immediate: "allowed_immediate";
105
+ allowed_at_period_end: "allowed_at_period_end";
106
106
  not_allowed: "not_allowed";
107
107
  not_allowed_pending_verification: "not_allowed_pending_verification";
108
108
  }>;
@@ -111,19 +111,17 @@ export declare const SubscriptionStruct: Struct<{
111
111
  billingCycles: Struct<number | undefined, null>;
112
112
  }>;
113
113
  export declare const GetSubscriptionsResponseStruct: Struct<{
114
- customerId?: string | undefined;
115
114
  subscriptions: {
116
115
  id: string;
117
116
  products: {
118
- name: "money_account_plus" | "shield";
117
+ name: "shield" | "money_account_plus";
119
118
  currency: "usd";
120
119
  unitAmount: number;
121
120
  unitDecimals: number;
122
121
  }[];
123
122
  currentPeriodStart: string;
124
123
  currentPeriodEnd: string;
125
- cancelAtPeriodEnd?: boolean | undefined;
126
- status: "active" | "canceled" | "incomplete" | "incomplete_expired" | "past_due" | "paused" | "provisional" | "trialing" | "unpaid";
124
+ status: "incomplete" | "incomplete_expired" | "provisional" | "trialing" | "active" | "past_due" | "unpaid" | "canceled" | "paused";
127
125
  interval: "month" | "year";
128
126
  paymentMethod: {
129
127
  type: "card";
@@ -135,35 +133,36 @@ export declare const GetSubscriptionsResponseStruct: Struct<{
135
133
  } | {
136
134
  type: "crypto";
137
135
  crypto: {
138
- payerAddress: `0x${string}`;
139
136
  chainId: `0x${string}`;
137
+ payerAddress: `0x${string}`;
140
138
  tokenSymbol: string;
141
- error?: "approval_transaction_max_verification_attempts_reached" | "approval_transaction_reverted" | "approval_transaction_too_old" | "insufficient_allowance" | "insufficient_balance" | undefined;
139
+ error?: "approval_transaction_too_old" | "approval_transaction_reverted" | "approval_transaction_max_verification_attempts_reached" | "insufficient_balance" | "insufficient_allowance" | undefined;
142
140
  };
143
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;
144
146
  trialPeriodDays?: number | undefined;
145
147
  trialStart?: string | undefined;
146
148
  trialEnd?: string | undefined;
147
149
  endDate?: string | undefined;
148
150
  canceledAt?: string | undefined;
149
- cancelType: "allowed_at_period_end" | "allowed_immediate" | "not_allowed" | "not_allowed_pending_verification";
150
151
  inactiveAt?: string | undefined;
151
- isEligibleForSupport: boolean;
152
- billingCycles?: number | undefined;
153
152
  }[];
154
- trialedProducts: ("money_account_plus" | "shield")[];
153
+ trialedProducts: ("shield" | "money_account_plus")[];
154
+ customerId?: string | undefined;
155
155
  lastSubscription?: {
156
156
  id: string;
157
157
  products: {
158
- name: "money_account_plus" | "shield";
158
+ name: "shield" | "money_account_plus";
159
159
  currency: "usd";
160
160
  unitAmount: number;
161
161
  unitDecimals: number;
162
162
  }[];
163
163
  currentPeriodStart: string;
164
164
  currentPeriodEnd: string;
165
- cancelAtPeriodEnd?: boolean | undefined;
166
- status: "active" | "canceled" | "incomplete" | "incomplete_expired" | "past_due" | "paused" | "provisional" | "trialing" | "unpaid";
165
+ status: "incomplete" | "incomplete_expired" | "provisional" | "trialing" | "active" | "past_due" | "unpaid" | "canceled" | "paused";
167
166
  interval: "month" | "year";
168
167
  paymentMethod: {
169
168
  type: "card";
@@ -175,21 +174,22 @@ export declare const GetSubscriptionsResponseStruct: Struct<{
175
174
  } | {
176
175
  type: "crypto";
177
176
  crypto: {
178
- payerAddress: `0x${string}`;
179
177
  chainId: `0x${string}`;
178
+ payerAddress: `0x${string}`;
180
179
  tokenSymbol: string;
181
- error?: "approval_transaction_max_verification_attempts_reached" | "approval_transaction_reverted" | "approval_transaction_too_old" | "insufficient_allowance" | "insufficient_balance" | undefined;
180
+ error?: "approval_transaction_too_old" | "approval_transaction_reverted" | "approval_transaction_max_verification_attempts_reached" | "insufficient_balance" | "insufficient_allowance" | undefined;
182
181
  };
183
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;
184
187
  trialPeriodDays?: number | undefined;
185
188
  trialStart?: string | undefined;
186
189
  trialEnd?: string | undefined;
187
190
  endDate?: string | undefined;
188
191
  canceledAt?: string | undefined;
189
- cancelType: "allowed_at_period_end" | "allowed_immediate" | "not_allowed" | "not_allowed_pending_verification";
190
192
  inactiveAt?: string | undefined;
191
- isEligibleForSupport: boolean;
192
- billingCycles?: number | undefined;
193
193
  } | undefined;
194
194
  rewardAccountId?: `${string}:${string}:${string}` | undefined;
195
195
  }, {
@@ -197,15 +197,14 @@ export declare const GetSubscriptionsResponseStruct: Struct<{
197
197
  subscriptions: Struct<{
198
198
  id: string;
199
199
  products: {
200
- name: "money_account_plus" | "shield";
200
+ name: "shield" | "money_account_plus";
201
201
  currency: "usd";
202
202
  unitAmount: number;
203
203
  unitDecimals: number;
204
204
  }[];
205
205
  currentPeriodStart: string;
206
206
  currentPeriodEnd: string;
207
- cancelAtPeriodEnd?: boolean | undefined;
208
- status: "active" | "canceled" | "incomplete" | "incomplete_expired" | "past_due" | "paused" | "provisional" | "trialing" | "unpaid";
207
+ status: "incomplete" | "incomplete_expired" | "provisional" | "trialing" | "active" | "past_due" | "unpaid" | "canceled" | "paused";
209
208
  interval: "month" | "year";
210
209
  paymentMethod: {
211
210
  type: "card";
@@ -217,33 +216,33 @@ export declare const GetSubscriptionsResponseStruct: Struct<{
217
216
  } | {
218
217
  type: "crypto";
219
218
  crypto: {
220
- payerAddress: `0x${string}`;
221
219
  chainId: `0x${string}`;
220
+ payerAddress: `0x${string}`;
222
221
  tokenSymbol: string;
223
- error?: "approval_transaction_max_verification_attempts_reached" | "approval_transaction_reverted" | "approval_transaction_too_old" | "insufficient_allowance" | "insufficient_balance" | undefined;
222
+ error?: "approval_transaction_too_old" | "approval_transaction_reverted" | "approval_transaction_max_verification_attempts_reached" | "insufficient_balance" | "insufficient_allowance" | undefined;
224
223
  };
225
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;
226
229
  trialPeriodDays?: number | undefined;
227
230
  trialStart?: string | undefined;
228
231
  trialEnd?: string | undefined;
229
232
  endDate?: string | undefined;
230
233
  canceledAt?: string | undefined;
231
- cancelType: "allowed_at_period_end" | "allowed_immediate" | "not_allowed" | "not_allowed_pending_verification";
232
234
  inactiveAt?: string | undefined;
233
- isEligibleForSupport: boolean;
234
- billingCycles?: number | undefined;
235
235
  }[], Struct<{
236
236
  id: string;
237
237
  products: {
238
- name: "money_account_plus" | "shield";
238
+ name: "shield" | "money_account_plus";
239
239
  currency: "usd";
240
240
  unitAmount: number;
241
241
  unitDecimals: number;
242
242
  }[];
243
243
  currentPeriodStart: string;
244
244
  currentPeriodEnd: string;
245
- cancelAtPeriodEnd?: boolean | undefined;
246
- status: "active" | "canceled" | "incomplete" | "incomplete_expired" | "past_due" | "paused" | "provisional" | "trialing" | "unpaid";
245
+ status: "incomplete" | "incomplete_expired" | "provisional" | "trialing" | "active" | "past_due" | "unpaid" | "canceled" | "paused";
247
246
  interval: "month" | "year";
248
247
  paymentMethod: {
249
248
  type: "card";
@@ -255,37 +254,38 @@ export declare const GetSubscriptionsResponseStruct: Struct<{
255
254
  } | {
256
255
  type: "crypto";
257
256
  crypto: {
258
- payerAddress: `0x${string}`;
259
257
  chainId: `0x${string}`;
258
+ payerAddress: `0x${string}`;
260
259
  tokenSymbol: string;
261
- error?: "approval_transaction_max_verification_attempts_reached" | "approval_transaction_reverted" | "approval_transaction_too_old" | "insufficient_allowance" | "insufficient_balance" | undefined;
260
+ error?: "approval_transaction_too_old" | "approval_transaction_reverted" | "approval_transaction_max_verification_attempts_reached" | "insufficient_balance" | "insufficient_allowance" | undefined;
262
261
  };
263
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;
264
267
  trialPeriodDays?: number | undefined;
265
268
  trialStart?: string | undefined;
266
269
  trialEnd?: string | undefined;
267
270
  endDate?: string | undefined;
268
271
  canceledAt?: string | undefined;
269
- cancelType: "allowed_at_period_end" | "allowed_immediate" | "not_allowed" | "not_allowed_pending_verification";
270
272
  inactiveAt?: string | undefined;
271
- isEligibleForSupport: boolean;
272
- billingCycles?: number | undefined;
273
273
  }, {
274
274
  id: Struct<string, null>;
275
275
  products: Struct<{
276
- name: "money_account_plus" | "shield";
276
+ name: "shield" | "money_account_plus";
277
277
  currency: "usd";
278
278
  unitAmount: number;
279
279
  unitDecimals: number;
280
280
  }[], Struct<{
281
- name: "money_account_plus" | "shield";
281
+ name: "shield" | "money_account_plus";
282
282
  currency: "usd";
283
283
  unitAmount: number;
284
284
  unitDecimals: number;
285
285
  }, {
286
- name: Struct<"money_account_plus" | "shield", {
287
- money_account_plus: "money_account_plus";
286
+ name: Struct<"shield" | "money_account_plus", {
288
287
  shield: "shield";
288
+ money_account_plus: "money_account_plus";
289
289
  }>;
290
290
  currency: Struct<"usd", {
291
291
  usd: "usd";
@@ -296,16 +296,16 @@ export declare const GetSubscriptionsResponseStruct: Struct<{
296
296
  currentPeriodStart: Struct<string, null>;
297
297
  currentPeriodEnd: Struct<string, null>;
298
298
  cancelAtPeriodEnd: Struct<boolean | undefined, null>;
299
- status: Struct<"active" | "canceled" | "incomplete" | "incomplete_expired" | "past_due" | "paused" | "provisional" | "trialing" | "unpaid", {
300
- active: "active";
301
- canceled: "canceled";
299
+ status: Struct<"incomplete" | "incomplete_expired" | "provisional" | "trialing" | "active" | "past_due" | "unpaid" | "canceled" | "paused", {
302
300
  incomplete: "incomplete";
303
301
  incomplete_expired: "incomplete_expired";
304
- past_due: "past_due";
305
- paused: "paused";
306
302
  provisional: "provisional";
307
303
  trialing: "trialing";
304
+ active: "active";
305
+ past_due: "past_due";
308
306
  unpaid: "unpaid";
307
+ canceled: "canceled";
308
+ paused: "paused";
309
309
  }>;
310
310
  interval: Struct<"month" | "year", {
311
311
  month: "month";
@@ -321,10 +321,10 @@ export declare const GetSubscriptionsResponseStruct: Struct<{
321
321
  } | {
322
322
  type: "crypto";
323
323
  crypto: {
324
- payerAddress: `0x${string}`;
325
324
  chainId: `0x${string}`;
325
+ payerAddress: `0x${string}`;
326
326
  tokenSymbol: string;
327
- error?: "approval_transaction_max_verification_attempts_reached" | "approval_transaction_reverted" | "approval_transaction_too_old" | "insufficient_allowance" | "insufficient_balance" | undefined;
327
+ error?: "approval_transaction_too_old" | "approval_transaction_reverted" | "approval_transaction_max_verification_attempts_reached" | "insufficient_balance" | "insufficient_allowance" | undefined;
328
328
  };
329
329
  }, null>;
330
330
  trialPeriodDays: Struct<number | undefined, null>;
@@ -332,9 +332,9 @@ export declare const GetSubscriptionsResponseStruct: Struct<{
332
332
  trialEnd: Struct<string | undefined, null>;
333
333
  endDate: Struct<string | undefined, null>;
334
334
  canceledAt: Struct<string | undefined, null>;
335
- cancelType: Struct<"allowed_at_period_end" | "allowed_immediate" | "not_allowed" | "not_allowed_pending_verification", {
336
- allowed_at_period_end: "allowed_at_period_end";
335
+ cancelType: Struct<"allowed_immediate" | "allowed_at_period_end" | "not_allowed" | "not_allowed_pending_verification", {
337
336
  allowed_immediate: "allowed_immediate";
337
+ allowed_at_period_end: "allowed_at_period_end";
338
338
  not_allowed: "not_allowed";
339
339
  not_allowed_pending_verification: "not_allowed_pending_verification";
340
340
  }>;
@@ -342,22 +342,21 @@ export declare const GetSubscriptionsResponseStruct: Struct<{
342
342
  isEligibleForSupport: Struct<boolean, null>;
343
343
  billingCycles: Struct<number | undefined, null>;
344
344
  }>>;
345
- trialedProducts: Struct<("money_account_plus" | "shield")[], Struct<"money_account_plus" | "shield", {
346
- money_account_plus: "money_account_plus";
345
+ trialedProducts: Struct<("shield" | "money_account_plus")[], Struct<"shield" | "money_account_plus", {
347
346
  shield: "shield";
347
+ money_account_plus: "money_account_plus";
348
348
  }>>;
349
349
  lastSubscription: Struct<{
350
350
  id: string;
351
351
  products: {
352
- name: "money_account_plus" | "shield";
352
+ name: "shield" | "money_account_plus";
353
353
  currency: "usd";
354
354
  unitAmount: number;
355
355
  unitDecimals: number;
356
356
  }[];
357
357
  currentPeriodStart: string;
358
358
  currentPeriodEnd: string;
359
- cancelAtPeriodEnd?: boolean | undefined;
360
- status: "active" | "canceled" | "incomplete" | "incomplete_expired" | "past_due" | "paused" | "provisional" | "trialing" | "unpaid";
359
+ status: "incomplete" | "incomplete_expired" | "provisional" | "trialing" | "active" | "past_due" | "unpaid" | "canceled" | "paused";
361
360
  interval: "month" | "year";
362
361
  paymentMethod: {
363
362
  type: "card";
@@ -369,37 +368,38 @@ export declare const GetSubscriptionsResponseStruct: Struct<{
369
368
  } | {
370
369
  type: "crypto";
371
370
  crypto: {
372
- payerAddress: `0x${string}`;
373
371
  chainId: `0x${string}`;
372
+ payerAddress: `0x${string}`;
374
373
  tokenSymbol: string;
375
- error?: "approval_transaction_max_verification_attempts_reached" | "approval_transaction_reverted" | "approval_transaction_too_old" | "insufficient_allowance" | "insufficient_balance" | undefined;
374
+ error?: "approval_transaction_too_old" | "approval_transaction_reverted" | "approval_transaction_max_verification_attempts_reached" | "insufficient_balance" | "insufficient_allowance" | undefined;
376
375
  };
377
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;
378
381
  trialPeriodDays?: number | undefined;
379
382
  trialStart?: string | undefined;
380
383
  trialEnd?: string | undefined;
381
384
  endDate?: string | undefined;
382
385
  canceledAt?: string | undefined;
383
- cancelType: "allowed_at_period_end" | "allowed_immediate" | "not_allowed" | "not_allowed_pending_verification";
384
386
  inactiveAt?: string | undefined;
385
- isEligibleForSupport: boolean;
386
- billingCycles?: number | undefined;
387
387
  } | undefined, {
388
388
  id: Struct<string, null>;
389
389
  products: Struct<{
390
- name: "money_account_plus" | "shield";
390
+ name: "shield" | "money_account_plus";
391
391
  currency: "usd";
392
392
  unitAmount: number;
393
393
  unitDecimals: number;
394
394
  }[], Struct<{
395
- name: "money_account_plus" | "shield";
395
+ name: "shield" | "money_account_plus";
396
396
  currency: "usd";
397
397
  unitAmount: number;
398
398
  unitDecimals: number;
399
399
  }, {
400
- name: Struct<"money_account_plus" | "shield", {
401
- money_account_plus: "money_account_plus";
400
+ name: Struct<"shield" | "money_account_plus", {
402
401
  shield: "shield";
402
+ money_account_plus: "money_account_plus";
403
403
  }>;
404
404
  currency: Struct<"usd", {
405
405
  usd: "usd";
@@ -410,16 +410,16 @@ export declare const GetSubscriptionsResponseStruct: Struct<{
410
410
  currentPeriodStart: Struct<string, null>;
411
411
  currentPeriodEnd: Struct<string, null>;
412
412
  cancelAtPeriodEnd: Struct<boolean | undefined, null>;
413
- status: Struct<"active" | "canceled" | "incomplete" | "incomplete_expired" | "past_due" | "paused" | "provisional" | "trialing" | "unpaid", {
414
- active: "active";
415
- canceled: "canceled";
413
+ status: Struct<"incomplete" | "incomplete_expired" | "provisional" | "trialing" | "active" | "past_due" | "unpaid" | "canceled" | "paused", {
416
414
  incomplete: "incomplete";
417
415
  incomplete_expired: "incomplete_expired";
418
- past_due: "past_due";
419
- paused: "paused";
420
416
  provisional: "provisional";
421
417
  trialing: "trialing";
418
+ active: "active";
419
+ past_due: "past_due";
422
420
  unpaid: "unpaid";
421
+ canceled: "canceled";
422
+ paused: "paused";
423
423
  }>;
424
424
  interval: Struct<"month" | "year", {
425
425
  month: "month";
@@ -435,10 +435,10 @@ export declare const GetSubscriptionsResponseStruct: Struct<{
435
435
  } | {
436
436
  type: "crypto";
437
437
  crypto: {
438
- payerAddress: `0x${string}`;
439
438
  chainId: `0x${string}`;
439
+ payerAddress: `0x${string}`;
440
440
  tokenSymbol: string;
441
- error?: "approval_transaction_max_verification_attempts_reached" | "approval_transaction_reverted" | "approval_transaction_too_old" | "insufficient_allowance" | "insufficient_balance" | undefined;
441
+ error?: "approval_transaction_too_old" | "approval_transaction_reverted" | "approval_transaction_max_verification_attempts_reached" | "insufficient_balance" | "insufficient_allowance" | undefined;
442
442
  };
443
443
  }, null>;
444
444
  trialPeriodDays: Struct<number | undefined, null>;
@@ -446,9 +446,9 @@ export declare const GetSubscriptionsResponseStruct: Struct<{
446
446
  trialEnd: Struct<string | undefined, null>;
447
447
  endDate: Struct<string | undefined, null>;
448
448
  canceledAt: Struct<string | undefined, null>;
449
- cancelType: Struct<"allowed_at_period_end" | "allowed_immediate" | "not_allowed" | "not_allowed_pending_verification", {
450
- allowed_at_period_end: "allowed_at_period_end";
449
+ cancelType: Struct<"allowed_immediate" | "allowed_at_period_end" | "not_allowed" | "not_allowed_pending_verification", {
451
450
  allowed_immediate: "allowed_immediate";
451
+ allowed_at_period_end: "allowed_at_period_end";
452
452
  not_allowed: "not_allowed";
453
453
  not_allowed_pending_verification: "not_allowed_pending_verification";
454
454
  }>;
@@ -464,20 +464,20 @@ export declare const StartSubscriptionResponseStruct: Struct<{
464
464
  checkoutSessionUrl: Struct<string, null>;
465
465
  }>;
466
466
  export declare const StartCryptoSubscriptionResponseStruct: Struct<{
467
+ status: "incomplete" | "incomplete_expired" | "provisional" | "trialing" | "active" | "past_due" | "unpaid" | "canceled" | "paused";
467
468
  subscriptionId: string;
468
- status: "active" | "canceled" | "incomplete" | "incomplete_expired" | "past_due" | "paused" | "provisional" | "trialing" | "unpaid";
469
469
  }, {
470
470
  subscriptionId: Struct<string, null>;
471
- status: Struct<"active" | "canceled" | "incomplete" | "incomplete_expired" | "past_due" | "paused" | "provisional" | "trialing" | "unpaid", {
472
- active: "active";
473
- canceled: "canceled";
471
+ status: Struct<"incomplete" | "incomplete_expired" | "provisional" | "trialing" | "active" | "past_due" | "unpaid" | "canceled" | "paused", {
474
472
  incomplete: "incomplete";
475
473
  incomplete_expired: "incomplete_expired";
476
- past_due: "past_due";
477
- paused: "paused";
478
474
  provisional: "provisional";
479
475
  trialing: "trialing";
476
+ active: "active";
477
+ past_due: "past_due";
480
478
  unpaid: "unpaid";
479
+ canceled: "canceled";
480
+ paused: "paused";
481
481
  }>;
482
482
  }>;
483
483
  export declare const UpdatePaymentMethodCardResponseStruct: Struct<{
@@ -499,12 +499,12 @@ export declare const SubscriptionApiGeneralResponseStruct: Struct<{
499
499
  }>;
500
500
  export declare const PricingResponseStruct: Struct<{
501
501
  products: {
502
- name: "money_account_plus" | "shield";
502
+ name: "shield" | "money_account_plus";
503
503
  prices: {
504
- interval: "month" | "year";
504
+ currency: "usd";
505
505
  unitAmount: number;
506
506
  unitDecimals: number;
507
- currency: "usd";
507
+ interval: "month" | "year";
508
508
  trialPeriodDays: number;
509
509
  minBillingCycles: number;
510
510
  minBillingCyclesForBalance: number;
@@ -512,60 +512,60 @@ export declare const PricingResponseStruct: Struct<{
512
512
  }[];
513
513
  paymentMethods: ({
514
514
  type: "card";
515
- products?: ("money_account_plus" | "shield")[] | undefined;
515
+ products?: ("shield" | "money_account_plus")[] | undefined;
516
516
  } | {
517
517
  type: "crypto";
518
- cryptoAuthMethod?: "delegation" | "erc20_approval" | undefined;
519
- products?: ("money_account_plus" | "shield")[] | undefined;
518
+ products?: ("shield" | "money_account_plus")[] | undefined;
519
+ cryptoAuthMethod?: "erc20_approval" | "delegation" | undefined;
520
520
  chains?: {
521
521
  chainId: `0x${string}`;
522
522
  paymentAddress: `0x${string}`;
523
- delegateAddress?: `0x${string}` | undefined;
524
523
  tokens: TokenPaymentInfo[];
524
+ delegateAddress?: `0x${string}` | undefined;
525
525
  isSponsorshipSupported?: boolean | undefined;
526
526
  }[] | undefined;
527
527
  })[];
528
528
  }, {
529
529
  products: Struct<{
530
- name: "money_account_plus" | "shield";
530
+ name: "shield" | "money_account_plus";
531
531
  prices: {
532
- interval: "month" | "year";
532
+ currency: "usd";
533
533
  unitAmount: number;
534
534
  unitDecimals: number;
535
- currency: "usd";
535
+ interval: "month" | "year";
536
536
  trialPeriodDays: number;
537
537
  minBillingCycles: number;
538
538
  minBillingCyclesForBalance: number;
539
539
  }[];
540
540
  }[], Struct<{
541
- name: "money_account_plus" | "shield";
541
+ name: "shield" | "money_account_plus";
542
542
  prices: {
543
- interval: "month" | "year";
543
+ currency: "usd";
544
544
  unitAmount: number;
545
545
  unitDecimals: number;
546
- currency: "usd";
546
+ interval: "month" | "year";
547
547
  trialPeriodDays: number;
548
548
  minBillingCycles: number;
549
549
  minBillingCyclesForBalance: number;
550
550
  }[];
551
551
  }, {
552
- name: Struct<"money_account_plus" | "shield", {
553
- money_account_plus: "money_account_plus";
552
+ name: Struct<"shield" | "money_account_plus", {
554
553
  shield: "shield";
554
+ money_account_plus: "money_account_plus";
555
555
  }>;
556
556
  prices: Struct<{
557
- interval: "month" | "year";
557
+ currency: "usd";
558
558
  unitAmount: number;
559
559
  unitDecimals: number;
560
- currency: "usd";
560
+ interval: "month" | "year";
561
561
  trialPeriodDays: number;
562
562
  minBillingCycles: number;
563
563
  minBillingCyclesForBalance: number;
564
564
  }[], Struct<{
565
- interval: "month" | "year";
565
+ currency: "usd";
566
566
  unitAmount: number;
567
567
  unitDecimals: number;
568
- currency: "usd";
568
+ interval: "month" | "year";
569
569
  trialPeriodDays: number;
570
570
  minBillingCycles: number;
571
571
  minBillingCyclesForBalance: number;
@@ -586,36 +586,36 @@ export declare const PricingResponseStruct: Struct<{
586
586
  }>>;
587
587
  paymentMethods: Struct<({
588
588
  type: "card";
589
- products?: ("money_account_plus" | "shield")[] | undefined;
589
+ products?: ("shield" | "money_account_plus")[] | undefined;
590
590
  } | {
591
591
  type: "crypto";
592
- cryptoAuthMethod?: "delegation" | "erc20_approval" | undefined;
593
- products?: ("money_account_plus" | "shield")[] | undefined;
592
+ products?: ("shield" | "money_account_plus")[] | undefined;
593
+ cryptoAuthMethod?: "erc20_approval" | "delegation" | undefined;
594
594
  chains?: {
595
595
  chainId: `0x${string}`;
596
596
  paymentAddress: `0x${string}`;
597
- delegateAddress?: `0x${string}` | undefined;
598
597
  tokens: TokenPaymentInfo[];
598
+ delegateAddress?: `0x${string}` | undefined;
599
599
  isSponsorshipSupported?: boolean | undefined;
600
600
  }[] | undefined;
601
601
  })[], Struct<{
602
602
  type: "card";
603
- products?: ("money_account_plus" | "shield")[] | undefined;
603
+ products?: ("shield" | "money_account_plus")[] | undefined;
604
604
  } | {
605
605
  type: "crypto";
606
- cryptoAuthMethod?: "delegation" | "erc20_approval" | undefined;
607
- products?: ("money_account_plus" | "shield")[] | undefined;
606
+ products?: ("shield" | "money_account_plus")[] | undefined;
607
+ cryptoAuthMethod?: "erc20_approval" | "delegation" | undefined;
608
608
  chains?: {
609
609
  chainId: `0x${string}`;
610
610
  paymentAddress: `0x${string}`;
611
- delegateAddress?: `0x${string}` | undefined;
612
611
  tokens: TokenPaymentInfo[];
612
+ delegateAddress?: `0x${string}` | undefined;
613
613
  isSponsorshipSupported?: boolean | undefined;
614
614
  }[] | undefined;
615
615
  }, null>>;
616
616
  }>;
617
617
  export declare const SubscriptionEligibilityStruct: Struct<{
618
- product: "money_account_plus" | "shield";
618
+ product: "shield" | "money_account_plus";
619
619
  canSubscribe?: boolean | undefined;
620
620
  canViewEntryModal?: boolean | undefined;
621
621
  modalType?: "A" | "B" | undefined;
@@ -629,9 +629,9 @@ export declare const SubscriptionEligibilityStruct: Struct<{
629
629
  assignedAt?: string | undefined;
630
630
  hasAssignedCohortExpired?: boolean | undefined;
631
631
  }, {
632
- product: Struct<"money_account_plus" | "shield", {
633
- money_account_plus: "money_account_plus";
632
+ product: Struct<"shield" | "money_account_plus", {
634
633
  shield: "shield";
634
+ money_account_plus: "money_account_plus";
635
635
  }>;
636
636
  canSubscribe: Struct<boolean | undefined, null>;
637
637
  canViewEntryModal: Struct<boolean | undefined, null>;
@@ -660,7 +660,7 @@ export declare const SubscriptionEligibilityStruct: Struct<{
660
660
  hasAssignedCohortExpired: Struct<boolean | undefined, null>;
661
661
  }>;
662
662
  export declare const SubscriptionEligibilityArrayStruct: Struct<{
663
- product: "money_account_plus" | "shield";
663
+ product: "shield" | "money_account_plus";
664
664
  canSubscribe?: boolean | undefined;
665
665
  canViewEntryModal?: boolean | undefined;
666
666
  modalType?: "A" | "B" | undefined;
@@ -674,7 +674,7 @@ export declare const SubscriptionEligibilityArrayStruct: Struct<{
674
674
  assignedAt?: string | undefined;
675
675
  hasAssignedCohortExpired?: boolean | undefined;
676
676
  }[], Struct<{
677
- product: "money_account_plus" | "shield";
677
+ product: "shield" | "money_account_plus";
678
678
  canSubscribe?: boolean | undefined;
679
679
  canViewEntryModal?: boolean | undefined;
680
680
  modalType?: "A" | "B" | undefined;
@@ -688,9 +688,9 @@ export declare const SubscriptionEligibilityArrayStruct: Struct<{
688
688
  assignedAt?: string | undefined;
689
689
  hasAssignedCohortExpired?: boolean | undefined;
690
690
  }, {
691
- product: Struct<"money_account_plus" | "shield", {
692
- money_account_plus: "money_account_plus";
691
+ product: Struct<"shield" | "money_account_plus", {
693
692
  shield: "shield";
693
+ money_account_plus: "money_account_plus";
694
694
  }>;
695
695
  canSubscribe: Struct<boolean | undefined, null>;
696
696
  canViewEntryModal: Struct<boolean | undefined, null>;
@@ -718,4 +718,4 @@ export declare const SubscriptionEligibilityArrayStruct: Struct<{
718
718
  assignedAt: Struct<string | undefined, null>;
719
719
  hasAssignedCohortExpired: Struct<boolean | undefined, null>;
720
720
  }>>;
721
- //# sourceMappingURL=SubscriptionService-structs.d.ts.map
721
+ //# sourceMappingURL=SubscriptionService-structs.d.cts.map