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,288 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Generated Zod schemas: CreditNote
|
|
3
|
+
// Actions: create, retrieve, pdf, refund, recordRefund, voidCreditNote, creditNotesForCustomer, delete, removeTaxWithheldRefund, importCreditNote
|
|
4
|
+
// Do not edit manually – regenerate via sdk-generator
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ImportCreditNoteCreditNoteBodySchema = exports.RemoveTaxWithheldRefundCreditNoteBodySchema = exports.DeleteCreditNoteBodySchema = exports.CreditNotesForCustomerCreditNoteBodySchema = exports.VoidCreditNoteCreditNoteBodySchema = exports.RecordRefundCreditNoteBodySchema = exports.RefundCreditNoteBodySchema = exports.PdfCreditNoteBodySchema = exports.RetrieveCreditNoteBodySchema = exports.CreateCreditNoteBodySchema = void 0;
|
|
7
|
+
const zod_1 = require("zod");
|
|
8
|
+
//CreditNote.create
|
|
9
|
+
const CreateCreditNoteLineItemsSchema = zod_1.z.object({
|
|
10
|
+
reference_line_item_id: zod_1.z.array(zod_1.z.string().max(40).optional()).optional(),
|
|
11
|
+
unit_amount: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
|
|
12
|
+
unit_amount_in_decimal: zod_1.z.array(zod_1.z.string().max(39).optional()).optional(),
|
|
13
|
+
quantity: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
|
|
14
|
+
quantity_in_decimal: zod_1.z.array(zod_1.z.string().max(33).optional()).optional(),
|
|
15
|
+
amount: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
|
|
16
|
+
date_from: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
|
|
17
|
+
date_to: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
|
|
18
|
+
description: zod_1.z.array(zod_1.z.string().max(250).optional()).optional(),
|
|
19
|
+
entity_type: zod_1.z
|
|
20
|
+
.array(zod_1.z
|
|
21
|
+
.enum([
|
|
22
|
+
'adhoc',
|
|
23
|
+
'plan_item_price',
|
|
24
|
+
'addon_item_price',
|
|
25
|
+
'charge_item_price',
|
|
26
|
+
'plan',
|
|
27
|
+
'addon',
|
|
28
|
+
])
|
|
29
|
+
.optional())
|
|
30
|
+
.optional(),
|
|
31
|
+
entity_id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
|
|
32
|
+
});
|
|
33
|
+
const CreateCreditNoteBodySchema = zod_1.z.looseObject({
|
|
34
|
+
reference_invoice_id: zod_1.z.string().max(50).optional(),
|
|
35
|
+
customer_id: zod_1.z.string().max(50).optional(),
|
|
36
|
+
total: zod_1.z.number().int().min(0).optional(),
|
|
37
|
+
type: zod_1.z.enum(['adjustment', 'refundable', 'store']),
|
|
38
|
+
reason_code: zod_1.z
|
|
39
|
+
.enum([
|
|
40
|
+
'product_unsatisfactory',
|
|
41
|
+
'service_unsatisfactory',
|
|
42
|
+
'order_change',
|
|
43
|
+
'order_cancellation',
|
|
44
|
+
'waiver',
|
|
45
|
+
'other',
|
|
46
|
+
])
|
|
47
|
+
.optional(),
|
|
48
|
+
create_reason_code: zod_1.z.string().max(100).optional(),
|
|
49
|
+
date: zod_1.z.number().int().optional(),
|
|
50
|
+
customer_notes: zod_1.z.string().max(2000).optional(),
|
|
51
|
+
currency_code: zod_1.z.string().max(3).optional(),
|
|
52
|
+
comment: zod_1.z.string().max(300).optional(),
|
|
53
|
+
line_items: CreateCreditNoteLineItemsSchema.optional(),
|
|
54
|
+
});
|
|
55
|
+
exports.CreateCreditNoteBodySchema = CreateCreditNoteBodySchema;
|
|
56
|
+
//CreditNote.retrieve
|
|
57
|
+
const RetrieveCreditNoteSubscriptionIdSchema = zod_1.z.object({
|
|
58
|
+
is: zod_1.z.string().min(1).optional(),
|
|
59
|
+
});
|
|
60
|
+
const RetrieveCreditNoteCustomerIdSchema = zod_1.z.object({
|
|
61
|
+
is: zod_1.z.string().min(1).optional(),
|
|
62
|
+
});
|
|
63
|
+
const RetrieveCreditNoteLineItemSchema = zod_1.z.object({
|
|
64
|
+
subscription_id: RetrieveCreditNoteSubscriptionIdSchema.optional(),
|
|
65
|
+
customer_id: RetrieveCreditNoteCustomerIdSchema.optional(),
|
|
66
|
+
});
|
|
67
|
+
const RetrieveCreditNoteBodySchema = zod_1.z.looseObject({
|
|
68
|
+
line_items_limit: zod_1.z.number().int().min(1).max(300).optional(),
|
|
69
|
+
line_items_offset: zod_1.z.string().max(1000).optional(),
|
|
70
|
+
line_item: RetrieveCreditNoteLineItemSchema.optional(),
|
|
71
|
+
});
|
|
72
|
+
exports.RetrieveCreditNoteBodySchema = RetrieveCreditNoteBodySchema;
|
|
73
|
+
//CreditNote.pdf
|
|
74
|
+
const PdfCreditNoteBodySchema = zod_1.z.looseObject({
|
|
75
|
+
disposition_type: zod_1.z.enum(['attachment', 'inline']).optional(),
|
|
76
|
+
});
|
|
77
|
+
exports.PdfCreditNoteBodySchema = PdfCreditNoteBodySchema;
|
|
78
|
+
//CreditNote.refund
|
|
79
|
+
const RefundCreditNoteBodySchema = zod_1.z.looseObject({
|
|
80
|
+
refund_amount: zod_1.z.number().int().min(1).optional(),
|
|
81
|
+
customer_notes: zod_1.z.string().max(2000).optional(),
|
|
82
|
+
refund_reason_code: zod_1.z.string().max(100).optional(),
|
|
83
|
+
});
|
|
84
|
+
exports.RefundCreditNoteBodySchema = RefundCreditNoteBodySchema;
|
|
85
|
+
//CreditNote.recordRefund
|
|
86
|
+
const RecordRefundCreditNoteTransactionSchema = zod_1.z.object({
|
|
87
|
+
id: zod_1.z.string().max(40).optional(),
|
|
88
|
+
amount: zod_1.z.number().int().min(0).optional(),
|
|
89
|
+
payment_method: zod_1.z.enum([
|
|
90
|
+
'cash',
|
|
91
|
+
'check',
|
|
92
|
+
'chargeback',
|
|
93
|
+
'bank_transfer',
|
|
94
|
+
'other',
|
|
95
|
+
'app_store',
|
|
96
|
+
'play_store',
|
|
97
|
+
'custom',
|
|
98
|
+
]),
|
|
99
|
+
reference_number: zod_1.z.string().max(100).optional(),
|
|
100
|
+
custom_payment_method_id: zod_1.z.string().max(50).optional(),
|
|
101
|
+
date: zod_1.z.number().int(),
|
|
102
|
+
});
|
|
103
|
+
const RecordRefundCreditNoteBodySchema = zod_1.z.looseObject({
|
|
104
|
+
refund_reason_code: zod_1.z.string().max(100).optional(),
|
|
105
|
+
comment: zod_1.z.string().max(300).optional(),
|
|
106
|
+
transaction: RecordRefundCreditNoteTransactionSchema.optional(),
|
|
107
|
+
});
|
|
108
|
+
exports.RecordRefundCreditNoteBodySchema = RecordRefundCreditNoteBodySchema;
|
|
109
|
+
//CreditNote.voidCreditNote
|
|
110
|
+
const VoidCreditNoteCreditNoteBodySchema = zod_1.z.looseObject({
|
|
111
|
+
comment: zod_1.z.string().max(300).optional(),
|
|
112
|
+
});
|
|
113
|
+
exports.VoidCreditNoteCreditNoteBodySchema = VoidCreditNoteCreditNoteBodySchema;
|
|
114
|
+
//CreditNote.creditNotesForCustomer
|
|
115
|
+
const CreditNotesForCustomerCreditNoteBodySchema = zod_1.z.looseObject({
|
|
116
|
+
limit: zod_1.z.number().int().min(1).max(100).optional(),
|
|
117
|
+
offset: zod_1.z.string().max(1000).optional(),
|
|
118
|
+
});
|
|
119
|
+
exports.CreditNotesForCustomerCreditNoteBodySchema = CreditNotesForCustomerCreditNoteBodySchema;
|
|
120
|
+
//CreditNote.delete
|
|
121
|
+
const DeleteCreditNoteBodySchema = zod_1.z.looseObject({
|
|
122
|
+
comment: zod_1.z.string().max(300).optional(),
|
|
123
|
+
});
|
|
124
|
+
exports.DeleteCreditNoteBodySchema = DeleteCreditNoteBodySchema;
|
|
125
|
+
//CreditNote.removeTaxWithheldRefund
|
|
126
|
+
const RemoveTaxWithheldRefundCreditNoteTaxWithheldSchema = zod_1.z.object({
|
|
127
|
+
id: zod_1.z.string().max(40),
|
|
128
|
+
});
|
|
129
|
+
const RemoveTaxWithheldRefundCreditNoteBodySchema = zod_1.z.looseObject({
|
|
130
|
+
tax_withheld: RemoveTaxWithheldRefundCreditNoteTaxWithheldSchema.optional(),
|
|
131
|
+
});
|
|
132
|
+
exports.RemoveTaxWithheldRefundCreditNoteBodySchema = RemoveTaxWithheldRefundCreditNoteBodySchema;
|
|
133
|
+
//CreditNote.importCreditNote
|
|
134
|
+
const ImportCreditNoteCreditNoteLineItemsSchema = zod_1.z.object({
|
|
135
|
+
reference_line_item_id: zod_1.z.array(zod_1.z.string().max(40).optional()).optional(),
|
|
136
|
+
id: zod_1.z.array(zod_1.z.string().max(40).optional()).optional(),
|
|
137
|
+
date_from: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
|
|
138
|
+
date_to: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
|
|
139
|
+
subscription_id: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
|
|
140
|
+
description: zod_1.z.array(zod_1.z.string().max(250).optional()),
|
|
141
|
+
unit_amount: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
|
|
142
|
+
quantity: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
|
|
143
|
+
amount: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
|
|
144
|
+
unit_amount_in_decimal: zod_1.z.array(zod_1.z.string().max(39).optional()).optional(),
|
|
145
|
+
quantity_in_decimal: zod_1.z.array(zod_1.z.string().max(33).optional()).optional(),
|
|
146
|
+
amount_in_decimal: zod_1.z.array(zod_1.z.string().max(39).optional()).optional(),
|
|
147
|
+
entity_type: zod_1.z
|
|
148
|
+
.array(zod_1.z
|
|
149
|
+
.enum([
|
|
150
|
+
'adhoc',
|
|
151
|
+
'plan_item_price',
|
|
152
|
+
'addon_item_price',
|
|
153
|
+
'charge_item_price',
|
|
154
|
+
'plan_setup',
|
|
155
|
+
'plan',
|
|
156
|
+
'addon',
|
|
157
|
+
])
|
|
158
|
+
.optional())
|
|
159
|
+
.optional(),
|
|
160
|
+
entity_id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
|
|
161
|
+
item_level_discount1_entity_id: zod_1.z
|
|
162
|
+
.array(zod_1.z.string().max(100).optional())
|
|
163
|
+
.optional(),
|
|
164
|
+
item_level_discount1_amount: zod_1.z
|
|
165
|
+
.array(zod_1.z.number().int().min(0).optional())
|
|
166
|
+
.optional(),
|
|
167
|
+
item_level_discount2_entity_id: zod_1.z
|
|
168
|
+
.array(zod_1.z.string().max(100).optional())
|
|
169
|
+
.optional(),
|
|
170
|
+
item_level_discount2_amount: zod_1.z
|
|
171
|
+
.array(zod_1.z.number().int().min(0).optional())
|
|
172
|
+
.optional(),
|
|
173
|
+
tax1_name: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
|
|
174
|
+
tax1_amount: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
|
|
175
|
+
tax2_name: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
|
|
176
|
+
tax2_amount: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
|
|
177
|
+
tax3_name: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
|
|
178
|
+
tax3_amount: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
|
|
179
|
+
tax4_name: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
|
|
180
|
+
tax4_amount: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
|
|
181
|
+
tax5_name: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
|
|
182
|
+
tax5_amount: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
|
|
183
|
+
tax6_name: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
|
|
184
|
+
tax6_amount: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
|
|
185
|
+
tax7_name: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
|
|
186
|
+
tax7_amount: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
|
|
187
|
+
tax8_name: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
|
|
188
|
+
tax8_amount: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
|
|
189
|
+
tax9_name: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
|
|
190
|
+
tax9_amount: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
|
|
191
|
+
tax10_name: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
|
|
192
|
+
tax10_amount: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
|
|
193
|
+
});
|
|
194
|
+
const ImportCreditNoteCreditNoteLineItemTiersSchema = zod_1.z.object({
|
|
195
|
+
line_item_id: zod_1.z.array(zod_1.z.string().max(40).optional()),
|
|
196
|
+
starting_unit: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
|
|
197
|
+
ending_unit: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
|
|
198
|
+
quantity_used: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
|
|
199
|
+
unit_amount: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
|
|
200
|
+
starting_unit_in_decimal: zod_1.z.array(zod_1.z.string().max(33).optional()).optional(),
|
|
201
|
+
ending_unit_in_decimal: zod_1.z.array(zod_1.z.string().max(33).optional()).optional(),
|
|
202
|
+
quantity_used_in_decimal: zod_1.z.array(zod_1.z.string().max(33).optional()).optional(),
|
|
203
|
+
unit_amount_in_decimal: zod_1.z.array(zod_1.z.string().max(40).optional()).optional(),
|
|
204
|
+
});
|
|
205
|
+
const ImportCreditNoteCreditNoteDiscountsSchema = zod_1.z.object({
|
|
206
|
+
line_item_id: zod_1.z.array(zod_1.z.string().max(40).optional()).optional(),
|
|
207
|
+
entity_type: zod_1.z.array(zod_1.z
|
|
208
|
+
.enum([
|
|
209
|
+
'item_level_coupon',
|
|
210
|
+
'document_level_coupon',
|
|
211
|
+
'promotional_credits',
|
|
212
|
+
'item_level_discount',
|
|
213
|
+
'document_level_discount',
|
|
214
|
+
])
|
|
215
|
+
.optional()),
|
|
216
|
+
entity_id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
|
|
217
|
+
description: zod_1.z.array(zod_1.z.string().max(250).optional()).optional(),
|
|
218
|
+
amount: zod_1.z.array(zod_1.z.number().int().min(0).optional()),
|
|
219
|
+
});
|
|
220
|
+
const ImportCreditNoteCreditNoteTaxesSchema = zod_1.z.object({
|
|
221
|
+
name: zod_1.z.array(zod_1.z.string().max(100).optional()),
|
|
222
|
+
rate: zod_1.z.array(zod_1.z.number().min(0).max(100).optional()),
|
|
223
|
+
amount: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
|
|
224
|
+
description: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
|
|
225
|
+
juris_type: zod_1.z
|
|
226
|
+
.array(zod_1.z
|
|
227
|
+
.enum([
|
|
228
|
+
'country',
|
|
229
|
+
'federal',
|
|
230
|
+
'state',
|
|
231
|
+
'county',
|
|
232
|
+
'city',
|
|
233
|
+
'special',
|
|
234
|
+
'unincorporated',
|
|
235
|
+
'other',
|
|
236
|
+
])
|
|
237
|
+
.optional())
|
|
238
|
+
.optional(),
|
|
239
|
+
juris_name: zod_1.z.array(zod_1.z.string().max(250).optional()).optional(),
|
|
240
|
+
juris_code: zod_1.z.array(zod_1.z.string().max(250).optional()).optional(),
|
|
241
|
+
});
|
|
242
|
+
const ImportCreditNoteCreditNoteAllocationsSchema = zod_1.z.object({
|
|
243
|
+
invoice_id: zod_1.z.array(zod_1.z.string().max(50).optional()),
|
|
244
|
+
allocated_amount: zod_1.z.array(zod_1.z.number().int().min(1).optional()),
|
|
245
|
+
allocated_at: zod_1.z.array(zod_1.z.number().int().optional()),
|
|
246
|
+
});
|
|
247
|
+
const ImportCreditNoteCreditNoteLinkedRefundsSchema = zod_1.z.object({
|
|
248
|
+
id: zod_1.z.array(zod_1.z.string().max(40).optional()).optional(),
|
|
249
|
+
amount: zod_1.z.array(zod_1.z.number().int().min(1).optional()),
|
|
250
|
+
payment_method: zod_1.z.array(zod_1.z
|
|
251
|
+
.enum([
|
|
252
|
+
'cash',
|
|
253
|
+
'check',
|
|
254
|
+
'bank_transfer',
|
|
255
|
+
'other',
|
|
256
|
+
'app_store',
|
|
257
|
+
'play_store',
|
|
258
|
+
'custom',
|
|
259
|
+
])
|
|
260
|
+
.optional()),
|
|
261
|
+
date: zod_1.z.array(zod_1.z.number().int().optional()),
|
|
262
|
+
reference_number: zod_1.z.array(zod_1.z.string().max(100).min(1).optional()).optional(),
|
|
263
|
+
});
|
|
264
|
+
const ImportCreditNoteCreditNoteBodySchema = zod_1.z.looseObject({
|
|
265
|
+
id: zod_1.z.string().max(50),
|
|
266
|
+
customer_id: zod_1.z.string().max(50).optional(),
|
|
267
|
+
subscription_id: zod_1.z.string().max(50).optional(),
|
|
268
|
+
reference_invoice_id: zod_1.z.string().max(50),
|
|
269
|
+
type: zod_1.z.enum(['adjustment', 'refundable', 'store']),
|
|
270
|
+
currency_code: zod_1.z.string().max(3).optional(),
|
|
271
|
+
create_reason_code: zod_1.z.string().max(100),
|
|
272
|
+
date: zod_1.z.number().int(),
|
|
273
|
+
status: zod_1.z.enum(['adjusted', 'refunded', 'refund_due', 'voided']).optional(),
|
|
274
|
+
total: zod_1.z.number().int().min(0).optional(),
|
|
275
|
+
refunded_at: zod_1.z.number().int().optional(),
|
|
276
|
+
voided_at: zod_1.z.number().int().optional(),
|
|
277
|
+
sub_total: zod_1.z.number().int().min(0).optional(),
|
|
278
|
+
round_off_amount: zod_1.z.number().int().min(-99).max(99).optional(),
|
|
279
|
+
fractional_correction: zod_1.z.number().int().min(-50000).max(50000).optional(),
|
|
280
|
+
vat_number_prefix: zod_1.z.string().max(10).optional(),
|
|
281
|
+
line_items: ImportCreditNoteCreditNoteLineItemsSchema.optional(),
|
|
282
|
+
line_item_tiers: ImportCreditNoteCreditNoteLineItemTiersSchema.optional(),
|
|
283
|
+
discounts: ImportCreditNoteCreditNoteDiscountsSchema.optional(),
|
|
284
|
+
taxes: ImportCreditNoteCreditNoteTaxesSchema.optional(),
|
|
285
|
+
allocations: ImportCreditNoteCreditNoteAllocationsSchema.optional(),
|
|
286
|
+
linked_refunds: ImportCreditNoteCreditNoteLinkedRefundsSchema.optional(),
|
|
287
|
+
});
|
|
288
|
+
exports.ImportCreditNoteCreditNoteBodySchema = ImportCreditNoteCreditNoteBodySchema;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Generated Zod schemas: Currency
|
|
3
|
+
// Actions: list, create, update, addSchedule
|
|
4
|
+
// Do not edit manually – regenerate via sdk-generator
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.AddScheduleCurrencyBodySchema = exports.UpdateCurrencyBodySchema = exports.CreateCurrencyBodySchema = exports.ListCurrencyBodySchema = void 0;
|
|
7
|
+
const zod_1 = require("zod");
|
|
8
|
+
//Currency.list
|
|
9
|
+
const ListCurrencyBodySchema = 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
|
+
});
|
|
13
|
+
exports.ListCurrencyBodySchema = ListCurrencyBodySchema;
|
|
14
|
+
//Currency.create
|
|
15
|
+
const CreateCurrencyBodySchema = zod_1.z.looseObject({
|
|
16
|
+
currency_code: zod_1.z.string().max(3),
|
|
17
|
+
forex_type: zod_1.z.enum(['manual', 'auto']),
|
|
18
|
+
manual_exchange_rate: zod_1.z.string().max(20).optional(),
|
|
19
|
+
});
|
|
20
|
+
exports.CreateCurrencyBodySchema = CreateCurrencyBodySchema;
|
|
21
|
+
//Currency.update
|
|
22
|
+
const UpdateCurrencyBodySchema = zod_1.z.looseObject({
|
|
23
|
+
forex_type: zod_1.z.enum(['manual', 'auto']),
|
|
24
|
+
manual_exchange_rate: zod_1.z.string().max(20).optional(),
|
|
25
|
+
});
|
|
26
|
+
exports.UpdateCurrencyBodySchema = UpdateCurrencyBodySchema;
|
|
27
|
+
//Currency.addSchedule
|
|
28
|
+
const AddScheduleCurrencyBodySchema = zod_1.z.looseObject({
|
|
29
|
+
manual_exchange_rate: zod_1.z.string().max(20),
|
|
30
|
+
schedule_at: zod_1.z.number().int(),
|
|
31
|
+
});
|
|
32
|
+
exports.AddScheduleCurrencyBodySchema = AddScheduleCurrencyBodySchema;
|