@fantastic.dev/better-stripe 0.80.0 → 0.82.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +1 -1
  3. package/dist/client/billing/renewalAggregate/configure.d.ts +35 -0
  4. package/dist/client/billing/renewalAggregate/configure.d.ts.map +1 -0
  5. package/dist/client/billing/renewalAggregate/configure.js +96 -0
  6. package/dist/client/billing/renewalAggregate/configure.js.map +1 -0
  7. package/dist/client/billing/renewalAggregate/index.d.ts +3 -0
  8. package/dist/client/billing/renewalAggregate/index.d.ts.map +1 -0
  9. package/dist/client/billing/renewalAggregate/index.js +3 -0
  10. package/dist/client/billing/renewalAggregate/index.js.map +1 -0
  11. package/dist/client/billing/renewalAggregate/phaseContext.d.ts +176 -0
  12. package/dist/client/billing/renewalAggregate/phaseContext.d.ts.map +1 -0
  13. package/dist/client/billing/renewalAggregate/phaseContext.js +112 -0
  14. package/dist/client/billing/renewalAggregate/phaseContext.js.map +1 -0
  15. package/dist/client/billing/renewalAggregate/phases.d.ts +7 -0
  16. package/dist/client/billing/renewalAggregate/phases.d.ts.map +1 -0
  17. package/dist/client/billing/renewalAggregate/phases.js +192 -0
  18. package/dist/client/billing/renewalAggregate/phases.js.map +1 -0
  19. package/dist/client/billing/renewalAggregate/preflight.d.ts +594 -0
  20. package/dist/client/billing/renewalAggregate/preflight.d.ts.map +1 -0
  21. package/dist/client/billing/renewalAggregate/preflight.js +164 -0
  22. package/dist/client/billing/renewalAggregate/preflight.js.map +1 -0
  23. package/dist/client/billing/renewalAggregate/profile.d.ts +8 -0
  24. package/dist/client/billing/renewalAggregate/profile.d.ts.map +1 -0
  25. package/dist/client/billing/renewalAggregate/profile.js +60 -0
  26. package/dist/client/billing/renewalAggregate/profile.js.map +1 -0
  27. package/dist/client/billing/renewalAggregate/receipt.d.ts +40 -0
  28. package/dist/client/billing/renewalAggregate/receipt.d.ts.map +1 -0
  29. package/dist/client/billing/renewalAggregate/receipt.js +62 -0
  30. package/dist/client/billing/renewalAggregate/receipt.js.map +1 -0
  31. package/dist/client/billing/renewalAggregate/shared.d.ts +51 -0
  32. package/dist/client/billing/renewalAggregate/shared.d.ts.map +1 -0
  33. package/dist/client/billing/renewalAggregate/shared.js +87 -0
  34. package/dist/client/billing/renewalAggregate/shared.js.map +1 -0
  35. package/dist/client/billing/renewalAggregate/sourceDiscounts.d.ts +42 -0
  36. package/dist/client/billing/renewalAggregate/sourceDiscounts.d.ts.map +1 -0
  37. package/dist/client/billing/renewalAggregate/sourceDiscounts.js +90 -0
  38. package/dist/client/billing/renewalAggregate/sourceDiscounts.js.map +1 -0
  39. package/dist/client/billing/renewalAggregate/sourceSettings.d.ts +136 -0
  40. package/dist/client/billing/renewalAggregate/sourceSettings.d.ts.map +1 -0
  41. package/dist/client/billing/renewalAggregate/sourceSettings.js +82 -0
  42. package/dist/client/billing/renewalAggregate/sourceSettings.js.map +1 -0
  43. package/dist/client/billing/renewalAggregate/taxRetention.d.ts +8 -0
  44. package/dist/client/billing/renewalAggregate/taxRetention.d.ts.map +1 -0
  45. package/dist/client/billing/renewalAggregate/taxRetention.js +23 -0
  46. package/dist/client/billing/renewalAggregate/taxRetention.js.map +1 -0
  47. package/dist/client/billing/renewalPriceReplacement.d.ts +2 -0
  48. package/dist/client/billing/renewalPriceReplacement.d.ts.map +1 -1
  49. package/dist/client/billing/renewalProjection/discounts.d.ts +20 -0
  50. package/dist/client/billing/renewalProjection/discounts.d.ts.map +1 -0
  51. package/dist/client/billing/renewalProjection/discounts.js +121 -0
  52. package/dist/client/billing/renewalProjection/discounts.js.map +1 -0
  53. package/dist/client/billing/renewalProjection/itemSettings.d.ts +14 -0
  54. package/dist/client/billing/renewalProjection/itemSettings.d.ts.map +1 -0
  55. package/dist/client/billing/renewalProjection/itemSettings.js +41 -0
  56. package/dist/client/billing/renewalProjection/itemSettings.js.map +1 -0
  57. package/dist/client/billing/renewalProjection/settings.d.ts +18 -0
  58. package/dist/client/billing/renewalProjection/settings.d.ts.map +1 -0
  59. package/dist/client/billing/renewalProjection/settings.js +132 -0
  60. package/dist/client/billing/renewalProjection/settings.js.map +1 -0
  61. package/dist/client/billing/renewalProjection/settingsSchema.d.ts +200 -0
  62. package/dist/client/billing/renewalProjection/settingsSchema.d.ts.map +1 -0
  63. package/dist/client/billing/renewalProjection/settingsSchema.js +150 -0
  64. package/dist/client/billing/renewalProjection/settingsSchema.js.map +1 -0
  65. package/dist/client/billing/renewalReplacementSchema.d.ts +2 -0
  66. package/dist/client/billing/renewalReplacementSchema.d.ts.map +1 -1
  67. package/dist/client/billing/renewalReplacementSchema.js +10 -4
  68. package/dist/client/billing/renewalReplacementSchema.js.map +1 -1
  69. package/dist/client/connect/payoutAdoptionTestHelpers.d.ts +32 -32
  70. package/dist/client/connect/payoutExecutionTestHelpers.d.ts +16 -16
  71. package/dist/component/balanceFunding/mutations.d.ts +43 -43
  72. package/dist/component/balanceFunding/preparationHandlers.d.ts +8 -8
  73. package/dist/component/payoutRelease/queries.d.ts +2 -2
  74. package/dist/component/payoutRelease/queries.d.ts.map +1 -1
  75. package/dist/component/processingCostReconciliation/rollback.d.ts +1 -1
  76. package/dist/component/usage/allowance.fixtures.d.ts +16 -16
  77. package/docs/renewal-phase-assembly.md +180 -0
  78. package/docs/renewal-preservation-mappings.md +94 -0
  79. package/docs/renewal-price-replacements.md +7 -0
  80. package/package.json +1 -1
  81. package/src/client/billing/renewal-discount-projection.test.ts +207 -0
  82. package/src/client/billing/renewal-item-settings-projection.test.ts +79 -0
  83. package/src/client/billing/renewal-price-replacement.test.ts +46 -0
  84. package/src/client/billing/renewal-settings-projection.test.ts +300 -0
  85. package/src/client/billing/renewalAggregate/configure.test.ts +372 -0
  86. package/src/client/billing/renewalAggregate/configure.ts +164 -0
  87. package/src/client/billing/renewalAggregate/index.ts +2 -0
  88. package/src/client/billing/renewalAggregate/phaseContext.ts +144 -0
  89. package/src/client/billing/renewalAggregate/phases.ts +247 -0
  90. package/src/client/billing/renewalAggregate/preflight.test.ts +233 -0
  91. package/src/client/billing/renewalAggregate/preflight.ts +211 -0
  92. package/src/client/billing/renewalAggregate/profile.ts +76 -0
  93. package/src/client/billing/renewalAggregate/receipt.ts +76 -0
  94. package/src/client/billing/renewalAggregate/shared.ts +106 -0
  95. package/src/client/billing/renewalAggregate/sourceAndTaxRetention.test.ts +247 -0
  96. package/src/client/billing/renewalAggregate/sourceDiscounts.ts +112 -0
  97. package/src/client/billing/renewalAggregate/sourceSettings.ts +88 -0
  98. package/src/client/billing/renewalAggregate/taxRetention.ts +28 -0
  99. package/src/client/billing/renewalProjection/discounts.ts +152 -0
  100. package/src/client/billing/renewalProjection/itemSettings.ts +55 -0
  101. package/src/client/billing/renewalProjection/settings.ts +163 -0
  102. package/src/client/billing/renewalProjection/settingsSchema.ts +154 -0
  103. package/src/client/billing/renewalReplacementSchema.ts +10 -4
@@ -0,0 +1,594 @@
1
+ import { z } from "zod";
2
+ import { readInput } from "./shared.js";
3
+ export declare function retainedPreparation(value: unknown): {
4
+ version: 1;
5
+ scope: "platform";
6
+ expected: {
7
+ customerAccountId: string;
8
+ subscriptionId: string;
9
+ itemId: string;
10
+ currentPriceId: string;
11
+ currentProductId: string;
12
+ targetPriceId: string;
13
+ targetProductId: string;
14
+ periodStart: number;
15
+ periodEnd: number;
16
+ livemode: boolean;
17
+ };
18
+ quantity: number;
19
+ providerSnapshot: {
20
+ subscription: {
21
+ [x: string]: unknown;
22
+ id: string;
23
+ object: "subscription";
24
+ customer_account: string;
25
+ status: "active";
26
+ currency: string;
27
+ livemode: boolean;
28
+ schedule: null;
29
+ cancel_at: null;
30
+ cancel_at_period_end: false;
31
+ pause_collection: null;
32
+ pending_update: null;
33
+ default_source: null;
34
+ application_fee_percent: null;
35
+ payment_settings: {
36
+ payment_method_options: null;
37
+ payment_method_types: null;
38
+ save_default_payment_method: "off" | null;
39
+ } | null;
40
+ billing_schedules?: unknown[] | undefined;
41
+ items: {
42
+ [x: string]: unknown;
43
+ has_more: false;
44
+ data: [{
45
+ [x: string]: unknown;
46
+ id: string;
47
+ object: "subscription_item";
48
+ subscription: string;
49
+ current_period_start: number;
50
+ current_period_end: number;
51
+ quantity: number;
52
+ price: {
53
+ [x: string]: unknown;
54
+ id: string;
55
+ object: "price";
56
+ product: string | {
57
+ [x: string]: unknown;
58
+ id: string;
59
+ object: "product";
60
+ deleted?: false | undefined;
61
+ };
62
+ active: boolean;
63
+ livemode: boolean;
64
+ type: "recurring";
65
+ currency: string;
66
+ billing_scheme: "per_unit";
67
+ recurring: {
68
+ [x: string]: unknown;
69
+ interval: "day" | "month" | "week" | "year";
70
+ interval_count: number;
71
+ usage_type: "licensed";
72
+ };
73
+ };
74
+ }];
75
+ };
76
+ };
77
+ targetPrice: {
78
+ [x: string]: unknown;
79
+ id: string;
80
+ object: "price";
81
+ product: string | {
82
+ [x: string]: unknown;
83
+ id: string;
84
+ object: "product";
85
+ deleted?: false | undefined;
86
+ };
87
+ active: boolean;
88
+ livemode: boolean;
89
+ type: "recurring";
90
+ currency: string;
91
+ billing_scheme: "per_unit";
92
+ recurring: {
93
+ [x: string]: unknown;
94
+ interval: "day" | "month" | "week" | "year";
95
+ interval_count: number;
96
+ usage_type: "licensed";
97
+ };
98
+ };
99
+ billingCustomer?: {
100
+ [x: string]: unknown;
101
+ id: string;
102
+ object: "customer";
103
+ customer_account: string;
104
+ livemode: boolean;
105
+ deleted?: false | undefined;
106
+ discount: {
107
+ [x: string]: unknown;
108
+ id: string;
109
+ object: "discount";
110
+ deleted?: false | undefined;
111
+ } | null;
112
+ } | undefined;
113
+ };
114
+ status: "prepared";
115
+ preservation: "requires_schedule_validation";
116
+ requestIdentity: {
117
+ key: string;
118
+ binding: string;
119
+ };
120
+ };
121
+ export declare function validateReads(args: z.infer<typeof readInput>, scheduleId?: string): {
122
+ prepared: {
123
+ version: 1;
124
+ scope: "platform";
125
+ expected: {
126
+ customerAccountId: string;
127
+ subscriptionId: string;
128
+ itemId: string;
129
+ currentPriceId: string;
130
+ currentProductId: string;
131
+ targetPriceId: string;
132
+ targetProductId: string;
133
+ periodStart: number;
134
+ periodEnd: number;
135
+ livemode: boolean;
136
+ };
137
+ quantity: number;
138
+ providerSnapshot: {
139
+ subscription: {
140
+ [x: string]: unknown;
141
+ id: string;
142
+ object: "subscription";
143
+ customer_account: string;
144
+ status: "active";
145
+ currency: string;
146
+ livemode: boolean;
147
+ schedule: null;
148
+ cancel_at: null;
149
+ cancel_at_period_end: false;
150
+ pause_collection: null;
151
+ pending_update: null;
152
+ default_source: null;
153
+ application_fee_percent: null;
154
+ payment_settings: {
155
+ payment_method_options: null;
156
+ payment_method_types: null;
157
+ save_default_payment_method: "off" | null;
158
+ } | null;
159
+ billing_schedules?: unknown[] | undefined;
160
+ items: {
161
+ [x: string]: unknown;
162
+ has_more: false;
163
+ data: [{
164
+ [x: string]: unknown;
165
+ id: string;
166
+ object: "subscription_item";
167
+ subscription: string;
168
+ current_period_start: number;
169
+ current_period_end: number;
170
+ quantity: number;
171
+ price: {
172
+ [x: string]: unknown;
173
+ id: string;
174
+ object: "price";
175
+ product: string | {
176
+ [x: string]: unknown;
177
+ id: string;
178
+ object: "product";
179
+ deleted?: false | undefined;
180
+ };
181
+ active: boolean;
182
+ livemode: boolean;
183
+ type: "recurring";
184
+ currency: string;
185
+ billing_scheme: "per_unit";
186
+ recurring: {
187
+ [x: string]: unknown;
188
+ interval: "day" | "month" | "week" | "year";
189
+ interval_count: number;
190
+ usage_type: "licensed";
191
+ };
192
+ };
193
+ }];
194
+ };
195
+ };
196
+ targetPrice: {
197
+ [x: string]: unknown;
198
+ id: string;
199
+ object: "price";
200
+ product: string | {
201
+ [x: string]: unknown;
202
+ id: string;
203
+ object: "product";
204
+ deleted?: false | undefined;
205
+ };
206
+ active: boolean;
207
+ livemode: boolean;
208
+ type: "recurring";
209
+ currency: string;
210
+ billing_scheme: "per_unit";
211
+ recurring: {
212
+ [x: string]: unknown;
213
+ interval: "day" | "month" | "week" | "year";
214
+ interval_count: number;
215
+ usage_type: "licensed";
216
+ };
217
+ };
218
+ billingCustomer?: {
219
+ [x: string]: unknown;
220
+ id: string;
221
+ object: "customer";
222
+ customer_account: string;
223
+ livemode: boolean;
224
+ deleted?: false | undefined;
225
+ discount: {
226
+ [x: string]: unknown;
227
+ id: string;
228
+ object: "discount";
229
+ deleted?: false | undefined;
230
+ } | null;
231
+ } | undefined;
232
+ };
233
+ status: "prepared";
234
+ preservation: "requires_schedule_validation";
235
+ requestIdentity: {
236
+ key: string;
237
+ binding: string;
238
+ };
239
+ };
240
+ subscription: {
241
+ [x: string]: unknown;
242
+ id: string;
243
+ object: "subscription";
244
+ customer_account: string;
245
+ status: "active";
246
+ currency: string;
247
+ livemode: boolean;
248
+ cancel_at: null;
249
+ cancel_at_period_end: false;
250
+ pause_collection: null;
251
+ pending_update: null;
252
+ default_source: null;
253
+ application_fee_percent: null;
254
+ payment_settings: {
255
+ payment_method_options: null;
256
+ payment_method_types: null;
257
+ save_default_payment_method: "off" | null;
258
+ } | null;
259
+ billing_schedules?: unknown[] | undefined;
260
+ items: {
261
+ [x: string]: unknown;
262
+ has_more: false;
263
+ data: [{
264
+ [x: string]: unknown;
265
+ id: string;
266
+ object: "subscription_item";
267
+ subscription: string;
268
+ current_period_start: number;
269
+ current_period_end: number;
270
+ quantity: number;
271
+ price: {
272
+ [x: string]: unknown;
273
+ id: string;
274
+ object: "price";
275
+ product: string | {
276
+ [x: string]: unknown;
277
+ id: string;
278
+ object: "product";
279
+ deleted?: false | undefined;
280
+ };
281
+ active: boolean;
282
+ livemode: boolean;
283
+ type: "recurring";
284
+ currency: string;
285
+ billing_scheme: "per_unit";
286
+ recurring: {
287
+ [x: string]: unknown;
288
+ interval: "day" | "month" | "week" | "year";
289
+ interval_count: number;
290
+ usage_type: "licensed";
291
+ };
292
+ };
293
+ }];
294
+ };
295
+ schedule: string | {
296
+ [x: string]: unknown;
297
+ id: string;
298
+ object: "subscription_schedule";
299
+ deleted?: false | undefined;
300
+ customer_account?: string | undefined;
301
+ livemode?: boolean | undefined;
302
+ } | null;
303
+ };
304
+ item: {
305
+ [x: string]: unknown;
306
+ id: string;
307
+ object: "subscription_item";
308
+ subscription: string;
309
+ current_period_start: number;
310
+ current_period_end: number;
311
+ quantity: number;
312
+ price: {
313
+ [x: string]: unknown;
314
+ id: string;
315
+ object: "price";
316
+ product: string | {
317
+ [x: string]: unknown;
318
+ id: string;
319
+ object: "product";
320
+ deleted?: false | undefined;
321
+ };
322
+ active: boolean;
323
+ livemode: boolean;
324
+ type: "recurring";
325
+ currency: string;
326
+ billing_scheme: "per_unit";
327
+ recurring: {
328
+ [x: string]: unknown;
329
+ interval: "day" | "month" | "week" | "year";
330
+ interval_count: number;
331
+ usage_type: "licensed";
332
+ };
333
+ };
334
+ };
335
+ customer: {
336
+ [x: string]: unknown;
337
+ id: string;
338
+ object: "customer";
339
+ customer_account: string;
340
+ livemode: boolean;
341
+ deleted?: false | undefined;
342
+ discount: {
343
+ [x: string]: unknown;
344
+ id: string;
345
+ object: "discount";
346
+ deleted?: false | undefined;
347
+ } | null;
348
+ };
349
+ targetPrice: {
350
+ [x: string]: unknown;
351
+ id: string;
352
+ object: "price";
353
+ product: string | {
354
+ [x: string]: unknown;
355
+ id: string;
356
+ object: "product";
357
+ deleted?: false | undefined;
358
+ };
359
+ active: boolean;
360
+ livemode: boolean;
361
+ type: "recurring";
362
+ currency: string;
363
+ billing_scheme: "per_unit";
364
+ recurring: {
365
+ [x: string]: unknown;
366
+ interval: "day" | "month" | "week" | "year";
367
+ interval_count: number;
368
+ usage_type: "licensed";
369
+ };
370
+ };
371
+ profile: import("./profile.js").RenewalProfile;
372
+ discounts: {
373
+ [x: string]: unknown;
374
+ id: string;
375
+ object: "discount";
376
+ deleted?: false | undefined;
377
+ customer_account: string;
378
+ customer?: string | {
379
+ [x: string]: unknown;
380
+ id: string;
381
+ object: "customer";
382
+ deleted?: false | undefined;
383
+ livemode?: boolean | undefined;
384
+ customer_account?: string | null | undefined;
385
+ } | null | undefined;
386
+ subscription: string | null;
387
+ subscription_item: string | null;
388
+ start: number;
389
+ end: null;
390
+ source: {
391
+ [x: string]: unknown;
392
+ type: "coupon";
393
+ coupon: {
394
+ [x: string]: unknown;
395
+ id: string;
396
+ object: "coupon";
397
+ deleted?: false | undefined;
398
+ livemode?: boolean | undefined;
399
+ duration: "forever";
400
+ applies_to?: {
401
+ products: string[];
402
+ } | undefined;
403
+ };
404
+ };
405
+ }[];
406
+ itemDiscounts: {
407
+ [x: string]: unknown;
408
+ id: string;
409
+ object: "discount";
410
+ deleted?: false | undefined;
411
+ customer_account: string;
412
+ customer?: string | {
413
+ [x: string]: unknown;
414
+ id: string;
415
+ object: "customer";
416
+ deleted?: false | undefined;
417
+ livemode?: boolean | undefined;
418
+ customer_account?: string | null | undefined;
419
+ } | null | undefined;
420
+ subscription: string | null;
421
+ subscription_item: string | null;
422
+ start: number;
423
+ end: null;
424
+ source: {
425
+ [x: string]: unknown;
426
+ type: "coupon";
427
+ coupon: {
428
+ [x: string]: unknown;
429
+ id: string;
430
+ object: "coupon";
431
+ deleted?: false | undefined;
432
+ livemode?: boolean | undefined;
433
+ duration: "forever";
434
+ applies_to?: {
435
+ products: string[];
436
+ } | undefined;
437
+ };
438
+ };
439
+ }[];
440
+ originalSettings: {
441
+ context: {
442
+ customerAccountId: string;
443
+ customerId: string;
444
+ livemode: boolean;
445
+ effectiveCollectionMethod: "charge_automatically" | "send_invoice";
446
+ effectiveAutomaticTax: boolean;
447
+ effectiveInvoiceIssuer: {
448
+ type: "self";
449
+ account?: null | undefined;
450
+ } | {
451
+ type: "account";
452
+ account: string | {
453
+ [x: string]: unknown;
454
+ id: string;
455
+ object: string;
456
+ deleted?: false | undefined;
457
+ livemode?: boolean | undefined;
458
+ customer?: string | {
459
+ [x: string]: unknown;
460
+ id: string;
461
+ object: "customer";
462
+ deleted?: false | undefined;
463
+ livemode?: boolean | undefined;
464
+ customer_account?: string | null | undefined;
465
+ } | null | undefined;
466
+ customer_account?: string | null | undefined;
467
+ };
468
+ };
469
+ };
470
+ invoice: {
471
+ account_tax_ids: (string | {
472
+ [x: string]: unknown;
473
+ id: string;
474
+ object: "tax_id";
475
+ deleted?: false | undefined;
476
+ livemode: boolean;
477
+ customer?: null | undefined;
478
+ customer_account?: null | undefined;
479
+ owner: {
480
+ type: "self";
481
+ customer_account: null;
482
+ account?: null | undefined;
483
+ customer?: null | undefined;
484
+ } | {
485
+ type: "account";
486
+ account: string | {
487
+ [x: string]: unknown;
488
+ id: string;
489
+ object: string;
490
+ deleted?: false | undefined;
491
+ livemode?: boolean | undefined;
492
+ customer?: string | {
493
+ [x: string]: unknown;
494
+ id: string;
495
+ object: "customer";
496
+ deleted?: false | undefined;
497
+ livemode?: boolean | undefined;
498
+ customer_account?: string | null | undefined;
499
+ } | null | undefined;
500
+ customer_account?: string | null | undefined;
501
+ };
502
+ customer_account: null;
503
+ customer?: null | undefined;
504
+ };
505
+ })[] | null;
506
+ custom_fields: {
507
+ name: string;
508
+ value: string;
509
+ }[] | null;
510
+ description: string | null;
511
+ footer: string | null;
512
+ issuer: {
513
+ type: "self";
514
+ account?: null | undefined;
515
+ } | {
516
+ type: "account";
517
+ account: string | {
518
+ [x: string]: unknown;
519
+ id: string;
520
+ object: string;
521
+ deleted?: false | undefined;
522
+ livemode?: boolean | undefined;
523
+ customer?: string | {
524
+ [x: string]: unknown;
525
+ id: string;
526
+ object: "customer";
527
+ deleted?: false | undefined;
528
+ livemode?: boolean | undefined;
529
+ customer_account?: string | null | undefined;
530
+ } | null | undefined;
531
+ customer_account?: string | null | undefined;
532
+ };
533
+ };
534
+ };
535
+ automaticTax: {
536
+ enabled: boolean;
537
+ liability?: {
538
+ type: "self";
539
+ account?: null | undefined;
540
+ } | {
541
+ type: "account";
542
+ account: string | {
543
+ [x: string]: unknown;
544
+ id: string;
545
+ object: string;
546
+ deleted?: false | undefined;
547
+ livemode?: boolean | undefined;
548
+ customer?: string | {
549
+ [x: string]: unknown;
550
+ id: string;
551
+ object: "customer";
552
+ deleted?: false | undefined;
553
+ livemode?: boolean | undefined;
554
+ customer_account?: string | null | undefined;
555
+ } | null | undefined;
556
+ customer_account?: string | null | undefined;
557
+ };
558
+ } | null | undefined;
559
+ disabled_reason?: null | undefined;
560
+ };
561
+ taxLevels: {
562
+ subscription: string[];
563
+ item: string[];
564
+ };
565
+ };
566
+ };
567
+ export declare function preflightRenewalReplacement(input: unknown): {
568
+ status: "unsupported" | "conflict";
569
+ reason: string;
570
+ } | {
571
+ status: "attached_unconfigured";
572
+ scheduleId: string;
573
+ reason: string;
574
+ } | {
575
+ version: 1;
576
+ status: "preflighted_for_projection";
577
+ scope: "platform";
578
+ expected: {
579
+ customerAccountId: string;
580
+ subscriptionId: string;
581
+ itemId: string;
582
+ currentPriceId: string;
583
+ currentProductId: string;
584
+ targetPriceId: string;
585
+ targetProductId: string;
586
+ periodStart: number;
587
+ periodEnd: number;
588
+ livemode: boolean;
589
+ };
590
+ quantity: number;
591
+ profile: import("./profile.js").RenewalProfile;
592
+ providerQualification: "required";
593
+ };
594
+ //# sourceMappingURL=preflight.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preflight.d.ts","sourceRoot":"","sources":["../../../../src/client/billing/renewalAggregate/preflight.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,OAAO,EAEL,SAAS,EAUV,MAAM,aAAa,CAAC;AAKrB,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqBjD;AAeD,wBAAgB,aAAa,CAC3B,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,EAC/B,UAAU,CAAC,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiIpB;AAED,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,OAAO;;;;;;;;aAK3C,CAAC;YACF,4BAA4B;WAC7B,UAAU;;;;;;;;;;;;;;;2BAIM,UAAU;EAKtC"}