chargebee 3.26.0 → 3.28.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 +14 -1
- package/README.md +131 -0
- package/cjs/RequestWrapper.js +130 -12
- package/cjs/chargebee.cjs.js +5 -0
- package/cjs/chargebee.cjs.worker.js +2 -0
- package/cjs/chargebeeZodValidationError.js +18 -0
- package/cjs/createChargebee.js +23 -2
- package/cjs/environment.js +1 -1
- package/cjs/schema/addon.schema.js +269 -0
- package/cjs/schema/address.schema.js +35 -0
- package/cjs/schema/alert.schema.js +74 -0
- package/cjs/schema/alert_status.schema.js +31 -0
- package/cjs/schema/attached_item.schema.js +144 -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 +323 -0
- package/cjs/schema/coupon_code.schema.js +49 -0
- package/cjs/schema/coupon_set.schema.js +88 -0
- package/cjs/schema/credit_note.schema.js +502 -0
- package/cjs/schema/currency.schema.js +32 -0
- package/cjs/schema/customer.schema.js +1201 -0
- package/cjs/schema/customer_entitlement.schema.js +14 -0
- package/cjs/schema/differential_price.schema.js +106 -0
- package/cjs/schema/entitlement.schema.js +54 -0
- package/cjs/schema/entitlement_override.schema.js +35 -0
- package/cjs/schema/estimate.schema.js +1535 -0
- package/cjs/schema/event.schema.js +1060 -0
- package/cjs/schema/export.schema.js +3385 -0
- package/cjs/schema/feature.schema.js +78 -0
- package/cjs/schema/gift.schema.js +293 -0
- package/cjs/schema/grant_block.schema.js +47 -0
- package/cjs/schema/hosted_page.schema.js +1777 -0
- package/cjs/schema/in_app_subscription.schema.js +68 -0
- package/cjs/schema/index.js +88 -0
- package/cjs/schema/invoice.schema.js +1685 -0
- package/cjs/schema/item.schema.js +195 -0
- package/cjs/schema/item_entitlement.schema.js +45 -0
- package/cjs/schema/item_family.schema.js +57 -0
- package/cjs/schema/item_price.schema.js +335 -0
- package/cjs/schema/ledger_account_balance.schema.js +21 -0
- package/cjs/schema/ledger_operation.schema.js +104 -0
- package/cjs/schema/meter.schema.js +13 -0
- package/cjs/schema/metered_feature.schema.js +20 -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 +122 -0
- package/cjs/schema/omnichannel_subscription_item.schema.js +13 -0
- package/cjs/schema/order.schema.js +441 -0
- package/cjs/schema/payment_intent.schema.js +127 -0
- package/cjs/schema/payment_schedule_scheme.schema.js +20 -0
- package/cjs/schema/payment_source.schema.js +630 -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 +363 -0
- package/cjs/schema/portal_session.schema.js +22 -0
- package/cjs/schema/price_variant.schema.js +93 -0
- package/cjs/schema/pricing_page_session.schema.js +135 -0
- package/cjs/schema/promotional_credit.schema.js +78 -0
- package/cjs/schema/promotional_grant.schema.js +17 -0
- package/cjs/schema/purchase.schema.js +277 -0
- package/cjs/schema/quote.schema.js +1667 -0
- package/cjs/schema/ramp.schema.js +245 -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 +3344 -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 +744 -0
- package/cjs/schema/unbilled_charge.schema.js +139 -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 +71 -0
- package/cjs/schema/webhook_endpoint.schema.js +508 -0
- package/cjs/telemetry/TelemetryAdapter.js +145 -0
- package/cjs/telemetry/index.js +28 -0
- package/cjs/telemetry/otel.js +66 -0
- package/cjs/telemetry/types.js +47 -0
- package/cjs/validationLoader.js +59 -0
- package/esm/RequestWrapper.js +130 -12
- package/esm/chargebee.esm.js +3 -0
- package/esm/chargebee.esm.worker.js +1 -0
- package/esm/chargebeeZodValidationError.js +14 -0
- package/esm/createChargebee.js +23 -2
- package/esm/environment.js +1 -1
- package/esm/schema/addon.schema.js +266 -0
- package/esm/schema/address.schema.js +32 -0
- package/esm/schema/alert.schema.js +71 -0
- package/esm/schema/alert_status.schema.js +28 -0
- package/esm/schema/attached_item.schema.js +141 -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 +320 -0
- package/esm/schema/coupon_code.schema.js +46 -0
- package/esm/schema/coupon_set.schema.js +85 -0
- package/esm/schema/credit_note.schema.js +499 -0
- package/esm/schema/currency.schema.js +29 -0
- package/esm/schema/customer.schema.js +1198 -0
- package/esm/schema/customer_entitlement.schema.js +11 -0
- package/esm/schema/differential_price.schema.js +103 -0
- package/esm/schema/entitlement.schema.js +51 -0
- package/esm/schema/entitlement_override.schema.js +32 -0
- package/esm/schema/estimate.schema.js +1532 -0
- package/esm/schema/event.schema.js +1057 -0
- package/esm/schema/export.schema.js +3382 -0
- package/esm/schema/feature.schema.js +75 -0
- package/esm/schema/gift.schema.js +290 -0
- package/esm/schema/grant_block.schema.js +44 -0
- package/esm/schema/hosted_page.schema.js +1774 -0
- package/esm/schema/in_app_subscription.schema.js +65 -0
- package/esm/schema/index.js +72 -0
- package/esm/schema/invoice.schema.js +1682 -0
- package/esm/schema/item.schema.js +192 -0
- package/esm/schema/item_entitlement.schema.js +42 -0
- package/esm/schema/item_family.schema.js +54 -0
- package/esm/schema/item_price.schema.js +332 -0
- package/esm/schema/ledger_account_balance.schema.js +18 -0
- package/esm/schema/ledger_operation.schema.js +101 -0
- package/esm/schema/meter.schema.js +10 -0
- package/esm/schema/metered_feature.schema.js +17 -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 +119 -0
- package/esm/schema/omnichannel_subscription_item.schema.js +10 -0
- package/esm/schema/order.schema.js +438 -0
- package/esm/schema/payment_intent.schema.js +124 -0
- package/esm/schema/payment_schedule_scheme.schema.js +17 -0
- package/esm/schema/payment_source.schema.js +627 -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 +360 -0
- package/esm/schema/portal_session.schema.js +19 -0
- package/esm/schema/price_variant.schema.js +90 -0
- package/esm/schema/pricing_page_session.schema.js +132 -0
- package/esm/schema/promotional_credit.schema.js +75 -0
- package/esm/schema/promotional_grant.schema.js +14 -0
- package/esm/schema/purchase.schema.js +274 -0
- package/esm/schema/quote.schema.js +1664 -0
- package/esm/schema/ramp.schema.js +242 -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 +3341 -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 +741 -0
- package/esm/schema/unbilled_charge.schema.js +136 -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 +68 -0
- package/esm/schema/webhook_endpoint.schema.js +505 -0
- package/esm/telemetry/TelemetryAdapter.js +132 -0
- package/esm/telemetry/index.js +8 -0
- package/esm/telemetry/otel.js +62 -0
- package/esm/telemetry/types.js +44 -0
- package/esm/validationLoader.js +56 -0
- package/package.json +43 -24
- package/types/core.d.ts +2 -0
- package/types/index.d.ts +85 -0
- package/types/telemetry/otel.d.ts +22 -0
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Generated Zod schemas: Addon
|
|
3
|
+
// Actions: create, update, list, copy
|
|
4
|
+
// Do not edit manually – regenerate via sdk-generator
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.CopyAddonBodySchema = exports.ListAddonBodySchema = exports.UpdateAddonBodySchema = exports.CreateAddonBodySchema = void 0;
|
|
7
|
+
const zod_1 = require("zod");
|
|
8
|
+
//Addon.create
|
|
9
|
+
const CreateAddonMetaDataSchema = zod_1.z.looseObject({});
|
|
10
|
+
const CreateAddonTiersSchema = zod_1.z.object({
|
|
11
|
+
starting_unit: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
|
|
12
|
+
ending_unit: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
|
|
13
|
+
price: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
|
|
14
|
+
starting_unit_in_decimal: zod_1.z.array(zod_1.z.string().max(33).optional()).optional(),
|
|
15
|
+
ending_unit_in_decimal: zod_1.z.array(zod_1.z.string().max(33).optional()).optional(),
|
|
16
|
+
price_in_decimal: zod_1.z.array(zod_1.z.string().max(39).optional()).optional(),
|
|
17
|
+
});
|
|
18
|
+
const CreateAddonTaxProvidersFieldsSchema = zod_1.z.object({
|
|
19
|
+
provider_name: zod_1.z.array(zod_1.z.string().max(50).optional()),
|
|
20
|
+
field_id: zod_1.z.array(zod_1.z.string().max(50).optional()),
|
|
21
|
+
field_value: zod_1.z.array(zod_1.z.string().max(50).optional()),
|
|
22
|
+
});
|
|
23
|
+
const CreateAddonBodySchema = zod_1.z.looseObject({
|
|
24
|
+
id: zod_1.z.string().max(100),
|
|
25
|
+
name: zod_1.z.string().max(100),
|
|
26
|
+
invoice_name: zod_1.z.string().max(100).optional(),
|
|
27
|
+
description: zod_1.z.string().max(2000).optional(),
|
|
28
|
+
charge_type: zod_1.z.enum(['recurring', 'non_recurring']),
|
|
29
|
+
price: zod_1.z.number().int().min(0).optional(),
|
|
30
|
+
currency_code: zod_1.z.string().max(3).optional(),
|
|
31
|
+
period: zod_1.z.number().int().min(1).optional(),
|
|
32
|
+
period_unit: zod_1.z
|
|
33
|
+
.enum(['day', 'week', 'month', 'year', 'not_applicable'])
|
|
34
|
+
.optional(),
|
|
35
|
+
pricing_model: zod_1.z
|
|
36
|
+
.enum(['flat_fee', 'per_unit', 'tiered', 'volume', 'stairstep'])
|
|
37
|
+
.optional(),
|
|
38
|
+
type: zod_1.z
|
|
39
|
+
.enum(['on_off', 'quantity', 'tiered', 'volume', 'stairstep'])
|
|
40
|
+
.optional(),
|
|
41
|
+
unit: zod_1.z.string().max(30).optional(),
|
|
42
|
+
enabled_in_portal: zod_1.z.boolean().default(true).optional(),
|
|
43
|
+
taxable: zod_1.z.boolean().default(true).optional(),
|
|
44
|
+
tax_profile_id: zod_1.z.string().max(50).optional(),
|
|
45
|
+
avalara_sale_type: zod_1.z
|
|
46
|
+
.enum(['wholesale', 'retail', 'consumed', 'vendor_use'])
|
|
47
|
+
.optional(),
|
|
48
|
+
avalara_transaction_type: zod_1.z.number().int().optional(),
|
|
49
|
+
avalara_service_type: zod_1.z.number().int().optional(),
|
|
50
|
+
tax_code: zod_1.z.string().max(50).optional(),
|
|
51
|
+
hsn_code: zod_1.z.string().max(50).optional(),
|
|
52
|
+
taxjar_product_code: zod_1.z.string().max(50).optional(),
|
|
53
|
+
invoice_notes: zod_1.z.string().max(2000).optional(),
|
|
54
|
+
meta_data: CreateAddonMetaDataSchema.optional(),
|
|
55
|
+
sku: zod_1.z.string().max(100).optional(),
|
|
56
|
+
accounting_code: zod_1.z.string().max(100).optional(),
|
|
57
|
+
accounting_category1: zod_1.z.string().max(100).optional(),
|
|
58
|
+
accounting_category2: zod_1.z.string().max(100).optional(),
|
|
59
|
+
accounting_category3: zod_1.z.string().max(100).optional(),
|
|
60
|
+
accounting_category4: zod_1.z.string().max(100).optional(),
|
|
61
|
+
is_shippable: zod_1.z.boolean().default(false).optional(),
|
|
62
|
+
shipping_frequency_period: zod_1.z.number().int().min(1).optional(),
|
|
63
|
+
shipping_frequency_period_unit: zod_1.z
|
|
64
|
+
.enum(['year', 'month', 'week', 'day'])
|
|
65
|
+
.optional(),
|
|
66
|
+
included_in_mrr: zod_1.z.boolean().optional(),
|
|
67
|
+
show_description_in_invoices: zod_1.z.boolean().default(false).optional(),
|
|
68
|
+
show_description_in_quotes: zod_1.z.boolean().default(false).optional(),
|
|
69
|
+
price_in_decimal: zod_1.z.string().max(39).optional(),
|
|
70
|
+
proration_type: zod_1.z
|
|
71
|
+
.enum(['site_default', 'partial_term', 'full_term'])
|
|
72
|
+
.optional(),
|
|
73
|
+
status: zod_1.z.enum(['active', 'archived']).optional(),
|
|
74
|
+
tiers: CreateAddonTiersSchema.optional(),
|
|
75
|
+
tax_providers_fields: CreateAddonTaxProvidersFieldsSchema.optional(),
|
|
76
|
+
});
|
|
77
|
+
exports.CreateAddonBodySchema = CreateAddonBodySchema;
|
|
78
|
+
//Addon.update
|
|
79
|
+
const UpdateAddonMetaDataSchema = zod_1.z.looseObject({});
|
|
80
|
+
const UpdateAddonTiersSchema = zod_1.z.object({
|
|
81
|
+
starting_unit: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
|
|
82
|
+
ending_unit: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
|
|
83
|
+
price: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
|
|
84
|
+
starting_unit_in_decimal: zod_1.z.array(zod_1.z.string().max(33).optional()).optional(),
|
|
85
|
+
ending_unit_in_decimal: zod_1.z.array(zod_1.z.string().max(33).optional()).optional(),
|
|
86
|
+
price_in_decimal: zod_1.z.array(zod_1.z.string().max(39).optional()).optional(),
|
|
87
|
+
});
|
|
88
|
+
const UpdateAddonTaxProvidersFieldsSchema = zod_1.z.object({
|
|
89
|
+
provider_name: zod_1.z.array(zod_1.z.string().max(50).optional()),
|
|
90
|
+
field_id: zod_1.z.array(zod_1.z.string().max(50).optional()),
|
|
91
|
+
field_value: zod_1.z.array(zod_1.z.string().max(50).optional()),
|
|
92
|
+
});
|
|
93
|
+
const UpdateAddonBodySchema = zod_1.z.looseObject({
|
|
94
|
+
name: zod_1.z.string().max(100).optional(),
|
|
95
|
+
invoice_name: zod_1.z.string().max(100).optional(),
|
|
96
|
+
description: zod_1.z.string().max(2000).optional(),
|
|
97
|
+
charge_type: zod_1.z.enum(['recurring', 'non_recurring']).optional(),
|
|
98
|
+
price: zod_1.z.number().int().min(0).optional(),
|
|
99
|
+
currency_code: zod_1.z.string().max(3).optional(),
|
|
100
|
+
period: zod_1.z.number().int().min(1).optional(),
|
|
101
|
+
period_unit: zod_1.z
|
|
102
|
+
.enum(['day', 'week', 'month', 'year', 'not_applicable'])
|
|
103
|
+
.optional(),
|
|
104
|
+
pricing_model: zod_1.z
|
|
105
|
+
.enum(['flat_fee', 'per_unit', 'tiered', 'volume', 'stairstep'])
|
|
106
|
+
.optional(),
|
|
107
|
+
type: zod_1.z
|
|
108
|
+
.enum(['on_off', 'quantity', 'tiered', 'volume', 'stairstep'])
|
|
109
|
+
.optional(),
|
|
110
|
+
unit: zod_1.z.string().max(30).optional(),
|
|
111
|
+
enabled_in_portal: zod_1.z.boolean().default(true).optional(),
|
|
112
|
+
taxable: zod_1.z.boolean().default(true).optional(),
|
|
113
|
+
tax_profile_id: zod_1.z.string().max(50).optional(),
|
|
114
|
+
avalara_sale_type: zod_1.z
|
|
115
|
+
.enum(['wholesale', 'retail', 'consumed', 'vendor_use'])
|
|
116
|
+
.optional(),
|
|
117
|
+
avalara_transaction_type: zod_1.z.number().int().optional(),
|
|
118
|
+
avalara_service_type: zod_1.z.number().int().optional(),
|
|
119
|
+
tax_code: zod_1.z.string().max(50).optional(),
|
|
120
|
+
hsn_code: zod_1.z.string().max(50).optional(),
|
|
121
|
+
taxjar_product_code: zod_1.z.string().max(50).optional(),
|
|
122
|
+
invoice_notes: zod_1.z.string().max(2000).optional(),
|
|
123
|
+
meta_data: UpdateAddonMetaDataSchema.optional(),
|
|
124
|
+
sku: zod_1.z.string().max(100).optional(),
|
|
125
|
+
accounting_code: zod_1.z.string().max(100).optional(),
|
|
126
|
+
accounting_category1: zod_1.z.string().max(100).optional(),
|
|
127
|
+
accounting_category2: zod_1.z.string().max(100).optional(),
|
|
128
|
+
accounting_category3: zod_1.z.string().max(100).optional(),
|
|
129
|
+
accounting_category4: zod_1.z.string().max(100).optional(),
|
|
130
|
+
is_shippable: zod_1.z.boolean().default(false).optional(),
|
|
131
|
+
shipping_frequency_period: zod_1.z.number().int().min(1).optional(),
|
|
132
|
+
shipping_frequency_period_unit: zod_1.z
|
|
133
|
+
.enum(['year', 'month', 'week', 'day'])
|
|
134
|
+
.optional(),
|
|
135
|
+
included_in_mrr: zod_1.z.boolean().optional(),
|
|
136
|
+
show_description_in_invoices: zod_1.z.boolean().default(false).optional(),
|
|
137
|
+
show_description_in_quotes: zod_1.z.boolean().default(false).optional(),
|
|
138
|
+
price_in_decimal: zod_1.z.string().max(39).optional(),
|
|
139
|
+
proration_type: zod_1.z
|
|
140
|
+
.enum(['site_default', 'partial_term', 'full_term'])
|
|
141
|
+
.optional(),
|
|
142
|
+
tiers: UpdateAddonTiersSchema.optional(),
|
|
143
|
+
tax_providers_fields: UpdateAddonTaxProvidersFieldsSchema.optional(),
|
|
144
|
+
});
|
|
145
|
+
exports.UpdateAddonBodySchema = UpdateAddonBodySchema;
|
|
146
|
+
//Addon.list
|
|
147
|
+
const ListAddonIdSchema = zod_1.z.object({
|
|
148
|
+
is: zod_1.z.string().min(1).optional(),
|
|
149
|
+
is_not: zod_1.z.string().min(1).optional(),
|
|
150
|
+
starts_with: zod_1.z.string().min(1).optional(),
|
|
151
|
+
in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
|
|
152
|
+
not_in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
|
|
153
|
+
});
|
|
154
|
+
const ListAddonNameSchema = zod_1.z.object({
|
|
155
|
+
is: zod_1.z.string().min(1).optional(),
|
|
156
|
+
is_not: zod_1.z.string().min(1).optional(),
|
|
157
|
+
starts_with: zod_1.z.string().min(1).optional(),
|
|
158
|
+
in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
|
|
159
|
+
not_in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
|
|
160
|
+
});
|
|
161
|
+
const ListAddonPricingModelSchema = zod_1.z.object({
|
|
162
|
+
is: zod_1.z
|
|
163
|
+
.enum(['flat_fee', 'per_unit', 'tiered', 'volume', 'stairstep'])
|
|
164
|
+
.optional(),
|
|
165
|
+
is_not: zod_1.z
|
|
166
|
+
.enum(['flat_fee', 'per_unit', 'tiered', 'volume', 'stairstep'])
|
|
167
|
+
.optional(),
|
|
168
|
+
in: zod_1.z
|
|
169
|
+
.enum(['flat_fee', 'per_unit', 'tiered', 'volume', 'stairstep'])
|
|
170
|
+
.optional(),
|
|
171
|
+
not_in: zod_1.z
|
|
172
|
+
.enum(['flat_fee', 'per_unit', 'tiered', 'volume', 'stairstep'])
|
|
173
|
+
.optional(),
|
|
174
|
+
});
|
|
175
|
+
const ListAddonTypeSchema = zod_1.z.object({
|
|
176
|
+
is: zod_1.z
|
|
177
|
+
.enum(['on_off', 'quantity', 'tiered', 'volume', 'stairstep'])
|
|
178
|
+
.optional(),
|
|
179
|
+
is_not: zod_1.z
|
|
180
|
+
.enum(['on_off', 'quantity', 'tiered', 'volume', 'stairstep'])
|
|
181
|
+
.optional(),
|
|
182
|
+
in: zod_1.z
|
|
183
|
+
.enum(['on_off', 'quantity', 'tiered', 'volume', 'stairstep'])
|
|
184
|
+
.optional(),
|
|
185
|
+
not_in: zod_1.z
|
|
186
|
+
.enum(['on_off', 'quantity', 'tiered', 'volume', 'stairstep'])
|
|
187
|
+
.optional(),
|
|
188
|
+
});
|
|
189
|
+
const ListAddonChargeTypeSchema = zod_1.z.object({
|
|
190
|
+
is: zod_1.z.enum(['recurring', 'non_recurring']).optional(),
|
|
191
|
+
is_not: zod_1.z.enum(['recurring', 'non_recurring']).optional(),
|
|
192
|
+
in: zod_1.z.enum(['recurring', 'non_recurring']).optional(),
|
|
193
|
+
not_in: zod_1.z.enum(['recurring', 'non_recurring']).optional(),
|
|
194
|
+
});
|
|
195
|
+
const ListAddonPriceSchema = zod_1.z.object({
|
|
196
|
+
is: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
|
|
197
|
+
is_not: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
|
|
198
|
+
lt: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
|
|
199
|
+
lte: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
|
|
200
|
+
gt: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
|
|
201
|
+
gte: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
|
|
202
|
+
between: zod_1.z.string().regex(RegExp('^\\[-?\\d+,-?\\d+\\]$')).optional(),
|
|
203
|
+
});
|
|
204
|
+
const ListAddonPeriodSchema = zod_1.z.object({
|
|
205
|
+
is: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
|
|
206
|
+
is_not: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
|
|
207
|
+
lt: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
|
|
208
|
+
lte: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
|
|
209
|
+
gt: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
|
|
210
|
+
gte: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
|
|
211
|
+
between: zod_1.z.string().regex(RegExp('^\\[-?\\d+,-?\\d+\\]$')).optional(),
|
|
212
|
+
});
|
|
213
|
+
const ListAddonPeriodUnitSchema = zod_1.z.object({
|
|
214
|
+
is: zod_1.z.enum(['day', 'week', 'month', 'year', 'not_applicable']).optional(),
|
|
215
|
+
is_not: zod_1.z.enum(['day', 'week', 'month', 'year', 'not_applicable']).optional(),
|
|
216
|
+
in: zod_1.z.enum(['day', 'week', 'month', 'year', 'not_applicable']).optional(),
|
|
217
|
+
not_in: zod_1.z.enum(['day', 'week', 'month', 'year', 'not_applicable']).optional(),
|
|
218
|
+
});
|
|
219
|
+
const ListAddonStatusSchema = zod_1.z.object({
|
|
220
|
+
is: zod_1.z.enum(['active', 'archived', 'deleted']).optional(),
|
|
221
|
+
is_not: zod_1.z.enum(['active', 'archived', 'deleted']).optional(),
|
|
222
|
+
in: zod_1.z.enum(['active', 'archived', 'deleted']).optional(),
|
|
223
|
+
not_in: zod_1.z.enum(['active', 'archived', 'deleted']).optional(),
|
|
224
|
+
});
|
|
225
|
+
const ListAddonUpdatedAtSchema = zod_1.z.object({
|
|
226
|
+
after: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
|
|
227
|
+
before: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
|
|
228
|
+
on: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
|
|
229
|
+
between: zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
|
|
230
|
+
});
|
|
231
|
+
const ListAddonCurrencyCodeSchema = zod_1.z.object({
|
|
232
|
+
is: zod_1.z.string().min(1).optional(),
|
|
233
|
+
is_not: zod_1.z.string().min(1).optional(),
|
|
234
|
+
starts_with: zod_1.z.string().min(1).optional(),
|
|
235
|
+
in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
|
|
236
|
+
not_in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
|
|
237
|
+
});
|
|
238
|
+
const ListAddonChannelSchema = zod_1.z.object({
|
|
239
|
+
is: zod_1.z.enum(['web', 'app_store', 'play_store']).optional(),
|
|
240
|
+
is_not: zod_1.z.enum(['web', 'app_store', 'play_store']).optional(),
|
|
241
|
+
in: zod_1.z.enum(['web', 'app_store', 'play_store']).optional(),
|
|
242
|
+
not_in: zod_1.z.enum(['web', 'app_store', 'play_store']).optional(),
|
|
243
|
+
});
|
|
244
|
+
const ListAddonBodySchema = zod_1.z.looseObject({
|
|
245
|
+
limit: zod_1.z.number().int().min(1).max(100).optional(),
|
|
246
|
+
offset: zod_1.z.string().max(1000).optional(),
|
|
247
|
+
id: ListAddonIdSchema.optional(),
|
|
248
|
+
name: ListAddonNameSchema.optional(),
|
|
249
|
+
pricing_model: ListAddonPricingModelSchema.optional(),
|
|
250
|
+
type: ListAddonTypeSchema.optional(),
|
|
251
|
+
charge_type: ListAddonChargeTypeSchema.optional(),
|
|
252
|
+
price: ListAddonPriceSchema.optional(),
|
|
253
|
+
period: ListAddonPeriodSchema.optional(),
|
|
254
|
+
period_unit: ListAddonPeriodUnitSchema.optional(),
|
|
255
|
+
status: ListAddonStatusSchema.optional(),
|
|
256
|
+
updated_at: ListAddonUpdatedAtSchema.optional(),
|
|
257
|
+
currency_code: ListAddonCurrencyCodeSchema.optional(),
|
|
258
|
+
channel: ListAddonChannelSchema.optional(),
|
|
259
|
+
include_deleted: zod_1.z.boolean().default(false).optional(),
|
|
260
|
+
});
|
|
261
|
+
exports.ListAddonBodySchema = ListAddonBodySchema;
|
|
262
|
+
//Addon.copy
|
|
263
|
+
const CopyAddonBodySchema = zod_1.z.looseObject({
|
|
264
|
+
from_site: zod_1.z.string().max(50),
|
|
265
|
+
id_at_from_site: zod_1.z.string().max(100),
|
|
266
|
+
id: zod_1.z.string().max(100).optional(),
|
|
267
|
+
for_site_merging: zod_1.z.boolean().default(false).optional(),
|
|
268
|
+
});
|
|
269
|
+
exports.CopyAddonBodySchema = CopyAddonBodySchema;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Generated Zod schemas: Address
|
|
3
|
+
// Actions: retrieve, update
|
|
4
|
+
// Do not edit manually – regenerate via sdk-generator
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.UpdateAddressBodySchema = exports.RetrieveAddressBodySchema = void 0;
|
|
7
|
+
const zod_1 = require("zod");
|
|
8
|
+
//Address.retrieve
|
|
9
|
+
const RetrieveAddressBodySchema = zod_1.z.looseObject({
|
|
10
|
+
subscription_id: zod_1.z.string().max(50),
|
|
11
|
+
label: zod_1.z.string().max(50),
|
|
12
|
+
});
|
|
13
|
+
exports.RetrieveAddressBodySchema = RetrieveAddressBodySchema;
|
|
14
|
+
//Address.update
|
|
15
|
+
const UpdateAddressBodySchema = zod_1.z.looseObject({
|
|
16
|
+
subscription_id: zod_1.z.string().max(50),
|
|
17
|
+
label: zod_1.z.string().max(50),
|
|
18
|
+
first_name: zod_1.z.string().max(150).optional(),
|
|
19
|
+
last_name: zod_1.z.string().max(150).optional(),
|
|
20
|
+
email: zod_1.z.string().email().max(70).optional(),
|
|
21
|
+
company: zod_1.z.string().max(250).optional(),
|
|
22
|
+
phone: zod_1.z.string().max(50).optional(),
|
|
23
|
+
addr: zod_1.z.string().max(150).optional(),
|
|
24
|
+
extended_addr: zod_1.z.string().max(150).optional(),
|
|
25
|
+
extended_addr2: zod_1.z.string().max(150).optional(),
|
|
26
|
+
city: zod_1.z.string().max(50).optional(),
|
|
27
|
+
state_code: zod_1.z.string().max(50).optional(),
|
|
28
|
+
state: zod_1.z.string().max(50).optional(),
|
|
29
|
+
zip: zod_1.z.string().max(20).optional(),
|
|
30
|
+
country: zod_1.z.string().max(50).optional(),
|
|
31
|
+
validation_status: zod_1.z
|
|
32
|
+
.enum(['not_validated', 'valid', 'partially_valid', 'invalid'])
|
|
33
|
+
.optional(),
|
|
34
|
+
});
|
|
35
|
+
exports.UpdateAddressBodySchema = UpdateAddressBodySchema;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Generated Zod schemas: Alert
|
|
3
|
+
// Actions: create, list, update, application_alertsForSubscription
|
|
4
|
+
// Do not edit manually – regenerate via sdk-generator
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ApplicationAlertsforsubscriptionAlertBodySchema = exports.UpdateAlertBodySchema = exports.ListAlertBodySchema = exports.CreateAlertBodySchema = void 0;
|
|
7
|
+
const zod_1 = require("zod");
|
|
8
|
+
//Alert.create
|
|
9
|
+
const CreateAlertThresholdSchema = zod_1.z.object({
|
|
10
|
+
mode: zod_1.z.enum(['absolute', 'percentage']),
|
|
11
|
+
value: zod_1.z.number(),
|
|
12
|
+
});
|
|
13
|
+
const CreateAlertFilterConditionsSchema = zod_1.z.object({
|
|
14
|
+
field: zod_1.z.array(zod_1.z.enum(['plan_price_id']).optional()).optional(),
|
|
15
|
+
operator: zod_1.z.array(zod_1.z.enum(['equals', 'not_equals']).optional()).optional(),
|
|
16
|
+
value: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
|
|
17
|
+
});
|
|
18
|
+
const CreateAlertBodySchema = zod_1.z.looseObject({
|
|
19
|
+
type: zod_1.z.enum(['usage_exceeded']),
|
|
20
|
+
name: zod_1.z.string().max(50),
|
|
21
|
+
description: zod_1.z.string().max(65000).optional(),
|
|
22
|
+
metered_feature_id: zod_1.z.string().max(50),
|
|
23
|
+
subscription_id: zod_1.z.string().max(50).optional(),
|
|
24
|
+
meta: zod_1.z.string().max(65000).optional(),
|
|
25
|
+
threshold: CreateAlertThresholdSchema.optional(),
|
|
26
|
+
filter_conditions: CreateAlertFilterConditionsSchema.optional(),
|
|
27
|
+
});
|
|
28
|
+
exports.CreateAlertBodySchema = CreateAlertBodySchema;
|
|
29
|
+
//Alert.list
|
|
30
|
+
const ListAlertIdSchema = zod_1.z.object({
|
|
31
|
+
in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
|
|
32
|
+
});
|
|
33
|
+
const ListAlertTypeSchema = zod_1.z.object({
|
|
34
|
+
is: zod_1.z.enum(['usage_exceeded']).optional(),
|
|
35
|
+
});
|
|
36
|
+
const ListAlertSubscriptionIdSchema = zod_1.z.object({
|
|
37
|
+
is: zod_1.z.string().min(1).optional(),
|
|
38
|
+
});
|
|
39
|
+
const ListAlertStatusSchema = zod_1.z.object({
|
|
40
|
+
is: zod_1.z.enum(['enabled', 'disabled']).optional(),
|
|
41
|
+
});
|
|
42
|
+
const ListAlertBodySchema = zod_1.z.looseObject({
|
|
43
|
+
limit: zod_1.z.number().int().min(1).max(100).optional(),
|
|
44
|
+
offset: zod_1.z.string().max(1000).optional(),
|
|
45
|
+
id: ListAlertIdSchema.optional(),
|
|
46
|
+
type: ListAlertTypeSchema.optional(),
|
|
47
|
+
subscription_id: ListAlertSubscriptionIdSchema.optional(),
|
|
48
|
+
status: ListAlertStatusSchema.optional(),
|
|
49
|
+
});
|
|
50
|
+
exports.ListAlertBodySchema = ListAlertBodySchema;
|
|
51
|
+
//Alert.update
|
|
52
|
+
const UpdateAlertThresholdSchema = zod_1.z.object({
|
|
53
|
+
mode: zod_1.z.enum(['absolute', 'percentage']).optional(),
|
|
54
|
+
value: zod_1.z.number().optional(),
|
|
55
|
+
});
|
|
56
|
+
const UpdateAlertBodySchema = zod_1.z.looseObject({
|
|
57
|
+
status: zod_1.z.enum(['enabled', 'disabled']).optional(),
|
|
58
|
+
threshold: UpdateAlertThresholdSchema.optional(),
|
|
59
|
+
});
|
|
60
|
+
exports.UpdateAlertBodySchema = UpdateAlertBodySchema;
|
|
61
|
+
//Alert.application_alertsForSubscription
|
|
62
|
+
const ApplicationAlertsforsubscriptionAlertStatusSchema = zod_1.z.object({
|
|
63
|
+
is: zod_1.z.enum(['enabled', 'disabled']).optional(),
|
|
64
|
+
});
|
|
65
|
+
const ApplicationAlertsforsubscriptionAlertTypeSchema = zod_1.z.object({
|
|
66
|
+
is: zod_1.z.enum(['usage_exceeded']).optional(),
|
|
67
|
+
});
|
|
68
|
+
const ApplicationAlertsforsubscriptionAlertBodySchema = zod_1.z.looseObject({
|
|
69
|
+
limit: zod_1.z.number().int().min(1).max(100).optional(),
|
|
70
|
+
offset: zod_1.z.string().max(1000).optional(),
|
|
71
|
+
status: ApplicationAlertsforsubscriptionAlertStatusSchema.optional(),
|
|
72
|
+
type: ApplicationAlertsforsubscriptionAlertTypeSchema.optional(),
|
|
73
|
+
});
|
|
74
|
+
exports.ApplicationAlertsforsubscriptionAlertBodySchema = ApplicationAlertsforsubscriptionAlertBodySchema;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Generated Zod schemas: AlertStatus
|
|
3
|
+
// Actions: alert_statusesForSubscription, alert_statusesForAlert
|
|
4
|
+
// Do not edit manually – regenerate via sdk-generator
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.AlertStatusesforalertAlertStatusBodySchema = exports.AlertStatusesforsubscriptionAlertStatusBodySchema = void 0;
|
|
7
|
+
const zod_1 = require("zod");
|
|
8
|
+
//AlertStatus.alert_statusesForSubscription
|
|
9
|
+
const AlertStatusesforsubscriptionAlertStatusAlarmStatusSchema = zod_1.z.object({
|
|
10
|
+
is: zod_1.z.enum(['within_limit', 'in_alarm']).optional(),
|
|
11
|
+
});
|
|
12
|
+
const AlertStatusesforsubscriptionAlertStatusAlertIdSchema = zod_1.z.object({
|
|
13
|
+
in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
|
|
14
|
+
});
|
|
15
|
+
const AlertStatusesforsubscriptionAlertStatusBodySchema = zod_1.z.looseObject({
|
|
16
|
+
limit: zod_1.z.number().int().min(1).max(100).optional(),
|
|
17
|
+
offset: zod_1.z.string().max(1000).optional(),
|
|
18
|
+
alarm_status: AlertStatusesforsubscriptionAlertStatusAlarmStatusSchema.optional(),
|
|
19
|
+
alert_id: AlertStatusesforsubscriptionAlertStatusAlertIdSchema.optional(),
|
|
20
|
+
});
|
|
21
|
+
exports.AlertStatusesforsubscriptionAlertStatusBodySchema = AlertStatusesforsubscriptionAlertStatusBodySchema;
|
|
22
|
+
//AlertStatus.alert_statusesForAlert
|
|
23
|
+
const AlertStatusesforalertAlertStatusAlarmStatusSchema = zod_1.z.object({
|
|
24
|
+
is: zod_1.z.enum(['within_limit', 'in_alarm']).optional(),
|
|
25
|
+
});
|
|
26
|
+
const AlertStatusesforalertAlertStatusBodySchema = zod_1.z.looseObject({
|
|
27
|
+
limit: zod_1.z.number().int().min(1).max(100).optional(),
|
|
28
|
+
offset: zod_1.z.string().max(1000).optional(),
|
|
29
|
+
alarm_status: AlertStatusesforalertAlertStatusAlarmStatusSchema.optional(),
|
|
30
|
+
});
|
|
31
|
+
exports.AlertStatusesforalertAlertStatusBodySchema = AlertStatusesforalertAlertStatusBodySchema;
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Generated Zod schemas: AttachedItem
|
|
3
|
+
// Actions: create, update, retrieve, delete, list
|
|
4
|
+
// Do not edit manually – regenerate via sdk-generator
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ListAttachedItemBodySchema = exports.DeleteAttachedItemBodySchema = exports.RetrieveAttachedItemBodySchema = exports.UpdateAttachedItemBodySchema = exports.CreateAttachedItemBodySchema = void 0;
|
|
7
|
+
const zod_1 = require("zod");
|
|
8
|
+
//AttachedItem.create
|
|
9
|
+
const CreateAttachedItemBodySchema = zod_1.z.looseObject({
|
|
10
|
+
item_id: zod_1.z.string().max(100),
|
|
11
|
+
type: zod_1.z.enum(['recommended', 'mandatory', 'optional']).optional(),
|
|
12
|
+
billing_cycles: zod_1.z.number().int().min(1).optional(),
|
|
13
|
+
quantity: zod_1.z.number().int().min(1).optional(),
|
|
14
|
+
quantity_in_decimal: zod_1.z.string().max(33).optional(),
|
|
15
|
+
charge_on_event: zod_1.z
|
|
16
|
+
.enum([
|
|
17
|
+
'subscription_creation',
|
|
18
|
+
'subscription_trial_start',
|
|
19
|
+
'plan_activation',
|
|
20
|
+
'subscription_activation',
|
|
21
|
+
'contract_termination',
|
|
22
|
+
'on_demand',
|
|
23
|
+
])
|
|
24
|
+
.optional(),
|
|
25
|
+
charge_once: zod_1.z.boolean().optional(),
|
|
26
|
+
business_entity_id: zod_1.z.string().max(50).optional(),
|
|
27
|
+
});
|
|
28
|
+
exports.CreateAttachedItemBodySchema = CreateAttachedItemBodySchema;
|
|
29
|
+
//AttachedItem.update
|
|
30
|
+
const UpdateAttachedItemBodySchema = zod_1.z.looseObject({
|
|
31
|
+
parent_item_id: zod_1.z.string().max(100),
|
|
32
|
+
type: zod_1.z.enum(['recommended', 'mandatory', 'optional']).optional(),
|
|
33
|
+
billing_cycles: zod_1.z.number().int().min(1).optional(),
|
|
34
|
+
quantity: zod_1.z.number().int().min(1).optional(),
|
|
35
|
+
quantity_in_decimal: zod_1.z.string().max(33).optional(),
|
|
36
|
+
charge_on_event: zod_1.z
|
|
37
|
+
.enum([
|
|
38
|
+
'subscription_creation',
|
|
39
|
+
'subscription_trial_start',
|
|
40
|
+
'plan_activation',
|
|
41
|
+
'subscription_activation',
|
|
42
|
+
'contract_termination',
|
|
43
|
+
'on_demand',
|
|
44
|
+
])
|
|
45
|
+
.optional(),
|
|
46
|
+
charge_once: zod_1.z.boolean().optional(),
|
|
47
|
+
});
|
|
48
|
+
exports.UpdateAttachedItemBodySchema = UpdateAttachedItemBodySchema;
|
|
49
|
+
//AttachedItem.retrieve
|
|
50
|
+
const RetrieveAttachedItemBodySchema = zod_1.z.looseObject({
|
|
51
|
+
parent_item_id: zod_1.z.string().max(100),
|
|
52
|
+
});
|
|
53
|
+
exports.RetrieveAttachedItemBodySchema = RetrieveAttachedItemBodySchema;
|
|
54
|
+
//AttachedItem.delete
|
|
55
|
+
const DeleteAttachedItemBodySchema = zod_1.z.looseObject({
|
|
56
|
+
parent_item_id: zod_1.z.string().max(100),
|
|
57
|
+
});
|
|
58
|
+
exports.DeleteAttachedItemBodySchema = DeleteAttachedItemBodySchema;
|
|
59
|
+
//AttachedItem.list
|
|
60
|
+
const ListAttachedItemIdSchema = zod_1.z.object({
|
|
61
|
+
is: zod_1.z.string().min(1).optional(),
|
|
62
|
+
is_not: zod_1.z.string().min(1).optional(),
|
|
63
|
+
starts_with: zod_1.z.string().min(1).optional(),
|
|
64
|
+
in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
|
|
65
|
+
not_in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
|
|
66
|
+
});
|
|
67
|
+
const ListAttachedItemItemIdSchema = zod_1.z.object({
|
|
68
|
+
is: zod_1.z.string().min(1).optional(),
|
|
69
|
+
is_not: zod_1.z.string().min(1).optional(),
|
|
70
|
+
starts_with: zod_1.z.string().min(1).optional(),
|
|
71
|
+
in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
|
|
72
|
+
not_in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
|
|
73
|
+
});
|
|
74
|
+
const ListAttachedItemTypeSchema = zod_1.z.object({
|
|
75
|
+
is: zod_1.z.enum(['recommended', 'mandatory', 'optional']).optional(),
|
|
76
|
+
is_not: zod_1.z.enum(['recommended', 'mandatory', 'optional']).optional(),
|
|
77
|
+
in: zod_1.z.enum(['recommended', 'mandatory', 'optional']).optional(),
|
|
78
|
+
not_in: zod_1.z.enum(['recommended', 'mandatory', 'optional']).optional(),
|
|
79
|
+
});
|
|
80
|
+
const ListAttachedItemItemTypeSchema = zod_1.z.object({
|
|
81
|
+
is: zod_1.z.enum(['plan', 'addon', 'charge']).optional(),
|
|
82
|
+
is_not: zod_1.z.enum(['plan', 'addon', 'charge']).optional(),
|
|
83
|
+
in: zod_1.z.enum(['plan', 'addon', 'charge']).optional(),
|
|
84
|
+
not_in: zod_1.z.enum(['plan', 'addon', 'charge']).optional(),
|
|
85
|
+
});
|
|
86
|
+
const ListAttachedItemChargeOnEventSchema = zod_1.z.object({
|
|
87
|
+
is: zod_1.z
|
|
88
|
+
.enum([
|
|
89
|
+
'subscription_creation',
|
|
90
|
+
'subscription_trial_start',
|
|
91
|
+
'plan_activation',
|
|
92
|
+
'subscription_activation',
|
|
93
|
+
'contract_termination',
|
|
94
|
+
'on_demand',
|
|
95
|
+
])
|
|
96
|
+
.optional(),
|
|
97
|
+
is_not: zod_1.z
|
|
98
|
+
.enum([
|
|
99
|
+
'subscription_creation',
|
|
100
|
+
'subscription_trial_start',
|
|
101
|
+
'plan_activation',
|
|
102
|
+
'subscription_activation',
|
|
103
|
+
'contract_termination',
|
|
104
|
+
'on_demand',
|
|
105
|
+
])
|
|
106
|
+
.optional(),
|
|
107
|
+
in: zod_1.z
|
|
108
|
+
.enum([
|
|
109
|
+
'subscription_creation',
|
|
110
|
+
'subscription_trial_start',
|
|
111
|
+
'plan_activation',
|
|
112
|
+
'subscription_activation',
|
|
113
|
+
'contract_termination',
|
|
114
|
+
'on_demand',
|
|
115
|
+
])
|
|
116
|
+
.optional(),
|
|
117
|
+
not_in: zod_1.z
|
|
118
|
+
.enum([
|
|
119
|
+
'subscription_creation',
|
|
120
|
+
'subscription_trial_start',
|
|
121
|
+
'plan_activation',
|
|
122
|
+
'subscription_activation',
|
|
123
|
+
'contract_termination',
|
|
124
|
+
'on_demand',
|
|
125
|
+
])
|
|
126
|
+
.optional(),
|
|
127
|
+
});
|
|
128
|
+
const ListAttachedItemUpdatedAtSchema = zod_1.z.object({
|
|
129
|
+
after: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
|
|
130
|
+
before: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
|
|
131
|
+
on: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
|
|
132
|
+
between: zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
|
|
133
|
+
});
|
|
134
|
+
const ListAttachedItemBodySchema = zod_1.z.looseObject({
|
|
135
|
+
limit: zod_1.z.number().int().min(1).max(100).optional(),
|
|
136
|
+
offset: zod_1.z.string().max(1000).optional(),
|
|
137
|
+
id: ListAttachedItemIdSchema.optional(),
|
|
138
|
+
item_id: ListAttachedItemItemIdSchema.optional(),
|
|
139
|
+
type: ListAttachedItemTypeSchema.optional(),
|
|
140
|
+
item_type: ListAttachedItemItemTypeSchema.optional(),
|
|
141
|
+
charge_on_event: ListAttachedItemChargeOnEventSchema.optional(),
|
|
142
|
+
updated_at: ListAttachedItemUpdatedAtSchema.optional(),
|
|
143
|
+
});
|
|
144
|
+
exports.ListAttachedItemBodySchema = ListAttachedItemBodySchema;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Generated Zod schemas: BusinessEntity
|
|
3
|
+
// Actions: createTransfers, getTransfers
|
|
4
|
+
// Do not edit manually – regenerate via sdk-generator
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.GetTransfersBusinessEntityBodySchema = exports.CreateTransfersBusinessEntityBodySchema = void 0;
|
|
7
|
+
const zod_1 = require("zod");
|
|
8
|
+
//BusinessEntity.createTransfers
|
|
9
|
+
const CreateTransfersBusinessEntityBodySchema = zod_1.z.looseObject({
|
|
10
|
+
active_resource_ids: zod_1.z.array(zod_1.z.string().max(50).optional()),
|
|
11
|
+
destination_business_entity_ids: zod_1.z.array(zod_1.z.string().max(50).optional()),
|
|
12
|
+
source_business_entity_ids: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
|
|
13
|
+
resource_types: zod_1.z.array(zod_1.z.string().max(50).optional()),
|
|
14
|
+
reason_codes: zod_1.z.array(zod_1.z.string().max(50).optional()),
|
|
15
|
+
});
|
|
16
|
+
exports.CreateTransfersBusinessEntityBodySchema = CreateTransfersBusinessEntityBodySchema;
|
|
17
|
+
//BusinessEntity.getTransfers
|
|
18
|
+
const GetTransfersBusinessEntityResourceTypeSchema = zod_1.z.object({
|
|
19
|
+
is: zod_1.z.string().min(1).optional(),
|
|
20
|
+
});
|
|
21
|
+
const GetTransfersBusinessEntityResourceIdSchema = zod_1.z.object({
|
|
22
|
+
is: zod_1.z.string().min(1).optional(),
|
|
23
|
+
});
|
|
24
|
+
const GetTransfersBusinessEntityActiveResourceIdSchema = zod_1.z.object({
|
|
25
|
+
is: zod_1.z.string().min(1).optional(),
|
|
26
|
+
});
|
|
27
|
+
const GetTransfersBusinessEntityCreatedAtSchema = zod_1.z.object({
|
|
28
|
+
after: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
|
|
29
|
+
before: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
|
|
30
|
+
on: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
|
|
31
|
+
between: zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
|
|
32
|
+
});
|
|
33
|
+
const GetTransfersBusinessEntitySortBySchema = zod_1.z.looseObject({
|
|
34
|
+
asc: zod_1.z.enum(['created_at']).optional(),
|
|
35
|
+
desc: zod_1.z.enum(['created_at']).optional(),
|
|
36
|
+
});
|
|
37
|
+
const GetTransfersBusinessEntityBodySchema = zod_1.z.looseObject({
|
|
38
|
+
limit: zod_1.z.number().int().min(1).max(100).optional(),
|
|
39
|
+
offset: zod_1.z.string().max(1000).optional(),
|
|
40
|
+
resource_type: GetTransfersBusinessEntityResourceTypeSchema.optional(),
|
|
41
|
+
resource_id: GetTransfersBusinessEntityResourceIdSchema.optional(),
|
|
42
|
+
active_resource_id: GetTransfersBusinessEntityActiveResourceIdSchema.optional(),
|
|
43
|
+
created_at: GetTransfersBusinessEntityCreatedAtSchema.optional(),
|
|
44
|
+
sort_by: GetTransfersBusinessEntitySortBySchema.optional(),
|
|
45
|
+
});
|
|
46
|
+
exports.GetTransfersBusinessEntityBodySchema = GetTransfersBusinessEntityBodySchema;
|