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