chargebee 3.28.1 → 3.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +140 -0
- package/cjs/chargebee.cjs.js +1 -1
- package/cjs/environment.js +1 -1
- package/cjs/resources/api_endpoints.js +126 -0
- package/cjs/resources/webhook/eventType.js +5 -0
- package/cjs/schema/alert.schema.js +11 -5
- package/cjs/schema/coupon.schema.js +1 -1
- package/cjs/schema/credit_note.schema.js +13 -0
- package/cjs/schema/credit_unit.schema.js +38 -0
- package/cjs/schema/customer.schema.js +39 -0
- package/cjs/schema/entitlement.schema.js +4 -4
- package/cjs/schema/estimate.schema.js +18 -0
- package/cjs/schema/event.schema.js +20 -0
- package/cjs/schema/export.schema.js +33 -1
- package/cjs/schema/feature.schema.js +0 -1
- package/cjs/schema/gift.schema.js +14 -0
- package/cjs/schema/grant_block.schema.js +4 -0
- package/cjs/schema/index.js +1 -0
- package/cjs/schema/invoice.schema.js +63 -3
- package/cjs/schema/ledger_operation.schema.js +14 -4
- package/cjs/schema/meter.schema.js +10 -0
- package/cjs/schema/omnichannel_subscription.schema.js +2 -2
- package/cjs/schema/payment_intent.schema.js +14 -0
- package/cjs/schema/payment_source.schema.js +49 -0
- package/cjs/schema/purchase.schema.js +7 -0
- package/cjs/schema/ramp.schema.js +4 -2
- package/cjs/schema/recorded_purchase.schema.js +3 -0
- package/cjs/schema/subscription.schema.js +94 -0
- package/cjs/schema/transaction.schema.js +32 -0
- package/cjs/schema/webhook_endpoint.schema.js +10 -0
- package/cjs/telemetry/TelemetryAdapter.js +12 -7
- package/esm/environment.js +1 -1
- package/esm/resources/api_endpoints.js +126 -0
- package/esm/resources/webhook/eventType.js +5 -0
- package/esm/schema/alert.schema.js +11 -5
- package/esm/schema/coupon.schema.js +1 -1
- package/esm/schema/credit_note.schema.js +13 -0
- package/esm/schema/credit_unit.schema.js +35 -0
- package/esm/schema/customer.schema.js +39 -0
- package/esm/schema/entitlement.schema.js +4 -4
- package/esm/schema/estimate.schema.js +18 -0
- package/esm/schema/event.schema.js +20 -0
- package/esm/schema/export.schema.js +33 -1
- package/esm/schema/feature.schema.js +0 -1
- package/esm/schema/gift.schema.js +14 -0
- package/esm/schema/grant_block.schema.js +4 -0
- package/esm/schema/index.js +1 -0
- package/esm/schema/invoice.schema.js +63 -3
- package/esm/schema/ledger_operation.schema.js +13 -3
- package/esm/schema/meter.schema.js +10 -0
- package/esm/schema/omnichannel_subscription.schema.js +2 -2
- package/esm/schema/payment_intent.schema.js +14 -0
- package/esm/schema/payment_source.schema.js +49 -0
- package/esm/schema/purchase.schema.js +7 -0
- package/esm/schema/ramp.schema.js +4 -2
- package/esm/schema/recorded_purchase.schema.js +3 -0
- package/esm/schema/subscription.schema.js +94 -0
- package/esm/schema/transaction.schema.js +32 -0
- package/esm/schema/webhook_endpoint.schema.js +10 -0
- package/esm/telemetry/TelemetryAdapter.js +12 -7
- package/package.json +1 -1
- package/types/core.d.ts +65 -6
- package/types/index.d.ts +15 -8
- package/types/resources/Alert.d.ts +18 -3
- package/types/resources/AsyncResponse.d.ts +35 -0
- package/types/resources/AsyncResponseList.d.ts +8 -0
- package/types/resources/AttachedItem.d.ts +2 -2
- package/types/resources/ColumnDefinition.d.ts +9 -0
- package/types/resources/Content.d.ts +7 -0
- package/types/resources/CreditNote.d.ts +15 -0
- package/types/resources/CreditNoteEstimate.d.ts +5 -0
- package/types/resources/CreditUnit.d.ts +90 -0
- package/types/resources/Customer.d.ts +16 -2
- package/types/resources/Estimate.d.ts +20 -2
- package/types/resources/Event.d.ts +5 -0
- package/types/resources/Export.d.ts +1 -0
- package/types/resources/Feature.d.ts +2 -0
- package/types/resources/Gift.d.ts +16 -2
- package/types/resources/GrantBlock.d.ts +12 -6
- package/types/resources/Invoice.d.ts +41 -3
- package/types/resources/InvoiceEstimate.d.ts +5 -0
- package/types/resources/LedgerAccountBalance.d.ts +3 -1
- package/types/resources/LedgerEntry.d.ts +22 -0
- package/types/resources/LedgerOperation.d.ts +34 -9
- package/types/resources/Meter.d.ts +42 -0
- package/types/resources/MeteredFeature.d.ts +70 -0
- package/types/resources/PaymentIntent.d.ts +57 -5
- package/types/resources/PaymentSource.d.ts +8 -1
- package/types/resources/PromotionalGrant.d.ts +1 -1
- package/types/resources/Purchase.d.ts +8 -1
- package/types/resources/Quote.d.ts +5 -0
- package/types/resources/QuoteLineGroup.d.ts +5 -0
- package/types/resources/QuotedCharge.d.ts +3 -0
- package/types/resources/Ramp.d.ts +4 -1
- package/types/resources/RecordedPurchase.d.ts +3 -0
- package/types/resources/Subscription.d.ts +58 -7
- package/types/resources/WebhookEvent.d.ts +33 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// Generated Zod schemas: CreditUnit
|
|
2
|
+
// Actions: list, create, update
|
|
3
|
+
// Do not edit manually – regenerate via sdk-generator
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
//CreditUnit.list
|
|
6
|
+
const ListCreditUnitStatusSchema = z.object({
|
|
7
|
+
in: z.enum(['active', 'archived']).optional(),
|
|
8
|
+
is: z.enum(['active', 'archived']).optional(),
|
|
9
|
+
});
|
|
10
|
+
const ListCreditUnitIdSchema = z.object({
|
|
11
|
+
in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
|
|
12
|
+
is: z.string().min(1).optional(),
|
|
13
|
+
});
|
|
14
|
+
const ListCreditUnitBodySchema = z.looseObject({
|
|
15
|
+
limit: z.number().int().min(1).max(100).optional(),
|
|
16
|
+
offset: z.string().max(1000).optional(),
|
|
17
|
+
status: ListCreditUnitStatusSchema.optional(),
|
|
18
|
+
id: ListCreditUnitIdSchema.optional(),
|
|
19
|
+
});
|
|
20
|
+
export { ListCreditUnitBodySchema };
|
|
21
|
+
//CreditUnit.create
|
|
22
|
+
const CreateCreditUnitBodySchema = z.looseObject({
|
|
23
|
+
id: z.string().max(50),
|
|
24
|
+
name: z.string().max(50),
|
|
25
|
+
is_unlimited: z.boolean(),
|
|
26
|
+
overdraft_amount: z.string().max(50).optional(),
|
|
27
|
+
external_name: z.string().max(50).optional(),
|
|
28
|
+
});
|
|
29
|
+
export { CreateCreditUnitBodySchema };
|
|
30
|
+
//CreditUnit.update
|
|
31
|
+
const UpdateCreditUnitBodySchema = z.looseObject({
|
|
32
|
+
name: z.string().max(50).optional(),
|
|
33
|
+
external_name: z.string().max(50).optional(),
|
|
34
|
+
});
|
|
35
|
+
export { UpdateCreditUnitBodySchema };
|
|
@@ -162,6 +162,13 @@ const CreateCustomerPaymentMethodSchema = z.object({
|
|
|
162
162
|
'paypay',
|
|
163
163
|
'gcash',
|
|
164
164
|
'south_korean_cards',
|
|
165
|
+
'paynow',
|
|
166
|
+
'bizum',
|
|
167
|
+
'promptpay',
|
|
168
|
+
'dana',
|
|
169
|
+
'touch_n_go',
|
|
170
|
+
'tamara',
|
|
171
|
+
'qpay',
|
|
165
172
|
])
|
|
166
173
|
.optional(),
|
|
167
174
|
gateway: z
|
|
@@ -284,6 +291,13 @@ const CreateCustomerPaymentIntentSchema = z.object({
|
|
|
284
291
|
'paypay',
|
|
285
292
|
'gcash',
|
|
286
293
|
'south_korean_cards',
|
|
294
|
+
'paynow',
|
|
295
|
+
'bizum',
|
|
296
|
+
'promptpay',
|
|
297
|
+
'dana',
|
|
298
|
+
'touch_n_go',
|
|
299
|
+
'tamara',
|
|
300
|
+
'qpay',
|
|
287
301
|
])
|
|
288
302
|
.optional(),
|
|
289
303
|
reference_id: z.string().max(65000).optional(),
|
|
@@ -703,6 +717,13 @@ const UpdatePaymentMethodCustomerPaymentMethodSchema = z.object({
|
|
|
703
717
|
'paypay',
|
|
704
718
|
'gcash',
|
|
705
719
|
'south_korean_cards',
|
|
720
|
+
'paynow',
|
|
721
|
+
'bizum',
|
|
722
|
+
'promptpay',
|
|
723
|
+
'dana',
|
|
724
|
+
'touch_n_go',
|
|
725
|
+
'tamara',
|
|
726
|
+
'qpay',
|
|
706
727
|
]),
|
|
707
728
|
gateway: z
|
|
708
729
|
.enum([
|
|
@@ -923,6 +944,10 @@ const RecordExcessPaymentCustomerTransactionSchema = z.object({
|
|
|
923
944
|
'app_store',
|
|
924
945
|
'play_store',
|
|
925
946
|
'custom',
|
|
947
|
+
'dana',
|
|
948
|
+
'touch_n_go',
|
|
949
|
+
'tamara',
|
|
950
|
+
'qpay',
|
|
926
951
|
]),
|
|
927
952
|
reference_number: z.string().max(100).optional(),
|
|
928
953
|
custom_payment_method_id: z.string().max(50).optional(),
|
|
@@ -984,6 +1009,13 @@ const CollectPaymentCustomerPaymentMethodSchema = z.object({
|
|
|
984
1009
|
'paypay',
|
|
985
1010
|
'gcash',
|
|
986
1011
|
'south_korean_cards',
|
|
1012
|
+
'paynow',
|
|
1013
|
+
'bizum',
|
|
1014
|
+
'promptpay',
|
|
1015
|
+
'dana',
|
|
1016
|
+
'touch_n_go',
|
|
1017
|
+
'tamara',
|
|
1018
|
+
'qpay',
|
|
987
1019
|
])
|
|
988
1020
|
.optional(),
|
|
989
1021
|
gateway_account_id: z.string().max(50).optional(),
|
|
@@ -1062,6 +1094,13 @@ const CollectPaymentCustomerPaymentIntentSchema = z.object({
|
|
|
1062
1094
|
'paypay',
|
|
1063
1095
|
'gcash',
|
|
1064
1096
|
'south_korean_cards',
|
|
1097
|
+
'paynow',
|
|
1098
|
+
'bizum',
|
|
1099
|
+
'promptpay',
|
|
1100
|
+
'dana',
|
|
1101
|
+
'touch_n_go',
|
|
1102
|
+
'tamara',
|
|
1103
|
+
'qpay',
|
|
1065
1104
|
])
|
|
1066
1105
|
.optional(),
|
|
1067
1106
|
gw_payment_method_id: z.string().max(65000).optional(),
|
|
@@ -4,20 +4,20 @@
|
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
//Entitlement.list
|
|
6
6
|
const ListEntitlementFeatureIdSchema = z.object({
|
|
7
|
-
is: z.string().min(1).optional(),
|
|
8
7
|
in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
|
|
8
|
+
is: z.string().min(1).optional(),
|
|
9
9
|
});
|
|
10
10
|
const ListEntitlementEntityTypeSchema = z.object({
|
|
11
|
-
|
|
11
|
+
in: z
|
|
12
12
|
.enum(['plan', 'addon', 'charge', 'plan_price', 'addon_price'])
|
|
13
13
|
.optional(),
|
|
14
|
-
|
|
14
|
+
is: z
|
|
15
15
|
.enum(['plan', 'addon', 'charge', 'plan_price', 'addon_price'])
|
|
16
16
|
.optional(),
|
|
17
17
|
});
|
|
18
18
|
const ListEntitlementEntityIdSchema = z.object({
|
|
19
|
-
is: z.string().min(1).optional(),
|
|
20
19
|
in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
|
|
20
|
+
is: z.string().min(1).optional(),
|
|
21
21
|
});
|
|
22
22
|
const ListEntitlementBodySchema = z.looseObject({
|
|
23
23
|
limit: z.number().int().min(1).max(100).optional(),
|
|
@@ -1050,6 +1050,7 @@ const CancelSubscriptionForItemsEstimateBodySchema = z.looseObject({
|
|
|
1050
1050
|
])
|
|
1051
1051
|
.optional(),
|
|
1052
1052
|
invoice_date: z.number().int().optional(),
|
|
1053
|
+
include_cancellation_day_in_billing: z.boolean().optional(),
|
|
1053
1054
|
cancel_reason_code: z.string().max(100).optional(),
|
|
1054
1055
|
subscription_items: CancelSubscriptionForItemsEstimateSubscriptionItemsSchema.optional(),
|
|
1055
1056
|
});
|
|
@@ -1151,6 +1152,13 @@ const GiftSubscriptionEstimatePaymentIntentSchema = z.object({
|
|
|
1151
1152
|
'paypay',
|
|
1152
1153
|
'gcash',
|
|
1153
1154
|
'south_korean_cards',
|
|
1155
|
+
'paynow',
|
|
1156
|
+
'bizum',
|
|
1157
|
+
'promptpay',
|
|
1158
|
+
'dana',
|
|
1159
|
+
'touch_n_go',
|
|
1160
|
+
'tamara',
|
|
1161
|
+
'qpay',
|
|
1154
1162
|
])
|
|
1155
1163
|
.optional(),
|
|
1156
1164
|
reference_id: z.string().max(65000).optional(),
|
|
@@ -1267,6 +1275,13 @@ const GiftSubscriptionForItemsEstimatePaymentIntentSchema = z.object({
|
|
|
1267
1275
|
'paypay',
|
|
1268
1276
|
'gcash',
|
|
1269
1277
|
'south_korean_cards',
|
|
1278
|
+
'paynow',
|
|
1279
|
+
'bizum',
|
|
1280
|
+
'promptpay',
|
|
1281
|
+
'dana',
|
|
1282
|
+
'touch_n_go',
|
|
1283
|
+
'tamara',
|
|
1284
|
+
'qpay',
|
|
1270
1285
|
])
|
|
1271
1286
|
.optional(),
|
|
1272
1287
|
reference_id: z.string().max(65000).optional(),
|
|
@@ -1443,6 +1458,8 @@ const CreateInvoiceForItemsEstimateItemPricesSchema = z.object({
|
|
|
1443
1458
|
unit_price_in_decimal: z.array(z.string().max(39).optional()).optional(),
|
|
1444
1459
|
date_from: z.array(z.number().int().optional()).optional(),
|
|
1445
1460
|
date_to: z.array(z.number().int().optional()).optional(),
|
|
1461
|
+
description: z.array(z.string().max(250).optional()).optional(),
|
|
1462
|
+
entity_description: z.array(z.string().max(500).optional()).optional(),
|
|
1446
1463
|
});
|
|
1447
1464
|
const CreateInvoiceForItemsEstimateItemTiersSchema = z.object({
|
|
1448
1465
|
item_price_id: z.array(z.string().max(100).optional()).optional(),
|
|
@@ -1473,6 +1490,7 @@ const CreateInvoiceForItemsEstimateChargesSchema = z.object({
|
|
|
1473
1490
|
avalara_service_type: z.array(z.number().int().optional()).optional(),
|
|
1474
1491
|
date_from: z.array(z.number().int().optional()).optional(),
|
|
1475
1492
|
date_to: z.array(z.number().int().optional()).optional(),
|
|
1493
|
+
entity_description: z.array(z.string().max(500).optional()).optional(),
|
|
1476
1494
|
});
|
|
1477
1495
|
const CreateInvoiceForItemsEstimateNotesToRemoveSchema = z.object({
|
|
1478
1496
|
entity_type: z
|
|
@@ -228,6 +228,7 @@ const ListEventEventTypeSchema = z.object({
|
|
|
228
228
|
'business_entity_deleted',
|
|
229
229
|
'customer_business_entity_changed',
|
|
230
230
|
'subscription_business_entity_changed',
|
|
231
|
+
'payment_source_business_entity_changed',
|
|
231
232
|
'purchase_created',
|
|
232
233
|
'voucher_created',
|
|
233
234
|
'voucher_expired',
|
|
@@ -289,6 +290,10 @@ const ListEventEventTypeSchema = z.object({
|
|
|
289
290
|
'alert_status_changed',
|
|
290
291
|
'omnichannel_subscription_item_updated',
|
|
291
292
|
'omnichannel_subscription_item_recovered',
|
|
293
|
+
'ledger_account_balance_updated',
|
|
294
|
+
'grant_blocks_created',
|
|
295
|
+
'grant_blocks_updated',
|
|
296
|
+
'ledger_updated',
|
|
292
297
|
])
|
|
293
298
|
.optional(),
|
|
294
299
|
is_not: z
|
|
@@ -454,6 +459,7 @@ const ListEventEventTypeSchema = z.object({
|
|
|
454
459
|
'business_entity_deleted',
|
|
455
460
|
'customer_business_entity_changed',
|
|
456
461
|
'subscription_business_entity_changed',
|
|
462
|
+
'payment_source_business_entity_changed',
|
|
457
463
|
'purchase_created',
|
|
458
464
|
'voucher_created',
|
|
459
465
|
'voucher_expired',
|
|
@@ -515,6 +521,10 @@ const ListEventEventTypeSchema = z.object({
|
|
|
515
521
|
'alert_status_changed',
|
|
516
522
|
'omnichannel_subscription_item_updated',
|
|
517
523
|
'omnichannel_subscription_item_recovered',
|
|
524
|
+
'ledger_account_balance_updated',
|
|
525
|
+
'grant_blocks_created',
|
|
526
|
+
'grant_blocks_updated',
|
|
527
|
+
'ledger_updated',
|
|
518
528
|
])
|
|
519
529
|
.optional(),
|
|
520
530
|
in: z
|
|
@@ -680,6 +690,7 @@ const ListEventEventTypeSchema = z.object({
|
|
|
680
690
|
'business_entity_deleted',
|
|
681
691
|
'customer_business_entity_changed',
|
|
682
692
|
'subscription_business_entity_changed',
|
|
693
|
+
'payment_source_business_entity_changed',
|
|
683
694
|
'purchase_created',
|
|
684
695
|
'voucher_created',
|
|
685
696
|
'voucher_expired',
|
|
@@ -741,6 +752,10 @@ const ListEventEventTypeSchema = z.object({
|
|
|
741
752
|
'alert_status_changed',
|
|
742
753
|
'omnichannel_subscription_item_updated',
|
|
743
754
|
'omnichannel_subscription_item_recovered',
|
|
755
|
+
'ledger_account_balance_updated',
|
|
756
|
+
'grant_blocks_created',
|
|
757
|
+
'grant_blocks_updated',
|
|
758
|
+
'ledger_updated',
|
|
744
759
|
])
|
|
745
760
|
.optional(),
|
|
746
761
|
not_in: z
|
|
@@ -906,6 +921,7 @@ const ListEventEventTypeSchema = z.object({
|
|
|
906
921
|
'business_entity_deleted',
|
|
907
922
|
'customer_business_entity_changed',
|
|
908
923
|
'subscription_business_entity_changed',
|
|
924
|
+
'payment_source_business_entity_changed',
|
|
909
925
|
'purchase_created',
|
|
910
926
|
'voucher_created',
|
|
911
927
|
'voucher_expired',
|
|
@@ -967,6 +983,10 @@ const ListEventEventTypeSchema = z.object({
|
|
|
967
983
|
'alert_status_changed',
|
|
968
984
|
'omnichannel_subscription_item_updated',
|
|
969
985
|
'omnichannel_subscription_item_recovered',
|
|
986
|
+
'ledger_account_balance_updated',
|
|
987
|
+
'grant_blocks_created',
|
|
988
|
+
'grant_blocks_updated',
|
|
989
|
+
'ledger_updated',
|
|
970
990
|
])
|
|
971
991
|
.optional(),
|
|
972
992
|
});
|
|
@@ -1099,8 +1099,8 @@ const CouponsExportCurrencyCodeSchema = z.object({
|
|
|
1099
1099
|
not_in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
|
|
1100
1100
|
});
|
|
1101
1101
|
const CouponsExportApplicableItemPriceIdsSchema = z.object({
|
|
1102
|
-
is: z.string().min(1).optional(),
|
|
1103
1102
|
in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
|
|
1103
|
+
is: z.string().min(1).optional(),
|
|
1104
1104
|
});
|
|
1105
1105
|
const CouponsExportIdSchema = z.object({
|
|
1106
1106
|
is: z.string().min(1).optional(),
|
|
@@ -1640,6 +1640,9 @@ const SubscriptionsExportChannelSchema = z.object({
|
|
|
1640
1640
|
in: z.enum(['web', 'app_store', 'play_store']).optional(),
|
|
1641
1641
|
not_in: z.enum(['web', 'app_store', 'play_store']).optional(),
|
|
1642
1642
|
});
|
|
1643
|
+
const SubscriptionsExportDecommissionedSchema = z.object({
|
|
1644
|
+
is: z.enum(['true', 'false']).optional(),
|
|
1645
|
+
});
|
|
1643
1646
|
const SubscriptionsExportPlanIdSchema = z.object({
|
|
1644
1647
|
is: z.string().min(1).optional(),
|
|
1645
1648
|
is_not: z.string().min(1).optional(),
|
|
@@ -1662,6 +1665,7 @@ const SubscriptionsExportSubscriptionItemSchema = z.object({
|
|
|
1662
1665
|
offline_payment_method: SubscriptionsExportOfflinePaymentMethodSchema.optional(),
|
|
1663
1666
|
auto_close_invoices: SubscriptionsExportAutoCloseInvoicesSchema.optional(),
|
|
1664
1667
|
channel: SubscriptionsExportChannelSchema.optional(),
|
|
1668
|
+
decommissioned: SubscriptionsExportDecommissionedSchema.optional(),
|
|
1665
1669
|
plan_id: SubscriptionsExportPlanIdSchema.optional(),
|
|
1666
1670
|
});
|
|
1667
1671
|
const SubscriptionsExportBodySchema = z.looseObject({
|
|
@@ -2125,6 +2129,13 @@ const TransactionsExportPaymentMethodSchema = z.object({
|
|
|
2125
2129
|
'paypay',
|
|
2126
2130
|
'gcash',
|
|
2127
2131
|
'south_korean_cards',
|
|
2132
|
+
'paynow',
|
|
2133
|
+
'bizum',
|
|
2134
|
+
'promptpay',
|
|
2135
|
+
'dana',
|
|
2136
|
+
'touch_n_go',
|
|
2137
|
+
'tamara',
|
|
2138
|
+
'qpay',
|
|
2128
2139
|
])
|
|
2129
2140
|
.optional(),
|
|
2130
2141
|
is_not: z
|
|
@@ -2186,6 +2197,13 @@ const TransactionsExportPaymentMethodSchema = z.object({
|
|
|
2186
2197
|
'paypay',
|
|
2187
2198
|
'gcash',
|
|
2188
2199
|
'south_korean_cards',
|
|
2200
|
+
'paynow',
|
|
2201
|
+
'bizum',
|
|
2202
|
+
'promptpay',
|
|
2203
|
+
'dana',
|
|
2204
|
+
'touch_n_go',
|
|
2205
|
+
'tamara',
|
|
2206
|
+
'qpay',
|
|
2189
2207
|
])
|
|
2190
2208
|
.optional(),
|
|
2191
2209
|
in: z
|
|
@@ -2247,6 +2265,13 @@ const TransactionsExportPaymentMethodSchema = z.object({
|
|
|
2247
2265
|
'paypay',
|
|
2248
2266
|
'gcash',
|
|
2249
2267
|
'south_korean_cards',
|
|
2268
|
+
'paynow',
|
|
2269
|
+
'bizum',
|
|
2270
|
+
'promptpay',
|
|
2271
|
+
'dana',
|
|
2272
|
+
'touch_n_go',
|
|
2273
|
+
'tamara',
|
|
2274
|
+
'qpay',
|
|
2250
2275
|
])
|
|
2251
2276
|
.optional(),
|
|
2252
2277
|
not_in: z
|
|
@@ -2308,6 +2333,13 @@ const TransactionsExportPaymentMethodSchema = z.object({
|
|
|
2308
2333
|
'paypay',
|
|
2309
2334
|
'gcash',
|
|
2310
2335
|
'south_korean_cards',
|
|
2336
|
+
'paynow',
|
|
2337
|
+
'bizum',
|
|
2338
|
+
'promptpay',
|
|
2339
|
+
'dana',
|
|
2340
|
+
'touch_n_go',
|
|
2341
|
+
'tamara',
|
|
2342
|
+
'qpay',
|
|
2311
2343
|
])
|
|
2312
2344
|
.optional(),
|
|
2313
2345
|
});
|
|
@@ -55,7 +55,6 @@ const CreateFeatureBodySchema = z.looseObject({
|
|
|
55
55
|
description: z.string().max(500).optional(),
|
|
56
56
|
type: z.enum(['switch', 'custom', 'quantity', 'range']).optional(),
|
|
57
57
|
unit: z.string().max(50).optional(),
|
|
58
|
-
metered: z.boolean().optional(),
|
|
59
58
|
levels: CreateFeatureLevelsSchema.optional(),
|
|
60
59
|
});
|
|
61
60
|
export { CreateFeatureBodySchema };
|
|
@@ -67,6 +67,13 @@ const CreateGiftPaymentIntentSchema = z.object({
|
|
|
67
67
|
'paypay',
|
|
68
68
|
'gcash',
|
|
69
69
|
'south_korean_cards',
|
|
70
|
+
'paynow',
|
|
71
|
+
'bizum',
|
|
72
|
+
'promptpay',
|
|
73
|
+
'dana',
|
|
74
|
+
'touch_n_go',
|
|
75
|
+
'tamara',
|
|
76
|
+
'qpay',
|
|
70
77
|
])
|
|
71
78
|
.optional(),
|
|
72
79
|
reference_id: z.string().max(65000).optional(),
|
|
@@ -181,6 +188,13 @@ const CreateForItemsGiftPaymentIntentSchema = z.object({
|
|
|
181
188
|
'paypay',
|
|
182
189
|
'gcash',
|
|
183
190
|
'south_korean_cards',
|
|
191
|
+
'paynow',
|
|
192
|
+
'bizum',
|
|
193
|
+
'promptpay',
|
|
194
|
+
'dana',
|
|
195
|
+
'touch_n_go',
|
|
196
|
+
'tamara',
|
|
197
|
+
'qpay',
|
|
184
198
|
])
|
|
185
199
|
.optional(),
|
|
186
200
|
reference_id: z.string().max(65000).optional(),
|
|
@@ -9,6 +9,9 @@ const ListGrantBlocksGrantBlockSubscriptionIdSchema = z.object({
|
|
|
9
9
|
const ListGrantBlocksGrantBlockUnitIdSchema = z.object({
|
|
10
10
|
is: z.string().min(1).optional(),
|
|
11
11
|
});
|
|
12
|
+
const ListGrantBlocksGrantBlockAccountTypeSchema = z.object({
|
|
13
|
+
is: z.enum(['provisioned', 'overdraft']).optional(),
|
|
14
|
+
});
|
|
12
15
|
const ListGrantBlocksGrantBlockEffectiveFromSchema = z.object({
|
|
13
16
|
after: z.string().regex(RegExp('^\\d{10}$')).optional(),
|
|
14
17
|
before: z.string().regex(RegExp('^\\d{10}$')).optional(),
|
|
@@ -36,6 +39,7 @@ const ListGrantBlocksGrantBlockBodySchema = z.looseObject({
|
|
|
36
39
|
offset: z.string().max(1000).optional(),
|
|
37
40
|
subscription_id: ListGrantBlocksGrantBlockSubscriptionIdSchema,
|
|
38
41
|
unit_id: ListGrantBlocksGrantBlockUnitIdSchema.optional(),
|
|
42
|
+
account_type: ListGrantBlocksGrantBlockAccountTypeSchema.optional(),
|
|
39
43
|
effective_from: ListGrantBlocksGrantBlockEffectiveFromSchema.optional(),
|
|
40
44
|
expires_at: ListGrantBlocksGrantBlockExpiresAtSchema.optional(),
|
|
41
45
|
created_at: ListGrantBlocksGrantBlockCreatedAtSchema.optional(),
|
package/esm/schema/index.js
CHANGED
|
@@ -11,6 +11,7 @@ export * from './coupon.schema.js';
|
|
|
11
11
|
export * from './coupon_code.schema.js';
|
|
12
12
|
export * from './coupon_set.schema.js';
|
|
13
13
|
export * from './credit_note.schema.js';
|
|
14
|
+
export * from './credit_unit.schema.js';
|
|
14
15
|
export * from './currency.schema.js';
|
|
15
16
|
export * from './customer.schema.js';
|
|
16
17
|
export * from './customer_entitlement.schema.js';
|
|
@@ -182,6 +182,13 @@ const CreateInvoicePaymentMethodSchema = z.object({
|
|
|
182
182
|
'paypay',
|
|
183
183
|
'gcash',
|
|
184
184
|
'south_korean_cards',
|
|
185
|
+
'paynow',
|
|
186
|
+
'bizum',
|
|
187
|
+
'promptpay',
|
|
188
|
+
'dana',
|
|
189
|
+
'touch_n_go',
|
|
190
|
+
'tamara',
|
|
191
|
+
'qpay',
|
|
185
192
|
])
|
|
186
193
|
.optional(),
|
|
187
194
|
gateway: z
|
|
@@ -304,6 +311,13 @@ const CreateInvoicePaymentIntentSchema = z.object({
|
|
|
304
311
|
'paypay',
|
|
305
312
|
'gcash',
|
|
306
313
|
'south_korean_cards',
|
|
314
|
+
'paynow',
|
|
315
|
+
'bizum',
|
|
316
|
+
'promptpay',
|
|
317
|
+
'dana',
|
|
318
|
+
'touch_n_go',
|
|
319
|
+
'tamara',
|
|
320
|
+
'qpay',
|
|
307
321
|
])
|
|
308
322
|
.optional(),
|
|
309
323
|
reference_id: z.string().max(65000).optional(),
|
|
@@ -558,6 +572,13 @@ const CreateForChargeItemsAndChargesInvoicePaymentMethodSchema = z.object({
|
|
|
558
572
|
'paypay',
|
|
559
573
|
'gcash',
|
|
560
574
|
'south_korean_cards',
|
|
575
|
+
'paynow',
|
|
576
|
+
'bizum',
|
|
577
|
+
'promptpay',
|
|
578
|
+
'dana',
|
|
579
|
+
'touch_n_go',
|
|
580
|
+
'tamara',
|
|
581
|
+
'qpay',
|
|
561
582
|
])
|
|
562
583
|
.optional(),
|
|
563
584
|
gateway: z
|
|
@@ -680,6 +701,13 @@ const CreateForChargeItemsAndChargesInvoicePaymentIntentSchema = z.object({
|
|
|
680
701
|
'paypay',
|
|
681
702
|
'gcash',
|
|
682
703
|
'south_korean_cards',
|
|
704
|
+
'paynow',
|
|
705
|
+
'bizum',
|
|
706
|
+
'promptpay',
|
|
707
|
+
'dana',
|
|
708
|
+
'touch_n_go',
|
|
709
|
+
'tamara',
|
|
710
|
+
'qpay',
|
|
683
711
|
])
|
|
684
712
|
.optional(),
|
|
685
713
|
reference_id: z.string().max(65000).optional(),
|
|
@@ -694,6 +722,8 @@ const CreateForChargeItemsAndChargesInvoiceItemPricesSchema = z.object({
|
|
|
694
722
|
unit_price_in_decimal: z.array(z.string().max(39).optional()).optional(),
|
|
695
723
|
date_from: z.array(z.number().int().optional()).optional(),
|
|
696
724
|
date_to: z.array(z.number().int().optional()).optional(),
|
|
725
|
+
description: z.array(z.string().max(250).optional()).optional(),
|
|
726
|
+
entity_description: z.array(z.string().max(500).optional()).optional(),
|
|
697
727
|
});
|
|
698
728
|
const CreateForChargeItemsAndChargesInvoiceItemTiersSchema = z.object({
|
|
699
729
|
item_price_id: z.array(z.string().max(100).optional()).optional(),
|
|
@@ -709,6 +739,7 @@ const CreateForChargeItemsAndChargesInvoiceItemTiersSchema = z.object({
|
|
|
709
739
|
package_size: z.array(z.number().int().min(1).optional()).optional(),
|
|
710
740
|
});
|
|
711
741
|
const CreateForChargeItemsAndChargesInvoiceChargesSchema = z.object({
|
|
742
|
+
entity_description: z.array(z.string().max(500).optional()).optional(),
|
|
712
743
|
amount: z.array(z.number().int().min(1).optional()).optional(),
|
|
713
744
|
amount_in_decimal: z.array(z.string().max(39).optional()).optional(),
|
|
714
745
|
description: z.array(z.string().max(250).optional()).optional(),
|
|
@@ -766,6 +797,7 @@ const CreateForChargeItemsAndChargesInvoiceBodySchema = z.looseObject({
|
|
|
766
797
|
auto_collection: z.enum(['on', 'off']).optional(),
|
|
767
798
|
net_term_days: z.number().int().optional(),
|
|
768
799
|
invoice_date: z.number().int().optional(),
|
|
800
|
+
create_pending_invoice: z.boolean().optional(),
|
|
769
801
|
token_id: z.string().max(40).optional(),
|
|
770
802
|
replace_primary_payment_source: z.boolean().default(false).optional(),
|
|
771
803
|
retain_payment_source: z.boolean().default(true).optional(),
|
|
@@ -980,6 +1012,11 @@ const ImportInvoiceInvoiceLineItemsSchema = z.object({
|
|
|
980
1012
|
tax9_amount: z.array(z.number().int().min(0).optional()).optional(),
|
|
981
1013
|
tax10_name: z.array(z.string().max(50).optional()).optional(),
|
|
982
1014
|
tax10_amount: z.array(z.number().int().min(0).optional()).optional(),
|
|
1015
|
+
proration_mode: z
|
|
1016
|
+
.array(z
|
|
1017
|
+
.enum(['reset', 'delta', 'service_period_revision', 'adjusted_term'])
|
|
1018
|
+
.optional())
|
|
1019
|
+
.optional(),
|
|
983
1020
|
created_at: z.array(z.number().int().optional()).optional(),
|
|
984
1021
|
});
|
|
985
1022
|
const ImportInvoiceInvoicePaymentReferenceNumbersSchema = z.object({
|
|
@@ -1047,6 +1084,10 @@ const ImportInvoiceInvoicePaymentsSchema = z.object({
|
|
|
1047
1084
|
'app_store',
|
|
1048
1085
|
'play_store',
|
|
1049
1086
|
'custom',
|
|
1087
|
+
'dana',
|
|
1088
|
+
'touch_n_go',
|
|
1089
|
+
'tamara',
|
|
1090
|
+
'qpay',
|
|
1050
1091
|
])
|
|
1051
1092
|
.optional()),
|
|
1052
1093
|
date: z.array(z.number().int().optional()).optional(),
|
|
@@ -1097,7 +1138,17 @@ const ImportInvoiceInvoiceBodySchema = z.looseObject({
|
|
|
1097
1138
|
po_number: z.string().max(100).optional(),
|
|
1098
1139
|
price_type: z.enum(['tax_exclusive', 'tax_inclusive']).optional(),
|
|
1099
1140
|
tax_override_reason: z
|
|
1100
|
-
.enum([
|
|
1141
|
+
.enum([
|
|
1142
|
+
'zero_rated',
|
|
1143
|
+
'id_exempt',
|
|
1144
|
+
'customer_exempt',
|
|
1145
|
+
'region_non_taxable',
|
|
1146
|
+
'product_exempt',
|
|
1147
|
+
'export',
|
|
1148
|
+
'high_value_physical_goods',
|
|
1149
|
+
'zero_value_item',
|
|
1150
|
+
'tax_not_configured_external_provider',
|
|
1151
|
+
])
|
|
1101
1152
|
.optional(),
|
|
1102
1153
|
vat_number: z.string().max(20).optional(),
|
|
1103
1154
|
vat_number_prefix: z.string().max(10).optional(),
|
|
@@ -1116,6 +1167,7 @@ const ImportInvoiceInvoiceBodySchema = z.looseObject({
|
|
|
1116
1167
|
net_term_days: z.number().int().optional(),
|
|
1117
1168
|
has_advance_charges: z.boolean().default(false).optional(),
|
|
1118
1169
|
use_for_proration: z.boolean().default(false).optional(),
|
|
1170
|
+
paid_at: z.number().int().optional(),
|
|
1119
1171
|
credit_note: ImportInvoiceInvoiceCreditNoteSchema.optional(),
|
|
1120
1172
|
billing_address: ImportInvoiceInvoiceBillingAddressSchema.optional(),
|
|
1121
1173
|
shipping_address: ImportInvoiceInvoiceShippingAddressSchema.optional(),
|
|
@@ -1369,12 +1421,12 @@ const PdfInvoiceBodySchema = z.looseObject({
|
|
|
1369
1421
|
export { PdfInvoiceBodySchema };
|
|
1370
1422
|
//Invoice.listPaymentReferenceNumbers
|
|
1371
1423
|
const ListPaymentReferenceNumbersInvoiceIdSchema = z.object({
|
|
1372
|
-
is: z.string().min(1).optional(),
|
|
1373
1424
|
in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
|
|
1425
|
+
is: z.string().min(1).optional(),
|
|
1374
1426
|
});
|
|
1375
1427
|
const ListPaymentReferenceNumbersInvoiceNumberSchema = z.object({
|
|
1376
|
-
is: z.string().min(1).optional(),
|
|
1377
1428
|
in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
|
|
1429
|
+
is: z.string().min(1).optional(),
|
|
1378
1430
|
});
|
|
1379
1431
|
const ListPaymentReferenceNumbersInvoicePaymentReferenceNumberItemSchema = z.object({
|
|
1380
1432
|
number: ListPaymentReferenceNumbersInvoiceNumberSchema.optional(),
|
|
@@ -1500,6 +1552,10 @@ const RecordPaymentInvoiceTransactionSchema = z.object({
|
|
|
1500
1552
|
'app_store',
|
|
1501
1553
|
'play_store',
|
|
1502
1554
|
'custom',
|
|
1555
|
+
'dana',
|
|
1556
|
+
'touch_n_go',
|
|
1557
|
+
'tamara',
|
|
1558
|
+
'qpay',
|
|
1503
1559
|
]),
|
|
1504
1560
|
reference_number: z.string().max(100).optional(),
|
|
1505
1561
|
custom_payment_method_id: z.string().max(50).optional(),
|
|
@@ -1566,6 +1622,10 @@ const RecordRefundInvoiceTransactionSchema = z.object({
|
|
|
1566
1622
|
'app_store',
|
|
1567
1623
|
'play_store',
|
|
1568
1624
|
'custom',
|
|
1625
|
+
'dana',
|
|
1626
|
+
'touch_n_go',
|
|
1627
|
+
'tamara',
|
|
1628
|
+
'qpay',
|
|
1569
1629
|
]),
|
|
1570
1630
|
reference_number: z.string().max(100).optional(),
|
|
1571
1631
|
custom_payment_method_id: z.string().max(50).optional(),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Generated Zod schemas: LedgerOperation
|
|
2
|
-
// Actions: listLedgerOperations, capture, authorize, captureAuthorization, releaseAuthorization
|
|
2
|
+
// Actions: listLedgerOperations, capture, authorize, captureAuthorization, releaseAuthorization, allocate
|
|
3
3
|
// Do not edit manually – regenerate via sdk-generator
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
//LedgerOperation.listLedgerOperations
|
|
@@ -16,7 +16,7 @@ const ListLedgerOperationsLedgerOperationCreatedAtSchema = z.object({
|
|
|
16
16
|
between: z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
|
|
17
17
|
});
|
|
18
18
|
const ListLedgerOperationsLedgerOperationTypeSchema = z.object({
|
|
19
|
-
|
|
19
|
+
in: z
|
|
20
20
|
.enum([
|
|
21
21
|
'allocation',
|
|
22
22
|
'capture',
|
|
@@ -29,7 +29,7 @@ const ListLedgerOperationsLedgerOperationTypeSchema = z.object({
|
|
|
29
29
|
'adjustment',
|
|
30
30
|
])
|
|
31
31
|
.optional(),
|
|
32
|
-
|
|
32
|
+
is: z
|
|
33
33
|
.enum([
|
|
34
34
|
'allocation',
|
|
35
35
|
'capture',
|
|
@@ -99,3 +99,13 @@ const ReleaseAuthorizationLedgerOperationBodySchema = z.looseObject({
|
|
|
99
99
|
metadata: ReleaseAuthorizationLedgerOperationMetadataSchema.optional(),
|
|
100
100
|
});
|
|
101
101
|
export { ReleaseAuthorizationLedgerOperationBodySchema };
|
|
102
|
+
//LedgerOperation.allocate
|
|
103
|
+
const AllocateLedgerOperationMetadataSchema = z.looseObject({});
|
|
104
|
+
const AllocateLedgerOperationBodySchema = z.looseObject({
|
|
105
|
+
subscription_id: z.string().max(50),
|
|
106
|
+
unit_id: z.string().max(50),
|
|
107
|
+
amount: z.string().max(36),
|
|
108
|
+
expires_at: z.number().int(),
|
|
109
|
+
metadata: AllocateLedgerOperationMetadataSchema.optional(),
|
|
110
|
+
});
|
|
111
|
+
export { AllocateLedgerOperationBodySchema };
|
|
@@ -3,8 +3,18 @@
|
|
|
3
3
|
// Do not edit manually – regenerate via sdk-generator
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
//Meter.list
|
|
6
|
+
const ListMeterNameSchema = z.object({
|
|
7
|
+
starts_with: z.string().min(1).optional(),
|
|
8
|
+
is: z.string().min(1).optional(),
|
|
9
|
+
});
|
|
10
|
+
const ListMeterSortBySchema = z.looseObject({
|
|
11
|
+
asc: z.enum(['id', 'name', 'created_at', 'updated_at']).optional(),
|
|
12
|
+
desc: z.enum(['id', 'name', 'created_at', 'updated_at']).optional(),
|
|
13
|
+
});
|
|
6
14
|
const ListMeterBodySchema = z.looseObject({
|
|
7
15
|
limit: z.number().int().min(1).max(100).optional(),
|
|
8
16
|
offset: z.string().max(1000).optional(),
|
|
17
|
+
name: ListMeterNameSchema.optional(),
|
|
18
|
+
sort_by: ListMeterSortBySchema.optional(),
|
|
9
19
|
});
|
|
10
20
|
export { ListMeterBodySchema };
|
|
@@ -31,12 +31,12 @@ const ListOmnichannelSubscriptionIdAtSourceSchema = z.object({
|
|
|
31
31
|
not_in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
|
|
32
32
|
});
|
|
33
33
|
const ListOmnichannelSubscriptionUpdatedAtSchema = z.object({
|
|
34
|
-
after: z.string().regex(RegExp('^\\d{10}$')).optional(),
|
|
35
34
|
before: z.string().regex(RegExp('^\\d{10}$')).optional(),
|
|
35
|
+
after: z.string().regex(RegExp('^\\d{10}$')).optional(),
|
|
36
36
|
});
|
|
37
37
|
const ListOmnichannelSubscriptionPurchasedAtSchema = z.object({
|
|
38
|
-
after: z.string().regex(RegExp('^\\d{10}$')).optional(),
|
|
39
38
|
before: z.string().regex(RegExp('^\\d{10}$')).optional(),
|
|
39
|
+
after: z.string().regex(RegExp('^\\d{10}$')).optional(),
|
|
40
40
|
});
|
|
41
41
|
const ListOmnichannelSubscriptionSortBySchema = z.looseObject({
|
|
42
42
|
asc: z.enum(['created_at', 'updated_at']).optional(),
|
|
@@ -58,6 +58,13 @@ const CreatePaymentIntentBodySchema = z.looseObject({
|
|
|
58
58
|
'paypay',
|
|
59
59
|
'gcash',
|
|
60
60
|
'south_korean_cards',
|
|
61
|
+
'paynow',
|
|
62
|
+
'bizum',
|
|
63
|
+
'promptpay',
|
|
64
|
+
'dana',
|
|
65
|
+
'touch_n_go',
|
|
66
|
+
'tamara',
|
|
67
|
+
'qpay',
|
|
61
68
|
])
|
|
62
69
|
.optional(),
|
|
63
70
|
success_url: z.string().max(250).optional(),
|
|
@@ -116,6 +123,13 @@ const UpdatePaymentIntentBodySchema = z.looseObject({
|
|
|
116
123
|
'paypay',
|
|
117
124
|
'gcash',
|
|
118
125
|
'south_korean_cards',
|
|
126
|
+
'paynow',
|
|
127
|
+
'bizum',
|
|
128
|
+
'promptpay',
|
|
129
|
+
'dana',
|
|
130
|
+
'touch_n_go',
|
|
131
|
+
'tamara',
|
|
132
|
+
'qpay',
|
|
119
133
|
])
|
|
120
134
|
.optional(),
|
|
121
135
|
success_url: z.string().max(250).optional(),
|