@openmeter/sdk 1.0.0-beta.232 → 1.0.0-beta.234
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/dist/cjs/src/client/schemas.d.cts +100 -13
- package/dist/cjs/src/client/subscriptions.d.cts +10 -0
- package/dist/cjs/src/zod/index.cjs +1764 -1556
- package/dist/cjs/src/zod/index.cjs.map +1 -1
- package/dist/cjs/src/zod/index.d.cts +97 -69
- package/dist/src/client/schemas.d.ts +100 -13
- package/dist/src/client/subscriptions.d.ts +10 -0
- package/dist/src/zod/index.d.ts +97 -69
- package/dist/src/zod/index.js +1754 -1546
- package/dist/src/zod/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
package/dist/src/zod/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Generated by orval
|
|
2
|
+
* Generated by orval 🍺
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* OpenMeter Cloud API
|
|
5
5
|
* OpenMeter is a cloud native usage metering service.
|
|
@@ -53,7 +53,7 @@ export const ListAddonsQueryParams = zod.object({
|
|
|
53
53
|
.optional()
|
|
54
54
|
.describe('Filter by addon.key attribute'),
|
|
55
55
|
keyVersion: zod
|
|
56
|
-
.record(zod.string(), zod.array(zod.coerce.number()))
|
|
56
|
+
.record(zod.string(), zod.array(zod.coerce.number().int()))
|
|
57
57
|
.optional()
|
|
58
58
|
.describe('Filter by addon.key and addon.version attributes'),
|
|
59
59
|
order: zod
|
|
@@ -67,11 +67,13 @@ export const ListAddonsQueryParams = zod.object({
|
|
|
67
67
|
.describe('The order by field.'),
|
|
68
68
|
page: zod.coerce
|
|
69
69
|
.number()
|
|
70
|
+
.int()
|
|
70
71
|
.min(1)
|
|
71
72
|
.default(listAddonsQueryPageDefault)
|
|
72
73
|
.describe('Page index.\n\nDefault is 1.'),
|
|
73
74
|
pageSize: zod.coerce
|
|
74
75
|
.number()
|
|
76
|
+
.int()
|
|
75
77
|
.min(1)
|
|
76
78
|
.max(listAddonsQueryPageSizeMax)
|
|
77
79
|
.default(listAddonsQueryPageSizeDefault)
|
|
@@ -234,6 +236,7 @@ export const CreateAddonBody = zod
|
|
|
234
236
|
.describe('You can grant usage automatically alongside the entitlement, the example scenario would be creating a starting balance.\nIf an amount is specified here, a grant will be created alongside the entitlement with the specified amount.\nThat grant will have it\'s rollover settings configured in a way that after each reset operation, the balance will return the original amount specified here.\nManually creating such a grant would mean having the "amount", "minRolloverAmount", and "maxRolloverAmount" fields all be the same.'),
|
|
235
237
|
issueAfterResetPriority: zod.coerce
|
|
236
238
|
.number()
|
|
239
|
+
.int()
|
|
237
240
|
.min(1)
|
|
238
241
|
.max(createAddonBodyRateCardsItemOneEntitlementTemplateOneOneIssueAfterResetPriorityMax)
|
|
239
242
|
.default(createAddonBodyRateCardsItemOneEntitlementTemplateOneOneIssueAfterResetPriorityDefault)
|
|
@@ -413,6 +416,7 @@ export const CreateAddonBody = zod
|
|
|
413
416
|
.describe('You can grant usage automatically alongside the entitlement, the example scenario would be creating a starting balance.\nIf an amount is specified here, a grant will be created alongside the entitlement with the specified amount.\nThat grant will have it\'s rollover settings configured in a way that after each reset operation, the balance will return the original amount specified here.\nManually creating such a grant would mean having the "amount", "minRolloverAmount", and "maxRolloverAmount" fields all be the same.'),
|
|
414
417
|
issueAfterResetPriority: zod.coerce
|
|
415
418
|
.number()
|
|
419
|
+
.int()
|
|
416
420
|
.min(1)
|
|
417
421
|
.max(createAddonBodyRateCardsItemTwoEntitlementTemplateOneOneIssueAfterResetPriorityMax)
|
|
418
422
|
.default(createAddonBodyRateCardsItemTwoEntitlementTemplateOneOneIssueAfterResetPriorityDefault)
|
|
@@ -486,167 +490,170 @@ export const CreateAddonBody = zod
|
|
|
486
490
|
price: zod
|
|
487
491
|
.union([
|
|
488
492
|
zod
|
|
489
|
-
.
|
|
490
|
-
|
|
491
|
-
.string()
|
|
492
|
-
.regex(createAddonBodyRateCardsItemTwoPriceOneOneAmountOneRegExp)
|
|
493
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
494
|
-
.describe('The amount of the flat price.'),
|
|
495
|
-
paymentTerm: zod
|
|
496
|
-
.enum(['in_advance', 'in_arrears'])
|
|
497
|
-
.describe('The payment term of a flat price.\nOne of: in_advance or in_arrears.')
|
|
498
|
-
.default(createAddonBodyRateCardsItemTwoPriceOneOnePaymentTermDefault)
|
|
499
|
-
.describe('The payment term of the flat price.\nDefaults to in advance.'),
|
|
500
|
-
type: zod
|
|
501
|
-
.enum(['flat'])
|
|
502
|
-
.describe('The type of the price.'),
|
|
503
|
-
})
|
|
504
|
-
.describe('Flat price with payment term.'),
|
|
505
|
-
zod
|
|
506
|
-
.object({
|
|
507
|
-
amount: zod.coerce
|
|
508
|
-
.string()
|
|
509
|
-
.regex(createAddonBodyRateCardsItemTwoPriceOneTwoAmountOneRegExp)
|
|
510
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
511
|
-
.describe('The amount of the unit price.'),
|
|
512
|
-
maximumAmount: zod.coerce
|
|
513
|
-
.string()
|
|
514
|
-
.regex(createAddonBodyRateCardsItemTwoPriceOneTwoMaximumAmountOneRegExp)
|
|
515
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
516
|
-
.optional()
|
|
517
|
-
.describe('The customer is limited to spend at most the amount.'),
|
|
518
|
-
minimumAmount: zod.coerce
|
|
519
|
-
.string()
|
|
520
|
-
.regex(createAddonBodyRateCardsItemTwoPriceOneTwoMinimumAmountOneRegExp)
|
|
521
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
522
|
-
.optional()
|
|
523
|
-
.describe('The customer is committed to spend at least the amount.'),
|
|
524
|
-
type: zod
|
|
525
|
-
.enum(['unit'])
|
|
526
|
-
.describe('The type of the price.'),
|
|
527
|
-
})
|
|
528
|
-
.describe('Unit price with spend commitments.'),
|
|
529
|
-
zod
|
|
530
|
-
.object({
|
|
531
|
-
maximumAmount: zod.coerce
|
|
532
|
-
.string()
|
|
533
|
-
.regex(createAddonBodyRateCardsItemTwoPriceOneThreeMaximumAmountOneRegExp)
|
|
534
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
535
|
-
.optional()
|
|
536
|
-
.describe('The customer is limited to spend at most the amount.'),
|
|
537
|
-
minimumAmount: zod.coerce
|
|
538
|
-
.string()
|
|
539
|
-
.regex(createAddonBodyRateCardsItemTwoPriceOneThreeMinimumAmountOneRegExp)
|
|
540
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
541
|
-
.optional()
|
|
542
|
-
.describe('The customer is committed to spend at least the amount.'),
|
|
543
|
-
mode: zod
|
|
544
|
-
.enum(['volume', 'graduated'])
|
|
545
|
-
.describe('The mode of the tiered price.')
|
|
546
|
-
.describe('Defines if the tiering mode is volume-based or graduated:\n- In `volume`-based tiering, the maximum quantity within a period determines the per unit price.\n- In `graduated` tiering, pricing can change as the quantity grows.'),
|
|
547
|
-
tiers: zod
|
|
548
|
-
.array(zod
|
|
493
|
+
.union([
|
|
494
|
+
zod
|
|
549
495
|
.object({
|
|
550
|
-
|
|
551
|
-
.
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
.
|
|
562
|
-
.
|
|
563
|
-
|
|
564
|
-
|
|
496
|
+
amount: zod.coerce
|
|
497
|
+
.string()
|
|
498
|
+
.regex(createAddonBodyRateCardsItemTwoPriceOneOneAmountOneRegExp)
|
|
499
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
500
|
+
.describe('The amount of the flat price.'),
|
|
501
|
+
paymentTerm: zod
|
|
502
|
+
.enum(['in_advance', 'in_arrears'])
|
|
503
|
+
.describe('The payment term of a flat price.\nOne of: in_advance or in_arrears.')
|
|
504
|
+
.default(createAddonBodyRateCardsItemTwoPriceOneOnePaymentTermDefault)
|
|
505
|
+
.describe('The payment term of the flat price.\nDefaults to in advance.'),
|
|
506
|
+
type: zod
|
|
507
|
+
.enum(['flat'])
|
|
508
|
+
.describe('The type of the price.'),
|
|
509
|
+
})
|
|
510
|
+
.describe('Flat price with payment term.'),
|
|
511
|
+
zod
|
|
512
|
+
.object({
|
|
513
|
+
amount: zod.coerce
|
|
514
|
+
.string()
|
|
515
|
+
.regex(createAddonBodyRateCardsItemTwoPriceOneTwoAmountOneRegExp)
|
|
516
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
517
|
+
.describe('The amount of the unit price.'),
|
|
518
|
+
maximumAmount: zod.coerce
|
|
519
|
+
.string()
|
|
520
|
+
.regex(createAddonBodyRateCardsItemTwoPriceOneTwoMaximumAmountOneRegExp)
|
|
521
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
522
|
+
.optional()
|
|
523
|
+
.describe('The customer is limited to spend at most the amount.'),
|
|
524
|
+
minimumAmount: zod.coerce
|
|
525
|
+
.string()
|
|
526
|
+
.regex(createAddonBodyRateCardsItemTwoPriceOneTwoMinimumAmountOneRegExp)
|
|
527
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
528
|
+
.optional()
|
|
529
|
+
.describe('The customer is committed to spend at least the amount.'),
|
|
530
|
+
type: zod
|
|
531
|
+
.enum(['unit'])
|
|
532
|
+
.describe('The type of the price.'),
|
|
533
|
+
})
|
|
534
|
+
.describe('Unit price with spend commitments.'),
|
|
535
|
+
zod
|
|
536
|
+
.object({
|
|
537
|
+
maximumAmount: zod.coerce
|
|
538
|
+
.string()
|
|
539
|
+
.regex(createAddonBodyRateCardsItemTwoPriceOneThreeMaximumAmountOneRegExp)
|
|
540
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
541
|
+
.optional()
|
|
542
|
+
.describe('The customer is limited to spend at most the amount.'),
|
|
543
|
+
minimumAmount: zod.coerce
|
|
544
|
+
.string()
|
|
545
|
+
.regex(createAddonBodyRateCardsItemTwoPriceOneThreeMinimumAmountOneRegExp)
|
|
546
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
547
|
+
.optional()
|
|
548
|
+
.describe('The customer is committed to spend at least the amount.'),
|
|
549
|
+
mode: zod
|
|
550
|
+
.enum(['volume', 'graduated'])
|
|
551
|
+
.describe('The mode of the tiered price.')
|
|
552
|
+
.describe('Defines if the tiering mode is volume-based or graduated:\n- In `volume`-based tiering, the maximum quantity within a period determines the per unit price.\n- In `graduated` tiering, pricing can change as the quantity grows.'),
|
|
553
|
+
tiers: zod
|
|
554
|
+
.array(zod
|
|
565
555
|
.object({
|
|
566
|
-
|
|
556
|
+
flatPrice: zod
|
|
557
|
+
.object({
|
|
558
|
+
amount: zod.coerce
|
|
559
|
+
.string()
|
|
560
|
+
.regex(createAddonBodyRateCardsItemTwoPriceOneThreeTiersItemFlatPriceOneAmountOneRegExp)
|
|
561
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
562
|
+
.describe('The amount of the flat price.'),
|
|
563
|
+
type: zod
|
|
564
|
+
.enum(['flat'])
|
|
565
|
+
.describe('The type of the price.'),
|
|
566
|
+
})
|
|
567
|
+
.describe('Flat price.')
|
|
568
|
+
.nullable()
|
|
569
|
+
.describe('The flat price component of the tier.'),
|
|
570
|
+
unitPrice: zod
|
|
571
|
+
.object({
|
|
572
|
+
amount: zod.coerce
|
|
573
|
+
.string()
|
|
574
|
+
.regex(createAddonBodyRateCardsItemTwoPriceOneThreeTiersItemUnitPriceOneAmountOneRegExp)
|
|
575
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
576
|
+
.describe('The amount of the unit price.'),
|
|
577
|
+
type: zod
|
|
578
|
+
.enum(['unit'])
|
|
579
|
+
.describe('The type of the price.'),
|
|
580
|
+
})
|
|
581
|
+
.describe('Unit price.')
|
|
582
|
+
.nullable()
|
|
583
|
+
.describe('The unit price component of the tier.'),
|
|
584
|
+
upToAmount: zod.coerce
|
|
567
585
|
.string()
|
|
568
|
-
.regex(
|
|
586
|
+
.regex(createAddonBodyRateCardsItemTwoPriceOneThreeTiersItemUpToAmountOneRegExp)
|
|
569
587
|
.describe('Numeric represents an arbitrary precision number.')
|
|
570
|
-
.
|
|
571
|
-
|
|
572
|
-
.enum(['unit'])
|
|
573
|
-
.describe('The type of the price.'),
|
|
588
|
+
.optional()
|
|
589
|
+
.describe('Up to and including to this quantity will be contained in the tier.\nIf null, the tier is open-ended.'),
|
|
574
590
|
})
|
|
575
|
-
.describe('
|
|
576
|
-
.
|
|
577
|
-
.describe('The
|
|
578
|
-
|
|
591
|
+
.describe('A price tier.\nAt least one price component is required in each tier.'))
|
|
592
|
+
.min(1)
|
|
593
|
+
.describe('The tiers of the tiered price.\nAt least one price component is required in each tier.'),
|
|
594
|
+
type: zod
|
|
595
|
+
.enum(['tiered'])
|
|
596
|
+
.describe('The type of the price.\n\nOne of: flat, unit, or tiered.'),
|
|
597
|
+
})
|
|
598
|
+
.describe('Tiered price with spend commitments.'),
|
|
599
|
+
zod
|
|
600
|
+
.object({
|
|
601
|
+
maximumAmount: zod.coerce
|
|
602
|
+
.string()
|
|
603
|
+
.regex(createAddonBodyRateCardsItemTwoPriceOneFourMaximumAmountOneRegExp)
|
|
604
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
605
|
+
.optional()
|
|
606
|
+
.describe('The customer is limited to spend at most the amount.'),
|
|
607
|
+
minimumAmount: zod.coerce
|
|
579
608
|
.string()
|
|
580
|
-
.regex(
|
|
609
|
+
.regex(createAddonBodyRateCardsItemTwoPriceOneFourMinimumAmountOneRegExp)
|
|
581
610
|
.describe('Numeric represents an arbitrary precision number.')
|
|
582
611
|
.optional()
|
|
583
|
-
.describe('
|
|
612
|
+
.describe('The customer is committed to spend at least the amount.'),
|
|
613
|
+
multiplier: zod.coerce
|
|
614
|
+
.string()
|
|
615
|
+
.regex(createAddonBodyRateCardsItemTwoPriceOneFourMultiplierOneRegExp)
|
|
616
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
617
|
+
.default(createAddonBodyRateCardsItemTwoPriceOneFourMultiplierDefault)
|
|
618
|
+
.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'),
|
|
619
|
+
type: zod
|
|
620
|
+
.enum(['dynamic'])
|
|
621
|
+
.describe('The type of the price.'),
|
|
584
622
|
})
|
|
585
|
-
.describe('
|
|
586
|
-
|
|
587
|
-
.
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
.
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
.
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
.
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
zod
|
|
619
|
-
.object({
|
|
620
|
-
amount: zod.coerce
|
|
621
|
-
.string()
|
|
622
|
-
.regex(createAddonBodyRateCardsItemTwoPriceOneFiveAmountOneRegExp)
|
|
623
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
624
|
-
.describe('The price of one package.'),
|
|
625
|
-
maximumAmount: zod.coerce
|
|
626
|
-
.string()
|
|
627
|
-
.regex(createAddonBodyRateCardsItemTwoPriceOneFiveMaximumAmountOneRegExp)
|
|
628
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
629
|
-
.optional()
|
|
630
|
-
.describe('The customer is limited to spend at most the amount.'),
|
|
631
|
-
minimumAmount: zod.coerce
|
|
632
|
-
.string()
|
|
633
|
-
.regex(createAddonBodyRateCardsItemTwoPriceOneFiveMinimumAmountOneRegExp)
|
|
634
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
635
|
-
.optional()
|
|
636
|
-
.describe('The customer is committed to spend at least the amount.'),
|
|
637
|
-
quantityPerPackage: zod.coerce
|
|
638
|
-
.string()
|
|
639
|
-
.regex(createAddonBodyRateCardsItemTwoPriceOneFiveQuantityPerPackageOneRegExp)
|
|
640
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
641
|
-
.describe('The quantity per package.'),
|
|
642
|
-
type: zod
|
|
643
|
-
.enum(['package'])
|
|
644
|
-
.describe('The type of the price.'),
|
|
645
|
-
})
|
|
646
|
-
.describe('Package price with spend commitments.'),
|
|
623
|
+
.describe('Dynamic price with spend commitments.'),
|
|
624
|
+
zod
|
|
625
|
+
.object({
|
|
626
|
+
amount: zod.coerce
|
|
627
|
+
.string()
|
|
628
|
+
.regex(createAddonBodyRateCardsItemTwoPriceOneFiveAmountOneRegExp)
|
|
629
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
630
|
+
.describe('The price of one package.'),
|
|
631
|
+
maximumAmount: zod.coerce
|
|
632
|
+
.string()
|
|
633
|
+
.regex(createAddonBodyRateCardsItemTwoPriceOneFiveMaximumAmountOneRegExp)
|
|
634
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
635
|
+
.optional()
|
|
636
|
+
.describe('The customer is limited to spend at most the amount.'),
|
|
637
|
+
minimumAmount: zod.coerce
|
|
638
|
+
.string()
|
|
639
|
+
.regex(createAddonBodyRateCardsItemTwoPriceOneFiveMinimumAmountOneRegExp)
|
|
640
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
641
|
+
.optional()
|
|
642
|
+
.describe('The customer is committed to spend at least the amount.'),
|
|
643
|
+
quantityPerPackage: zod.coerce
|
|
644
|
+
.string()
|
|
645
|
+
.regex(createAddonBodyRateCardsItemTwoPriceOneFiveQuantityPerPackageOneRegExp)
|
|
646
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
647
|
+
.describe('The quantity per package.'),
|
|
648
|
+
type: zod
|
|
649
|
+
.enum(['package'])
|
|
650
|
+
.describe('The type of the price.'),
|
|
651
|
+
})
|
|
652
|
+
.describe('Package price with spend commitments.'),
|
|
653
|
+
])
|
|
654
|
+
.describe('The price of the usage based rate card.'),
|
|
655
|
+
zod.null(),
|
|
647
656
|
])
|
|
648
|
-
.describe('The price of the usage based rate card.')
|
|
649
|
-
.nullable()
|
|
650
657
|
.describe('The price of the rate card.\nWhen null, the feature or service is free.'),
|
|
651
658
|
taxConfig: zod
|
|
652
659
|
.object({
|
|
@@ -828,6 +835,7 @@ export const UpdateAddonBody = zod
|
|
|
828
835
|
.describe('You can grant usage automatically alongside the entitlement, the example scenario would be creating a starting balance.\nIf an amount is specified here, a grant will be created alongside the entitlement with the specified amount.\nThat grant will have it\'s rollover settings configured in a way that after each reset operation, the balance will return the original amount specified here.\nManually creating such a grant would mean having the "amount", "minRolloverAmount", and "maxRolloverAmount" fields all be the same.'),
|
|
829
836
|
issueAfterResetPriority: zod.coerce
|
|
830
837
|
.number()
|
|
838
|
+
.int()
|
|
831
839
|
.min(1)
|
|
832
840
|
.max(updateAddonBodyRateCardsItemOneEntitlementTemplateOneOneIssueAfterResetPriorityMax)
|
|
833
841
|
.default(updateAddonBodyRateCardsItemOneEntitlementTemplateOneOneIssueAfterResetPriorityDefault)
|
|
@@ -1007,6 +1015,7 @@ export const UpdateAddonBody = zod
|
|
|
1007
1015
|
.describe('You can grant usage automatically alongside the entitlement, the example scenario would be creating a starting balance.\nIf an amount is specified here, a grant will be created alongside the entitlement with the specified amount.\nThat grant will have it\'s rollover settings configured in a way that after each reset operation, the balance will return the original amount specified here.\nManually creating such a grant would mean having the "amount", "minRolloverAmount", and "maxRolloverAmount" fields all be the same.'),
|
|
1008
1016
|
issueAfterResetPriority: zod.coerce
|
|
1009
1017
|
.number()
|
|
1018
|
+
.int()
|
|
1010
1019
|
.min(1)
|
|
1011
1020
|
.max(updateAddonBodyRateCardsItemTwoEntitlementTemplateOneOneIssueAfterResetPriorityMax)
|
|
1012
1021
|
.default(updateAddonBodyRateCardsItemTwoEntitlementTemplateOneOneIssueAfterResetPriorityDefault)
|
|
@@ -1080,167 +1089,170 @@ export const UpdateAddonBody = zod
|
|
|
1080
1089
|
price: zod
|
|
1081
1090
|
.union([
|
|
1082
1091
|
zod
|
|
1083
|
-
.
|
|
1084
|
-
|
|
1085
|
-
.string()
|
|
1086
|
-
.regex(updateAddonBodyRateCardsItemTwoPriceOneOneAmountOneRegExp)
|
|
1087
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
1088
|
-
.describe('The amount of the flat price.'),
|
|
1089
|
-
paymentTerm: zod
|
|
1090
|
-
.enum(['in_advance', 'in_arrears'])
|
|
1091
|
-
.describe('The payment term of a flat price.\nOne of: in_advance or in_arrears.')
|
|
1092
|
-
.default(updateAddonBodyRateCardsItemTwoPriceOneOnePaymentTermDefault)
|
|
1093
|
-
.describe('The payment term of the flat price.\nDefaults to in advance.'),
|
|
1094
|
-
type: zod
|
|
1095
|
-
.enum(['flat'])
|
|
1096
|
-
.describe('The type of the price.'),
|
|
1097
|
-
})
|
|
1098
|
-
.describe('Flat price with payment term.'),
|
|
1099
|
-
zod
|
|
1100
|
-
.object({
|
|
1101
|
-
amount: zod.coerce
|
|
1102
|
-
.string()
|
|
1103
|
-
.regex(updateAddonBodyRateCardsItemTwoPriceOneTwoAmountOneRegExp)
|
|
1104
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
1105
|
-
.describe('The amount of the unit price.'),
|
|
1106
|
-
maximumAmount: zod.coerce
|
|
1107
|
-
.string()
|
|
1108
|
-
.regex(updateAddonBodyRateCardsItemTwoPriceOneTwoMaximumAmountOneRegExp)
|
|
1109
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
1110
|
-
.optional()
|
|
1111
|
-
.describe('The customer is limited to spend at most the amount.'),
|
|
1112
|
-
minimumAmount: zod.coerce
|
|
1113
|
-
.string()
|
|
1114
|
-
.regex(updateAddonBodyRateCardsItemTwoPriceOneTwoMinimumAmountOneRegExp)
|
|
1115
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
1116
|
-
.optional()
|
|
1117
|
-
.describe('The customer is committed to spend at least the amount.'),
|
|
1118
|
-
type: zod
|
|
1119
|
-
.enum(['unit'])
|
|
1120
|
-
.describe('The type of the price.'),
|
|
1121
|
-
})
|
|
1122
|
-
.describe('Unit price with spend commitments.'),
|
|
1123
|
-
zod
|
|
1124
|
-
.object({
|
|
1125
|
-
maximumAmount: zod.coerce
|
|
1126
|
-
.string()
|
|
1127
|
-
.regex(updateAddonBodyRateCardsItemTwoPriceOneThreeMaximumAmountOneRegExp)
|
|
1128
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
1129
|
-
.optional()
|
|
1130
|
-
.describe('The customer is limited to spend at most the amount.'),
|
|
1131
|
-
minimumAmount: zod.coerce
|
|
1132
|
-
.string()
|
|
1133
|
-
.regex(updateAddonBodyRateCardsItemTwoPriceOneThreeMinimumAmountOneRegExp)
|
|
1134
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
1135
|
-
.optional()
|
|
1136
|
-
.describe('The customer is committed to spend at least the amount.'),
|
|
1137
|
-
mode: zod
|
|
1138
|
-
.enum(['volume', 'graduated'])
|
|
1139
|
-
.describe('The mode of the tiered price.')
|
|
1140
|
-
.describe('Defines if the tiering mode is volume-based or graduated:\n- In `volume`-based tiering, the maximum quantity within a period determines the per unit price.\n- In `graduated` tiering, pricing can change as the quantity grows.'),
|
|
1141
|
-
tiers: zod
|
|
1142
|
-
.array(zod
|
|
1092
|
+
.union([
|
|
1093
|
+
zod
|
|
1143
1094
|
.object({
|
|
1144
|
-
|
|
1145
|
-
.
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
.
|
|
1156
|
-
.
|
|
1157
|
-
|
|
1158
|
-
|
|
1095
|
+
amount: zod.coerce
|
|
1096
|
+
.string()
|
|
1097
|
+
.regex(updateAddonBodyRateCardsItemTwoPriceOneOneAmountOneRegExp)
|
|
1098
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
1099
|
+
.describe('The amount of the flat price.'),
|
|
1100
|
+
paymentTerm: zod
|
|
1101
|
+
.enum(['in_advance', 'in_arrears'])
|
|
1102
|
+
.describe('The payment term of a flat price.\nOne of: in_advance or in_arrears.')
|
|
1103
|
+
.default(updateAddonBodyRateCardsItemTwoPriceOneOnePaymentTermDefault)
|
|
1104
|
+
.describe('The payment term of the flat price.\nDefaults to in advance.'),
|
|
1105
|
+
type: zod
|
|
1106
|
+
.enum(['flat'])
|
|
1107
|
+
.describe('The type of the price.'),
|
|
1108
|
+
})
|
|
1109
|
+
.describe('Flat price with payment term.'),
|
|
1110
|
+
zod
|
|
1111
|
+
.object({
|
|
1112
|
+
amount: zod.coerce
|
|
1113
|
+
.string()
|
|
1114
|
+
.regex(updateAddonBodyRateCardsItemTwoPriceOneTwoAmountOneRegExp)
|
|
1115
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
1116
|
+
.describe('The amount of the unit price.'),
|
|
1117
|
+
maximumAmount: zod.coerce
|
|
1118
|
+
.string()
|
|
1119
|
+
.regex(updateAddonBodyRateCardsItemTwoPriceOneTwoMaximumAmountOneRegExp)
|
|
1120
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
1121
|
+
.optional()
|
|
1122
|
+
.describe('The customer is limited to spend at most the amount.'),
|
|
1123
|
+
minimumAmount: zod.coerce
|
|
1124
|
+
.string()
|
|
1125
|
+
.regex(updateAddonBodyRateCardsItemTwoPriceOneTwoMinimumAmountOneRegExp)
|
|
1126
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
1127
|
+
.optional()
|
|
1128
|
+
.describe('The customer is committed to spend at least the amount.'),
|
|
1129
|
+
type: zod
|
|
1130
|
+
.enum(['unit'])
|
|
1131
|
+
.describe('The type of the price.'),
|
|
1132
|
+
})
|
|
1133
|
+
.describe('Unit price with spend commitments.'),
|
|
1134
|
+
zod
|
|
1135
|
+
.object({
|
|
1136
|
+
maximumAmount: zod.coerce
|
|
1137
|
+
.string()
|
|
1138
|
+
.regex(updateAddonBodyRateCardsItemTwoPriceOneThreeMaximumAmountOneRegExp)
|
|
1139
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
1140
|
+
.optional()
|
|
1141
|
+
.describe('The customer is limited to spend at most the amount.'),
|
|
1142
|
+
minimumAmount: zod.coerce
|
|
1143
|
+
.string()
|
|
1144
|
+
.regex(updateAddonBodyRateCardsItemTwoPriceOneThreeMinimumAmountOneRegExp)
|
|
1145
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
1146
|
+
.optional()
|
|
1147
|
+
.describe('The customer is committed to spend at least the amount.'),
|
|
1148
|
+
mode: zod
|
|
1149
|
+
.enum(['volume', 'graduated'])
|
|
1150
|
+
.describe('The mode of the tiered price.')
|
|
1151
|
+
.describe('Defines if the tiering mode is volume-based or graduated:\n- In `volume`-based tiering, the maximum quantity within a period determines the per unit price.\n- In `graduated` tiering, pricing can change as the quantity grows.'),
|
|
1152
|
+
tiers: zod
|
|
1153
|
+
.array(zod
|
|
1159
1154
|
.object({
|
|
1160
|
-
|
|
1155
|
+
flatPrice: zod
|
|
1156
|
+
.object({
|
|
1157
|
+
amount: zod.coerce
|
|
1158
|
+
.string()
|
|
1159
|
+
.regex(updateAddonBodyRateCardsItemTwoPriceOneThreeTiersItemFlatPriceOneAmountOneRegExp)
|
|
1160
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
1161
|
+
.describe('The amount of the flat price.'),
|
|
1162
|
+
type: zod
|
|
1163
|
+
.enum(['flat'])
|
|
1164
|
+
.describe('The type of the price.'),
|
|
1165
|
+
})
|
|
1166
|
+
.describe('Flat price.')
|
|
1167
|
+
.nullable()
|
|
1168
|
+
.describe('The flat price component of the tier.'),
|
|
1169
|
+
unitPrice: zod
|
|
1170
|
+
.object({
|
|
1171
|
+
amount: zod.coerce
|
|
1172
|
+
.string()
|
|
1173
|
+
.regex(updateAddonBodyRateCardsItemTwoPriceOneThreeTiersItemUnitPriceOneAmountOneRegExp)
|
|
1174
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
1175
|
+
.describe('The amount of the unit price.'),
|
|
1176
|
+
type: zod
|
|
1177
|
+
.enum(['unit'])
|
|
1178
|
+
.describe('The type of the price.'),
|
|
1179
|
+
})
|
|
1180
|
+
.describe('Unit price.')
|
|
1181
|
+
.nullable()
|
|
1182
|
+
.describe('The unit price component of the tier.'),
|
|
1183
|
+
upToAmount: zod.coerce
|
|
1161
1184
|
.string()
|
|
1162
|
-
.regex(
|
|
1185
|
+
.regex(updateAddonBodyRateCardsItemTwoPriceOneThreeTiersItemUpToAmountOneRegExp)
|
|
1163
1186
|
.describe('Numeric represents an arbitrary precision number.')
|
|
1164
|
-
.
|
|
1165
|
-
|
|
1166
|
-
.enum(['unit'])
|
|
1167
|
-
.describe('The type of the price.'),
|
|
1187
|
+
.optional()
|
|
1188
|
+
.describe('Up to and including to this quantity will be contained in the tier.\nIf null, the tier is open-ended.'),
|
|
1168
1189
|
})
|
|
1169
|
-
.describe('
|
|
1170
|
-
.
|
|
1171
|
-
.describe('The
|
|
1172
|
-
|
|
1190
|
+
.describe('A price tier.\nAt least one price component is required in each tier.'))
|
|
1191
|
+
.min(1)
|
|
1192
|
+
.describe('The tiers of the tiered price.\nAt least one price component is required in each tier.'),
|
|
1193
|
+
type: zod
|
|
1194
|
+
.enum(['tiered'])
|
|
1195
|
+
.describe('The type of the price.\n\nOne of: flat, unit, or tiered.'),
|
|
1196
|
+
})
|
|
1197
|
+
.describe('Tiered price with spend commitments.'),
|
|
1198
|
+
zod
|
|
1199
|
+
.object({
|
|
1200
|
+
maximumAmount: zod.coerce
|
|
1201
|
+
.string()
|
|
1202
|
+
.regex(updateAddonBodyRateCardsItemTwoPriceOneFourMaximumAmountOneRegExp)
|
|
1203
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
1204
|
+
.optional()
|
|
1205
|
+
.describe('The customer is limited to spend at most the amount.'),
|
|
1206
|
+
minimumAmount: zod.coerce
|
|
1173
1207
|
.string()
|
|
1174
|
-
.regex(
|
|
1208
|
+
.regex(updateAddonBodyRateCardsItemTwoPriceOneFourMinimumAmountOneRegExp)
|
|
1175
1209
|
.describe('Numeric represents an arbitrary precision number.')
|
|
1176
1210
|
.optional()
|
|
1177
|
-
.describe('
|
|
1211
|
+
.describe('The customer is committed to spend at least the amount.'),
|
|
1212
|
+
multiplier: zod.coerce
|
|
1213
|
+
.string()
|
|
1214
|
+
.regex(updateAddonBodyRateCardsItemTwoPriceOneFourMultiplierOneRegExp)
|
|
1215
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
1216
|
+
.default(updateAddonBodyRateCardsItemTwoPriceOneFourMultiplierDefault)
|
|
1217
|
+
.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'),
|
|
1218
|
+
type: zod
|
|
1219
|
+
.enum(['dynamic'])
|
|
1220
|
+
.describe('The type of the price.'),
|
|
1178
1221
|
})
|
|
1179
|
-
.describe('
|
|
1180
|
-
|
|
1181
|
-
.
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
.
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
.
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
.
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
zod
|
|
1213
|
-
.object({
|
|
1214
|
-
amount: zod.coerce
|
|
1215
|
-
.string()
|
|
1216
|
-
.regex(updateAddonBodyRateCardsItemTwoPriceOneFiveAmountOneRegExp)
|
|
1217
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
1218
|
-
.describe('The price of one package.'),
|
|
1219
|
-
maximumAmount: zod.coerce
|
|
1220
|
-
.string()
|
|
1221
|
-
.regex(updateAddonBodyRateCardsItemTwoPriceOneFiveMaximumAmountOneRegExp)
|
|
1222
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
1223
|
-
.optional()
|
|
1224
|
-
.describe('The customer is limited to spend at most the amount.'),
|
|
1225
|
-
minimumAmount: zod.coerce
|
|
1226
|
-
.string()
|
|
1227
|
-
.regex(updateAddonBodyRateCardsItemTwoPriceOneFiveMinimumAmountOneRegExp)
|
|
1228
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
1229
|
-
.optional()
|
|
1230
|
-
.describe('The customer is committed to spend at least the amount.'),
|
|
1231
|
-
quantityPerPackage: zod.coerce
|
|
1232
|
-
.string()
|
|
1233
|
-
.regex(updateAddonBodyRateCardsItemTwoPriceOneFiveQuantityPerPackageOneRegExp)
|
|
1234
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
1235
|
-
.describe('The quantity per package.'),
|
|
1236
|
-
type: zod
|
|
1237
|
-
.enum(['package'])
|
|
1238
|
-
.describe('The type of the price.'),
|
|
1239
|
-
})
|
|
1240
|
-
.describe('Package price with spend commitments.'),
|
|
1222
|
+
.describe('Dynamic price with spend commitments.'),
|
|
1223
|
+
zod
|
|
1224
|
+
.object({
|
|
1225
|
+
amount: zod.coerce
|
|
1226
|
+
.string()
|
|
1227
|
+
.regex(updateAddonBodyRateCardsItemTwoPriceOneFiveAmountOneRegExp)
|
|
1228
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
1229
|
+
.describe('The price of one package.'),
|
|
1230
|
+
maximumAmount: zod.coerce
|
|
1231
|
+
.string()
|
|
1232
|
+
.regex(updateAddonBodyRateCardsItemTwoPriceOneFiveMaximumAmountOneRegExp)
|
|
1233
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
1234
|
+
.optional()
|
|
1235
|
+
.describe('The customer is limited to spend at most the amount.'),
|
|
1236
|
+
minimumAmount: zod.coerce
|
|
1237
|
+
.string()
|
|
1238
|
+
.regex(updateAddonBodyRateCardsItemTwoPriceOneFiveMinimumAmountOneRegExp)
|
|
1239
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
1240
|
+
.optional()
|
|
1241
|
+
.describe('The customer is committed to spend at least the amount.'),
|
|
1242
|
+
quantityPerPackage: zod.coerce
|
|
1243
|
+
.string()
|
|
1244
|
+
.regex(updateAddonBodyRateCardsItemTwoPriceOneFiveQuantityPerPackageOneRegExp)
|
|
1245
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
1246
|
+
.describe('The quantity per package.'),
|
|
1247
|
+
type: zod
|
|
1248
|
+
.enum(['package'])
|
|
1249
|
+
.describe('The type of the price.'),
|
|
1250
|
+
})
|
|
1251
|
+
.describe('Package price with spend commitments.'),
|
|
1252
|
+
])
|
|
1253
|
+
.describe('The price of the usage based rate card.'),
|
|
1254
|
+
zod.null(),
|
|
1241
1255
|
])
|
|
1242
|
-
.describe('The price of the usage based rate card.')
|
|
1243
|
-
.nullable()
|
|
1244
1256
|
.describe('The price of the rate card.\nWhen null, the feature or service is free.'),
|
|
1245
1257
|
taxConfig: zod
|
|
1246
1258
|
.object({
|
|
@@ -1343,11 +1355,13 @@ export const listAppsQueryPageSizeMax = 1000;
|
|
|
1343
1355
|
export const ListAppsQueryParams = zod.object({
|
|
1344
1356
|
page: zod.coerce
|
|
1345
1357
|
.number()
|
|
1358
|
+
.int()
|
|
1346
1359
|
.min(1)
|
|
1347
1360
|
.default(listAppsQueryPageDefault)
|
|
1348
1361
|
.describe('Page index.\n\nDefault is 1.'),
|
|
1349
1362
|
pageSize: zod.coerce
|
|
1350
1363
|
.number()
|
|
1364
|
+
.int()
|
|
1351
1365
|
.min(1)
|
|
1352
1366
|
.max(listAppsQueryPageSizeMax)
|
|
1353
1367
|
.default(listAppsQueryPageSizeDefault)
|
|
@@ -1611,7 +1625,7 @@ export const AppStripeWebhookParams = zod.object({
|
|
|
1611
1625
|
});
|
|
1612
1626
|
export const AppStripeWebhookBody = zod
|
|
1613
1627
|
.object({
|
|
1614
|
-
created: zod.coerce.number().describe('The event created timestamp.'),
|
|
1628
|
+
created: zod.coerce.number().int().describe('The event created timestamp.'),
|
|
1615
1629
|
data: zod
|
|
1616
1630
|
.object({
|
|
1617
1631
|
object: zod.unknown(),
|
|
@@ -1697,11 +1711,13 @@ export const ListBillingProfileCustomerOverridesQueryParams = zod.object({
|
|
|
1697
1711
|
.describe('The order by field.'),
|
|
1698
1712
|
page: zod.coerce
|
|
1699
1713
|
.number()
|
|
1714
|
+
.int()
|
|
1700
1715
|
.min(1)
|
|
1701
1716
|
.default(listBillingProfileCustomerOverridesQueryPageDefault)
|
|
1702
1717
|
.describe('Page index.\n\nDefault is 1.'),
|
|
1703
1718
|
pageSize: zod.coerce
|
|
1704
1719
|
.number()
|
|
1720
|
+
.int()
|
|
1705
1721
|
.min(1)
|
|
1706
1722
|
.max(listBillingProfileCustomerOverridesQueryPageSizeMax)
|
|
1707
1723
|
.default(listBillingProfileCustomerOverridesQueryPageSizeDefault)
|
|
@@ -2089,167 +2105,170 @@ export const CreatePendingInvoiceLineBody = zod
|
|
|
2089
2105
|
price: zod
|
|
2090
2106
|
.union([
|
|
2091
2107
|
zod
|
|
2092
|
-
.
|
|
2093
|
-
|
|
2094
|
-
.string()
|
|
2095
|
-
.regex(createPendingInvoiceLineBodyLinesItemRateCardOnePriceOneOneAmountOneRegExp)
|
|
2096
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
2097
|
-
.describe('The amount of the flat price.'),
|
|
2098
|
-
paymentTerm: zod
|
|
2099
|
-
.enum(['in_advance', 'in_arrears'])
|
|
2100
|
-
.describe('The payment term of a flat price.\nOne of: in_advance or in_arrears.')
|
|
2101
|
-
.default(createPendingInvoiceLineBodyLinesItemRateCardOnePriceOneOnePaymentTermDefault)
|
|
2102
|
-
.describe('The payment term of the flat price.\nDefaults to in advance.'),
|
|
2103
|
-
type: zod
|
|
2104
|
-
.enum(['flat'])
|
|
2105
|
-
.describe('The type of the price.'),
|
|
2106
|
-
})
|
|
2107
|
-
.describe('Flat price with payment term.'),
|
|
2108
|
-
zod
|
|
2109
|
-
.object({
|
|
2110
|
-
amount: zod.coerce
|
|
2111
|
-
.string()
|
|
2112
|
-
.regex(createPendingInvoiceLineBodyLinesItemRateCardOnePriceOneTwoAmountOneRegExp)
|
|
2113
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
2114
|
-
.describe('The amount of the unit price.'),
|
|
2115
|
-
maximumAmount: zod.coerce
|
|
2116
|
-
.string()
|
|
2117
|
-
.regex(createPendingInvoiceLineBodyLinesItemRateCardOnePriceOneTwoMaximumAmountOneRegExp)
|
|
2118
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
2119
|
-
.optional()
|
|
2120
|
-
.describe('The customer is limited to spend at most the amount.'),
|
|
2121
|
-
minimumAmount: zod.coerce
|
|
2122
|
-
.string()
|
|
2123
|
-
.regex(createPendingInvoiceLineBodyLinesItemRateCardOnePriceOneTwoMinimumAmountOneRegExp)
|
|
2124
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
2125
|
-
.optional()
|
|
2126
|
-
.describe('The customer is committed to spend at least the amount.'),
|
|
2127
|
-
type: zod
|
|
2128
|
-
.enum(['unit'])
|
|
2129
|
-
.describe('The type of the price.'),
|
|
2130
|
-
})
|
|
2131
|
-
.describe('Unit price with spend commitments.'),
|
|
2132
|
-
zod
|
|
2133
|
-
.object({
|
|
2134
|
-
maximumAmount: zod.coerce
|
|
2135
|
-
.string()
|
|
2136
|
-
.regex(createPendingInvoiceLineBodyLinesItemRateCardOnePriceOneThreeMaximumAmountOneRegExp)
|
|
2137
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
2138
|
-
.optional()
|
|
2139
|
-
.describe('The customer is limited to spend at most the amount.'),
|
|
2140
|
-
minimumAmount: zod.coerce
|
|
2141
|
-
.string()
|
|
2142
|
-
.regex(createPendingInvoiceLineBodyLinesItemRateCardOnePriceOneThreeMinimumAmountOneRegExp)
|
|
2143
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
2144
|
-
.optional()
|
|
2145
|
-
.describe('The customer is committed to spend at least the amount.'),
|
|
2146
|
-
mode: zod
|
|
2147
|
-
.enum(['volume', 'graduated'])
|
|
2148
|
-
.describe('The mode of the tiered price.')
|
|
2149
|
-
.describe('Defines if the tiering mode is volume-based or graduated:\n- In `volume`-based tiering, the maximum quantity within a period determines the per unit price.\n- In `graduated` tiering, pricing can change as the quantity grows.'),
|
|
2150
|
-
tiers: zod
|
|
2151
|
-
.array(zod
|
|
2108
|
+
.union([
|
|
2109
|
+
zod
|
|
2152
2110
|
.object({
|
|
2153
|
-
|
|
2154
|
-
.
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
.
|
|
2165
|
-
.
|
|
2166
|
-
|
|
2167
|
-
|
|
2111
|
+
amount: zod.coerce
|
|
2112
|
+
.string()
|
|
2113
|
+
.regex(createPendingInvoiceLineBodyLinesItemRateCardOnePriceOneOneAmountOneRegExp)
|
|
2114
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
2115
|
+
.describe('The amount of the flat price.'),
|
|
2116
|
+
paymentTerm: zod
|
|
2117
|
+
.enum(['in_advance', 'in_arrears'])
|
|
2118
|
+
.describe('The payment term of a flat price.\nOne of: in_advance or in_arrears.')
|
|
2119
|
+
.default(createPendingInvoiceLineBodyLinesItemRateCardOnePriceOneOnePaymentTermDefault)
|
|
2120
|
+
.describe('The payment term of the flat price.\nDefaults to in advance.'),
|
|
2121
|
+
type: zod
|
|
2122
|
+
.enum(['flat'])
|
|
2123
|
+
.describe('The type of the price.'),
|
|
2124
|
+
})
|
|
2125
|
+
.describe('Flat price with payment term.'),
|
|
2126
|
+
zod
|
|
2127
|
+
.object({
|
|
2128
|
+
amount: zod.coerce
|
|
2129
|
+
.string()
|
|
2130
|
+
.regex(createPendingInvoiceLineBodyLinesItemRateCardOnePriceOneTwoAmountOneRegExp)
|
|
2131
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
2132
|
+
.describe('The amount of the unit price.'),
|
|
2133
|
+
maximumAmount: zod.coerce
|
|
2134
|
+
.string()
|
|
2135
|
+
.regex(createPendingInvoiceLineBodyLinesItemRateCardOnePriceOneTwoMaximumAmountOneRegExp)
|
|
2136
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
2137
|
+
.optional()
|
|
2138
|
+
.describe('The customer is limited to spend at most the amount.'),
|
|
2139
|
+
minimumAmount: zod.coerce
|
|
2140
|
+
.string()
|
|
2141
|
+
.regex(createPendingInvoiceLineBodyLinesItemRateCardOnePriceOneTwoMinimumAmountOneRegExp)
|
|
2142
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
2143
|
+
.optional()
|
|
2144
|
+
.describe('The customer is committed to spend at least the amount.'),
|
|
2145
|
+
type: zod
|
|
2146
|
+
.enum(['unit'])
|
|
2147
|
+
.describe('The type of the price.'),
|
|
2148
|
+
})
|
|
2149
|
+
.describe('Unit price with spend commitments.'),
|
|
2150
|
+
zod
|
|
2151
|
+
.object({
|
|
2152
|
+
maximumAmount: zod.coerce
|
|
2153
|
+
.string()
|
|
2154
|
+
.regex(createPendingInvoiceLineBodyLinesItemRateCardOnePriceOneThreeMaximumAmountOneRegExp)
|
|
2155
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
2156
|
+
.optional()
|
|
2157
|
+
.describe('The customer is limited to spend at most the amount.'),
|
|
2158
|
+
minimumAmount: zod.coerce
|
|
2159
|
+
.string()
|
|
2160
|
+
.regex(createPendingInvoiceLineBodyLinesItemRateCardOnePriceOneThreeMinimumAmountOneRegExp)
|
|
2161
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
2162
|
+
.optional()
|
|
2163
|
+
.describe('The customer is committed to spend at least the amount.'),
|
|
2164
|
+
mode: zod
|
|
2165
|
+
.enum(['volume', 'graduated'])
|
|
2166
|
+
.describe('The mode of the tiered price.')
|
|
2167
|
+
.describe('Defines if the tiering mode is volume-based or graduated:\n- In `volume`-based tiering, the maximum quantity within a period determines the per unit price.\n- In `graduated` tiering, pricing can change as the quantity grows.'),
|
|
2168
|
+
tiers: zod
|
|
2169
|
+
.array(zod
|
|
2168
2170
|
.object({
|
|
2169
|
-
|
|
2171
|
+
flatPrice: zod
|
|
2172
|
+
.object({
|
|
2173
|
+
amount: zod.coerce
|
|
2174
|
+
.string()
|
|
2175
|
+
.regex(createPendingInvoiceLineBodyLinesItemRateCardOnePriceOneThreeTiersItemFlatPriceOneAmountOneRegExp)
|
|
2176
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
2177
|
+
.describe('The amount of the flat price.'),
|
|
2178
|
+
type: zod
|
|
2179
|
+
.enum(['flat'])
|
|
2180
|
+
.describe('The type of the price.'),
|
|
2181
|
+
})
|
|
2182
|
+
.describe('Flat price.')
|
|
2183
|
+
.nullable()
|
|
2184
|
+
.describe('The flat price component of the tier.'),
|
|
2185
|
+
unitPrice: zod
|
|
2186
|
+
.object({
|
|
2187
|
+
amount: zod.coerce
|
|
2188
|
+
.string()
|
|
2189
|
+
.regex(createPendingInvoiceLineBodyLinesItemRateCardOnePriceOneThreeTiersItemUnitPriceOneAmountOneRegExp)
|
|
2190
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
2191
|
+
.describe('The amount of the unit price.'),
|
|
2192
|
+
type: zod
|
|
2193
|
+
.enum(['unit'])
|
|
2194
|
+
.describe('The type of the price.'),
|
|
2195
|
+
})
|
|
2196
|
+
.describe('Unit price.')
|
|
2197
|
+
.nullable()
|
|
2198
|
+
.describe('The unit price component of the tier.'),
|
|
2199
|
+
upToAmount: zod.coerce
|
|
2170
2200
|
.string()
|
|
2171
|
-
.regex(
|
|
2201
|
+
.regex(createPendingInvoiceLineBodyLinesItemRateCardOnePriceOneThreeTiersItemUpToAmountOneRegExp)
|
|
2172
2202
|
.describe('Numeric represents an arbitrary precision number.')
|
|
2173
|
-
.
|
|
2174
|
-
|
|
2175
|
-
.enum(['unit'])
|
|
2176
|
-
.describe('The type of the price.'),
|
|
2203
|
+
.optional()
|
|
2204
|
+
.describe('Up to and including to this quantity will be contained in the tier.\nIf null, the tier is open-ended.'),
|
|
2177
2205
|
})
|
|
2178
|
-
.describe('
|
|
2179
|
-
.
|
|
2180
|
-
.describe('The
|
|
2181
|
-
|
|
2206
|
+
.describe('A price tier.\nAt least one price component is required in each tier.'))
|
|
2207
|
+
.min(1)
|
|
2208
|
+
.describe('The tiers of the tiered price.\nAt least one price component is required in each tier.'),
|
|
2209
|
+
type: zod
|
|
2210
|
+
.enum(['tiered'])
|
|
2211
|
+
.describe('The type of the price.\n\nOne of: flat, unit, or tiered.'),
|
|
2212
|
+
})
|
|
2213
|
+
.describe('Tiered price with spend commitments.'),
|
|
2214
|
+
zod
|
|
2215
|
+
.object({
|
|
2216
|
+
maximumAmount: zod.coerce
|
|
2182
2217
|
.string()
|
|
2183
|
-
.regex(
|
|
2218
|
+
.regex(createPendingInvoiceLineBodyLinesItemRateCardOnePriceOneFourMaximumAmountOneRegExp)
|
|
2184
2219
|
.describe('Numeric represents an arbitrary precision number.')
|
|
2185
2220
|
.optional()
|
|
2186
|
-
.describe('
|
|
2221
|
+
.describe('The customer is limited to spend at most the amount.'),
|
|
2222
|
+
minimumAmount: zod.coerce
|
|
2223
|
+
.string()
|
|
2224
|
+
.regex(createPendingInvoiceLineBodyLinesItemRateCardOnePriceOneFourMinimumAmountOneRegExp)
|
|
2225
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
2226
|
+
.optional()
|
|
2227
|
+
.describe('The customer is committed to spend at least the amount.'),
|
|
2228
|
+
multiplier: zod.coerce
|
|
2229
|
+
.string()
|
|
2230
|
+
.regex(createPendingInvoiceLineBodyLinesItemRateCardOnePriceOneFourMultiplierOneRegExp)
|
|
2231
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
2232
|
+
.default(createPendingInvoiceLineBodyLinesItemRateCardOnePriceOneFourMultiplierDefault)
|
|
2233
|
+
.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'),
|
|
2234
|
+
type: zod
|
|
2235
|
+
.enum(['dynamic'])
|
|
2236
|
+
.describe('The type of the price.'),
|
|
2187
2237
|
})
|
|
2188
|
-
.describe('
|
|
2189
|
-
|
|
2190
|
-
.
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
.
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
.
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
.
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
zod
|
|
2222
|
-
.object({
|
|
2223
|
-
amount: zod.coerce
|
|
2224
|
-
.string()
|
|
2225
|
-
.regex(createPendingInvoiceLineBodyLinesItemRateCardOnePriceOneFiveAmountOneRegExp)
|
|
2226
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
2227
|
-
.describe('The price of one package.'),
|
|
2228
|
-
maximumAmount: zod.coerce
|
|
2229
|
-
.string()
|
|
2230
|
-
.regex(createPendingInvoiceLineBodyLinesItemRateCardOnePriceOneFiveMaximumAmountOneRegExp)
|
|
2231
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
2232
|
-
.optional()
|
|
2233
|
-
.describe('The customer is limited to spend at most the amount.'),
|
|
2234
|
-
minimumAmount: zod.coerce
|
|
2235
|
-
.string()
|
|
2236
|
-
.regex(createPendingInvoiceLineBodyLinesItemRateCardOnePriceOneFiveMinimumAmountOneRegExp)
|
|
2237
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
2238
|
-
.optional()
|
|
2239
|
-
.describe('The customer is committed to spend at least the amount.'),
|
|
2240
|
-
quantityPerPackage: zod.coerce
|
|
2241
|
-
.string()
|
|
2242
|
-
.regex(createPendingInvoiceLineBodyLinesItemRateCardOnePriceOneFiveQuantityPerPackageOneRegExp)
|
|
2243
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
2244
|
-
.describe('The quantity per package.'),
|
|
2245
|
-
type: zod
|
|
2246
|
-
.enum(['package'])
|
|
2247
|
-
.describe('The type of the price.'),
|
|
2248
|
-
})
|
|
2249
|
-
.describe('Package price with spend commitments.'),
|
|
2238
|
+
.describe('Dynamic price with spend commitments.'),
|
|
2239
|
+
zod
|
|
2240
|
+
.object({
|
|
2241
|
+
amount: zod.coerce
|
|
2242
|
+
.string()
|
|
2243
|
+
.regex(createPendingInvoiceLineBodyLinesItemRateCardOnePriceOneFiveAmountOneRegExp)
|
|
2244
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
2245
|
+
.describe('The price of one package.'),
|
|
2246
|
+
maximumAmount: zod.coerce
|
|
2247
|
+
.string()
|
|
2248
|
+
.regex(createPendingInvoiceLineBodyLinesItemRateCardOnePriceOneFiveMaximumAmountOneRegExp)
|
|
2249
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
2250
|
+
.optional()
|
|
2251
|
+
.describe('The customer is limited to spend at most the amount.'),
|
|
2252
|
+
minimumAmount: zod.coerce
|
|
2253
|
+
.string()
|
|
2254
|
+
.regex(createPendingInvoiceLineBodyLinesItemRateCardOnePriceOneFiveMinimumAmountOneRegExp)
|
|
2255
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
2256
|
+
.optional()
|
|
2257
|
+
.describe('The customer is committed to spend at least the amount.'),
|
|
2258
|
+
quantityPerPackage: zod.coerce
|
|
2259
|
+
.string()
|
|
2260
|
+
.regex(createPendingInvoiceLineBodyLinesItemRateCardOnePriceOneFiveQuantityPerPackageOneRegExp)
|
|
2261
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
2262
|
+
.describe('The quantity per package.'),
|
|
2263
|
+
type: zod
|
|
2264
|
+
.enum(['package'])
|
|
2265
|
+
.describe('The type of the price.'),
|
|
2266
|
+
})
|
|
2267
|
+
.describe('Package price with spend commitments.'),
|
|
2268
|
+
])
|
|
2269
|
+
.describe('The price of the usage based rate card.'),
|
|
2270
|
+
zod.null(),
|
|
2250
2271
|
])
|
|
2251
|
-
.describe('The price of the usage based rate card.')
|
|
2252
|
-
.nullable()
|
|
2253
2272
|
.describe('The price of the rate card.\nWhen null, the feature or service is free.'),
|
|
2254
2273
|
taxConfig: zod
|
|
2255
2274
|
.object({
|
|
@@ -2669,167 +2688,170 @@ export const SimulateInvoiceBody = zod
|
|
|
2669
2688
|
price: zod
|
|
2670
2689
|
.union([
|
|
2671
2690
|
zod
|
|
2672
|
-
.
|
|
2673
|
-
|
|
2674
|
-
.string()
|
|
2675
|
-
.regex(simulateInvoiceBodyLinesItemRateCardOnePriceOneOneAmountOneRegExp)
|
|
2676
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
2677
|
-
.describe('The amount of the flat price.'),
|
|
2678
|
-
paymentTerm: zod
|
|
2679
|
-
.enum(['in_advance', 'in_arrears'])
|
|
2680
|
-
.describe('The payment term of a flat price.\nOne of: in_advance or in_arrears.')
|
|
2681
|
-
.default(simulateInvoiceBodyLinesItemRateCardOnePriceOneOnePaymentTermDefault)
|
|
2682
|
-
.describe('The payment term of the flat price.\nDefaults to in advance.'),
|
|
2683
|
-
type: zod
|
|
2684
|
-
.enum(['flat'])
|
|
2685
|
-
.describe('The type of the price.'),
|
|
2686
|
-
})
|
|
2687
|
-
.describe('Flat price with payment term.'),
|
|
2688
|
-
zod
|
|
2689
|
-
.object({
|
|
2690
|
-
amount: zod.coerce
|
|
2691
|
-
.string()
|
|
2692
|
-
.regex(simulateInvoiceBodyLinesItemRateCardOnePriceOneTwoAmountOneRegExp)
|
|
2693
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
2694
|
-
.describe('The amount of the unit price.'),
|
|
2695
|
-
maximumAmount: zod.coerce
|
|
2696
|
-
.string()
|
|
2697
|
-
.regex(simulateInvoiceBodyLinesItemRateCardOnePriceOneTwoMaximumAmountOneRegExp)
|
|
2698
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
2699
|
-
.optional()
|
|
2700
|
-
.describe('The customer is limited to spend at most the amount.'),
|
|
2701
|
-
minimumAmount: zod.coerce
|
|
2702
|
-
.string()
|
|
2703
|
-
.regex(simulateInvoiceBodyLinesItemRateCardOnePriceOneTwoMinimumAmountOneRegExp)
|
|
2704
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
2705
|
-
.optional()
|
|
2706
|
-
.describe('The customer is committed to spend at least the amount.'),
|
|
2707
|
-
type: zod
|
|
2708
|
-
.enum(['unit'])
|
|
2709
|
-
.describe('The type of the price.'),
|
|
2710
|
-
})
|
|
2711
|
-
.describe('Unit price with spend commitments.'),
|
|
2712
|
-
zod
|
|
2713
|
-
.object({
|
|
2714
|
-
maximumAmount: zod.coerce
|
|
2715
|
-
.string()
|
|
2716
|
-
.regex(simulateInvoiceBodyLinesItemRateCardOnePriceOneThreeMaximumAmountOneRegExp)
|
|
2717
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
2718
|
-
.optional()
|
|
2719
|
-
.describe('The customer is limited to spend at most the amount.'),
|
|
2720
|
-
minimumAmount: zod.coerce
|
|
2721
|
-
.string()
|
|
2722
|
-
.regex(simulateInvoiceBodyLinesItemRateCardOnePriceOneThreeMinimumAmountOneRegExp)
|
|
2723
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
2724
|
-
.optional()
|
|
2725
|
-
.describe('The customer is committed to spend at least the amount.'),
|
|
2726
|
-
mode: zod
|
|
2727
|
-
.enum(['volume', 'graduated'])
|
|
2728
|
-
.describe('The mode of the tiered price.')
|
|
2729
|
-
.describe('Defines if the tiering mode is volume-based or graduated:\n- In `volume`-based tiering, the maximum quantity within a period determines the per unit price.\n- In `graduated` tiering, pricing can change as the quantity grows.'),
|
|
2730
|
-
tiers: zod
|
|
2731
|
-
.array(zod
|
|
2691
|
+
.union([
|
|
2692
|
+
zod
|
|
2732
2693
|
.object({
|
|
2733
|
-
|
|
2734
|
-
.
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
.
|
|
2745
|
-
.
|
|
2746
|
-
|
|
2747
|
-
|
|
2694
|
+
amount: zod.coerce
|
|
2695
|
+
.string()
|
|
2696
|
+
.regex(simulateInvoiceBodyLinesItemRateCardOnePriceOneOneAmountOneRegExp)
|
|
2697
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
2698
|
+
.describe('The amount of the flat price.'),
|
|
2699
|
+
paymentTerm: zod
|
|
2700
|
+
.enum(['in_advance', 'in_arrears'])
|
|
2701
|
+
.describe('The payment term of a flat price.\nOne of: in_advance or in_arrears.')
|
|
2702
|
+
.default(simulateInvoiceBodyLinesItemRateCardOnePriceOneOnePaymentTermDefault)
|
|
2703
|
+
.describe('The payment term of the flat price.\nDefaults to in advance.'),
|
|
2704
|
+
type: zod
|
|
2705
|
+
.enum(['flat'])
|
|
2706
|
+
.describe('The type of the price.'),
|
|
2707
|
+
})
|
|
2708
|
+
.describe('Flat price with payment term.'),
|
|
2709
|
+
zod
|
|
2710
|
+
.object({
|
|
2711
|
+
amount: zod.coerce
|
|
2712
|
+
.string()
|
|
2713
|
+
.regex(simulateInvoiceBodyLinesItemRateCardOnePriceOneTwoAmountOneRegExp)
|
|
2714
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
2715
|
+
.describe('The amount of the unit price.'),
|
|
2716
|
+
maximumAmount: zod.coerce
|
|
2717
|
+
.string()
|
|
2718
|
+
.regex(simulateInvoiceBodyLinesItemRateCardOnePriceOneTwoMaximumAmountOneRegExp)
|
|
2719
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
2720
|
+
.optional()
|
|
2721
|
+
.describe('The customer is limited to spend at most the amount.'),
|
|
2722
|
+
minimumAmount: zod.coerce
|
|
2723
|
+
.string()
|
|
2724
|
+
.regex(simulateInvoiceBodyLinesItemRateCardOnePriceOneTwoMinimumAmountOneRegExp)
|
|
2725
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
2726
|
+
.optional()
|
|
2727
|
+
.describe('The customer is committed to spend at least the amount.'),
|
|
2728
|
+
type: zod
|
|
2729
|
+
.enum(['unit'])
|
|
2730
|
+
.describe('The type of the price.'),
|
|
2731
|
+
})
|
|
2732
|
+
.describe('Unit price with spend commitments.'),
|
|
2733
|
+
zod
|
|
2734
|
+
.object({
|
|
2735
|
+
maximumAmount: zod.coerce
|
|
2736
|
+
.string()
|
|
2737
|
+
.regex(simulateInvoiceBodyLinesItemRateCardOnePriceOneThreeMaximumAmountOneRegExp)
|
|
2738
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
2739
|
+
.optional()
|
|
2740
|
+
.describe('The customer is limited to spend at most the amount.'),
|
|
2741
|
+
minimumAmount: zod.coerce
|
|
2742
|
+
.string()
|
|
2743
|
+
.regex(simulateInvoiceBodyLinesItemRateCardOnePriceOneThreeMinimumAmountOneRegExp)
|
|
2744
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
2745
|
+
.optional()
|
|
2746
|
+
.describe('The customer is committed to spend at least the amount.'),
|
|
2747
|
+
mode: zod
|
|
2748
|
+
.enum(['volume', 'graduated'])
|
|
2749
|
+
.describe('The mode of the tiered price.')
|
|
2750
|
+
.describe('Defines if the tiering mode is volume-based or graduated:\n- In `volume`-based tiering, the maximum quantity within a period determines the per unit price.\n- In `graduated` tiering, pricing can change as the quantity grows.'),
|
|
2751
|
+
tiers: zod
|
|
2752
|
+
.array(zod
|
|
2748
2753
|
.object({
|
|
2749
|
-
|
|
2754
|
+
flatPrice: zod
|
|
2755
|
+
.object({
|
|
2756
|
+
amount: zod.coerce
|
|
2757
|
+
.string()
|
|
2758
|
+
.regex(simulateInvoiceBodyLinesItemRateCardOnePriceOneThreeTiersItemFlatPriceOneAmountOneRegExp)
|
|
2759
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
2760
|
+
.describe('The amount of the flat price.'),
|
|
2761
|
+
type: zod
|
|
2762
|
+
.enum(['flat'])
|
|
2763
|
+
.describe('The type of the price.'),
|
|
2764
|
+
})
|
|
2765
|
+
.describe('Flat price.')
|
|
2766
|
+
.nullable()
|
|
2767
|
+
.describe('The flat price component of the tier.'),
|
|
2768
|
+
unitPrice: zod
|
|
2769
|
+
.object({
|
|
2770
|
+
amount: zod.coerce
|
|
2771
|
+
.string()
|
|
2772
|
+
.regex(simulateInvoiceBodyLinesItemRateCardOnePriceOneThreeTiersItemUnitPriceOneAmountOneRegExp)
|
|
2773
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
2774
|
+
.describe('The amount of the unit price.'),
|
|
2775
|
+
type: zod
|
|
2776
|
+
.enum(['unit'])
|
|
2777
|
+
.describe('The type of the price.'),
|
|
2778
|
+
})
|
|
2779
|
+
.describe('Unit price.')
|
|
2780
|
+
.nullable()
|
|
2781
|
+
.describe('The unit price component of the tier.'),
|
|
2782
|
+
upToAmount: zod.coerce
|
|
2750
2783
|
.string()
|
|
2751
|
-
.regex(
|
|
2784
|
+
.regex(simulateInvoiceBodyLinesItemRateCardOnePriceOneThreeTiersItemUpToAmountOneRegExp)
|
|
2752
2785
|
.describe('Numeric represents an arbitrary precision number.')
|
|
2753
|
-
.
|
|
2754
|
-
|
|
2755
|
-
.enum(['unit'])
|
|
2756
|
-
.describe('The type of the price.'),
|
|
2786
|
+
.optional()
|
|
2787
|
+
.describe('Up to and including to this quantity will be contained in the tier.\nIf null, the tier is open-ended.'),
|
|
2757
2788
|
})
|
|
2758
|
-
.describe('
|
|
2759
|
-
.
|
|
2760
|
-
.describe('The
|
|
2761
|
-
|
|
2789
|
+
.describe('A price tier.\nAt least one price component is required in each tier.'))
|
|
2790
|
+
.min(1)
|
|
2791
|
+
.describe('The tiers of the tiered price.\nAt least one price component is required in each tier.'),
|
|
2792
|
+
type: zod
|
|
2793
|
+
.enum(['tiered'])
|
|
2794
|
+
.describe('The type of the price.\n\nOne of: flat, unit, or tiered.'),
|
|
2795
|
+
})
|
|
2796
|
+
.describe('Tiered price with spend commitments.'),
|
|
2797
|
+
zod
|
|
2798
|
+
.object({
|
|
2799
|
+
maximumAmount: zod.coerce
|
|
2800
|
+
.string()
|
|
2801
|
+
.regex(simulateInvoiceBodyLinesItemRateCardOnePriceOneFourMaximumAmountOneRegExp)
|
|
2802
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
2803
|
+
.optional()
|
|
2804
|
+
.describe('The customer is limited to spend at most the amount.'),
|
|
2805
|
+
minimumAmount: zod.coerce
|
|
2762
2806
|
.string()
|
|
2763
|
-
.regex(
|
|
2807
|
+
.regex(simulateInvoiceBodyLinesItemRateCardOnePriceOneFourMinimumAmountOneRegExp)
|
|
2764
2808
|
.describe('Numeric represents an arbitrary precision number.')
|
|
2765
2809
|
.optional()
|
|
2766
|
-
.describe('
|
|
2810
|
+
.describe('The customer is committed to spend at least the amount.'),
|
|
2811
|
+
multiplier: zod.coerce
|
|
2812
|
+
.string()
|
|
2813
|
+
.regex(simulateInvoiceBodyLinesItemRateCardOnePriceOneFourMultiplierOneRegExp)
|
|
2814
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
2815
|
+
.default(simulateInvoiceBodyLinesItemRateCardOnePriceOneFourMultiplierDefault)
|
|
2816
|
+
.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'),
|
|
2817
|
+
type: zod
|
|
2818
|
+
.enum(['dynamic'])
|
|
2819
|
+
.describe('The type of the price.'),
|
|
2767
2820
|
})
|
|
2768
|
-
.describe('
|
|
2769
|
-
|
|
2770
|
-
.
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
.
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
.
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
.
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
zod
|
|
2802
|
-
.object({
|
|
2803
|
-
amount: zod.coerce
|
|
2804
|
-
.string()
|
|
2805
|
-
.regex(simulateInvoiceBodyLinesItemRateCardOnePriceOneFiveAmountOneRegExp)
|
|
2806
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
2807
|
-
.describe('The price of one package.'),
|
|
2808
|
-
maximumAmount: zod.coerce
|
|
2809
|
-
.string()
|
|
2810
|
-
.regex(simulateInvoiceBodyLinesItemRateCardOnePriceOneFiveMaximumAmountOneRegExp)
|
|
2811
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
2812
|
-
.optional()
|
|
2813
|
-
.describe('The customer is limited to spend at most the amount.'),
|
|
2814
|
-
minimumAmount: zod.coerce
|
|
2815
|
-
.string()
|
|
2816
|
-
.regex(simulateInvoiceBodyLinesItemRateCardOnePriceOneFiveMinimumAmountOneRegExp)
|
|
2817
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
2818
|
-
.optional()
|
|
2819
|
-
.describe('The customer is committed to spend at least the amount.'),
|
|
2820
|
-
quantityPerPackage: zod.coerce
|
|
2821
|
-
.string()
|
|
2822
|
-
.regex(simulateInvoiceBodyLinesItemRateCardOnePriceOneFiveQuantityPerPackageOneRegExp)
|
|
2823
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
2824
|
-
.describe('The quantity per package.'),
|
|
2825
|
-
type: zod
|
|
2826
|
-
.enum(['package'])
|
|
2827
|
-
.describe('The type of the price.'),
|
|
2828
|
-
})
|
|
2829
|
-
.describe('Package price with spend commitments.'),
|
|
2821
|
+
.describe('Dynamic price with spend commitments.'),
|
|
2822
|
+
zod
|
|
2823
|
+
.object({
|
|
2824
|
+
amount: zod.coerce
|
|
2825
|
+
.string()
|
|
2826
|
+
.regex(simulateInvoiceBodyLinesItemRateCardOnePriceOneFiveAmountOneRegExp)
|
|
2827
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
2828
|
+
.describe('The price of one package.'),
|
|
2829
|
+
maximumAmount: zod.coerce
|
|
2830
|
+
.string()
|
|
2831
|
+
.regex(simulateInvoiceBodyLinesItemRateCardOnePriceOneFiveMaximumAmountOneRegExp)
|
|
2832
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
2833
|
+
.optional()
|
|
2834
|
+
.describe('The customer is limited to spend at most the amount.'),
|
|
2835
|
+
minimumAmount: zod.coerce
|
|
2836
|
+
.string()
|
|
2837
|
+
.regex(simulateInvoiceBodyLinesItemRateCardOnePriceOneFiveMinimumAmountOneRegExp)
|
|
2838
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
2839
|
+
.optional()
|
|
2840
|
+
.describe('The customer is committed to spend at least the amount.'),
|
|
2841
|
+
quantityPerPackage: zod.coerce
|
|
2842
|
+
.string()
|
|
2843
|
+
.regex(simulateInvoiceBodyLinesItemRateCardOnePriceOneFiveQuantityPerPackageOneRegExp)
|
|
2844
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
2845
|
+
.describe('The quantity per package.'),
|
|
2846
|
+
type: zod
|
|
2847
|
+
.enum(['package'])
|
|
2848
|
+
.describe('The type of the price.'),
|
|
2849
|
+
})
|
|
2850
|
+
.describe('Package price with spend commitments.'),
|
|
2851
|
+
])
|
|
2852
|
+
.describe('The price of the usage based rate card.'),
|
|
2853
|
+
zod.null(),
|
|
2830
2854
|
])
|
|
2831
|
-
.describe('The price of the usage based rate card.')
|
|
2832
|
-
.nullable()
|
|
2833
2855
|
.describe('The price of the rate card.\nWhen null, the feature or service is free.'),
|
|
2834
2856
|
taxConfig: zod
|
|
2835
2857
|
.object({
|
|
@@ -2987,11 +3009,13 @@ export const ListInvoicesQueryParams = zod.object({
|
|
|
2987
3009
|
.describe('The order by field.'),
|
|
2988
3010
|
page: zod.coerce
|
|
2989
3011
|
.number()
|
|
3012
|
+
.int()
|
|
2990
3013
|
.min(1)
|
|
2991
3014
|
.default(listInvoicesQueryPageDefault)
|
|
2992
3015
|
.describe('Page index.\n\nDefault is 1.'),
|
|
2993
3016
|
pageSize: zod.coerce
|
|
2994
3017
|
.number()
|
|
3018
|
+
.int()
|
|
2995
3019
|
.min(1)
|
|
2996
3020
|
.max(listInvoicesQueryPageSizeMax)
|
|
2997
3021
|
.default(listInvoicesQueryPageSizeDefault)
|
|
@@ -3499,167 +3523,170 @@ export const UpdateInvoiceBody = zod
|
|
|
3499
3523
|
price: zod
|
|
3500
3524
|
.union([
|
|
3501
3525
|
zod
|
|
3502
|
-
.
|
|
3503
|
-
|
|
3504
|
-
.string()
|
|
3505
|
-
.regex(updateInvoiceBodyLinesItemRateCardOnePriceOneOneAmountOneRegExp)
|
|
3506
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
3507
|
-
.describe('The amount of the flat price.'),
|
|
3508
|
-
paymentTerm: zod
|
|
3509
|
-
.enum(['in_advance', 'in_arrears'])
|
|
3510
|
-
.describe('The payment term of a flat price.\nOne of: in_advance or in_arrears.')
|
|
3511
|
-
.default(updateInvoiceBodyLinesItemRateCardOnePriceOneOnePaymentTermDefault)
|
|
3512
|
-
.describe('The payment term of the flat price.\nDefaults to in advance.'),
|
|
3513
|
-
type: zod
|
|
3514
|
-
.enum(['flat'])
|
|
3515
|
-
.describe('The type of the price.'),
|
|
3516
|
-
})
|
|
3517
|
-
.describe('Flat price with payment term.'),
|
|
3518
|
-
zod
|
|
3519
|
-
.object({
|
|
3520
|
-
amount: zod.coerce
|
|
3521
|
-
.string()
|
|
3522
|
-
.regex(updateInvoiceBodyLinesItemRateCardOnePriceOneTwoAmountOneRegExp)
|
|
3523
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
3524
|
-
.describe('The amount of the unit price.'),
|
|
3525
|
-
maximumAmount: zod.coerce
|
|
3526
|
-
.string()
|
|
3527
|
-
.regex(updateInvoiceBodyLinesItemRateCardOnePriceOneTwoMaximumAmountOneRegExp)
|
|
3528
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
3529
|
-
.optional()
|
|
3530
|
-
.describe('The customer is limited to spend at most the amount.'),
|
|
3531
|
-
minimumAmount: zod.coerce
|
|
3532
|
-
.string()
|
|
3533
|
-
.regex(updateInvoiceBodyLinesItemRateCardOnePriceOneTwoMinimumAmountOneRegExp)
|
|
3534
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
3535
|
-
.optional()
|
|
3536
|
-
.describe('The customer is committed to spend at least the amount.'),
|
|
3537
|
-
type: zod
|
|
3538
|
-
.enum(['unit'])
|
|
3539
|
-
.describe('The type of the price.'),
|
|
3540
|
-
})
|
|
3541
|
-
.describe('Unit price with spend commitments.'),
|
|
3542
|
-
zod
|
|
3543
|
-
.object({
|
|
3544
|
-
maximumAmount: zod.coerce
|
|
3545
|
-
.string()
|
|
3546
|
-
.regex(updateInvoiceBodyLinesItemRateCardOnePriceOneThreeMaximumAmountOneRegExp)
|
|
3547
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
3548
|
-
.optional()
|
|
3549
|
-
.describe('The customer is limited to spend at most the amount.'),
|
|
3550
|
-
minimumAmount: zod.coerce
|
|
3551
|
-
.string()
|
|
3552
|
-
.regex(updateInvoiceBodyLinesItemRateCardOnePriceOneThreeMinimumAmountOneRegExp)
|
|
3553
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
3554
|
-
.optional()
|
|
3555
|
-
.describe('The customer is committed to spend at least the amount.'),
|
|
3556
|
-
mode: zod
|
|
3557
|
-
.enum(['volume', 'graduated'])
|
|
3558
|
-
.describe('The mode of the tiered price.')
|
|
3559
|
-
.describe('Defines if the tiering mode is volume-based or graduated:\n- In `volume`-based tiering, the maximum quantity within a period determines the per unit price.\n- In `graduated` tiering, pricing can change as the quantity grows.'),
|
|
3560
|
-
tiers: zod
|
|
3561
|
-
.array(zod
|
|
3526
|
+
.union([
|
|
3527
|
+
zod
|
|
3562
3528
|
.object({
|
|
3563
|
-
|
|
3564
|
-
.
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
.
|
|
3575
|
-
.
|
|
3576
|
-
|
|
3577
|
-
|
|
3529
|
+
amount: zod.coerce
|
|
3530
|
+
.string()
|
|
3531
|
+
.regex(updateInvoiceBodyLinesItemRateCardOnePriceOneOneAmountOneRegExp)
|
|
3532
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
3533
|
+
.describe('The amount of the flat price.'),
|
|
3534
|
+
paymentTerm: zod
|
|
3535
|
+
.enum(['in_advance', 'in_arrears'])
|
|
3536
|
+
.describe('The payment term of a flat price.\nOne of: in_advance or in_arrears.')
|
|
3537
|
+
.default(updateInvoiceBodyLinesItemRateCardOnePriceOneOnePaymentTermDefault)
|
|
3538
|
+
.describe('The payment term of the flat price.\nDefaults to in advance.'),
|
|
3539
|
+
type: zod
|
|
3540
|
+
.enum(['flat'])
|
|
3541
|
+
.describe('The type of the price.'),
|
|
3542
|
+
})
|
|
3543
|
+
.describe('Flat price with payment term.'),
|
|
3544
|
+
zod
|
|
3545
|
+
.object({
|
|
3546
|
+
amount: zod.coerce
|
|
3547
|
+
.string()
|
|
3548
|
+
.regex(updateInvoiceBodyLinesItemRateCardOnePriceOneTwoAmountOneRegExp)
|
|
3549
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
3550
|
+
.describe('The amount of the unit price.'),
|
|
3551
|
+
maximumAmount: zod.coerce
|
|
3552
|
+
.string()
|
|
3553
|
+
.regex(updateInvoiceBodyLinesItemRateCardOnePriceOneTwoMaximumAmountOneRegExp)
|
|
3554
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
3555
|
+
.optional()
|
|
3556
|
+
.describe('The customer is limited to spend at most the amount.'),
|
|
3557
|
+
minimumAmount: zod.coerce
|
|
3558
|
+
.string()
|
|
3559
|
+
.regex(updateInvoiceBodyLinesItemRateCardOnePriceOneTwoMinimumAmountOneRegExp)
|
|
3560
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
3561
|
+
.optional()
|
|
3562
|
+
.describe('The customer is committed to spend at least the amount.'),
|
|
3563
|
+
type: zod
|
|
3564
|
+
.enum(['unit'])
|
|
3565
|
+
.describe('The type of the price.'),
|
|
3566
|
+
})
|
|
3567
|
+
.describe('Unit price with spend commitments.'),
|
|
3568
|
+
zod
|
|
3569
|
+
.object({
|
|
3570
|
+
maximumAmount: zod.coerce
|
|
3571
|
+
.string()
|
|
3572
|
+
.regex(updateInvoiceBodyLinesItemRateCardOnePriceOneThreeMaximumAmountOneRegExp)
|
|
3573
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
3574
|
+
.optional()
|
|
3575
|
+
.describe('The customer is limited to spend at most the amount.'),
|
|
3576
|
+
minimumAmount: zod.coerce
|
|
3577
|
+
.string()
|
|
3578
|
+
.regex(updateInvoiceBodyLinesItemRateCardOnePriceOneThreeMinimumAmountOneRegExp)
|
|
3579
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
3580
|
+
.optional()
|
|
3581
|
+
.describe('The customer is committed to spend at least the amount.'),
|
|
3582
|
+
mode: zod
|
|
3583
|
+
.enum(['volume', 'graduated'])
|
|
3584
|
+
.describe('The mode of the tiered price.')
|
|
3585
|
+
.describe('Defines if the tiering mode is volume-based or graduated:\n- In `volume`-based tiering, the maximum quantity within a period determines the per unit price.\n- In `graduated` tiering, pricing can change as the quantity grows.'),
|
|
3586
|
+
tiers: zod
|
|
3587
|
+
.array(zod
|
|
3578
3588
|
.object({
|
|
3579
|
-
|
|
3589
|
+
flatPrice: zod
|
|
3590
|
+
.object({
|
|
3591
|
+
amount: zod.coerce
|
|
3592
|
+
.string()
|
|
3593
|
+
.regex(updateInvoiceBodyLinesItemRateCardOnePriceOneThreeTiersItemFlatPriceOneAmountOneRegExp)
|
|
3594
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
3595
|
+
.describe('The amount of the flat price.'),
|
|
3596
|
+
type: zod
|
|
3597
|
+
.enum(['flat'])
|
|
3598
|
+
.describe('The type of the price.'),
|
|
3599
|
+
})
|
|
3600
|
+
.describe('Flat price.')
|
|
3601
|
+
.nullable()
|
|
3602
|
+
.describe('The flat price component of the tier.'),
|
|
3603
|
+
unitPrice: zod
|
|
3604
|
+
.object({
|
|
3605
|
+
amount: zod.coerce
|
|
3606
|
+
.string()
|
|
3607
|
+
.regex(updateInvoiceBodyLinesItemRateCardOnePriceOneThreeTiersItemUnitPriceOneAmountOneRegExp)
|
|
3608
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
3609
|
+
.describe('The amount of the unit price.'),
|
|
3610
|
+
type: zod
|
|
3611
|
+
.enum(['unit'])
|
|
3612
|
+
.describe('The type of the price.'),
|
|
3613
|
+
})
|
|
3614
|
+
.describe('Unit price.')
|
|
3615
|
+
.nullable()
|
|
3616
|
+
.describe('The unit price component of the tier.'),
|
|
3617
|
+
upToAmount: zod.coerce
|
|
3580
3618
|
.string()
|
|
3581
|
-
.regex(
|
|
3619
|
+
.regex(updateInvoiceBodyLinesItemRateCardOnePriceOneThreeTiersItemUpToAmountOneRegExp)
|
|
3582
3620
|
.describe('Numeric represents an arbitrary precision number.')
|
|
3583
|
-
.
|
|
3584
|
-
|
|
3585
|
-
.enum(['unit'])
|
|
3586
|
-
.describe('The type of the price.'),
|
|
3621
|
+
.optional()
|
|
3622
|
+
.describe('Up to and including to this quantity will be contained in the tier.\nIf null, the tier is open-ended.'),
|
|
3587
3623
|
})
|
|
3588
|
-
.describe('
|
|
3589
|
-
.
|
|
3590
|
-
.describe('The
|
|
3591
|
-
|
|
3624
|
+
.describe('A price tier.\nAt least one price component is required in each tier.'))
|
|
3625
|
+
.min(1)
|
|
3626
|
+
.describe('The tiers of the tiered price.\nAt least one price component is required in each tier.'),
|
|
3627
|
+
type: zod
|
|
3628
|
+
.enum(['tiered'])
|
|
3629
|
+
.describe('The type of the price.\n\nOne of: flat, unit, or tiered.'),
|
|
3630
|
+
})
|
|
3631
|
+
.describe('Tiered price with spend commitments.'),
|
|
3632
|
+
zod
|
|
3633
|
+
.object({
|
|
3634
|
+
maximumAmount: zod.coerce
|
|
3635
|
+
.string()
|
|
3636
|
+
.regex(updateInvoiceBodyLinesItemRateCardOnePriceOneFourMaximumAmountOneRegExp)
|
|
3637
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
3638
|
+
.optional()
|
|
3639
|
+
.describe('The customer is limited to spend at most the amount.'),
|
|
3640
|
+
minimumAmount: zod.coerce
|
|
3592
3641
|
.string()
|
|
3593
|
-
.regex(
|
|
3642
|
+
.regex(updateInvoiceBodyLinesItemRateCardOnePriceOneFourMinimumAmountOneRegExp)
|
|
3594
3643
|
.describe('Numeric represents an arbitrary precision number.')
|
|
3595
3644
|
.optional()
|
|
3596
|
-
.describe('
|
|
3645
|
+
.describe('The customer is committed to spend at least the amount.'),
|
|
3646
|
+
multiplier: zod.coerce
|
|
3647
|
+
.string()
|
|
3648
|
+
.regex(updateInvoiceBodyLinesItemRateCardOnePriceOneFourMultiplierOneRegExp)
|
|
3649
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
3650
|
+
.default(updateInvoiceBodyLinesItemRateCardOnePriceOneFourMultiplierDefault)
|
|
3651
|
+
.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'),
|
|
3652
|
+
type: zod
|
|
3653
|
+
.enum(['dynamic'])
|
|
3654
|
+
.describe('The type of the price.'),
|
|
3597
3655
|
})
|
|
3598
|
-
.describe('
|
|
3599
|
-
|
|
3600
|
-
.
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
|
|
3611
|
-
|
|
3612
|
-
.
|
|
3613
|
-
|
|
3614
|
-
|
|
3615
|
-
|
|
3616
|
-
|
|
3617
|
-
|
|
3618
|
-
.
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
.
|
|
3628
|
-
|
|
3629
|
-
|
|
3630
|
-
|
|
3631
|
-
zod
|
|
3632
|
-
.object({
|
|
3633
|
-
amount: zod.coerce
|
|
3634
|
-
.string()
|
|
3635
|
-
.regex(updateInvoiceBodyLinesItemRateCardOnePriceOneFiveAmountOneRegExp)
|
|
3636
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
3637
|
-
.describe('The price of one package.'),
|
|
3638
|
-
maximumAmount: zod.coerce
|
|
3639
|
-
.string()
|
|
3640
|
-
.regex(updateInvoiceBodyLinesItemRateCardOnePriceOneFiveMaximumAmountOneRegExp)
|
|
3641
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
3642
|
-
.optional()
|
|
3643
|
-
.describe('The customer is limited to spend at most the amount.'),
|
|
3644
|
-
minimumAmount: zod.coerce
|
|
3645
|
-
.string()
|
|
3646
|
-
.regex(updateInvoiceBodyLinesItemRateCardOnePriceOneFiveMinimumAmountOneRegExp)
|
|
3647
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
3648
|
-
.optional()
|
|
3649
|
-
.describe('The customer is committed to spend at least the amount.'),
|
|
3650
|
-
quantityPerPackage: zod.coerce
|
|
3651
|
-
.string()
|
|
3652
|
-
.regex(updateInvoiceBodyLinesItemRateCardOnePriceOneFiveQuantityPerPackageOneRegExp)
|
|
3653
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
3654
|
-
.describe('The quantity per package.'),
|
|
3655
|
-
type: zod
|
|
3656
|
-
.enum(['package'])
|
|
3657
|
-
.describe('The type of the price.'),
|
|
3658
|
-
})
|
|
3659
|
-
.describe('Package price with spend commitments.'),
|
|
3656
|
+
.describe('Dynamic price with spend commitments.'),
|
|
3657
|
+
zod
|
|
3658
|
+
.object({
|
|
3659
|
+
amount: zod.coerce
|
|
3660
|
+
.string()
|
|
3661
|
+
.regex(updateInvoiceBodyLinesItemRateCardOnePriceOneFiveAmountOneRegExp)
|
|
3662
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
3663
|
+
.describe('The price of one package.'),
|
|
3664
|
+
maximumAmount: zod.coerce
|
|
3665
|
+
.string()
|
|
3666
|
+
.regex(updateInvoiceBodyLinesItemRateCardOnePriceOneFiveMaximumAmountOneRegExp)
|
|
3667
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
3668
|
+
.optional()
|
|
3669
|
+
.describe('The customer is limited to spend at most the amount.'),
|
|
3670
|
+
minimumAmount: zod.coerce
|
|
3671
|
+
.string()
|
|
3672
|
+
.regex(updateInvoiceBodyLinesItemRateCardOnePriceOneFiveMinimumAmountOneRegExp)
|
|
3673
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
3674
|
+
.optional()
|
|
3675
|
+
.describe('The customer is committed to spend at least the amount.'),
|
|
3676
|
+
quantityPerPackage: zod.coerce
|
|
3677
|
+
.string()
|
|
3678
|
+
.regex(updateInvoiceBodyLinesItemRateCardOnePriceOneFiveQuantityPerPackageOneRegExp)
|
|
3679
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
3680
|
+
.describe('The quantity per package.'),
|
|
3681
|
+
type: zod
|
|
3682
|
+
.enum(['package'])
|
|
3683
|
+
.describe('The type of the price.'),
|
|
3684
|
+
})
|
|
3685
|
+
.describe('Package price with spend commitments.'),
|
|
3686
|
+
])
|
|
3687
|
+
.describe('The price of the usage based rate card.'),
|
|
3688
|
+
zod.null(),
|
|
3660
3689
|
])
|
|
3661
|
-
.describe('The price of the usage based rate card.')
|
|
3662
|
-
.nullable()
|
|
3663
3690
|
.describe('The price of the rate card.\nWhen null, the feature or service is free.'),
|
|
3664
3691
|
taxConfig: zod
|
|
3665
3692
|
.object({
|
|
@@ -4076,11 +4103,13 @@ export const ListBillingProfilesQueryParams = zod.object({
|
|
|
4076
4103
|
.describe('The order by field.'),
|
|
4077
4104
|
page: zod.coerce
|
|
4078
4105
|
.number()
|
|
4106
|
+
.int()
|
|
4079
4107
|
.min(1)
|
|
4080
4108
|
.default(listBillingProfilesQueryPageDefault)
|
|
4081
4109
|
.describe('Page index.\n\nDefault is 1.'),
|
|
4082
4110
|
pageSize: zod.coerce
|
|
4083
4111
|
.number()
|
|
4112
|
+
.int()
|
|
4084
4113
|
.min(1)
|
|
4085
4114
|
.max(listBillingProfilesQueryPageSizeMax)
|
|
4086
4115
|
.default(listBillingProfilesQueryPageSizeDefault)
|
|
@@ -4787,11 +4816,13 @@ export const ListCustomersQueryParams = zod.object({
|
|
|
4787
4816
|
.describe('The order by field.'),
|
|
4788
4817
|
page: zod.coerce
|
|
4789
4818
|
.number()
|
|
4819
|
+
.int()
|
|
4790
4820
|
.min(1)
|
|
4791
4821
|
.default(listCustomersQueryPageDefault)
|
|
4792
4822
|
.describe('Page index.\n\nDefault is 1.'),
|
|
4793
4823
|
pageSize: zod.coerce
|
|
4794
4824
|
.number()
|
|
4825
|
+
.int()
|
|
4795
4826
|
.min(1)
|
|
4796
4827
|
.max(listCustomersQueryPageSizeMax)
|
|
4797
4828
|
.default(listCustomersQueryPageSizeDefault)
|
|
@@ -5004,11 +5035,13 @@ export const listCustomerAppDataQueryPageSizeMax = 1000;
|
|
|
5004
5035
|
export const ListCustomerAppDataQueryParams = zod.object({
|
|
5005
5036
|
page: zod.coerce
|
|
5006
5037
|
.number()
|
|
5038
|
+
.int()
|
|
5007
5039
|
.min(1)
|
|
5008
5040
|
.default(listCustomerAppDataQueryPageDefault)
|
|
5009
5041
|
.describe('Page index.\n\nDefault is 1.'),
|
|
5010
5042
|
pageSize: zod.coerce
|
|
5011
5043
|
.number()
|
|
5044
|
+
.int()
|
|
5012
5045
|
.min(1)
|
|
5013
5046
|
.max(listCustomerAppDataQueryPageSizeMax)
|
|
5014
5047
|
.default(listCustomerAppDataQueryPageSizeDefault)
|
|
@@ -5458,11 +5491,13 @@ export const ListCustomerSubscriptionsQueryParams = zod.object({
|
|
|
5458
5491
|
.describe('The order by field.'),
|
|
5459
5492
|
page: zod.coerce
|
|
5460
5493
|
.number()
|
|
5494
|
+
.int()
|
|
5461
5495
|
.min(1)
|
|
5462
5496
|
.default(listCustomerSubscriptionsQueryPageDefault)
|
|
5463
5497
|
.describe('Page index.\n\nDefault is 1.'),
|
|
5464
5498
|
pageSize: zod.coerce
|
|
5465
5499
|
.number()
|
|
5500
|
+
.int()
|
|
5466
5501
|
.min(1)
|
|
5467
5502
|
.max(listCustomerSubscriptionsQueryPageSizeMax)
|
|
5468
5503
|
.default(listCustomerSubscriptionsQueryPageSizeDefault)
|
|
@@ -5508,12 +5543,14 @@ export const ListEntitlementsQueryParams = zod.object({
|
|
|
5508
5543
|
.describe('Filtering by multiple features.\n\nUsage: `?feature=feature-1&feature=feature-2`'),
|
|
5509
5544
|
limit: zod.coerce
|
|
5510
5545
|
.number()
|
|
5546
|
+
.int()
|
|
5511
5547
|
.min(1)
|
|
5512
5548
|
.max(listEntitlementsQueryLimitMax)
|
|
5513
5549
|
.default(listEntitlementsQueryLimitDefault)
|
|
5514
5550
|
.describe('Number of items to return.\n\nDefault is 100.'),
|
|
5515
5551
|
offset: zod.coerce
|
|
5516
5552
|
.number()
|
|
5553
|
+
.int()
|
|
5517
5554
|
.min(listEntitlementsQueryOffsetMin)
|
|
5518
5555
|
.default(listEntitlementsQueryOffsetDefault)
|
|
5519
5556
|
.describe('Number of items to skip.\n\nDefault is 0.'),
|
|
@@ -5528,11 +5565,13 @@ export const ListEntitlementsQueryParams = zod.object({
|
|
|
5528
5565
|
.describe('The order by field.'),
|
|
5529
5566
|
page: zod.coerce
|
|
5530
5567
|
.number()
|
|
5568
|
+
.int()
|
|
5531
5569
|
.min(1)
|
|
5532
5570
|
.default(listEntitlementsQueryPageDefault)
|
|
5533
5571
|
.describe('Page index.\n\nDefault is 1.'),
|
|
5534
5572
|
pageSize: zod.coerce
|
|
5535
5573
|
.number()
|
|
5574
|
+
.int()
|
|
5536
5575
|
.min(1)
|
|
5537
5576
|
.max(listEntitlementsQueryPageSizeMax)
|
|
5538
5577
|
.default(listEntitlementsQueryPageSizeDefault)
|
|
@@ -5597,6 +5636,7 @@ export const ListEventsQueryParams = zod.object({
|
|
|
5597
5636
|
.describe('End date-time in RFC 3339 format.\n\nInclusive.'),
|
|
5598
5637
|
limit: zod.coerce
|
|
5599
5638
|
.number()
|
|
5639
|
+
.int()
|
|
5600
5640
|
.min(1)
|
|
5601
5641
|
.max(listEventsQueryLimitMax)
|
|
5602
5642
|
.default(listEventsQueryLimitDefault)
|
|
@@ -5674,6 +5714,7 @@ export const ListFeaturesQueryParams = zod.object({
|
|
|
5674
5714
|
.describe('Include archived features in response.'),
|
|
5675
5715
|
limit: zod.coerce
|
|
5676
5716
|
.number()
|
|
5717
|
+
.int()
|
|
5677
5718
|
.min(1)
|
|
5678
5719
|
.max(listFeaturesQueryLimitMax)
|
|
5679
5720
|
.default(listFeaturesQueryLimitDefault)
|
|
@@ -5684,6 +5725,7 @@ export const ListFeaturesQueryParams = zod.object({
|
|
|
5684
5725
|
.describe('Filter by meterSlug'),
|
|
5685
5726
|
offset: zod.coerce
|
|
5686
5727
|
.number()
|
|
5728
|
+
.int()
|
|
5687
5729
|
.min(listFeaturesQueryOffsetMin)
|
|
5688
5730
|
.default(listFeaturesQueryOffsetDefault)
|
|
5689
5731
|
.describe('Number of items to skip.\n\nDefault is 0.'),
|
|
@@ -5698,11 +5740,13 @@ export const ListFeaturesQueryParams = zod.object({
|
|
|
5698
5740
|
.describe('The order by field.'),
|
|
5699
5741
|
page: zod.coerce
|
|
5700
5742
|
.number()
|
|
5743
|
+
.int()
|
|
5701
5744
|
.min(1)
|
|
5702
5745
|
.default(listFeaturesQueryPageDefault)
|
|
5703
5746
|
.describe('Page index.\n\nDefault is 1.'),
|
|
5704
5747
|
pageSize: zod.coerce
|
|
5705
5748
|
.number()
|
|
5749
|
+
.int()
|
|
5706
5750
|
.min(1)
|
|
5707
5751
|
.max(listFeaturesQueryPageSizeMax)
|
|
5708
5752
|
.default(listFeaturesQueryPageSizeDefault)
|
|
@@ -5938,12 +5982,14 @@ export const ListGrantsQueryParams = zod.object({
|
|
|
5938
5982
|
.describe('Include deleted'),
|
|
5939
5983
|
limit: zod.coerce
|
|
5940
5984
|
.number()
|
|
5985
|
+
.int()
|
|
5941
5986
|
.min(1)
|
|
5942
5987
|
.max(listGrantsQueryLimitMax)
|
|
5943
5988
|
.default(listGrantsQueryLimitDefault)
|
|
5944
5989
|
.describe('Number of items to return.\n\nDefault is 100.'),
|
|
5945
5990
|
offset: zod.coerce
|
|
5946
5991
|
.number()
|
|
5992
|
+
.int()
|
|
5947
5993
|
.min(listGrantsQueryOffsetMin)
|
|
5948
5994
|
.default(listGrantsQueryOffsetDefault)
|
|
5949
5995
|
.describe('Number of items to skip.\n\nDefault is 0.'),
|
|
@@ -5958,11 +6004,13 @@ export const ListGrantsQueryParams = zod.object({
|
|
|
5958
6004
|
.describe('The order by field.'),
|
|
5959
6005
|
page: zod.coerce
|
|
5960
6006
|
.number()
|
|
6007
|
+
.int()
|
|
5961
6008
|
.min(1)
|
|
5962
6009
|
.default(listGrantsQueryPageDefault)
|
|
5963
6010
|
.describe('Page index.\n\nDefault is 1.'),
|
|
5964
6011
|
pageSize: zod.coerce
|
|
5965
6012
|
.number()
|
|
6013
|
+
.int()
|
|
5966
6014
|
.min(1)
|
|
5967
6015
|
.max(listGrantsQueryPageSizeMax)
|
|
5968
6016
|
.default(listGrantsQueryPageSizeDefault)
|
|
@@ -6003,11 +6051,13 @@ export const listMarketplaceListingsQueryPageSizeMax = 1000;
|
|
|
6003
6051
|
export const ListMarketplaceListingsQueryParams = zod.object({
|
|
6004
6052
|
page: zod.coerce
|
|
6005
6053
|
.number()
|
|
6054
|
+
.int()
|
|
6006
6055
|
.min(1)
|
|
6007
6056
|
.default(listMarketplaceListingsQueryPageDefault)
|
|
6008
6057
|
.describe('Page index.\n\nDefault is 1.'),
|
|
6009
6058
|
pageSize: zod.coerce
|
|
6010
6059
|
.number()
|
|
6060
|
+
.int()
|
|
6011
6061
|
.min(1)
|
|
6012
6062
|
.max(listMarketplaceListingsQueryPageSizeMax)
|
|
6013
6063
|
.default(listMarketplaceListingsQueryPageSizeDefault)
|
|
@@ -6138,11 +6188,13 @@ export const ListMetersQueryParams = zod.object({
|
|
|
6138
6188
|
.describe('The order by field.'),
|
|
6139
6189
|
page: zod.coerce
|
|
6140
6190
|
.number()
|
|
6191
|
+
.int()
|
|
6141
6192
|
.min(1)
|
|
6142
6193
|
.default(listMetersQueryPageDefault)
|
|
6143
6194
|
.describe('Page index.\n\nDefault is 1.'),
|
|
6144
6195
|
pageSize: zod.coerce
|
|
6145
6196
|
.number()
|
|
6197
|
+
.int()
|
|
6146
6198
|
.min(1)
|
|
6147
6199
|
.max(listMetersQueryPageSizeMax)
|
|
6148
6200
|
.default(listMetersQueryPageSizeDefault)
|
|
@@ -6159,7 +6211,15 @@ export const createMeterBodySlugRegExp = /^[a-z0-9]+(?:_[a-z0-9]+)*$/;
|
|
|
6159
6211
|
export const CreateMeterBody = zod
|
|
6160
6212
|
.object({
|
|
6161
6213
|
aggregation: zod
|
|
6162
|
-
.enum(
|
|
6214
|
+
.enum({
|
|
6215
|
+
Avg: 'AVG',
|
|
6216
|
+
Count: 'COUNT',
|
|
6217
|
+
Latest: 'LATEST',
|
|
6218
|
+
Max: 'MAX',
|
|
6219
|
+
Min: 'MIN',
|
|
6220
|
+
Sum: 'SUM',
|
|
6221
|
+
UniqueCount: 'UNIQUE_COUNT',
|
|
6222
|
+
})
|
|
6163
6223
|
.describe('The aggregation type to use for the meter.')
|
|
6164
6224
|
.describe('The aggregation type to use for the meter.'),
|
|
6165
6225
|
description: zod.coerce
|
|
@@ -6341,7 +6401,12 @@ export const QueryMeterQueryParams = zod.object({
|
|
|
6341
6401
|
.optional()
|
|
6342
6402
|
.describe('End date-time in RFC 3339 format.\n\nInclusive.\n\nFor example: ?to=2025-02-01T00%3A00%3A00.000Z'),
|
|
6343
6403
|
windowSize: zod
|
|
6344
|
-
.enum(
|
|
6404
|
+
.enum({
|
|
6405
|
+
Day: 'DAY',
|
|
6406
|
+
Hour: 'HOUR',
|
|
6407
|
+
Minute: 'MINUTE',
|
|
6408
|
+
Month: 'MONTH',
|
|
6409
|
+
})
|
|
6345
6410
|
.optional()
|
|
6346
6411
|
.describe('If not specified, a single usage aggregate will be returned for the entirety of the specified period for each subject and group.\n\nFor example: ?windowSize=DAY'),
|
|
6347
6412
|
windowTimeZone: zod.coerce
|
|
@@ -6465,7 +6530,12 @@ export const QueryMeterPostBody = zod
|
|
|
6465
6530
|
.optional()
|
|
6466
6531
|
.describe('End date-time in RFC 3339 format.\n\nInclusive.'),
|
|
6467
6532
|
windowSize: zod
|
|
6468
|
-
.enum(
|
|
6533
|
+
.enum({
|
|
6534
|
+
Day: 'DAY',
|
|
6535
|
+
Hour: 'HOUR',
|
|
6536
|
+
Minute: 'MINUTE',
|
|
6537
|
+
Month: 'MONTH',
|
|
6538
|
+
})
|
|
6469
6539
|
.describe('Aggregation window size.')
|
|
6470
6540
|
.optional()
|
|
6471
6541
|
.describe('If not specified, a single usage aggregate will be returned for the entirety of the specified period for each subject and group.'),
|
|
@@ -6528,11 +6598,13 @@ export const ListNotificationChannelsQueryParams = zod.object({
|
|
|
6528
6598
|
.describe('The order by field.'),
|
|
6529
6599
|
page: zod.coerce
|
|
6530
6600
|
.number()
|
|
6601
|
+
.int()
|
|
6531
6602
|
.min(1)
|
|
6532
6603
|
.default(listNotificationChannelsQueryPageDefault)
|
|
6533
6604
|
.describe('Page index.\n\nDefault is 1.'),
|
|
6534
6605
|
pageSize: zod.coerce
|
|
6535
6606
|
.number()
|
|
6607
|
+
.int()
|
|
6536
6608
|
.min(1)
|
|
6537
6609
|
.max(listNotificationChannelsQueryPageSizeMax)
|
|
6538
6610
|
.default(listNotificationChannelsQueryPageSizeDefault)
|
|
@@ -6681,11 +6753,13 @@ export const ListNotificationEventsQueryParams = zod.object({
|
|
|
6681
6753
|
.describe('The order by field.'),
|
|
6682
6754
|
page: zod.coerce
|
|
6683
6755
|
.number()
|
|
6756
|
+
.int()
|
|
6684
6757
|
.min(1)
|
|
6685
6758
|
.default(listNotificationEventsQueryPageDefault)
|
|
6686
6759
|
.describe('Page index.\n\nDefault is 1.'),
|
|
6687
6760
|
pageSize: zod.coerce
|
|
6688
6761
|
.number()
|
|
6762
|
+
.int()
|
|
6689
6763
|
.min(1)
|
|
6690
6764
|
.max(listNotificationEventsQueryPageSizeMax)
|
|
6691
6765
|
.default(listNotificationEventsQueryPageSizeDefault)
|
|
@@ -6777,11 +6851,13 @@ export const ListNotificationRulesQueryParams = zod.object({
|
|
|
6777
6851
|
.describe('The order by field.'),
|
|
6778
6852
|
page: zod.coerce
|
|
6779
6853
|
.number()
|
|
6854
|
+
.int()
|
|
6780
6855
|
.min(1)
|
|
6781
6856
|
.default(listNotificationRulesQueryPageDefault)
|
|
6782
6857
|
.describe('Page index.\n\nDefault is 1.'),
|
|
6783
6858
|
pageSize: zod.coerce
|
|
6784
6859
|
.number()
|
|
6860
|
+
.int()
|
|
6785
6861
|
.min(1)
|
|
6786
6862
|
.max(listNotificationRulesQueryPageSizeMax)
|
|
6787
6863
|
.default(listNotificationRulesQueryPageSizeDefault)
|
|
@@ -6847,13 +6923,13 @@ export const CreateNotificationRuleBody = zod
|
|
|
6847
6923
|
.array(zod
|
|
6848
6924
|
.object({
|
|
6849
6925
|
type: zod
|
|
6850
|
-
.enum(
|
|
6851
|
-
'
|
|
6852
|
-
'NUMBER',
|
|
6853
|
-
'
|
|
6854
|
-
'usage_percentage',
|
|
6855
|
-
'usage_value',
|
|
6856
|
-
|
|
6926
|
+
.enum({
|
|
6927
|
+
BalanceValue: 'balance_value',
|
|
6928
|
+
Number: 'NUMBER',
|
|
6929
|
+
Percent: 'PERCENT',
|
|
6930
|
+
UsagePercentage: 'usage_percentage',
|
|
6931
|
+
UsageValue: 'usage_value',
|
|
6932
|
+
})
|
|
6857
6933
|
.describe('Type of the rule in the balance threshold specification:\n* `balance_value`: threshold defined by the remaining balance value based on usage and the total of grants in the current usage period\n* `usage_percentage`: threshold defined by the usage percentage compared to the total of grants in the current usage period\n* `usage_value`: threshold defined by the usage value in the current usage period\n* `NUMBER` (**deprecated**): see `usage_value`\n* `PERCENT` (**deprecated**): see `usage_percentage`')
|
|
6858
6934
|
.describe('Type of the threshold.'),
|
|
6859
6935
|
value: zod.coerce.number().describe('Value of the threshold.'),
|
|
@@ -7023,13 +7099,13 @@ export const UpdateNotificationRuleBody = zod
|
|
|
7023
7099
|
.array(zod
|
|
7024
7100
|
.object({
|
|
7025
7101
|
type: zod
|
|
7026
|
-
.enum(
|
|
7027
|
-
'
|
|
7028
|
-
'NUMBER',
|
|
7029
|
-
'
|
|
7030
|
-
'usage_percentage',
|
|
7031
|
-
'usage_value',
|
|
7032
|
-
|
|
7102
|
+
.enum({
|
|
7103
|
+
BalanceValue: 'balance_value',
|
|
7104
|
+
Number: 'NUMBER',
|
|
7105
|
+
Percent: 'PERCENT',
|
|
7106
|
+
UsagePercentage: 'usage_percentage',
|
|
7107
|
+
UsageValue: 'usage_value',
|
|
7108
|
+
})
|
|
7033
7109
|
.describe('Type of the rule in the balance threshold specification:\n* `balance_value`: threshold defined by the remaining balance value based on usage and the total of grants in the current usage period\n* `usage_percentage`: threshold defined by the usage percentage compared to the total of grants in the current usage period\n* `usage_value`: threshold defined by the usage value in the current usage period\n* `NUMBER` (**deprecated**): see `usage_value`\n* `PERCENT` (**deprecated**): see `usage_percentage`')
|
|
7034
7110
|
.describe('Type of the threshold.'),
|
|
7035
7111
|
value: zod.coerce.number().describe('Value of the threshold.'),
|
|
@@ -7207,7 +7283,7 @@ export const ListPlansQueryParams = zod.object({
|
|
|
7207
7283
|
.optional()
|
|
7208
7284
|
.describe('Filter by plan.key attribute'),
|
|
7209
7285
|
keyVersion: zod
|
|
7210
|
-
.record(zod.string(), zod.array(zod.coerce.number()))
|
|
7286
|
+
.record(zod.string(), zod.array(zod.coerce.number().int()))
|
|
7211
7287
|
.optional()
|
|
7212
7288
|
.describe('Filter by plan.key and plan.version attributes'),
|
|
7213
7289
|
order: zod
|
|
@@ -7221,11 +7297,13 @@ export const ListPlansQueryParams = zod.object({
|
|
|
7221
7297
|
.describe('The order by field.'),
|
|
7222
7298
|
page: zod.coerce
|
|
7223
7299
|
.number()
|
|
7300
|
+
.int()
|
|
7224
7301
|
.min(1)
|
|
7225
7302
|
.default(listPlansQueryPageDefault)
|
|
7226
7303
|
.describe('Page index.\n\nDefault is 1.'),
|
|
7227
7304
|
pageSize: zod.coerce
|
|
7228
7305
|
.number()
|
|
7306
|
+
.int()
|
|
7229
7307
|
.min(1)
|
|
7230
7308
|
.max(listPlansQueryPageSizeMax)
|
|
7231
7309
|
.default(listPlansQueryPageSizeDefault)
|
|
@@ -7436,6 +7514,7 @@ export const CreatePlanBody = zod
|
|
|
7436
7514
|
.describe('You can grant usage automatically alongside the entitlement, the example scenario would be creating a starting balance.\nIf an amount is specified here, a grant will be created alongside the entitlement with the specified amount.\nThat grant will have it\'s rollover settings configured in a way that after each reset operation, the balance will return the original amount specified here.\nManually creating such a grant would mean having the "amount", "minRolloverAmount", and "maxRolloverAmount" fields all be the same.'),
|
|
7437
7515
|
issueAfterResetPriority: zod.coerce
|
|
7438
7516
|
.number()
|
|
7517
|
+
.int()
|
|
7439
7518
|
.min(1)
|
|
7440
7519
|
.max(createPlanBodyPhasesItemRateCardsItemOneEntitlementTemplateOneOneIssueAfterResetPriorityMax)
|
|
7441
7520
|
.default(createPlanBodyPhasesItemRateCardsItemOneEntitlementTemplateOneOneIssueAfterResetPriorityDefault)
|
|
@@ -7617,6 +7696,7 @@ export const CreatePlanBody = zod
|
|
|
7617
7696
|
.describe('You can grant usage automatically alongside the entitlement, the example scenario would be creating a starting balance.\nIf an amount is specified here, a grant will be created alongside the entitlement with the specified amount.\nThat grant will have it\'s rollover settings configured in a way that after each reset operation, the balance will return the original amount specified here.\nManually creating such a grant would mean having the "amount", "minRolloverAmount", and "maxRolloverAmount" fields all be the same.'),
|
|
7618
7697
|
issueAfterResetPriority: zod.coerce
|
|
7619
7698
|
.number()
|
|
7699
|
+
.int()
|
|
7620
7700
|
.min(1)
|
|
7621
7701
|
.max(createPlanBodyPhasesItemRateCardsItemTwoEntitlementTemplateOneOneIssueAfterResetPriorityMax)
|
|
7622
7702
|
.default(createPlanBodyPhasesItemRateCardsItemTwoEntitlementTemplateOneOneIssueAfterResetPriorityDefault)
|
|
@@ -7690,167 +7770,170 @@ export const CreatePlanBody = zod
|
|
|
7690
7770
|
price: zod
|
|
7691
7771
|
.union([
|
|
7692
7772
|
zod
|
|
7693
|
-
.
|
|
7694
|
-
|
|
7695
|
-
.string()
|
|
7696
|
-
.regex(createPlanBodyPhasesItemRateCardsItemTwoPriceOneOneAmountOneRegExp)
|
|
7697
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
7698
|
-
.describe('The amount of the flat price.'),
|
|
7699
|
-
paymentTerm: zod
|
|
7700
|
-
.enum(['in_advance', 'in_arrears'])
|
|
7701
|
-
.describe('The payment term of a flat price.\nOne of: in_advance or in_arrears.')
|
|
7702
|
-
.default(createPlanBodyPhasesItemRateCardsItemTwoPriceOneOnePaymentTermDefault)
|
|
7703
|
-
.describe('The payment term of the flat price.\nDefaults to in advance.'),
|
|
7704
|
-
type: zod
|
|
7705
|
-
.enum(['flat'])
|
|
7706
|
-
.describe('The type of the price.'),
|
|
7707
|
-
})
|
|
7708
|
-
.describe('Flat price with payment term.'),
|
|
7709
|
-
zod
|
|
7710
|
-
.object({
|
|
7711
|
-
amount: zod.coerce
|
|
7712
|
-
.string()
|
|
7713
|
-
.regex(createPlanBodyPhasesItemRateCardsItemTwoPriceOneTwoAmountOneRegExp)
|
|
7714
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
7715
|
-
.describe('The amount of the unit price.'),
|
|
7716
|
-
maximumAmount: zod.coerce
|
|
7717
|
-
.string()
|
|
7718
|
-
.regex(createPlanBodyPhasesItemRateCardsItemTwoPriceOneTwoMaximumAmountOneRegExp)
|
|
7719
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
7720
|
-
.optional()
|
|
7721
|
-
.describe('The customer is limited to spend at most the amount.'),
|
|
7722
|
-
minimumAmount: zod.coerce
|
|
7723
|
-
.string()
|
|
7724
|
-
.regex(createPlanBodyPhasesItemRateCardsItemTwoPriceOneTwoMinimumAmountOneRegExp)
|
|
7725
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
7726
|
-
.optional()
|
|
7727
|
-
.describe('The customer is committed to spend at least the amount.'),
|
|
7728
|
-
type: zod
|
|
7729
|
-
.enum(['unit'])
|
|
7730
|
-
.describe('The type of the price.'),
|
|
7731
|
-
})
|
|
7732
|
-
.describe('Unit price with spend commitments.'),
|
|
7733
|
-
zod
|
|
7734
|
-
.object({
|
|
7735
|
-
maximumAmount: zod.coerce
|
|
7736
|
-
.string()
|
|
7737
|
-
.regex(createPlanBodyPhasesItemRateCardsItemTwoPriceOneThreeMaximumAmountOneRegExp)
|
|
7738
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
7739
|
-
.optional()
|
|
7740
|
-
.describe('The customer is limited to spend at most the amount.'),
|
|
7741
|
-
minimumAmount: zod.coerce
|
|
7742
|
-
.string()
|
|
7743
|
-
.regex(createPlanBodyPhasesItemRateCardsItemTwoPriceOneThreeMinimumAmountOneRegExp)
|
|
7744
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
7745
|
-
.optional()
|
|
7746
|
-
.describe('The customer is committed to spend at least the amount.'),
|
|
7747
|
-
mode: zod
|
|
7748
|
-
.enum(['volume', 'graduated'])
|
|
7749
|
-
.describe('The mode of the tiered price.')
|
|
7750
|
-
.describe('Defines if the tiering mode is volume-based or graduated:\n- In `volume`-based tiering, the maximum quantity within a period determines the per unit price.\n- In `graduated` tiering, pricing can change as the quantity grows.'),
|
|
7751
|
-
tiers: zod
|
|
7752
|
-
.array(zod
|
|
7773
|
+
.union([
|
|
7774
|
+
zod
|
|
7753
7775
|
.object({
|
|
7754
|
-
|
|
7755
|
-
.
|
|
7756
|
-
|
|
7757
|
-
|
|
7758
|
-
|
|
7759
|
-
|
|
7760
|
-
|
|
7761
|
-
|
|
7762
|
-
|
|
7763
|
-
|
|
7764
|
-
|
|
7765
|
-
.
|
|
7766
|
-
.
|
|
7767
|
-
|
|
7768
|
-
|
|
7776
|
+
amount: zod.coerce
|
|
7777
|
+
.string()
|
|
7778
|
+
.regex(createPlanBodyPhasesItemRateCardsItemTwoPriceOneOneAmountOneRegExp)
|
|
7779
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
7780
|
+
.describe('The amount of the flat price.'),
|
|
7781
|
+
paymentTerm: zod
|
|
7782
|
+
.enum(['in_advance', 'in_arrears'])
|
|
7783
|
+
.describe('The payment term of a flat price.\nOne of: in_advance or in_arrears.')
|
|
7784
|
+
.default(createPlanBodyPhasesItemRateCardsItemTwoPriceOneOnePaymentTermDefault)
|
|
7785
|
+
.describe('The payment term of the flat price.\nDefaults to in advance.'),
|
|
7786
|
+
type: zod
|
|
7787
|
+
.enum(['flat'])
|
|
7788
|
+
.describe('The type of the price.'),
|
|
7789
|
+
})
|
|
7790
|
+
.describe('Flat price with payment term.'),
|
|
7791
|
+
zod
|
|
7792
|
+
.object({
|
|
7793
|
+
amount: zod.coerce
|
|
7794
|
+
.string()
|
|
7795
|
+
.regex(createPlanBodyPhasesItemRateCardsItemTwoPriceOneTwoAmountOneRegExp)
|
|
7796
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
7797
|
+
.describe('The amount of the unit price.'),
|
|
7798
|
+
maximumAmount: zod.coerce
|
|
7799
|
+
.string()
|
|
7800
|
+
.regex(createPlanBodyPhasesItemRateCardsItemTwoPriceOneTwoMaximumAmountOneRegExp)
|
|
7801
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
7802
|
+
.optional()
|
|
7803
|
+
.describe('The customer is limited to spend at most the amount.'),
|
|
7804
|
+
minimumAmount: zod.coerce
|
|
7805
|
+
.string()
|
|
7806
|
+
.regex(createPlanBodyPhasesItemRateCardsItemTwoPriceOneTwoMinimumAmountOneRegExp)
|
|
7807
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
7808
|
+
.optional()
|
|
7809
|
+
.describe('The customer is committed to spend at least the amount.'),
|
|
7810
|
+
type: zod
|
|
7811
|
+
.enum(['unit'])
|
|
7812
|
+
.describe('The type of the price.'),
|
|
7813
|
+
})
|
|
7814
|
+
.describe('Unit price with spend commitments.'),
|
|
7815
|
+
zod
|
|
7816
|
+
.object({
|
|
7817
|
+
maximumAmount: zod.coerce
|
|
7818
|
+
.string()
|
|
7819
|
+
.regex(createPlanBodyPhasesItemRateCardsItemTwoPriceOneThreeMaximumAmountOneRegExp)
|
|
7820
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
7821
|
+
.optional()
|
|
7822
|
+
.describe('The customer is limited to spend at most the amount.'),
|
|
7823
|
+
minimumAmount: zod.coerce
|
|
7824
|
+
.string()
|
|
7825
|
+
.regex(createPlanBodyPhasesItemRateCardsItemTwoPriceOneThreeMinimumAmountOneRegExp)
|
|
7826
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
7827
|
+
.optional()
|
|
7828
|
+
.describe('The customer is committed to spend at least the amount.'),
|
|
7829
|
+
mode: zod
|
|
7830
|
+
.enum(['volume', 'graduated'])
|
|
7831
|
+
.describe('The mode of the tiered price.')
|
|
7832
|
+
.describe('Defines if the tiering mode is volume-based or graduated:\n- In `volume`-based tiering, the maximum quantity within a period determines the per unit price.\n- In `graduated` tiering, pricing can change as the quantity grows.'),
|
|
7833
|
+
tiers: zod
|
|
7834
|
+
.array(zod
|
|
7769
7835
|
.object({
|
|
7770
|
-
|
|
7836
|
+
flatPrice: zod
|
|
7837
|
+
.object({
|
|
7838
|
+
amount: zod.coerce
|
|
7839
|
+
.string()
|
|
7840
|
+
.regex(createPlanBodyPhasesItemRateCardsItemTwoPriceOneThreeTiersItemFlatPriceOneAmountOneRegExp)
|
|
7841
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
7842
|
+
.describe('The amount of the flat price.'),
|
|
7843
|
+
type: zod
|
|
7844
|
+
.enum(['flat'])
|
|
7845
|
+
.describe('The type of the price.'),
|
|
7846
|
+
})
|
|
7847
|
+
.describe('Flat price.')
|
|
7848
|
+
.nullable()
|
|
7849
|
+
.describe('The flat price component of the tier.'),
|
|
7850
|
+
unitPrice: zod
|
|
7851
|
+
.object({
|
|
7852
|
+
amount: zod.coerce
|
|
7853
|
+
.string()
|
|
7854
|
+
.regex(createPlanBodyPhasesItemRateCardsItemTwoPriceOneThreeTiersItemUnitPriceOneAmountOneRegExp)
|
|
7855
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
7856
|
+
.describe('The amount of the unit price.'),
|
|
7857
|
+
type: zod
|
|
7858
|
+
.enum(['unit'])
|
|
7859
|
+
.describe('The type of the price.'),
|
|
7860
|
+
})
|
|
7861
|
+
.describe('Unit price.')
|
|
7862
|
+
.nullable()
|
|
7863
|
+
.describe('The unit price component of the tier.'),
|
|
7864
|
+
upToAmount: zod.coerce
|
|
7771
7865
|
.string()
|
|
7772
|
-
.regex(
|
|
7866
|
+
.regex(createPlanBodyPhasesItemRateCardsItemTwoPriceOneThreeTiersItemUpToAmountOneRegExp)
|
|
7773
7867
|
.describe('Numeric represents an arbitrary precision number.')
|
|
7774
|
-
.
|
|
7775
|
-
|
|
7776
|
-
.enum(['unit'])
|
|
7777
|
-
.describe('The type of the price.'),
|
|
7868
|
+
.optional()
|
|
7869
|
+
.describe('Up to and including to this quantity will be contained in the tier.\nIf null, the tier is open-ended.'),
|
|
7778
7870
|
})
|
|
7779
|
-
.describe('
|
|
7780
|
-
.
|
|
7781
|
-
.describe('The
|
|
7782
|
-
|
|
7871
|
+
.describe('A price tier.\nAt least one price component is required in each tier.'))
|
|
7872
|
+
.min(1)
|
|
7873
|
+
.describe('The tiers of the tiered price.\nAt least one price component is required in each tier.'),
|
|
7874
|
+
type: zod
|
|
7875
|
+
.enum(['tiered'])
|
|
7876
|
+
.describe('The type of the price.\n\nOne of: flat, unit, or tiered.'),
|
|
7877
|
+
})
|
|
7878
|
+
.describe('Tiered price with spend commitments.'),
|
|
7879
|
+
zod
|
|
7880
|
+
.object({
|
|
7881
|
+
maximumAmount: zod.coerce
|
|
7783
7882
|
.string()
|
|
7784
|
-
.regex(
|
|
7883
|
+
.regex(createPlanBodyPhasesItemRateCardsItemTwoPriceOneFourMaximumAmountOneRegExp)
|
|
7785
7884
|
.describe('Numeric represents an arbitrary precision number.')
|
|
7786
7885
|
.optional()
|
|
7787
|
-
.describe('
|
|
7886
|
+
.describe('The customer is limited to spend at most the amount.'),
|
|
7887
|
+
minimumAmount: zod.coerce
|
|
7888
|
+
.string()
|
|
7889
|
+
.regex(createPlanBodyPhasesItemRateCardsItemTwoPriceOneFourMinimumAmountOneRegExp)
|
|
7890
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
7891
|
+
.optional()
|
|
7892
|
+
.describe('The customer is committed to spend at least the amount.'),
|
|
7893
|
+
multiplier: zod.coerce
|
|
7894
|
+
.string()
|
|
7895
|
+
.regex(createPlanBodyPhasesItemRateCardsItemTwoPriceOneFourMultiplierOneRegExp)
|
|
7896
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
7897
|
+
.default(createPlanBodyPhasesItemRateCardsItemTwoPriceOneFourMultiplierDefault)
|
|
7898
|
+
.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'),
|
|
7899
|
+
type: zod
|
|
7900
|
+
.enum(['dynamic'])
|
|
7901
|
+
.describe('The type of the price.'),
|
|
7788
7902
|
})
|
|
7789
|
-
.describe('
|
|
7790
|
-
|
|
7791
|
-
.
|
|
7792
|
-
|
|
7793
|
-
|
|
7794
|
-
|
|
7795
|
-
|
|
7796
|
-
|
|
7797
|
-
|
|
7798
|
-
|
|
7799
|
-
|
|
7800
|
-
|
|
7801
|
-
|
|
7802
|
-
|
|
7803
|
-
.
|
|
7804
|
-
|
|
7805
|
-
|
|
7806
|
-
|
|
7807
|
-
|
|
7808
|
-
|
|
7809
|
-
.
|
|
7810
|
-
|
|
7811
|
-
|
|
7812
|
-
|
|
7813
|
-
|
|
7814
|
-
|
|
7815
|
-
|
|
7816
|
-
|
|
7817
|
-
|
|
7818
|
-
.
|
|
7819
|
-
|
|
7820
|
-
|
|
7821
|
-
|
|
7822
|
-
zod
|
|
7823
|
-
.object({
|
|
7824
|
-
amount: zod.coerce
|
|
7825
|
-
.string()
|
|
7826
|
-
.regex(createPlanBodyPhasesItemRateCardsItemTwoPriceOneFiveAmountOneRegExp)
|
|
7827
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
7828
|
-
.describe('The price of one package.'),
|
|
7829
|
-
maximumAmount: zod.coerce
|
|
7830
|
-
.string()
|
|
7831
|
-
.regex(createPlanBodyPhasesItemRateCardsItemTwoPriceOneFiveMaximumAmountOneRegExp)
|
|
7832
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
7833
|
-
.optional()
|
|
7834
|
-
.describe('The customer is limited to spend at most the amount.'),
|
|
7835
|
-
minimumAmount: zod.coerce
|
|
7836
|
-
.string()
|
|
7837
|
-
.regex(createPlanBodyPhasesItemRateCardsItemTwoPriceOneFiveMinimumAmountOneRegExp)
|
|
7838
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
7839
|
-
.optional()
|
|
7840
|
-
.describe('The customer is committed to spend at least the amount.'),
|
|
7841
|
-
quantityPerPackage: zod.coerce
|
|
7842
|
-
.string()
|
|
7843
|
-
.regex(createPlanBodyPhasesItemRateCardsItemTwoPriceOneFiveQuantityPerPackageOneRegExp)
|
|
7844
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
7845
|
-
.describe('The quantity per package.'),
|
|
7846
|
-
type: zod
|
|
7847
|
-
.enum(['package'])
|
|
7848
|
-
.describe('The type of the price.'),
|
|
7849
|
-
})
|
|
7850
|
-
.describe('Package price with spend commitments.'),
|
|
7903
|
+
.describe('Dynamic price with spend commitments.'),
|
|
7904
|
+
zod
|
|
7905
|
+
.object({
|
|
7906
|
+
amount: zod.coerce
|
|
7907
|
+
.string()
|
|
7908
|
+
.regex(createPlanBodyPhasesItemRateCardsItemTwoPriceOneFiveAmountOneRegExp)
|
|
7909
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
7910
|
+
.describe('The price of one package.'),
|
|
7911
|
+
maximumAmount: zod.coerce
|
|
7912
|
+
.string()
|
|
7913
|
+
.regex(createPlanBodyPhasesItemRateCardsItemTwoPriceOneFiveMaximumAmountOneRegExp)
|
|
7914
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
7915
|
+
.optional()
|
|
7916
|
+
.describe('The customer is limited to spend at most the amount.'),
|
|
7917
|
+
minimumAmount: zod.coerce
|
|
7918
|
+
.string()
|
|
7919
|
+
.regex(createPlanBodyPhasesItemRateCardsItemTwoPriceOneFiveMinimumAmountOneRegExp)
|
|
7920
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
7921
|
+
.optional()
|
|
7922
|
+
.describe('The customer is committed to spend at least the amount.'),
|
|
7923
|
+
quantityPerPackage: zod.coerce
|
|
7924
|
+
.string()
|
|
7925
|
+
.regex(createPlanBodyPhasesItemRateCardsItemTwoPriceOneFiveQuantityPerPackageOneRegExp)
|
|
7926
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
7927
|
+
.describe('The quantity per package.'),
|
|
7928
|
+
type: zod
|
|
7929
|
+
.enum(['package'])
|
|
7930
|
+
.describe('The type of the price.'),
|
|
7931
|
+
})
|
|
7932
|
+
.describe('Package price with spend commitments.'),
|
|
7933
|
+
])
|
|
7934
|
+
.describe('The price of the usage based rate card.'),
|
|
7935
|
+
zod.null(),
|
|
7851
7936
|
])
|
|
7852
|
-
.describe('The price of the usage based rate card.')
|
|
7853
|
-
.nullable()
|
|
7854
7937
|
.describe('The price of the rate card.\nWhen null, the feature or service is free.'),
|
|
7855
7938
|
taxConfig: zod
|
|
7856
7939
|
.object({
|
|
@@ -8119,6 +8202,7 @@ export const UpdatePlanBody = zod
|
|
|
8119
8202
|
.describe('You can grant usage automatically alongside the entitlement, the example scenario would be creating a starting balance.\nIf an amount is specified here, a grant will be created alongside the entitlement with the specified amount.\nThat grant will have it\'s rollover settings configured in a way that after each reset operation, the balance will return the original amount specified here.\nManually creating such a grant would mean having the "amount", "minRolloverAmount", and "maxRolloverAmount" fields all be the same.'),
|
|
8120
8203
|
issueAfterResetPriority: zod.coerce
|
|
8121
8204
|
.number()
|
|
8205
|
+
.int()
|
|
8122
8206
|
.min(1)
|
|
8123
8207
|
.max(updatePlanBodyPhasesItemRateCardsItemOneEntitlementTemplateOneOneIssueAfterResetPriorityMax)
|
|
8124
8208
|
.default(updatePlanBodyPhasesItemRateCardsItemOneEntitlementTemplateOneOneIssueAfterResetPriorityDefault)
|
|
@@ -8300,6 +8384,7 @@ export const UpdatePlanBody = zod
|
|
|
8300
8384
|
.describe('You can grant usage automatically alongside the entitlement, the example scenario would be creating a starting balance.\nIf an amount is specified here, a grant will be created alongside the entitlement with the specified amount.\nThat grant will have it\'s rollover settings configured in a way that after each reset operation, the balance will return the original amount specified here.\nManually creating such a grant would mean having the "amount", "minRolloverAmount", and "maxRolloverAmount" fields all be the same.'),
|
|
8301
8385
|
issueAfterResetPriority: zod.coerce
|
|
8302
8386
|
.number()
|
|
8387
|
+
.int()
|
|
8303
8388
|
.min(1)
|
|
8304
8389
|
.max(updatePlanBodyPhasesItemRateCardsItemTwoEntitlementTemplateOneOneIssueAfterResetPriorityMax)
|
|
8305
8390
|
.default(updatePlanBodyPhasesItemRateCardsItemTwoEntitlementTemplateOneOneIssueAfterResetPriorityDefault)
|
|
@@ -8373,167 +8458,170 @@ export const UpdatePlanBody = zod
|
|
|
8373
8458
|
price: zod
|
|
8374
8459
|
.union([
|
|
8375
8460
|
zod
|
|
8376
|
-
.
|
|
8377
|
-
|
|
8378
|
-
.string()
|
|
8379
|
-
.regex(updatePlanBodyPhasesItemRateCardsItemTwoPriceOneOneAmountOneRegExp)
|
|
8380
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
8381
|
-
.describe('The amount of the flat price.'),
|
|
8382
|
-
paymentTerm: zod
|
|
8383
|
-
.enum(['in_advance', 'in_arrears'])
|
|
8384
|
-
.describe('The payment term of a flat price.\nOne of: in_advance or in_arrears.')
|
|
8385
|
-
.default(updatePlanBodyPhasesItemRateCardsItemTwoPriceOneOnePaymentTermDefault)
|
|
8386
|
-
.describe('The payment term of the flat price.\nDefaults to in advance.'),
|
|
8387
|
-
type: zod
|
|
8388
|
-
.enum(['flat'])
|
|
8389
|
-
.describe('The type of the price.'),
|
|
8390
|
-
})
|
|
8391
|
-
.describe('Flat price with payment term.'),
|
|
8392
|
-
zod
|
|
8393
|
-
.object({
|
|
8394
|
-
amount: zod.coerce
|
|
8395
|
-
.string()
|
|
8396
|
-
.regex(updatePlanBodyPhasesItemRateCardsItemTwoPriceOneTwoAmountOneRegExp)
|
|
8397
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
8398
|
-
.describe('The amount of the unit price.'),
|
|
8399
|
-
maximumAmount: zod.coerce
|
|
8400
|
-
.string()
|
|
8401
|
-
.regex(updatePlanBodyPhasesItemRateCardsItemTwoPriceOneTwoMaximumAmountOneRegExp)
|
|
8402
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
8403
|
-
.optional()
|
|
8404
|
-
.describe('The customer is limited to spend at most the amount.'),
|
|
8405
|
-
minimumAmount: zod.coerce
|
|
8406
|
-
.string()
|
|
8407
|
-
.regex(updatePlanBodyPhasesItemRateCardsItemTwoPriceOneTwoMinimumAmountOneRegExp)
|
|
8408
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
8409
|
-
.optional()
|
|
8410
|
-
.describe('The customer is committed to spend at least the amount.'),
|
|
8411
|
-
type: zod
|
|
8412
|
-
.enum(['unit'])
|
|
8413
|
-
.describe('The type of the price.'),
|
|
8414
|
-
})
|
|
8415
|
-
.describe('Unit price with spend commitments.'),
|
|
8416
|
-
zod
|
|
8417
|
-
.object({
|
|
8418
|
-
maximumAmount: zod.coerce
|
|
8419
|
-
.string()
|
|
8420
|
-
.regex(updatePlanBodyPhasesItemRateCardsItemTwoPriceOneThreeMaximumAmountOneRegExp)
|
|
8421
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
8422
|
-
.optional()
|
|
8423
|
-
.describe('The customer is limited to spend at most the amount.'),
|
|
8424
|
-
minimumAmount: zod.coerce
|
|
8425
|
-
.string()
|
|
8426
|
-
.regex(updatePlanBodyPhasesItemRateCardsItemTwoPriceOneThreeMinimumAmountOneRegExp)
|
|
8427
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
8428
|
-
.optional()
|
|
8429
|
-
.describe('The customer is committed to spend at least the amount.'),
|
|
8430
|
-
mode: zod
|
|
8431
|
-
.enum(['volume', 'graduated'])
|
|
8432
|
-
.describe('The mode of the tiered price.')
|
|
8433
|
-
.describe('Defines if the tiering mode is volume-based or graduated:\n- In `volume`-based tiering, the maximum quantity within a period determines the per unit price.\n- In `graduated` tiering, pricing can change as the quantity grows.'),
|
|
8434
|
-
tiers: zod
|
|
8435
|
-
.array(zod
|
|
8461
|
+
.union([
|
|
8462
|
+
zod
|
|
8436
8463
|
.object({
|
|
8437
|
-
|
|
8438
|
-
.
|
|
8439
|
-
|
|
8440
|
-
|
|
8441
|
-
|
|
8442
|
-
|
|
8443
|
-
|
|
8444
|
-
|
|
8445
|
-
|
|
8446
|
-
|
|
8447
|
-
|
|
8448
|
-
.
|
|
8449
|
-
.
|
|
8450
|
-
|
|
8451
|
-
|
|
8464
|
+
amount: zod.coerce
|
|
8465
|
+
.string()
|
|
8466
|
+
.regex(updatePlanBodyPhasesItemRateCardsItemTwoPriceOneOneAmountOneRegExp)
|
|
8467
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
8468
|
+
.describe('The amount of the flat price.'),
|
|
8469
|
+
paymentTerm: zod
|
|
8470
|
+
.enum(['in_advance', 'in_arrears'])
|
|
8471
|
+
.describe('The payment term of a flat price.\nOne of: in_advance or in_arrears.')
|
|
8472
|
+
.default(updatePlanBodyPhasesItemRateCardsItemTwoPriceOneOnePaymentTermDefault)
|
|
8473
|
+
.describe('The payment term of the flat price.\nDefaults to in advance.'),
|
|
8474
|
+
type: zod
|
|
8475
|
+
.enum(['flat'])
|
|
8476
|
+
.describe('The type of the price.'),
|
|
8477
|
+
})
|
|
8478
|
+
.describe('Flat price with payment term.'),
|
|
8479
|
+
zod
|
|
8480
|
+
.object({
|
|
8481
|
+
amount: zod.coerce
|
|
8482
|
+
.string()
|
|
8483
|
+
.regex(updatePlanBodyPhasesItemRateCardsItemTwoPriceOneTwoAmountOneRegExp)
|
|
8484
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
8485
|
+
.describe('The amount of the unit price.'),
|
|
8486
|
+
maximumAmount: zod.coerce
|
|
8487
|
+
.string()
|
|
8488
|
+
.regex(updatePlanBodyPhasesItemRateCardsItemTwoPriceOneTwoMaximumAmountOneRegExp)
|
|
8489
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
8490
|
+
.optional()
|
|
8491
|
+
.describe('The customer is limited to spend at most the amount.'),
|
|
8492
|
+
minimumAmount: zod.coerce
|
|
8493
|
+
.string()
|
|
8494
|
+
.regex(updatePlanBodyPhasesItemRateCardsItemTwoPriceOneTwoMinimumAmountOneRegExp)
|
|
8495
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
8496
|
+
.optional()
|
|
8497
|
+
.describe('The customer is committed to spend at least the amount.'),
|
|
8498
|
+
type: zod
|
|
8499
|
+
.enum(['unit'])
|
|
8500
|
+
.describe('The type of the price.'),
|
|
8501
|
+
})
|
|
8502
|
+
.describe('Unit price with spend commitments.'),
|
|
8503
|
+
zod
|
|
8504
|
+
.object({
|
|
8505
|
+
maximumAmount: zod.coerce
|
|
8506
|
+
.string()
|
|
8507
|
+
.regex(updatePlanBodyPhasesItemRateCardsItemTwoPriceOneThreeMaximumAmountOneRegExp)
|
|
8508
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
8509
|
+
.optional()
|
|
8510
|
+
.describe('The customer is limited to spend at most the amount.'),
|
|
8511
|
+
minimumAmount: zod.coerce
|
|
8512
|
+
.string()
|
|
8513
|
+
.regex(updatePlanBodyPhasesItemRateCardsItemTwoPriceOneThreeMinimumAmountOneRegExp)
|
|
8514
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
8515
|
+
.optional()
|
|
8516
|
+
.describe('The customer is committed to spend at least the amount.'),
|
|
8517
|
+
mode: zod
|
|
8518
|
+
.enum(['volume', 'graduated'])
|
|
8519
|
+
.describe('The mode of the tiered price.')
|
|
8520
|
+
.describe('Defines if the tiering mode is volume-based or graduated:\n- In `volume`-based tiering, the maximum quantity within a period determines the per unit price.\n- In `graduated` tiering, pricing can change as the quantity grows.'),
|
|
8521
|
+
tiers: zod
|
|
8522
|
+
.array(zod
|
|
8452
8523
|
.object({
|
|
8453
|
-
|
|
8524
|
+
flatPrice: zod
|
|
8525
|
+
.object({
|
|
8526
|
+
amount: zod.coerce
|
|
8527
|
+
.string()
|
|
8528
|
+
.regex(updatePlanBodyPhasesItemRateCardsItemTwoPriceOneThreeTiersItemFlatPriceOneAmountOneRegExp)
|
|
8529
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
8530
|
+
.describe('The amount of the flat price.'),
|
|
8531
|
+
type: zod
|
|
8532
|
+
.enum(['flat'])
|
|
8533
|
+
.describe('The type of the price.'),
|
|
8534
|
+
})
|
|
8535
|
+
.describe('Flat price.')
|
|
8536
|
+
.nullable()
|
|
8537
|
+
.describe('The flat price component of the tier.'),
|
|
8538
|
+
unitPrice: zod
|
|
8539
|
+
.object({
|
|
8540
|
+
amount: zod.coerce
|
|
8541
|
+
.string()
|
|
8542
|
+
.regex(updatePlanBodyPhasesItemRateCardsItemTwoPriceOneThreeTiersItemUnitPriceOneAmountOneRegExp)
|
|
8543
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
8544
|
+
.describe('The amount of the unit price.'),
|
|
8545
|
+
type: zod
|
|
8546
|
+
.enum(['unit'])
|
|
8547
|
+
.describe('The type of the price.'),
|
|
8548
|
+
})
|
|
8549
|
+
.describe('Unit price.')
|
|
8550
|
+
.nullable()
|
|
8551
|
+
.describe('The unit price component of the tier.'),
|
|
8552
|
+
upToAmount: zod.coerce
|
|
8454
8553
|
.string()
|
|
8455
|
-
.regex(
|
|
8554
|
+
.regex(updatePlanBodyPhasesItemRateCardsItemTwoPriceOneThreeTiersItemUpToAmountOneRegExp)
|
|
8456
8555
|
.describe('Numeric represents an arbitrary precision number.')
|
|
8457
|
-
.
|
|
8458
|
-
|
|
8459
|
-
.enum(['unit'])
|
|
8460
|
-
.describe('The type of the price.'),
|
|
8556
|
+
.optional()
|
|
8557
|
+
.describe('Up to and including to this quantity will be contained in the tier.\nIf null, the tier is open-ended.'),
|
|
8461
8558
|
})
|
|
8462
|
-
.describe('
|
|
8463
|
-
.
|
|
8464
|
-
.describe('The
|
|
8465
|
-
|
|
8559
|
+
.describe('A price tier.\nAt least one price component is required in each tier.'))
|
|
8560
|
+
.min(1)
|
|
8561
|
+
.describe('The tiers of the tiered price.\nAt least one price component is required in each tier.'),
|
|
8562
|
+
type: zod
|
|
8563
|
+
.enum(['tiered'])
|
|
8564
|
+
.describe('The type of the price.\n\nOne of: flat, unit, or tiered.'),
|
|
8565
|
+
})
|
|
8566
|
+
.describe('Tiered price with spend commitments.'),
|
|
8567
|
+
zod
|
|
8568
|
+
.object({
|
|
8569
|
+
maximumAmount: zod.coerce
|
|
8466
8570
|
.string()
|
|
8467
|
-
.regex(
|
|
8571
|
+
.regex(updatePlanBodyPhasesItemRateCardsItemTwoPriceOneFourMaximumAmountOneRegExp)
|
|
8468
8572
|
.describe('Numeric represents an arbitrary precision number.')
|
|
8469
8573
|
.optional()
|
|
8470
|
-
.describe('
|
|
8574
|
+
.describe('The customer is limited to spend at most the amount.'),
|
|
8575
|
+
minimumAmount: zod.coerce
|
|
8576
|
+
.string()
|
|
8577
|
+
.regex(updatePlanBodyPhasesItemRateCardsItemTwoPriceOneFourMinimumAmountOneRegExp)
|
|
8578
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
8579
|
+
.optional()
|
|
8580
|
+
.describe('The customer is committed to spend at least the amount.'),
|
|
8581
|
+
multiplier: zod.coerce
|
|
8582
|
+
.string()
|
|
8583
|
+
.regex(updatePlanBodyPhasesItemRateCardsItemTwoPriceOneFourMultiplierOneRegExp)
|
|
8584
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
8585
|
+
.default(updatePlanBodyPhasesItemRateCardsItemTwoPriceOneFourMultiplierDefault)
|
|
8586
|
+
.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'),
|
|
8587
|
+
type: zod
|
|
8588
|
+
.enum(['dynamic'])
|
|
8589
|
+
.describe('The type of the price.'),
|
|
8471
8590
|
})
|
|
8472
|
-
.describe('
|
|
8473
|
-
|
|
8474
|
-
.
|
|
8475
|
-
|
|
8476
|
-
|
|
8477
|
-
|
|
8478
|
-
|
|
8479
|
-
|
|
8480
|
-
|
|
8481
|
-
|
|
8482
|
-
|
|
8483
|
-
|
|
8484
|
-
|
|
8485
|
-
|
|
8486
|
-
.
|
|
8487
|
-
|
|
8488
|
-
|
|
8489
|
-
|
|
8490
|
-
|
|
8491
|
-
|
|
8492
|
-
.
|
|
8493
|
-
|
|
8494
|
-
|
|
8495
|
-
|
|
8496
|
-
|
|
8497
|
-
|
|
8498
|
-
|
|
8499
|
-
|
|
8500
|
-
|
|
8501
|
-
.
|
|
8502
|
-
|
|
8503
|
-
|
|
8504
|
-
|
|
8505
|
-
zod
|
|
8506
|
-
.object({
|
|
8507
|
-
amount: zod.coerce
|
|
8508
|
-
.string()
|
|
8509
|
-
.regex(updatePlanBodyPhasesItemRateCardsItemTwoPriceOneFiveAmountOneRegExp)
|
|
8510
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
8511
|
-
.describe('The price of one package.'),
|
|
8512
|
-
maximumAmount: zod.coerce
|
|
8513
|
-
.string()
|
|
8514
|
-
.regex(updatePlanBodyPhasesItemRateCardsItemTwoPriceOneFiveMaximumAmountOneRegExp)
|
|
8515
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
8516
|
-
.optional()
|
|
8517
|
-
.describe('The customer is limited to spend at most the amount.'),
|
|
8518
|
-
minimumAmount: zod.coerce
|
|
8519
|
-
.string()
|
|
8520
|
-
.regex(updatePlanBodyPhasesItemRateCardsItemTwoPriceOneFiveMinimumAmountOneRegExp)
|
|
8521
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
8522
|
-
.optional()
|
|
8523
|
-
.describe('The customer is committed to spend at least the amount.'),
|
|
8524
|
-
quantityPerPackage: zod.coerce
|
|
8525
|
-
.string()
|
|
8526
|
-
.regex(updatePlanBodyPhasesItemRateCardsItemTwoPriceOneFiveQuantityPerPackageOneRegExp)
|
|
8527
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
8528
|
-
.describe('The quantity per package.'),
|
|
8529
|
-
type: zod
|
|
8530
|
-
.enum(['package'])
|
|
8531
|
-
.describe('The type of the price.'),
|
|
8532
|
-
})
|
|
8533
|
-
.describe('Package price with spend commitments.'),
|
|
8591
|
+
.describe('Dynamic price with spend commitments.'),
|
|
8592
|
+
zod
|
|
8593
|
+
.object({
|
|
8594
|
+
amount: zod.coerce
|
|
8595
|
+
.string()
|
|
8596
|
+
.regex(updatePlanBodyPhasesItemRateCardsItemTwoPriceOneFiveAmountOneRegExp)
|
|
8597
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
8598
|
+
.describe('The price of one package.'),
|
|
8599
|
+
maximumAmount: zod.coerce
|
|
8600
|
+
.string()
|
|
8601
|
+
.regex(updatePlanBodyPhasesItemRateCardsItemTwoPriceOneFiveMaximumAmountOneRegExp)
|
|
8602
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
8603
|
+
.optional()
|
|
8604
|
+
.describe('The customer is limited to spend at most the amount.'),
|
|
8605
|
+
minimumAmount: zod.coerce
|
|
8606
|
+
.string()
|
|
8607
|
+
.regex(updatePlanBodyPhasesItemRateCardsItemTwoPriceOneFiveMinimumAmountOneRegExp)
|
|
8608
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
8609
|
+
.optional()
|
|
8610
|
+
.describe('The customer is committed to spend at least the amount.'),
|
|
8611
|
+
quantityPerPackage: zod.coerce
|
|
8612
|
+
.string()
|
|
8613
|
+
.regex(updatePlanBodyPhasesItemRateCardsItemTwoPriceOneFiveQuantityPerPackageOneRegExp)
|
|
8614
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
8615
|
+
.describe('The quantity per package.'),
|
|
8616
|
+
type: zod
|
|
8617
|
+
.enum(['package'])
|
|
8618
|
+
.describe('The type of the price.'),
|
|
8619
|
+
})
|
|
8620
|
+
.describe('Package price with spend commitments.'),
|
|
8621
|
+
])
|
|
8622
|
+
.describe('The price of the usage based rate card.'),
|
|
8623
|
+
zod.null(),
|
|
8534
8624
|
])
|
|
8535
|
-
.describe('The price of the usage based rate card.')
|
|
8536
|
-
.nullable()
|
|
8537
8625
|
.describe('The price of the rate card.\nWhen null, the feature or service is free.'),
|
|
8538
8626
|
taxConfig: zod
|
|
8539
8627
|
.object({
|
|
@@ -8677,7 +8765,7 @@ export const ListPlanAddonsQueryParams = zod.object({
|
|
|
8677
8765
|
.optional()
|
|
8678
8766
|
.describe('Filter by addon.key attribute.'),
|
|
8679
8767
|
keyVersion: zod
|
|
8680
|
-
.record(zod.string(), zod.array(zod.coerce.number()))
|
|
8768
|
+
.record(zod.string(), zod.array(zod.coerce.number().int()))
|
|
8681
8769
|
.optional()
|
|
8682
8770
|
.describe('Filter by addon.key and addon.version attributes.'),
|
|
8683
8771
|
order: zod
|
|
@@ -8691,11 +8779,13 @@ export const ListPlanAddonsQueryParams = zod.object({
|
|
|
8691
8779
|
.describe('The order by field.'),
|
|
8692
8780
|
page: zod.coerce
|
|
8693
8781
|
.number()
|
|
8782
|
+
.int()
|
|
8694
8783
|
.min(1)
|
|
8695
8784
|
.default(listPlanAddonsQueryPageDefault)
|
|
8696
8785
|
.describe('Page index.\n\nDefault is 1.'),
|
|
8697
8786
|
pageSize: zod.coerce
|
|
8698
8787
|
.number()
|
|
8788
|
+
.int()
|
|
8699
8789
|
.min(1)
|
|
8700
8790
|
.max(listPlanAddonsQueryPageSizeMax)
|
|
8701
8791
|
.default(listPlanAddonsQueryPageSizeDefault)
|
|
@@ -8721,6 +8811,7 @@ export const CreatePlanAddonBody = zod
|
|
|
8721
8811
|
.describe('The key of the plan phase from the add-on becomes available for purchase.'),
|
|
8722
8812
|
maxQuantity: zod.coerce
|
|
8723
8813
|
.number()
|
|
8814
|
+
.int()
|
|
8724
8815
|
.optional()
|
|
8725
8816
|
.describe('The maximum number of times the add-on can be purchased for the plan.\nIt is not applicable for add-ons with single instance type.'),
|
|
8726
8817
|
metadata: zod
|
|
@@ -8747,6 +8838,7 @@ export const UpdatePlanAddonBody = zod
|
|
|
8747
8838
|
.describe('The key of the plan phase from the add-on becomes available for purchase.'),
|
|
8748
8839
|
maxQuantity: zod.coerce
|
|
8749
8840
|
.number()
|
|
8841
|
+
.int()
|
|
8750
8842
|
.optional()
|
|
8751
8843
|
.describe('The maximum number of times the add-on can be purchased for the plan.\nIt is not applicable for add-ons with single instance type.'),
|
|
8752
8844
|
metadata: zod
|
|
@@ -8849,7 +8941,12 @@ export const QueryPortalMeterQueryParams = zod.object({
|
|
|
8849
8941
|
.optional()
|
|
8850
8942
|
.describe('End date-time in RFC 3339 format.\n\nInclusive.\n\nFor example: ?to=2025-02-01T00%3A00%3A00.000Z'),
|
|
8851
8943
|
windowSize: zod
|
|
8852
|
-
.enum(
|
|
8944
|
+
.enum({
|
|
8945
|
+
Day: 'DAY',
|
|
8946
|
+
Hour: 'HOUR',
|
|
8947
|
+
Minute: 'MINUTE',
|
|
8948
|
+
Month: 'MONTH',
|
|
8949
|
+
})
|
|
8853
8950
|
.optional()
|
|
8854
8951
|
.describe('If not specified, a single usage aggregate will be returned for the entirety of the specified period for each subject and group.\n\nFor example: ?windowSize=DAY'),
|
|
8855
8952
|
windowTimeZone: zod.coerce
|
|
@@ -8879,6 +8976,7 @@ export const listPortalTokensQueryLimitMax = 100;
|
|
|
8879
8976
|
export const ListPortalTokensQueryParams = zod.object({
|
|
8880
8977
|
limit: zod.coerce
|
|
8881
8978
|
.number()
|
|
8979
|
+
.int()
|
|
8882
8980
|
.min(1)
|
|
8883
8981
|
.max(listPortalTokensQueryLimitMax)
|
|
8884
8982
|
.default(listPortalTokensQueryLimitDefault),
|
|
@@ -9143,6 +9241,7 @@ export const CreateStripeCheckoutSessionBody = zod
|
|
|
9143
9241
|
.describe('Display additional text for your customers using custom text.'),
|
|
9144
9242
|
expiresAt: zod.coerce
|
|
9145
9243
|
.number()
|
|
9244
|
+
.int()
|
|
9146
9245
|
.optional()
|
|
9147
9246
|
.describe('The Epoch time in seconds at which the Checkout Session will expire.\nIt can be anywhere from 30 minutes to 24 hours after Checkout Session creation. By default, this value is 24 hours from creation.'),
|
|
9148
9247
|
locale: zod.coerce.string().optional(),
|
|
@@ -9316,6 +9415,7 @@ export const CreateEntitlementBody = zod
|
|
|
9316
9415
|
.describe('You can grant usage automatically alongside the entitlement, the example scenario would be creating a starting balance.\nIf an amount is specified here, a grant will be created alongside the entitlement with the specified amount.\nThat grant will have it\'s rollover settings configured in a way that after each reset operation, the balance will return the original amount specified here.\nManually creating such a grant would mean having the "amount", "minRolloverAmount", and "maxRolloverAmount" fields all be the same.'),
|
|
9317
9416
|
issueAfterResetPriority: zod.coerce
|
|
9318
9417
|
.number()
|
|
9418
|
+
.int()
|
|
9319
9419
|
.min(1)
|
|
9320
9420
|
.max(createEntitlementBodyOneIssueAfterResetPriorityMax)
|
|
9321
9421
|
.default(createEntitlementBodyOneIssueAfterResetPriorityDefault)
|
|
@@ -9327,7 +9427,10 @@ export const CreateEntitlementBody = zod
|
|
|
9327
9427
|
measureUsageFrom: zod
|
|
9328
9428
|
.union([
|
|
9329
9429
|
zod
|
|
9330
|
-
.enum(
|
|
9430
|
+
.enum({
|
|
9431
|
+
CurrentPeriodStart: 'CURRENT_PERIOD_START',
|
|
9432
|
+
Now: 'NOW',
|
|
9433
|
+
})
|
|
9331
9434
|
.describe('Start of measurement options'),
|
|
9332
9435
|
zod.coerce
|
|
9333
9436
|
.date()
|
|
@@ -9537,6 +9640,7 @@ export const CreateGrantBody = zod
|
|
|
9537
9640
|
.object({
|
|
9538
9641
|
count: zod.coerce
|
|
9539
9642
|
.number()
|
|
9643
|
+
.int()
|
|
9540
9644
|
.min(1)
|
|
9541
9645
|
.max(createGrantBodyExpirationOneCountMax)
|
|
9542
9646
|
.describe('The number of time units in the expiration period.'),
|
|
@@ -9562,6 +9666,7 @@ export const CreateGrantBody = zod
|
|
|
9562
9666
|
.describe('Grants are rolled over at reset, after which they can have a different balance compared to what they had before the reset.\nBalance after the reset is calculated as: Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset, MinRolloverAmount))'),
|
|
9563
9667
|
priority: zod.coerce
|
|
9564
9668
|
.number()
|
|
9669
|
+
.int()
|
|
9565
9670
|
.min(1)
|
|
9566
9671
|
.max(createGrantBodyPriorityMax)
|
|
9567
9672
|
.optional()
|
|
@@ -9647,6 +9752,7 @@ export const OverrideEntitlementBody = zod
|
|
|
9647
9752
|
.describe('You can grant usage automatically alongside the entitlement, the example scenario would be creating a starting balance.\nIf an amount is specified here, a grant will be created alongside the entitlement with the specified amount.\nThat grant will have it\'s rollover settings configured in a way that after each reset operation, the balance will return the original amount specified here.\nManually creating such a grant would mean having the "amount", "minRolloverAmount", and "maxRolloverAmount" fields all be the same.'),
|
|
9648
9753
|
issueAfterResetPriority: zod.coerce
|
|
9649
9754
|
.number()
|
|
9755
|
+
.int()
|
|
9650
9756
|
.min(1)
|
|
9651
9757
|
.max(overrideEntitlementBodyOneIssueAfterResetPriorityMax)
|
|
9652
9758
|
.default(overrideEntitlementBodyOneIssueAfterResetPriorityDefault)
|
|
@@ -9658,7 +9764,10 @@ export const OverrideEntitlementBody = zod
|
|
|
9658
9764
|
measureUsageFrom: zod
|
|
9659
9765
|
.union([
|
|
9660
9766
|
zod
|
|
9661
|
-
.enum(
|
|
9767
|
+
.enum({
|
|
9768
|
+
CurrentPeriodStart: 'CURRENT_PERIOD_START',
|
|
9769
|
+
Now: 'NOW',
|
|
9770
|
+
})
|
|
9662
9771
|
.describe('Start of measurement options'),
|
|
9663
9772
|
zod.coerce
|
|
9664
9773
|
.date()
|
|
@@ -9855,7 +9964,12 @@ export const GetEntitlementHistoryQueryParams = zod.object({
|
|
|
9855
9964
|
.optional()
|
|
9856
9965
|
.describe('End of time range to query entitlement: date-time in RFC 3339 format. Defaults to now.\nIf not now then gets truncated to the granularity of the underlying meter.'),
|
|
9857
9966
|
windowSize: zod
|
|
9858
|
-
.enum(
|
|
9967
|
+
.enum({
|
|
9968
|
+
Day: 'DAY',
|
|
9969
|
+
Hour: 'HOUR',
|
|
9970
|
+
Minute: 'MINUTE',
|
|
9971
|
+
Month: 'MONTH',
|
|
9972
|
+
})
|
|
9859
9973
|
.describe('Windowsize'),
|
|
9860
9974
|
windowTimeZone: zod.coerce
|
|
9861
9975
|
.string()
|
|
@@ -9896,9 +10010,11 @@ export const ResetEntitlementUsageBody = zod
|
|
|
9896
10010
|
*/
|
|
9897
10011
|
export const createSubscriptionBodyOnePlanOneKeyMax = 64;
|
|
9898
10012
|
export const createSubscriptionBodyOnePlanOneKeyRegExp = /^[a-z0-9]+(?:_[a-z0-9]+)*$/;
|
|
10013
|
+
export const createSubscriptionBodyOneCostBasisModeDefault = 'dynamic';
|
|
9899
10014
|
export const createSubscriptionBodyOneTimingDefault = 'immediate';
|
|
9900
10015
|
export const createSubscriptionBodyOneCustomerIdRegExp = /^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/;
|
|
9901
10016
|
export const createSubscriptionBodyOneCustomerKeyMax = 256;
|
|
10017
|
+
export const createSubscriptionBodyTwoCostBasisModeDefault = 'dynamic';
|
|
9902
10018
|
export const createSubscriptionBodyTwoCustomPlanOneOneNameMax = 256;
|
|
9903
10019
|
export const createSubscriptionBodyTwoCustomPlanOneOneDescriptionMax = 1024;
|
|
9904
10020
|
export const createSubscriptionBodyTwoCustomPlanOneOneCurrencyOneMin = 3;
|
|
@@ -9985,6 +10101,11 @@ export const CreateSubscriptionBody = zod
|
|
|
9985
10101
|
.date()
|
|
9986
10102
|
.optional()
|
|
9987
10103
|
.describe('The billing anchor of the subscription. The provided date will be normalized according to the billing cadence to the nearest recurrence before start time. If not provided, the subscription start time will be used.'),
|
|
10104
|
+
costBasisMode: zod
|
|
10105
|
+
.enum(['dynamic', 'pinned'])
|
|
10106
|
+
.describe('Controls how custom-currency cost bases are selected for the subscription.')
|
|
10107
|
+
.default(createSubscriptionBodyOneCostBasisModeDefault)
|
|
10108
|
+
.describe('Controls how custom-currency cost bases are selected for the new subscription.'),
|
|
9988
10109
|
customerId: zod.coerce
|
|
9989
10110
|
.string()
|
|
9990
10111
|
.regex(createSubscriptionBodyOneCustomerIdRegExp)
|
|
@@ -10019,6 +10140,7 @@ export const CreateSubscriptionBody = zod
|
|
|
10019
10140
|
.describe('The plan key.'),
|
|
10020
10141
|
version: zod.coerce
|
|
10021
10142
|
.number()
|
|
10143
|
+
.int()
|
|
10022
10144
|
.optional()
|
|
10023
10145
|
.describe('The plan version.'),
|
|
10024
10146
|
})
|
|
@@ -10054,6 +10176,11 @@ export const CreateSubscriptionBody = zod
|
|
|
10054
10176
|
.date()
|
|
10055
10177
|
.optional()
|
|
10056
10178
|
.describe('The billing anchor of the subscription. The provided date will be normalized according to the billing cadence to the nearest recurrence before start time. If not provided, the subscription start time will be used.'),
|
|
10179
|
+
costBasisMode: zod
|
|
10180
|
+
.enum(['dynamic', 'pinned'])
|
|
10181
|
+
.describe('Controls how custom-currency cost bases are selected for the subscription.')
|
|
10182
|
+
.default(createSubscriptionBodyTwoCostBasisModeDefault)
|
|
10183
|
+
.describe('Controls how custom-currency cost bases are selected for the new subscription.'),
|
|
10057
10184
|
customerId: zod.coerce
|
|
10058
10185
|
.string()
|
|
10059
10186
|
.regex(createSubscriptionBodyTwoCustomerIdRegExp)
|
|
@@ -10187,6 +10314,7 @@ export const CreateSubscriptionBody = zod
|
|
|
10187
10314
|
.describe('You can grant usage automatically alongside the entitlement, the example scenario would be creating a starting balance.\nIf an amount is specified here, a grant will be created alongside the entitlement with the specified amount.\nThat grant will have it\'s rollover settings configured in a way that after each reset operation, the balance will return the original amount specified here.\nManually creating such a grant would mean having the "amount", "minRolloverAmount", and "maxRolloverAmount" fields all be the same.'),
|
|
10188
10315
|
issueAfterResetPriority: zod.coerce
|
|
10189
10316
|
.number()
|
|
10317
|
+
.int()
|
|
10190
10318
|
.min(1)
|
|
10191
10319
|
.max(createSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemOneEntitlementTemplateOneOneIssueAfterResetPriorityMax)
|
|
10192
10320
|
.default(createSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemOneEntitlementTemplateOneOneIssueAfterResetPriorityDefault)
|
|
@@ -10368,6 +10496,7 @@ export const CreateSubscriptionBody = zod
|
|
|
10368
10496
|
.describe('You can grant usage automatically alongside the entitlement, the example scenario would be creating a starting balance.\nIf an amount is specified here, a grant will be created alongside the entitlement with the specified amount.\nThat grant will have it\'s rollover settings configured in a way that after each reset operation, the balance will return the original amount specified here.\nManually creating such a grant would mean having the "amount", "minRolloverAmount", and "maxRolloverAmount" fields all be the same.'),
|
|
10369
10497
|
issueAfterResetPriority: zod.coerce
|
|
10370
10498
|
.number()
|
|
10499
|
+
.int()
|
|
10371
10500
|
.min(1)
|
|
10372
10501
|
.max(createSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoEntitlementTemplateOneOneIssueAfterResetPriorityMax)
|
|
10373
10502
|
.default(createSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoEntitlementTemplateOneOneIssueAfterResetPriorityDefault)
|
|
@@ -10441,167 +10570,173 @@ export const CreateSubscriptionBody = zod
|
|
|
10441
10570
|
price: zod
|
|
10442
10571
|
.union([
|
|
10443
10572
|
zod
|
|
10444
|
-
.
|
|
10445
|
-
|
|
10446
|
-
.string()
|
|
10447
|
-
.regex(createSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneOneAmountOneRegExp)
|
|
10448
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
10449
|
-
.describe('The amount of the flat price.'),
|
|
10450
|
-
paymentTerm: zod
|
|
10451
|
-
.enum(['in_advance', 'in_arrears'])
|
|
10452
|
-
.describe('The payment term of a flat price.\nOne of: in_advance or in_arrears.')
|
|
10453
|
-
.default(createSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneOnePaymentTermDefault)
|
|
10454
|
-
.describe('The payment term of the flat price.\nDefaults to in advance.'),
|
|
10455
|
-
type: zod
|
|
10456
|
-
.enum(['flat'])
|
|
10457
|
-
.describe('The type of the price.'),
|
|
10458
|
-
})
|
|
10459
|
-
.describe('Flat price with payment term.'),
|
|
10460
|
-
zod
|
|
10461
|
-
.object({
|
|
10462
|
-
amount: zod.coerce
|
|
10463
|
-
.string()
|
|
10464
|
-
.regex(createSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneTwoAmountOneRegExp)
|
|
10465
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
10466
|
-
.describe('The amount of the unit price.'),
|
|
10467
|
-
maximumAmount: zod.coerce
|
|
10468
|
-
.string()
|
|
10469
|
-
.regex(createSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneTwoMaximumAmountOneRegExp)
|
|
10470
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
10471
|
-
.optional()
|
|
10472
|
-
.describe('The customer is limited to spend at most the amount.'),
|
|
10473
|
-
minimumAmount: zod.coerce
|
|
10474
|
-
.string()
|
|
10475
|
-
.regex(createSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneTwoMinimumAmountOneRegExp)
|
|
10476
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
10477
|
-
.optional()
|
|
10478
|
-
.describe('The customer is committed to spend at least the amount.'),
|
|
10479
|
-
type: zod
|
|
10480
|
-
.enum(['unit'])
|
|
10481
|
-
.describe('The type of the price.'),
|
|
10482
|
-
})
|
|
10483
|
-
.describe('Unit price with spend commitments.'),
|
|
10484
|
-
zod
|
|
10485
|
-
.object({
|
|
10486
|
-
maximumAmount: zod.coerce
|
|
10487
|
-
.string()
|
|
10488
|
-
.regex(createSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneThreeMaximumAmountOneRegExp)
|
|
10489
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
10490
|
-
.optional()
|
|
10491
|
-
.describe('The customer is limited to spend at most the amount.'),
|
|
10492
|
-
minimumAmount: zod.coerce
|
|
10493
|
-
.string()
|
|
10494
|
-
.regex(createSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneThreeMinimumAmountOneRegExp)
|
|
10495
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
10496
|
-
.optional()
|
|
10497
|
-
.describe('The customer is committed to spend at least the amount.'),
|
|
10498
|
-
mode: zod
|
|
10499
|
-
.enum(['volume', 'graduated'])
|
|
10500
|
-
.describe('The mode of the tiered price.')
|
|
10501
|
-
.describe('Defines if the tiering mode is volume-based or graduated:\n- In `volume`-based tiering, the maximum quantity within a period determines the per unit price.\n- In `graduated` tiering, pricing can change as the quantity grows.'),
|
|
10502
|
-
tiers: zod
|
|
10503
|
-
.array(zod
|
|
10573
|
+
.union([
|
|
10574
|
+
zod
|
|
10504
10575
|
.object({
|
|
10505
|
-
|
|
10506
|
-
.
|
|
10507
|
-
|
|
10508
|
-
|
|
10509
|
-
|
|
10510
|
-
|
|
10511
|
-
|
|
10512
|
-
|
|
10513
|
-
|
|
10514
|
-
|
|
10515
|
-
|
|
10516
|
-
.
|
|
10517
|
-
.
|
|
10518
|
-
|
|
10519
|
-
|
|
10576
|
+
amount: zod.coerce
|
|
10577
|
+
.string()
|
|
10578
|
+
.regex(createSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneOneAmountOneRegExp)
|
|
10579
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
10580
|
+
.describe('The amount of the flat price.'),
|
|
10581
|
+
paymentTerm: zod
|
|
10582
|
+
.enum([
|
|
10583
|
+
'in_advance',
|
|
10584
|
+
'in_arrears',
|
|
10585
|
+
])
|
|
10586
|
+
.describe('The payment term of a flat price.\nOne of: in_advance or in_arrears.')
|
|
10587
|
+
.default(createSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneOnePaymentTermDefault)
|
|
10588
|
+
.describe('The payment term of the flat price.\nDefaults to in advance.'),
|
|
10589
|
+
type: zod
|
|
10590
|
+
.enum(['flat'])
|
|
10591
|
+
.describe('The type of the price.'),
|
|
10592
|
+
})
|
|
10593
|
+
.describe('Flat price with payment term.'),
|
|
10594
|
+
zod
|
|
10595
|
+
.object({
|
|
10596
|
+
amount: zod.coerce
|
|
10597
|
+
.string()
|
|
10598
|
+
.regex(createSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneTwoAmountOneRegExp)
|
|
10599
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
10600
|
+
.describe('The amount of the unit price.'),
|
|
10601
|
+
maximumAmount: zod.coerce
|
|
10602
|
+
.string()
|
|
10603
|
+
.regex(createSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneTwoMaximumAmountOneRegExp)
|
|
10604
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
10605
|
+
.optional()
|
|
10606
|
+
.describe('The customer is limited to spend at most the amount.'),
|
|
10607
|
+
minimumAmount: zod.coerce
|
|
10608
|
+
.string()
|
|
10609
|
+
.regex(createSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneTwoMinimumAmountOneRegExp)
|
|
10610
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
10611
|
+
.optional()
|
|
10612
|
+
.describe('The customer is committed to spend at least the amount.'),
|
|
10613
|
+
type: zod
|
|
10614
|
+
.enum(['unit'])
|
|
10615
|
+
.describe('The type of the price.'),
|
|
10616
|
+
})
|
|
10617
|
+
.describe('Unit price with spend commitments.'),
|
|
10618
|
+
zod
|
|
10619
|
+
.object({
|
|
10620
|
+
maximumAmount: zod.coerce
|
|
10621
|
+
.string()
|
|
10622
|
+
.regex(createSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneThreeMaximumAmountOneRegExp)
|
|
10623
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
10624
|
+
.optional()
|
|
10625
|
+
.describe('The customer is limited to spend at most the amount.'),
|
|
10626
|
+
minimumAmount: zod.coerce
|
|
10627
|
+
.string()
|
|
10628
|
+
.regex(createSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneThreeMinimumAmountOneRegExp)
|
|
10629
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
10630
|
+
.optional()
|
|
10631
|
+
.describe('The customer is committed to spend at least the amount.'),
|
|
10632
|
+
mode: zod
|
|
10633
|
+
.enum(['volume', 'graduated'])
|
|
10634
|
+
.describe('The mode of the tiered price.')
|
|
10635
|
+
.describe('Defines if the tiering mode is volume-based or graduated:\n- In `volume`-based tiering, the maximum quantity within a period determines the per unit price.\n- In `graduated` tiering, pricing can change as the quantity grows.'),
|
|
10636
|
+
tiers: zod
|
|
10637
|
+
.array(zod
|
|
10520
10638
|
.object({
|
|
10521
|
-
|
|
10639
|
+
flatPrice: zod
|
|
10640
|
+
.object({
|
|
10641
|
+
amount: zod.coerce
|
|
10642
|
+
.string()
|
|
10643
|
+
.regex(createSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneThreeTiersItemFlatPriceOneAmountOneRegExp)
|
|
10644
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
10645
|
+
.describe('The amount of the flat price.'),
|
|
10646
|
+
type: zod
|
|
10647
|
+
.enum(['flat'])
|
|
10648
|
+
.describe('The type of the price.'),
|
|
10649
|
+
})
|
|
10650
|
+
.describe('Flat price.')
|
|
10651
|
+
.nullable()
|
|
10652
|
+
.describe('The flat price component of the tier.'),
|
|
10653
|
+
unitPrice: zod
|
|
10654
|
+
.object({
|
|
10655
|
+
amount: zod.coerce
|
|
10656
|
+
.string()
|
|
10657
|
+
.regex(createSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneThreeTiersItemUnitPriceOneAmountOneRegExp)
|
|
10658
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
10659
|
+
.describe('The amount of the unit price.'),
|
|
10660
|
+
type: zod
|
|
10661
|
+
.enum(['unit'])
|
|
10662
|
+
.describe('The type of the price.'),
|
|
10663
|
+
})
|
|
10664
|
+
.describe('Unit price.')
|
|
10665
|
+
.nullable()
|
|
10666
|
+
.describe('The unit price component of the tier.'),
|
|
10667
|
+
upToAmount: zod.coerce
|
|
10522
10668
|
.string()
|
|
10523
|
-
.regex(
|
|
10669
|
+
.regex(createSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneThreeTiersItemUpToAmountOneRegExp)
|
|
10524
10670
|
.describe('Numeric represents an arbitrary precision number.')
|
|
10525
|
-
.
|
|
10526
|
-
|
|
10527
|
-
.enum(['unit'])
|
|
10528
|
-
.describe('The type of the price.'),
|
|
10671
|
+
.optional()
|
|
10672
|
+
.describe('Up to and including to this quantity will be contained in the tier.\nIf null, the tier is open-ended.'),
|
|
10529
10673
|
})
|
|
10530
|
-
.describe('
|
|
10531
|
-
.
|
|
10532
|
-
.describe('The
|
|
10533
|
-
|
|
10674
|
+
.describe('A price tier.\nAt least one price component is required in each tier.'))
|
|
10675
|
+
.min(1)
|
|
10676
|
+
.describe('The tiers of the tiered price.\nAt least one price component is required in each tier.'),
|
|
10677
|
+
type: zod
|
|
10678
|
+
.enum(['tiered'])
|
|
10679
|
+
.describe('The type of the price.\n\nOne of: flat, unit, or tiered.'),
|
|
10680
|
+
})
|
|
10681
|
+
.describe('Tiered price with spend commitments.'),
|
|
10682
|
+
zod
|
|
10683
|
+
.object({
|
|
10684
|
+
maximumAmount: zod.coerce
|
|
10534
10685
|
.string()
|
|
10535
|
-
.regex(
|
|
10686
|
+
.regex(createSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneFourMaximumAmountOneRegExp)
|
|
10536
10687
|
.describe('Numeric represents an arbitrary precision number.')
|
|
10537
10688
|
.optional()
|
|
10538
|
-
.describe('
|
|
10689
|
+
.describe('The customer is limited to spend at most the amount.'),
|
|
10690
|
+
minimumAmount: zod.coerce
|
|
10691
|
+
.string()
|
|
10692
|
+
.regex(createSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneFourMinimumAmountOneRegExp)
|
|
10693
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
10694
|
+
.optional()
|
|
10695
|
+
.describe('The customer is committed to spend at least the amount.'),
|
|
10696
|
+
multiplier: zod.coerce
|
|
10697
|
+
.string()
|
|
10698
|
+
.regex(createSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneFourMultiplierOneRegExp)
|
|
10699
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
10700
|
+
.default(createSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneFourMultiplierDefault)
|
|
10701
|
+
.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'),
|
|
10702
|
+
type: zod
|
|
10703
|
+
.enum(['dynamic'])
|
|
10704
|
+
.describe('The type of the price.'),
|
|
10705
|
+
})
|
|
10706
|
+
.describe('Dynamic price with spend commitments.'),
|
|
10707
|
+
zod
|
|
10708
|
+
.object({
|
|
10709
|
+
amount: zod.coerce
|
|
10710
|
+
.string()
|
|
10711
|
+
.regex(createSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneFiveAmountOneRegExp)
|
|
10712
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
10713
|
+
.describe('The price of one package.'),
|
|
10714
|
+
maximumAmount: zod.coerce
|
|
10715
|
+
.string()
|
|
10716
|
+
.regex(createSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneFiveMaximumAmountOneRegExp)
|
|
10717
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
10718
|
+
.optional()
|
|
10719
|
+
.describe('The customer is limited to spend at most the amount.'),
|
|
10720
|
+
minimumAmount: zod.coerce
|
|
10721
|
+
.string()
|
|
10722
|
+
.regex(createSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneFiveMinimumAmountOneRegExp)
|
|
10723
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
10724
|
+
.optional()
|
|
10725
|
+
.describe('The customer is committed to spend at least the amount.'),
|
|
10726
|
+
quantityPerPackage: zod.coerce
|
|
10727
|
+
.string()
|
|
10728
|
+
.regex(createSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneFiveQuantityPerPackageOneRegExp)
|
|
10729
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
10730
|
+
.describe('The quantity per package.'),
|
|
10731
|
+
type: zod
|
|
10732
|
+
.enum(['package'])
|
|
10733
|
+
.describe('The type of the price.'),
|
|
10539
10734
|
})
|
|
10540
|
-
.describe('
|
|
10541
|
-
|
|
10542
|
-
|
|
10543
|
-
|
|
10544
|
-
.enum(['tiered'])
|
|
10545
|
-
.describe('The type of the price.\n\nOne of: flat, unit, or tiered.'),
|
|
10546
|
-
})
|
|
10547
|
-
.describe('Tiered price with spend commitments.'),
|
|
10548
|
-
zod
|
|
10549
|
-
.object({
|
|
10550
|
-
maximumAmount: zod.coerce
|
|
10551
|
-
.string()
|
|
10552
|
-
.regex(createSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneFourMaximumAmountOneRegExp)
|
|
10553
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
10554
|
-
.optional()
|
|
10555
|
-
.describe('The customer is limited to spend at most the amount.'),
|
|
10556
|
-
minimumAmount: zod.coerce
|
|
10557
|
-
.string()
|
|
10558
|
-
.regex(createSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneFourMinimumAmountOneRegExp)
|
|
10559
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
10560
|
-
.optional()
|
|
10561
|
-
.describe('The customer is committed to spend at least the amount.'),
|
|
10562
|
-
multiplier: zod.coerce
|
|
10563
|
-
.string()
|
|
10564
|
-
.regex(createSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneFourMultiplierOneRegExp)
|
|
10565
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
10566
|
-
.default(createSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneFourMultiplierDefault)
|
|
10567
|
-
.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'),
|
|
10568
|
-
type: zod
|
|
10569
|
-
.enum(['dynamic'])
|
|
10570
|
-
.describe('The type of the price.'),
|
|
10571
|
-
})
|
|
10572
|
-
.describe('Dynamic price with spend commitments.'),
|
|
10573
|
-
zod
|
|
10574
|
-
.object({
|
|
10575
|
-
amount: zod.coerce
|
|
10576
|
-
.string()
|
|
10577
|
-
.regex(createSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneFiveAmountOneRegExp)
|
|
10578
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
10579
|
-
.describe('The price of one package.'),
|
|
10580
|
-
maximumAmount: zod.coerce
|
|
10581
|
-
.string()
|
|
10582
|
-
.regex(createSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneFiveMaximumAmountOneRegExp)
|
|
10583
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
10584
|
-
.optional()
|
|
10585
|
-
.describe('The customer is limited to spend at most the amount.'),
|
|
10586
|
-
minimumAmount: zod.coerce
|
|
10587
|
-
.string()
|
|
10588
|
-
.regex(createSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneFiveMinimumAmountOneRegExp)
|
|
10589
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
10590
|
-
.optional()
|
|
10591
|
-
.describe('The customer is committed to spend at least the amount.'),
|
|
10592
|
-
quantityPerPackage: zod.coerce
|
|
10593
|
-
.string()
|
|
10594
|
-
.regex(createSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneFiveQuantityPerPackageOneRegExp)
|
|
10595
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
10596
|
-
.describe('The quantity per package.'),
|
|
10597
|
-
type: zod
|
|
10598
|
-
.enum(['package'])
|
|
10599
|
-
.describe('The type of the price.'),
|
|
10600
|
-
})
|
|
10601
|
-
.describe('Package price with spend commitments.'),
|
|
10735
|
+
.describe('Package price with spend commitments.'),
|
|
10736
|
+
])
|
|
10737
|
+
.describe('The price of the usage based rate card.'),
|
|
10738
|
+
zod.null(),
|
|
10602
10739
|
])
|
|
10603
|
-
.describe('The price of the usage based rate card.')
|
|
10604
|
-
.nullable()
|
|
10605
10740
|
.describe('The price of the rate card.\nWhen null, the feature or service is free.'),
|
|
10606
10741
|
taxConfig: zod
|
|
10607
10742
|
.object({
|
|
@@ -10832,6 +10967,7 @@ export const EditSubscriptionBody = zod
|
|
|
10832
10967
|
.describe('You can grant usage automatically alongside the entitlement, the example scenario would be creating a starting balance.\nIf an amount is specified here, a grant will be created alongside the entitlement with the specified amount.\nThat grant will have it\'s rollover settings configured in a way that after each reset operation, the balance will return the original amount specified here.\nManually creating such a grant would mean having the "amount", "minRolloverAmount", and "maxRolloverAmount" fields all be the same.'),
|
|
10833
10968
|
issueAfterResetPriority: zod.coerce
|
|
10834
10969
|
.number()
|
|
10970
|
+
.int()
|
|
10835
10971
|
.min(1)
|
|
10836
10972
|
.max(editSubscriptionBodyCustomizationsItemOneRateCardOneEntitlementTemplateOneOneIssueAfterResetPriorityMax)
|
|
10837
10973
|
.default(editSubscriptionBodyCustomizationsItemOneRateCardOneEntitlementTemplateOneOneIssueAfterResetPriorityDefault)
|
|
@@ -11013,6 +11149,7 @@ export const EditSubscriptionBody = zod
|
|
|
11013
11149
|
.describe('You can grant usage automatically alongside the entitlement, the example scenario would be creating a starting balance.\nIf an amount is specified here, a grant will be created alongside the entitlement with the specified amount.\nThat grant will have it\'s rollover settings configured in a way that after each reset operation, the balance will return the original amount specified here.\nManually creating such a grant would mean having the "amount", "minRolloverAmount", and "maxRolloverAmount" fields all be the same.'),
|
|
11014
11150
|
issueAfterResetPriority: zod.coerce
|
|
11015
11151
|
.number()
|
|
11152
|
+
.int()
|
|
11016
11153
|
.min(1)
|
|
11017
11154
|
.max(editSubscriptionBodyCustomizationsItemOneRateCardTwoEntitlementTemplateOneOneIssueAfterResetPriorityMax)
|
|
11018
11155
|
.default(editSubscriptionBodyCustomizationsItemOneRateCardTwoEntitlementTemplateOneOneIssueAfterResetPriorityDefault)
|
|
@@ -11086,167 +11223,170 @@ export const EditSubscriptionBody = zod
|
|
|
11086
11223
|
price: zod
|
|
11087
11224
|
.union([
|
|
11088
11225
|
zod
|
|
11089
|
-
.
|
|
11090
|
-
|
|
11091
|
-
.string()
|
|
11092
|
-
.regex(editSubscriptionBodyCustomizationsItemOneRateCardTwoPriceOneOneAmountOneRegExp)
|
|
11093
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
11094
|
-
.describe('The amount of the flat price.'),
|
|
11095
|
-
paymentTerm: zod
|
|
11096
|
-
.enum(['in_advance', 'in_arrears'])
|
|
11097
|
-
.describe('The payment term of a flat price.\nOne of: in_advance or in_arrears.')
|
|
11098
|
-
.default(editSubscriptionBodyCustomizationsItemOneRateCardTwoPriceOneOnePaymentTermDefault)
|
|
11099
|
-
.describe('The payment term of the flat price.\nDefaults to in advance.'),
|
|
11100
|
-
type: zod
|
|
11101
|
-
.enum(['flat'])
|
|
11102
|
-
.describe('The type of the price.'),
|
|
11103
|
-
})
|
|
11104
|
-
.describe('Flat price with payment term.'),
|
|
11105
|
-
zod
|
|
11106
|
-
.object({
|
|
11107
|
-
amount: zod.coerce
|
|
11108
|
-
.string()
|
|
11109
|
-
.regex(editSubscriptionBodyCustomizationsItemOneRateCardTwoPriceOneTwoAmountOneRegExp)
|
|
11110
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
11111
|
-
.describe('The amount of the unit price.'),
|
|
11112
|
-
maximumAmount: zod.coerce
|
|
11113
|
-
.string()
|
|
11114
|
-
.regex(editSubscriptionBodyCustomizationsItemOneRateCardTwoPriceOneTwoMaximumAmountOneRegExp)
|
|
11115
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
11116
|
-
.optional()
|
|
11117
|
-
.describe('The customer is limited to spend at most the amount.'),
|
|
11118
|
-
minimumAmount: zod.coerce
|
|
11119
|
-
.string()
|
|
11120
|
-
.regex(editSubscriptionBodyCustomizationsItemOneRateCardTwoPriceOneTwoMinimumAmountOneRegExp)
|
|
11121
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
11122
|
-
.optional()
|
|
11123
|
-
.describe('The customer is committed to spend at least the amount.'),
|
|
11124
|
-
type: zod
|
|
11125
|
-
.enum(['unit'])
|
|
11126
|
-
.describe('The type of the price.'),
|
|
11127
|
-
})
|
|
11128
|
-
.describe('Unit price with spend commitments.'),
|
|
11129
|
-
zod
|
|
11130
|
-
.object({
|
|
11131
|
-
maximumAmount: zod.coerce
|
|
11132
|
-
.string()
|
|
11133
|
-
.regex(editSubscriptionBodyCustomizationsItemOneRateCardTwoPriceOneThreeMaximumAmountOneRegExp)
|
|
11134
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
11135
|
-
.optional()
|
|
11136
|
-
.describe('The customer is limited to spend at most the amount.'),
|
|
11137
|
-
minimumAmount: zod.coerce
|
|
11138
|
-
.string()
|
|
11139
|
-
.regex(editSubscriptionBodyCustomizationsItemOneRateCardTwoPriceOneThreeMinimumAmountOneRegExp)
|
|
11140
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
11141
|
-
.optional()
|
|
11142
|
-
.describe('The customer is committed to spend at least the amount.'),
|
|
11143
|
-
mode: zod
|
|
11144
|
-
.enum(['volume', 'graduated'])
|
|
11145
|
-
.describe('The mode of the tiered price.')
|
|
11146
|
-
.describe('Defines if the tiering mode is volume-based or graduated:\n- In `volume`-based tiering, the maximum quantity within a period determines the per unit price.\n- In `graduated` tiering, pricing can change as the quantity grows.'),
|
|
11147
|
-
tiers: zod
|
|
11148
|
-
.array(zod
|
|
11226
|
+
.union([
|
|
11227
|
+
zod
|
|
11149
11228
|
.object({
|
|
11150
|
-
|
|
11151
|
-
.
|
|
11152
|
-
|
|
11153
|
-
|
|
11154
|
-
|
|
11155
|
-
|
|
11156
|
-
|
|
11157
|
-
|
|
11158
|
-
|
|
11159
|
-
|
|
11160
|
-
|
|
11161
|
-
.
|
|
11162
|
-
.
|
|
11163
|
-
|
|
11164
|
-
|
|
11229
|
+
amount: zod.coerce
|
|
11230
|
+
.string()
|
|
11231
|
+
.regex(editSubscriptionBodyCustomizationsItemOneRateCardTwoPriceOneOneAmountOneRegExp)
|
|
11232
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
11233
|
+
.describe('The amount of the flat price.'),
|
|
11234
|
+
paymentTerm: zod
|
|
11235
|
+
.enum(['in_advance', 'in_arrears'])
|
|
11236
|
+
.describe('The payment term of a flat price.\nOne of: in_advance or in_arrears.')
|
|
11237
|
+
.default(editSubscriptionBodyCustomizationsItemOneRateCardTwoPriceOneOnePaymentTermDefault)
|
|
11238
|
+
.describe('The payment term of the flat price.\nDefaults to in advance.'),
|
|
11239
|
+
type: zod
|
|
11240
|
+
.enum(['flat'])
|
|
11241
|
+
.describe('The type of the price.'),
|
|
11242
|
+
})
|
|
11243
|
+
.describe('Flat price with payment term.'),
|
|
11244
|
+
zod
|
|
11245
|
+
.object({
|
|
11246
|
+
amount: zod.coerce
|
|
11247
|
+
.string()
|
|
11248
|
+
.regex(editSubscriptionBodyCustomizationsItemOneRateCardTwoPriceOneTwoAmountOneRegExp)
|
|
11249
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
11250
|
+
.describe('The amount of the unit price.'),
|
|
11251
|
+
maximumAmount: zod.coerce
|
|
11252
|
+
.string()
|
|
11253
|
+
.regex(editSubscriptionBodyCustomizationsItemOneRateCardTwoPriceOneTwoMaximumAmountOneRegExp)
|
|
11254
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
11255
|
+
.optional()
|
|
11256
|
+
.describe('The customer is limited to spend at most the amount.'),
|
|
11257
|
+
minimumAmount: zod.coerce
|
|
11258
|
+
.string()
|
|
11259
|
+
.regex(editSubscriptionBodyCustomizationsItemOneRateCardTwoPriceOneTwoMinimumAmountOneRegExp)
|
|
11260
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
11261
|
+
.optional()
|
|
11262
|
+
.describe('The customer is committed to spend at least the amount.'),
|
|
11263
|
+
type: zod
|
|
11264
|
+
.enum(['unit'])
|
|
11265
|
+
.describe('The type of the price.'),
|
|
11266
|
+
})
|
|
11267
|
+
.describe('Unit price with spend commitments.'),
|
|
11268
|
+
zod
|
|
11269
|
+
.object({
|
|
11270
|
+
maximumAmount: zod.coerce
|
|
11271
|
+
.string()
|
|
11272
|
+
.regex(editSubscriptionBodyCustomizationsItemOneRateCardTwoPriceOneThreeMaximumAmountOneRegExp)
|
|
11273
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
11274
|
+
.optional()
|
|
11275
|
+
.describe('The customer is limited to spend at most the amount.'),
|
|
11276
|
+
minimumAmount: zod.coerce
|
|
11277
|
+
.string()
|
|
11278
|
+
.regex(editSubscriptionBodyCustomizationsItemOneRateCardTwoPriceOneThreeMinimumAmountOneRegExp)
|
|
11279
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
11280
|
+
.optional()
|
|
11281
|
+
.describe('The customer is committed to spend at least the amount.'),
|
|
11282
|
+
mode: zod
|
|
11283
|
+
.enum(['volume', 'graduated'])
|
|
11284
|
+
.describe('The mode of the tiered price.')
|
|
11285
|
+
.describe('Defines if the tiering mode is volume-based or graduated:\n- In `volume`-based tiering, the maximum quantity within a period determines the per unit price.\n- In `graduated` tiering, pricing can change as the quantity grows.'),
|
|
11286
|
+
tiers: zod
|
|
11287
|
+
.array(zod
|
|
11165
11288
|
.object({
|
|
11166
|
-
|
|
11289
|
+
flatPrice: zod
|
|
11290
|
+
.object({
|
|
11291
|
+
amount: zod.coerce
|
|
11292
|
+
.string()
|
|
11293
|
+
.regex(editSubscriptionBodyCustomizationsItemOneRateCardTwoPriceOneThreeTiersItemFlatPriceOneAmountOneRegExp)
|
|
11294
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
11295
|
+
.describe('The amount of the flat price.'),
|
|
11296
|
+
type: zod
|
|
11297
|
+
.enum(['flat'])
|
|
11298
|
+
.describe('The type of the price.'),
|
|
11299
|
+
})
|
|
11300
|
+
.describe('Flat price.')
|
|
11301
|
+
.nullable()
|
|
11302
|
+
.describe('The flat price component of the tier.'),
|
|
11303
|
+
unitPrice: zod
|
|
11304
|
+
.object({
|
|
11305
|
+
amount: zod.coerce
|
|
11306
|
+
.string()
|
|
11307
|
+
.regex(editSubscriptionBodyCustomizationsItemOneRateCardTwoPriceOneThreeTiersItemUnitPriceOneAmountOneRegExp)
|
|
11308
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
11309
|
+
.describe('The amount of the unit price.'),
|
|
11310
|
+
type: zod
|
|
11311
|
+
.enum(['unit'])
|
|
11312
|
+
.describe('The type of the price.'),
|
|
11313
|
+
})
|
|
11314
|
+
.describe('Unit price.')
|
|
11315
|
+
.nullable()
|
|
11316
|
+
.describe('The unit price component of the tier.'),
|
|
11317
|
+
upToAmount: zod.coerce
|
|
11167
11318
|
.string()
|
|
11168
|
-
.regex(
|
|
11319
|
+
.regex(editSubscriptionBodyCustomizationsItemOneRateCardTwoPriceOneThreeTiersItemUpToAmountOneRegExp)
|
|
11169
11320
|
.describe('Numeric represents an arbitrary precision number.')
|
|
11170
|
-
.
|
|
11171
|
-
|
|
11172
|
-
.enum(['unit'])
|
|
11173
|
-
.describe('The type of the price.'),
|
|
11321
|
+
.optional()
|
|
11322
|
+
.describe('Up to and including to this quantity will be contained in the tier.\nIf null, the tier is open-ended.'),
|
|
11174
11323
|
})
|
|
11175
|
-
.describe('
|
|
11176
|
-
.
|
|
11177
|
-
.describe('The
|
|
11178
|
-
|
|
11324
|
+
.describe('A price tier.\nAt least one price component is required in each tier.'))
|
|
11325
|
+
.min(1)
|
|
11326
|
+
.describe('The tiers of the tiered price.\nAt least one price component is required in each tier.'),
|
|
11327
|
+
type: zod
|
|
11328
|
+
.enum(['tiered'])
|
|
11329
|
+
.describe('The type of the price.\n\nOne of: flat, unit, or tiered.'),
|
|
11330
|
+
})
|
|
11331
|
+
.describe('Tiered price with spend commitments.'),
|
|
11332
|
+
zod
|
|
11333
|
+
.object({
|
|
11334
|
+
maximumAmount: zod.coerce
|
|
11335
|
+
.string()
|
|
11336
|
+
.regex(editSubscriptionBodyCustomizationsItemOneRateCardTwoPriceOneFourMaximumAmountOneRegExp)
|
|
11337
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
11338
|
+
.optional()
|
|
11339
|
+
.describe('The customer is limited to spend at most the amount.'),
|
|
11340
|
+
minimumAmount: zod.coerce
|
|
11341
|
+
.string()
|
|
11342
|
+
.regex(editSubscriptionBodyCustomizationsItemOneRateCardTwoPriceOneFourMinimumAmountOneRegExp)
|
|
11343
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
11344
|
+
.optional()
|
|
11345
|
+
.describe('The customer is committed to spend at least the amount.'),
|
|
11346
|
+
multiplier: zod.coerce
|
|
11347
|
+
.string()
|
|
11348
|
+
.regex(editSubscriptionBodyCustomizationsItemOneRateCardTwoPriceOneFourMultiplierOneRegExp)
|
|
11349
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
11350
|
+
.default(editSubscriptionBodyCustomizationsItemOneRateCardTwoPriceOneFourMultiplierDefault)
|
|
11351
|
+
.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'),
|
|
11352
|
+
type: zod
|
|
11353
|
+
.enum(['dynamic'])
|
|
11354
|
+
.describe('The type of the price.'),
|
|
11355
|
+
})
|
|
11356
|
+
.describe('Dynamic price with spend commitments.'),
|
|
11357
|
+
zod
|
|
11358
|
+
.object({
|
|
11359
|
+
amount: zod.coerce
|
|
11360
|
+
.string()
|
|
11361
|
+
.regex(editSubscriptionBodyCustomizationsItemOneRateCardTwoPriceOneFiveAmountOneRegExp)
|
|
11362
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
11363
|
+
.describe('The price of one package.'),
|
|
11364
|
+
maximumAmount: zod.coerce
|
|
11365
|
+
.string()
|
|
11366
|
+
.regex(editSubscriptionBodyCustomizationsItemOneRateCardTwoPriceOneFiveMaximumAmountOneRegExp)
|
|
11367
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
11368
|
+
.optional()
|
|
11369
|
+
.describe('The customer is limited to spend at most the amount.'),
|
|
11370
|
+
minimumAmount: zod.coerce
|
|
11179
11371
|
.string()
|
|
11180
|
-
.regex(
|
|
11372
|
+
.regex(editSubscriptionBodyCustomizationsItemOneRateCardTwoPriceOneFiveMinimumAmountOneRegExp)
|
|
11181
11373
|
.describe('Numeric represents an arbitrary precision number.')
|
|
11182
11374
|
.optional()
|
|
11183
|
-
.describe('
|
|
11375
|
+
.describe('The customer is committed to spend at least the amount.'),
|
|
11376
|
+
quantityPerPackage: zod.coerce
|
|
11377
|
+
.string()
|
|
11378
|
+
.regex(editSubscriptionBodyCustomizationsItemOneRateCardTwoPriceOneFiveQuantityPerPackageOneRegExp)
|
|
11379
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
11380
|
+
.describe('The quantity per package.'),
|
|
11381
|
+
type: zod
|
|
11382
|
+
.enum(['package'])
|
|
11383
|
+
.describe('The type of the price.'),
|
|
11184
11384
|
})
|
|
11185
|
-
.describe('
|
|
11186
|
-
|
|
11187
|
-
|
|
11188
|
-
|
|
11189
|
-
.enum(['tiered'])
|
|
11190
|
-
.describe('The type of the price.\n\nOne of: flat, unit, or tiered.'),
|
|
11191
|
-
})
|
|
11192
|
-
.describe('Tiered price with spend commitments.'),
|
|
11193
|
-
zod
|
|
11194
|
-
.object({
|
|
11195
|
-
maximumAmount: zod.coerce
|
|
11196
|
-
.string()
|
|
11197
|
-
.regex(editSubscriptionBodyCustomizationsItemOneRateCardTwoPriceOneFourMaximumAmountOneRegExp)
|
|
11198
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
11199
|
-
.optional()
|
|
11200
|
-
.describe('The customer is limited to spend at most the amount.'),
|
|
11201
|
-
minimumAmount: zod.coerce
|
|
11202
|
-
.string()
|
|
11203
|
-
.regex(editSubscriptionBodyCustomizationsItemOneRateCardTwoPriceOneFourMinimumAmountOneRegExp)
|
|
11204
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
11205
|
-
.optional()
|
|
11206
|
-
.describe('The customer is committed to spend at least the amount.'),
|
|
11207
|
-
multiplier: zod.coerce
|
|
11208
|
-
.string()
|
|
11209
|
-
.regex(editSubscriptionBodyCustomizationsItemOneRateCardTwoPriceOneFourMultiplierOneRegExp)
|
|
11210
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
11211
|
-
.default(editSubscriptionBodyCustomizationsItemOneRateCardTwoPriceOneFourMultiplierDefault)
|
|
11212
|
-
.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'),
|
|
11213
|
-
type: zod
|
|
11214
|
-
.enum(['dynamic'])
|
|
11215
|
-
.describe('The type of the price.'),
|
|
11216
|
-
})
|
|
11217
|
-
.describe('Dynamic price with spend commitments.'),
|
|
11218
|
-
zod
|
|
11219
|
-
.object({
|
|
11220
|
-
amount: zod.coerce
|
|
11221
|
-
.string()
|
|
11222
|
-
.regex(editSubscriptionBodyCustomizationsItemOneRateCardTwoPriceOneFiveAmountOneRegExp)
|
|
11223
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
11224
|
-
.describe('The price of one package.'),
|
|
11225
|
-
maximumAmount: zod.coerce
|
|
11226
|
-
.string()
|
|
11227
|
-
.regex(editSubscriptionBodyCustomizationsItemOneRateCardTwoPriceOneFiveMaximumAmountOneRegExp)
|
|
11228
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
11229
|
-
.optional()
|
|
11230
|
-
.describe('The customer is limited to spend at most the amount.'),
|
|
11231
|
-
minimumAmount: zod.coerce
|
|
11232
|
-
.string()
|
|
11233
|
-
.regex(editSubscriptionBodyCustomizationsItemOneRateCardTwoPriceOneFiveMinimumAmountOneRegExp)
|
|
11234
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
11235
|
-
.optional()
|
|
11236
|
-
.describe('The customer is committed to spend at least the amount.'),
|
|
11237
|
-
quantityPerPackage: zod.coerce
|
|
11238
|
-
.string()
|
|
11239
|
-
.regex(editSubscriptionBodyCustomizationsItemOneRateCardTwoPriceOneFiveQuantityPerPackageOneRegExp)
|
|
11240
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
11241
|
-
.describe('The quantity per package.'),
|
|
11242
|
-
type: zod
|
|
11243
|
-
.enum(['package'])
|
|
11244
|
-
.describe('The type of the price.'),
|
|
11245
|
-
})
|
|
11246
|
-
.describe('Package price with spend commitments.'),
|
|
11385
|
+
.describe('Package price with spend commitments.'),
|
|
11386
|
+
])
|
|
11387
|
+
.describe('The price of the usage based rate card.'),
|
|
11388
|
+
zod.null(),
|
|
11247
11389
|
])
|
|
11248
|
-
.describe('The price of the usage based rate card.')
|
|
11249
|
-
.nullable()
|
|
11250
11390
|
.describe('The price of the rate card.\nWhen null, the feature or service is free.'),
|
|
11251
11391
|
taxConfig: zod
|
|
11252
11392
|
.object({
|
|
@@ -11446,6 +11586,7 @@ export const CreateSubscriptionAddonBody = zod
|
|
|
11446
11586
|
.describe('Human-readable name for the resource. Between 1 and 256 characters.'),
|
|
11447
11587
|
quantity: zod.coerce
|
|
11448
11588
|
.number()
|
|
11589
|
+
.int()
|
|
11449
11590
|
.min(createSubscriptionAddonBodyQuantityMin)
|
|
11450
11591
|
.describe('The quantity of the add-on. Always 1 for single instance add-ons.'),
|
|
11451
11592
|
timing: zod
|
|
@@ -11522,6 +11663,7 @@ export const UpdateSubscriptionAddonBody = zod
|
|
|
11522
11663
|
.describe('Human-readable name for the resource. Between 1 and 256 characters.'),
|
|
11523
11664
|
quantity: zod.coerce
|
|
11524
11665
|
.number()
|
|
11666
|
+
.int()
|
|
11525
11667
|
.min(updateSubscriptionAddonBodyQuantityMin)
|
|
11526
11668
|
.optional()
|
|
11527
11669
|
.describe('The quantity of the add-on. Always 1 for single instance add-ons.'),
|
|
@@ -11577,6 +11719,8 @@ export const ChangeSubscriptionParams = zod.object({
|
|
|
11577
11719
|
});
|
|
11578
11720
|
export const changeSubscriptionBodyOnePlanOneKeyMax = 64;
|
|
11579
11721
|
export const changeSubscriptionBodyOnePlanOneKeyRegExp = /^[a-z0-9]+(?:_[a-z0-9]+)*$/;
|
|
11722
|
+
export const changeSubscriptionBodyOneCostBasisModeDefault = 'dynamic';
|
|
11723
|
+
export const changeSubscriptionBodyTwoCostBasisModeDefault = 'dynamic';
|
|
11580
11724
|
export const changeSubscriptionBodyTwoCustomPlanOneOneNameMax = 256;
|
|
11581
11725
|
export const changeSubscriptionBodyTwoCustomPlanOneOneDescriptionMax = 1024;
|
|
11582
11726
|
export const changeSubscriptionBodyTwoCustomPlanOneOneCurrencyOneMin = 3;
|
|
@@ -11660,6 +11804,11 @@ export const ChangeSubscriptionBody = zod
|
|
|
11660
11804
|
.date()
|
|
11661
11805
|
.optional()
|
|
11662
11806
|
.describe('The billing anchor of the subscription. The provided date will be normalized according to the billing cadence to the nearest recurrence before start time. If not provided, the previous subscription billing anchor will be used.'),
|
|
11807
|
+
costBasisMode: zod
|
|
11808
|
+
.enum(['dynamic', 'pinned'])
|
|
11809
|
+
.describe('Controls how custom-currency cost bases are selected for the subscription.')
|
|
11810
|
+
.default(changeSubscriptionBodyOneCostBasisModeDefault)
|
|
11811
|
+
.describe('Controls how custom-currency cost bases are selected for the new subscription.'),
|
|
11663
11812
|
description: zod.coerce
|
|
11664
11813
|
.string()
|
|
11665
11814
|
.optional()
|
|
@@ -11683,6 +11832,7 @@ export const ChangeSubscriptionBody = zod
|
|
|
11683
11832
|
.describe('The plan key.'),
|
|
11684
11833
|
version: zod.coerce
|
|
11685
11834
|
.number()
|
|
11835
|
+
.int()
|
|
11686
11836
|
.optional()
|
|
11687
11837
|
.describe('The plan version.'),
|
|
11688
11838
|
})
|
|
@@ -11717,6 +11867,11 @@ export const ChangeSubscriptionBody = zod
|
|
|
11717
11867
|
.date()
|
|
11718
11868
|
.optional()
|
|
11719
11869
|
.describe('The billing anchor of the subscription. The provided date will be normalized according to the billing cadence to the nearest recurrence before start time. If not provided, the previous subscription billing anchor will be used.'),
|
|
11870
|
+
costBasisMode: zod
|
|
11871
|
+
.enum(['dynamic', 'pinned'])
|
|
11872
|
+
.describe('Controls how custom-currency cost bases are selected for the subscription.')
|
|
11873
|
+
.default(changeSubscriptionBodyTwoCostBasisModeDefault)
|
|
11874
|
+
.describe('Controls how custom-currency cost bases are selected for the new subscription.'),
|
|
11720
11875
|
customPlan: zod
|
|
11721
11876
|
.object({
|
|
11722
11877
|
alignment: zod
|
|
@@ -11839,6 +11994,7 @@ export const ChangeSubscriptionBody = zod
|
|
|
11839
11994
|
.describe('You can grant usage automatically alongside the entitlement, the example scenario would be creating a starting balance.\nIf an amount is specified here, a grant will be created alongside the entitlement with the specified amount.\nThat grant will have it\'s rollover settings configured in a way that after each reset operation, the balance will return the original amount specified here.\nManually creating such a grant would mean having the "amount", "minRolloverAmount", and "maxRolloverAmount" fields all be the same.'),
|
|
11840
11995
|
issueAfterResetPriority: zod.coerce
|
|
11841
11996
|
.number()
|
|
11997
|
+
.int()
|
|
11842
11998
|
.min(1)
|
|
11843
11999
|
.max(changeSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemOneEntitlementTemplateOneOneIssueAfterResetPriorityMax)
|
|
11844
12000
|
.default(changeSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemOneEntitlementTemplateOneOneIssueAfterResetPriorityDefault)
|
|
@@ -12020,6 +12176,7 @@ export const ChangeSubscriptionBody = zod
|
|
|
12020
12176
|
.describe('You can grant usage automatically alongside the entitlement, the example scenario would be creating a starting balance.\nIf an amount is specified here, a grant will be created alongside the entitlement with the specified amount.\nThat grant will have it\'s rollover settings configured in a way that after each reset operation, the balance will return the original amount specified here.\nManually creating such a grant would mean having the "amount", "minRolloverAmount", and "maxRolloverAmount" fields all be the same.'),
|
|
12021
12177
|
issueAfterResetPriority: zod.coerce
|
|
12022
12178
|
.number()
|
|
12179
|
+
.int()
|
|
12023
12180
|
.min(1)
|
|
12024
12181
|
.max(changeSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoEntitlementTemplateOneOneIssueAfterResetPriorityMax)
|
|
12025
12182
|
.default(changeSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoEntitlementTemplateOneOneIssueAfterResetPriorityDefault)
|
|
@@ -12093,167 +12250,173 @@ export const ChangeSubscriptionBody = zod
|
|
|
12093
12250
|
price: zod
|
|
12094
12251
|
.union([
|
|
12095
12252
|
zod
|
|
12096
|
-
.
|
|
12097
|
-
|
|
12098
|
-
.string()
|
|
12099
|
-
.regex(changeSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneOneAmountOneRegExp)
|
|
12100
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
12101
|
-
.describe('The amount of the flat price.'),
|
|
12102
|
-
paymentTerm: zod
|
|
12103
|
-
.enum(['in_advance', 'in_arrears'])
|
|
12104
|
-
.describe('The payment term of a flat price.\nOne of: in_advance or in_arrears.')
|
|
12105
|
-
.default(changeSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneOnePaymentTermDefault)
|
|
12106
|
-
.describe('The payment term of the flat price.\nDefaults to in advance.'),
|
|
12107
|
-
type: zod
|
|
12108
|
-
.enum(['flat'])
|
|
12109
|
-
.describe('The type of the price.'),
|
|
12110
|
-
})
|
|
12111
|
-
.describe('Flat price with payment term.'),
|
|
12112
|
-
zod
|
|
12113
|
-
.object({
|
|
12114
|
-
amount: zod.coerce
|
|
12115
|
-
.string()
|
|
12116
|
-
.regex(changeSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneTwoAmountOneRegExp)
|
|
12117
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
12118
|
-
.describe('The amount of the unit price.'),
|
|
12119
|
-
maximumAmount: zod.coerce
|
|
12120
|
-
.string()
|
|
12121
|
-
.regex(changeSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneTwoMaximumAmountOneRegExp)
|
|
12122
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
12123
|
-
.optional()
|
|
12124
|
-
.describe('The customer is limited to spend at most the amount.'),
|
|
12125
|
-
minimumAmount: zod.coerce
|
|
12126
|
-
.string()
|
|
12127
|
-
.regex(changeSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneTwoMinimumAmountOneRegExp)
|
|
12128
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
12129
|
-
.optional()
|
|
12130
|
-
.describe('The customer is committed to spend at least the amount.'),
|
|
12131
|
-
type: zod
|
|
12132
|
-
.enum(['unit'])
|
|
12133
|
-
.describe('The type of the price.'),
|
|
12134
|
-
})
|
|
12135
|
-
.describe('Unit price with spend commitments.'),
|
|
12136
|
-
zod
|
|
12137
|
-
.object({
|
|
12138
|
-
maximumAmount: zod.coerce
|
|
12139
|
-
.string()
|
|
12140
|
-
.regex(changeSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneThreeMaximumAmountOneRegExp)
|
|
12141
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
12142
|
-
.optional()
|
|
12143
|
-
.describe('The customer is limited to spend at most the amount.'),
|
|
12144
|
-
minimumAmount: zod.coerce
|
|
12145
|
-
.string()
|
|
12146
|
-
.regex(changeSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneThreeMinimumAmountOneRegExp)
|
|
12147
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
12148
|
-
.optional()
|
|
12149
|
-
.describe('The customer is committed to spend at least the amount.'),
|
|
12150
|
-
mode: zod
|
|
12151
|
-
.enum(['volume', 'graduated'])
|
|
12152
|
-
.describe('The mode of the tiered price.')
|
|
12153
|
-
.describe('Defines if the tiering mode is volume-based or graduated:\n- In `volume`-based tiering, the maximum quantity within a period determines the per unit price.\n- In `graduated` tiering, pricing can change as the quantity grows.'),
|
|
12154
|
-
tiers: zod
|
|
12155
|
-
.array(zod
|
|
12253
|
+
.union([
|
|
12254
|
+
zod
|
|
12156
12255
|
.object({
|
|
12157
|
-
|
|
12158
|
-
.
|
|
12159
|
-
|
|
12160
|
-
|
|
12161
|
-
|
|
12162
|
-
|
|
12163
|
-
|
|
12164
|
-
|
|
12165
|
-
|
|
12166
|
-
|
|
12167
|
-
|
|
12168
|
-
.
|
|
12169
|
-
.
|
|
12170
|
-
|
|
12171
|
-
|
|
12256
|
+
amount: zod.coerce
|
|
12257
|
+
.string()
|
|
12258
|
+
.regex(changeSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneOneAmountOneRegExp)
|
|
12259
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
12260
|
+
.describe('The amount of the flat price.'),
|
|
12261
|
+
paymentTerm: zod
|
|
12262
|
+
.enum([
|
|
12263
|
+
'in_advance',
|
|
12264
|
+
'in_arrears',
|
|
12265
|
+
])
|
|
12266
|
+
.describe('The payment term of a flat price.\nOne of: in_advance or in_arrears.')
|
|
12267
|
+
.default(changeSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneOnePaymentTermDefault)
|
|
12268
|
+
.describe('The payment term of the flat price.\nDefaults to in advance.'),
|
|
12269
|
+
type: zod
|
|
12270
|
+
.enum(['flat'])
|
|
12271
|
+
.describe('The type of the price.'),
|
|
12272
|
+
})
|
|
12273
|
+
.describe('Flat price with payment term.'),
|
|
12274
|
+
zod
|
|
12275
|
+
.object({
|
|
12276
|
+
amount: zod.coerce
|
|
12277
|
+
.string()
|
|
12278
|
+
.regex(changeSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneTwoAmountOneRegExp)
|
|
12279
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
12280
|
+
.describe('The amount of the unit price.'),
|
|
12281
|
+
maximumAmount: zod.coerce
|
|
12282
|
+
.string()
|
|
12283
|
+
.regex(changeSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneTwoMaximumAmountOneRegExp)
|
|
12284
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
12285
|
+
.optional()
|
|
12286
|
+
.describe('The customer is limited to spend at most the amount.'),
|
|
12287
|
+
minimumAmount: zod.coerce
|
|
12288
|
+
.string()
|
|
12289
|
+
.regex(changeSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneTwoMinimumAmountOneRegExp)
|
|
12290
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
12291
|
+
.optional()
|
|
12292
|
+
.describe('The customer is committed to spend at least the amount.'),
|
|
12293
|
+
type: zod
|
|
12294
|
+
.enum(['unit'])
|
|
12295
|
+
.describe('The type of the price.'),
|
|
12296
|
+
})
|
|
12297
|
+
.describe('Unit price with spend commitments.'),
|
|
12298
|
+
zod
|
|
12299
|
+
.object({
|
|
12300
|
+
maximumAmount: zod.coerce
|
|
12301
|
+
.string()
|
|
12302
|
+
.regex(changeSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneThreeMaximumAmountOneRegExp)
|
|
12303
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
12304
|
+
.optional()
|
|
12305
|
+
.describe('The customer is limited to spend at most the amount.'),
|
|
12306
|
+
minimumAmount: zod.coerce
|
|
12307
|
+
.string()
|
|
12308
|
+
.regex(changeSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneThreeMinimumAmountOneRegExp)
|
|
12309
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
12310
|
+
.optional()
|
|
12311
|
+
.describe('The customer is committed to spend at least the amount.'),
|
|
12312
|
+
mode: zod
|
|
12313
|
+
.enum(['volume', 'graduated'])
|
|
12314
|
+
.describe('The mode of the tiered price.')
|
|
12315
|
+
.describe('Defines if the tiering mode is volume-based or graduated:\n- In `volume`-based tiering, the maximum quantity within a period determines the per unit price.\n- In `graduated` tiering, pricing can change as the quantity grows.'),
|
|
12316
|
+
tiers: zod
|
|
12317
|
+
.array(zod
|
|
12172
12318
|
.object({
|
|
12173
|
-
|
|
12319
|
+
flatPrice: zod
|
|
12320
|
+
.object({
|
|
12321
|
+
amount: zod.coerce
|
|
12322
|
+
.string()
|
|
12323
|
+
.regex(changeSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneThreeTiersItemFlatPriceOneAmountOneRegExp)
|
|
12324
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
12325
|
+
.describe('The amount of the flat price.'),
|
|
12326
|
+
type: zod
|
|
12327
|
+
.enum(['flat'])
|
|
12328
|
+
.describe('The type of the price.'),
|
|
12329
|
+
})
|
|
12330
|
+
.describe('Flat price.')
|
|
12331
|
+
.nullable()
|
|
12332
|
+
.describe('The flat price component of the tier.'),
|
|
12333
|
+
unitPrice: zod
|
|
12334
|
+
.object({
|
|
12335
|
+
amount: zod.coerce
|
|
12336
|
+
.string()
|
|
12337
|
+
.regex(changeSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneThreeTiersItemUnitPriceOneAmountOneRegExp)
|
|
12338
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
12339
|
+
.describe('The amount of the unit price.'),
|
|
12340
|
+
type: zod
|
|
12341
|
+
.enum(['unit'])
|
|
12342
|
+
.describe('The type of the price.'),
|
|
12343
|
+
})
|
|
12344
|
+
.describe('Unit price.')
|
|
12345
|
+
.nullable()
|
|
12346
|
+
.describe('The unit price component of the tier.'),
|
|
12347
|
+
upToAmount: zod.coerce
|
|
12174
12348
|
.string()
|
|
12175
|
-
.regex(
|
|
12349
|
+
.regex(changeSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneThreeTiersItemUpToAmountOneRegExp)
|
|
12176
12350
|
.describe('Numeric represents an arbitrary precision number.')
|
|
12177
|
-
.
|
|
12178
|
-
|
|
12179
|
-
.enum(['unit'])
|
|
12180
|
-
.describe('The type of the price.'),
|
|
12351
|
+
.optional()
|
|
12352
|
+
.describe('Up to and including to this quantity will be contained in the tier.\nIf null, the tier is open-ended.'),
|
|
12181
12353
|
})
|
|
12182
|
-
.describe('
|
|
12183
|
-
.
|
|
12184
|
-
.describe('The
|
|
12185
|
-
|
|
12354
|
+
.describe('A price tier.\nAt least one price component is required in each tier.'))
|
|
12355
|
+
.min(1)
|
|
12356
|
+
.describe('The tiers of the tiered price.\nAt least one price component is required in each tier.'),
|
|
12357
|
+
type: zod
|
|
12358
|
+
.enum(['tiered'])
|
|
12359
|
+
.describe('The type of the price.\n\nOne of: flat, unit, or tiered.'),
|
|
12360
|
+
})
|
|
12361
|
+
.describe('Tiered price with spend commitments.'),
|
|
12362
|
+
zod
|
|
12363
|
+
.object({
|
|
12364
|
+
maximumAmount: zod.coerce
|
|
12186
12365
|
.string()
|
|
12187
|
-
.regex(
|
|
12366
|
+
.regex(changeSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneFourMaximumAmountOneRegExp)
|
|
12188
12367
|
.describe('Numeric represents an arbitrary precision number.')
|
|
12189
12368
|
.optional()
|
|
12190
|
-
.describe('
|
|
12369
|
+
.describe('The customer is limited to spend at most the amount.'),
|
|
12370
|
+
minimumAmount: zod.coerce
|
|
12371
|
+
.string()
|
|
12372
|
+
.regex(changeSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneFourMinimumAmountOneRegExp)
|
|
12373
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
12374
|
+
.optional()
|
|
12375
|
+
.describe('The customer is committed to spend at least the amount.'),
|
|
12376
|
+
multiplier: zod.coerce
|
|
12377
|
+
.string()
|
|
12378
|
+
.regex(changeSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneFourMultiplierOneRegExp)
|
|
12379
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
12380
|
+
.default(changeSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneFourMultiplierDefault)
|
|
12381
|
+
.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'),
|
|
12382
|
+
type: zod
|
|
12383
|
+
.enum(['dynamic'])
|
|
12384
|
+
.describe('The type of the price.'),
|
|
12191
12385
|
})
|
|
12192
|
-
.describe('
|
|
12193
|
-
|
|
12194
|
-
.
|
|
12195
|
-
|
|
12196
|
-
|
|
12197
|
-
|
|
12198
|
-
|
|
12199
|
-
|
|
12200
|
-
|
|
12201
|
-
|
|
12202
|
-
|
|
12203
|
-
|
|
12204
|
-
|
|
12205
|
-
|
|
12206
|
-
.
|
|
12207
|
-
|
|
12208
|
-
|
|
12209
|
-
|
|
12210
|
-
|
|
12211
|
-
|
|
12212
|
-
.
|
|
12213
|
-
|
|
12214
|
-
|
|
12215
|
-
|
|
12216
|
-
|
|
12217
|
-
|
|
12218
|
-
|
|
12219
|
-
|
|
12220
|
-
|
|
12221
|
-
.
|
|
12222
|
-
|
|
12223
|
-
|
|
12224
|
-
|
|
12225
|
-
zod
|
|
12226
|
-
.object({
|
|
12227
|
-
amount: zod.coerce
|
|
12228
|
-
.string()
|
|
12229
|
-
.regex(changeSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneFiveAmountOneRegExp)
|
|
12230
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
12231
|
-
.describe('The price of one package.'),
|
|
12232
|
-
maximumAmount: zod.coerce
|
|
12233
|
-
.string()
|
|
12234
|
-
.regex(changeSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneFiveMaximumAmountOneRegExp)
|
|
12235
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
12236
|
-
.optional()
|
|
12237
|
-
.describe('The customer is limited to spend at most the amount.'),
|
|
12238
|
-
minimumAmount: zod.coerce
|
|
12239
|
-
.string()
|
|
12240
|
-
.regex(changeSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneFiveMinimumAmountOneRegExp)
|
|
12241
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
12242
|
-
.optional()
|
|
12243
|
-
.describe('The customer is committed to spend at least the amount.'),
|
|
12244
|
-
quantityPerPackage: zod.coerce
|
|
12245
|
-
.string()
|
|
12246
|
-
.regex(changeSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneFiveQuantityPerPackageOneRegExp)
|
|
12247
|
-
.describe('Numeric represents an arbitrary precision number.')
|
|
12248
|
-
.describe('The quantity per package.'),
|
|
12249
|
-
type: zod
|
|
12250
|
-
.enum(['package'])
|
|
12251
|
-
.describe('The type of the price.'),
|
|
12252
|
-
})
|
|
12253
|
-
.describe('Package price with spend commitments.'),
|
|
12386
|
+
.describe('Dynamic price with spend commitments.'),
|
|
12387
|
+
zod
|
|
12388
|
+
.object({
|
|
12389
|
+
amount: zod.coerce
|
|
12390
|
+
.string()
|
|
12391
|
+
.regex(changeSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneFiveAmountOneRegExp)
|
|
12392
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
12393
|
+
.describe('The price of one package.'),
|
|
12394
|
+
maximumAmount: zod.coerce
|
|
12395
|
+
.string()
|
|
12396
|
+
.regex(changeSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneFiveMaximumAmountOneRegExp)
|
|
12397
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
12398
|
+
.optional()
|
|
12399
|
+
.describe('The customer is limited to spend at most the amount.'),
|
|
12400
|
+
minimumAmount: zod.coerce
|
|
12401
|
+
.string()
|
|
12402
|
+
.regex(changeSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneFiveMinimumAmountOneRegExp)
|
|
12403
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
12404
|
+
.optional()
|
|
12405
|
+
.describe('The customer is committed to spend at least the amount.'),
|
|
12406
|
+
quantityPerPackage: zod.coerce
|
|
12407
|
+
.string()
|
|
12408
|
+
.regex(changeSubscriptionBodyTwoCustomPlanOneOnePhasesItemRateCardsItemTwoPriceOneFiveQuantityPerPackageOneRegExp)
|
|
12409
|
+
.describe('Numeric represents an arbitrary precision number.')
|
|
12410
|
+
.describe('The quantity per package.'),
|
|
12411
|
+
type: zod
|
|
12412
|
+
.enum(['package'])
|
|
12413
|
+
.describe('The type of the price.'),
|
|
12414
|
+
})
|
|
12415
|
+
.describe('Package price with spend commitments.'),
|
|
12416
|
+
])
|
|
12417
|
+
.describe('The price of the usage based rate card.'),
|
|
12418
|
+
zod.null(),
|
|
12254
12419
|
])
|
|
12255
|
-
.describe('The price of the usage based rate card.')
|
|
12256
|
-
.nullable()
|
|
12257
12420
|
.describe('The price of the rate card.\nWhen null, the feature or service is free.'),
|
|
12258
12421
|
taxConfig: zod
|
|
12259
12422
|
.object({
|
|
@@ -12342,9 +12505,17 @@ export const ChangeSubscriptionBody = zod
|
|
|
12342
12505
|
])
|
|
12343
12506
|
.describe('Change a subscription.');
|
|
12344
12507
|
/**
|
|
12345
|
-
* Migrates
|
|
12346
|
-
* If
|
|
12347
|
-
*
|
|
12508
|
+
* Migrates a running subscription to a later version of its current plan.
|
|
12509
|
+
* If startingPhase is omitted and billingAnchor is omitted or unchanged, the subscription is amended in place.
|
|
12510
|
+
* Unchanged items retain their service periods. Changed or removed items end at
|
|
12511
|
+
* the effective time; replacements and additions start from that time.
|
|
12512
|
+
* For in-place migrations, existing addons must be compatible with the target plan version.
|
|
12513
|
+
* The phase timeline, billing anchor, and subscription-level billing settings
|
|
12514
|
+
* are preserved. Both response entries refer to the same subscription:
|
|
12515
|
+
* current is the before snapshot and next is the amended view.
|
|
12516
|
+
* Providing startingPhase or a different billingAnchor uses subscription change: the current subscription
|
|
12517
|
+
* ends and a replacement starts at the effective time. This resets the phase timeline
|
|
12518
|
+
* and can produce billing adjustments. Addons are not transferred to the replacement.
|
|
12348
12519
|
* @summary Migrate subscription
|
|
12349
12520
|
*/
|
|
12350
12521
|
export const migrateSubscriptionPathSubscriptionIdRegExp = /^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/;
|
|
@@ -12358,17 +12529,18 @@ export const MigrateSubscriptionBody = zod.object({
|
|
|
12358
12529
|
billingAnchor: zod.coerce
|
|
12359
12530
|
.date()
|
|
12360
12531
|
.optional()
|
|
12361
|
-
.describe(
|
|
12532
|
+
.describe("The anchor used with the plan's billing cadence to calculate billing periods.\nIf startingPhase is omitted and this anchor is omitted or equal to the existing one, migration preserves the current subscription.\nProviding a different anchor ends the current subscription and creates a replacement.\nThe supplied anchor is preserved; it may be before or after the replacement's start time."),
|
|
12362
12533
|
startingPhase: zod.coerce
|
|
12363
12534
|
.string()
|
|
12364
12535
|
.min(1)
|
|
12365
12536
|
.optional()
|
|
12366
|
-
.describe('
|
|
12537
|
+
.describe('Explicitly replace the subscription, starting in this target plan phase.\nProviding this field always selects replacement, even if the phase matches the current one.\nReplacement may produce billing adjustments and does not transfer addons.\nOmit it to migrate in place; incompatible phase timelines then return an error.'),
|
|
12367
12538
|
targetVersion: zod.coerce
|
|
12368
12539
|
.number()
|
|
12540
|
+
.int()
|
|
12369
12541
|
.min(1)
|
|
12370
12542
|
.optional()
|
|
12371
|
-
.describe('
|
|
12543
|
+
.describe('A strictly later version of the current plan to migrate to.\nIf not provided, the subscription will migrate to the latest version of the current plan.'),
|
|
12372
12544
|
timing: zod
|
|
12373
12545
|
.union([
|
|
12374
12546
|
zod
|
|
@@ -12380,7 +12552,7 @@ export const MigrateSubscriptionBody = zod.object({
|
|
|
12380
12552
|
])
|
|
12381
12553
|
.describe('Subscription edit timing defined when the changes should take effect.\nIf the provided configuration is not supported by the subscription, an error will be returned.')
|
|
12382
12554
|
.default(migrateSubscriptionBodyTimingDefault)
|
|
12383
|
-
.describe('
|
|
12555
|
+
.describe('When the migration takes effect: immediately, at the next billing cycle, or at an explicit billing-aligned timestamp.\nIn-place migrations may be scheduled into a later phase when the current and target phase timelines match.\nThe target plan reference is saved immediately; changed items take effect at the requested time.\nPast or unsupported times return an error.'),
|
|
12384
12556
|
});
|
|
12385
12557
|
/**
|
|
12386
12558
|
* Restores a canceled subscription.
|
|
@@ -12491,6 +12663,7 @@ export const CreateCustomerEntitlementV2Body = zod
|
|
|
12491
12663
|
.object({
|
|
12492
12664
|
count: zod.coerce
|
|
12493
12665
|
.number()
|
|
12666
|
+
.int()
|
|
12494
12667
|
.min(1)
|
|
12495
12668
|
.max(createCustomerEntitlementV2BodyOneGrantsItemExpirationOneCountMax)
|
|
12496
12669
|
.describe('The number of time units in the expiration period.'),
|
|
@@ -12517,6 +12690,7 @@ export const CreateCustomerEntitlementV2Body = zod
|
|
|
12517
12690
|
.describe('Grants are rolled over at reset, after which they can have a different balance compared to what they had before the reset.\nBalance after the reset is calculated as: Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset, MinRolloverAmount))'),
|
|
12518
12691
|
priority: zod.coerce
|
|
12519
12692
|
.number()
|
|
12693
|
+
.int()
|
|
12520
12694
|
.min(1)
|
|
12521
12695
|
.max(createCustomerEntitlementV2BodyOneGrantsItemPriorityMax)
|
|
12522
12696
|
.optional()
|
|
@@ -12558,6 +12732,7 @@ export const CreateCustomerEntitlementV2Body = zod
|
|
|
12558
12732
|
.describe('The initial grant amount'),
|
|
12559
12733
|
priority: zod.coerce
|
|
12560
12734
|
.number()
|
|
12735
|
+
.int()
|
|
12561
12736
|
.min(1)
|
|
12562
12737
|
.max(createCustomerEntitlementV2BodyOneIssueOnePriorityMax)
|
|
12563
12738
|
.default(createCustomerEntitlementV2BodyOneIssueOnePriorityDefault)
|
|
@@ -12573,6 +12748,7 @@ export const CreateCustomerEntitlementV2Body = zod
|
|
|
12573
12748
|
.describe('You can grant usage automatically alongside the entitlement, the example scenario would be creating a starting balance.\nIf an amount is specified here, a grant will be created alongside the entitlement with the specified amount.\nThat grant will have it\'s rollover settings configured in a way that after each reset operation, the balance will return the original amount specified here.\nManually creating such a grant would mean having the "amount", "minRolloverAmount", and "maxRolloverAmount" fields all be the same.'),
|
|
12574
12749
|
issueAfterResetPriority: zod.coerce
|
|
12575
12750
|
.number()
|
|
12751
|
+
.int()
|
|
12576
12752
|
.min(1)
|
|
12577
12753
|
.max(createCustomerEntitlementV2BodyOneIssueAfterResetPriorityMax)
|
|
12578
12754
|
.default(createCustomerEntitlementV2BodyOneIssueAfterResetPriorityDefault)
|
|
@@ -12580,7 +12756,10 @@ export const CreateCustomerEntitlementV2Body = zod
|
|
|
12580
12756
|
measureUsageFrom: zod
|
|
12581
12757
|
.union([
|
|
12582
12758
|
zod
|
|
12583
|
-
.enum(
|
|
12759
|
+
.enum({
|
|
12760
|
+
CurrentPeriodStart: 'CURRENT_PERIOD_START',
|
|
12761
|
+
Now: 'NOW',
|
|
12762
|
+
})
|
|
12584
12763
|
.describe('Start of measurement options'),
|
|
12585
12764
|
zod.coerce
|
|
12586
12765
|
.date()
|
|
@@ -12751,11 +12930,13 @@ export const ListCustomerEntitlementsV2QueryParams = zod.object({
|
|
|
12751
12930
|
.describe('The order by field.'),
|
|
12752
12931
|
page: zod.coerce
|
|
12753
12932
|
.number()
|
|
12933
|
+
.int()
|
|
12754
12934
|
.min(1)
|
|
12755
12935
|
.default(listCustomerEntitlementsV2QueryPageDefault)
|
|
12756
12936
|
.describe('Page index.\n\nDefault is 1.'),
|
|
12757
12937
|
pageSize: zod.coerce
|
|
12758
12938
|
.number()
|
|
12939
|
+
.int()
|
|
12759
12940
|
.min(1)
|
|
12760
12941
|
.max(listCustomerEntitlementsV2QueryPageSizeMax)
|
|
12761
12942
|
.default(listCustomerEntitlementsV2QueryPageSizeDefault)
|
|
@@ -12856,12 +13037,14 @@ export const ListCustomerEntitlementGrantsV2QueryParams = zod.object({
|
|
|
12856
13037
|
.default(listCustomerEntitlementGrantsV2QueryIncludeDeletedDefault),
|
|
12857
13038
|
limit: zod.coerce
|
|
12858
13039
|
.number()
|
|
13040
|
+
.int()
|
|
12859
13041
|
.min(1)
|
|
12860
13042
|
.max(listCustomerEntitlementGrantsV2QueryLimitMax)
|
|
12861
13043
|
.default(listCustomerEntitlementGrantsV2QueryLimitDefault)
|
|
12862
13044
|
.describe('Number of items to return.\n\nDefault is 100.'),
|
|
12863
13045
|
offset: zod.coerce
|
|
12864
13046
|
.number()
|
|
13047
|
+
.int()
|
|
12865
13048
|
.min(listCustomerEntitlementGrantsV2QueryOffsetMin)
|
|
12866
13049
|
.default(listCustomerEntitlementGrantsV2QueryOffsetDefault)
|
|
12867
13050
|
.describe('Number of items to skip.\n\nDefault is 0.'),
|
|
@@ -12876,11 +13059,13 @@ export const ListCustomerEntitlementGrantsV2QueryParams = zod.object({
|
|
|
12876
13059
|
.describe('The order by field.'),
|
|
12877
13060
|
page: zod.coerce
|
|
12878
13061
|
.number()
|
|
13062
|
+
.int()
|
|
12879
13063
|
.min(1)
|
|
12880
13064
|
.default(listCustomerEntitlementGrantsV2QueryPageDefault)
|
|
12881
13065
|
.describe('Page index.\n\nDefault is 1.'),
|
|
12882
13066
|
pageSize: zod.coerce
|
|
12883
13067
|
.number()
|
|
13068
|
+
.int()
|
|
12884
13069
|
.min(1)
|
|
12885
13070
|
.max(listCustomerEntitlementGrantsV2QueryPageSizeMax)
|
|
12886
13071
|
.default(listCustomerEntitlementGrantsV2QueryPageSizeDefault)
|
|
@@ -12945,6 +13130,7 @@ export const CreateCustomerEntitlementGrantV2Body = zod
|
|
|
12945
13130
|
.object({
|
|
12946
13131
|
count: zod.coerce
|
|
12947
13132
|
.number()
|
|
13133
|
+
.int()
|
|
12948
13134
|
.min(1)
|
|
12949
13135
|
.max(createCustomerEntitlementGrantV2BodyExpirationOneCountMax)
|
|
12950
13136
|
.describe('The number of time units in the expiration period.'),
|
|
@@ -12971,6 +13157,7 @@ export const CreateCustomerEntitlementGrantV2Body = zod
|
|
|
12971
13157
|
.describe('Grants are rolled over at reset, after which they can have a different balance compared to what they had before the reset.\nBalance after the reset is calculated as: Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset, MinRolloverAmount))'),
|
|
12972
13158
|
priority: zod.coerce
|
|
12973
13159
|
.number()
|
|
13160
|
+
.int()
|
|
12974
13161
|
.min(1)
|
|
12975
13162
|
.max(createCustomerEntitlementGrantV2BodyPriorityMax)
|
|
12976
13163
|
.optional()
|
|
@@ -13039,7 +13226,12 @@ export const GetCustomerEntitlementHistoryV2QueryParams = zod.object({
|
|
|
13039
13226
|
.optional()
|
|
13040
13227
|
.describe('End of time range to query entitlement: date-time in RFC 3339 format. Defaults to now.\nIf not now then gets truncated to the granularity of the underlying meter.'),
|
|
13041
13228
|
windowSize: zod
|
|
13042
|
-
.enum(
|
|
13229
|
+
.enum({
|
|
13230
|
+
Day: 'DAY',
|
|
13231
|
+
Hour: 'HOUR',
|
|
13232
|
+
Minute: 'MINUTE',
|
|
13233
|
+
Month: 'MONTH',
|
|
13234
|
+
})
|
|
13043
13235
|
.describe('Windowsize'),
|
|
13044
13236
|
windowTimeZone: zod.coerce
|
|
13045
13237
|
.string()
|
|
@@ -13140,6 +13332,7 @@ export const OverrideCustomerEntitlementV2Body = zod
|
|
|
13140
13332
|
.object({
|
|
13141
13333
|
count: zod.coerce
|
|
13142
13334
|
.number()
|
|
13335
|
+
.int()
|
|
13143
13336
|
.min(1)
|
|
13144
13337
|
.max(overrideCustomerEntitlementV2BodyOneGrantsItemExpirationOneCountMax)
|
|
13145
13338
|
.describe('The number of time units in the expiration period.'),
|
|
@@ -13166,6 +13359,7 @@ export const OverrideCustomerEntitlementV2Body = zod
|
|
|
13166
13359
|
.describe('Grants are rolled over at reset, after which they can have a different balance compared to what they had before the reset.\nBalance after the reset is calculated as: Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset, MinRolloverAmount))'),
|
|
13167
13360
|
priority: zod.coerce
|
|
13168
13361
|
.number()
|
|
13362
|
+
.int()
|
|
13169
13363
|
.min(1)
|
|
13170
13364
|
.max(overrideCustomerEntitlementV2BodyOneGrantsItemPriorityMax)
|
|
13171
13365
|
.optional()
|
|
@@ -13207,6 +13401,7 @@ export const OverrideCustomerEntitlementV2Body = zod
|
|
|
13207
13401
|
.describe('The initial grant amount'),
|
|
13208
13402
|
priority: zod.coerce
|
|
13209
13403
|
.number()
|
|
13404
|
+
.int()
|
|
13210
13405
|
.min(1)
|
|
13211
13406
|
.max(overrideCustomerEntitlementV2BodyOneIssueOnePriorityMax)
|
|
13212
13407
|
.default(overrideCustomerEntitlementV2BodyOneIssueOnePriorityDefault)
|
|
@@ -13222,6 +13417,7 @@ export const OverrideCustomerEntitlementV2Body = zod
|
|
|
13222
13417
|
.describe('You can grant usage automatically alongside the entitlement, the example scenario would be creating a starting balance.\nIf an amount is specified here, a grant will be created alongside the entitlement with the specified amount.\nThat grant will have it\'s rollover settings configured in a way that after each reset operation, the balance will return the original amount specified here.\nManually creating such a grant would mean having the "amount", "minRolloverAmount", and "maxRolloverAmount" fields all be the same.'),
|
|
13223
13418
|
issueAfterResetPriority: zod.coerce
|
|
13224
13419
|
.number()
|
|
13420
|
+
.int()
|
|
13225
13421
|
.min(1)
|
|
13226
13422
|
.max(overrideCustomerEntitlementV2BodyOneIssueAfterResetPriorityMax)
|
|
13227
13423
|
.default(overrideCustomerEntitlementV2BodyOneIssueAfterResetPriorityDefault)
|
|
@@ -13229,7 +13425,10 @@ export const OverrideCustomerEntitlementV2Body = zod
|
|
|
13229
13425
|
measureUsageFrom: zod
|
|
13230
13426
|
.union([
|
|
13231
13427
|
zod
|
|
13232
|
-
.enum(
|
|
13428
|
+
.enum({
|
|
13429
|
+
CurrentPeriodStart: 'CURRENT_PERIOD_START',
|
|
13430
|
+
Now: 'NOW',
|
|
13431
|
+
})
|
|
13233
13432
|
.describe('Start of measurement options'),
|
|
13234
13433
|
zod.coerce
|
|
13235
13434
|
.date()
|
|
@@ -13473,12 +13672,14 @@ export const ListEntitlementsV2QueryParams = zod.object({
|
|
|
13473
13672
|
.describe('Filtering by multiple features.\n\nUsage: `?feature=feature-1&feature=feature-2`'),
|
|
13474
13673
|
limit: zod.coerce
|
|
13475
13674
|
.number()
|
|
13675
|
+
.int()
|
|
13476
13676
|
.min(1)
|
|
13477
13677
|
.max(listEntitlementsV2QueryLimitMax)
|
|
13478
13678
|
.default(listEntitlementsV2QueryLimitDefault)
|
|
13479
13679
|
.describe('Number of items to return.\n\nDefault is 100.'),
|
|
13480
13680
|
offset: zod.coerce
|
|
13481
13681
|
.number()
|
|
13682
|
+
.int()
|
|
13482
13683
|
.min(listEntitlementsV2QueryOffsetMin)
|
|
13483
13684
|
.default(listEntitlementsV2QueryOffsetDefault)
|
|
13484
13685
|
.describe('Number of items to skip.\n\nDefault is 0.'),
|
|
@@ -13493,11 +13694,13 @@ export const ListEntitlementsV2QueryParams = zod.object({
|
|
|
13493
13694
|
.describe('The order by field.'),
|
|
13494
13695
|
page: zod.coerce
|
|
13495
13696
|
.number()
|
|
13697
|
+
.int()
|
|
13496
13698
|
.min(1)
|
|
13497
13699
|
.default(listEntitlementsV2QueryPageDefault)
|
|
13498
13700
|
.describe('Page index.\n\nDefault is 1.'),
|
|
13499
13701
|
pageSize: zod.coerce
|
|
13500
13702
|
.number()
|
|
13703
|
+
.int()
|
|
13501
13704
|
.min(1)
|
|
13502
13705
|
.max(listEntitlementsV2QueryPageSizeMax)
|
|
13503
13706
|
.default(listEntitlementsV2QueryPageSizeDefault)
|
|
@@ -13533,6 +13736,7 @@ export const ListEventsV2QueryParams = zod.object({
|
|
|
13533
13736
|
.describe('The cursor after which to start the pagination.'),
|
|
13534
13737
|
limit: zod.coerce
|
|
13535
13738
|
.number()
|
|
13739
|
+
.int()
|
|
13536
13740
|
.min(1)
|
|
13537
13741
|
.max(listEventsV2QueryLimitMax)
|
|
13538
13742
|
.default(listEventsV2QueryLimitDefault)
|
|
@@ -13582,12 +13786,14 @@ export const ListGrantsV2QueryParams = zod.object({
|
|
|
13582
13786
|
.describe('Include deleted'),
|
|
13583
13787
|
limit: zod.coerce
|
|
13584
13788
|
.number()
|
|
13789
|
+
.int()
|
|
13585
13790
|
.min(1)
|
|
13586
13791
|
.max(listGrantsV2QueryLimitMax)
|
|
13587
13792
|
.default(listGrantsV2QueryLimitDefault)
|
|
13588
13793
|
.describe('Number of items to return.\n\nDefault is 100.'),
|
|
13589
13794
|
offset: zod.coerce
|
|
13590
13795
|
.number()
|
|
13796
|
+
.int()
|
|
13591
13797
|
.min(listGrantsV2QueryOffsetMin)
|
|
13592
13798
|
.default(listGrantsV2QueryOffsetDefault)
|
|
13593
13799
|
.describe('Number of items to skip.\n\nDefault is 0.'),
|
|
@@ -13602,11 +13808,13 @@ export const ListGrantsV2QueryParams = zod.object({
|
|
|
13602
13808
|
.describe('The order by field.'),
|
|
13603
13809
|
page: zod.coerce
|
|
13604
13810
|
.number()
|
|
13811
|
+
.int()
|
|
13605
13812
|
.min(1)
|
|
13606
13813
|
.default(listGrantsV2QueryPageDefault)
|
|
13607
13814
|
.describe('Page index.\n\nDefault is 1.'),
|
|
13608
13815
|
pageSize: zod.coerce
|
|
13609
13816
|
.number()
|
|
13817
|
+
.int()
|
|
13610
13818
|
.min(1)
|
|
13611
13819
|
.max(listGrantsV2QueryPageSizeMax)
|
|
13612
13820
|
.default(listGrantsV2QueryPageSizeDefault)
|