@openmeter/sdk 1.0.0-beta.227 → 1.0.0-beta.228
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.
- package/Makefile +0 -1
- package/dist/cjs/src/client/customers.d.cts +3 -0
- package/dist/cjs/src/client/features.d.cts +3 -0
- package/dist/cjs/src/client/meters.cjs +10 -10
- package/dist/cjs/src/client/meters.d.cts +83 -14
- package/dist/cjs/src/client/plans.d.cts +5 -0
- package/dist/cjs/src/client/schemas.d.cts +283 -3
- package/dist/cjs/src/client/subscriptions.d.cts +5 -0
- package/dist/cjs/src/zod/index.cjs +714 -159
- package/dist/cjs/src/zod/index.cjs.map +1 -1
- package/dist/cjs/src/zod/index.d.cts +769 -648
- package/dist/src/client/customers.d.ts +3 -0
- package/dist/src/client/features.d.ts +3 -0
- package/dist/src/client/meters.d.ts +83 -14
- package/dist/src/client/meters.js +11 -11
- package/dist/src/client/meters.js.map +1 -1
- package/dist/src/client/plans.d.ts +5 -0
- package/dist/src/client/schemas.d.ts +283 -3
- package/dist/src/client/subscriptions.d.ts +5 -0
- package/dist/src/zod/index.d.ts +769 -648
- package/dist/src/zod/index.js +686 -132
- package/dist/src/zod/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/orval.config.ts +1 -1
- package/package.json +13 -14
- package/patches/openapi-typescript.patch +901 -828
- package/pnpm-workspace.yaml +3 -0
package/dist/src/zod/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Generated by orval v8.
|
|
2
|
+
* Generated by orval v8.7.0 🍺
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* OpenMeter Cloud API
|
|
5
5
|
* OpenMeter is a cloud native usage metering service.
|
|
@@ -21,6 +21,7 @@ export const listAddonsQueryCurrencyItemRegExp = /^[A-Z]{3}$/;
|
|
|
21
21
|
export const listAddonsQueryPageDefault = 1;
|
|
22
22
|
export const listAddonsQueryPageSizeDefault = 100;
|
|
23
23
|
export const listAddonsQueryPageSizeMax = 1000;
|
|
24
|
+
export const listAddonsQueryOrderDefault = 'ASC';
|
|
24
25
|
export const ListAddonsQueryParams = zod.object({
|
|
25
26
|
currency: zod
|
|
26
27
|
.array(zod.coerce
|
|
@@ -55,7 +56,11 @@ export const ListAddonsQueryParams = zod.object({
|
|
|
55
56
|
.record(zod.string(), zod.array(zod.coerce.number()))
|
|
56
57
|
.optional()
|
|
57
58
|
.describe('Filter by addon.key and addon.version attributes'),
|
|
58
|
-
order: zod
|
|
59
|
+
order: zod
|
|
60
|
+
.enum(['ASC', 'DESC'])
|
|
61
|
+
.describe('The order direction.')
|
|
62
|
+
.default(listAddonsQueryOrderDefault)
|
|
63
|
+
.describe('The order direction.'),
|
|
59
64
|
orderBy: zod
|
|
60
65
|
.enum(['id', 'key', 'version', 'created_at', 'updated_at'])
|
|
61
66
|
.optional()
|
|
@@ -102,6 +107,7 @@ export const createAddonBodyRateCardsItemOneEntitlementTemplateOneOneIssueAfterR
|
|
|
102
107
|
export const createAddonBodyRateCardsItemOneEntitlementTemplateOneOneIssueAfterResetPriorityMax = 255;
|
|
103
108
|
export const createAddonBodyRateCardsItemOneEntitlementTemplateOneOnePreserveOverageAtResetDefault = false;
|
|
104
109
|
export const createAddonBodyRateCardsItemOneTaxConfigOneStripeOneCodeRegExp = /^txcd_\d{8}$/;
|
|
110
|
+
export const createAddonBodyRateCardsItemOneTaxConfigOneTaxCodeIdRegExp = /^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/;
|
|
105
111
|
export const createAddonBodyRateCardsItemOnePriceOneAmountOneRegExp = /^-?[0-9]+(\.[0-9]+)?$/;
|
|
106
112
|
export const createAddonBodyRateCardsItemOnePriceOnePaymentTermDefault = 'in_advance';
|
|
107
113
|
export const createAddonBodyRateCardsItemOneDiscountsOneUsageOneQuantityOneRegExp = /^-?[0-9]+(\.[0-9]+)?$/;
|
|
@@ -117,6 +123,7 @@ export const createAddonBodyRateCardsItemTwoEntitlementTemplateOneOneIssueAfterR
|
|
|
117
123
|
export const createAddonBodyRateCardsItemTwoEntitlementTemplateOneOneIssueAfterResetPriorityMax = 255;
|
|
118
124
|
export const createAddonBodyRateCardsItemTwoEntitlementTemplateOneOnePreserveOverageAtResetDefault = false;
|
|
119
125
|
export const createAddonBodyRateCardsItemTwoTaxConfigOneStripeOneCodeRegExp = /^txcd_\d{8}$/;
|
|
126
|
+
export const createAddonBodyRateCardsItemTwoTaxConfigOneTaxCodeIdRegExp = /^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/;
|
|
120
127
|
export const createAddonBodyRateCardsItemTwoPriceOneOneAmountOneRegExp = /^-?[0-9]+(\.[0-9]+)?$/;
|
|
121
128
|
export const createAddonBodyRateCardsItemTwoPriceOneOnePaymentTermDefault = 'in_advance';
|
|
122
129
|
export const createAddonBodyRateCardsItemTwoPriceOneTwoAmountOneRegExp = /^-?[0-9]+(\.[0-9]+)?$/;
|
|
@@ -144,6 +151,7 @@ export const CreateAddonBody = zod
|
|
|
144
151
|
.max(createAddonBodyCurrencyOneMax)
|
|
145
152
|
.regex(createAddonBodyCurrencyOneRegExp)
|
|
146
153
|
.describe('Three-letter [ISO4217](https://www.iso.org/iso-4217-currency-codes.html) currency code.\nCustom three-letter currency codes are also supported for convenience.')
|
|
154
|
+
.default(createAddonBodyCurrencyDefault)
|
|
147
155
|
.describe('The currency code of the add-on.'),
|
|
148
156
|
description: zod.coerce
|
|
149
157
|
.string()
|
|
@@ -308,7 +316,7 @@ export const CreateAddonBody = zod
|
|
|
308
316
|
.describe('The payment term of a flat price.\nOne of: in_advance or in_arrears.')
|
|
309
317
|
.default(createAddonBodyRateCardsItemOnePriceOnePaymentTermDefault)
|
|
310
318
|
.describe('The payment term of the flat price.\nDefaults to in advance.'),
|
|
311
|
-
type: zod.enum(['flat']),
|
|
319
|
+
type: zod.enum(['flat']).describe('The type of the price.'),
|
|
312
320
|
})
|
|
313
321
|
.describe('Flat price with payment term.')
|
|
314
322
|
.nullable()
|
|
@@ -339,11 +347,18 @@ export const CreateAddonBody = zod
|
|
|
339
347
|
.describe('The tax config for Stripe.')
|
|
340
348
|
.optional()
|
|
341
349
|
.describe('Stripe tax config.'),
|
|
350
|
+
taxCodeId: zod.coerce
|
|
351
|
+
.string()
|
|
352
|
+
.regex(createAddonBodyRateCardsItemOneTaxConfigOneTaxCodeIdRegExp)
|
|
353
|
+
.optional()
|
|
354
|
+
.describe('Tax code reference.\n\nWhen both `taxCodeId` and `stripe.code` are provided, `taxCodeId` takes precedence:\nthe referenced tax code entity is used and `stripe.code` is ignored.'),
|
|
342
355
|
})
|
|
343
356
|
.describe('Set of provider specific tax configs.')
|
|
344
357
|
.optional()
|
|
345
358
|
.describe('The tax config of the rate card.\nWhen undefined, the tax config of the feature or the default tax config of the plan is used.'),
|
|
346
|
-
type: zod
|
|
359
|
+
type: zod
|
|
360
|
+
.enum(['flat_fee'])
|
|
361
|
+
.describe('The type of the RateCard.'),
|
|
347
362
|
})
|
|
348
363
|
.describe('A flat fee rate card defines a one-time purchase or a recurring fee.'),
|
|
349
364
|
zod
|
|
@@ -482,7 +497,9 @@ export const CreateAddonBody = zod
|
|
|
482
497
|
.describe('The payment term of a flat price.\nOne of: in_advance or in_arrears.')
|
|
483
498
|
.default(createAddonBodyRateCardsItemTwoPriceOneOnePaymentTermDefault)
|
|
484
499
|
.describe('The payment term of the flat price.\nDefaults to in advance.'),
|
|
485
|
-
type: zod
|
|
500
|
+
type: zod
|
|
501
|
+
.enum(['flat'])
|
|
502
|
+
.describe('The type of the price.'),
|
|
486
503
|
})
|
|
487
504
|
.describe('Flat price with payment term.'),
|
|
488
505
|
zod
|
|
@@ -504,7 +521,9 @@ export const CreateAddonBody = zod
|
|
|
504
521
|
.describe('Numeric represents an arbitrary precision number.')
|
|
505
522
|
.optional()
|
|
506
523
|
.describe('The customer is committed to spend at least the amount.'),
|
|
507
|
-
type: zod
|
|
524
|
+
type: zod
|
|
525
|
+
.enum(['unit'])
|
|
526
|
+
.describe('The type of the price.'),
|
|
508
527
|
})
|
|
509
528
|
.describe('Unit price with spend commitments.'),
|
|
510
529
|
zod
|
|
@@ -566,7 +585,9 @@ export const CreateAddonBody = zod
|
|
|
566
585
|
.describe('A price tier.\nAt least one price component is required in each tier.'))
|
|
567
586
|
.min(1)
|
|
568
587
|
.describe('The tiers of the tiered price.\nAt least one price component is required in each tier.'),
|
|
569
|
-
type: zod
|
|
588
|
+
type: zod
|
|
589
|
+
.enum(['tiered'])
|
|
590
|
+
.describe('The type of the price.\n\nOne of: flat, unit, or tiered.'),
|
|
570
591
|
})
|
|
571
592
|
.describe('Tiered price with spend commitments.'),
|
|
572
593
|
zod
|
|
@@ -589,7 +610,9 @@ export const CreateAddonBody = zod
|
|
|
589
610
|
.describe('Numeric represents an arbitrary precision number.')
|
|
590
611
|
.default(createAddonBodyRateCardsItemTwoPriceOneFourMultiplierDefault)
|
|
591
612
|
.describe('The multiplier to apply to the base price to get the dynamic price.\n\nExamples:\n- 0.0: the price is zero\n- 0.5: the price is 50% of the base price\n- 1.0: the price is the same as the base price\n- 1.5: the price is 150% of the base price'),
|
|
592
|
-
type: zod
|
|
613
|
+
type: zod
|
|
614
|
+
.enum(['dynamic'])
|
|
615
|
+
.describe('The type of the price.'),
|
|
593
616
|
})
|
|
594
617
|
.describe('Dynamic price with spend commitments.'),
|
|
595
618
|
zod
|
|
@@ -616,7 +639,9 @@ export const CreateAddonBody = zod
|
|
|
616
639
|
.regex(createAddonBodyRateCardsItemTwoPriceOneFiveQuantityPerPackageOneRegExp)
|
|
617
640
|
.describe('Numeric represents an arbitrary precision number.')
|
|
618
641
|
.describe('The quantity per package.'),
|
|
619
|
-
type: zod
|
|
642
|
+
type: zod
|
|
643
|
+
.enum(['package'])
|
|
644
|
+
.describe('The type of the price.'),
|
|
620
645
|
})
|
|
621
646
|
.describe('Package price with spend commitments.'),
|
|
622
647
|
])
|
|
@@ -649,11 +674,18 @@ export const CreateAddonBody = zod
|
|
|
649
674
|
.describe('The tax config for Stripe.')
|
|
650
675
|
.optional()
|
|
651
676
|
.describe('Stripe tax config.'),
|
|
677
|
+
taxCodeId: zod.coerce
|
|
678
|
+
.string()
|
|
679
|
+
.regex(createAddonBodyRateCardsItemTwoTaxConfigOneTaxCodeIdRegExp)
|
|
680
|
+
.optional()
|
|
681
|
+
.describe('Tax code reference.\n\nWhen both `taxCodeId` and `stripe.code` are provided, `taxCodeId` takes precedence:\nthe referenced tax code entity is used and `stripe.code` is ignored.'),
|
|
652
682
|
})
|
|
653
683
|
.describe('Set of provider specific tax configs.')
|
|
654
684
|
.optional()
|
|
655
685
|
.describe('The tax config of the rate card.\nWhen undefined, the tax config of the feature or the default tax config of the plan is used.'),
|
|
656
|
-
type: zod
|
|
686
|
+
type: zod
|
|
687
|
+
.enum(['usage_based'])
|
|
688
|
+
.describe('The type of the RateCard.'),
|
|
657
689
|
})
|
|
658
690
|
.describe('A usage-based rate card defines a price based on usage.'),
|
|
659
691
|
])
|
|
@@ -683,6 +715,7 @@ export const updateAddonBodyRateCardsItemOneEntitlementTemplateOneOneIssueAfterR
|
|
|
683
715
|
export const updateAddonBodyRateCardsItemOneEntitlementTemplateOneOneIssueAfterResetPriorityMax = 255;
|
|
684
716
|
export const updateAddonBodyRateCardsItemOneEntitlementTemplateOneOnePreserveOverageAtResetDefault = false;
|
|
685
717
|
export const updateAddonBodyRateCardsItemOneTaxConfigOneStripeOneCodeRegExp = /^txcd_\d{8}$/;
|
|
718
|
+
export const updateAddonBodyRateCardsItemOneTaxConfigOneTaxCodeIdRegExp = /^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/;
|
|
686
719
|
export const updateAddonBodyRateCardsItemOnePriceOneAmountOneRegExp = /^-?[0-9]+(\.[0-9]+)?$/;
|
|
687
720
|
export const updateAddonBodyRateCardsItemOnePriceOnePaymentTermDefault = 'in_advance';
|
|
688
721
|
export const updateAddonBodyRateCardsItemOneDiscountsOneUsageOneQuantityOneRegExp = /^-?[0-9]+(\.[0-9]+)?$/;
|
|
@@ -698,6 +731,7 @@ export const updateAddonBodyRateCardsItemTwoEntitlementTemplateOneOneIssueAfterR
|
|
|
698
731
|
export const updateAddonBodyRateCardsItemTwoEntitlementTemplateOneOneIssueAfterResetPriorityMax = 255;
|
|
699
732
|
export const updateAddonBodyRateCardsItemTwoEntitlementTemplateOneOnePreserveOverageAtResetDefault = false;
|
|
700
733
|
export const updateAddonBodyRateCardsItemTwoTaxConfigOneStripeOneCodeRegExp = /^txcd_\d{8}$/;
|
|
734
|
+
export const updateAddonBodyRateCardsItemTwoTaxConfigOneTaxCodeIdRegExp = /^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/;
|
|
701
735
|
export const updateAddonBodyRateCardsItemTwoPriceOneOneAmountOneRegExp = /^-?[0-9]+(\.[0-9]+)?$/;
|
|
702
736
|
export const updateAddonBodyRateCardsItemTwoPriceOneOnePaymentTermDefault = 'in_advance';
|
|
703
737
|
export const updateAddonBodyRateCardsItemTwoPriceOneTwoAmountOneRegExp = /^-?[0-9]+(\.[0-9]+)?$/;
|
|
@@ -876,7 +910,7 @@ export const UpdateAddonBody = zod
|
|
|
876
910
|
.describe('The payment term of a flat price.\nOne of: in_advance or in_arrears.')
|
|
877
911
|
.default(updateAddonBodyRateCardsItemOnePriceOnePaymentTermDefault)
|
|
878
912
|
.describe('The payment term of the flat price.\nDefaults to in advance.'),
|
|
879
|
-
type: zod.enum(['flat']),
|
|
913
|
+
type: zod.enum(['flat']).describe('The type of the price.'),
|
|
880
914
|
})
|
|
881
915
|
.describe('Flat price with payment term.')
|
|
882
916
|
.nullable()
|
|
@@ -907,11 +941,18 @@ export const UpdateAddonBody = zod
|
|
|
907
941
|
.describe('The tax config for Stripe.')
|
|
908
942
|
.optional()
|
|
909
943
|
.describe('Stripe tax config.'),
|
|
944
|
+
taxCodeId: zod.coerce
|
|
945
|
+
.string()
|
|
946
|
+
.regex(updateAddonBodyRateCardsItemOneTaxConfigOneTaxCodeIdRegExp)
|
|
947
|
+
.optional()
|
|
948
|
+
.describe('Tax code reference.\n\nWhen both `taxCodeId` and `stripe.code` are provided, `taxCodeId` takes precedence:\nthe referenced tax code entity is used and `stripe.code` is ignored.'),
|
|
910
949
|
})
|
|
911
950
|
.describe('Set of provider specific tax configs.')
|
|
912
951
|
.optional()
|
|
913
952
|
.describe('The tax config of the rate card.\nWhen undefined, the tax config of the feature or the default tax config of the plan is used.'),
|
|
914
|
-
type: zod
|
|
953
|
+
type: zod
|
|
954
|
+
.enum(['flat_fee'])
|
|
955
|
+
.describe('The type of the RateCard.'),
|
|
915
956
|
})
|
|
916
957
|
.describe('A flat fee rate card defines a one-time purchase or a recurring fee.'),
|
|
917
958
|
zod
|
|
@@ -1050,7 +1091,9 @@ export const UpdateAddonBody = zod
|
|
|
1050
1091
|
.describe('The payment term of a flat price.\nOne of: in_advance or in_arrears.')
|
|
1051
1092
|
.default(updateAddonBodyRateCardsItemTwoPriceOneOnePaymentTermDefault)
|
|
1052
1093
|
.describe('The payment term of the flat price.\nDefaults to in advance.'),
|
|
1053
|
-
type: zod
|
|
1094
|
+
type: zod
|
|
1095
|
+
.enum(['flat'])
|
|
1096
|
+
.describe('The type of the price.'),
|
|
1054
1097
|
})
|
|
1055
1098
|
.describe('Flat price with payment term.'),
|
|
1056
1099
|
zod
|
|
@@ -1072,7 +1115,9 @@ export const UpdateAddonBody = zod
|
|
|
1072
1115
|
.describe('Numeric represents an arbitrary precision number.')
|
|
1073
1116
|
.optional()
|
|
1074
1117
|
.describe('The customer is committed to spend at least the amount.'),
|
|
1075
|
-
type: zod
|
|
1118
|
+
type: zod
|
|
1119
|
+
.enum(['unit'])
|
|
1120
|
+
.describe('The type of the price.'),
|
|
1076
1121
|
})
|
|
1077
1122
|
.describe('Unit price with spend commitments.'),
|
|
1078
1123
|
zod
|
|
@@ -1134,7 +1179,9 @@ export const UpdateAddonBody = zod
|
|
|
1134
1179
|
.describe('A price tier.\nAt least one price component is required in each tier.'))
|
|
1135
1180
|
.min(1)
|
|
1136
1181
|
.describe('The tiers of the tiered price.\nAt least one price component is required in each tier.'),
|
|
1137
|
-
type: zod
|
|
1182
|
+
type: zod
|
|
1183
|
+
.enum(['tiered'])
|
|
1184
|
+
.describe('The type of the price.\n\nOne of: flat, unit, or tiered.'),
|
|
1138
1185
|
})
|
|
1139
1186
|
.describe('Tiered price with spend commitments.'),
|
|
1140
1187
|
zod
|
|
@@ -1157,7 +1204,9 @@ export const UpdateAddonBody = zod
|
|
|
1157
1204
|
.describe('Numeric represents an arbitrary precision number.')
|
|
1158
1205
|
.default(updateAddonBodyRateCardsItemTwoPriceOneFourMultiplierDefault)
|
|
1159
1206
|
.describe('The multiplier to apply to the base price to get the dynamic price.\n\nExamples:\n- 0.0: the price is zero\n- 0.5: the price is 50% of the base price\n- 1.0: the price is the same as the base price\n- 1.5: the price is 150% of the base price'),
|
|
1160
|
-
type: zod
|
|
1207
|
+
type: zod
|
|
1208
|
+
.enum(['dynamic'])
|
|
1209
|
+
.describe('The type of the price.'),
|
|
1161
1210
|
})
|
|
1162
1211
|
.describe('Dynamic price with spend commitments.'),
|
|
1163
1212
|
zod
|
|
@@ -1184,7 +1233,9 @@ export const UpdateAddonBody = zod
|
|
|
1184
1233
|
.regex(updateAddonBodyRateCardsItemTwoPriceOneFiveQuantityPerPackageOneRegExp)
|
|
1185
1234
|
.describe('Numeric represents an arbitrary precision number.')
|
|
1186
1235
|
.describe('The quantity per package.'),
|
|
1187
|
-
type: zod
|
|
1236
|
+
type: zod
|
|
1237
|
+
.enum(['package'])
|
|
1238
|
+
.describe('The type of the price.'),
|
|
1188
1239
|
})
|
|
1189
1240
|
.describe('Package price with spend commitments.'),
|
|
1190
1241
|
])
|
|
@@ -1217,11 +1268,18 @@ export const UpdateAddonBody = zod
|
|
|
1217
1268
|
.describe('The tax config for Stripe.')
|
|
1218
1269
|
.optional()
|
|
1219
1270
|
.describe('Stripe tax config.'),
|
|
1271
|
+
taxCodeId: zod.coerce
|
|
1272
|
+
.string()
|
|
1273
|
+
.regex(updateAddonBodyRateCardsItemTwoTaxConfigOneTaxCodeIdRegExp)
|
|
1274
|
+
.optional()
|
|
1275
|
+
.describe('Tax code reference.\n\nWhen both `taxCodeId` and `stripe.code` are provided, `taxCodeId` takes precedence:\nthe referenced tax code entity is used and `stripe.code` is ignored.'),
|
|
1220
1276
|
})
|
|
1221
1277
|
.describe('Set of provider specific tax configs.')
|
|
1222
1278
|
.optional()
|
|
1223
1279
|
.describe('The tax config of the rate card.\nWhen undefined, the tax config of the feature or the default tax config of the plan is used.'),
|
|
1224
|
-
type: zod
|
|
1280
|
+
type: zod
|
|
1281
|
+
.enum(['usage_based'])
|
|
1282
|
+
.describe('The type of the RateCard.'),
|
|
1225
1283
|
})
|
|
1226
1284
|
.describe('A usage-based rate card defines a price based on usage.'),
|
|
1227
1285
|
])
|
|
@@ -1466,7 +1524,7 @@ export const UpdateAppBody = zod
|
|
|
1466
1524
|
.string()
|
|
1467
1525
|
.optional()
|
|
1468
1526
|
.describe('The Stripe API key.'),
|
|
1469
|
-
type: zod.enum(['stripe']),
|
|
1527
|
+
type: zod.enum(['stripe']).describe("The app's type is Stripe."),
|
|
1470
1528
|
})
|
|
1471
1529
|
.describe('Resource update operation model.'),
|
|
1472
1530
|
zod
|
|
@@ -1486,7 +1544,7 @@ export const UpdateAppBody = zod
|
|
|
1486
1544
|
.min(1)
|
|
1487
1545
|
.max(updateAppBodyTwoNameMax)
|
|
1488
1546
|
.describe('Human-readable name for the resource. Between 1 and 256 characters.'),
|
|
1489
|
-
type: zod.enum(['sandbox']),
|
|
1547
|
+
type: zod.enum(['sandbox']).describe("The app's type is Sandbox."),
|
|
1490
1548
|
})
|
|
1491
1549
|
.describe('Resource update operation model.'),
|
|
1492
1550
|
zod
|
|
@@ -1512,7 +1570,9 @@ export const UpdateAppBody = zod
|
|
|
1512
1570
|
.min(1)
|
|
1513
1571
|
.max(updateAppBodyThreeNameMax)
|
|
1514
1572
|
.describe('Human-readable name for the resource. Between 1 and 256 characters.'),
|
|
1515
|
-
type: zod
|
|
1573
|
+
type: zod
|
|
1574
|
+
.enum(['custom_invoicing'])
|
|
1575
|
+
.describe("The app's type is CustomInvoicing."),
|
|
1516
1576
|
})
|
|
1517
1577
|
.describe('Resource update operation model.'),
|
|
1518
1578
|
])
|
|
@@ -1575,6 +1635,7 @@ if they have customer orverrides or not.
|
|
|
1575
1635
|
export const listBillingProfileCustomerOverridesQueryBillingProfileItemRegExp = /^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/;
|
|
1576
1636
|
export const listBillingProfileCustomerOverridesQueryIncludeAllCustomersDefault = true;
|
|
1577
1637
|
export const listBillingProfileCustomerOverridesQueryCustomerIdItemRegExp = /^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/;
|
|
1638
|
+
export const listBillingProfileCustomerOverridesQueryOrderDefault = 'ASC';
|
|
1578
1639
|
export const listBillingProfileCustomerOverridesQueryPageDefault = 1;
|
|
1579
1640
|
export const listBillingProfileCustomerOverridesQueryPageSizeDefault = 100;
|
|
1580
1641
|
export const listBillingProfileCustomerOverridesQueryPageSizeMax = 1000;
|
|
@@ -1619,7 +1680,11 @@ export const ListBillingProfileCustomerOverridesQueryParams = zod.object({
|
|
|
1619
1680
|
.boolean()
|
|
1620
1681
|
.default(listBillingProfileCustomerOverridesQueryIncludeAllCustomersDefault)
|
|
1621
1682
|
.describe('Include customers without customer overrides.\n\nIf set to false only the customers specifically associated with a billing profile will be returned.\n\nIf set to true, in case of the default billing profile, all customers will be returned.'),
|
|
1622
|
-
order: zod
|
|
1683
|
+
order: zod
|
|
1684
|
+
.enum(['ASC', 'DESC'])
|
|
1685
|
+
.describe('The order direction.')
|
|
1686
|
+
.default(listBillingProfileCustomerOverridesQueryOrderDefault)
|
|
1687
|
+
.describe('The order direction.'),
|
|
1623
1688
|
orderBy: zod
|
|
1624
1689
|
.enum([
|
|
1625
1690
|
'customerId',
|
|
@@ -1724,6 +1789,7 @@ export const createPendingInvoiceLineBodyCurrencyOneRegExp = /^[A-Z]{3}$/;
|
|
|
1724
1789
|
export const createPendingInvoiceLineBodyLinesItemNameMax = 256;
|
|
1725
1790
|
export const createPendingInvoiceLineBodyLinesItemDescriptionMax = 1024;
|
|
1726
1791
|
export const createPendingInvoiceLineBodyLinesItemTaxConfigOneStripeOneCodeRegExp = /^txcd_\d{8}$/;
|
|
1792
|
+
export const createPendingInvoiceLineBodyLinesItemTaxConfigOneTaxCodeIdRegExp = /^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/;
|
|
1727
1793
|
export const createPendingInvoiceLineBodyLinesItemPriceOneOneAmountOneRegExp = /^-?[0-9]+(\.[0-9]+)?$/;
|
|
1728
1794
|
export const createPendingInvoiceLineBodyLinesItemPriceOneOnePaymentTermDefault = 'in_advance';
|
|
1729
1795
|
export const createPendingInvoiceLineBodyLinesItemPriceOneTwoAmountOneRegExp = /^-?[0-9]+(\.[0-9]+)?$/;
|
|
@@ -1747,6 +1813,7 @@ export const createPendingInvoiceLineBodyLinesItemFeatureKeyRegExp = /^[a-z0-9]+
|
|
|
1747
1813
|
export const createPendingInvoiceLineBodyLinesItemRateCardOneFeatureKeyMax = 64;
|
|
1748
1814
|
export const createPendingInvoiceLineBodyLinesItemRateCardOneFeatureKeyRegExp = /^[a-z0-9]+(?:_[a-z0-9]+)*$/;
|
|
1749
1815
|
export const createPendingInvoiceLineBodyLinesItemRateCardOneTaxConfigOneStripeOneCodeRegExp = /^txcd_\d{8}$/;
|
|
1816
|
+
export const createPendingInvoiceLineBodyLinesItemRateCardOneTaxConfigOneTaxCodeIdRegExp = /^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/;
|
|
1750
1817
|
export const createPendingInvoiceLineBodyLinesItemRateCardOnePriceOneOneAmountOneRegExp = /^-?[0-9]+(\.[0-9]+)?$/;
|
|
1751
1818
|
export const createPendingInvoiceLineBodyLinesItemRateCardOnePriceOneOnePaymentTermDefault = 'in_advance';
|
|
1752
1819
|
export const createPendingInvoiceLineBodyLinesItemRateCardOnePriceOneTwoAmountOneRegExp = /^-?[0-9]+(\.[0-9]+)?$/;
|
|
@@ -1826,7 +1893,7 @@ export const CreatePendingInvoiceLineBody = zod
|
|
|
1826
1893
|
.describe('The payment term of a flat price.\nOne of: in_advance or in_arrears.')
|
|
1827
1894
|
.default(createPendingInvoiceLineBodyLinesItemPriceOneOnePaymentTermDefault)
|
|
1828
1895
|
.describe('The payment term of the flat price.\nDefaults to in advance.'),
|
|
1829
|
-
type: zod.enum(['flat']),
|
|
1896
|
+
type: zod.enum(['flat']).describe('The type of the price.'),
|
|
1830
1897
|
})
|
|
1831
1898
|
.describe('Flat price with payment term.'),
|
|
1832
1899
|
zod
|
|
@@ -1848,7 +1915,7 @@ export const CreatePendingInvoiceLineBody = zod
|
|
|
1848
1915
|
.describe('Numeric represents an arbitrary precision number.')
|
|
1849
1916
|
.optional()
|
|
1850
1917
|
.describe('The customer is committed to spend at least the amount.'),
|
|
1851
|
-
type: zod.enum(['unit']),
|
|
1918
|
+
type: zod.enum(['unit']).describe('The type of the price.'),
|
|
1852
1919
|
})
|
|
1853
1920
|
.describe('Unit price with spend commitments.'),
|
|
1854
1921
|
zod
|
|
@@ -1910,7 +1977,9 @@ export const CreatePendingInvoiceLineBody = zod
|
|
|
1910
1977
|
.describe('A price tier.\nAt least one price component is required in each tier.'))
|
|
1911
1978
|
.min(1)
|
|
1912
1979
|
.describe('The tiers of the tiered price.\nAt least one price component is required in each tier.'),
|
|
1913
|
-
type: zod
|
|
1980
|
+
type: zod
|
|
1981
|
+
.enum(['tiered'])
|
|
1982
|
+
.describe('The type of the price.\n\nOne of: flat, unit, or tiered.'),
|
|
1914
1983
|
})
|
|
1915
1984
|
.describe('Tiered price with spend commitments.'),
|
|
1916
1985
|
zod
|
|
@@ -1933,7 +2002,9 @@ export const CreatePendingInvoiceLineBody = zod
|
|
|
1933
2002
|
.describe('Numeric represents an arbitrary precision number.')
|
|
1934
2003
|
.default(createPendingInvoiceLineBodyLinesItemPriceOneFourMultiplierDefault)
|
|
1935
2004
|
.describe('The multiplier to apply to the base price to get the dynamic price.\n\nExamples:\n- 0.0: the price is zero\n- 0.5: the price is 50% of the base price\n- 1.0: the price is the same as the base price\n- 1.5: the price is 150% of the base price'),
|
|
1936
|
-
type: zod
|
|
2005
|
+
type: zod
|
|
2006
|
+
.enum(['dynamic'])
|
|
2007
|
+
.describe('The type of the price.'),
|
|
1937
2008
|
})
|
|
1938
2009
|
.describe('Dynamic price with spend commitments.'),
|
|
1939
2010
|
zod
|
|
@@ -1960,7 +2031,9 @@ export const CreatePendingInvoiceLineBody = zod
|
|
|
1960
2031
|
.regex(createPendingInvoiceLineBodyLinesItemPriceOneFiveQuantityPerPackageOneRegExp)
|
|
1961
2032
|
.describe('Numeric represents an arbitrary precision number.')
|
|
1962
2033
|
.describe('The quantity per package.'),
|
|
1963
|
-
type: zod
|
|
2034
|
+
type: zod
|
|
2035
|
+
.enum(['package'])
|
|
2036
|
+
.describe('The type of the price.'),
|
|
1964
2037
|
})
|
|
1965
2038
|
.describe('Package price with spend commitments.'),
|
|
1966
2039
|
])
|
|
@@ -2027,7 +2100,9 @@ export const CreatePendingInvoiceLineBody = zod
|
|
|
2027
2100
|
.describe('The payment term of a flat price.\nOne of: in_advance or in_arrears.')
|
|
2028
2101
|
.default(createPendingInvoiceLineBodyLinesItemRateCardOnePriceOneOnePaymentTermDefault)
|
|
2029
2102
|
.describe('The payment term of the flat price.\nDefaults to in advance.'),
|
|
2030
|
-
type: zod
|
|
2103
|
+
type: zod
|
|
2104
|
+
.enum(['flat'])
|
|
2105
|
+
.describe('The type of the price.'),
|
|
2031
2106
|
})
|
|
2032
2107
|
.describe('Flat price with payment term.'),
|
|
2033
2108
|
zod
|
|
@@ -2049,7 +2124,9 @@ export const CreatePendingInvoiceLineBody = zod
|
|
|
2049
2124
|
.describe('Numeric represents an arbitrary precision number.')
|
|
2050
2125
|
.optional()
|
|
2051
2126
|
.describe('The customer is committed to spend at least the amount.'),
|
|
2052
|
-
type: zod
|
|
2127
|
+
type: zod
|
|
2128
|
+
.enum(['unit'])
|
|
2129
|
+
.describe('The type of the price.'),
|
|
2053
2130
|
})
|
|
2054
2131
|
.describe('Unit price with spend commitments.'),
|
|
2055
2132
|
zod
|
|
@@ -2111,7 +2188,9 @@ export const CreatePendingInvoiceLineBody = zod
|
|
|
2111
2188
|
.describe('A price tier.\nAt least one price component is required in each tier.'))
|
|
2112
2189
|
.min(1)
|
|
2113
2190
|
.describe('The tiers of the tiered price.\nAt least one price component is required in each tier.'),
|
|
2114
|
-
type: zod
|
|
2191
|
+
type: zod
|
|
2192
|
+
.enum(['tiered'])
|
|
2193
|
+
.describe('The type of the price.\n\nOne of: flat, unit, or tiered.'),
|
|
2115
2194
|
})
|
|
2116
2195
|
.describe('Tiered price with spend commitments.'),
|
|
2117
2196
|
zod
|
|
@@ -2134,7 +2213,9 @@ export const CreatePendingInvoiceLineBody = zod
|
|
|
2134
2213
|
.describe('Numeric represents an arbitrary precision number.')
|
|
2135
2214
|
.default(createPendingInvoiceLineBodyLinesItemRateCardOnePriceOneFourMultiplierDefault)
|
|
2136
2215
|
.describe('The multiplier to apply to the base price to get the dynamic price.\n\nExamples:\n- 0.0: the price is zero\n- 0.5: the price is 50% of the base price\n- 1.0: the price is the same as the base price\n- 1.5: the price is 150% of the base price'),
|
|
2137
|
-
type: zod
|
|
2216
|
+
type: zod
|
|
2217
|
+
.enum(['dynamic'])
|
|
2218
|
+
.describe('The type of the price.'),
|
|
2138
2219
|
})
|
|
2139
2220
|
.describe('Dynamic price with spend commitments.'),
|
|
2140
2221
|
zod
|
|
@@ -2161,7 +2242,9 @@ export const CreatePendingInvoiceLineBody = zod
|
|
|
2161
2242
|
.regex(createPendingInvoiceLineBodyLinesItemRateCardOnePriceOneFiveQuantityPerPackageOneRegExp)
|
|
2162
2243
|
.describe('Numeric represents an arbitrary precision number.')
|
|
2163
2244
|
.describe('The quantity per package.'),
|
|
2164
|
-
type: zod
|
|
2245
|
+
type: zod
|
|
2246
|
+
.enum(['package'])
|
|
2247
|
+
.describe('The type of the price.'),
|
|
2165
2248
|
})
|
|
2166
2249
|
.describe('Package price with spend commitments.'),
|
|
2167
2250
|
])
|
|
@@ -2194,6 +2277,11 @@ export const CreatePendingInvoiceLineBody = zod
|
|
|
2194
2277
|
.describe('The tax config for Stripe.')
|
|
2195
2278
|
.optional()
|
|
2196
2279
|
.describe('Stripe tax config.'),
|
|
2280
|
+
taxCodeId: zod.coerce
|
|
2281
|
+
.string()
|
|
2282
|
+
.regex(createPendingInvoiceLineBodyLinesItemRateCardOneTaxConfigOneTaxCodeIdRegExp)
|
|
2283
|
+
.optional()
|
|
2284
|
+
.describe('Tax code reference.\n\nWhen both `taxCodeId` and `stripe.code` are provided, `taxCodeId` takes precedence:\nthe referenced tax code entity is used and `stripe.code` is ignored.'),
|
|
2197
2285
|
})
|
|
2198
2286
|
.describe('Set of provider specific tax configs.')
|
|
2199
2287
|
.optional()
|
|
@@ -2228,6 +2316,11 @@ export const CreatePendingInvoiceLineBody = zod
|
|
|
2228
2316
|
.describe('The tax config for Stripe.')
|
|
2229
2317
|
.optional()
|
|
2230
2318
|
.describe('Stripe tax config.'),
|
|
2319
|
+
taxCodeId: zod.coerce
|
|
2320
|
+
.string()
|
|
2321
|
+
.regex(createPendingInvoiceLineBodyLinesItemTaxConfigOneTaxCodeIdRegExp)
|
|
2322
|
+
.optional()
|
|
2323
|
+
.describe('Tax code reference.\n\nWhen both `taxCodeId` and `stripe.code` are provided, `taxCodeId` takes precedence:\nthe referenced tax code entity is used and `stripe.code` is ignored.'),
|
|
2231
2324
|
})
|
|
2232
2325
|
.describe('Set of provider specific tax configs.')
|
|
2233
2326
|
.optional()
|
|
@@ -2257,6 +2350,7 @@ export const simulateInvoiceBodyCurrencyOneRegExp = /^[A-Z]{3}$/;
|
|
|
2257
2350
|
export const simulateInvoiceBodyLinesItemNameMax = 256;
|
|
2258
2351
|
export const simulateInvoiceBodyLinesItemDescriptionMax = 1024;
|
|
2259
2352
|
export const simulateInvoiceBodyLinesItemTaxConfigOneStripeOneCodeRegExp = /^txcd_\d{8}$/;
|
|
2353
|
+
export const simulateInvoiceBodyLinesItemTaxConfigOneTaxCodeIdRegExp = /^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/;
|
|
2260
2354
|
export const simulateInvoiceBodyLinesItemPriceOneOneAmountOneRegExp = /^-?[0-9]+(\.[0-9]+)?$/;
|
|
2261
2355
|
export const simulateInvoiceBodyLinesItemPriceOneOnePaymentTermDefault = 'in_advance';
|
|
2262
2356
|
export const simulateInvoiceBodyLinesItemPriceOneTwoAmountOneRegExp = /^-?[0-9]+(\.[0-9]+)?$/;
|
|
@@ -2280,6 +2374,7 @@ export const simulateInvoiceBodyLinesItemFeatureKeyRegExp = /^[a-z0-9]+(?:_[a-z0
|
|
|
2280
2374
|
export const simulateInvoiceBodyLinesItemRateCardOneFeatureKeyMax = 64;
|
|
2281
2375
|
export const simulateInvoiceBodyLinesItemRateCardOneFeatureKeyRegExp = /^[a-z0-9]+(?:_[a-z0-9]+)*$/;
|
|
2282
2376
|
export const simulateInvoiceBodyLinesItemRateCardOneTaxConfigOneStripeOneCodeRegExp = /^txcd_\d{8}$/;
|
|
2377
|
+
export const simulateInvoiceBodyLinesItemRateCardOneTaxConfigOneTaxCodeIdRegExp = /^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/;
|
|
2283
2378
|
export const simulateInvoiceBodyLinesItemRateCardOnePriceOneOneAmountOneRegExp = /^-?[0-9]+(\.[0-9]+)?$/;
|
|
2284
2379
|
export const simulateInvoiceBodyLinesItemRateCardOnePriceOneOnePaymentTermDefault = 'in_advance';
|
|
2285
2380
|
export const simulateInvoiceBodyLinesItemRateCardOnePriceOneTwoAmountOneRegExp = /^-?[0-9]+(\.[0-9]+)?$/;
|
|
@@ -2373,7 +2468,7 @@ export const SimulateInvoiceBody = zod
|
|
|
2373
2468
|
.describe('The payment term of a flat price.\nOne of: in_advance or in_arrears.')
|
|
2374
2469
|
.default(simulateInvoiceBodyLinesItemPriceOneOnePaymentTermDefault)
|
|
2375
2470
|
.describe('The payment term of the flat price.\nDefaults to in advance.'),
|
|
2376
|
-
type: zod.enum(['flat']),
|
|
2471
|
+
type: zod.enum(['flat']).describe('The type of the price.'),
|
|
2377
2472
|
})
|
|
2378
2473
|
.describe('Flat price with payment term.'),
|
|
2379
2474
|
zod
|
|
@@ -2395,7 +2490,7 @@ export const SimulateInvoiceBody = zod
|
|
|
2395
2490
|
.describe('Numeric represents an arbitrary precision number.')
|
|
2396
2491
|
.optional()
|
|
2397
2492
|
.describe('The customer is committed to spend at least the amount.'),
|
|
2398
|
-
type: zod.enum(['unit']),
|
|
2493
|
+
type: zod.enum(['unit']).describe('The type of the price.'),
|
|
2399
2494
|
})
|
|
2400
2495
|
.describe('Unit price with spend commitments.'),
|
|
2401
2496
|
zod
|
|
@@ -2457,7 +2552,9 @@ export const SimulateInvoiceBody = zod
|
|
|
2457
2552
|
.describe('A price tier.\nAt least one price component is required in each tier.'))
|
|
2458
2553
|
.min(1)
|
|
2459
2554
|
.describe('The tiers of the tiered price.\nAt least one price component is required in each tier.'),
|
|
2460
|
-
type: zod
|
|
2555
|
+
type: zod
|
|
2556
|
+
.enum(['tiered'])
|
|
2557
|
+
.describe('The type of the price.\n\nOne of: flat, unit, or tiered.'),
|
|
2461
2558
|
})
|
|
2462
2559
|
.describe('Tiered price with spend commitments.'),
|
|
2463
2560
|
zod
|
|
@@ -2480,7 +2577,9 @@ export const SimulateInvoiceBody = zod
|
|
|
2480
2577
|
.describe('Numeric represents an arbitrary precision number.')
|
|
2481
2578
|
.default(simulateInvoiceBodyLinesItemPriceOneFourMultiplierDefault)
|
|
2482
2579
|
.describe('The multiplier to apply to the base price to get the dynamic price.\n\nExamples:\n- 0.0: the price is zero\n- 0.5: the price is 50% of the base price\n- 1.0: the price is the same as the base price\n- 1.5: the price is 150% of the base price'),
|
|
2483
|
-
type: zod
|
|
2580
|
+
type: zod
|
|
2581
|
+
.enum(['dynamic'])
|
|
2582
|
+
.describe('The type of the price.'),
|
|
2484
2583
|
})
|
|
2485
2584
|
.describe('Dynamic price with spend commitments.'),
|
|
2486
2585
|
zod
|
|
@@ -2507,7 +2606,9 @@ export const SimulateInvoiceBody = zod
|
|
|
2507
2606
|
.regex(simulateInvoiceBodyLinesItemPriceOneFiveQuantityPerPackageOneRegExp)
|
|
2508
2607
|
.describe('Numeric represents an arbitrary precision number.')
|
|
2509
2608
|
.describe('The quantity per package.'),
|
|
2510
|
-
type: zod
|
|
2609
|
+
type: zod
|
|
2610
|
+
.enum(['package'])
|
|
2611
|
+
.describe('The type of the price.'),
|
|
2511
2612
|
})
|
|
2512
2613
|
.describe('Package price with spend commitments.'),
|
|
2513
2614
|
])
|
|
@@ -2579,7 +2680,9 @@ export const SimulateInvoiceBody = zod
|
|
|
2579
2680
|
.describe('The payment term of a flat price.\nOne of: in_advance or in_arrears.')
|
|
2580
2681
|
.default(simulateInvoiceBodyLinesItemRateCardOnePriceOneOnePaymentTermDefault)
|
|
2581
2682
|
.describe('The payment term of the flat price.\nDefaults to in advance.'),
|
|
2582
|
-
type: zod
|
|
2683
|
+
type: zod
|
|
2684
|
+
.enum(['flat'])
|
|
2685
|
+
.describe('The type of the price.'),
|
|
2583
2686
|
})
|
|
2584
2687
|
.describe('Flat price with payment term.'),
|
|
2585
2688
|
zod
|
|
@@ -2601,7 +2704,9 @@ export const SimulateInvoiceBody = zod
|
|
|
2601
2704
|
.describe('Numeric represents an arbitrary precision number.')
|
|
2602
2705
|
.optional()
|
|
2603
2706
|
.describe('The customer is committed to spend at least the amount.'),
|
|
2604
|
-
type: zod
|
|
2707
|
+
type: zod
|
|
2708
|
+
.enum(['unit'])
|
|
2709
|
+
.describe('The type of the price.'),
|
|
2605
2710
|
})
|
|
2606
2711
|
.describe('Unit price with spend commitments.'),
|
|
2607
2712
|
zod
|
|
@@ -2663,7 +2768,9 @@ export const SimulateInvoiceBody = zod
|
|
|
2663
2768
|
.describe('A price tier.\nAt least one price component is required in each tier.'))
|
|
2664
2769
|
.min(1)
|
|
2665
2770
|
.describe('The tiers of the tiered price.\nAt least one price component is required in each tier.'),
|
|
2666
|
-
type: zod
|
|
2771
|
+
type: zod
|
|
2772
|
+
.enum(['tiered'])
|
|
2773
|
+
.describe('The type of the price.\n\nOne of: flat, unit, or tiered.'),
|
|
2667
2774
|
})
|
|
2668
2775
|
.describe('Tiered price with spend commitments.'),
|
|
2669
2776
|
zod
|
|
@@ -2686,7 +2793,9 @@ export const SimulateInvoiceBody = zod
|
|
|
2686
2793
|
.describe('Numeric represents an arbitrary precision number.')
|
|
2687
2794
|
.default(simulateInvoiceBodyLinesItemRateCardOnePriceOneFourMultiplierDefault)
|
|
2688
2795
|
.describe('The multiplier to apply to the base price to get the dynamic price.\n\nExamples:\n- 0.0: the price is zero\n- 0.5: the price is 50% of the base price\n- 1.0: the price is the same as the base price\n- 1.5: the price is 150% of the base price'),
|
|
2689
|
-
type: zod
|
|
2796
|
+
type: zod
|
|
2797
|
+
.enum(['dynamic'])
|
|
2798
|
+
.describe('The type of the price.'),
|
|
2690
2799
|
})
|
|
2691
2800
|
.describe('Dynamic price with spend commitments.'),
|
|
2692
2801
|
zod
|
|
@@ -2713,7 +2822,9 @@ export const SimulateInvoiceBody = zod
|
|
|
2713
2822
|
.regex(simulateInvoiceBodyLinesItemRateCardOnePriceOneFiveQuantityPerPackageOneRegExp)
|
|
2714
2823
|
.describe('Numeric represents an arbitrary precision number.')
|
|
2715
2824
|
.describe('The quantity per package.'),
|
|
2716
|
-
type: zod
|
|
2825
|
+
type: zod
|
|
2826
|
+
.enum(['package'])
|
|
2827
|
+
.describe('The type of the price.'),
|
|
2717
2828
|
})
|
|
2718
2829
|
.describe('Package price with spend commitments.'),
|
|
2719
2830
|
])
|
|
@@ -2746,6 +2857,11 @@ export const SimulateInvoiceBody = zod
|
|
|
2746
2857
|
.describe('The tax config for Stripe.')
|
|
2747
2858
|
.optional()
|
|
2748
2859
|
.describe('Stripe tax config.'),
|
|
2860
|
+
taxCodeId: zod.coerce
|
|
2861
|
+
.string()
|
|
2862
|
+
.regex(simulateInvoiceBodyLinesItemRateCardOneTaxConfigOneTaxCodeIdRegExp)
|
|
2863
|
+
.optional()
|
|
2864
|
+
.describe('Tax code reference.\n\nWhen both `taxCodeId` and `stripe.code` are provided, `taxCodeId` takes precedence:\nthe referenced tax code entity is used and `stripe.code` is ignored.'),
|
|
2749
2865
|
})
|
|
2750
2866
|
.describe('Set of provider specific tax configs.')
|
|
2751
2867
|
.optional()
|
|
@@ -2780,6 +2896,11 @@ export const SimulateInvoiceBody = zod
|
|
|
2780
2896
|
.describe('The tax config for Stripe.')
|
|
2781
2897
|
.optional()
|
|
2782
2898
|
.describe('Stripe tax config.'),
|
|
2899
|
+
taxCodeId: zod.coerce
|
|
2900
|
+
.string()
|
|
2901
|
+
.regex(simulateInvoiceBodyLinesItemTaxConfigOneTaxCodeIdRegExp)
|
|
2902
|
+
.optional()
|
|
2903
|
+
.describe('Tax code reference.\n\nWhen both `taxCodeId` and `stripe.code` are provided, `taxCodeId` takes precedence:\nthe referenced tax code entity is used and `stripe.code` is ignored.'),
|
|
2783
2904
|
})
|
|
2784
2905
|
.describe('Set of provider specific tax configs.')
|
|
2785
2906
|
.optional()
|
|
@@ -2809,6 +2930,7 @@ export const listInvoicesQueryCustomersItemRegExp = /^[0-7][0-9A-HJKMNP-TV-Za-hj
|
|
|
2809
2930
|
export const listInvoicesQueryPageDefault = 1;
|
|
2810
2931
|
export const listInvoicesQueryPageSizeDefault = 100;
|
|
2811
2932
|
export const listInvoicesQueryPageSizeMax = 1000;
|
|
2933
|
+
export const listInvoicesQueryOrderDefault = 'ASC';
|
|
2812
2934
|
export const ListInvoicesQueryParams = zod.object({
|
|
2813
2935
|
createdAfter: zod.coerce
|
|
2814
2936
|
.date()
|
|
@@ -2847,7 +2969,11 @@ export const ListInvoicesQueryParams = zod.object({
|
|
|
2847
2969
|
.date()
|
|
2848
2970
|
.optional()
|
|
2849
2971
|
.describe('Filter by invoice issued time.\nInclusive.'),
|
|
2850
|
-
order: zod
|
|
2972
|
+
order: zod
|
|
2973
|
+
.enum(['ASC', 'DESC'])
|
|
2974
|
+
.describe('The order direction.')
|
|
2975
|
+
.default(listInvoicesQueryOrderDefault)
|
|
2976
|
+
.describe('The order direction.'),
|
|
2851
2977
|
orderBy: zod
|
|
2852
2978
|
.enum([
|
|
2853
2979
|
'customer.name',
|
|
@@ -2997,6 +3123,7 @@ export const updateInvoiceBodyCustomerOneAddressesMax = 1;
|
|
|
2997
3123
|
export const updateInvoiceBodyLinesItemNameMax = 256;
|
|
2998
3124
|
export const updateInvoiceBodyLinesItemDescriptionMax = 1024;
|
|
2999
3125
|
export const updateInvoiceBodyLinesItemTaxConfigOneStripeOneCodeRegExp = /^txcd_\d{8}$/;
|
|
3126
|
+
export const updateInvoiceBodyLinesItemTaxConfigOneTaxCodeIdRegExp = /^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/;
|
|
3000
3127
|
export const updateInvoiceBodyLinesItemPriceOneOneAmountOneRegExp = /^-?[0-9]+(\.[0-9]+)?$/;
|
|
3001
3128
|
export const updateInvoiceBodyLinesItemPriceOneOnePaymentTermDefault = 'in_advance';
|
|
3002
3129
|
export const updateInvoiceBodyLinesItemPriceOneTwoAmountOneRegExp = /^-?[0-9]+(\.[0-9]+)?$/;
|
|
@@ -3020,6 +3147,7 @@ export const updateInvoiceBodyLinesItemFeatureKeyRegExp = /^[a-z0-9]+(?:_[a-z0-9
|
|
|
3020
3147
|
export const updateInvoiceBodyLinesItemRateCardOneFeatureKeyMax = 64;
|
|
3021
3148
|
export const updateInvoiceBodyLinesItemRateCardOneFeatureKeyRegExp = /^[a-z0-9]+(?:_[a-z0-9]+)*$/;
|
|
3022
3149
|
export const updateInvoiceBodyLinesItemRateCardOneTaxConfigOneStripeOneCodeRegExp = /^txcd_\d{8}$/;
|
|
3150
|
+
export const updateInvoiceBodyLinesItemRateCardOneTaxConfigOneTaxCodeIdRegExp = /^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/;
|
|
3023
3151
|
export const updateInvoiceBodyLinesItemRateCardOnePriceOneOneAmountOneRegExp = /^-?[0-9]+(\.[0-9]+)?$/;
|
|
3024
3152
|
export const updateInvoiceBodyLinesItemRateCardOnePriceOneOnePaymentTermDefault = 'in_advance';
|
|
3025
3153
|
export const updateInvoiceBodyLinesItemRateCardOnePriceOneTwoAmountOneRegExp = /^-?[0-9]+(\.[0-9]+)?$/;
|
|
@@ -3046,6 +3174,7 @@ export const updateInvoiceBodyWorkflowOneWorkflowOneInvoicingOneAutoAdvanceDefau
|
|
|
3046
3174
|
export const updateInvoiceBodyWorkflowOneWorkflowOneInvoicingOneDraftPeriodDefault = 'P0D';
|
|
3047
3175
|
export const updateInvoiceBodyWorkflowOneWorkflowOneInvoicingOneDueAfterDefault = 'P30D';
|
|
3048
3176
|
export const updateInvoiceBodyWorkflowOneWorkflowOneInvoicingOneDefaultTaxConfigOneStripeOneCodeRegExp = /^txcd_\d{8}$/;
|
|
3177
|
+
export const updateInvoiceBodyWorkflowOneWorkflowOneInvoicingOneDefaultTaxConfigOneTaxCodeIdRegExp = /^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/;
|
|
3049
3178
|
export const updateInvoiceBodyWorkflowOneWorkflowOnePaymentOneCollectionMethodDefault = 'charge_automatically';
|
|
3050
3179
|
export const UpdateInvoiceBody = zod
|
|
3051
3180
|
.object({
|
|
@@ -3173,7 +3302,7 @@ export const UpdateInvoiceBody = zod
|
|
|
3173
3302
|
.describe('The payment term of a flat price.\nOne of: in_advance or in_arrears.')
|
|
3174
3303
|
.default(updateInvoiceBodyLinesItemPriceOneOnePaymentTermDefault)
|
|
3175
3304
|
.describe('The payment term of the flat price.\nDefaults to in advance.'),
|
|
3176
|
-
type: zod.enum(['flat']),
|
|
3305
|
+
type: zod.enum(['flat']).describe('The type of the price.'),
|
|
3177
3306
|
})
|
|
3178
3307
|
.describe('Flat price with payment term.'),
|
|
3179
3308
|
zod
|
|
@@ -3195,7 +3324,7 @@ export const UpdateInvoiceBody = zod
|
|
|
3195
3324
|
.describe('Numeric represents an arbitrary precision number.')
|
|
3196
3325
|
.optional()
|
|
3197
3326
|
.describe('The customer is committed to spend at least the amount.'),
|
|
3198
|
-
type: zod.enum(['unit']),
|
|
3327
|
+
type: zod.enum(['unit']).describe('The type of the price.'),
|
|
3199
3328
|
})
|
|
3200
3329
|
.describe('Unit price with spend commitments.'),
|
|
3201
3330
|
zod
|
|
@@ -3257,7 +3386,9 @@ export const UpdateInvoiceBody = zod
|
|
|
3257
3386
|
.describe('A price tier.\nAt least one price component is required in each tier.'))
|
|
3258
3387
|
.min(1)
|
|
3259
3388
|
.describe('The tiers of the tiered price.\nAt least one price component is required in each tier.'),
|
|
3260
|
-
type: zod
|
|
3389
|
+
type: zod
|
|
3390
|
+
.enum(['tiered'])
|
|
3391
|
+
.describe('The type of the price.\n\nOne of: flat, unit, or tiered.'),
|
|
3261
3392
|
})
|
|
3262
3393
|
.describe('Tiered price with spend commitments.'),
|
|
3263
3394
|
zod
|
|
@@ -3280,7 +3411,9 @@ export const UpdateInvoiceBody = zod
|
|
|
3280
3411
|
.describe('Numeric represents an arbitrary precision number.')
|
|
3281
3412
|
.default(updateInvoiceBodyLinesItemPriceOneFourMultiplierDefault)
|
|
3282
3413
|
.describe('The multiplier to apply to the base price to get the dynamic price.\n\nExamples:\n- 0.0: the price is zero\n- 0.5: the price is 50% of the base price\n- 1.0: the price is the same as the base price\n- 1.5: the price is 150% of the base price'),
|
|
3283
|
-
type: zod
|
|
3414
|
+
type: zod
|
|
3415
|
+
.enum(['dynamic'])
|
|
3416
|
+
.describe('The type of the price.'),
|
|
3284
3417
|
})
|
|
3285
3418
|
.describe('Dynamic price with spend commitments.'),
|
|
3286
3419
|
zod
|
|
@@ -3307,7 +3440,9 @@ export const UpdateInvoiceBody = zod
|
|
|
3307
3440
|
.regex(updateInvoiceBodyLinesItemPriceOneFiveQuantityPerPackageOneRegExp)
|
|
3308
3441
|
.describe('Numeric represents an arbitrary precision number.')
|
|
3309
3442
|
.describe('The quantity per package.'),
|
|
3310
|
-
type: zod
|
|
3443
|
+
type: zod
|
|
3444
|
+
.enum(['package'])
|
|
3445
|
+
.describe('The type of the price.'),
|
|
3311
3446
|
})
|
|
3312
3447
|
.describe('Package price with spend commitments.'),
|
|
3313
3448
|
])
|
|
@@ -3374,7 +3509,9 @@ export const UpdateInvoiceBody = zod
|
|
|
3374
3509
|
.describe('The payment term of a flat price.\nOne of: in_advance or in_arrears.')
|
|
3375
3510
|
.default(updateInvoiceBodyLinesItemRateCardOnePriceOneOnePaymentTermDefault)
|
|
3376
3511
|
.describe('The payment term of the flat price.\nDefaults to in advance.'),
|
|
3377
|
-
type: zod
|
|
3512
|
+
type: zod
|
|
3513
|
+
.enum(['flat'])
|
|
3514
|
+
.describe('The type of the price.'),
|
|
3378
3515
|
})
|
|
3379
3516
|
.describe('Flat price with payment term.'),
|
|
3380
3517
|
zod
|
|
@@ -3396,7 +3533,9 @@ export const UpdateInvoiceBody = zod
|
|
|
3396
3533
|
.describe('Numeric represents an arbitrary precision number.')
|
|
3397
3534
|
.optional()
|
|
3398
3535
|
.describe('The customer is committed to spend at least the amount.'),
|
|
3399
|
-
type: zod
|
|
3536
|
+
type: zod
|
|
3537
|
+
.enum(['unit'])
|
|
3538
|
+
.describe('The type of the price.'),
|
|
3400
3539
|
})
|
|
3401
3540
|
.describe('Unit price with spend commitments.'),
|
|
3402
3541
|
zod
|
|
@@ -3458,7 +3597,9 @@ export const UpdateInvoiceBody = zod
|
|
|
3458
3597
|
.describe('A price tier.\nAt least one price component is required in each tier.'))
|
|
3459
3598
|
.min(1)
|
|
3460
3599
|
.describe('The tiers of the tiered price.\nAt least one price component is required in each tier.'),
|
|
3461
|
-
type: zod
|
|
3600
|
+
type: zod
|
|
3601
|
+
.enum(['tiered'])
|
|
3602
|
+
.describe('The type of the price.\n\nOne of: flat, unit, or tiered.'),
|
|
3462
3603
|
})
|
|
3463
3604
|
.describe('Tiered price with spend commitments.'),
|
|
3464
3605
|
zod
|
|
@@ -3481,7 +3622,9 @@ export const UpdateInvoiceBody = zod
|
|
|
3481
3622
|
.describe('Numeric represents an arbitrary precision number.')
|
|
3482
3623
|
.default(updateInvoiceBodyLinesItemRateCardOnePriceOneFourMultiplierDefault)
|
|
3483
3624
|
.describe('The multiplier to apply to the base price to get the dynamic price.\n\nExamples:\n- 0.0: the price is zero\n- 0.5: the price is 50% of the base price\n- 1.0: the price is the same as the base price\n- 1.5: the price is 150% of the base price'),
|
|
3484
|
-
type: zod
|
|
3625
|
+
type: zod
|
|
3626
|
+
.enum(['dynamic'])
|
|
3627
|
+
.describe('The type of the price.'),
|
|
3485
3628
|
})
|
|
3486
3629
|
.describe('Dynamic price with spend commitments.'),
|
|
3487
3630
|
zod
|
|
@@ -3508,7 +3651,9 @@ export const UpdateInvoiceBody = zod
|
|
|
3508
3651
|
.regex(updateInvoiceBodyLinesItemRateCardOnePriceOneFiveQuantityPerPackageOneRegExp)
|
|
3509
3652
|
.describe('Numeric represents an arbitrary precision number.')
|
|
3510
3653
|
.describe('The quantity per package.'),
|
|
3511
|
-
type: zod
|
|
3654
|
+
type: zod
|
|
3655
|
+
.enum(['package'])
|
|
3656
|
+
.describe('The type of the price.'),
|
|
3512
3657
|
})
|
|
3513
3658
|
.describe('Package price with spend commitments.'),
|
|
3514
3659
|
])
|
|
@@ -3541,6 +3686,11 @@ export const UpdateInvoiceBody = zod
|
|
|
3541
3686
|
.describe('The tax config for Stripe.')
|
|
3542
3687
|
.optional()
|
|
3543
3688
|
.describe('Stripe tax config.'),
|
|
3689
|
+
taxCodeId: zod.coerce
|
|
3690
|
+
.string()
|
|
3691
|
+
.regex(updateInvoiceBodyLinesItemRateCardOneTaxConfigOneTaxCodeIdRegExp)
|
|
3692
|
+
.optional()
|
|
3693
|
+
.describe('Tax code reference.\n\nWhen both `taxCodeId` and `stripe.code` are provided, `taxCodeId` takes precedence:\nthe referenced tax code entity is used and `stripe.code` is ignored.'),
|
|
3544
3694
|
})
|
|
3545
3695
|
.describe('Set of provider specific tax configs.')
|
|
3546
3696
|
.optional()
|
|
@@ -3575,6 +3725,11 @@ export const UpdateInvoiceBody = zod
|
|
|
3575
3725
|
.describe('The tax config for Stripe.')
|
|
3576
3726
|
.optional()
|
|
3577
3727
|
.describe('Stripe tax config.'),
|
|
3728
|
+
taxCodeId: zod.coerce
|
|
3729
|
+
.string()
|
|
3730
|
+
.regex(updateInvoiceBodyLinesItemTaxConfigOneTaxCodeIdRegExp)
|
|
3731
|
+
.optional()
|
|
3732
|
+
.describe('Tax code reference.\n\nWhen both `taxCodeId` and `stripe.code` are provided, `taxCodeId` takes precedence:\nthe referenced tax code entity is used and `stripe.code` is ignored.'),
|
|
3578
3733
|
})
|
|
3579
3734
|
.describe('Set of provider specific tax configs.')
|
|
3580
3735
|
.optional()
|
|
@@ -3688,6 +3843,11 @@ export const UpdateInvoiceBody = zod
|
|
|
3688
3843
|
.describe('The tax config for Stripe.')
|
|
3689
3844
|
.optional()
|
|
3690
3845
|
.describe('Stripe tax config.'),
|
|
3846
|
+
taxCodeId: zod.coerce
|
|
3847
|
+
.string()
|
|
3848
|
+
.regex(updateInvoiceBodyWorkflowOneWorkflowOneInvoicingOneDefaultTaxConfigOneTaxCodeIdRegExp)
|
|
3849
|
+
.optional()
|
|
3850
|
+
.describe('Tax code reference.\n\nWhen both `taxCodeId` and `stripe.code` are provided, `taxCodeId` takes precedence:\nthe referenced tax code entity is used and `stripe.code` is ignored.'),
|
|
3691
3851
|
})
|
|
3692
3852
|
.describe('Set of provider specific tax configs.')
|
|
3693
3853
|
.optional()
|
|
@@ -3805,7 +3965,9 @@ export const VoidInvoiceActionBody = zod
|
|
|
3805
3965
|
.union([
|
|
3806
3966
|
zod
|
|
3807
3967
|
.object({
|
|
3808
|
-
type: zod
|
|
3968
|
+
type: zod
|
|
3969
|
+
.enum(['discard'])
|
|
3970
|
+
.describe('The action to take on the line item.'),
|
|
3809
3971
|
})
|
|
3810
3972
|
.describe('VoidInvoiceLineDiscardAction describes how to handle the voidied line item in the invoice.'),
|
|
3811
3973
|
zod
|
|
@@ -3814,7 +3976,9 @@ export const VoidInvoiceActionBody = zod
|
|
|
3814
3976
|
.date()
|
|
3815
3977
|
.optional()
|
|
3816
3978
|
.describe('The time at which the line item should be invoiced again.\n\nIf not provided, the line item will be re-invoiced now.'),
|
|
3817
|
-
type: zod
|
|
3979
|
+
type: zod
|
|
3980
|
+
.enum(['pending'])
|
|
3981
|
+
.describe('The action to take on the line item.'),
|
|
3818
3982
|
})
|
|
3819
3983
|
.describe('VoidInvoiceLinePendingAction describes how to handle the voidied line item in the invoice.'),
|
|
3820
3984
|
])
|
|
@@ -3836,7 +4000,9 @@ export const VoidInvoiceActionBody = zod
|
|
|
3836
4000
|
.union([
|
|
3837
4001
|
zod
|
|
3838
4002
|
.object({
|
|
3839
|
-
type: zod
|
|
4003
|
+
type: zod
|
|
4004
|
+
.enum(['discard'])
|
|
4005
|
+
.describe('The action to take on the line item.'),
|
|
3840
4006
|
})
|
|
3841
4007
|
.describe('VoidInvoiceLineDiscardAction describes how to handle the voidied line item in the invoice.'),
|
|
3842
4008
|
zod
|
|
@@ -3845,7 +4011,9 @@ export const VoidInvoiceActionBody = zod
|
|
|
3845
4011
|
.date()
|
|
3846
4012
|
.optional()
|
|
3847
4013
|
.describe('The time at which the line item should be invoiced again.\n\nIf not provided, the line item will be re-invoiced now.'),
|
|
3848
|
-
type: zod
|
|
4014
|
+
type: zod
|
|
4015
|
+
.enum(['pending'])
|
|
4016
|
+
.describe('The action to take on the line item.'),
|
|
3849
4017
|
})
|
|
3850
4018
|
.describe('VoidInvoiceLinePendingAction describes how to handle the voidied line item in the invoice.'),
|
|
3851
4019
|
])
|
|
@@ -3881,6 +4049,7 @@ export const listBillingProfilesQueryIncludeArchivedDefault = false;
|
|
|
3881
4049
|
export const listBillingProfilesQueryPageDefault = 1;
|
|
3882
4050
|
export const listBillingProfilesQueryPageSizeDefault = 100;
|
|
3883
4051
|
export const listBillingProfilesQueryPageSizeMax = 1000;
|
|
4052
|
+
export const listBillingProfilesQueryOrderDefault = 'ASC';
|
|
3884
4053
|
export const ListBillingProfilesQueryParams = zod.object({
|
|
3885
4054
|
expand: zod
|
|
3886
4055
|
.array(zod
|
|
@@ -3890,7 +4059,11 @@ export const ListBillingProfilesQueryParams = zod.object({
|
|
|
3890
4059
|
includeArchived: zod.coerce
|
|
3891
4060
|
.boolean()
|
|
3892
4061
|
.default(listBillingProfilesQueryIncludeArchivedDefault),
|
|
3893
|
-
order: zod
|
|
4062
|
+
order: zod
|
|
4063
|
+
.enum(['ASC', 'DESC'])
|
|
4064
|
+
.describe('The order direction.')
|
|
4065
|
+
.default(listBillingProfilesQueryOrderDefault)
|
|
4066
|
+
.describe('The order direction.'),
|
|
3894
4067
|
orderBy: zod
|
|
3895
4068
|
.enum(['createdAt', 'updatedAt', 'default', 'name'])
|
|
3896
4069
|
.optional()
|
|
@@ -3930,6 +4103,7 @@ export const createBillingProfileBodyWorkflowOneInvoicingOneDraftPeriodDefault =
|
|
|
3930
4103
|
export const createBillingProfileBodyWorkflowOneInvoicingOneDueAfterDefault = 'P30D';
|
|
3931
4104
|
export const createBillingProfileBodyWorkflowOneInvoicingOneProgressiveBillingDefault = true;
|
|
3932
4105
|
export const createBillingProfileBodyWorkflowOneInvoicingOneDefaultTaxConfigOneStripeOneCodeRegExp = /^txcd_\d{8}$/;
|
|
4106
|
+
export const createBillingProfileBodyWorkflowOneInvoicingOneDefaultTaxConfigOneTaxCodeIdRegExp = /^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/;
|
|
3933
4107
|
export const createBillingProfileBodyWorkflowOnePaymentOneCollectionMethodDefault = 'charge_automatically';
|
|
3934
4108
|
export const createBillingProfileBodyWorkflowOneTaxOneEnabledDefault = true;
|
|
3935
4109
|
export const createBillingProfileBodyWorkflowOneTaxOneEnforcedDefault = false;
|
|
@@ -4048,7 +4222,9 @@ export const CreateBillingProfileBody = zod
|
|
|
4048
4222
|
.union([
|
|
4049
4223
|
zod
|
|
4050
4224
|
.object({
|
|
4051
|
-
type: zod
|
|
4225
|
+
type: zod
|
|
4226
|
+
.enum(['subscription'])
|
|
4227
|
+
.describe('The type of alignment.'),
|
|
4052
4228
|
})
|
|
4053
4229
|
.describe('BillingWorkflowCollectionAlignmentSubscription specifies the alignment for collecting the pending line items\ninto an invoice.'),
|
|
4054
4230
|
zod
|
|
@@ -4072,7 +4248,9 @@ export const CreateBillingProfileBody = zod
|
|
|
4072
4248
|
})
|
|
4073
4249
|
.describe('Recurring period with an interval and an anchor.')
|
|
4074
4250
|
.describe('The recurring period for the alignment.'),
|
|
4075
|
-
type: zod
|
|
4251
|
+
type: zod
|
|
4252
|
+
.enum(['anchored'])
|
|
4253
|
+
.describe('The type of alignment.'),
|
|
4076
4254
|
})
|
|
4077
4255
|
.describe('BillingWorkflowCollectionAlignmentAnchored specifies the alignment for collecting the pending line items\ninto an invoice.'),
|
|
4078
4256
|
])
|
|
@@ -4119,6 +4297,11 @@ export const CreateBillingProfileBody = zod
|
|
|
4119
4297
|
.describe('The tax config for Stripe.')
|
|
4120
4298
|
.optional()
|
|
4121
4299
|
.describe('Stripe tax config.'),
|
|
4300
|
+
taxCodeId: zod.coerce
|
|
4301
|
+
.string()
|
|
4302
|
+
.regex(createBillingProfileBodyWorkflowOneInvoicingOneDefaultTaxConfigOneTaxCodeIdRegExp)
|
|
4303
|
+
.optional()
|
|
4304
|
+
.describe('Tax code reference.\n\nWhen both `taxCodeId` and `stripe.code` are provided, `taxCodeId` takes precedence:\nthe referenced tax code entity is used and `stripe.code` is ignored.'),
|
|
4122
4305
|
})
|
|
4123
4306
|
.describe('Set of provider specific tax configs.')
|
|
4124
4307
|
.optional()
|
|
@@ -4228,6 +4411,7 @@ export const updateBillingProfileBodyWorkflowOneInvoicingOneDraftPeriodDefault =
|
|
|
4228
4411
|
export const updateBillingProfileBodyWorkflowOneInvoicingOneDueAfterDefault = 'P30D';
|
|
4229
4412
|
export const updateBillingProfileBodyWorkflowOneInvoicingOneProgressiveBillingDefault = true;
|
|
4230
4413
|
export const updateBillingProfileBodyWorkflowOneInvoicingOneDefaultTaxConfigOneStripeOneCodeRegExp = /^txcd_\d{8}$/;
|
|
4414
|
+
export const updateBillingProfileBodyWorkflowOneInvoicingOneDefaultTaxConfigOneTaxCodeIdRegExp = /^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/;
|
|
4231
4415
|
export const updateBillingProfileBodyWorkflowOnePaymentOneCollectionMethodDefault = 'charge_automatically';
|
|
4232
4416
|
export const updateBillingProfileBodyWorkflowOneTaxOneEnabledDefault = true;
|
|
4233
4417
|
export const updateBillingProfileBodyWorkflowOneTaxOneEnforcedDefault = false;
|
|
@@ -4326,7 +4510,9 @@ export const UpdateBillingProfileBody = zod
|
|
|
4326
4510
|
.union([
|
|
4327
4511
|
zod
|
|
4328
4512
|
.object({
|
|
4329
|
-
type: zod
|
|
4513
|
+
type: zod
|
|
4514
|
+
.enum(['subscription'])
|
|
4515
|
+
.describe('The type of alignment.'),
|
|
4330
4516
|
})
|
|
4331
4517
|
.describe('BillingWorkflowCollectionAlignmentSubscription specifies the alignment for collecting the pending line items\ninto an invoice.'),
|
|
4332
4518
|
zod
|
|
@@ -4350,7 +4536,9 @@ export const UpdateBillingProfileBody = zod
|
|
|
4350
4536
|
})
|
|
4351
4537
|
.describe('Recurring period with an interval and an anchor.')
|
|
4352
4538
|
.describe('The recurring period for the alignment.'),
|
|
4353
|
-
type: zod
|
|
4539
|
+
type: zod
|
|
4540
|
+
.enum(['anchored'])
|
|
4541
|
+
.describe('The type of alignment.'),
|
|
4354
4542
|
})
|
|
4355
4543
|
.describe('BillingWorkflowCollectionAlignmentAnchored specifies the alignment for collecting the pending line items\ninto an invoice.'),
|
|
4356
4544
|
])
|
|
@@ -4397,6 +4585,11 @@ export const UpdateBillingProfileBody = zod
|
|
|
4397
4585
|
.describe('The tax config for Stripe.')
|
|
4398
4586
|
.optional()
|
|
4399
4587
|
.describe('Stripe tax config.'),
|
|
4588
|
+
taxCodeId: zod.coerce
|
|
4589
|
+
.string()
|
|
4590
|
+
.regex(updateBillingProfileBodyWorkflowOneInvoicingOneDefaultTaxConfigOneTaxCodeIdRegExp)
|
|
4591
|
+
.optional()
|
|
4592
|
+
.describe('Tax code reference.\n\nWhen both `taxCodeId` and `stripe.code` are provided, `taxCodeId` takes precedence:\nthe referenced tax code entity is used and `stripe.code` is ignored.'),
|
|
4400
4593
|
})
|
|
4401
4594
|
.describe('Set of provider specific tax configs.')
|
|
4402
4595
|
.optional()
|
|
@@ -4544,6 +4737,7 @@ export const CreateCustomerBody = zod
|
|
|
4544
4737
|
export const listCustomersQueryPageDefault = 1;
|
|
4545
4738
|
export const listCustomersQueryPageSizeDefault = 100;
|
|
4546
4739
|
export const listCustomersQueryPageSizeMax = 1000;
|
|
4740
|
+
export const listCustomersQueryOrderDefault = 'ASC';
|
|
4547
4741
|
export const listCustomersQueryIncludeDeletedDefault = false;
|
|
4548
4742
|
export const ListCustomersQueryParams = zod.object({
|
|
4549
4743
|
expand: zod
|
|
@@ -4564,7 +4758,11 @@ export const ListCustomersQueryParams = zod.object({
|
|
|
4564
4758
|
.string()
|
|
4565
4759
|
.optional()
|
|
4566
4760
|
.describe('Filter customers by name.\nCase-insensitive partial match.'),
|
|
4567
|
-
order: zod
|
|
4761
|
+
order: zod
|
|
4762
|
+
.enum(['ASC', 'DESC'])
|
|
4763
|
+
.describe('The order direction.')
|
|
4764
|
+
.default(listCustomersQueryOrderDefault)
|
|
4765
|
+
.describe('The order direction.'),
|
|
4568
4766
|
orderBy: zod
|
|
4569
4767
|
.enum(['id', 'name', 'createdAt'])
|
|
4570
4768
|
.optional()
|
|
@@ -4850,7 +5048,7 @@ export const UpsertCustomerAppDataBodyItem = zod
|
|
|
4850
5048
|
.string()
|
|
4851
5049
|
.optional()
|
|
4852
5050
|
.describe('The Stripe default payment method ID.'),
|
|
4853
|
-
type: zod.enum(['stripe']),
|
|
5051
|
+
type: zod.enum(['stripe']).describe('The app name.'),
|
|
4854
5052
|
})
|
|
4855
5053
|
.describe('Stripe Customer App Data.'),
|
|
4856
5054
|
zod
|
|
@@ -4937,7 +5135,7 @@ export const UpsertCustomerAppDataBodyItem = zod
|
|
|
4937
5135
|
.enum(['ready', 'unauthorized'])
|
|
4938
5136
|
.describe('App installed status.')
|
|
4939
5137
|
.describe('Status of the app connection.'),
|
|
4940
|
-
type: zod.enum(['sandbox']),
|
|
5138
|
+
type: zod.enum(['sandbox']).describe("The app's type is Sandbox."),
|
|
4941
5139
|
updatedAt: zod.coerce
|
|
4942
5140
|
.date()
|
|
4943
5141
|
.describe('Timestamp of when the resource was last updated.'),
|
|
@@ -4950,7 +5148,7 @@ export const UpsertCustomerAppDataBodyItem = zod
|
|
|
4950
5148
|
.regex(upsertCustomerAppDataBodyTwoIdRegExp)
|
|
4951
5149
|
.optional()
|
|
4952
5150
|
.describe('The app ID.\nIf not provided, it will use the global default for the app type.'),
|
|
4953
|
-
type: zod.enum(['sandbox']),
|
|
5151
|
+
type: zod.enum(['sandbox']).describe('The app name.'),
|
|
4954
5152
|
})
|
|
4955
5153
|
.describe('Sandbox Customer App Data.'),
|
|
4956
5154
|
zod
|
|
@@ -5043,7 +5241,9 @@ export const UpsertCustomerAppDataBodyItem = zod
|
|
|
5043
5241
|
.enum(['ready', 'unauthorized'])
|
|
5044
5242
|
.describe('App installed status.')
|
|
5045
5243
|
.describe('Status of the app connection.'),
|
|
5046
|
-
type: zod
|
|
5244
|
+
type: zod
|
|
5245
|
+
.enum(['custom_invoicing'])
|
|
5246
|
+
.describe("The app's type is CustomInvoicing."),
|
|
5047
5247
|
updatedAt: zod.coerce
|
|
5048
5248
|
.date()
|
|
5049
5249
|
.describe('Timestamp of when the resource was last updated.'),
|
|
@@ -5061,7 +5261,7 @@ export const UpsertCustomerAppDataBodyItem = zod
|
|
|
5061
5261
|
.describe('Set of key-value pairs.\nMetadata can be used to store additional information about a resource.')
|
|
5062
5262
|
.optional()
|
|
5063
5263
|
.describe('Metadata to be used by the custom invoicing provider.'),
|
|
5064
|
-
type: zod.enum(['custom_invoicing']),
|
|
5264
|
+
type: zod.enum(['custom_invoicing']).describe('The app name.'),
|
|
5065
5265
|
})
|
|
5066
5266
|
.describe('Custom Invoicing Customer App Data.'),
|
|
5067
5267
|
])
|
|
@@ -5224,11 +5424,16 @@ export const ListCustomerSubscriptionsParams = zod.object({
|
|
|
5224
5424
|
.describe('ExternalKey is a looser version of key.'),
|
|
5225
5425
|
]),
|
|
5226
5426
|
});
|
|
5427
|
+
export const listCustomerSubscriptionsQueryOrderDefault = 'ASC';
|
|
5227
5428
|
export const listCustomerSubscriptionsQueryPageDefault = 1;
|
|
5228
5429
|
export const listCustomerSubscriptionsQueryPageSizeDefault = 100;
|
|
5229
5430
|
export const listCustomerSubscriptionsQueryPageSizeMax = 1000;
|
|
5230
5431
|
export const ListCustomerSubscriptionsQueryParams = zod.object({
|
|
5231
|
-
order: zod
|
|
5432
|
+
order: zod
|
|
5433
|
+
.enum(['ASC', 'DESC'])
|
|
5434
|
+
.describe('The order direction.')
|
|
5435
|
+
.default(listCustomerSubscriptionsQueryOrderDefault)
|
|
5436
|
+
.describe('The order direction.'),
|
|
5232
5437
|
orderBy: zod
|
|
5233
5438
|
.enum(['activeFrom', 'activeTo'])
|
|
5234
5439
|
.optional()
|
|
@@ -5267,6 +5472,7 @@ export const listEntitlementsQueryOffsetDefault = 0;
|
|
|
5267
5472
|
export const listEntitlementsQueryOffsetMin = 0;
|
|
5268
5473
|
export const listEntitlementsQueryLimitDefault = 100;
|
|
5269
5474
|
export const listEntitlementsQueryLimitMax = 1000;
|
|
5475
|
+
export const listEntitlementsQueryOrderDefault = 'ASC';
|
|
5270
5476
|
export const ListEntitlementsQueryParams = zod.object({
|
|
5271
5477
|
entitlementType: zod
|
|
5272
5478
|
.array(zod
|
|
@@ -5293,7 +5499,11 @@ export const ListEntitlementsQueryParams = zod.object({
|
|
|
5293
5499
|
.min(listEntitlementsQueryOffsetMin)
|
|
5294
5500
|
.default(listEntitlementsQueryOffsetDefault)
|
|
5295
5501
|
.describe('Number of items to skip.\n\nDefault is 0.'),
|
|
5296
|
-
order: zod
|
|
5502
|
+
order: zod
|
|
5503
|
+
.enum(['ASC', 'DESC'])
|
|
5504
|
+
.describe('The order direction.')
|
|
5505
|
+
.default(listEntitlementsQueryOrderDefault)
|
|
5506
|
+
.describe('The order direction.'),
|
|
5297
5507
|
orderBy: zod
|
|
5298
5508
|
.enum(['createdAt', 'updatedAt'])
|
|
5299
5509
|
.optional()
|
|
@@ -5413,6 +5623,7 @@ export const IngestEventsBody = zod
|
|
|
5413
5623
|
specversion: zod.coerce
|
|
5414
5624
|
.string()
|
|
5415
5625
|
.min(1)
|
|
5626
|
+
.default(ingestEventsBodyOneSpecversionDefault)
|
|
5416
5627
|
.describe('The version of the CloudEvents specification which the event uses.'),
|
|
5417
5628
|
subject: zod.coerce
|
|
5418
5629
|
.string()
|
|
@@ -5451,6 +5662,7 @@ export const IngestEventsBody = zod
|
|
|
5451
5662
|
specversion: zod.coerce
|
|
5452
5663
|
.string()
|
|
5453
5664
|
.min(1)
|
|
5665
|
+
.default(ingestEventsBodyTwoItemSpecversionDefault)
|
|
5454
5666
|
.describe('The version of the CloudEvents specification which the event uses.'),
|
|
5455
5667
|
subject: zod.coerce
|
|
5456
5668
|
.string()
|
|
@@ -5480,6 +5692,7 @@ export const listFeaturesQueryOffsetDefault = 0;
|
|
|
5480
5692
|
export const listFeaturesQueryOffsetMin = 0;
|
|
5481
5693
|
export const listFeaturesQueryLimitDefault = 100;
|
|
5482
5694
|
export const listFeaturesQueryLimitMax = 1000;
|
|
5695
|
+
export const listFeaturesQueryOrderDefault = 'ASC';
|
|
5483
5696
|
export const ListFeaturesQueryParams = zod.object({
|
|
5484
5697
|
includeArchived: zod.coerce
|
|
5485
5698
|
.boolean()
|
|
@@ -5500,7 +5713,11 @@ export const ListFeaturesQueryParams = zod.object({
|
|
|
5500
5713
|
.min(listFeaturesQueryOffsetMin)
|
|
5501
5714
|
.default(listFeaturesQueryOffsetDefault)
|
|
5502
5715
|
.describe('Number of items to skip.\n\nDefault is 0.'),
|
|
5503
|
-
order: zod
|
|
5716
|
+
order: zod
|
|
5717
|
+
.enum(['ASC', 'DESC'])
|
|
5718
|
+
.describe('The order direction.')
|
|
5719
|
+
.default(listFeaturesQueryOrderDefault)
|
|
5720
|
+
.describe('The order direction.'),
|
|
5504
5721
|
orderBy: zod
|
|
5505
5722
|
.enum(['id', 'key', 'name', 'createdAt', 'updatedAt'])
|
|
5506
5723
|
.optional()
|
|
@@ -5521,13 +5738,18 @@ export const ListFeaturesQueryParams = zod.object({
|
|
|
5521
5738
|
* Features are either metered or static. A feature is metered if meterSlug is provided at creation.
|
|
5522
5739
|
For metered features you can pass additional filters that will be applied when calculating feature usage, based on the meter's groupBy fields.
|
|
5523
5740
|
Meters with SUM, COUNT, UNIQUE_COUNT and LATEST aggregations are supported for features.
|
|
5524
|
-
Features cannot be updated later, only archived.
|
|
5525
5741
|
* @summary Create feature
|
|
5526
5742
|
*/
|
|
5527
5743
|
export const createFeatureBodyKeyMax = 64;
|
|
5528
5744
|
export const createFeatureBodyKeyRegExp = /^[a-z0-9]+(?:_[a-z0-9]+)*$/;
|
|
5529
5745
|
export const createFeatureBodyMeterSlugMax = 64;
|
|
5530
5746
|
export const createFeatureBodyMeterSlugRegExp = /^[a-z0-9]+(?:_[a-z0-9]+)*$/;
|
|
5747
|
+
export const createFeatureBodyUnitCostOneOneAmountOneRegExp = /^-?[0-9]+(\.[0-9]+)?$/;
|
|
5748
|
+
export const createFeatureBodyUnitCostOneTwoPricingOneInputPerTokenOneRegExp = /^-?[0-9]+(\.[0-9]+)?$/;
|
|
5749
|
+
export const createFeatureBodyUnitCostOneTwoPricingOneOutputPerTokenOneRegExp = /^-?[0-9]+(\.[0-9]+)?$/;
|
|
5750
|
+
export const createFeatureBodyUnitCostOneTwoPricingOneCacheReadPerTokenOneRegExp = /^-?[0-9]+(\.[0-9]+)?$/;
|
|
5751
|
+
export const createFeatureBodyUnitCostOneTwoPricingOneReasoningPerTokenOneRegExp = /^-?[0-9]+(\.[0-9]+)?$/;
|
|
5752
|
+
export const createFeatureBodyUnitCostOneTwoPricingOneCacheWritePerTokenOneRegExp = /^-?[0-9]+(\.[0-9]+)?$/;
|
|
5531
5753
|
export const CreateFeatureBody = zod
|
|
5532
5754
|
.object({
|
|
5533
5755
|
advancedMeterGroupByFilters: zod
|
|
@@ -5615,6 +5837,85 @@ export const CreateFeatureBody = zod
|
|
|
5615
5837
|
.optional()
|
|
5616
5838
|
.describe('A key is a unique string that is used to identify a resource.'),
|
|
5617
5839
|
name: zod.coerce.string(),
|
|
5840
|
+
unitCost: zod
|
|
5841
|
+
.union([
|
|
5842
|
+
zod
|
|
5843
|
+
.object({
|
|
5844
|
+
amount: zod.coerce
|
|
5845
|
+
.string()
|
|
5846
|
+
.regex(createFeatureBodyUnitCostOneOneAmountOneRegExp)
|
|
5847
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
5848
|
+
.describe('Fixed per-unit cost amount in USD.'),
|
|
5849
|
+
type: zod.enum(['manual']),
|
|
5850
|
+
})
|
|
5851
|
+
.describe('A fixed per-unit cost amount.'),
|
|
5852
|
+
zod
|
|
5853
|
+
.object({
|
|
5854
|
+
model: zod.coerce
|
|
5855
|
+
.string()
|
|
5856
|
+
.optional()
|
|
5857
|
+
.describe('Static model ID value (e.g., "gpt-4", "claude-3-5-sonnet").\nUse this when the feature tracks a single model.\nMutually exclusive with `modelProperty`.'),
|
|
5858
|
+
modelProperty: zod.coerce
|
|
5859
|
+
.string()
|
|
5860
|
+
.optional()
|
|
5861
|
+
.describe('Meter group-by property that holds the model ID.\nUse this when the meter has a group-by dimension for model.\nMutually exclusive with `model`.'),
|
|
5862
|
+
pricing: zod
|
|
5863
|
+
.object({
|
|
5864
|
+
cacheReadPerToken: zod.coerce
|
|
5865
|
+
.string()
|
|
5866
|
+
.regex(createFeatureBodyUnitCostOneTwoPricingOneCacheReadPerTokenOneRegExp)
|
|
5867
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
5868
|
+
.optional()
|
|
5869
|
+
.describe('Cost per cache read token in USD.'),
|
|
5870
|
+
cacheWritePerToken: zod.coerce
|
|
5871
|
+
.string()
|
|
5872
|
+
.regex(createFeatureBodyUnitCostOneTwoPricingOneCacheWritePerTokenOneRegExp)
|
|
5873
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
5874
|
+
.optional()
|
|
5875
|
+
.describe('Cost per cache write token in USD.'),
|
|
5876
|
+
inputPerToken: zod.coerce
|
|
5877
|
+
.string()
|
|
5878
|
+
.regex(createFeatureBodyUnitCostOneTwoPricingOneInputPerTokenOneRegExp)
|
|
5879
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
5880
|
+
.describe('Cost per input token in USD.'),
|
|
5881
|
+
outputPerToken: zod.coerce
|
|
5882
|
+
.string()
|
|
5883
|
+
.regex(createFeatureBodyUnitCostOneTwoPricingOneOutputPerTokenOneRegExp)
|
|
5884
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
5885
|
+
.describe('Cost per output token in USD.'),
|
|
5886
|
+
reasoningPerToken: zod.coerce
|
|
5887
|
+
.string()
|
|
5888
|
+
.regex(createFeatureBodyUnitCostOneTwoPricingOneReasoningPerTokenOneRegExp)
|
|
5889
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
5890
|
+
.optional()
|
|
5891
|
+
.describe('Cost per reasoning token in USD.'),
|
|
5892
|
+
})
|
|
5893
|
+
.describe('Resolved per-token pricing from the LLM cost database.')
|
|
5894
|
+
.optional()
|
|
5895
|
+
.describe("Resolved per-token pricing from the LLM cost database.\nOnly populated in responses when the feature's meter group-by filters\nspecify exact provider and model values."),
|
|
5896
|
+
provider: zod.coerce
|
|
5897
|
+
.string()
|
|
5898
|
+
.optional()
|
|
5899
|
+
.describe('Static LLM provider value (e.g., "openai", "anthropic").\nUse this when the feature tracks a single provider.\nMutually exclusive with `providerProperty`.'),
|
|
5900
|
+
providerProperty: zod.coerce
|
|
5901
|
+
.string()
|
|
5902
|
+
.optional()
|
|
5903
|
+
.describe('Meter group-by property that holds the LLM provider.\nUse this when the meter has a group-by dimension for provider.\nMutually exclusive with `provider`.'),
|
|
5904
|
+
tokenType: zod.coerce
|
|
5905
|
+
.string()
|
|
5906
|
+
.optional()
|
|
5907
|
+
.describe('Static token type value.\nUse this when the feature tracks a single token type (e.g., only input tokens).\nExpected values: input, output, cache_read, reasoning, cache_write, request, response.\n`request` is an alias for `input`, `response` is an alias for `output`.\nMutually exclusive with `tokenTypeProperty`.'),
|
|
5908
|
+
tokenTypeProperty: zod.coerce
|
|
5909
|
+
.string()
|
|
5910
|
+
.optional()
|
|
5911
|
+
.describe('Meter group-by property that holds the token type.\nUse this when the meter has a group-by dimension for token type.\nMutually exclusive with `tokenType`.'),
|
|
5912
|
+
type: zod.enum(['llm']),
|
|
5913
|
+
})
|
|
5914
|
+
.describe('LLM cost lookup configuration.\nMaps meter group-by dimensions to LLM cost database fields.'),
|
|
5915
|
+
])
|
|
5916
|
+
.describe('Per-unit cost configuration for a feature.\nEither a fixed manual amount or a dynamic LLM cost lookup.')
|
|
5917
|
+
.optional()
|
|
5918
|
+
.describe('Optional per-unit cost configuration.\nUse "manual" for a fixed per-unit cost, or "llm" to look up cost\nfrom the LLM cost database based on meter group-by properties.'),
|
|
5618
5919
|
})
|
|
5619
5920
|
.describe('Represents a feature that can be enabled or disabled for a plan.\nUsed both for product catalog and entitlements.');
|
|
5620
5921
|
/**
|
|
@@ -5651,6 +5952,7 @@ export const listGrantsQueryOffsetDefault = 0;
|
|
|
5651
5952
|
export const listGrantsQueryOffsetMin = 0;
|
|
5652
5953
|
export const listGrantsQueryLimitDefault = 100;
|
|
5653
5954
|
export const listGrantsQueryLimitMax = 1000;
|
|
5955
|
+
export const listGrantsQueryOrderDefault = 'ASC';
|
|
5654
5956
|
export const ListGrantsQueryParams = zod.object({
|
|
5655
5957
|
feature: zod
|
|
5656
5958
|
.array(zod.coerce.string())
|
|
@@ -5671,7 +5973,11 @@ export const ListGrantsQueryParams = zod.object({
|
|
|
5671
5973
|
.min(listGrantsQueryOffsetMin)
|
|
5672
5974
|
.default(listGrantsQueryOffsetDefault)
|
|
5673
5975
|
.describe('Number of items to skip.\n\nDefault is 0.'),
|
|
5674
|
-
order: zod
|
|
5976
|
+
order: zod
|
|
5977
|
+
.enum(['ASC', 'DESC'])
|
|
5978
|
+
.describe('The order direction.')
|
|
5979
|
+
.default(listGrantsQueryOrderDefault)
|
|
5980
|
+
.describe('The order direction.'),
|
|
5675
5981
|
orderBy: zod
|
|
5676
5982
|
.enum(['id', 'createdAt', 'updatedAt'])
|
|
5677
5983
|
.optional()
|
|
@@ -5700,6 +6006,12 @@ For example, if you have a single grant for your metered entitlement with an ini
|
|
|
5700
6006
|
export const VoidGrantParams = zod.object({
|
|
5701
6007
|
grantId: zod.coerce.string(),
|
|
5702
6008
|
});
|
|
6009
|
+
export const VoidGrantQueryParams = zod.object({
|
|
6010
|
+
at: zod.coerce
|
|
6011
|
+
.date()
|
|
6012
|
+
.optional()
|
|
6013
|
+
.describe('The time at which the grant should be voided.\nMust not be in the future and must be within the current usage period of the entitlement.\nDefaults to the current time if not specified.'),
|
|
6014
|
+
});
|
|
5703
6015
|
/**
|
|
5704
6016
|
* Get progress
|
|
5705
6017
|
* @summary Get progress
|
|
@@ -5834,13 +6146,18 @@ export const MarketplaceOAuth2InstallAuthorizeQueryParams = zod.object({
|
|
|
5834
6146
|
export const listMetersQueryPageDefault = 1;
|
|
5835
6147
|
export const listMetersQueryPageSizeDefault = 100;
|
|
5836
6148
|
export const listMetersQueryPageSizeMax = 1000;
|
|
6149
|
+
export const listMetersQueryOrderDefault = 'ASC';
|
|
5837
6150
|
export const listMetersQueryIncludeDeletedDefault = false;
|
|
5838
6151
|
export const ListMetersQueryParams = zod.object({
|
|
5839
6152
|
includeDeleted: zod.coerce
|
|
5840
6153
|
.boolean()
|
|
5841
6154
|
.default(listMetersQueryIncludeDeletedDefault)
|
|
5842
6155
|
.describe('Include deleted meters.'),
|
|
5843
|
-
order: zod
|
|
6156
|
+
order: zod
|
|
6157
|
+
.enum(['ASC', 'DESC'])
|
|
6158
|
+
.describe('The order direction.')
|
|
6159
|
+
.default(listMetersQueryOrderDefault)
|
|
6160
|
+
.describe('The order direction.'),
|
|
5844
6161
|
orderBy: zod
|
|
5845
6162
|
.enum(['key', 'name', 'aggregation', 'createdAt', 'updatedAt'])
|
|
5846
6163
|
.optional()
|
|
@@ -6216,6 +6533,7 @@ export const listNotificationChannelsQueryIncludeDisabledDefault = false;
|
|
|
6216
6533
|
export const listNotificationChannelsQueryPageDefault = 1;
|
|
6217
6534
|
export const listNotificationChannelsQueryPageSizeDefault = 100;
|
|
6218
6535
|
export const listNotificationChannelsQueryPageSizeMax = 1000;
|
|
6536
|
+
export const listNotificationChannelsQueryOrderDefault = 'ASC';
|
|
6219
6537
|
export const ListNotificationChannelsQueryParams = zod.object({
|
|
6220
6538
|
includeDeleted: zod.coerce
|
|
6221
6539
|
.boolean()
|
|
@@ -6225,7 +6543,11 @@ export const ListNotificationChannelsQueryParams = zod.object({
|
|
|
6225
6543
|
.boolean()
|
|
6226
6544
|
.default(listNotificationChannelsQueryIncludeDisabledDefault)
|
|
6227
6545
|
.describe('Include disabled notification channels in response.\n\nUsage: `?includeDisabled=false`'),
|
|
6228
|
-
order: zod
|
|
6546
|
+
order: zod
|
|
6547
|
+
.enum(['ASC', 'DESC'])
|
|
6548
|
+
.describe('The order direction.')
|
|
6549
|
+
.default(listNotificationChannelsQueryOrderDefault)
|
|
6550
|
+
.describe('The order direction.'),
|
|
6229
6551
|
orderBy: zod
|
|
6230
6552
|
.enum(['id', 'type', 'createdAt', 'updatedAt'])
|
|
6231
6553
|
.optional()
|
|
@@ -6357,6 +6679,7 @@ export const listNotificationEventsQueryChannelItemRegExp = /^[0-7][0-9A-HJKMNP-
|
|
|
6357
6679
|
export const listNotificationEventsQueryPageDefault = 1;
|
|
6358
6680
|
export const listNotificationEventsQueryPageSizeDefault = 100;
|
|
6359
6681
|
export const listNotificationEventsQueryPageSizeMax = 1000;
|
|
6682
|
+
export const listNotificationEventsQueryOrderDefault = 'ASC';
|
|
6360
6683
|
export const ListNotificationEventsQueryParams = zod.object({
|
|
6361
6684
|
channel: zod
|
|
6362
6685
|
.array(zod.coerce
|
|
@@ -6373,7 +6696,11 @@ export const ListNotificationEventsQueryParams = zod.object({
|
|
|
6373
6696
|
.date()
|
|
6374
6697
|
.optional()
|
|
6375
6698
|
.describe('Start date-time in RFC 3339 format.\nInclusive.'),
|
|
6376
|
-
order: zod
|
|
6699
|
+
order: zod
|
|
6700
|
+
.enum(['ASC', 'DESC'])
|
|
6701
|
+
.describe('The order direction.')
|
|
6702
|
+
.default(listNotificationEventsQueryOrderDefault)
|
|
6703
|
+
.describe('The order direction.'),
|
|
6377
6704
|
orderBy: zod
|
|
6378
6705
|
.enum(['id', 'createdAt'])
|
|
6379
6706
|
.optional()
|
|
@@ -6442,6 +6769,7 @@ export const listNotificationRulesQueryFeatureItemRegExp = /^[a-z0-9]+(?:_[a-z0-
|
|
|
6442
6769
|
export const listNotificationRulesQueryPageDefault = 1;
|
|
6443
6770
|
export const listNotificationRulesQueryPageSizeDefault = 100;
|
|
6444
6771
|
export const listNotificationRulesQueryPageSizeMax = 1000;
|
|
6772
|
+
export const listNotificationRulesQueryOrderDefault = 'ASC';
|
|
6445
6773
|
export const ListNotificationRulesQueryParams = zod.object({
|
|
6446
6774
|
channel: zod
|
|
6447
6775
|
.array(zod.coerce.string())
|
|
@@ -6464,7 +6792,11 @@ export const ListNotificationRulesQueryParams = zod.object({
|
|
|
6464
6792
|
.boolean()
|
|
6465
6793
|
.default(listNotificationRulesQueryIncludeDisabledDefault)
|
|
6466
6794
|
.describe('Include disabled notification rules in response.\n\nUsage: `?includeDisabled=false`'),
|
|
6467
|
-
order: zod
|
|
6795
|
+
order: zod
|
|
6796
|
+
.enum(['ASC', 'DESC'])
|
|
6797
|
+
.describe('The order direction.')
|
|
6798
|
+
.default(listNotificationRulesQueryOrderDefault)
|
|
6799
|
+
.describe('The order direction.'),
|
|
6468
6800
|
orderBy: zod
|
|
6469
6801
|
.enum(['id', 'type', 'createdAt', 'updatedAt'])
|
|
6470
6802
|
.optional()
|
|
@@ -6556,7 +6888,9 @@ export const CreateNotificationRuleBody = zod
|
|
|
6556
6888
|
.min(1)
|
|
6557
6889
|
.max(createNotificationRuleBodyOneThresholdsMax)
|
|
6558
6890
|
.describe('List of thresholds the rule suppose to be triggered.'),
|
|
6559
|
-
type: zod
|
|
6891
|
+
type: zod
|
|
6892
|
+
.enum(['entitlements.balance.threshold'])
|
|
6893
|
+
.describe('Notification rule type.'),
|
|
6560
6894
|
})
|
|
6561
6895
|
.describe('Request with input parameters for creating new notification rule with entitlements.balance.threshold type.'),
|
|
6562
6896
|
zod
|
|
@@ -6592,7 +6926,9 @@ export const CreateNotificationRuleBody = zod
|
|
|
6592
6926
|
.min(1)
|
|
6593
6927
|
.max(createNotificationRuleBodyTwoNameMax)
|
|
6594
6928
|
.describe('The user friendly name of the notification rule.'),
|
|
6595
|
-
type: zod
|
|
6929
|
+
type: zod
|
|
6930
|
+
.enum(['entitlements.reset'])
|
|
6931
|
+
.describe('Notification rule type.'),
|
|
6596
6932
|
})
|
|
6597
6933
|
.describe('Request with input parameters for creating new notification rule with entitlements.reset type.'),
|
|
6598
6934
|
zod
|
|
@@ -6618,7 +6954,7 @@ export const CreateNotificationRuleBody = zod
|
|
|
6618
6954
|
.min(1)
|
|
6619
6955
|
.max(createNotificationRuleBodyThreeNameMax)
|
|
6620
6956
|
.describe('The user friendly name of the notification rule.'),
|
|
6621
|
-
type: zod.enum(['invoice.created']),
|
|
6957
|
+
type: zod.enum(['invoice.created']).describe('Notification rule type.'),
|
|
6622
6958
|
})
|
|
6623
6959
|
.describe('Request with input parameters for creating new notification rule with invoice.created type.'),
|
|
6624
6960
|
zod
|
|
@@ -6644,7 +6980,7 @@ export const CreateNotificationRuleBody = zod
|
|
|
6644
6980
|
.min(1)
|
|
6645
6981
|
.max(createNotificationRuleBodyFourNameMax)
|
|
6646
6982
|
.describe('The user friendly name of the notification rule.'),
|
|
6647
|
-
type: zod.enum(['invoice.updated']),
|
|
6983
|
+
type: zod.enum(['invoice.updated']).describe('Notification rule type.'),
|
|
6648
6984
|
})
|
|
6649
6985
|
.describe('Request with input parameters for creating new notification rule with invoice.updated type.'),
|
|
6650
6986
|
])
|
|
@@ -6728,7 +7064,9 @@ export const UpdateNotificationRuleBody = zod
|
|
|
6728
7064
|
.min(1)
|
|
6729
7065
|
.max(updateNotificationRuleBodyOneThresholdsMax)
|
|
6730
7066
|
.describe('List of thresholds the rule suppose to be triggered.'),
|
|
6731
|
-
type: zod
|
|
7067
|
+
type: zod
|
|
7068
|
+
.enum(['entitlements.balance.threshold'])
|
|
7069
|
+
.describe('Notification rule type.'),
|
|
6732
7070
|
})
|
|
6733
7071
|
.describe('Request with input parameters for creating new notification rule with entitlements.balance.threshold type.'),
|
|
6734
7072
|
zod
|
|
@@ -6764,7 +7102,9 @@ export const UpdateNotificationRuleBody = zod
|
|
|
6764
7102
|
.min(1)
|
|
6765
7103
|
.max(updateNotificationRuleBodyTwoNameMax)
|
|
6766
7104
|
.describe('The user friendly name of the notification rule.'),
|
|
6767
|
-
type: zod
|
|
7105
|
+
type: zod
|
|
7106
|
+
.enum(['entitlements.reset'])
|
|
7107
|
+
.describe('Notification rule type.'),
|
|
6768
7108
|
})
|
|
6769
7109
|
.describe('Request with input parameters for creating new notification rule with entitlements.reset type.'),
|
|
6770
7110
|
zod
|
|
@@ -6790,7 +7130,7 @@ export const UpdateNotificationRuleBody = zod
|
|
|
6790
7130
|
.min(1)
|
|
6791
7131
|
.max(updateNotificationRuleBodyThreeNameMax)
|
|
6792
7132
|
.describe('The user friendly name of the notification rule.'),
|
|
6793
|
-
type: zod.enum(['invoice.created']),
|
|
7133
|
+
type: zod.enum(['invoice.created']).describe('Notification rule type.'),
|
|
6794
7134
|
})
|
|
6795
7135
|
.describe('Request with input parameters for creating new notification rule with invoice.created type.'),
|
|
6796
7136
|
zod
|
|
@@ -6816,7 +7156,7 @@ export const UpdateNotificationRuleBody = zod
|
|
|
6816
7156
|
.min(1)
|
|
6817
7157
|
.max(updateNotificationRuleBodyFourNameMax)
|
|
6818
7158
|
.describe('The user friendly name of the notification rule.'),
|
|
6819
|
-
type: zod.enum(['invoice.updated']),
|
|
7159
|
+
type: zod.enum(['invoice.updated']).describe('Notification rule type.'),
|
|
6820
7160
|
})
|
|
6821
7161
|
.describe('Request with input parameters for creating new notification rule with invoice.updated type.'),
|
|
6822
7162
|
])
|
|
@@ -6861,6 +7201,7 @@ export const listPlansQueryCurrencyItemRegExp = /^[A-Z]{3}$/;
|
|
|
6861
7201
|
export const listPlansQueryPageDefault = 1;
|
|
6862
7202
|
export const listPlansQueryPageSizeDefault = 100;
|
|
6863
7203
|
export const listPlansQueryPageSizeMax = 1000;
|
|
7204
|
+
export const listPlansQueryOrderDefault = 'ASC';
|
|
6864
7205
|
export const ListPlansQueryParams = zod.object({
|
|
6865
7206
|
currency: zod
|
|
6866
7207
|
.array(zod.coerce
|
|
@@ -6895,7 +7236,11 @@ export const ListPlansQueryParams = zod.object({
|
|
|
6895
7236
|
.record(zod.string(), zod.array(zod.coerce.number()))
|
|
6896
7237
|
.optional()
|
|
6897
7238
|
.describe('Filter by plan.key and plan.version attributes'),
|
|
6898
|
-
order: zod
|
|
7239
|
+
order: zod
|
|
7240
|
+
.enum(['ASC', 'DESC'])
|
|
7241
|
+
.describe('The order direction.')
|
|
7242
|
+
.default(listPlansQueryOrderDefault)
|
|
7243
|
+
.describe('The order direction.'),
|
|
6899
7244
|
orderBy: zod
|
|
6900
7245
|
.enum(['id', 'key', 'version', 'created_at', 'updated_at'])
|
|
6901
7246
|
.optional()
|
|
@@ -6936,6 +7281,7 @@ export const createPlanBodyProRatingConfigDefault = {
|
|
|
6936
7281
|
enabled: true,
|
|
6937
7282
|
mode: 'prorate_prices',
|
|
6938
7283
|
};
|
|
7284
|
+
export const createPlanBodySettlementModeDefault = 'credit_then_invoice';
|
|
6939
7285
|
export const createPlanBodyPhasesItemKeyMax = 64;
|
|
6940
7286
|
export const createPlanBodyPhasesItemKeyRegExp = /^[a-z0-9]+(?:_[a-z0-9]+)*$/;
|
|
6941
7287
|
export const createPlanBodyPhasesItemNameMax = 256;
|
|
@@ -6952,6 +7298,7 @@ export const createPlanBodyPhasesItemRateCardsItemOneEntitlementTemplateOneOneIs
|
|
|
6952
7298
|
export const createPlanBodyPhasesItemRateCardsItemOneEntitlementTemplateOneOneIssueAfterResetPriorityMax = 255;
|
|
6953
7299
|
export const createPlanBodyPhasesItemRateCardsItemOneEntitlementTemplateOneOnePreserveOverageAtResetDefault = false;
|
|
6954
7300
|
export const createPlanBodyPhasesItemRateCardsItemOneTaxConfigOneStripeOneCodeRegExp = /^txcd_\d{8}$/;
|
|
7301
|
+
export const createPlanBodyPhasesItemRateCardsItemOneTaxConfigOneTaxCodeIdRegExp = /^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/;
|
|
6955
7302
|
export const createPlanBodyPhasesItemRateCardsItemOnePriceOneAmountOneRegExp = /^-?[0-9]+(\.[0-9]+)?$/;
|
|
6956
7303
|
export const createPlanBodyPhasesItemRateCardsItemOnePriceOnePaymentTermDefault = 'in_advance';
|
|
6957
7304
|
export const createPlanBodyPhasesItemRateCardsItemOneDiscountsOneUsageOneQuantityOneRegExp = /^-?[0-9]+(\.[0-9]+)?$/;
|
|
@@ -6967,6 +7314,7 @@ export const createPlanBodyPhasesItemRateCardsItemTwoEntitlementTemplateOneOneIs
|
|
|
6967
7314
|
export const createPlanBodyPhasesItemRateCardsItemTwoEntitlementTemplateOneOneIssueAfterResetPriorityMax = 255;
|
|
6968
7315
|
export const createPlanBodyPhasesItemRateCardsItemTwoEntitlementTemplateOneOnePreserveOverageAtResetDefault = false;
|
|
6969
7316
|
export const createPlanBodyPhasesItemRateCardsItemTwoTaxConfigOneStripeOneCodeRegExp = /^txcd_\d{8}$/;
|
|
7317
|
+
export const createPlanBodyPhasesItemRateCardsItemTwoTaxConfigOneTaxCodeIdRegExp = /^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/;
|
|
6970
7318
|
export const createPlanBodyPhasesItemRateCardsItemTwoPriceOneOneAmountOneRegExp = /^-?[0-9]+(\.[0-9]+)?$/;
|
|
6971
7319
|
export const createPlanBodyPhasesItemRateCardsItemTwoPriceOneOnePaymentTermDefault = 'in_advance';
|
|
6972
7320
|
export const createPlanBodyPhasesItemRateCardsItemTwoPriceOneTwoAmountOneRegExp = /^-?[0-9]+(\.[0-9]+)?$/;
|
|
@@ -7007,6 +7355,7 @@ export const CreatePlanBody = zod
|
|
|
7007
7355
|
.max(createPlanBodyCurrencyOneMax)
|
|
7008
7356
|
.regex(createPlanBodyCurrencyOneRegExp)
|
|
7009
7357
|
.describe('Three-letter [ISO4217](https://www.iso.org/iso-4217-currency-codes.html) currency code.\nCustom three-letter currency codes are also supported for convenience.')
|
|
7358
|
+
.default(createPlanBodyCurrencyDefault)
|
|
7010
7359
|
.describe('The currency code of the plan.'),
|
|
7011
7360
|
description: zod.coerce
|
|
7012
7361
|
.string()
|
|
@@ -7195,7 +7544,9 @@ export const CreatePlanBody = zod
|
|
|
7195
7544
|
.describe('The payment term of a flat price.\nOne of: in_advance or in_arrears.')
|
|
7196
7545
|
.default(createPlanBodyPhasesItemRateCardsItemOnePriceOnePaymentTermDefault)
|
|
7197
7546
|
.describe('The payment term of the flat price.\nDefaults to in advance.'),
|
|
7198
|
-
type: zod
|
|
7547
|
+
type: zod
|
|
7548
|
+
.enum(['flat'])
|
|
7549
|
+
.describe('The type of the price.'),
|
|
7199
7550
|
})
|
|
7200
7551
|
.describe('Flat price with payment term.')
|
|
7201
7552
|
.nullable()
|
|
@@ -7226,11 +7577,18 @@ export const CreatePlanBody = zod
|
|
|
7226
7577
|
.describe('The tax config for Stripe.')
|
|
7227
7578
|
.optional()
|
|
7228
7579
|
.describe('Stripe tax config.'),
|
|
7580
|
+
taxCodeId: zod.coerce
|
|
7581
|
+
.string()
|
|
7582
|
+
.regex(createPlanBodyPhasesItemRateCardsItemOneTaxConfigOneTaxCodeIdRegExp)
|
|
7583
|
+
.optional()
|
|
7584
|
+
.describe('Tax code reference.\n\nWhen both `taxCodeId` and `stripe.code` are provided, `taxCodeId` takes precedence:\nthe referenced tax code entity is used and `stripe.code` is ignored.'),
|
|
7229
7585
|
})
|
|
7230
7586
|
.describe('Set of provider specific tax configs.')
|
|
7231
7587
|
.optional()
|
|
7232
7588
|
.describe('The tax config of the rate card.\nWhen undefined, the tax config of the feature or the default tax config of the plan is used.'),
|
|
7233
|
-
type: zod
|
|
7589
|
+
type: zod
|
|
7590
|
+
.enum(['flat_fee'])
|
|
7591
|
+
.describe('The type of the RateCard.'),
|
|
7234
7592
|
})
|
|
7235
7593
|
.describe('A flat fee rate card defines a one-time purchase or a recurring fee.'),
|
|
7236
7594
|
zod
|
|
@@ -7369,7 +7727,9 @@ export const CreatePlanBody = zod
|
|
|
7369
7727
|
.describe('The payment term of a flat price.\nOne of: in_advance or in_arrears.')
|
|
7370
7728
|
.default(createPlanBodyPhasesItemRateCardsItemTwoPriceOneOnePaymentTermDefault)
|
|
7371
7729
|
.describe('The payment term of the flat price.\nDefaults to in advance.'),
|
|
7372
|
-
type: zod
|
|
7730
|
+
type: zod
|
|
7731
|
+
.enum(['flat'])
|
|
7732
|
+
.describe('The type of the price.'),
|
|
7373
7733
|
})
|
|
7374
7734
|
.describe('Flat price with payment term.'),
|
|
7375
7735
|
zod
|
|
@@ -7391,7 +7751,9 @@ export const CreatePlanBody = zod
|
|
|
7391
7751
|
.describe('Numeric represents an arbitrary precision number.')
|
|
7392
7752
|
.optional()
|
|
7393
7753
|
.describe('The customer is committed to spend at least the amount.'),
|
|
7394
|
-
type: zod
|
|
7754
|
+
type: zod
|
|
7755
|
+
.enum(['unit'])
|
|
7756
|
+
.describe('The type of the price.'),
|
|
7395
7757
|
})
|
|
7396
7758
|
.describe('Unit price with spend commitments.'),
|
|
7397
7759
|
zod
|
|
@@ -7453,7 +7815,9 @@ export const CreatePlanBody = zod
|
|
|
7453
7815
|
.describe('A price tier.\nAt least one price component is required in each tier.'))
|
|
7454
7816
|
.min(1)
|
|
7455
7817
|
.describe('The tiers of the tiered price.\nAt least one price component is required in each tier.'),
|
|
7456
|
-
type: zod
|
|
7818
|
+
type: zod
|
|
7819
|
+
.enum(['tiered'])
|
|
7820
|
+
.describe('The type of the price.\n\nOne of: flat, unit, or tiered.'),
|
|
7457
7821
|
})
|
|
7458
7822
|
.describe('Tiered price with spend commitments.'),
|
|
7459
7823
|
zod
|
|
@@ -7476,7 +7840,9 @@ export const CreatePlanBody = zod
|
|
|
7476
7840
|
.describe('Numeric represents an arbitrary precision number.')
|
|
7477
7841
|
.default(createPlanBodyPhasesItemRateCardsItemTwoPriceOneFourMultiplierDefault)
|
|
7478
7842
|
.describe('The multiplier to apply to the base price to get the dynamic price.\n\nExamples:\n- 0.0: the price is zero\n- 0.5: the price is 50% of the base price\n- 1.0: the price is the same as the base price\n- 1.5: the price is 150% of the base price'),
|
|
7479
|
-
type: zod
|
|
7843
|
+
type: zod
|
|
7844
|
+
.enum(['dynamic'])
|
|
7845
|
+
.describe('The type of the price.'),
|
|
7480
7846
|
})
|
|
7481
7847
|
.describe('Dynamic price with spend commitments.'),
|
|
7482
7848
|
zod
|
|
@@ -7503,7 +7869,9 @@ export const CreatePlanBody = zod
|
|
|
7503
7869
|
.regex(createPlanBodyPhasesItemRateCardsItemTwoPriceOneFiveQuantityPerPackageOneRegExp)
|
|
7504
7870
|
.describe('Numeric represents an arbitrary precision number.')
|
|
7505
7871
|
.describe('The quantity per package.'),
|
|
7506
|
-
type: zod
|
|
7872
|
+
type: zod
|
|
7873
|
+
.enum(['package'])
|
|
7874
|
+
.describe('The type of the price.'),
|
|
7507
7875
|
})
|
|
7508
7876
|
.describe('Package price with spend commitments.'),
|
|
7509
7877
|
])
|
|
@@ -7536,11 +7904,18 @@ export const CreatePlanBody = zod
|
|
|
7536
7904
|
.describe('The tax config for Stripe.')
|
|
7537
7905
|
.optional()
|
|
7538
7906
|
.describe('Stripe tax config.'),
|
|
7907
|
+
taxCodeId: zod.coerce
|
|
7908
|
+
.string()
|
|
7909
|
+
.regex(createPlanBodyPhasesItemRateCardsItemTwoTaxConfigOneTaxCodeIdRegExp)
|
|
7910
|
+
.optional()
|
|
7911
|
+
.describe('Tax code reference.\n\nWhen both `taxCodeId` and `stripe.code` are provided, `taxCodeId` takes precedence:\nthe referenced tax code entity is used and `stripe.code` is ignored.'),
|
|
7539
7912
|
})
|
|
7540
7913
|
.describe('Set of provider specific tax configs.')
|
|
7541
7914
|
.optional()
|
|
7542
7915
|
.describe('The tax config of the rate card.\nWhen undefined, the tax config of the feature or the default tax config of the plan is used.'),
|
|
7543
|
-
type: zod
|
|
7916
|
+
type: zod
|
|
7917
|
+
.enum(['usage_based'])
|
|
7918
|
+
.describe('The type of the RateCard.'),
|
|
7544
7919
|
})
|
|
7545
7920
|
.describe('A usage-based rate card defines a price based on usage.'),
|
|
7546
7921
|
])
|
|
@@ -7554,15 +7929,22 @@ export const CreatePlanBody = zod
|
|
|
7554
7929
|
.object({
|
|
7555
7930
|
enabled: zod.coerce
|
|
7556
7931
|
.boolean()
|
|
7932
|
+
.default(createPlanBodyProRatingConfigOneEnabledDefault)
|
|
7557
7933
|
.describe('Whether pro-rating is enabled for this plan.'),
|
|
7558
7934
|
mode: zod
|
|
7559
7935
|
.enum(['prorate_prices'])
|
|
7560
7936
|
.describe('Pro-rating mode options for handling billing period changes.')
|
|
7937
|
+
.default(createPlanBodyProRatingConfigOneModeDefault)
|
|
7561
7938
|
.describe('How to handle pro-rating for billing period changes.'),
|
|
7562
7939
|
})
|
|
7563
7940
|
.describe('Configuration for pro-rating behavior.')
|
|
7564
7941
|
.default(createPlanBodyProRatingConfigDefault)
|
|
7565
7942
|
.describe('Default pro-rating configuration for subscriptions using this plan.'),
|
|
7943
|
+
settlementMode: zod
|
|
7944
|
+
.enum(['credit_then_invoice', 'credit_only'])
|
|
7945
|
+
.describe('The settlement mode of a plan.\nIt determines how the billing system generates invoices and credits for the subscriptions using this plan.\n- credit_then_invoice: credits from the previous billing period are applied first, then the remaining balance is invoiced. This is the default and most common settlement mode.\n- credit_only: only credits from the previous billing period are generated and applied. No invoices are generated for the subscription.')
|
|
7946
|
+
.default(createPlanBodySettlementModeDefault)
|
|
7947
|
+
.describe('The settlement mode of the plan.\nIt determines how the billing system generates invoices and credits for the subscriptions using this plan.\n- credit_then_invoice: credits from the previous billing period are applied first, then the remaining balance is invoiced.\n- credit_only: only credits from the previous billing period are generated and applied. No invoices are generated for the subscription.\nThis is the default and most common settlement mode.'),
|
|
7566
7948
|
})
|
|
7567
7949
|
.describe('Resource create operation model.');
|
|
7568
7950
|
/**
|
|
@@ -7596,6 +7978,7 @@ export const updatePlanBodyProRatingConfigDefault = {
|
|
|
7596
7978
|
enabled: true,
|
|
7597
7979
|
mode: 'prorate_prices',
|
|
7598
7980
|
};
|
|
7981
|
+
export const updatePlanBodySettlementModeDefault = 'credit_then_invoice';
|
|
7599
7982
|
export const updatePlanBodyPhasesItemKeyMax = 64;
|
|
7600
7983
|
export const updatePlanBodyPhasesItemKeyRegExp = /^[a-z0-9]+(?:_[a-z0-9]+)*$/;
|
|
7601
7984
|
export const updatePlanBodyPhasesItemNameMax = 256;
|
|
@@ -7612,6 +7995,7 @@ export const updatePlanBodyPhasesItemRateCardsItemOneEntitlementTemplateOneOneIs
|
|
|
7612
7995
|
export const updatePlanBodyPhasesItemRateCardsItemOneEntitlementTemplateOneOneIssueAfterResetPriorityMax = 255;
|
|
7613
7996
|
export const updatePlanBodyPhasesItemRateCardsItemOneEntitlementTemplateOneOnePreserveOverageAtResetDefault = false;
|
|
7614
7997
|
export const updatePlanBodyPhasesItemRateCardsItemOneTaxConfigOneStripeOneCodeRegExp = /^txcd_\d{8}$/;
|
|
7998
|
+
export const updatePlanBodyPhasesItemRateCardsItemOneTaxConfigOneTaxCodeIdRegExp = /^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/;
|
|
7615
7999
|
export const updatePlanBodyPhasesItemRateCardsItemOnePriceOneAmountOneRegExp = /^-?[0-9]+(\.[0-9]+)?$/;
|
|
7616
8000
|
export const updatePlanBodyPhasesItemRateCardsItemOnePriceOnePaymentTermDefault = 'in_advance';
|
|
7617
8001
|
export const updatePlanBodyPhasesItemRateCardsItemOneDiscountsOneUsageOneQuantityOneRegExp = /^-?[0-9]+(\.[0-9]+)?$/;
|
|
@@ -7627,6 +8011,7 @@ export const updatePlanBodyPhasesItemRateCardsItemTwoEntitlementTemplateOneOneIs
|
|
|
7627
8011
|
export const updatePlanBodyPhasesItemRateCardsItemTwoEntitlementTemplateOneOneIssueAfterResetPriorityMax = 255;
|
|
7628
8012
|
export const updatePlanBodyPhasesItemRateCardsItemTwoEntitlementTemplateOneOnePreserveOverageAtResetDefault = false;
|
|
7629
8013
|
export const updatePlanBodyPhasesItemRateCardsItemTwoTaxConfigOneStripeOneCodeRegExp = /^txcd_\d{8}$/;
|
|
8014
|
+
export const updatePlanBodyPhasesItemRateCardsItemTwoTaxConfigOneTaxCodeIdRegExp = /^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/;
|
|
7630
8015
|
export const updatePlanBodyPhasesItemRateCardsItemTwoPriceOneOneAmountOneRegExp = /^-?[0-9]+(\.[0-9]+)?$/;
|
|
7631
8016
|
export const updatePlanBodyPhasesItemRateCardsItemTwoPriceOneOnePaymentTermDefault = 'in_advance';
|
|
7632
8017
|
export const updatePlanBodyPhasesItemRateCardsItemTwoPriceOneTwoAmountOneRegExp = /^-?[0-9]+(\.[0-9]+)?$/;
|
|
@@ -7842,7 +8227,9 @@ export const UpdatePlanBody = zod
|
|
|
7842
8227
|
.describe('The payment term of a flat price.\nOne of: in_advance or in_arrears.')
|
|
7843
8228
|
.default(updatePlanBodyPhasesItemRateCardsItemOnePriceOnePaymentTermDefault)
|
|
7844
8229
|
.describe('The payment term of the flat price.\nDefaults to in advance.'),
|
|
7845
|
-
type: zod
|
|
8230
|
+
type: zod
|
|
8231
|
+
.enum(['flat'])
|
|
8232
|
+
.describe('The type of the price.'),
|
|
7846
8233
|
})
|
|
7847
8234
|
.describe('Flat price with payment term.')
|
|
7848
8235
|
.nullable()
|
|
@@ -7873,11 +8260,18 @@ export const UpdatePlanBody = zod
|
|
|
7873
8260
|
.describe('The tax config for Stripe.')
|
|
7874
8261
|
.optional()
|
|
7875
8262
|
.describe('Stripe tax config.'),
|
|
8263
|
+
taxCodeId: zod.coerce
|
|
8264
|
+
.string()
|
|
8265
|
+
.regex(updatePlanBodyPhasesItemRateCardsItemOneTaxConfigOneTaxCodeIdRegExp)
|
|
8266
|
+
.optional()
|
|
8267
|
+
.describe('Tax code reference.\n\nWhen both `taxCodeId` and `stripe.code` are provided, `taxCodeId` takes precedence:\nthe referenced tax code entity is used and `stripe.code` is ignored.'),
|
|
7876
8268
|
})
|
|
7877
8269
|
.describe('Set of provider specific tax configs.')
|
|
7878
8270
|
.optional()
|
|
7879
8271
|
.describe('The tax config of the rate card.\nWhen undefined, the tax config of the feature or the default tax config of the plan is used.'),
|
|
7880
|
-
type: zod
|
|
8272
|
+
type: zod
|
|
8273
|
+
.enum(['flat_fee'])
|
|
8274
|
+
.describe('The type of the RateCard.'),
|
|
7881
8275
|
})
|
|
7882
8276
|
.describe('A flat fee rate card defines a one-time purchase or a recurring fee.'),
|
|
7883
8277
|
zod
|
|
@@ -8016,7 +8410,9 @@ export const UpdatePlanBody = zod
|
|
|
8016
8410
|
.describe('The payment term of a flat price.\nOne of: in_advance or in_arrears.')
|
|
8017
8411
|
.default(updatePlanBodyPhasesItemRateCardsItemTwoPriceOneOnePaymentTermDefault)
|
|
8018
8412
|
.describe('The payment term of the flat price.\nDefaults to in advance.'),
|
|
8019
|
-
type: zod
|
|
8413
|
+
type: zod
|
|
8414
|
+
.enum(['flat'])
|
|
8415
|
+
.describe('The type of the price.'),
|
|
8020
8416
|
})
|
|
8021
8417
|
.describe('Flat price with payment term.'),
|
|
8022
8418
|
zod
|
|
@@ -8038,7 +8434,9 @@ export const UpdatePlanBody = zod
|
|
|
8038
8434
|
.describe('Numeric represents an arbitrary precision number.')
|
|
8039
8435
|
.optional()
|
|
8040
8436
|
.describe('The customer is committed to spend at least the amount.'),
|
|
8041
|
-
type: zod
|
|
8437
|
+
type: zod
|
|
8438
|
+
.enum(['unit'])
|
|
8439
|
+
.describe('The type of the price.'),
|
|
8042
8440
|
})
|
|
8043
8441
|
.describe('Unit price with spend commitments.'),
|
|
8044
8442
|
zod
|
|
@@ -8100,7 +8498,9 @@ export const UpdatePlanBody = zod
|
|
|
8100
8498
|
.describe('A price tier.\nAt least one price component is required in each tier.'))
|
|
8101
8499
|
.min(1)
|
|
8102
8500
|
.describe('The tiers of the tiered price.\nAt least one price component is required in each tier.'),
|
|
8103
|
-
type: zod
|
|
8501
|
+
type: zod
|
|
8502
|
+
.enum(['tiered'])
|
|
8503
|
+
.describe('The type of the price.\n\nOne of: flat, unit, or tiered.'),
|
|
8104
8504
|
})
|
|
8105
8505
|
.describe('Tiered price with spend commitments.'),
|
|
8106
8506
|
zod
|
|
@@ -8123,7 +8523,9 @@ export const UpdatePlanBody = zod
|
|
|
8123
8523
|
.describe('Numeric represents an arbitrary precision number.')
|
|
8124
8524
|
.default(updatePlanBodyPhasesItemRateCardsItemTwoPriceOneFourMultiplierDefault)
|
|
8125
8525
|
.describe('The multiplier to apply to the base price to get the dynamic price.\n\nExamples:\n- 0.0: the price is zero\n- 0.5: the price is 50% of the base price\n- 1.0: the price is the same as the base price\n- 1.5: the price is 150% of the base price'),
|
|
8126
|
-
type: zod
|
|
8526
|
+
type: zod
|
|
8527
|
+
.enum(['dynamic'])
|
|
8528
|
+
.describe('The type of the price.'),
|
|
8127
8529
|
})
|
|
8128
8530
|
.describe('Dynamic price with spend commitments.'),
|
|
8129
8531
|
zod
|
|
@@ -8150,7 +8552,9 @@ export const UpdatePlanBody = zod
|
|
|
8150
8552
|
.regex(updatePlanBodyPhasesItemRateCardsItemTwoPriceOneFiveQuantityPerPackageOneRegExp)
|
|
8151
8553
|
.describe('Numeric represents an arbitrary precision number.')
|
|
8152
8554
|
.describe('The quantity per package.'),
|
|
8153
|
-
type: zod
|
|
8555
|
+
type: zod
|
|
8556
|
+
.enum(['package'])
|
|
8557
|
+
.describe('The type of the price.'),
|
|
8154
8558
|
})
|
|
8155
8559
|
.describe('Package price with spend commitments.'),
|
|
8156
8560
|
])
|
|
@@ -8183,11 +8587,18 @@ export const UpdatePlanBody = zod
|
|
|
8183
8587
|
.describe('The tax config for Stripe.')
|
|
8184
8588
|
.optional()
|
|
8185
8589
|
.describe('Stripe tax config.'),
|
|
8590
|
+
taxCodeId: zod.coerce
|
|
8591
|
+
.string()
|
|
8592
|
+
.regex(updatePlanBodyPhasesItemRateCardsItemTwoTaxConfigOneTaxCodeIdRegExp)
|
|
8593
|
+
.optional()
|
|
8594
|
+
.describe('Tax code reference.\n\nWhen both `taxCodeId` and `stripe.code` are provided, `taxCodeId` takes precedence:\nthe referenced tax code entity is used and `stripe.code` is ignored.'),
|
|
8186
8595
|
})
|
|
8187
8596
|
.describe('Set of provider specific tax configs.')
|
|
8188
8597
|
.optional()
|
|
8189
8598
|
.describe('The tax config of the rate card.\nWhen undefined, the tax config of the feature or the default tax config of the plan is used.'),
|
|
8190
|
-
type: zod
|
|
8599
|
+
type: zod
|
|
8600
|
+
.enum(['usage_based'])
|
|
8601
|
+
.describe('The type of the RateCard.'),
|
|
8191
8602
|
})
|
|
8192
8603
|
.describe('A usage-based rate card defines a price based on usage.'),
|
|
8193
8604
|
])
|
|
@@ -8201,15 +8612,22 @@ export const UpdatePlanBody = zod
|
|
|
8201
8612
|
.object({
|
|
8202
8613
|
enabled: zod.coerce
|
|
8203
8614
|
.boolean()
|
|
8615
|
+
.default(updatePlanBodyProRatingConfigOneEnabledDefault)
|
|
8204
8616
|
.describe('Whether pro-rating is enabled for this plan.'),
|
|
8205
8617
|
mode: zod
|
|
8206
8618
|
.enum(['prorate_prices'])
|
|
8207
8619
|
.describe('Pro-rating mode options for handling billing period changes.')
|
|
8620
|
+
.default(updatePlanBodyProRatingConfigOneModeDefault)
|
|
8208
8621
|
.describe('How to handle pro-rating for billing period changes.'),
|
|
8209
8622
|
})
|
|
8210
8623
|
.describe('Configuration for pro-rating behavior.')
|
|
8211
8624
|
.default(updatePlanBodyProRatingConfigDefault)
|
|
8212
8625
|
.describe('Default pro-rating configuration for subscriptions using this plan.'),
|
|
8626
|
+
settlementMode: zod
|
|
8627
|
+
.enum(['credit_then_invoice', 'credit_only'])
|
|
8628
|
+
.describe('The settlement mode of a plan.\nIt determines how the billing system generates invoices and credits for the subscriptions using this plan.\n- credit_then_invoice: credits from the previous billing period are applied first, then the remaining balance is invoiced. This is the default and most common settlement mode.\n- credit_only: only credits from the previous billing period are generated and applied. No invoices are generated for the subscription.')
|
|
8629
|
+
.default(updatePlanBodySettlementModeDefault)
|
|
8630
|
+
.describe('The settlement mode of the plan.\nIt determines how the billing system generates invoices and credits for the subscriptions using this plan.\n- credit_then_invoice: credits from the previous billing period are applied first, then the remaining balance is invoiced.\n- credit_only: only credits from the previous billing period are generated and applied. No invoices are generated for the subscription.\nThis is the default and most common settlement mode.'),
|
|
8213
8631
|
})
|
|
8214
8632
|
.describe('Resource update operation model.');
|
|
8215
8633
|
/**
|
|
@@ -8262,6 +8680,7 @@ export const listPlanAddonsQueryKeyItemRegExp = /^[a-z0-9]+(?:_[a-z0-9]+)*$/;
|
|
|
8262
8680
|
export const listPlanAddonsQueryPageDefault = 1;
|
|
8263
8681
|
export const listPlanAddonsQueryPageSizeDefault = 100;
|
|
8264
8682
|
export const listPlanAddonsQueryPageSizeMax = 1000;
|
|
8683
|
+
export const listPlanAddonsQueryOrderDefault = 'ASC';
|
|
8265
8684
|
export const ListPlanAddonsQueryParams = zod.object({
|
|
8266
8685
|
id: zod
|
|
8267
8686
|
.array(zod.coerce
|
|
@@ -8287,7 +8706,11 @@ export const ListPlanAddonsQueryParams = zod.object({
|
|
|
8287
8706
|
.record(zod.string(), zod.array(zod.coerce.number()))
|
|
8288
8707
|
.optional()
|
|
8289
8708
|
.describe('Filter by addon.key and addon.version attributes.'),
|
|
8290
|
-
order: zod
|
|
8709
|
+
order: zod
|
|
8710
|
+
.enum(['ASC', 'DESC'])
|
|
8711
|
+
.describe('The order direction.')
|
|
8712
|
+
.default(listPlanAddonsQueryOrderDefault)
|
|
8713
|
+
.describe('The order direction.'),
|
|
8291
8714
|
orderBy: zod
|
|
8292
8715
|
.enum(['id', 'key', 'version', 'created_at', 'updated_at'])
|
|
8293
8716
|
.optional()
|
|
@@ -9090,11 +9513,15 @@ export const ListEntitlementGrantsParams = zod.object({
|
|
|
9090
9513
|
subjectIdOrKey: zod.coerce.string(),
|
|
9091
9514
|
});
|
|
9092
9515
|
export const listEntitlementGrantsQueryIncludeDeletedDefault = false;
|
|
9516
|
+
export const listEntitlementGrantsQueryOrderByDefault = 'updatedAt';
|
|
9093
9517
|
export const ListEntitlementGrantsQueryParams = zod.object({
|
|
9094
9518
|
includeDeleted: zod.coerce
|
|
9095
9519
|
.boolean()
|
|
9096
9520
|
.default(listEntitlementGrantsQueryIncludeDeletedDefault),
|
|
9097
|
-
orderBy: zod
|
|
9521
|
+
orderBy: zod
|
|
9522
|
+
.enum(['id', 'createdAt', 'updatedAt'])
|
|
9523
|
+
.describe('Order by options for grants.')
|
|
9524
|
+
.default(listEntitlementGrantsQueryOrderByDefault),
|
|
9098
9525
|
});
|
|
9099
9526
|
/**
|
|
9100
9527
|
* Grants define a behavior of granting usage for a metered entitlement. They can have complicated recurrence and rollover rules, thanks to which you can define a wide range of access patterns with a single grant, in most cases you don't have to periodically create new grants. You can only issue grants for active metered entitlements.
|
|
@@ -9510,6 +9937,7 @@ export const createSubscriptionBodyTwoCustomPlanOneOneProRatingConfigDefault = {
|
|
|
9510
9937
|
enabled: true,
|
|
9511
9938
|
mode: 'prorate_prices',
|
|
9512
9939
|
};
|
|
9940
|
+
export const createSubscriptionBodyTwoCustomPlanOneOneSettlementModeDefault = 'credit_then_invoice';
|
|
9513
9941
|
export const createSubscriptionBodyTwoCustomPlanOneOnePhasesItemKeyMax = 64;
|
|
9514
9942
|
export const createSubscriptionBodyTwoCustomPlanOneOnePhasesItemKeyRegExp = /^[a-z0-9]+(?:_[a-z0-9]+)*$/;
|
|
9515
9943
|
export const createSubscriptionBodyTwoCustomPlanOneOnePhasesItemNameMax = 256;
|
|
@@ -9526,6 +9954,7 @@ export const createSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemOne
|
|
|
9526
9954
|
export const createSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemOneEntitlementTemplateOneOneIssueAfterResetPriorityMax = 255;
|
|
9527
9955
|
export const createSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemOneEntitlementTemplateOneOnePreserveOverageAtResetDefault = false;
|
|
9528
9956
|
export const createSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemOneTaxConfigOneStripeOneCodeRegExp = /^txcd_\d{8}$/;
|
|
9957
|
+
export const createSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemOneTaxConfigOneTaxCodeIdRegExp = /^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/;
|
|
9529
9958
|
export const createSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemOnePriceOneAmountOneRegExp = /^-?[0-9]+(\.[0-9]+)?$/;
|
|
9530
9959
|
export const createSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemOnePriceOnePaymentTermDefault = 'in_advance';
|
|
9531
9960
|
export const createSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemOneDiscountsOneUsageOneQuantityOneRegExp = /^-?[0-9]+(\.[0-9]+)?$/;
|
|
@@ -9541,6 +9970,7 @@ export const createSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwo
|
|
|
9541
9970
|
export const createSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoEntitlementTemplateOneOneIssueAfterResetPriorityMax = 255;
|
|
9542
9971
|
export const createSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoEntitlementTemplateOneOnePreserveOverageAtResetDefault = false;
|
|
9543
9972
|
export const createSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoTaxConfigOneStripeOneCodeRegExp = /^txcd_\d{8}$/;
|
|
9973
|
+
export const createSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoTaxConfigOneTaxCodeIdRegExp = /^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/;
|
|
9544
9974
|
export const createSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneOneAmountOneRegExp = /^-?[0-9]+(\.[0-9]+)?$/;
|
|
9545
9975
|
export const createSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneOnePaymentTermDefault = 'in_advance';
|
|
9546
9976
|
export const createSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneTwoAmountOneRegExp = /^-?[0-9]+(\.[0-9]+)?$/;
|
|
@@ -9620,6 +10050,11 @@ export const CreateSubscriptionBody = zod
|
|
|
9620
10050
|
})
|
|
9621
10051
|
.describe('References an exact plan defaulting to the current active version.')
|
|
9622
10052
|
.describe('The plan reference to change to.'),
|
|
10053
|
+
settlementMode: zod
|
|
10054
|
+
.enum(['credit_then_invoice', 'credit_only'])
|
|
10055
|
+
.describe('The settlement mode of a plan.\nIt determines how the billing system generates invoices and credits for the subscriptions using this plan.\n- credit_then_invoice: credits from the previous billing period are applied first, then the remaining balance is invoiced. This is the default and most common settlement mode.\n- credit_only: only credits from the previous billing period are generated and applied. No invoices are generated for the subscription.')
|
|
10056
|
+
.optional()
|
|
10057
|
+
.describe('The settlement mode of the subscription.'),
|
|
9623
10058
|
startingPhase: zod.coerce
|
|
9624
10059
|
.string()
|
|
9625
10060
|
.min(1)
|
|
@@ -9677,6 +10112,7 @@ export const CreateSubscriptionBody = zod
|
|
|
9677
10112
|
.max(createSubscriptionBodyTwoCustomPlanOneOneCurrencyOneMax)
|
|
9678
10113
|
.regex(createSubscriptionBodyTwoCustomPlanOneOneCurrencyOneRegExp)
|
|
9679
10114
|
.describe('Three-letter [ISO4217](https://www.iso.org/iso-4217-currency-codes.html) currency code.\nCustom three-letter currency codes are also supported for convenience.')
|
|
10115
|
+
.default(createSubscriptionBodyTwoCustomPlanOneOneCurrencyDefault)
|
|
9680
10116
|
.describe('The currency code of the plan.'),
|
|
9681
10117
|
description: zod.coerce
|
|
9682
10118
|
.string()
|
|
@@ -9859,7 +10295,9 @@ export const CreateSubscriptionBody = zod
|
|
|
9859
10295
|
.describe('The payment term of a flat price.\nOne of: in_advance or in_arrears.')
|
|
9860
10296
|
.default(createSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemOnePriceOnePaymentTermDefault)
|
|
9861
10297
|
.describe('The payment term of the flat price.\nDefaults to in advance.'),
|
|
9862
|
-
type: zod
|
|
10298
|
+
type: zod
|
|
10299
|
+
.enum(['flat'])
|
|
10300
|
+
.describe('The type of the price.'),
|
|
9863
10301
|
})
|
|
9864
10302
|
.describe('Flat price with payment term.')
|
|
9865
10303
|
.nullable()
|
|
@@ -9890,11 +10328,18 @@ export const CreateSubscriptionBody = zod
|
|
|
9890
10328
|
.describe('The tax config for Stripe.')
|
|
9891
10329
|
.optional()
|
|
9892
10330
|
.describe('Stripe tax config.'),
|
|
10331
|
+
taxCodeId: zod.coerce
|
|
10332
|
+
.string()
|
|
10333
|
+
.regex(createSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemOneTaxConfigOneTaxCodeIdRegExp)
|
|
10334
|
+
.optional()
|
|
10335
|
+
.describe('Tax code reference.\n\nWhen both `taxCodeId` and `stripe.code` are provided, `taxCodeId` takes precedence:\nthe referenced tax code entity is used and `stripe.code` is ignored.'),
|
|
9893
10336
|
})
|
|
9894
10337
|
.describe('Set of provider specific tax configs.')
|
|
9895
10338
|
.optional()
|
|
9896
10339
|
.describe('The tax config of the rate card.\nWhen undefined, the tax config of the feature or the default tax config of the plan is used.'),
|
|
9897
|
-
type: zod
|
|
10340
|
+
type: zod
|
|
10341
|
+
.enum(['flat_fee'])
|
|
10342
|
+
.describe('The type of the RateCard.'),
|
|
9898
10343
|
})
|
|
9899
10344
|
.describe('A flat fee rate card defines a one-time purchase or a recurring fee.'),
|
|
9900
10345
|
zod
|
|
@@ -10033,7 +10478,9 @@ export const CreateSubscriptionBody = zod
|
|
|
10033
10478
|
.describe('The payment term of a flat price.\nOne of: in_advance or in_arrears.')
|
|
10034
10479
|
.default(createSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneOnePaymentTermDefault)
|
|
10035
10480
|
.describe('The payment term of the flat price.\nDefaults to in advance.'),
|
|
10036
|
-
type: zod
|
|
10481
|
+
type: zod
|
|
10482
|
+
.enum(['flat'])
|
|
10483
|
+
.describe('The type of the price.'),
|
|
10037
10484
|
})
|
|
10038
10485
|
.describe('Flat price with payment term.'),
|
|
10039
10486
|
zod
|
|
@@ -10055,7 +10502,9 @@ export const CreateSubscriptionBody = zod
|
|
|
10055
10502
|
.describe('Numeric represents an arbitrary precision number.')
|
|
10056
10503
|
.optional()
|
|
10057
10504
|
.describe('The customer is committed to spend at least the amount.'),
|
|
10058
|
-
type: zod
|
|
10505
|
+
type: zod
|
|
10506
|
+
.enum(['unit'])
|
|
10507
|
+
.describe('The type of the price.'),
|
|
10059
10508
|
})
|
|
10060
10509
|
.describe('Unit price with spend commitments.'),
|
|
10061
10510
|
zod
|
|
@@ -10117,7 +10566,9 @@ export const CreateSubscriptionBody = zod
|
|
|
10117
10566
|
.describe('A price tier.\nAt least one price component is required in each tier.'))
|
|
10118
10567
|
.min(1)
|
|
10119
10568
|
.describe('The tiers of the tiered price.\nAt least one price component is required in each tier.'),
|
|
10120
|
-
type: zod
|
|
10569
|
+
type: zod
|
|
10570
|
+
.enum(['tiered'])
|
|
10571
|
+
.describe('The type of the price.\n\nOne of: flat, unit, or tiered.'),
|
|
10121
10572
|
})
|
|
10122
10573
|
.describe('Tiered price with spend commitments.'),
|
|
10123
10574
|
zod
|
|
@@ -10140,7 +10591,9 @@ export const CreateSubscriptionBody = zod
|
|
|
10140
10591
|
.describe('Numeric represents an arbitrary precision number.')
|
|
10141
10592
|
.default(createSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneFourMultiplierDefault)
|
|
10142
10593
|
.describe('The multiplier to apply to the base price to get the dynamic price.\n\nExamples:\n- 0.0: the price is zero\n- 0.5: the price is 50% of the base price\n- 1.0: the price is the same as the base price\n- 1.5: the price is 150% of the base price'),
|
|
10143
|
-
type: zod
|
|
10594
|
+
type: zod
|
|
10595
|
+
.enum(['dynamic'])
|
|
10596
|
+
.describe('The type of the price.'),
|
|
10144
10597
|
})
|
|
10145
10598
|
.describe('Dynamic price with spend commitments.'),
|
|
10146
10599
|
zod
|
|
@@ -10167,7 +10620,9 @@ export const CreateSubscriptionBody = zod
|
|
|
10167
10620
|
.regex(createSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneFiveQuantityPerPackageOneRegExp)
|
|
10168
10621
|
.describe('Numeric represents an arbitrary precision number.')
|
|
10169
10622
|
.describe('The quantity per package.'),
|
|
10170
|
-
type: zod
|
|
10623
|
+
type: zod
|
|
10624
|
+
.enum(['package'])
|
|
10625
|
+
.describe('The type of the price.'),
|
|
10171
10626
|
})
|
|
10172
10627
|
.describe('Package price with spend commitments.'),
|
|
10173
10628
|
])
|
|
@@ -10200,11 +10655,18 @@ export const CreateSubscriptionBody = zod
|
|
|
10200
10655
|
.describe('The tax config for Stripe.')
|
|
10201
10656
|
.optional()
|
|
10202
10657
|
.describe('Stripe tax config.'),
|
|
10658
|
+
taxCodeId: zod.coerce
|
|
10659
|
+
.string()
|
|
10660
|
+
.regex(createSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoTaxConfigOneTaxCodeIdRegExp)
|
|
10661
|
+
.optional()
|
|
10662
|
+
.describe('Tax code reference.\n\nWhen both `taxCodeId` and `stripe.code` are provided, `taxCodeId` takes precedence:\nthe referenced tax code entity is used and `stripe.code` is ignored.'),
|
|
10203
10663
|
})
|
|
10204
10664
|
.describe('Set of provider specific tax configs.')
|
|
10205
10665
|
.optional()
|
|
10206
10666
|
.describe('The tax config of the rate card.\nWhen undefined, the tax config of the feature or the default tax config of the plan is used.'),
|
|
10207
|
-
type: zod
|
|
10667
|
+
type: zod
|
|
10668
|
+
.enum(['usage_based'])
|
|
10669
|
+
.describe('The type of the RateCard.'),
|
|
10208
10670
|
})
|
|
10209
10671
|
.describe('A usage-based rate card defines a price based on usage.'),
|
|
10210
10672
|
])
|
|
@@ -10218,15 +10680,22 @@ export const CreateSubscriptionBody = zod
|
|
|
10218
10680
|
.object({
|
|
10219
10681
|
enabled: zod.coerce
|
|
10220
10682
|
.boolean()
|
|
10683
|
+
.default(createSubscriptionBodyTwoCustomPlanOneOneProRatingConfigOneEnabledDefault)
|
|
10221
10684
|
.describe('Whether pro-rating is enabled for this plan.'),
|
|
10222
10685
|
mode: zod
|
|
10223
10686
|
.enum(['prorate_prices'])
|
|
10224
10687
|
.describe('Pro-rating mode options for handling billing period changes.')
|
|
10688
|
+
.default(createSubscriptionBodyTwoCustomPlanOneOneProRatingConfigOneModeDefault)
|
|
10225
10689
|
.describe('How to handle pro-rating for billing period changes.'),
|
|
10226
10690
|
})
|
|
10227
10691
|
.describe('Configuration for pro-rating behavior.')
|
|
10228
10692
|
.default(createSubscriptionBodyTwoCustomPlanOneOneProRatingConfigDefault)
|
|
10229
10693
|
.describe('Default pro-rating configuration for subscriptions using this plan.'),
|
|
10694
|
+
settlementMode: zod
|
|
10695
|
+
.enum(['credit_then_invoice', 'credit_only'])
|
|
10696
|
+
.describe('The settlement mode of a plan.\nIt determines how the billing system generates invoices and credits for the subscriptions using this plan.\n- credit_then_invoice: credits from the previous billing period are applied first, then the remaining balance is invoiced. This is the default and most common settlement mode.\n- credit_only: only credits from the previous billing period are generated and applied. No invoices are generated for the subscription.')
|
|
10697
|
+
.default(createSubscriptionBodyTwoCustomPlanOneOneSettlementModeDefault)
|
|
10698
|
+
.describe('The settlement mode of the plan.\nIt determines how the billing system generates invoices and credits for the subscriptions using this plan.\n- credit_then_invoice: credits from the previous billing period are applied first, then the remaining balance is invoiced.\n- credit_only: only credits from the previous billing period are generated and applied. No invoices are generated for the subscription.\nThis is the default and most common settlement mode.'),
|
|
10230
10699
|
})
|
|
10231
10700
|
.describe('The template for omitting properties.')
|
|
10232
10701
|
.describe('Plan input for custom subscription creation (without key and version).')
|
|
@@ -10285,6 +10754,7 @@ export const editSubscriptionBodyCustomizationsItemOneRateCardOneEntitlementTemp
|
|
|
10285
10754
|
export const editSubscriptionBodyCustomizationsItemOneRateCardOneEntitlementTemplateOneOneIssueAfterResetPriorityMax = 255;
|
|
10286
10755
|
export const editSubscriptionBodyCustomizationsItemOneRateCardOneEntitlementTemplateOneOnePreserveOverageAtResetDefault = false;
|
|
10287
10756
|
export const editSubscriptionBodyCustomizationsItemOneRateCardOneTaxConfigOneStripeOneCodeRegExp = /^txcd_\d{8}$/;
|
|
10757
|
+
export const editSubscriptionBodyCustomizationsItemOneRateCardOneTaxConfigOneTaxCodeIdRegExp = /^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/;
|
|
10288
10758
|
export const editSubscriptionBodyCustomizationsItemOneRateCardOnePriceOneAmountOneRegExp = /^-?[0-9]+(\.[0-9]+)?$/;
|
|
10289
10759
|
export const editSubscriptionBodyCustomizationsItemOneRateCardOnePriceOnePaymentTermDefault = 'in_advance';
|
|
10290
10760
|
export const editSubscriptionBodyCustomizationsItemOneRateCardOneDiscountsOneUsageOneQuantityOneRegExp = /^-?[0-9]+(\.[0-9]+)?$/;
|
|
@@ -10300,6 +10770,7 @@ export const editSubscriptionBodyCustomizationsItemOneRateCardTwoEntitlementTemp
|
|
|
10300
10770
|
export const editSubscriptionBodyCustomizationsItemOneRateCardTwoEntitlementTemplateOneOneIssueAfterResetPriorityMax = 255;
|
|
10301
10771
|
export const editSubscriptionBodyCustomizationsItemOneRateCardTwoEntitlementTemplateOneOnePreserveOverageAtResetDefault = false;
|
|
10302
10772
|
export const editSubscriptionBodyCustomizationsItemOneRateCardTwoTaxConfigOneStripeOneCodeRegExp = /^txcd_\d{8}$/;
|
|
10773
|
+
export const editSubscriptionBodyCustomizationsItemOneRateCardTwoTaxConfigOneTaxCodeIdRegExp = /^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/;
|
|
10303
10774
|
export const editSubscriptionBodyCustomizationsItemOneRateCardTwoPriceOneOneAmountOneRegExp = /^-?[0-9]+(\.[0-9]+)?$/;
|
|
10304
10775
|
export const editSubscriptionBodyCustomizationsItemOneRateCardTwoPriceOneOnePaymentTermDefault = 'in_advance';
|
|
10305
10776
|
export const editSubscriptionBodyCustomizationsItemOneRateCardTwoPriceOneTwoAmountOneRegExp = /^-?[0-9]+(\.[0-9]+)?$/;
|
|
@@ -10469,7 +10940,9 @@ export const EditSubscriptionBody = zod
|
|
|
10469
10940
|
.describe('The payment term of a flat price.\nOne of: in_advance or in_arrears.')
|
|
10470
10941
|
.default(editSubscriptionBodyCustomizationsItemOneRateCardOnePriceOnePaymentTermDefault)
|
|
10471
10942
|
.describe('The payment term of the flat price.\nDefaults to in advance.'),
|
|
10472
|
-
type: zod
|
|
10943
|
+
type: zod
|
|
10944
|
+
.enum(['flat'])
|
|
10945
|
+
.describe('The type of the price.'),
|
|
10473
10946
|
})
|
|
10474
10947
|
.describe('Flat price with payment term.')
|
|
10475
10948
|
.nullable()
|
|
@@ -10500,11 +10973,18 @@ export const EditSubscriptionBody = zod
|
|
|
10500
10973
|
.describe('The tax config for Stripe.')
|
|
10501
10974
|
.optional()
|
|
10502
10975
|
.describe('Stripe tax config.'),
|
|
10976
|
+
taxCodeId: zod.coerce
|
|
10977
|
+
.string()
|
|
10978
|
+
.regex(editSubscriptionBodyCustomizationsItemOneRateCardOneTaxConfigOneTaxCodeIdRegExp)
|
|
10979
|
+
.optional()
|
|
10980
|
+
.describe('Tax code reference.\n\nWhen both `taxCodeId` and `stripe.code` are provided, `taxCodeId` takes precedence:\nthe referenced tax code entity is used and `stripe.code` is ignored.'),
|
|
10503
10981
|
})
|
|
10504
10982
|
.describe('Set of provider specific tax configs.')
|
|
10505
10983
|
.optional()
|
|
10506
10984
|
.describe('The tax config of the rate card.\nWhen undefined, the tax config of the feature or the default tax config of the plan is used.'),
|
|
10507
|
-
type: zod
|
|
10985
|
+
type: zod
|
|
10986
|
+
.enum(['flat_fee'])
|
|
10987
|
+
.describe('The type of the RateCard.'),
|
|
10508
10988
|
})
|
|
10509
10989
|
.describe('A flat fee rate card defines a one-time purchase or a recurring fee.'),
|
|
10510
10990
|
zod
|
|
@@ -10643,7 +11123,9 @@ export const EditSubscriptionBody = zod
|
|
|
10643
11123
|
.describe('The payment term of a flat price.\nOne of: in_advance or in_arrears.')
|
|
10644
11124
|
.default(editSubscriptionBodyCustomizationsItemOneRateCardTwoPriceOneOnePaymentTermDefault)
|
|
10645
11125
|
.describe('The payment term of the flat price.\nDefaults to in advance.'),
|
|
10646
|
-
type: zod
|
|
11126
|
+
type: zod
|
|
11127
|
+
.enum(['flat'])
|
|
11128
|
+
.describe('The type of the price.'),
|
|
10647
11129
|
})
|
|
10648
11130
|
.describe('Flat price with payment term.'),
|
|
10649
11131
|
zod
|
|
@@ -10665,7 +11147,9 @@ export const EditSubscriptionBody = zod
|
|
|
10665
11147
|
.describe('Numeric represents an arbitrary precision number.')
|
|
10666
11148
|
.optional()
|
|
10667
11149
|
.describe('The customer is committed to spend at least the amount.'),
|
|
10668
|
-
type: zod
|
|
11150
|
+
type: zod
|
|
11151
|
+
.enum(['unit'])
|
|
11152
|
+
.describe('The type of the price.'),
|
|
10669
11153
|
})
|
|
10670
11154
|
.describe('Unit price with spend commitments.'),
|
|
10671
11155
|
zod
|
|
@@ -10727,7 +11211,9 @@ export const EditSubscriptionBody = zod
|
|
|
10727
11211
|
.describe('A price tier.\nAt least one price component is required in each tier.'))
|
|
10728
11212
|
.min(1)
|
|
10729
11213
|
.describe('The tiers of the tiered price.\nAt least one price component is required in each tier.'),
|
|
10730
|
-
type: zod
|
|
11214
|
+
type: zod
|
|
11215
|
+
.enum(['tiered'])
|
|
11216
|
+
.describe('The type of the price.\n\nOne of: flat, unit, or tiered.'),
|
|
10731
11217
|
})
|
|
10732
11218
|
.describe('Tiered price with spend commitments.'),
|
|
10733
11219
|
zod
|
|
@@ -10750,7 +11236,9 @@ export const EditSubscriptionBody = zod
|
|
|
10750
11236
|
.describe('Numeric represents an arbitrary precision number.')
|
|
10751
11237
|
.default(editSubscriptionBodyCustomizationsItemOneRateCardTwoPriceOneFourMultiplierDefault)
|
|
10752
11238
|
.describe('The multiplier to apply to the base price to get the dynamic price.\n\nExamples:\n- 0.0: the price is zero\n- 0.5: the price is 50% of the base price\n- 1.0: the price is the same as the base price\n- 1.5: the price is 150% of the base price'),
|
|
10753
|
-
type: zod
|
|
11239
|
+
type: zod
|
|
11240
|
+
.enum(['dynamic'])
|
|
11241
|
+
.describe('The type of the price.'),
|
|
10754
11242
|
})
|
|
10755
11243
|
.describe('Dynamic price with spend commitments.'),
|
|
10756
11244
|
zod
|
|
@@ -10777,7 +11265,9 @@ export const EditSubscriptionBody = zod
|
|
|
10777
11265
|
.regex(editSubscriptionBodyCustomizationsItemOneRateCardTwoPriceOneFiveQuantityPerPackageOneRegExp)
|
|
10778
11266
|
.describe('Numeric represents an arbitrary precision number.')
|
|
10779
11267
|
.describe('The quantity per package.'),
|
|
10780
|
-
type: zod
|
|
11268
|
+
type: zod
|
|
11269
|
+
.enum(['package'])
|
|
11270
|
+
.describe('The type of the price.'),
|
|
10781
11271
|
})
|
|
10782
11272
|
.describe('Package price with spend commitments.'),
|
|
10783
11273
|
])
|
|
@@ -10810,11 +11300,18 @@ export const EditSubscriptionBody = zod
|
|
|
10810
11300
|
.describe('The tax config for Stripe.')
|
|
10811
11301
|
.optional()
|
|
10812
11302
|
.describe('Stripe tax config.'),
|
|
11303
|
+
taxCodeId: zod.coerce
|
|
11304
|
+
.string()
|
|
11305
|
+
.regex(editSubscriptionBodyCustomizationsItemOneRateCardTwoTaxConfigOneTaxCodeIdRegExp)
|
|
11306
|
+
.optional()
|
|
11307
|
+
.describe('Tax code reference.\n\nWhen both `taxCodeId` and `stripe.code` are provided, `taxCodeId` takes precedence:\nthe referenced tax code entity is used and `stripe.code` is ignored.'),
|
|
10813
11308
|
})
|
|
10814
11309
|
.describe('Set of provider specific tax configs.')
|
|
10815
11310
|
.optional()
|
|
10816
11311
|
.describe('The tax config of the rate card.\nWhen undefined, the tax config of the feature or the default tax config of the plan is used.'),
|
|
10817
|
-
type: zod
|
|
11312
|
+
type: zod
|
|
11313
|
+
.enum(['usage_based'])
|
|
11314
|
+
.describe('The type of the RateCard.'),
|
|
10818
11315
|
})
|
|
10819
11316
|
.describe('A usage-based rate card defines a price based on usage.'),
|
|
10820
11317
|
])
|
|
@@ -11118,6 +11615,7 @@ export const changeSubscriptionBodyTwoCustomPlanOneOneProRatingConfigDefault = {
|
|
|
11118
11615
|
enabled: true,
|
|
11119
11616
|
mode: 'prorate_prices',
|
|
11120
11617
|
};
|
|
11618
|
+
export const changeSubscriptionBodyTwoCustomPlanOneOneSettlementModeDefault = 'credit_then_invoice';
|
|
11121
11619
|
export const changeSubscriptionBodyTwoCustomPlanOneOnePhasesItemKeyMax = 64;
|
|
11122
11620
|
export const changeSubscriptionBodyTwoCustomPlanOneOnePhasesItemKeyRegExp = /^[a-z0-9]+(?:_[a-z0-9]+)*$/;
|
|
11123
11621
|
export const changeSubscriptionBodyTwoCustomPlanOneOnePhasesItemNameMax = 256;
|
|
@@ -11134,6 +11632,7 @@ export const changeSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemOne
|
|
|
11134
11632
|
export const changeSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemOneEntitlementTemplateOneOneIssueAfterResetPriorityMax = 255;
|
|
11135
11633
|
export const changeSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemOneEntitlementTemplateOneOnePreserveOverageAtResetDefault = false;
|
|
11136
11634
|
export const changeSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemOneTaxConfigOneStripeOneCodeRegExp = /^txcd_\d{8}$/;
|
|
11635
|
+
export const changeSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemOneTaxConfigOneTaxCodeIdRegExp = /^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/;
|
|
11137
11636
|
export const changeSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemOnePriceOneAmountOneRegExp = /^-?[0-9]+(\.[0-9]+)?$/;
|
|
11138
11637
|
export const changeSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemOnePriceOnePaymentTermDefault = 'in_advance';
|
|
11139
11638
|
export const changeSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemOneDiscountsOneUsageOneQuantityOneRegExp = /^-?[0-9]+(\.[0-9]+)?$/;
|
|
@@ -11149,6 +11648,7 @@ export const changeSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwo
|
|
|
11149
11648
|
export const changeSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoEntitlementTemplateOneOneIssueAfterResetPriorityMax = 255;
|
|
11150
11649
|
export const changeSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoEntitlementTemplateOneOnePreserveOverageAtResetDefault = false;
|
|
11151
11650
|
export const changeSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoTaxConfigOneStripeOneCodeRegExp = /^txcd_\d{8}$/;
|
|
11651
|
+
export const changeSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoTaxConfigOneTaxCodeIdRegExp = /^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/;
|
|
11152
11652
|
export const changeSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneOneAmountOneRegExp = /^-?[0-9]+(\.[0-9]+)?$/;
|
|
11153
11653
|
export const changeSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneOnePaymentTermDefault = 'in_advance';
|
|
11154
11654
|
export const changeSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneTwoAmountOneRegExp = /^-?[0-9]+(\.[0-9]+)?$/;
|
|
@@ -11259,6 +11759,7 @@ export const ChangeSubscriptionBody = zod
|
|
|
11259
11759
|
.max(changeSubscriptionBodyTwoCustomPlanOneOneCurrencyOneMax)
|
|
11260
11760
|
.regex(changeSubscriptionBodyTwoCustomPlanOneOneCurrencyOneRegExp)
|
|
11261
11761
|
.describe('Three-letter [ISO4217](https://www.iso.org/iso-4217-currency-codes.html) currency code.\nCustom three-letter currency codes are also supported for convenience.')
|
|
11762
|
+
.default(changeSubscriptionBodyTwoCustomPlanOneOneCurrencyDefault)
|
|
11262
11763
|
.describe('The currency code of the plan.'),
|
|
11263
11764
|
description: zod.coerce
|
|
11264
11765
|
.string()
|
|
@@ -11441,7 +11942,9 @@ export const ChangeSubscriptionBody = zod
|
|
|
11441
11942
|
.describe('The payment term of a flat price.\nOne of: in_advance or in_arrears.')
|
|
11442
11943
|
.default(changeSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemOnePriceOnePaymentTermDefault)
|
|
11443
11944
|
.describe('The payment term of the flat price.\nDefaults to in advance.'),
|
|
11444
|
-
type: zod
|
|
11945
|
+
type: zod
|
|
11946
|
+
.enum(['flat'])
|
|
11947
|
+
.describe('The type of the price.'),
|
|
11445
11948
|
})
|
|
11446
11949
|
.describe('Flat price with payment term.')
|
|
11447
11950
|
.nullable()
|
|
@@ -11472,11 +11975,18 @@ export const ChangeSubscriptionBody = zod
|
|
|
11472
11975
|
.describe('The tax config for Stripe.')
|
|
11473
11976
|
.optional()
|
|
11474
11977
|
.describe('Stripe tax config.'),
|
|
11978
|
+
taxCodeId: zod.coerce
|
|
11979
|
+
.string()
|
|
11980
|
+
.regex(changeSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemOneTaxConfigOneTaxCodeIdRegExp)
|
|
11981
|
+
.optional()
|
|
11982
|
+
.describe('Tax code reference.\n\nWhen both `taxCodeId` and `stripe.code` are provided, `taxCodeId` takes precedence:\nthe referenced tax code entity is used and `stripe.code` is ignored.'),
|
|
11475
11983
|
})
|
|
11476
11984
|
.describe('Set of provider specific tax configs.')
|
|
11477
11985
|
.optional()
|
|
11478
11986
|
.describe('The tax config of the rate card.\nWhen undefined, the tax config of the feature or the default tax config of the plan is used.'),
|
|
11479
|
-
type: zod
|
|
11987
|
+
type: zod
|
|
11988
|
+
.enum(['flat_fee'])
|
|
11989
|
+
.describe('The type of the RateCard.'),
|
|
11480
11990
|
})
|
|
11481
11991
|
.describe('A flat fee rate card defines a one-time purchase or a recurring fee.'),
|
|
11482
11992
|
zod
|
|
@@ -11615,7 +12125,9 @@ export const ChangeSubscriptionBody = zod
|
|
|
11615
12125
|
.describe('The payment term of a flat price.\nOne of: in_advance or in_arrears.')
|
|
11616
12126
|
.default(changeSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneOnePaymentTermDefault)
|
|
11617
12127
|
.describe('The payment term of the flat price.\nDefaults to in advance.'),
|
|
11618
|
-
type: zod
|
|
12128
|
+
type: zod
|
|
12129
|
+
.enum(['flat'])
|
|
12130
|
+
.describe('The type of the price.'),
|
|
11619
12131
|
})
|
|
11620
12132
|
.describe('Flat price with payment term.'),
|
|
11621
12133
|
zod
|
|
@@ -11637,7 +12149,9 @@ export const ChangeSubscriptionBody = zod
|
|
|
11637
12149
|
.describe('Numeric represents an arbitrary precision number.')
|
|
11638
12150
|
.optional()
|
|
11639
12151
|
.describe('The customer is committed to spend at least the amount.'),
|
|
11640
|
-
type: zod
|
|
12152
|
+
type: zod
|
|
12153
|
+
.enum(['unit'])
|
|
12154
|
+
.describe('The type of the price.'),
|
|
11641
12155
|
})
|
|
11642
12156
|
.describe('Unit price with spend commitments.'),
|
|
11643
12157
|
zod
|
|
@@ -11699,7 +12213,9 @@ export const ChangeSubscriptionBody = zod
|
|
|
11699
12213
|
.describe('A price tier.\nAt least one price component is required in each tier.'))
|
|
11700
12214
|
.min(1)
|
|
11701
12215
|
.describe('The tiers of the tiered price.\nAt least one price component is required in each tier.'),
|
|
11702
|
-
type: zod
|
|
12216
|
+
type: zod
|
|
12217
|
+
.enum(['tiered'])
|
|
12218
|
+
.describe('The type of the price.\n\nOne of: flat, unit, or tiered.'),
|
|
11703
12219
|
})
|
|
11704
12220
|
.describe('Tiered price with spend commitments.'),
|
|
11705
12221
|
zod
|
|
@@ -11722,7 +12238,9 @@ export const ChangeSubscriptionBody = zod
|
|
|
11722
12238
|
.describe('Numeric represents an arbitrary precision number.')
|
|
11723
12239
|
.default(changeSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneFourMultiplierDefault)
|
|
11724
12240
|
.describe('The multiplier to apply to the base price to get the dynamic price.\n\nExamples:\n- 0.0: the price is zero\n- 0.5: the price is 50% of the base price\n- 1.0: the price is the same as the base price\n- 1.5: the price is 150% of the base price'),
|
|
11725
|
-
type: zod
|
|
12241
|
+
type: zod
|
|
12242
|
+
.enum(['dynamic'])
|
|
12243
|
+
.describe('The type of the price.'),
|
|
11726
12244
|
})
|
|
11727
12245
|
.describe('Dynamic price with spend commitments.'),
|
|
11728
12246
|
zod
|
|
@@ -11749,7 +12267,9 @@ export const ChangeSubscriptionBody = zod
|
|
|
11749
12267
|
.regex(changeSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneFiveQuantityPerPackageOneRegExp)
|
|
11750
12268
|
.describe('Numeric represents an arbitrary precision number.')
|
|
11751
12269
|
.describe('The quantity per package.'),
|
|
11752
|
-
type: zod
|
|
12270
|
+
type: zod
|
|
12271
|
+
.enum(['package'])
|
|
12272
|
+
.describe('The type of the price.'),
|
|
11753
12273
|
})
|
|
11754
12274
|
.describe('Package price with spend commitments.'),
|
|
11755
12275
|
])
|
|
@@ -11782,11 +12302,18 @@ export const ChangeSubscriptionBody = zod
|
|
|
11782
12302
|
.describe('The tax config for Stripe.')
|
|
11783
12303
|
.optional()
|
|
11784
12304
|
.describe('Stripe tax config.'),
|
|
12305
|
+
taxCodeId: zod.coerce
|
|
12306
|
+
.string()
|
|
12307
|
+
.regex(changeSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoTaxConfigOneTaxCodeIdRegExp)
|
|
12308
|
+
.optional()
|
|
12309
|
+
.describe('Tax code reference.\n\nWhen both `taxCodeId` and `stripe.code` are provided, `taxCodeId` takes precedence:\nthe referenced tax code entity is used and `stripe.code` is ignored.'),
|
|
11785
12310
|
})
|
|
11786
12311
|
.describe('Set of provider specific tax configs.')
|
|
11787
12312
|
.optional()
|
|
11788
12313
|
.describe('The tax config of the rate card.\nWhen undefined, the tax config of the feature or the default tax config of the plan is used.'),
|
|
11789
|
-
type: zod
|
|
12314
|
+
type: zod
|
|
12315
|
+
.enum(['usage_based'])
|
|
12316
|
+
.describe('The type of the RateCard.'),
|
|
11790
12317
|
})
|
|
11791
12318
|
.describe('A usage-based rate card defines a price based on usage.'),
|
|
11792
12319
|
])
|
|
@@ -11800,15 +12327,22 @@ export const ChangeSubscriptionBody = zod
|
|
|
11800
12327
|
.object({
|
|
11801
12328
|
enabled: zod.coerce
|
|
11802
12329
|
.boolean()
|
|
12330
|
+
.default(changeSubscriptionBodyTwoCustomPlanOneOneProRatingConfigOneEnabledDefault)
|
|
11803
12331
|
.describe('Whether pro-rating is enabled for this plan.'),
|
|
11804
12332
|
mode: zod
|
|
11805
12333
|
.enum(['prorate_prices'])
|
|
11806
12334
|
.describe('Pro-rating mode options for handling billing period changes.')
|
|
12335
|
+
.default(changeSubscriptionBodyTwoCustomPlanOneOneProRatingConfigOneModeDefault)
|
|
11807
12336
|
.describe('How to handle pro-rating for billing period changes.'),
|
|
11808
12337
|
})
|
|
11809
12338
|
.describe('Configuration for pro-rating behavior.')
|
|
11810
12339
|
.default(changeSubscriptionBodyTwoCustomPlanOneOneProRatingConfigDefault)
|
|
11811
12340
|
.describe('Default pro-rating configuration for subscriptions using this plan.'),
|
|
12341
|
+
settlementMode: zod
|
|
12342
|
+
.enum(['credit_then_invoice', 'credit_only'])
|
|
12343
|
+
.describe('The settlement mode of a plan.\nIt determines how the billing system generates invoices and credits for the subscriptions using this plan.\n- credit_then_invoice: credits from the previous billing period are applied first, then the remaining balance is invoiced. This is the default and most common settlement mode.\n- credit_only: only credits from the previous billing period are generated and applied. No invoices are generated for the subscription.')
|
|
12344
|
+
.default(changeSubscriptionBodyTwoCustomPlanOneOneSettlementModeDefault)
|
|
12345
|
+
.describe('The settlement mode of the plan.\nIt determines how the billing system generates invoices and credits for the subscriptions using this plan.\n- credit_then_invoice: credits from the previous billing period are applied first, then the remaining balance is invoiced.\n- credit_only: only credits from the previous billing period are generated and applied. No invoices are generated for the subscription.\nThis is the default and most common settlement mode.'),
|
|
11812
12346
|
})
|
|
11813
12347
|
.describe('The template for omitting properties.')
|
|
11814
12348
|
.describe('Plan input for custom subscription creation (without key and version).')
|
|
@@ -12222,11 +12756,16 @@ export const listCustomerEntitlementsV2QueryIncludeDeletedDefault = false;
|
|
|
12222
12756
|
export const listCustomerEntitlementsV2QueryPageDefault = 1;
|
|
12223
12757
|
export const listCustomerEntitlementsV2QueryPageSizeDefault = 100;
|
|
12224
12758
|
export const listCustomerEntitlementsV2QueryPageSizeMax = 1000;
|
|
12759
|
+
export const listCustomerEntitlementsV2QueryOrderDefault = 'ASC';
|
|
12225
12760
|
export const ListCustomerEntitlementsV2QueryParams = zod.object({
|
|
12226
12761
|
includeDeleted: zod.coerce
|
|
12227
12762
|
.boolean()
|
|
12228
12763
|
.default(listCustomerEntitlementsV2QueryIncludeDeletedDefault),
|
|
12229
|
-
order: zod
|
|
12764
|
+
order: zod
|
|
12765
|
+
.enum(['ASC', 'DESC'])
|
|
12766
|
+
.describe('The order direction.')
|
|
12767
|
+
.default(listCustomerEntitlementsV2QueryOrderDefault)
|
|
12768
|
+
.describe('The order direction.'),
|
|
12230
12769
|
orderBy: zod
|
|
12231
12770
|
.enum(['createdAt', 'updatedAt'])
|
|
12232
12771
|
.optional()
|
|
@@ -12331,6 +12870,7 @@ export const listCustomerEntitlementGrantsV2QueryOffsetDefault = 0;
|
|
|
12331
12870
|
export const listCustomerEntitlementGrantsV2QueryOffsetMin = 0;
|
|
12332
12871
|
export const listCustomerEntitlementGrantsV2QueryLimitDefault = 100;
|
|
12333
12872
|
export const listCustomerEntitlementGrantsV2QueryLimitMax = 1000;
|
|
12873
|
+
export const listCustomerEntitlementGrantsV2QueryOrderDefault = 'ASC';
|
|
12334
12874
|
export const ListCustomerEntitlementGrantsV2QueryParams = zod.object({
|
|
12335
12875
|
includeDeleted: zod.coerce
|
|
12336
12876
|
.boolean()
|
|
@@ -12346,7 +12886,11 @@ export const ListCustomerEntitlementGrantsV2QueryParams = zod.object({
|
|
|
12346
12886
|
.min(listCustomerEntitlementGrantsV2QueryOffsetMin)
|
|
12347
12887
|
.default(listCustomerEntitlementGrantsV2QueryOffsetDefault)
|
|
12348
12888
|
.describe('Number of items to skip.\n\nDefault is 0.'),
|
|
12349
|
-
order: zod
|
|
12889
|
+
order: zod
|
|
12890
|
+
.enum(['ASC', 'DESC'])
|
|
12891
|
+
.describe('The order direction.')
|
|
12892
|
+
.default(listCustomerEntitlementGrantsV2QueryOrderDefault)
|
|
12893
|
+
.describe('The order direction.'),
|
|
12350
12894
|
orderBy: zod
|
|
12351
12895
|
.enum(['id', 'createdAt', 'updatedAt'])
|
|
12352
12896
|
.optional()
|
|
@@ -12924,6 +13468,7 @@ export const listEntitlementsV2QueryOffsetDefault = 0;
|
|
|
12924
13468
|
export const listEntitlementsV2QueryOffsetMin = 0;
|
|
12925
13469
|
export const listEntitlementsV2QueryLimitDefault = 100;
|
|
12926
13470
|
export const listEntitlementsV2QueryLimitMax = 1000;
|
|
13471
|
+
export const listEntitlementsV2QueryOrderDefault = 'ASC';
|
|
12927
13472
|
export const ListEntitlementsV2QueryParams = zod.object({
|
|
12928
13473
|
customerIds: zod
|
|
12929
13474
|
.array(zod.coerce.string())
|
|
@@ -12958,7 +13503,11 @@ export const ListEntitlementsV2QueryParams = zod.object({
|
|
|
12958
13503
|
.min(listEntitlementsV2QueryOffsetMin)
|
|
12959
13504
|
.default(listEntitlementsV2QueryOffsetDefault)
|
|
12960
13505
|
.describe('Number of items to skip.\n\nDefault is 0.'),
|
|
12961
|
-
order: zod
|
|
13506
|
+
order: zod
|
|
13507
|
+
.enum(['ASC', 'DESC'])
|
|
13508
|
+
.describe('The order direction.')
|
|
13509
|
+
.default(listEntitlementsV2QueryOrderDefault)
|
|
13510
|
+
.describe('The order direction.'),
|
|
12962
13511
|
orderBy: zod
|
|
12963
13512
|
.enum(['createdAt', 'updatedAt'])
|
|
12964
13513
|
.optional()
|
|
@@ -13026,6 +13575,7 @@ export const listGrantsV2QueryOffsetDefault = 0;
|
|
|
13026
13575
|
export const listGrantsV2QueryOffsetMin = 0;
|
|
13027
13576
|
export const listGrantsV2QueryLimitDefault = 100;
|
|
13028
13577
|
export const listGrantsV2QueryLimitMax = 1000;
|
|
13578
|
+
export const listGrantsV2QueryOrderDefault = 'ASC';
|
|
13029
13579
|
export const ListGrantsV2QueryParams = zod.object({
|
|
13030
13580
|
customer: zod
|
|
13031
13581
|
.array(zod
|
|
@@ -13062,7 +13612,11 @@ export const ListGrantsV2QueryParams = zod.object({
|
|
|
13062
13612
|
.min(listGrantsV2QueryOffsetMin)
|
|
13063
13613
|
.default(listGrantsV2QueryOffsetDefault)
|
|
13064
13614
|
.describe('Number of items to skip.\n\nDefault is 0.'),
|
|
13065
|
-
order: zod
|
|
13615
|
+
order: zod
|
|
13616
|
+
.enum(['ASC', 'DESC'])
|
|
13617
|
+
.describe('The order direction.')
|
|
13618
|
+
.default(listGrantsV2QueryOrderDefault)
|
|
13619
|
+
.describe('The order direction.'),
|
|
13066
13620
|
orderBy: zod
|
|
13067
13621
|
.enum(['id', 'createdAt', 'updatedAt'])
|
|
13068
13622
|
.optional()
|