chargebee 3.24.0 → 3.25.0-beta.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 +8 -0
- package/README.md +39 -0
- package/cjs/RequestWrapper.js +27 -0
- package/cjs/chargebee.cjs.js +3 -0
- package/cjs/chargebee.cjs.worker.js +2 -0
- package/cjs/chargebeeZodValidationError.js +18 -0
- package/cjs/createChargebee.js +5 -0
- package/cjs/environment.js +1 -1
- package/cjs/schema/addon.schema.js +153 -0
- package/cjs/schema/address.schema.js +35 -0
- package/cjs/schema/alert.schema.js +38 -0
- package/cjs/schema/attached_item.schema.js +58 -0
- package/cjs/schema/business_entity.schema.js +46 -0
- package/cjs/schema/card.schema.js +165 -0
- package/cjs/schema/comment.schema.js +69 -0
- package/cjs/schema/coupon.schema.js +209 -0
- package/cjs/schema/coupon_code.schema.js +14 -0
- package/cjs/schema/coupon_set.schema.js +28 -0
- package/cjs/schema/credit_note.schema.js +288 -0
- package/cjs/schema/currency.schema.js +32 -0
- package/cjs/schema/customer.schema.js +986 -0
- package/cjs/schema/customer_entitlement.schema.js +14 -0
- package/cjs/schema/differential_price.schema.js +68 -0
- package/cjs/schema/entitlement.schema.js +27 -0
- package/cjs/schema/entitlement_override.schema.js +33 -0
- package/cjs/schema/estimate.schema.js +1525 -0
- package/cjs/schema/export.schema.js +1545 -0
- package/cjs/schema/feature.schema.js +37 -0
- package/cjs/schema/gift.schema.js +277 -0
- package/cjs/schema/hosted_page.schema.js +1649 -0
- package/cjs/schema/in_app_subscription.schema.js +68 -0
- package/cjs/schema/index.js +80 -0
- package/cjs/schema/invoice.schema.js +1467 -0
- package/cjs/schema/item.schema.js +91 -0
- package/cjs/schema/item_entitlement.schema.js +45 -0
- package/cjs/schema/item_family.schema.js +21 -0
- package/cjs/schema/item_price.schema.js +190 -0
- package/cjs/schema/non_subscription.schema.js +28 -0
- package/cjs/schema/offer_event.schema.js +13 -0
- package/cjs/schema/offer_fulfillment.schema.js +20 -0
- package/cjs/schema/omnichannel_one_time_order.schema.js +26 -0
- package/cjs/schema/omnichannel_subscription.schema.js +89 -0
- package/cjs/schema/omnichannel_subscription_item.schema.js +13 -0
- package/cjs/schema/order.schema.js +273 -0
- package/cjs/schema/payment_intent.schema.js +117 -0
- package/cjs/schema/payment_schedule_scheme.schema.js +20 -0
- package/cjs/schema/payment_source.schema.js +358 -0
- package/cjs/schema/payment_voucher.schema.js +57 -0
- package/cjs/schema/personalized_offer.schema.js +28 -0
- package/cjs/schema/plan.schema.js +225 -0
- package/cjs/schema/portal_session.schema.js +22 -0
- package/cjs/schema/price_variant.schema.js +36 -0
- package/cjs/schema/pricing_page_session.schema.js +135 -0
- package/cjs/schema/promotional_credit.schema.js +78 -0
- package/cjs/schema/purchase.schema.js +272 -0
- package/cjs/schema/quote.schema.js +1557 -0
- package/cjs/schema/ramp.schema.js +209 -0
- package/cjs/schema/recorded_purchase.schema.js +32 -0
- package/cjs/schema/resource_migration.schema.js +14 -0
- package/cjs/schema/site_migration_detail.schema.js +81 -0
- package/cjs/schema/subscription.schema.js +2993 -0
- package/cjs/schema/subscription_entitlement.schema.js +25 -0
- package/cjs/schema/time_machine.schema.js +17 -0
- package/cjs/schema/transaction.schema.js +70 -0
- package/cjs/schema/unbilled_charge.schema.js +113 -0
- package/cjs/schema/usage.schema.js +93 -0
- package/cjs/schema/usage_charge.schema.js +17 -0
- package/cjs/schema/usage_event.schema.js +28 -0
- package/cjs/schema/usage_file.schema.js +13 -0
- package/cjs/schema/usage_summary.schema.js +17 -0
- package/cjs/schema/virtual_bank_account.schema.js +43 -0
- package/cjs/schema/webhook_endpoint.schema.js +504 -0
- package/cjs/validationLoader.js +59 -0
- package/esm/RequestWrapper.js +27 -0
- package/esm/chargebee.esm.js +2 -0
- package/esm/chargebee.esm.worker.js +1 -0
- package/esm/chargebeeZodValidationError.js +14 -0
- package/esm/createChargebee.js +5 -0
- package/esm/environment.js +1 -1
- package/esm/schema/addon.schema.js +150 -0
- package/esm/schema/address.schema.js +32 -0
- package/esm/schema/alert.schema.js +35 -0
- package/esm/schema/attached_item.schema.js +55 -0
- package/esm/schema/business_entity.schema.js +43 -0
- package/esm/schema/card.schema.js +162 -0
- package/esm/schema/comment.schema.js +66 -0
- package/esm/schema/coupon.schema.js +206 -0
- package/esm/schema/coupon_code.schema.js +11 -0
- package/esm/schema/coupon_set.schema.js +25 -0
- package/esm/schema/credit_note.schema.js +285 -0
- package/esm/schema/currency.schema.js +29 -0
- package/esm/schema/customer.schema.js +983 -0
- package/esm/schema/customer_entitlement.schema.js +11 -0
- package/esm/schema/differential_price.schema.js +65 -0
- package/esm/schema/entitlement.schema.js +24 -0
- package/esm/schema/entitlement_override.schema.js +30 -0
- package/esm/schema/estimate.schema.js +1522 -0
- package/esm/schema/export.schema.js +1542 -0
- package/esm/schema/feature.schema.js +34 -0
- package/esm/schema/gift.schema.js +274 -0
- package/esm/schema/hosted_page.schema.js +1646 -0
- package/esm/schema/in_app_subscription.schema.js +65 -0
- package/esm/schema/index.js +64 -0
- package/esm/schema/invoice.schema.js +1464 -0
- package/esm/schema/item.schema.js +88 -0
- package/esm/schema/item_entitlement.schema.js +42 -0
- package/esm/schema/item_family.schema.js +18 -0
- package/esm/schema/item_price.schema.js +187 -0
- package/esm/schema/non_subscription.schema.js +25 -0
- package/esm/schema/offer_event.schema.js +10 -0
- package/esm/schema/offer_fulfillment.schema.js +17 -0
- package/esm/schema/omnichannel_one_time_order.schema.js +23 -0
- package/esm/schema/omnichannel_subscription.schema.js +86 -0
- package/esm/schema/omnichannel_subscription_item.schema.js +10 -0
- package/esm/schema/order.schema.js +270 -0
- package/esm/schema/payment_intent.schema.js +114 -0
- package/esm/schema/payment_schedule_scheme.schema.js +17 -0
- package/esm/schema/payment_source.schema.js +355 -0
- package/esm/schema/payment_voucher.schema.js +54 -0
- package/esm/schema/personalized_offer.schema.js +25 -0
- package/esm/schema/plan.schema.js +222 -0
- package/esm/schema/portal_session.schema.js +19 -0
- package/esm/schema/price_variant.schema.js +33 -0
- package/esm/schema/pricing_page_session.schema.js +132 -0
- package/esm/schema/promotional_credit.schema.js +75 -0
- package/esm/schema/purchase.schema.js +269 -0
- package/esm/schema/quote.schema.js +1554 -0
- package/esm/schema/ramp.schema.js +206 -0
- package/esm/schema/recorded_purchase.schema.js +29 -0
- package/esm/schema/resource_migration.schema.js +11 -0
- package/esm/schema/site_migration_detail.schema.js +78 -0
- package/esm/schema/subscription.schema.js +2990 -0
- package/esm/schema/subscription_entitlement.schema.js +22 -0
- package/esm/schema/time_machine.schema.js +14 -0
- package/esm/schema/transaction.schema.js +67 -0
- package/esm/schema/unbilled_charge.schema.js +110 -0
- package/esm/schema/usage.schema.js +90 -0
- package/esm/schema/usage_charge.schema.js +14 -0
- package/esm/schema/usage_event.schema.js +25 -0
- package/esm/schema/usage_file.schema.js +10 -0
- package/esm/schema/usage_summary.schema.js +14 -0
- package/esm/schema/virtual_bank_account.schema.js +40 -0
- package/esm/schema/webhook_endpoint.schema.js +501 -0
- package/esm/validationLoader.js +56 -0
- package/package.json +4 -1
- package/types/core.d.ts +2 -0
- package/types/index.d.ts +16 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// Generated Zod schemas: SubscriptionEntitlement
|
|
2
|
+
// Actions: subscriptionEntitlementsForSubscription, setSubscriptionEntitlementAvailability
|
|
3
|
+
// Do not edit manually – regenerate via sdk-generator
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
//SubscriptionEntitlement.subscriptionEntitlementsForSubscription
|
|
6
|
+
const SubscriptionEntitlementsForSubscriptionSubscriptionEntitlementBodySchema = z.looseObject({
|
|
7
|
+
limit: z.number().int().min(1).max(100).optional(),
|
|
8
|
+
offset: z.string().max(1000).optional(),
|
|
9
|
+
include_drafts: z.boolean().default(false).optional(),
|
|
10
|
+
embed: z.string().max(1000).optional(),
|
|
11
|
+
include_scheduled_overrides: z.boolean().default(false).optional(),
|
|
12
|
+
});
|
|
13
|
+
export { SubscriptionEntitlementsForSubscriptionSubscriptionEntitlementBodySchema };
|
|
14
|
+
//SubscriptionEntitlement.setSubscriptionEntitlementAvailability
|
|
15
|
+
const SetSubscriptionEntitlementAvailabilitySubscriptionEntitlementSubscriptionEntitlementsSchema = z.object({
|
|
16
|
+
feature_id: z.array(z.string().max(50).optional()),
|
|
17
|
+
});
|
|
18
|
+
const SetSubscriptionEntitlementAvailabilitySubscriptionEntitlementBodySchema = z.looseObject({
|
|
19
|
+
is_enabled: z.boolean(),
|
|
20
|
+
subscription_entitlements: SetSubscriptionEntitlementAvailabilitySubscriptionEntitlementSubscriptionEntitlementsSchema.optional(),
|
|
21
|
+
});
|
|
22
|
+
export { SetSubscriptionEntitlementAvailabilitySubscriptionEntitlementBodySchema };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Generated Zod schemas: TimeMachine
|
|
2
|
+
// Actions: startAfresh, travelForward
|
|
3
|
+
// Do not edit manually – regenerate via sdk-generator
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
//TimeMachine.startAfresh
|
|
6
|
+
const StartAfreshTimeMachineBodySchema = z.looseObject({
|
|
7
|
+
genesis_time: z.number().int().optional(),
|
|
8
|
+
});
|
|
9
|
+
export { StartAfreshTimeMachineBodySchema };
|
|
10
|
+
//TimeMachine.travelForward
|
|
11
|
+
const TravelForwardTimeMachineBodySchema = z.looseObject({
|
|
12
|
+
destination_time: z.number().int().optional(),
|
|
13
|
+
});
|
|
14
|
+
export { TravelForwardTimeMachineBodySchema };
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
// Generated Zod schemas: Transaction
|
|
2
|
+
// Actions: createAuthorization, recordRefund, reconcile, refund, transactionsForCustomer, transactionsForSubscription, paymentsForInvoice, deleteOfflineTransaction
|
|
3
|
+
// Do not edit manually – regenerate via sdk-generator
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
//Transaction.createAuthorization
|
|
6
|
+
const CreateAuthorizationTransactionBodySchema = z.looseObject({
|
|
7
|
+
customer_id: z.string().max(50),
|
|
8
|
+
payment_source_id: z.string().max(40).optional(),
|
|
9
|
+
currency_code: z.string().max(3).optional(),
|
|
10
|
+
amount: z.number().int().min(1),
|
|
11
|
+
});
|
|
12
|
+
export { CreateAuthorizationTransactionBodySchema };
|
|
13
|
+
//Transaction.recordRefund
|
|
14
|
+
const RecordRefundTransactionBodySchema = z.looseObject({
|
|
15
|
+
amount: z.number().int().min(1).optional(),
|
|
16
|
+
payment_method: z.enum([
|
|
17
|
+
'cash',
|
|
18
|
+
'check',
|
|
19
|
+
'chargeback',
|
|
20
|
+
'bank_transfer',
|
|
21
|
+
'other',
|
|
22
|
+
'app_store',
|
|
23
|
+
'play_store',
|
|
24
|
+
'custom',
|
|
25
|
+
]),
|
|
26
|
+
date: z.number().int(),
|
|
27
|
+
reference_number: z.string().max(100).optional(),
|
|
28
|
+
custom_payment_method_id: z.string().max(50).optional(),
|
|
29
|
+
comment: z.string().max(300).optional(),
|
|
30
|
+
});
|
|
31
|
+
export { RecordRefundTransactionBodySchema };
|
|
32
|
+
//Transaction.reconcile
|
|
33
|
+
const ReconcileTransactionBodySchema = z.looseObject({
|
|
34
|
+
id_at_gateway: z.string().max(100).optional(),
|
|
35
|
+
customer_id: z.string().max(50).optional(),
|
|
36
|
+
status: z.enum(['success', 'failure']).optional(),
|
|
37
|
+
});
|
|
38
|
+
export { ReconcileTransactionBodySchema };
|
|
39
|
+
//Transaction.refund
|
|
40
|
+
const RefundTransactionBodySchema = z.looseObject({
|
|
41
|
+
amount: z.number().int().min(1).optional(),
|
|
42
|
+
comment: z.string().max(300).optional(),
|
|
43
|
+
});
|
|
44
|
+
export { RefundTransactionBodySchema };
|
|
45
|
+
//Transaction.transactionsForCustomer
|
|
46
|
+
const TransactionsForCustomerTransactionBodySchema = z.looseObject({
|
|
47
|
+
limit: z.number().int().min(1).max(100).optional(),
|
|
48
|
+
offset: z.string().max(1000).optional(),
|
|
49
|
+
});
|
|
50
|
+
export { TransactionsForCustomerTransactionBodySchema };
|
|
51
|
+
//Transaction.transactionsForSubscription
|
|
52
|
+
const TransactionsForSubscriptionTransactionBodySchema = z.looseObject({
|
|
53
|
+
limit: z.number().int().min(1).max(100).optional(),
|
|
54
|
+
offset: z.string().max(1000).optional(),
|
|
55
|
+
});
|
|
56
|
+
export { TransactionsForSubscriptionTransactionBodySchema };
|
|
57
|
+
//Transaction.paymentsForInvoice
|
|
58
|
+
const PaymentsForInvoiceTransactionBodySchema = z.looseObject({
|
|
59
|
+
limit: z.number().int().min(1).max(100).optional(),
|
|
60
|
+
offset: z.string().max(1000).optional(),
|
|
61
|
+
});
|
|
62
|
+
export { PaymentsForInvoiceTransactionBodySchema };
|
|
63
|
+
//Transaction.deleteOfflineTransaction
|
|
64
|
+
const DeleteOfflineTransactionTransactionBodySchema = z.looseObject({
|
|
65
|
+
comment: z.string().max(300).optional(),
|
|
66
|
+
});
|
|
67
|
+
export { DeleteOfflineTransactionTransactionBodySchema };
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
// Generated Zod schemas: UnbilledCharge
|
|
2
|
+
// Actions: createUnbilledCharge, create, invoiceUnbilledCharges, invoiceNowEstimate
|
|
3
|
+
// Do not edit manually – regenerate via sdk-generator
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
//UnbilledCharge.createUnbilledCharge
|
|
6
|
+
const CreateUnbilledChargeUnbilledChargeAddonsSchema = z.object({
|
|
7
|
+
id: z.array(z.string().max(100).optional()).optional(),
|
|
8
|
+
quantity: z.array(z.number().int().min(1).optional()).optional(),
|
|
9
|
+
unit_price: z.array(z.number().int().min(0).optional()).optional(),
|
|
10
|
+
quantity_in_decimal: z.array(z.string().max(33).optional()).optional(),
|
|
11
|
+
unit_price_in_decimal: z.array(z.string().max(39).optional()).optional(),
|
|
12
|
+
date_from: z.array(z.number().int().optional()).optional(),
|
|
13
|
+
date_to: z.array(z.number().int().optional()).optional(),
|
|
14
|
+
});
|
|
15
|
+
const CreateUnbilledChargeUnbilledChargeChargesSchema = z.object({
|
|
16
|
+
amount: z.array(z.number().int().min(1).optional()).optional(),
|
|
17
|
+
amount_in_decimal: z.array(z.string().max(39).optional()).optional(),
|
|
18
|
+
description: z.array(z.string().max(250).optional()).optional(),
|
|
19
|
+
taxable: z.array(z.boolean().default(true).optional()).optional(),
|
|
20
|
+
tax_profile_id: z.array(z.string().max(50).optional()).optional(),
|
|
21
|
+
avalara_tax_code: z.array(z.string().max(50).optional()).optional(),
|
|
22
|
+
hsn_code: z.array(z.string().max(50).optional()).optional(),
|
|
23
|
+
taxjar_product_code: z.array(z.string().max(50).optional()).optional(),
|
|
24
|
+
avalara_sale_type: z
|
|
25
|
+
.array(z.enum(['wholesale', 'retail', 'consumed', 'vendor_use']).optional())
|
|
26
|
+
.optional(),
|
|
27
|
+
avalara_transaction_type: z.array(z.number().int().optional()).optional(),
|
|
28
|
+
avalara_service_type: z.array(z.number().int().optional()).optional(),
|
|
29
|
+
date_from: z.array(z.number().int().optional()).optional(),
|
|
30
|
+
date_to: z.array(z.number().int().optional()).optional(),
|
|
31
|
+
});
|
|
32
|
+
const CreateUnbilledChargeUnbilledChargeTaxProvidersFieldsSchema = z.object({
|
|
33
|
+
provider_name: z.array(z.string().max(50).optional()).optional(),
|
|
34
|
+
field_id: z.array(z.string().max(50).optional()).optional(),
|
|
35
|
+
field_value: z.array(z.string().max(50).optional()).optional(),
|
|
36
|
+
});
|
|
37
|
+
const CreateUnbilledChargeUnbilledChargeBodySchema = z.looseObject({
|
|
38
|
+
subscription_id: z.string().max(50),
|
|
39
|
+
currency_code: z.string().max(3).optional(),
|
|
40
|
+
addons: CreateUnbilledChargeUnbilledChargeAddonsSchema.optional(),
|
|
41
|
+
charges: CreateUnbilledChargeUnbilledChargeChargesSchema.optional(),
|
|
42
|
+
tax_providers_fields: CreateUnbilledChargeUnbilledChargeTaxProvidersFieldsSchema.optional(),
|
|
43
|
+
});
|
|
44
|
+
export { CreateUnbilledChargeUnbilledChargeBodySchema };
|
|
45
|
+
//UnbilledCharge.create
|
|
46
|
+
const CreateUnbilledChargeItemPricesSchema = z.object({
|
|
47
|
+
item_price_id: z.array(z.string().max(100).optional()).optional(),
|
|
48
|
+
quantity: z.array(z.number().int().min(1).optional()).optional(),
|
|
49
|
+
quantity_in_decimal: z.array(z.string().max(33).optional()).optional(),
|
|
50
|
+
unit_price: z.array(z.number().int().min(0).optional()).optional(),
|
|
51
|
+
unit_price_in_decimal: z.array(z.string().max(39).optional()).optional(),
|
|
52
|
+
date_from: z.array(z.number().int().optional()).optional(),
|
|
53
|
+
date_to: z.array(z.number().int().optional()).optional(),
|
|
54
|
+
});
|
|
55
|
+
const CreateUnbilledChargeItemTiersSchema = z.object({
|
|
56
|
+
item_price_id: z.array(z.string().max(100).optional()).optional(),
|
|
57
|
+
starting_unit: z.array(z.number().int().min(1).optional()).optional(),
|
|
58
|
+
ending_unit: z.array(z.number().int().optional()).optional(),
|
|
59
|
+
price: z.array(z.number().int().min(0).optional()).optional(),
|
|
60
|
+
starting_unit_in_decimal: z.array(z.string().max(33).optional()).optional(),
|
|
61
|
+
ending_unit_in_decimal: z.array(z.string().max(33).optional()).optional(),
|
|
62
|
+
price_in_decimal: z.array(z.string().max(39).optional()).optional(),
|
|
63
|
+
pricing_type: z
|
|
64
|
+
.array(z.enum(['per_unit', 'flat_fee', 'package']).optional())
|
|
65
|
+
.optional(),
|
|
66
|
+
package_size: z.array(z.number().int().min(1).optional()).optional(),
|
|
67
|
+
});
|
|
68
|
+
const CreateUnbilledChargeChargesSchema = z.object({
|
|
69
|
+
amount: z.array(z.number().int().min(1).optional()).optional(),
|
|
70
|
+
amount_in_decimal: z.array(z.string().max(39).optional()).optional(),
|
|
71
|
+
description: z.array(z.string().max(250).optional()).optional(),
|
|
72
|
+
taxable: z.array(z.boolean().default(true).optional()).optional(),
|
|
73
|
+
tax_profile_id: z.array(z.string().max(50).optional()).optional(),
|
|
74
|
+
avalara_tax_code: z.array(z.string().max(50).optional()).optional(),
|
|
75
|
+
hsn_code: z.array(z.string().max(50).optional()).optional(),
|
|
76
|
+
taxjar_product_code: z.array(z.string().max(50).optional()).optional(),
|
|
77
|
+
avalara_sale_type: z
|
|
78
|
+
.array(z.enum(['wholesale', 'retail', 'consumed', 'vendor_use']).optional())
|
|
79
|
+
.optional(),
|
|
80
|
+
avalara_transaction_type: z.array(z.number().int().optional()).optional(),
|
|
81
|
+
avalara_service_type: z.array(z.number().int().optional()).optional(),
|
|
82
|
+
date_from: z.array(z.number().int().optional()).optional(),
|
|
83
|
+
date_to: z.array(z.number().int().optional()).optional(),
|
|
84
|
+
});
|
|
85
|
+
const CreateUnbilledChargeTaxProvidersFieldsSchema = z.object({
|
|
86
|
+
provider_name: z.array(z.string().max(50).optional()).optional(),
|
|
87
|
+
field_id: z.array(z.string().max(50).optional()).optional(),
|
|
88
|
+
field_value: z.array(z.string().max(50).optional()).optional(),
|
|
89
|
+
});
|
|
90
|
+
const CreateUnbilledChargeBodySchema = z.looseObject({
|
|
91
|
+
subscription_id: z.string().max(50),
|
|
92
|
+
currency_code: z.string().max(3).optional(),
|
|
93
|
+
item_prices: CreateUnbilledChargeItemPricesSchema.optional(),
|
|
94
|
+
item_tiers: CreateUnbilledChargeItemTiersSchema.optional(),
|
|
95
|
+
charges: CreateUnbilledChargeChargesSchema.optional(),
|
|
96
|
+
tax_providers_fields: CreateUnbilledChargeTaxProvidersFieldsSchema.optional(),
|
|
97
|
+
});
|
|
98
|
+
export { CreateUnbilledChargeBodySchema };
|
|
99
|
+
//UnbilledCharge.invoiceUnbilledCharges
|
|
100
|
+
const InvoiceUnbilledChargesUnbilledChargeBodySchema = z.looseObject({
|
|
101
|
+
subscription_id: z.string().max(50).optional(),
|
|
102
|
+
customer_id: z.string().max(50).optional(),
|
|
103
|
+
});
|
|
104
|
+
export { InvoiceUnbilledChargesUnbilledChargeBodySchema };
|
|
105
|
+
//UnbilledCharge.invoiceNowEstimate
|
|
106
|
+
const InvoiceNowEstimateUnbilledChargeBodySchema = z.looseObject({
|
|
107
|
+
subscription_id: z.string().max(50).optional(),
|
|
108
|
+
customer_id: z.string().max(50).optional(),
|
|
109
|
+
});
|
|
110
|
+
export { InvoiceNowEstimateUnbilledChargeBodySchema };
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
// Generated Zod schemas: Usage
|
|
2
|
+
// Actions: create, retrieve, delete, list, pdf
|
|
3
|
+
// Do not edit manually – regenerate via sdk-generator
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
//Usage.create
|
|
6
|
+
const CreateUsageBodySchema = z.looseObject({
|
|
7
|
+
id: z.string().max(100).optional(),
|
|
8
|
+
item_price_id: z.string().max(100),
|
|
9
|
+
quantity: z.string().max(40),
|
|
10
|
+
usage_date: z.number().int(),
|
|
11
|
+
dedupe_option: z.enum(['skip', 'update_existing']).optional(),
|
|
12
|
+
note: z.string().max(500).optional(),
|
|
13
|
+
});
|
|
14
|
+
export { CreateUsageBodySchema };
|
|
15
|
+
//Usage.retrieve
|
|
16
|
+
const RetrieveUsageBodySchema = z.looseObject({
|
|
17
|
+
id: z.string().max(100),
|
|
18
|
+
});
|
|
19
|
+
export { RetrieveUsageBodySchema };
|
|
20
|
+
//Usage.delete
|
|
21
|
+
const DeleteUsageBodySchema = z.looseObject({
|
|
22
|
+
id: z.string().max(100),
|
|
23
|
+
});
|
|
24
|
+
export { DeleteUsageBodySchema };
|
|
25
|
+
//Usage.list
|
|
26
|
+
const ListUsageIdSchema = z.object({
|
|
27
|
+
is: z.string().min(1).optional(),
|
|
28
|
+
is_not: z.string().min(1).optional(),
|
|
29
|
+
starts_with: z.string().min(1).optional(),
|
|
30
|
+
});
|
|
31
|
+
const ListUsageSubscriptionIdSchema = z.object({
|
|
32
|
+
is: z.string().min(1).optional(),
|
|
33
|
+
is_not: z.string().min(1).optional(),
|
|
34
|
+
starts_with: z.string().min(1).optional(),
|
|
35
|
+
});
|
|
36
|
+
const ListUsageUsageDateSchema = z.object({
|
|
37
|
+
after: z.string().regex(RegExp('^d{10}$')).optional(),
|
|
38
|
+
before: z.string().regex(RegExp('^d{10}$')).optional(),
|
|
39
|
+
on: z.string().regex(RegExp('^d{10}$')).optional(),
|
|
40
|
+
between: z.string().regex(RegExp('^[d{10},d{10}]$')).optional(),
|
|
41
|
+
});
|
|
42
|
+
const ListUsageUpdatedAtSchema = z.object({
|
|
43
|
+
after: z.string().regex(RegExp('^d{10}$')).optional(),
|
|
44
|
+
before: z.string().regex(RegExp('^d{10}$')).optional(),
|
|
45
|
+
on: z.string().regex(RegExp('^d{10}$')).optional(),
|
|
46
|
+
between: z.string().regex(RegExp('^[d{10},d{10}]$')).optional(),
|
|
47
|
+
});
|
|
48
|
+
const ListUsageItemPriceIdSchema = z.object({
|
|
49
|
+
is: z.string().min(1).optional(),
|
|
50
|
+
is_not: z.string().min(1).optional(),
|
|
51
|
+
starts_with: z.string().min(1).optional(),
|
|
52
|
+
});
|
|
53
|
+
const ListUsageInvoiceIdSchema = z.object({
|
|
54
|
+
is: z.string().min(1).optional(),
|
|
55
|
+
is_not: z.string().min(1).optional(),
|
|
56
|
+
starts_with: z.string().min(1).optional(),
|
|
57
|
+
is_present: z.enum(['true', 'false']).optional(),
|
|
58
|
+
});
|
|
59
|
+
const ListUsageSourceSchema = z.object({
|
|
60
|
+
is: z.enum(['admin_console', 'api', 'bulk_operation']).optional(),
|
|
61
|
+
is_not: z.enum(['admin_console', 'api', 'bulk_operation']).optional(),
|
|
62
|
+
in: z.enum(['admin_console', 'api', 'bulk_operation']).optional(),
|
|
63
|
+
not_in: z.enum(['admin_console', 'api', 'bulk_operation']).optional(),
|
|
64
|
+
});
|
|
65
|
+
const ListUsageSortBySchema = z.looseObject({
|
|
66
|
+
asc: z.enum(['usage_date', 'updated_at']).optional(),
|
|
67
|
+
desc: z.enum(['usage_date', 'updated_at']).optional(),
|
|
68
|
+
});
|
|
69
|
+
const ListUsageBodySchema = z.looseObject({
|
|
70
|
+
limit: z.number().int().min(1).max(100).optional(),
|
|
71
|
+
offset: z.string().max(1000).optional(),
|
|
72
|
+
id: ListUsageIdSchema.optional(),
|
|
73
|
+
subscription_id: ListUsageSubscriptionIdSchema.optional(),
|
|
74
|
+
usage_date: ListUsageUsageDateSchema.optional(),
|
|
75
|
+
updated_at: ListUsageUpdatedAtSchema.optional(),
|
|
76
|
+
item_price_id: ListUsageItemPriceIdSchema.optional(),
|
|
77
|
+
invoice_id: ListUsageInvoiceIdSchema.optional(),
|
|
78
|
+
source: ListUsageSourceSchema.optional(),
|
|
79
|
+
sort_by: ListUsageSortBySchema.optional(),
|
|
80
|
+
});
|
|
81
|
+
export { ListUsageBodySchema };
|
|
82
|
+
//Usage.pdf
|
|
83
|
+
const PdfUsageInvoiceSchema = z.object({
|
|
84
|
+
id: z.string().max(50),
|
|
85
|
+
});
|
|
86
|
+
const PdfUsageBodySchema = z.looseObject({
|
|
87
|
+
disposition_type: z.enum(['attachment', 'inline']).optional(),
|
|
88
|
+
invoice: PdfUsageInvoiceSchema.optional(),
|
|
89
|
+
});
|
|
90
|
+
export { PdfUsageBodySchema };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Generated Zod schemas: UsageCharge
|
|
2
|
+
// Actions: retrieveUsageChargesForSubscription
|
|
3
|
+
// Do not edit manually – regenerate via sdk-generator
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
//UsageCharge.retrieveUsageChargesForSubscription
|
|
6
|
+
const RetrieveUsageChargesForSubscriptionUsageChargeFeatureIdSchema = z.object({
|
|
7
|
+
is: z.string().min(1).optional(),
|
|
8
|
+
});
|
|
9
|
+
const RetrieveUsageChargesForSubscriptionUsageChargeBodySchema = z.looseObject({
|
|
10
|
+
limit: z.number().int().min(1).max(100).optional(),
|
|
11
|
+
offset: z.string().max(1000).optional(),
|
|
12
|
+
feature_id: RetrieveUsageChargesForSubscriptionUsageChargeFeatureIdSchema.optional(),
|
|
13
|
+
});
|
|
14
|
+
export { RetrieveUsageChargesForSubscriptionUsageChargeBodySchema };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// Generated Zod schemas: UsageEvent
|
|
2
|
+
// Actions: create, batchIngest
|
|
3
|
+
// Do not edit manually – regenerate via sdk-generator
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
//UsageEvent.create
|
|
6
|
+
const CreateUsageEventPropertiesSchema = z.looseObject({});
|
|
7
|
+
const CreateUsageEventBodySchema = z.looseObject({
|
|
8
|
+
deduplication_id: z.string().max(36),
|
|
9
|
+
subscription_id: z.string().max(50),
|
|
10
|
+
usage_timestamp: z.number().int(),
|
|
11
|
+
properties: CreateUsageEventPropertiesSchema,
|
|
12
|
+
});
|
|
13
|
+
export { CreateUsageEventBodySchema };
|
|
14
|
+
//UsageEvent.batchIngest
|
|
15
|
+
const BatchIngestUsageEventPropertiesItemSchema = z.looseObject({});
|
|
16
|
+
const BatchIngestUsageEventEventsSchema = z.object({
|
|
17
|
+
deduplication_id: z.array(z.string().max(36).optional()),
|
|
18
|
+
subscription_id: z.array(z.string().max(50).optional()),
|
|
19
|
+
usage_timestamp: z.array(z.number().int().optional()),
|
|
20
|
+
properties: z.array(BatchIngestUsageEventPropertiesItemSchema.optional()),
|
|
21
|
+
});
|
|
22
|
+
const BatchIngestUsageEventBodySchema = z.looseObject({
|
|
23
|
+
events: BatchIngestUsageEventEventsSchema.optional(),
|
|
24
|
+
});
|
|
25
|
+
export { BatchIngestUsageEventBodySchema };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Generated Zod schemas: UsageFile
|
|
2
|
+
// Actions: uploadUrl
|
|
3
|
+
// Do not edit manually – regenerate via sdk-generator
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
//UsageFile.uploadUrl
|
|
6
|
+
const UploadUrlUsageFileBodySchema = z.looseObject({
|
|
7
|
+
file_name: z.string().max(150),
|
|
8
|
+
mime_type: z.string().max(100),
|
|
9
|
+
});
|
|
10
|
+
export { UploadUrlUsageFileBodySchema };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Generated Zod schemas: UsageSummary
|
|
2
|
+
// Actions: retrieveUsageSummaryForSubscription
|
|
3
|
+
// Do not edit manually – regenerate via sdk-generator
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
//UsageSummary.retrieveUsageSummaryForSubscription
|
|
6
|
+
const RetrieveUsageSummaryForSubscriptionUsageSummaryBodySchema = z.looseObject({
|
|
7
|
+
limit: z.number().int().min(1).max(100).optional(),
|
|
8
|
+
offset: z.string().max(1000).optional(),
|
|
9
|
+
feature_id: z.string().max(100),
|
|
10
|
+
window_size: z.enum(['month', 'week', 'day', 'hour', 'minute']).optional(),
|
|
11
|
+
timeframe_start: z.number().int().optional(),
|
|
12
|
+
timeframe_end: z.number().int().optional(),
|
|
13
|
+
});
|
|
14
|
+
export { RetrieveUsageSummaryForSubscriptionUsageSummaryBodySchema };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// Generated Zod schemas: VirtualBankAccount
|
|
2
|
+
// Actions: createUsingPermanentToken, create
|
|
3
|
+
// Do not edit manually – regenerate via sdk-generator
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
//VirtualBankAccount.createUsingPermanentToken
|
|
6
|
+
const CreateUsingPermanentTokenVirtualBankAccountBodySchema = z.looseObject({
|
|
7
|
+
customer_id: z.string().max(50),
|
|
8
|
+
reference_id: z.string().max(150),
|
|
9
|
+
gateway_account_id: z.string().max(50).optional(),
|
|
10
|
+
scheme: z
|
|
11
|
+
.enum([
|
|
12
|
+
'ach_credit',
|
|
13
|
+
'sepa_credit',
|
|
14
|
+
'us_automated_bank_transfer',
|
|
15
|
+
'gb_automated_bank_transfer',
|
|
16
|
+
'eu_automated_bank_transfer',
|
|
17
|
+
'jp_automated_bank_transfer',
|
|
18
|
+
'mx_automated_bank_transfer',
|
|
19
|
+
])
|
|
20
|
+
.optional(),
|
|
21
|
+
});
|
|
22
|
+
export { CreateUsingPermanentTokenVirtualBankAccountBodySchema };
|
|
23
|
+
//VirtualBankAccount.create
|
|
24
|
+
const CreateVirtualBankAccountBodySchema = z.looseObject({
|
|
25
|
+
customer_id: z.string().max(50),
|
|
26
|
+
email: z.string().email().max(70).optional(),
|
|
27
|
+
gateway_account_id: z.string().max(50).optional(),
|
|
28
|
+
scheme: z
|
|
29
|
+
.enum([
|
|
30
|
+
'ach_credit',
|
|
31
|
+
'sepa_credit',
|
|
32
|
+
'us_automated_bank_transfer',
|
|
33
|
+
'gb_automated_bank_transfer',
|
|
34
|
+
'eu_automated_bank_transfer',
|
|
35
|
+
'jp_automated_bank_transfer',
|
|
36
|
+
'mx_automated_bank_transfer',
|
|
37
|
+
])
|
|
38
|
+
.optional(),
|
|
39
|
+
});
|
|
40
|
+
export { CreateVirtualBankAccountBodySchema };
|