chargebee 3.29.0 → 3.30.1
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 +63 -0
- package/cjs/environment.js +1 -1
- package/cjs/resources/api_endpoints.js +69 -0
- package/cjs/resources/webhook/eventType.js +4 -0
- package/cjs/schema/alert.schema.js +8 -3
- package/cjs/schema/coupon.schema.js +1 -1
- package/cjs/schema/credit_note.schema.js +8 -0
- package/cjs/schema/credit_unit.schema.js +38 -0
- package/cjs/schema/customer.schema.js +24 -0
- package/cjs/schema/entitlement.schema.js +4 -4
- package/cjs/schema/estimate.schema.js +9 -0
- package/cjs/schema/event.schema.js +16 -0
- package/cjs/schema/export.schema.js +21 -5
- package/cjs/schema/gift.schema.js +8 -0
- package/cjs/schema/grant_block.schema.js +4 -0
- package/cjs/schema/index.js +1 -0
- package/cjs/schema/invoice.schema.js +30 -2
- package/cjs/schema/item.schema.js +1 -1
- package/cjs/schema/item_family.schema.js +1 -1
- package/cjs/schema/item_price.schema.js +1 -1
- package/cjs/schema/ledger_operation.schema.js +14 -4
- package/cjs/schema/meter.schema.js +1 -1
- package/cjs/schema/payment_intent.schema.js +8 -0
- package/cjs/schema/payment_source.schema.js +28 -0
- package/cjs/schema/price_variant.schema.js +1 -1
- package/cjs/schema/purchase.schema.js +4 -0
- package/cjs/schema/ramp.schema.js +2 -2
- package/cjs/schema/subscription.schema.js +57 -0
- package/cjs/schema/transaction.schema.js +20 -0
- package/cjs/schema/webhook_endpoint.schema.js +8 -0
- package/cjs/util.js +12 -2
- package/esm/environment.js +1 -1
- package/esm/resources/api_endpoints.js +69 -0
- package/esm/resources/webhook/eventType.js +4 -0
- package/esm/schema/alert.schema.js +8 -3
- package/esm/schema/coupon.schema.js +1 -1
- package/esm/schema/credit_note.schema.js +8 -0
- package/esm/schema/credit_unit.schema.js +35 -0
- package/esm/schema/customer.schema.js +24 -0
- package/esm/schema/entitlement.schema.js +4 -4
- package/esm/schema/estimate.schema.js +9 -0
- package/esm/schema/event.schema.js +16 -0
- package/esm/schema/export.schema.js +21 -5
- package/esm/schema/gift.schema.js +8 -0
- package/esm/schema/grant_block.schema.js +4 -0
- package/esm/schema/index.js +1 -0
- package/esm/schema/invoice.schema.js +30 -2
- package/esm/schema/item.schema.js +1 -1
- package/esm/schema/item_family.schema.js +1 -1
- package/esm/schema/item_price.schema.js +1 -1
- package/esm/schema/ledger_operation.schema.js +13 -3
- package/esm/schema/meter.schema.js +1 -1
- package/esm/schema/payment_intent.schema.js +8 -0
- package/esm/schema/payment_source.schema.js +28 -0
- package/esm/schema/price_variant.schema.js +1 -1
- package/esm/schema/purchase.schema.js +4 -0
- package/esm/schema/ramp.schema.js +2 -2
- package/esm/schema/subscription.schema.js +57 -0
- package/esm/schema/transaction.schema.js +20 -0
- package/esm/schema/webhook_endpoint.schema.js +8 -0
- package/esm/util.js +12 -2
- package/package.json +1 -1
- package/types/core.d.ts +27 -2
- package/types/index.d.ts +3 -0
- package/types/resources/Alert.d.ts +4 -2
- package/types/resources/AttachedItem.d.ts +2 -2
- package/types/resources/Content.d.ts +2 -0
- package/types/resources/CreditUnit.d.ts +90 -0
- package/types/resources/Customer.d.ts +10 -2
- package/types/resources/Estimate.d.ts +11 -2
- package/types/resources/Event.d.ts +4 -0
- package/types/resources/Gift.d.ts +10 -2
- package/types/resources/GrantBlock.d.ts +11 -5
- package/types/resources/Invoice.d.ts +10 -2
- package/types/resources/LedgerAccountBalance.d.ts +3 -1
- package/types/resources/LedgerEntry.d.ts +22 -0
- package/types/resources/LedgerOperation.d.ts +33 -6
- package/types/resources/PaymentIntent.d.ts +25 -5
- package/types/resources/PaymentSource.d.ts +5 -1
- package/types/resources/Purchase.d.ts +5 -1
- package/types/resources/Subscription.d.ts +36 -7
- package/types/resources/WebhookEvent.d.ts +26 -0
|
@@ -66,6 +66,8 @@ export var WebhookEventType;
|
|
|
66
66
|
WebhookEventType["GiftScheduled"] = "gift_scheduled";
|
|
67
67
|
WebhookEventType["GiftUnclaimed"] = "gift_unclaimed";
|
|
68
68
|
WebhookEventType["GiftUpdated"] = "gift_updated";
|
|
69
|
+
WebhookEventType["GrantBlocksCreated"] = "grant_blocks_created";
|
|
70
|
+
WebhookEventType["GrantBlocksUpdated"] = "grant_blocks_updated";
|
|
69
71
|
WebhookEventType["HierarchyCreated"] = "hierarchy_created";
|
|
70
72
|
WebhookEventType["HierarchyDeleted"] = "hierarchy_deleted";
|
|
71
73
|
WebhookEventType["InvoiceDeleted"] = "invoice_deleted";
|
|
@@ -85,6 +87,8 @@ export var WebhookEventType;
|
|
|
85
87
|
WebhookEventType["ItemPriceEntitlementsUpdated"] = "item_price_entitlements_updated";
|
|
86
88
|
WebhookEventType["ItemPriceUpdated"] = "item_price_updated";
|
|
87
89
|
WebhookEventType["ItemUpdated"] = "item_updated";
|
|
90
|
+
WebhookEventType["LedgerAccountBalanceUpdated"] = "ledger_account_balance_updated";
|
|
91
|
+
WebhookEventType["LedgerUpdated"] = "ledger_updated";
|
|
88
92
|
WebhookEventType["MrrUpdated"] = "mrr_updated";
|
|
89
93
|
WebhookEventType["NetdPaymentDueReminder"] = "netd_payment_due_reminder";
|
|
90
94
|
WebhookEventType["OmnichannelOneTimeOrderCreated"] = "omnichannel_one_time_order_created";
|
|
@@ -13,11 +13,12 @@ const CreateAlertFilterConditionsSchema = z.object({
|
|
|
13
13
|
value: z.array(z.string().max(50).optional()).optional(),
|
|
14
14
|
});
|
|
15
15
|
const CreateAlertBodySchema = z.looseObject({
|
|
16
|
-
type: z.enum(['usage_exceeded', 'spend_exceeded']),
|
|
16
|
+
type: z.enum(['usage_exceeded', 'spend_exceeded', 'credit_balance_dropped']),
|
|
17
17
|
name: z.string().max(50),
|
|
18
18
|
description: z.string().max(65000).optional(),
|
|
19
19
|
metered_feature_id: z.string().max(50).optional(),
|
|
20
20
|
currency_code: z.string().max(3).optional(),
|
|
21
|
+
unit_id: z.string().max(50).optional(),
|
|
21
22
|
subscription_id: z.string().max(50).optional(),
|
|
22
23
|
meta: z.string().max(65000).optional(),
|
|
23
24
|
threshold: CreateAlertThresholdSchema.optional(),
|
|
@@ -29,7 +30,9 @@ const ListAlertIdSchema = z.object({
|
|
|
29
30
|
in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
|
|
30
31
|
});
|
|
31
32
|
const ListAlertTypeSchema = z.object({
|
|
32
|
-
is: z
|
|
33
|
+
is: z
|
|
34
|
+
.enum(['usage_exceeded', 'spend_exceeded', 'credit_balance_dropped'])
|
|
35
|
+
.optional(),
|
|
33
36
|
});
|
|
34
37
|
const ListAlertSubscriptionIdSchema = z.object({
|
|
35
38
|
is: z.string().min(1).optional(),
|
|
@@ -61,7 +64,9 @@ const ApplicationAlertsforsubscriptionAlertStatusSchema = z.object({
|
|
|
61
64
|
is: z.enum(['enabled', 'disabled']).optional(),
|
|
62
65
|
});
|
|
63
66
|
const ApplicationAlertsforsubscriptionAlertTypeSchema = z.object({
|
|
64
|
-
is: z
|
|
67
|
+
is: z
|
|
68
|
+
.enum(['usage_exceeded', 'spend_exceeded', 'credit_balance_dropped'])
|
|
69
|
+
.optional(),
|
|
65
70
|
});
|
|
66
71
|
const ApplicationAlertsforsubscriptionAlertBodySchema = z.looseObject({
|
|
67
72
|
limit: z.number().int().min(1).max(100).optional(),
|
|
@@ -256,8 +256,8 @@ const ListCouponCurrencyCodeSchema = z.object({
|
|
|
256
256
|
not_in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
|
|
257
257
|
});
|
|
258
258
|
const ListCouponApplicableItemPriceIdsSchema = z.object({
|
|
259
|
-
is: z.string().min(1).optional(),
|
|
260
259
|
in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
|
|
260
|
+
is: z.string().min(1).optional(),
|
|
261
261
|
});
|
|
262
262
|
const ListCouponBodySchema = z.looseObject({
|
|
263
263
|
limit: z.number().int().min(1).max(100).optional(),
|
|
@@ -92,6 +92,10 @@ const RecordRefundCreditNoteTransactionSchema = z.object({
|
|
|
92
92
|
'app_store',
|
|
93
93
|
'play_store',
|
|
94
94
|
'custom',
|
|
95
|
+
'dana',
|
|
96
|
+
'touch_n_go',
|
|
97
|
+
'tamara',
|
|
98
|
+
'qpay',
|
|
95
99
|
]),
|
|
96
100
|
reference_number: z.string().max(100).optional(),
|
|
97
101
|
custom_payment_method_id: z.string().max(50).optional(),
|
|
@@ -472,6 +476,10 @@ const ImportCreditNoteCreditNoteLinkedRefundsSchema = z.object({
|
|
|
472
476
|
'app_store',
|
|
473
477
|
'play_store',
|
|
474
478
|
'custom',
|
|
479
|
+
'dana',
|
|
480
|
+
'touch_n_go',
|
|
481
|
+
'tamara',
|
|
482
|
+
'qpay',
|
|
475
483
|
])
|
|
476
484
|
.optional()),
|
|
477
485
|
date: z.array(z.number().int().optional()),
|
|
@@ -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 };
|
|
@@ -165,6 +165,10 @@ const CreateCustomerPaymentMethodSchema = z.object({
|
|
|
165
165
|
'paynow',
|
|
166
166
|
'bizum',
|
|
167
167
|
'promptpay',
|
|
168
|
+
'dana',
|
|
169
|
+
'touch_n_go',
|
|
170
|
+
'tamara',
|
|
171
|
+
'qpay',
|
|
168
172
|
])
|
|
169
173
|
.optional(),
|
|
170
174
|
gateway: z
|
|
@@ -290,6 +294,10 @@ const CreateCustomerPaymentIntentSchema = z.object({
|
|
|
290
294
|
'paynow',
|
|
291
295
|
'bizum',
|
|
292
296
|
'promptpay',
|
|
297
|
+
'dana',
|
|
298
|
+
'touch_n_go',
|
|
299
|
+
'tamara',
|
|
300
|
+
'qpay',
|
|
293
301
|
])
|
|
294
302
|
.optional(),
|
|
295
303
|
reference_id: z.string().max(65000).optional(),
|
|
@@ -712,6 +720,10 @@ const UpdatePaymentMethodCustomerPaymentMethodSchema = z.object({
|
|
|
712
720
|
'paynow',
|
|
713
721
|
'bizum',
|
|
714
722
|
'promptpay',
|
|
723
|
+
'dana',
|
|
724
|
+
'touch_n_go',
|
|
725
|
+
'tamara',
|
|
726
|
+
'qpay',
|
|
715
727
|
]),
|
|
716
728
|
gateway: z
|
|
717
729
|
.enum([
|
|
@@ -932,6 +944,10 @@ const RecordExcessPaymentCustomerTransactionSchema = z.object({
|
|
|
932
944
|
'app_store',
|
|
933
945
|
'play_store',
|
|
934
946
|
'custom',
|
|
947
|
+
'dana',
|
|
948
|
+
'touch_n_go',
|
|
949
|
+
'tamara',
|
|
950
|
+
'qpay',
|
|
935
951
|
]),
|
|
936
952
|
reference_number: z.string().max(100).optional(),
|
|
937
953
|
custom_payment_method_id: z.string().max(50).optional(),
|
|
@@ -996,6 +1012,10 @@ const CollectPaymentCustomerPaymentMethodSchema = z.object({
|
|
|
996
1012
|
'paynow',
|
|
997
1013
|
'bizum',
|
|
998
1014
|
'promptpay',
|
|
1015
|
+
'dana',
|
|
1016
|
+
'touch_n_go',
|
|
1017
|
+
'tamara',
|
|
1018
|
+
'qpay',
|
|
999
1019
|
])
|
|
1000
1020
|
.optional(),
|
|
1001
1021
|
gateway_account_id: z.string().max(50).optional(),
|
|
@@ -1077,6 +1097,10 @@ const CollectPaymentCustomerPaymentIntentSchema = z.object({
|
|
|
1077
1097
|
'paynow',
|
|
1078
1098
|
'bizum',
|
|
1079
1099
|
'promptpay',
|
|
1100
|
+
'dana',
|
|
1101
|
+
'touch_n_go',
|
|
1102
|
+
'tamara',
|
|
1103
|
+
'qpay',
|
|
1080
1104
|
])
|
|
1081
1105
|
.optional(),
|
|
1082
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
|
});
|
|
@@ -1154,6 +1155,10 @@ const GiftSubscriptionEstimatePaymentIntentSchema = z.object({
|
|
|
1154
1155
|
'paynow',
|
|
1155
1156
|
'bizum',
|
|
1156
1157
|
'promptpay',
|
|
1158
|
+
'dana',
|
|
1159
|
+
'touch_n_go',
|
|
1160
|
+
'tamara',
|
|
1161
|
+
'qpay',
|
|
1157
1162
|
])
|
|
1158
1163
|
.optional(),
|
|
1159
1164
|
reference_id: z.string().max(65000).optional(),
|
|
@@ -1273,6 +1278,10 @@ const GiftSubscriptionForItemsEstimatePaymentIntentSchema = z.object({
|
|
|
1273
1278
|
'paynow',
|
|
1274
1279
|
'bizum',
|
|
1275
1280
|
'promptpay',
|
|
1281
|
+
'dana',
|
|
1282
|
+
'touch_n_go',
|
|
1283
|
+
'tamara',
|
|
1284
|
+
'qpay',
|
|
1276
1285
|
])
|
|
1277
1286
|
.optional(),
|
|
1278
1287
|
reference_id: z.string().max(65000).optional(),
|
|
@@ -290,6 +290,10 @@ const ListEventEventTypeSchema = z.object({
|
|
|
290
290
|
'alert_status_changed',
|
|
291
291
|
'omnichannel_subscription_item_updated',
|
|
292
292
|
'omnichannel_subscription_item_recovered',
|
|
293
|
+
'ledger_account_balance_updated',
|
|
294
|
+
'grant_blocks_created',
|
|
295
|
+
'grant_blocks_updated',
|
|
296
|
+
'ledger_updated',
|
|
293
297
|
])
|
|
294
298
|
.optional(),
|
|
295
299
|
is_not: z
|
|
@@ -517,6 +521,10 @@ const ListEventEventTypeSchema = z.object({
|
|
|
517
521
|
'alert_status_changed',
|
|
518
522
|
'omnichannel_subscription_item_updated',
|
|
519
523
|
'omnichannel_subscription_item_recovered',
|
|
524
|
+
'ledger_account_balance_updated',
|
|
525
|
+
'grant_blocks_created',
|
|
526
|
+
'grant_blocks_updated',
|
|
527
|
+
'ledger_updated',
|
|
520
528
|
])
|
|
521
529
|
.optional(),
|
|
522
530
|
in: z
|
|
@@ -744,6 +752,10 @@ const ListEventEventTypeSchema = z.object({
|
|
|
744
752
|
'alert_status_changed',
|
|
745
753
|
'omnichannel_subscription_item_updated',
|
|
746
754
|
'omnichannel_subscription_item_recovered',
|
|
755
|
+
'ledger_account_balance_updated',
|
|
756
|
+
'grant_blocks_created',
|
|
757
|
+
'grant_blocks_updated',
|
|
758
|
+
'ledger_updated',
|
|
747
759
|
])
|
|
748
760
|
.optional(),
|
|
749
761
|
not_in: z
|
|
@@ -971,6 +983,10 @@ const ListEventEventTypeSchema = z.object({
|
|
|
971
983
|
'alert_status_changed',
|
|
972
984
|
'omnichannel_subscription_item_updated',
|
|
973
985
|
'omnichannel_subscription_item_recovered',
|
|
986
|
+
'ledger_account_balance_updated',
|
|
987
|
+
'grant_blocks_created',
|
|
988
|
+
'grant_blocks_updated',
|
|
989
|
+
'ledger_updated',
|
|
974
990
|
])
|
|
975
991
|
.optional(),
|
|
976
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(),
|
|
@@ -2132,6 +2132,10 @@ const TransactionsExportPaymentMethodSchema = z.object({
|
|
|
2132
2132
|
'paynow',
|
|
2133
2133
|
'bizum',
|
|
2134
2134
|
'promptpay',
|
|
2135
|
+
'dana',
|
|
2136
|
+
'touch_n_go',
|
|
2137
|
+
'tamara',
|
|
2138
|
+
'qpay',
|
|
2135
2139
|
])
|
|
2136
2140
|
.optional(),
|
|
2137
2141
|
is_not: z
|
|
@@ -2196,6 +2200,10 @@ const TransactionsExportPaymentMethodSchema = z.object({
|
|
|
2196
2200
|
'paynow',
|
|
2197
2201
|
'bizum',
|
|
2198
2202
|
'promptpay',
|
|
2203
|
+
'dana',
|
|
2204
|
+
'touch_n_go',
|
|
2205
|
+
'tamara',
|
|
2206
|
+
'qpay',
|
|
2199
2207
|
])
|
|
2200
2208
|
.optional(),
|
|
2201
2209
|
in: z
|
|
@@ -2260,6 +2268,10 @@ const TransactionsExportPaymentMethodSchema = z.object({
|
|
|
2260
2268
|
'paynow',
|
|
2261
2269
|
'bizum',
|
|
2262
2270
|
'promptpay',
|
|
2271
|
+
'dana',
|
|
2272
|
+
'touch_n_go',
|
|
2273
|
+
'tamara',
|
|
2274
|
+
'qpay',
|
|
2263
2275
|
])
|
|
2264
2276
|
.optional(),
|
|
2265
2277
|
not_in: z
|
|
@@ -2324,6 +2336,10 @@ const TransactionsExportPaymentMethodSchema = z.object({
|
|
|
2324
2336
|
'paynow',
|
|
2325
2337
|
'bizum',
|
|
2326
2338
|
'promptpay',
|
|
2339
|
+
'dana',
|
|
2340
|
+
'touch_n_go',
|
|
2341
|
+
'tamara',
|
|
2342
|
+
'qpay',
|
|
2327
2343
|
])
|
|
2328
2344
|
.optional(),
|
|
2329
2345
|
});
|
|
@@ -2927,8 +2943,8 @@ const OrdersExportBodySchema = z.looseObject({
|
|
|
2927
2943
|
export { OrdersExportBodySchema };
|
|
2928
2944
|
//Export.itemFamilies
|
|
2929
2945
|
const ItemFamiliesExportBusinessEntityIdSchema = z.object({
|
|
2930
|
-
is_present: z.enum(['true', 'false']).optional(),
|
|
2931
2946
|
is: z.string().min(1).optional(),
|
|
2947
|
+
is_present: z.enum(['true', 'false']).optional(),
|
|
2932
2948
|
});
|
|
2933
2949
|
const ItemFamiliesExportIncludeSiteLevelResourcesSchema = z.object({
|
|
2934
2950
|
is: z.enum(['true', 'false']).optional(),
|
|
@@ -2966,8 +2982,8 @@ const ItemFamiliesExportBodySchema = z.looseObject({
|
|
|
2966
2982
|
export { ItemFamiliesExportBodySchema };
|
|
2967
2983
|
//Export.items
|
|
2968
2984
|
const ItemsExportBusinessEntityIdSchema = z.object({
|
|
2969
|
-
is_present: z.enum(['true', 'false']).optional(),
|
|
2970
2985
|
is: z.string().min(1).optional(),
|
|
2986
|
+
is_present: z.enum(['true', 'false']).optional(),
|
|
2971
2987
|
});
|
|
2972
2988
|
const ItemsExportIncludeSiteLevelResourcesSchema = z.object({
|
|
2973
2989
|
is: z.enum(['true', 'false']).optional(),
|
|
@@ -3082,8 +3098,8 @@ const ItemPricesExportCurrencyCodeSchema = z.object({
|
|
|
3082
3098
|
not_in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
|
|
3083
3099
|
});
|
|
3084
3100
|
const ItemPricesExportBusinessEntityIdSchema = z.object({
|
|
3085
|
-
is_present: z.enum(['true', 'false']).optional(),
|
|
3086
3101
|
is: z.string().min(1).optional(),
|
|
3102
|
+
is_present: z.enum(['true', 'false']).optional(),
|
|
3087
3103
|
});
|
|
3088
3104
|
const ItemPricesExportIncludeSiteLevelResourcesSchema = z.object({
|
|
3089
3105
|
is: z.enum(['true', 'false']).optional(),
|
|
@@ -3343,8 +3359,8 @@ const DifferentialPricesExportBodySchema = z.looseObject({
|
|
|
3343
3359
|
export { DifferentialPricesExportBodySchema };
|
|
3344
3360
|
//Export.priceVariants
|
|
3345
3361
|
const PriceVariantsExportBusinessEntityIdSchema = z.object({
|
|
3346
|
-
is_present: z.enum(['true', 'false']).optional(),
|
|
3347
3362
|
is: z.string().min(1).optional(),
|
|
3363
|
+
is_present: z.enum(['true', 'false']).optional(),
|
|
3348
3364
|
});
|
|
3349
3365
|
const PriceVariantsExportIncludeSiteLevelResourcesSchema = z.object({
|
|
3350
3366
|
is: z.enum(['true', 'false']).optional(),
|
|
@@ -70,6 +70,10 @@ const CreateGiftPaymentIntentSchema = z.object({
|
|
|
70
70
|
'paynow',
|
|
71
71
|
'bizum',
|
|
72
72
|
'promptpay',
|
|
73
|
+
'dana',
|
|
74
|
+
'touch_n_go',
|
|
75
|
+
'tamara',
|
|
76
|
+
'qpay',
|
|
73
77
|
])
|
|
74
78
|
.optional(),
|
|
75
79
|
reference_id: z.string().max(65000).optional(),
|
|
@@ -187,6 +191,10 @@ const CreateForItemsGiftPaymentIntentSchema = z.object({
|
|
|
187
191
|
'paynow',
|
|
188
192
|
'bizum',
|
|
189
193
|
'promptpay',
|
|
194
|
+
'dana',
|
|
195
|
+
'touch_n_go',
|
|
196
|
+
'tamara',
|
|
197
|
+
'qpay',
|
|
190
198
|
])
|
|
191
199
|
.optional(),
|
|
192
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';
|
|
@@ -185,6 +185,10 @@ const CreateInvoicePaymentMethodSchema = z.object({
|
|
|
185
185
|
'paynow',
|
|
186
186
|
'bizum',
|
|
187
187
|
'promptpay',
|
|
188
|
+
'dana',
|
|
189
|
+
'touch_n_go',
|
|
190
|
+
'tamara',
|
|
191
|
+
'qpay',
|
|
188
192
|
])
|
|
189
193
|
.optional(),
|
|
190
194
|
gateway: z
|
|
@@ -310,6 +314,10 @@ const CreateInvoicePaymentIntentSchema = z.object({
|
|
|
310
314
|
'paynow',
|
|
311
315
|
'bizum',
|
|
312
316
|
'promptpay',
|
|
317
|
+
'dana',
|
|
318
|
+
'touch_n_go',
|
|
319
|
+
'tamara',
|
|
320
|
+
'qpay',
|
|
313
321
|
])
|
|
314
322
|
.optional(),
|
|
315
323
|
reference_id: z.string().max(65000).optional(),
|
|
@@ -567,6 +575,10 @@ const CreateForChargeItemsAndChargesInvoicePaymentMethodSchema = z.object({
|
|
|
567
575
|
'paynow',
|
|
568
576
|
'bizum',
|
|
569
577
|
'promptpay',
|
|
578
|
+
'dana',
|
|
579
|
+
'touch_n_go',
|
|
580
|
+
'tamara',
|
|
581
|
+
'qpay',
|
|
570
582
|
])
|
|
571
583
|
.optional(),
|
|
572
584
|
gateway: z
|
|
@@ -692,6 +704,10 @@ const CreateForChargeItemsAndChargesInvoicePaymentIntentSchema = z.object({
|
|
|
692
704
|
'paynow',
|
|
693
705
|
'bizum',
|
|
694
706
|
'promptpay',
|
|
707
|
+
'dana',
|
|
708
|
+
'touch_n_go',
|
|
709
|
+
'tamara',
|
|
710
|
+
'qpay',
|
|
695
711
|
])
|
|
696
712
|
.optional(),
|
|
697
713
|
reference_id: z.string().max(65000).optional(),
|
|
@@ -1068,6 +1084,10 @@ const ImportInvoiceInvoicePaymentsSchema = z.object({
|
|
|
1068
1084
|
'app_store',
|
|
1069
1085
|
'play_store',
|
|
1070
1086
|
'custom',
|
|
1087
|
+
'dana',
|
|
1088
|
+
'touch_n_go',
|
|
1089
|
+
'tamara',
|
|
1090
|
+
'qpay',
|
|
1071
1091
|
])
|
|
1072
1092
|
.optional()),
|
|
1073
1093
|
date: z.array(z.number().int().optional()).optional(),
|
|
@@ -1401,12 +1421,12 @@ const PdfInvoiceBodySchema = z.looseObject({
|
|
|
1401
1421
|
export { PdfInvoiceBodySchema };
|
|
1402
1422
|
//Invoice.listPaymentReferenceNumbers
|
|
1403
1423
|
const ListPaymentReferenceNumbersInvoiceIdSchema = z.object({
|
|
1404
|
-
is: z.string().min(1).optional(),
|
|
1405
1424
|
in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
|
|
1425
|
+
is: z.string().min(1).optional(),
|
|
1406
1426
|
});
|
|
1407
1427
|
const ListPaymentReferenceNumbersInvoiceNumberSchema = z.object({
|
|
1408
|
-
is: z.string().min(1).optional(),
|
|
1409
1428
|
in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
|
|
1429
|
+
is: z.string().min(1).optional(),
|
|
1410
1430
|
});
|
|
1411
1431
|
const ListPaymentReferenceNumbersInvoicePaymentReferenceNumberItemSchema = z.object({
|
|
1412
1432
|
number: ListPaymentReferenceNumbersInvoiceNumberSchema.optional(),
|
|
@@ -1532,6 +1552,10 @@ const RecordPaymentInvoiceTransactionSchema = z.object({
|
|
|
1532
1552
|
'app_store',
|
|
1533
1553
|
'play_store',
|
|
1534
1554
|
'custom',
|
|
1555
|
+
'dana',
|
|
1556
|
+
'touch_n_go',
|
|
1557
|
+
'tamara',
|
|
1558
|
+
'qpay',
|
|
1535
1559
|
]),
|
|
1536
1560
|
reference_number: z.string().max(100).optional(),
|
|
1537
1561
|
custom_payment_method_id: z.string().max(50).optional(),
|
|
@@ -1598,6 +1622,10 @@ const RecordRefundInvoiceTransactionSchema = z.object({
|
|
|
1598
1622
|
'app_store',
|
|
1599
1623
|
'play_store',
|
|
1600
1624
|
'custom',
|
|
1625
|
+
'dana',
|
|
1626
|
+
'touch_n_go',
|
|
1627
|
+
'tamara',
|
|
1628
|
+
'qpay',
|
|
1601
1629
|
]),
|
|
1602
1630
|
reference_number: z.string().max(100).optional(),
|
|
1603
1631
|
custom_payment_method_id: z.string().max(50).optional(),
|
|
@@ -155,8 +155,8 @@ const ListItemChannelSchema = z.object({
|
|
|
155
155
|
not_in: z.enum(['web', 'app_store', 'play_store']).optional(),
|
|
156
156
|
});
|
|
157
157
|
const ListItemBusinessEntityIdSchema = z.object({
|
|
158
|
-
is_present: z.enum(['true', 'false']).optional(),
|
|
159
158
|
is: z.string().min(1).optional(),
|
|
159
|
+
is_present: z.enum(['true', 'false']).optional(),
|
|
160
160
|
});
|
|
161
161
|
const ListItemIncludeSiteLevelResourcesSchema = z.object({
|
|
162
162
|
is: z.enum(['true', 'false']).optional(),
|
|
@@ -30,8 +30,8 @@ const ListItemFamilyUpdatedAtSchema = z.object({
|
|
|
30
30
|
between: z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
|
|
31
31
|
});
|
|
32
32
|
const ListItemFamilyBusinessEntityIdSchema = z.object({
|
|
33
|
-
is_present: z.enum(['true', 'false']).optional(),
|
|
34
33
|
is: z.string().min(1).optional(),
|
|
34
|
+
is_present: z.enum(['true', 'false']).optional(),
|
|
35
35
|
});
|
|
36
36
|
const ListItemFamilyIncludeSiteLevelResourcesSchema = z.object({
|
|
37
37
|
is: z.enum(['true', 'false']).optional(),
|
|
@@ -253,8 +253,8 @@ const ListItemPriceUpdatedAtSchema = z.object({
|
|
|
253
253
|
between: z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
|
|
254
254
|
});
|
|
255
255
|
const ListItemPriceBusinessEntityIdSchema = z.object({
|
|
256
|
-
is_present: z.enum(['true', 'false']).optional(),
|
|
257
256
|
is: z.string().min(1).optional(),
|
|
257
|
+
is_present: z.enum(['true', 'false']).optional(),
|
|
258
258
|
});
|
|
259
259
|
const ListItemPriceIncludeSiteLevelResourcesSchema = z.object({
|
|
260
260
|
is: z.enum(['true', 'false']).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 };
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
//Meter.list
|
|
6
6
|
const ListMeterNameSchema = z.object({
|
|
7
|
-
is: z.string().min(1).optional(),
|
|
8
7
|
starts_with: z.string().min(1).optional(),
|
|
8
|
+
is: z.string().min(1).optional(),
|
|
9
9
|
});
|
|
10
10
|
const ListMeterSortBySchema = z.looseObject({
|
|
11
11
|
asc: z.enum(['id', 'name', 'created_at', 'updated_at']).optional(),
|
|
@@ -61,6 +61,10 @@ const CreatePaymentIntentBodySchema = z.looseObject({
|
|
|
61
61
|
'paynow',
|
|
62
62
|
'bizum',
|
|
63
63
|
'promptpay',
|
|
64
|
+
'dana',
|
|
65
|
+
'touch_n_go',
|
|
66
|
+
'tamara',
|
|
67
|
+
'qpay',
|
|
64
68
|
])
|
|
65
69
|
.optional(),
|
|
66
70
|
success_url: z.string().max(250).optional(),
|
|
@@ -122,6 +126,10 @@ const UpdatePaymentIntentBodySchema = z.looseObject({
|
|
|
122
126
|
'paynow',
|
|
123
127
|
'bizum',
|
|
124
128
|
'promptpay',
|
|
129
|
+
'dana',
|
|
130
|
+
'touch_n_go',
|
|
131
|
+
'tamara',
|
|
132
|
+
'qpay',
|
|
125
133
|
])
|
|
126
134
|
.optional(),
|
|
127
135
|
success_url: z.string().max(250).optional(),
|