@epcc-sdk/sdks-shopper 0.6.0 → 0.7.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.
@@ -1,10 +1,9 @@
1
1
  import { z } from "zod";
2
2
  const zAmount = z.object({
3
- amount: z.coerce.bigint().min(BigInt("-9223372036854775808"), {
4
- message: "Invalid value: Expected int64 to be >= -9223372036854775808"
5
- }).max(BigInt("9223372036854775807"), {
6
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
7
- }).optional(),
3
+ amount: z.preprocess(
4
+ (v) => typeof v === "string" ? Number(v) : v,
5
+ z.number().int()
6
+ ).optional(),
8
7
  includes_tax: z.boolean().optional().default(false)
9
8
  });
10
9
  const zPrioritizedPricebooks = z.array(
@@ -203,9 +202,10 @@ const zNodeAttributes = z.object({
203
202
  const zReleaseIndexingCompleteData = z.object({
204
203
  data: z.object({
205
204
  status: z.enum(["succeeded", "failed"]),
206
- duration_ms: z.coerce.bigint().gte(BigInt(0)).max(BigInt("9223372036854775807"), {
207
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
208
- }).nullish()
205
+ duration_ms: z.preprocess(
206
+ (v) => typeof v === "string" ? Number(v) : v,
207
+ z.number().int().gte(0)
208
+ ).nullish()
209
209
  }).optional()
210
210
  });
211
211
  const zNodeMeta = z.object({
@@ -227,33 +227,28 @@ const zNodeReference = z.object({
227
227
  });
228
228
  const zPageMeta = z.object({
229
229
  results: z.object({
230
- total: z.coerce.bigint().min(BigInt("-9223372036854775808"), {
231
- message: "Invalid value: Expected int64 to be >= -9223372036854775808"
232
- }).max(BigInt("9223372036854775807"), {
233
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
234
- }).optional()
230
+ total: z.preprocess(
231
+ (v) => typeof v === "string" ? Number(v) : v,
232
+ z.number().int()
233
+ ).optional()
235
234
  }).optional(),
236
235
  page: z.object({
237
- limit: z.coerce.bigint().min(BigInt("-9223372036854775808"), {
238
- message: "Invalid value: Expected int64 to be >= -9223372036854775808"
239
- }).max(BigInt("9223372036854775807"), {
240
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
241
- }).optional(),
242
- offset: z.coerce.bigint().min(BigInt("-9223372036854775808"), {
243
- message: "Invalid value: Expected int64 to be >= -9223372036854775808"
244
- }).max(BigInt("9223372036854775807"), {
245
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
246
- }).optional(),
247
- current: z.coerce.bigint().min(BigInt("-9223372036854775808"), {
248
- message: "Invalid value: Expected int64 to be >= -9223372036854775808"
249
- }).max(BigInt("9223372036854775807"), {
250
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
251
- }).optional(),
252
- total: z.coerce.bigint().min(BigInt("-9223372036854775808"), {
253
- message: "Invalid value: Expected int64 to be >= -9223372036854775808"
254
- }).max(BigInt("9223372036854775807"), {
255
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
256
- }).optional()
236
+ limit: z.preprocess(
237
+ (v) => typeof v === "string" ? Number(v) : v,
238
+ z.number().int()
239
+ ).optional(),
240
+ offset: z.preprocess(
241
+ (v) => typeof v === "string" ? Number(v) : v,
242
+ z.number().int()
243
+ ).optional(),
244
+ current: z.preprocess(
245
+ (v) => typeof v === "string" ? Number(v) : v,
246
+ z.number().int()
247
+ ).optional(),
248
+ total: z.preprocess(
249
+ (v) => typeof v === "string" ? Number(v) : v,
250
+ z.number().int()
251
+ ).optional()
257
252
  }).optional()
258
253
  });
259
254
  const zPricebook = z.object({
@@ -333,11 +328,10 @@ const zVariation = z.object({
333
328
  const zBundleConfiguration = z.object({
334
329
  selected_options: z.record(
335
330
  z.record(
336
- z.coerce.bigint().min(BigInt("-9223372036854775808"), {
337
- message: "Invalid value: Expected int64 to be >= -9223372036854775808"
338
- }).max(BigInt("9223372036854775807"), {
339
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
340
- })
331
+ z.preprocess(
332
+ (v) => typeof v === "string" ? Number(v) : v,
333
+ z.number().int()
334
+ )
341
335
  )
342
336
  )
343
337
  });
@@ -527,16 +521,14 @@ const zReleaseMeta = z.object({
527
521
  language: z.string().optional(),
528
522
  is_full_publish: z.boolean().optional().default(false),
529
523
  is_full_delta: z.boolean().optional().default(false),
530
- total_products: z.coerce.bigint().min(BigInt("-9223372036854775808"), {
531
- message: "Invalid value: Expected int64 to be >= -9223372036854775808"
532
- }).max(BigInt("9223372036854775807"), {
533
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
534
- }).nullish(),
535
- total_nodes: z.coerce.bigint().min(BigInt("-9223372036854775808"), {
536
- message: "Invalid value: Expected int64 to be >= -9223372036854775808"
537
- }).max(BigInt("9223372036854775807"), {
538
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
539
- }).nullish(),
524
+ total_products: z.preprocess(
525
+ (v) => typeof v === "string" ? Number(v) : v,
526
+ z.number().int()
527
+ ).nullish(),
528
+ total_nodes: z.preprocess(
529
+ (v) => typeof v === "string" ? Number(v) : v,
530
+ z.number().int()
531
+ ).nullish(),
540
532
  percent_completed: z.number().int().min(-2147483648, {
541
533
  message: "Invalid value: Expected int32 to be >= -2147483648"
542
534
  }).max(2147483647, {
@@ -544,9 +536,10 @@ const zReleaseMeta = z.object({
544
536
  }).nullish(),
545
537
  owner: z.enum(["store", "organization"]).optional(),
546
538
  price_segmentation_enabled: z.boolean().optional(),
547
- indexing_duration_ms: z.coerce.bigint().gte(BigInt(0)).max(BigInt("9223372036854775807"), {
548
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
549
- }).nullish(),
539
+ indexing_duration_ms: z.preprocess(
540
+ (v) => typeof v === "string" ? Number(v) : v,
541
+ z.number().int().gte(0)
542
+ ).nullish(),
550
543
  includes_draft_products: z.boolean().optional().default(false)
551
544
  });
552
545
  const zReleaseRelationships = z.object({
@@ -692,20 +685,18 @@ const zTier = z.object({
692
685
  price: zCurrencies.optional()
693
686
  });
694
687
  const zTieredAmount = z.object({
695
- amount: z.coerce.bigint().min(BigInt("-9223372036854775808"), {
696
- message: "Invalid value: Expected int64 to be >= -9223372036854775808"
697
- }).max(BigInt("9223372036854775807"), {
698
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
699
- }).optional(),
688
+ amount: z.preprocess(
689
+ (v) => typeof v === "string" ? Number(v) : v,
690
+ z.number().int()
691
+ ).optional(),
700
692
  includes_tax: z.boolean().optional().default(false),
701
693
  tiers: z.record(
702
694
  z.object({
703
695
  minimum_quantity: z.number().int().optional(),
704
- amount: z.coerce.bigint().min(BigInt("-9223372036854775808"), {
705
- message: "Invalid value: Expected int64 to be >= -9223372036854775808"
706
- }).max(BigInt("9223372036854775807"), {
707
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
708
- }).optional()
696
+ amount: z.preprocess(
697
+ (v) => typeof v === "string" ? Number(v) : v,
698
+ z.number().int()
699
+ ).optional()
709
700
  })
710
701
  ).optional()
711
702
  });
@@ -1473,7 +1464,7 @@ const zCustomerCheckout = z.object({
1473
1464
  id: z.string().optional(),
1474
1465
  email: z.string().optional(),
1475
1466
  name: z.string().optional()
1476
- }).optional(),
1467
+ }),
1477
1468
  billing_address: zBillingAddress.optional(),
1478
1469
  shipping_address: zShippingAddress.optional()
1479
1470
  }).optional()
@@ -1489,7 +1480,7 @@ const zAccountCheckout = z.object({
1489
1480
  contact: z.object({
1490
1481
  name: z.string().optional(),
1491
1482
  email: z.string().email().optional()
1492
- }).optional(),
1483
+ }),
1493
1484
  billing_address: zBillingAddress.optional(),
1494
1485
  shipping_address: zShippingAddress.optional()
1495
1486
  }).optional()
@@ -1936,7 +1927,7 @@ const zOrderItemResponse = z.object({
1936
1927
  type: z.string().optional(),
1937
1928
  id: z.string().uuid().readonly().optional(),
1938
1929
  quantity: z.number().optional(),
1939
- product_id: z.string().uuid().readonly().optional(),
1930
+ product_id: z.string().readonly().optional(),
1940
1931
  subscription_offering_id: z.string().uuid().readonly().optional(),
1941
1932
  name: z.string().optional(),
1942
1933
  sku: z.string().optional(),
@@ -2096,43 +2087,22 @@ const zTransactionListResponse = z.object({
2096
2087
  data: z.array(zTransactionResponse)
2097
2088
  });
2098
2089
  const zCartItemObject = zCartItemObjectData.and(zCartItemResponse);
2099
- const zCartItemsResponse = z.object({
2100
- data: z.array(
2101
- z.union([
2102
- zCartItemObject,
2103
- zCustomItemObject,
2104
- zSubscriptionItemObject,
2105
- zPromotionItemObject
2106
- ])
2107
- ).optional()
2108
- });
2109
- const zDataStripeConnectPayment = zDataBasePayments.and(
2090
+ const zCustomItemCartObject = zCartItemResponse.and(
2110
2091
  z.object({
2111
- gateway: z.enum(["stripe_connect"]),
2112
- options: z.object({
2113
- receipt_email: z.string().optional()
2114
- }).optional(),
2115
- payment: z.string().optional()
2092
+ type: z.literal("custom_item"),
2093
+ quantity: z.number().int()
2116
2094
  })
2117
2095
  );
2118
- const zCartIncludedPromotion = z.object({
2119
- id: z.string().uuid(),
2120
- name: z.string(),
2121
- description: z.string().optional(),
2122
- automatic: z.boolean(),
2123
- promotion_source: z.string(),
2124
- start: z.string().datetime(),
2125
- end: z.string().datetime()
2126
- });
2127
- const zSubscriptionItemCartObject = zSubscriptionItemObjectData.and(zCartItemResponse);
2128
- const zPromotionItemCartObject = zPromotionItemObjectData.and(zCartItemResponse).and(
2096
+ const zSubscriptionItemCartObject = zCartItemResponse.and(
2129
2097
  z.object({
2130
- id: z.string().optional()
2098
+ type: z.literal("subscription_item"),
2099
+ quantity: z.number().int()
2131
2100
  })
2132
2101
  );
2133
- const zCustomItemCartObject = zCustomItemObjectData.and(zCartItemResponse).and(
2102
+ const zPromotionItemCartObject = zCartItemResponse.and(
2134
2103
  z.object({
2135
- id: z.string().optional()
2104
+ type: z.literal("promotion_item"),
2105
+ quantity: z.number().int()
2136
2106
  })
2137
2107
  );
2138
2108
  const zCartsResponse = z.object({
@@ -2151,6 +2121,8 @@ const zCartsResponse = z.object({
2151
2121
  tax: zFormattedPriceData.optional(),
2152
2122
  discount: zFormattedPriceData.optional(),
2153
2123
  without_discount: zFormattedPriceData.optional(),
2124
+ shipping: zFormattedPriceData.optional(),
2125
+ shipping_discount: zFormattedPriceData.optional(),
2154
2126
  discounts: z.record(
2155
2127
  z.object({
2156
2128
  amount: z.number().optional(),
@@ -2162,6 +2134,34 @@ const zCartsResponse = z.object({
2162
2134
  timestamps: zCartTimestamps.optional()
2163
2135
  }).optional()
2164
2136
  });
2137
+ const zCartItemsResponse = z.object({
2138
+ data: z.array(
2139
+ z.union([
2140
+ zCartItemObject,
2141
+ zCustomItemCartObject,
2142
+ zSubscriptionItemCartObject,
2143
+ zPromotionItemCartObject
2144
+ ])
2145
+ ).optional()
2146
+ });
2147
+ const zDataStripeConnectPayment = zDataBasePayments.and(
2148
+ z.object({
2149
+ gateway: z.enum(["stripe_connect"]),
2150
+ options: z.object({
2151
+ receipt_email: z.string().optional()
2152
+ }).optional(),
2153
+ payment: z.string().optional()
2154
+ })
2155
+ );
2156
+ const zCartIncludedPromotion = z.object({
2157
+ id: z.string().uuid(),
2158
+ name: z.string(),
2159
+ description: z.string().optional(),
2160
+ automatic: z.boolean(),
2161
+ promotion_source: z.string(),
2162
+ start: z.string().datetime(),
2163
+ end: z.string().datetime()
2164
+ });
2165
2165
  const zCartIncluded = z.object({
2166
2166
  items: z.array(
2167
2167
  z.union([
@@ -2251,11 +2251,10 @@ const zTimePeriod = z.object({
2251
2251
  });
2252
2252
  const zSingleCurrencyPrice = z.object({
2253
2253
  currency: z.string().max(1024),
2254
- amount: z.coerce.bigint().min(BigInt("-9223372036854775808"), {
2255
- message: "Invalid value: Expected int64 to be >= -9223372036854775808"
2256
- }).max(BigInt("9223372036854775807"), {
2257
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
2258
- }),
2254
+ amount: z.preprocess(
2255
+ (v) => typeof v === "string" ? Number(v) : v,
2256
+ z.number().int()
2257
+ ),
2259
2258
  includes_tax: z.boolean().optional()
2260
2259
  });
2261
2260
  const zPriceUnits = z.object({
@@ -2269,20 +2268,18 @@ const zNullablePriceUnits = z.object({
2269
2268
  const zPrice = z.unknown();
2270
2269
  const zNullablePrice = z.record(
2271
2270
  z.object({
2272
- amount: z.coerce.bigint().min(BigInt("-9223372036854775808"), {
2273
- message: "Invalid value: Expected int64 to be >= -9223372036854775808"
2274
- }).max(BigInt("9223372036854775807"), {
2275
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
2276
- }),
2271
+ amount: z.preprocess(
2272
+ (v) => typeof v === "string" ? Number(v) : v,
2273
+ z.number().int()
2274
+ ),
2277
2275
  includes_tax: z.boolean().optional()
2278
2276
  }).nullable()
2279
2277
  ).nullable();
2280
2278
  const zPriceFormatting = z.object({
2281
- amount: z.coerce.bigint().min(BigInt("-9223372036854775808"), {
2282
- message: "Invalid value: Expected int64 to be >= -9223372036854775808"
2283
- }).max(BigInt("9223372036854775807"), {
2284
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
2285
- }),
2279
+ amount: z.preprocess(
2280
+ (v) => typeof v === "string" ? Number(v) : v,
2281
+ z.number().int()
2282
+ ),
2286
2283
  currency: z.string(),
2287
2284
  formatted: z.string()
2288
2285
  });
@@ -2328,12 +2325,16 @@ const zPlanUpdateAttributes = z.object({
2328
2325
  });
2329
2326
  const zDunningRuleAttributes = z.object({
2330
2327
  payment_retry_type: z.enum(["fixed", "backoff", "tiered"]),
2331
- payment_retry_interval: z.coerce.bigint().gte(BigInt(1)).lte(BigInt(1024)).optional(),
2328
+ payment_retry_interval: z.preprocess(
2329
+ (v) => typeof v === "string" ? Number(v) : v,
2330
+ z.number().int().gte(1).lte(1024)
2331
+ ).optional(),
2332
2332
  payment_retry_unit: z.enum(["day", "week"]).optional(),
2333
2333
  payment_retry_multiplier: z.number().gte(1).lte(1024).optional(),
2334
- payment_retries_limit: z.coerce.bigint().gte(BigInt(0)).max(BigInt("9223372036854775807"), {
2335
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
2336
- }),
2334
+ payment_retries_limit: z.preprocess(
2335
+ (v) => typeof v === "string" ? Number(v) : v,
2336
+ z.number().int().gte(0)
2337
+ ),
2337
2338
  action: z.enum(["none", "pause", "close", "suspend"]),
2338
2339
  default: z.boolean().optional()
2339
2340
  });
@@ -2343,19 +2344,24 @@ const zDunningRuleCreate = z.object({
2343
2344
  });
2344
2345
  const zDunningRuleUpdateAttributes = z.object({
2345
2346
  payment_retry_type: z.enum(["fixed", "backoff", "tiered"]).optional(),
2346
- payment_retry_interval: z.coerce.bigint().gte(BigInt(1)).lte(BigInt(1024)).nullish(),
2347
+ payment_retry_interval: z.preprocess(
2348
+ (v) => typeof v === "string" ? Number(v) : v,
2349
+ z.number().int().gte(1).lte(1024)
2350
+ ).nullish(),
2347
2351
  payment_retry_unit: z.enum(["day", "week"]).optional(),
2348
2352
  payment_retry_multiplier: z.number().gte(1).lte(1024).nullish(),
2349
- payment_retries_limit: z.coerce.bigint().gte(BigInt(0)).max(BigInt("9223372036854775807"), {
2350
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
2351
- }).optional(),
2353
+ payment_retries_limit: z.preprocess(
2354
+ (v) => typeof v === "string" ? Number(v) : v,
2355
+ z.number().int().gte(0)
2356
+ ).optional(),
2352
2357
  action: z.enum(["none", "pause", "close", "suspend"]).optional(),
2353
2358
  default: z.boolean().optional()
2354
2359
  });
2355
2360
  const zProrationPolicyAttributes = z.object({
2356
2361
  name: z.string().min(3).max(1024),
2357
2362
  rounding: z.enum(["up", "down", "nearest"]),
2358
- external_ref: zExternalRef.optional()
2363
+ external_ref: zExternalRef.optional(),
2364
+ allow_negative_proration_refund: z.boolean().optional().default(false)
2359
2365
  });
2360
2366
  const zProrationPolicyResponseAttributes = zProrationPolicyAttributes;
2361
2367
  const zProrationPolicyCreate = z.object({
@@ -2365,7 +2371,8 @@ const zProrationPolicyCreate = z.object({
2365
2371
  const zProrationPolicyUpdateAttributes = z.object({
2366
2372
  external_ref: zExternalRefUpdate.optional(),
2367
2373
  name: z.string().min(3).max(1024).optional(),
2368
- rounding: z.enum(["up", "down", "nearest"]).optional()
2374
+ rounding: z.enum(["up", "down", "nearest"]).optional(),
2375
+ allow_negative_proration_refund: z.boolean().optional()
2369
2376
  });
2370
2377
  const zFeatureConfigAccessAttributes = z.object({
2371
2378
  type: z.literal("access")
@@ -2482,22 +2489,29 @@ const zProrationPreviewType = z.literal("proration_preview");
2482
2489
  const zProrationPreviewAttributes = z.object({
2483
2490
  trigger: zProrationPreviewTriggerType,
2484
2491
  would_prorate: z.boolean(),
2485
- rejection_reason: z.enum(["negative_amount", "no_change"]),
2486
- billing_cost_before_proration: z.coerce.bigint().min(BigInt("-9223372036854775808"), {
2487
- message: "Invalid value: Expected int64 to be >= -9223372036854775808"
2488
- }).max(BigInt("9223372036854775807"), {
2489
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
2490
- }).nullish(),
2491
- refunded_cost_for_unused_pricing_option_period: z.coerce.bigint().min(BigInt("-9223372036854775808"), {
2492
- message: "Invalid value: Expected int64 to be >= -9223372036854775808"
2493
- }).max(BigInt("9223372036854775807"), {
2494
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
2495
- }).nullish(),
2496
- new_pricing_option_cost: z.coerce.bigint().min(BigInt("-9223372036854775808"), {
2497
- message: "Invalid value: Expected int64 to be >= -9223372036854775808"
2498
- }).max(BigInt("9223372036854775807"), {
2499
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
2500
- }).nullish(),
2492
+ would_refund: z.boolean().nullish(),
2493
+ refund_amount: z.preprocess(
2494
+ (v) => typeof v === "string" ? Number(v) : v,
2495
+ z.number().int()
2496
+ ).nullish(),
2497
+ rejection_reason: z.enum([
2498
+ "negative_amount",
2499
+ "no_change",
2500
+ "refund_not_possible",
2501
+ "refund_disallowed_by_policy"
2502
+ ]),
2503
+ billing_cost_before_proration: z.preprocess(
2504
+ (v) => typeof v === "string" ? Number(v) : v,
2505
+ z.number().int()
2506
+ ).nullish(),
2507
+ refunded_cost_for_unused_pricing_option_period: z.preprocess(
2508
+ (v) => typeof v === "string" ? Number(v) : v,
2509
+ z.number().int()
2510
+ ).nullish(),
2511
+ new_pricing_option_cost: z.preprocess(
2512
+ (v) => typeof v === "string" ? Number(v) : v,
2513
+ z.number().int()
2514
+ ).nullish(),
2501
2515
  proration_policy_id: z.string().uuid().nullish(),
2502
2516
  prorated_at: z.string().nullish(),
2503
2517
  billing_period_end_date_after_proration: z.string().nullish(),
@@ -2689,9 +2703,10 @@ const zUpdateInvoicePaymentAttributes = z.object({
2689
2703
  payment_taken_at: z.string().optional()
2690
2704
  });
2691
2705
  const zSubscriptionInvoicePaymentRefundAttributes = z.object({
2692
- amount: z.coerce.bigint().gte(BigInt(1)).max(BigInt("9223372036854775807"), {
2693
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
2694
- }),
2706
+ amount: z.preprocess(
2707
+ (v) => typeof v === "string" ? Number(v) : v,
2708
+ z.number().int().gte(1)
2709
+ ),
2695
2710
  reason: z.string().max(1024),
2696
2711
  gateway: z.string().max(1024),
2697
2712
  external_refund_id: z.string().max(1024),
@@ -2700,9 +2715,10 @@ const zSubscriptionInvoicePaymentRefundAttributes = z.object({
2700
2715
  const zCreateInvoicePaymentRefund = z.object({
2701
2716
  type: zSubscriptionInvoicePaymentRefundType,
2702
2717
  attributes: z.object({
2703
- amount: z.coerce.bigint().gte(BigInt(1)).max(BigInt("9223372036854775807"), {
2704
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
2705
- }),
2718
+ amount: z.preprocess(
2719
+ (v) => typeof v === "string" ? Number(v) : v,
2720
+ z.number().int().gte(1)
2721
+ ),
2706
2722
  reason: z.string().min(1).max(1024)
2707
2723
  })
2708
2724
  });
@@ -2759,9 +2775,10 @@ const zNullableLeadTime = z.object({
2759
2775
  const zNotificationSchedule = z.object({
2760
2776
  name: z.string().min(1).max(1024),
2761
2777
  unit: z.enum(["day", "week", "month"]),
2762
- amount: z.coerce.bigint().gte(BigInt(1)).max(BigInt("9223372036854775807"), {
2763
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
2764
- })
2778
+ amount: z.preprocess(
2779
+ (v) => typeof v === "string" ? Number(v) : v,
2780
+ z.number().int().gte(1)
2781
+ )
2765
2782
  });
2766
2783
  const zPricingOptionAttributes = z.object({
2767
2784
  external_ref: zExternalRef.optional(),
@@ -3143,7 +3160,13 @@ const zSubscriptionMeta = z.object({
3143
3160
  pending: z.boolean(),
3144
3161
  invoice_after: z.string(),
3145
3162
  pending_price_change: zSubscriptionPriceChanges.optional(),
3146
- price_update_history: z.array(zSubscriptionPriceUpdateHistoryEntry).optional()
3163
+ price_update_history: z.array(zSubscriptionPriceUpdateHistoryEntry).optional(),
3164
+ last_refund_id: z.string().uuid().optional(),
3165
+ last_refund_amount: z.preprocess(
3166
+ (v) => typeof v === "string" ? Number(v) : v,
3167
+ z.number().int()
3168
+ ).optional(),
3169
+ paused_by: z.enum(["subscriber", "merchandizer", "dunning"]).optional()
3147
3170
  }).readonly();
3148
3171
  const zBuildSubscription = z.object({
3149
3172
  external_ref: zExternalRef.optional(),
@@ -3250,21 +3273,18 @@ const zUpdateInvoicePayment = z.object({
3250
3273
  });
3251
3274
  const zProrationEvent = z.object({
3252
3275
  proration_policy_id: zSubscriptionsUuid,
3253
- billing_cost_before_proration: z.coerce.bigint().min(BigInt("-9223372036854775808"), {
3254
- message: "Invalid value: Expected int64 to be >= -9223372036854775808"
3255
- }).max(BigInt("9223372036854775807"), {
3256
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
3257
- }),
3258
- refunded_amount_for_unused_pricing_option: z.coerce.bigint().min(BigInt("-9223372036854775808"), {
3259
- message: "Invalid value: Expected int64 to be >= -9223372036854775808"
3260
- }).max(BigInt("9223372036854775807"), {
3261
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
3262
- }),
3263
- new_pricing_option_cost: z.coerce.bigint().min(BigInt("-9223372036854775808"), {
3264
- message: "Invalid value: Expected int64 to be >= -9223372036854775808"
3265
- }).max(BigInt("9223372036854775807"), {
3266
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
3267
- }),
3276
+ billing_cost_before_proration: z.preprocess(
3277
+ (v) => typeof v === "string" ? Number(v) : v,
3278
+ z.number().int()
3279
+ ),
3280
+ refunded_amount_for_unused_pricing_option: z.preprocess(
3281
+ (v) => typeof v === "string" ? Number(v) : v,
3282
+ z.number().int()
3283
+ ),
3284
+ new_pricing_option_cost: z.preprocess(
3285
+ (v) => typeof v === "string" ? Number(v) : v,
3286
+ z.number().int()
3287
+ ),
3268
3288
  prorated_at: z.string()
3269
3289
  });
3270
3290
  const zSubscriptionInvoiceMeta = z.object({
@@ -3276,11 +3296,10 @@ const zSubscriptionInvoiceMeta = z.object({
3276
3296
  notifications: z.array(zInvoiceNotification).optional(),
3277
3297
  timestamps: zInvoiceTimestamps,
3278
3298
  proration_events: z.array(zProrationEvent).nullable(),
3279
- pro_rata_remaining_value: z.coerce.bigint().min(BigInt("-9223372036854775808"), {
3280
- message: "Invalid value: Expected int64 to be >= -9223372036854775808"
3281
- }).max(BigInt("9223372036854775807"), {
3282
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
3283
- })
3299
+ pro_rata_remaining_value: z.preprocess(
3300
+ (v) => typeof v === "string" ? Number(v) : v,
3301
+ z.number().int()
3302
+ )
3284
3303
  }).readonly();
3285
3304
  const zSubscriptionInvoicePaymentRefund = z.object({
3286
3305
  id: zSubscriptionsUuid,
@@ -3380,67 +3399,58 @@ const zMultipleProducts = z.object({
3380
3399
  id: z.string().uuid()
3381
3400
  });
3382
3401
  const zNullableLocation = z.object({
3383
- available: z.coerce.bigint().min(BigInt("-9223372036854775808"), {
3384
- message: "Invalid value: Expected int64 to be >= -9223372036854775808"
3385
- }).max(BigInt("9223372036854775807"), {
3386
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
3387
- })
3402
+ available: z.preprocess(
3403
+ (v) => typeof v === "string" ? Number(v) : v,
3404
+ z.number().int()
3405
+ )
3388
3406
  }).nullable();
3389
3407
  const zNullableLocations = z.record(zNullableLocation);
3390
3408
  const zStockUpdateAttributes = z.object({
3391
3409
  locations: zNullableLocations.optional()
3392
3410
  });
3393
3411
  const zStockCreateAttributes = z.object({
3394
- available: z.coerce.bigint().min(BigInt("-9223372036854775808"), {
3395
- message: "Invalid value: Expected int64 to be >= -9223372036854775808"
3396
- }).max(BigInt("9223372036854775807"), {
3397
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
3398
- }).optional(),
3412
+ available: z.preprocess(
3413
+ (v) => typeof v === "string" ? Number(v) : v,
3414
+ z.number().int()
3415
+ ).optional(),
3399
3416
  locations: z.record(
3400
3417
  z.object({
3401
- available: z.coerce.bigint().min(BigInt("-9223372036854775808"), {
3402
- message: "Invalid value: Expected int64 to be >= -9223372036854775808"
3403
- }).max(BigInt("9223372036854775807"), {
3404
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
3405
- })
3418
+ available: z.preprocess(
3419
+ (v) => typeof v === "string" ? Number(v) : v,
3420
+ z.number().int()
3421
+ )
3406
3422
  })
3407
3423
  ).optional()
3408
3424
  });
3409
3425
  const zStockLocations = z.record(
3410
3426
  z.object({
3411
- available: z.coerce.bigint().min(BigInt("-9223372036854775808"), {
3412
- message: "Invalid value: Expected int64 to be >= -9223372036854775808"
3413
- }).max(BigInt("9223372036854775807"), {
3414
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
3415
- }),
3416
- allocated: z.coerce.bigint().min(BigInt("-9223372036854775808"), {
3417
- message: "Invalid value: Expected int64 to be >= -9223372036854775808"
3418
- }).max(BigInt("9223372036854775807"), {
3419
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
3420
- }),
3421
- total: z.coerce.bigint().min(BigInt("-9223372036854775808"), {
3422
- message: "Invalid value: Expected int64 to be >= -9223372036854775808"
3423
- }).max(BigInt("9223372036854775807"), {
3424
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
3425
- })
3427
+ available: z.preprocess(
3428
+ (v) => typeof v === "string" ? Number(v) : v,
3429
+ z.number().int()
3430
+ ),
3431
+ allocated: z.preprocess(
3432
+ (v) => typeof v === "string" ? Number(v) : v,
3433
+ z.number().int()
3434
+ ),
3435
+ total: z.preprocess(
3436
+ (v) => typeof v === "string" ? Number(v) : v,
3437
+ z.number().int()
3438
+ )
3426
3439
  })
3427
3440
  );
3428
3441
  const zStockResponseAttributes = z.object({
3429
- available: z.coerce.bigint().min(BigInt("-9223372036854775808"), {
3430
- message: "Invalid value: Expected int64 to be >= -9223372036854775808"
3431
- }).max(BigInt("9223372036854775807"), {
3432
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
3433
- }),
3434
- allocated: z.coerce.bigint().min(BigInt("-9223372036854775808"), {
3435
- message: "Invalid value: Expected int64 to be >= -9223372036854775808"
3436
- }).max(BigInt("9223372036854775807"), {
3437
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
3438
- }),
3439
- total: z.coerce.bigint().min(BigInt("-9223372036854775808"), {
3440
- message: "Invalid value: Expected int64 to be >= -9223372036854775808"
3441
- }).max(BigInt("9223372036854775807"), {
3442
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
3443
- }),
3442
+ available: z.preprocess(
3443
+ (v) => typeof v === "string" ? Number(v) : v,
3444
+ z.number().int()
3445
+ ),
3446
+ allocated: z.preprocess(
3447
+ (v) => typeof v === "string" ? Number(v) : v,
3448
+ z.number().int()
3449
+ ),
3450
+ total: z.preprocess(
3451
+ (v) => typeof v === "string" ? Number(v) : v,
3452
+ z.number().int()
3453
+ ),
3444
3454
  locations: zStockLocations.optional()
3445
3455
  });
3446
3456
  const zGeolocationDetails = z.object({
@@ -3474,11 +3484,10 @@ const zInventoriesUuid = z.string();
3474
3484
  const zTransactionResponseAttributes = z.object({
3475
3485
  action: z.enum(["increment", "decrement", "allocate", "deallocate"]),
3476
3486
  product_id: zInventoriesUuid,
3477
- quantity: z.coerce.bigint().min(BigInt("-9223372036854775808"), {
3478
- message: "Invalid value: Expected int64 to be >= -9223372036854775808"
3479
- }).max(BigInt("9223372036854775807"), {
3480
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
3481
- }),
3487
+ quantity: z.preprocess(
3488
+ (v) => typeof v === "string" ? Number(v) : v,
3489
+ z.number().int()
3490
+ ),
3482
3491
  location: z.string().min(1).max(128).optional()
3483
3492
  });
3484
3493
  const zStockCreate = z.object({
@@ -3494,9 +3503,10 @@ const zStockUpdateRequest = z.object({
3494
3503
  const zTransactionCreateAttributes = z.object({
3495
3504
  product_id: zInventoriesUuid.optional(),
3496
3505
  action: z.enum(["increment", "decrement", "allocate", "deallocate", "set"]),
3497
- quantity: z.coerce.bigint().gte(BigInt(0)).max(BigInt("9223372036854775807"), {
3498
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
3499
- }),
3506
+ quantity: z.preprocess(
3507
+ (v) => typeof v === "string" ? Number(v) : v,
3508
+ z.number().int().gte(0)
3509
+ ),
3500
3510
  location: z.string().min(1).max(128).optional()
3501
3511
  });
3502
3512
  const zTransactionCreate = z.object({
@@ -4261,11 +4271,10 @@ const zTextMatchInfo = z.object({
4261
4271
  best_field_score: z.string().optional(),
4262
4272
  best_field_weight: z.number().int().optional(),
4263
4273
  fields_matched: z.number().int().optional(),
4264
- num_tokens_dropped: z.coerce.bigint().min(BigInt("-9223372036854775808"), {
4265
- message: "Invalid value: Expected int64 to be >= -9223372036854775808"
4266
- }).max(BigInt("9223372036854775807"), {
4267
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
4268
- }).optional(),
4274
+ num_tokens_dropped: z.preprocess(
4275
+ (v) => typeof v === "string" ? Number(v) : v,
4276
+ z.number().int()
4277
+ ).optional(),
4269
4278
  score: z.string().optional(),
4270
4279
  tokens_matched: z.number().int().optional(),
4271
4280
  typo_prefix_score: z.number().int().optional()
@@ -5157,25 +5166,22 @@ const zSettingsCartWritable = z.object({
5157
5166
  const zCartItemObjectWritable = zCartItemObjectData.and(
5158
5167
  zCartItemResponseWritable
5159
5168
  );
5160
- const zCartItemsResponseWritable = z.object({
5161
- data: z.array(
5162
- z.union([
5163
- zCartItemObjectWritable,
5164
- zCustomItemObject,
5165
- zSubscriptionItemObjectWritable,
5166
- zPromotionItemObject
5167
- ])
5168
- ).optional()
5169
- });
5170
- const zSubscriptionItemCartObjectWritable = zSubscriptionItemObjectData.and(zCartItemResponseWritable);
5171
- const zPromotionItemCartObjectWritable = zPromotionItemObjectData.and(zCartItemResponseWritable).and(
5169
+ const zCustomItemCartObjectWritable = zCartItemResponseWritable.and(
5170
+ z.object({
5171
+ type: z.literal("custom_item"),
5172
+ quantity: z.number().int()
5173
+ })
5174
+ );
5175
+ const zSubscriptionItemCartObjectWritable = zCartItemResponseWritable.and(
5172
5176
  z.object({
5173
- id: z.string().optional()
5177
+ type: z.literal("subscription_item"),
5178
+ quantity: z.number().int()
5174
5179
  })
5175
5180
  );
5176
- const zCustomItemCartObjectWritable = zCustomItemObjectData.and(zCartItemResponseWritable).and(
5181
+ const zPromotionItemCartObjectWritable = zCartItemResponseWritable.and(
5177
5182
  z.object({
5178
- id: z.string().optional()
5183
+ type: z.literal("promotion_item"),
5184
+ quantity: z.number().int()
5179
5185
  })
5180
5186
  );
5181
5187
  const zCartsResponseWritable = z.object({
@@ -5194,6 +5200,8 @@ const zCartsResponseWritable = z.object({
5194
5200
  tax: zFormattedPriceData.optional(),
5195
5201
  discount: zFormattedPriceData.optional(),
5196
5202
  without_discount: zFormattedPriceData.optional(),
5203
+ shipping: zFormattedPriceData.optional(),
5204
+ shipping_discount: zFormattedPriceData.optional(),
5197
5205
  discounts: z.record(
5198
5206
  z.object({
5199
5207
  amount: z.number().optional(),
@@ -5205,6 +5213,16 @@ const zCartsResponseWritable = z.object({
5205
5213
  timestamps: zCartTimestamps.optional()
5206
5214
  }).optional()
5207
5215
  });
5216
+ const zCartItemsResponseWritable = z.object({
5217
+ data: z.array(
5218
+ z.union([
5219
+ zCartItemObjectWritable,
5220
+ zCustomItemCartObjectWritable,
5221
+ zSubscriptionItemCartObjectWritable,
5222
+ zPromotionItemCartObjectWritable
5223
+ ])
5224
+ ).optional()
5225
+ });
5208
5226
  const zCartIncludedWritable = z.object({
5209
5227
  items: z.array(
5210
5228
  z.union([
@@ -5347,7 +5365,13 @@ const zSubscriptionMetaWritable = z.object({
5347
5365
  pending: z.boolean(),
5348
5366
  invoice_after: z.string(),
5349
5367
  pending_price_change: zSubscriptionPriceChanges.optional(),
5350
- price_update_history: z.array(zSubscriptionPriceUpdateHistoryEntry).optional()
5368
+ price_update_history: z.array(zSubscriptionPriceUpdateHistoryEntry).optional(),
5369
+ last_refund_id: z.string().uuid().optional(),
5370
+ last_refund_amount: z.preprocess(
5371
+ (v) => typeof v === "string" ? Number(v) : v,
5372
+ z.number().int()
5373
+ ).optional(),
5374
+ paused_by: z.enum(["subscriber", "merchandizer", "dunning"]).optional()
5351
5375
  }).readonly();
5352
5376
  const zPaymentAuthorityWritable = z.intersection(
5353
5377
  z.union([
@@ -5477,11 +5501,10 @@ const zSubscriptionInvoiceMetaWritable = z.object({
5477
5501
  notifications: z.array(zInvoiceNotification).optional(),
5478
5502
  timestamps: zInvoiceTimestamps,
5479
5503
  proration_events: z.array(zProrationEvent).nullable(),
5480
- pro_rata_remaining_value: z.coerce.bigint().min(BigInt("-9223372036854775808"), {
5481
- message: "Invalid value: Expected int64 to be >= -9223372036854775808"
5482
- }).max(BigInt("9223372036854775807"), {
5483
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
5484
- })
5504
+ pro_rata_remaining_value: z.preprocess(
5505
+ (v) => typeof v === "string" ? Number(v) : v,
5506
+ z.number().int()
5507
+ )
5485
5508
  }).readonly();
5486
5509
  const zSubscriptionInvoiceWritable = z.object({
5487
5510
  id: zSubscriptionsUuid.optional(),
@@ -5670,10 +5693,14 @@ const zFilterRule = z.string();
5670
5693
  const zInclude = z.array(
5671
5694
  z.enum(["files", "main_image", "component_products"])
5672
5695
  );
5673
- const zLimit = z.coerce.bigint().gte(BigInt(1)).max(BigInt("9223372036854775807"), {
5674
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
5675
- });
5676
- const zOffset = z.coerce.bigint().gte(BigInt(0)).lte(BigInt(1e4));
5696
+ const zLimit = z.preprocess(
5697
+ (v) => typeof v === "string" ? Number(v) : v,
5698
+ z.number().int().gte(1)
5699
+ );
5700
+ const zOffset = z.preprocess(
5701
+ (v) => typeof v === "string" ? Number(v) : v,
5702
+ z.number().int().gte(0).lte(1e4)
5703
+ );
5677
5704
  const zPricebookIdsForPriceSegmentationPreview = z.array(z.string()).max(5);
5678
5705
  const zPricebookIdsOfAvailablePricesToShow = z.array(z.string());
5679
5706
  const zTag = z.string();
@@ -5692,30 +5719,48 @@ const zSubscriptionInclude = z.array(
5692
5719
  z.enum(["plans", "pricing_options"])
5693
5720
  );
5694
5721
  const zSubscriptionsFilter = z.string();
5695
- const zSubscriptionsPageLimit = z.coerce.bigint().gte(BigInt(0)).max(BigInt("9223372036854775807"), {
5696
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
5697
- });
5698
- const zSubscriptionsPageOffset = z.coerce.bigint().gte(BigInt(0)).lte(BigInt(1e4));
5722
+ const zSubscriptionsPageLimit = z.preprocess(
5723
+ (v) => typeof v === "string" ? Number(v) : v,
5724
+ z.number().int().gte(0)
5725
+ );
5726
+ const zSubscriptionsPageOffset = z.preprocess(
5727
+ (v) => typeof v === "string" ? Number(v) : v,
5728
+ z.number().int().gte(0).lte(1e4)
5729
+ );
5699
5730
  const zEpGeolocation = z.string().regex(/^-?\d+(\.\d+)?,-?\d+(\.\d+)?$/);
5700
5731
  const zInventoriesFilter = z.string();
5701
5732
  const zInventoriesPageLimit = z.number().int().gte(0);
5702
5733
  const zInventoriesPageOffset = z.number().int().gte(0).lte(1e4);
5703
5734
  const zFilter = z.string();
5704
- const zPageLimit = z.coerce.bigint().gte(BigInt(0)).max(BigInt("9223372036854775807"), {
5705
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
5706
- });
5707
- const zPageOffset = z.coerce.bigint().gte(BigInt(0)).lte(BigInt(1e4));
5735
+ const zPageLimit = z.preprocess(
5736
+ (v) => typeof v === "string" ? Number(v) : v,
5737
+ z.number().int().gte(0)
5738
+ );
5739
+ const zPageOffset = z.preprocess(
5740
+ (v) => typeof v === "string" ? Number(v) : v,
5741
+ z.number().int().gte(0).lte(1e4)
5742
+ );
5708
5743
  const zIncludeAccountMember = z.string();
5709
5744
  const zIncludeAccount = z.string();
5710
5745
  const zAccountTagId = z.string().uuid();
5711
- const zAuthenticationRealmspageLimit = z.coerce.bigint().gte(BigInt(1)).lte(BigInt(100)).default(BigInt(25));
5712
- const zAuthenticationRealmspageOffset = z.coerce.bigint().gte(BigInt(0)).max(BigInt("9223372036854775807"), {
5713
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
5714
- }).default(BigInt(0));
5746
+ const zAuthenticationRealmspageLimit = z.preprocess(
5747
+ (v) => typeof v === "string" ? Number(v) : v,
5748
+ z.number().int().gte(1).lte(100)
5749
+ ).default(25);
5750
+ const zAuthenticationRealmspageOffset = z.preprocess(
5751
+ (v) => typeof v === "string" ? Number(v) : v,
5752
+ z.number().int().gte(0)
5753
+ ).default(0);
5715
5754
  const zAuthenticationRealmsfilter = z.string();
5716
5755
  const zFilesfilter = z.string();
5717
- const zFilespageOffset = z.coerce.bigint().gte(BigInt(0)).lte(BigInt(1e4));
5718
- const zFilespageLimit = z.coerce.bigint().gte(BigInt(0)).lte(BigInt(1e4));
5756
+ const zFilespageOffset = z.preprocess(
5757
+ (v) => typeof v === "string" ? Number(v) : v,
5758
+ z.number().int().gte(0).lte(1e4)
5759
+ );
5760
+ const zFilespageLimit = z.preprocess(
5761
+ (v) => typeof v === "string" ? Number(v) : v,
5762
+ z.number().int().gte(0).lte(1e4)
5763
+ );
5719
5764
  const zCatalogSearchacceptLanguage = z.string();
5720
5765
  const zCatalogSearchpricebookIdsForPriceSegmentationPreview = z.array(z.string()).max(5);
5721
5766
  const zCatalogSearchpricebookIdsOfAvailablePricesToShow = z.array(z.string()).max(5);
@@ -5747,10 +5792,14 @@ const zGetByContextAllHierarchiesHeaders = z.object({
5747
5792
  });
5748
5793
  const zGetByContextAllHierarchiesQuery = z.object({
5749
5794
  filter: z.string().optional(),
5750
- "page[limit]": z.coerce.bigint().gte(BigInt(1)).max(BigInt("9223372036854775807"), {
5751
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
5752
- }).optional(),
5753
- "page[offset]": z.coerce.bigint().gte(BigInt(0)).lte(BigInt(1e4)).optional()
5795
+ "page[limit]": z.preprocess(
5796
+ (v) => typeof v === "string" ? Number(v) : v,
5797
+ z.number().int().gte(1)
5798
+ ).optional(),
5799
+ "page[offset]": z.preprocess(
5800
+ (v) => typeof v === "string" ? Number(v) : v,
5801
+ z.number().int().gte(0).lte(1e4)
5802
+ ).optional()
5754
5803
  });
5755
5804
  const zGetByContextAllHierarchiesResponse = zHierarchyListData;
5756
5805
  const zGetByContextHierarchyHeaders = z.object({
@@ -5772,10 +5821,14 @@ const zGetByContextHierarchyNodesPath = z.object({
5772
5821
  });
5773
5822
  const zGetByContextHierarchyNodesQuery = z.object({
5774
5823
  filter: z.string().optional(),
5775
- "page[limit]": z.coerce.bigint().gte(BigInt(1)).max(BigInt("9223372036854775807"), {
5776
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
5777
- }).optional(),
5778
- "page[offset]": z.coerce.bigint().gte(BigInt(0)).lte(BigInt(1e4)).optional()
5824
+ "page[limit]": z.preprocess(
5825
+ (v) => typeof v === "string" ? Number(v) : v,
5826
+ z.number().int().gte(1)
5827
+ ).optional(),
5828
+ "page[offset]": z.preprocess(
5829
+ (v) => typeof v === "string" ? Number(v) : v,
5830
+ z.number().int().gte(0).lte(1e4)
5831
+ ).optional()
5779
5832
  });
5780
5833
  const zGetByContextHierarchyNodesResponse = zNodeListData;
5781
5834
  const zGetByContextHierarchyChildNodesHeaders = z.object({
@@ -5788,10 +5841,14 @@ const zGetByContextHierarchyChildNodesPath = z.object({
5788
5841
  });
5789
5842
  const zGetByContextHierarchyChildNodesQuery = z.object({
5790
5843
  filter: z.string().optional(),
5791
- "page[limit]": z.coerce.bigint().gte(BigInt(1)).max(BigInt("9223372036854775807"), {
5792
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
5793
- }).optional(),
5794
- "page[offset]": z.coerce.bigint().gte(BigInt(0)).lte(BigInt(1e4)).optional()
5844
+ "page[limit]": z.preprocess(
5845
+ (v) => typeof v === "string" ? Number(v) : v,
5846
+ z.number().int().gte(1)
5847
+ ).optional(),
5848
+ "page[offset]": z.preprocess(
5849
+ (v) => typeof v === "string" ? Number(v) : v,
5850
+ z.number().int().gte(0).lte(1e4)
5851
+ ).optional()
5795
5852
  });
5796
5853
  const zGetByContextHierarchyChildNodesResponse = zNodeListData;
5797
5854
  const zGetByContextAllNodesHeaders = z.object({
@@ -5801,10 +5858,14 @@ const zGetByContextAllNodesHeaders = z.object({
5801
5858
  });
5802
5859
  const zGetByContextAllNodesQuery = z.object({
5803
5860
  filter: z.string().optional(),
5804
- "page[limit]": z.coerce.bigint().gte(BigInt(1)).max(BigInt("9223372036854775807"), {
5805
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
5806
- }).optional(),
5807
- "page[offset]": z.coerce.bigint().gte(BigInt(0)).lte(BigInt(1e4)).optional()
5861
+ "page[limit]": z.preprocess(
5862
+ (v) => typeof v === "string" ? Number(v) : v,
5863
+ z.number().int().gte(1)
5864
+ ).optional(),
5865
+ "page[offset]": z.preprocess(
5866
+ (v) => typeof v === "string" ? Number(v) : v,
5867
+ z.number().int().gte(0).lte(1e4)
5868
+ ).optional()
5808
5869
  });
5809
5870
  const zGetByContextAllNodesResponse = zNodeListData;
5810
5871
  const zGetByContextNodeHeaders = z.object({
@@ -5826,10 +5887,14 @@ const zGetByContextChildNodesPath = z.object({
5826
5887
  });
5827
5888
  const zGetByContextChildNodesQuery = z.object({
5828
5889
  filter: z.string().optional(),
5829
- "page[limit]": z.coerce.bigint().gte(BigInt(1)).max(BigInt("9223372036854775807"), {
5830
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
5831
- }).optional(),
5832
- "page[offset]": z.coerce.bigint().gte(BigInt(0)).lte(BigInt(1e4)).optional()
5890
+ "page[limit]": z.preprocess(
5891
+ (v) => typeof v === "string" ? Number(v) : v,
5892
+ z.number().int().gte(1)
5893
+ ).optional(),
5894
+ "page[offset]": z.preprocess(
5895
+ (v) => typeof v === "string" ? Number(v) : v,
5896
+ z.number().int().gte(0).lte(1e4)
5897
+ ).optional()
5833
5898
  });
5834
5899
  const zGetByContextChildNodesResponse = zNodeListData;
5835
5900
  const zGetByContextComponentProductIdsHeaders = z.object({
@@ -5840,18 +5905,26 @@ const zGetByContextComponentProductIdsPath = z.object({
5840
5905
  product_id: z.string()
5841
5906
  });
5842
5907
  const zGetByContextComponentProductIdsQuery = z.object({
5843
- "page[limit]": z.coerce.bigint().gte(BigInt(1)).max(BigInt("9223372036854775807"), {
5844
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
5845
- }).optional(),
5846
- "page[offset]": z.coerce.bigint().gte(BigInt(0)).lte(BigInt(1e4)).optional()
5908
+ "page[limit]": z.preprocess(
5909
+ (v) => typeof v === "string" ? Number(v) : v,
5910
+ z.number().int().gte(1)
5911
+ ).optional(),
5912
+ "page[offset]": z.preprocess(
5913
+ (v) => typeof v === "string" ? Number(v) : v,
5914
+ z.number().int().gte(0).lte(1e4)
5915
+ ).optional()
5847
5916
  });
5848
5917
  const zGetByContextComponentProductIdsResponse = zProductReferenceListData;
5849
5918
  const zGetCatalogsQuery = z.object({
5850
5919
  filter: z.string().optional(),
5851
- "page[limit]": z.coerce.bigint().gte(BigInt(1)).max(BigInt("9223372036854775807"), {
5852
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
5853
- }).optional(),
5854
- "page[offset]": z.coerce.bigint().gte(BigInt(0)).lte(BigInt(1e4)).optional()
5920
+ "page[limit]": z.preprocess(
5921
+ (v) => typeof v === "string" ? Number(v) : v,
5922
+ z.number().int().gte(1)
5923
+ ).optional(),
5924
+ "page[offset]": z.preprocess(
5925
+ (v) => typeof v === "string" ? Number(v) : v,
5926
+ z.number().int().gte(0).lte(1e4)
5927
+ ).optional()
5855
5928
  });
5856
5929
  const zGetCatalogsResponse = zCatalogListData;
5857
5930
  const zCreateCatalogBody = zCatalogCreateData;
@@ -5900,10 +5973,14 @@ const zGetReleaseByIdPath = z.object({
5900
5973
  const zGetReleaseByIdResponse = zReleaseData;
5901
5974
  const zGetRulesQuery = z.object({
5902
5975
  filter: z.string().optional(),
5903
- "page[limit]": z.coerce.bigint().gte(BigInt(1)).max(BigInt("9223372036854775807"), {
5904
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
5905
- }).optional(),
5906
- "page[offset]": z.coerce.bigint().gte(BigInt(0)).lte(BigInt(1e4)).optional()
5976
+ "page[limit]": z.preprocess(
5977
+ (v) => typeof v === "string" ? Number(v) : v,
5978
+ z.number().int().gte(1)
5979
+ ).optional(),
5980
+ "page[offset]": z.preprocess(
5981
+ (v) => typeof v === "string" ? Number(v) : v,
5982
+ z.number().int().gte(0).lte(1e4)
5983
+ ).optional()
5907
5984
  });
5908
5985
  const zGetRulesResponse = zRuleListData;
5909
5986
  const zCreateRuleBody = zRuleCreateData;
@@ -5923,10 +6000,14 @@ const zUpdateRulePath = z.object({
5923
6000
  const zUpdateRuleResponse = zRuleData;
5924
6001
  const zValidateCatalogRulesBody = zCatalogRuleValidatorRequest;
5925
6002
  const zValidateCatalogRulesQuery = z.object({
5926
- "page[limit]": z.coerce.bigint().gte(BigInt(1)).max(BigInt("9223372036854775807"), {
5927
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
5928
- }).optional(),
5929
- "page[offset]": z.coerce.bigint().gte(BigInt(0)).lte(BigInt(1e4)).optional()
6003
+ "page[limit]": z.preprocess(
6004
+ (v) => typeof v === "string" ? Number(v) : v,
6005
+ z.number().int().gte(1)
6006
+ ).optional(),
6007
+ "page[offset]": z.preprocess(
6008
+ (v) => typeof v === "string" ? Number(v) : v,
6009
+ z.number().int().gte(0).lte(1e4)
6010
+ ).optional()
5930
6011
  });
5931
6012
  const zValidateCatalogRulesResponse = zRuleListData;
5932
6013
  const zGetAllHierarchiesHeaders = z.object({
@@ -5938,10 +6019,14 @@ const zGetAllHierarchiesPath = z.object({
5938
6019
  });
5939
6020
  const zGetAllHierarchiesQuery = z.object({
5940
6021
  filter: z.string().optional(),
5941
- "page[limit]": z.coerce.bigint().gte(BigInt(1)).max(BigInt("9223372036854775807"), {
5942
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
5943
- }).optional(),
5944
- "page[offset]": z.coerce.bigint().gte(BigInt(0)).lte(BigInt(1e4)).optional()
6022
+ "page[limit]": z.preprocess(
6023
+ (v) => typeof v === "string" ? Number(v) : v,
6024
+ z.number().int().gte(1)
6025
+ ).optional(),
6026
+ "page[offset]": z.preprocess(
6027
+ (v) => typeof v === "string" ? Number(v) : v,
6028
+ z.number().int().gte(0).lte(1e4)
6029
+ ).optional()
5945
6030
  });
5946
6031
  const zGetAllHierarchiesResponse = zHierarchyListData;
5947
6032
  const zGetHierarchyHeaders = z.object({
@@ -5963,10 +6048,14 @@ const zGetHierarchyNodesPath = z.object({
5963
6048
  });
5964
6049
  const zGetHierarchyNodesQuery = z.object({
5965
6050
  filter: z.string().optional(),
5966
- "page[limit]": z.coerce.bigint().gte(BigInt(1)).max(BigInt("9223372036854775807"), {
5967
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
5968
- }).optional(),
5969
- "page[offset]": z.coerce.bigint().gte(BigInt(0)).lte(BigInt(1e4)).optional()
6051
+ "page[limit]": z.preprocess(
6052
+ (v) => typeof v === "string" ? Number(v) : v,
6053
+ z.number().int().gte(1)
6054
+ ).optional(),
6055
+ "page[offset]": z.preprocess(
6056
+ (v) => typeof v === "string" ? Number(v) : v,
6057
+ z.number().int().gte(0).lte(1e4)
6058
+ ).optional()
5970
6059
  });
5971
6060
  const zGetHierarchyNodesResponse = zNodeListData;
5972
6061
  const zGetHierarchyChildNodesHeaders = z.object({
@@ -5979,10 +6068,14 @@ const zGetHierarchyChildNodesPath = z.object({
5979
6068
  });
5980
6069
  const zGetHierarchyChildNodesQuery = z.object({
5981
6070
  filter: z.string().optional(),
5982
- "page[limit]": z.coerce.bigint().gte(BigInt(1)).max(BigInt("9223372036854775807"), {
5983
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
5984
- }).optional(),
5985
- "page[offset]": z.coerce.bigint().gte(BigInt(0)).lte(BigInt(1e4)).optional()
6071
+ "page[limit]": z.preprocess(
6072
+ (v) => typeof v === "string" ? Number(v) : v,
6073
+ z.number().int().gte(1)
6074
+ ).optional(),
6075
+ "page[offset]": z.preprocess(
6076
+ (v) => typeof v === "string" ? Number(v) : v,
6077
+ z.number().int().gte(0).lte(1e4)
6078
+ ).optional()
5986
6079
  });
5987
6080
  const zGetHierarchyChildNodesResponse = zNodeListData;
5988
6081
  const zGetAllNodesHeaders = z.object({
@@ -5994,10 +6087,14 @@ const zGetAllNodesPath = z.object({
5994
6087
  });
5995
6088
  const zGetAllNodesQuery = z.object({
5996
6089
  filter: z.string().optional(),
5997
- "page[limit]": z.coerce.bigint().gte(BigInt(1)).max(BigInt("9223372036854775807"), {
5998
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
5999
- }).optional(),
6000
- "page[offset]": z.coerce.bigint().gte(BigInt(0)).lte(BigInt(1e4)).optional()
6090
+ "page[limit]": z.preprocess(
6091
+ (v) => typeof v === "string" ? Number(v) : v,
6092
+ z.number().int().gte(1)
6093
+ ).optional(),
6094
+ "page[offset]": z.preprocess(
6095
+ (v) => typeof v === "string" ? Number(v) : v,
6096
+ z.number().int().gte(0).lte(1e4)
6097
+ ).optional()
6001
6098
  });
6002
6099
  const zGetAllNodesResponse = zNodeListData;
6003
6100
  const zGetNodeHeaders = z.object({
@@ -6019,10 +6116,14 @@ const zGetChildNodesPath = z.object({
6019
6116
  });
6020
6117
  const zGetChildNodesQuery = z.object({
6021
6118
  filter: z.string().optional(),
6022
- "page[limit]": z.coerce.bigint().gte(BigInt(1)).max(BigInt("9223372036854775807"), {
6023
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
6024
- }).optional(),
6025
- "page[offset]": z.coerce.bigint().gte(BigInt(0)).lte(BigInt(1e4)).optional()
6119
+ "page[limit]": z.preprocess(
6120
+ (v) => typeof v === "string" ? Number(v) : v,
6121
+ z.number().int().gte(1)
6122
+ ).optional(),
6123
+ "page[offset]": z.preprocess(
6124
+ (v) => typeof v === "string" ? Number(v) : v,
6125
+ z.number().int().gte(0).lte(1e4)
6126
+ ).optional()
6026
6127
  });
6027
6128
  const zGetChildNodesResponse = zNodeListData;
6028
6129
  const zGetComponentProductIdsHeaders = z.object({
@@ -6036,10 +6137,14 @@ const zGetComponentProductIdsPath = z.object({
6036
6137
  });
6037
6138
  const zGetComponentProductIdsQuery = z.object({
6038
6139
  include: z.array(z.enum(["files", "main_image", "component_products"])).optional(),
6039
- "page[limit]": z.coerce.bigint().gte(BigInt(1)).max(BigInt("9223372036854775807"), {
6040
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
6041
- }).optional(),
6042
- "page[offset]": z.coerce.bigint().gte(BigInt(0)).lte(BigInt(1e4)).optional()
6140
+ "page[limit]": z.preprocess(
6141
+ (v) => typeof v === "string" ? Number(v) : v,
6142
+ z.number().int().gte(1)
6143
+ ).optional(),
6144
+ "page[offset]": z.preprocess(
6145
+ (v) => typeof v === "string" ? Number(v) : v,
6146
+ z.number().int().gte(0).lte(1e4)
6147
+ ).optional()
6043
6148
  });
6044
6149
  const zGetComponentProductIdsResponse = zProductReferenceListData;
6045
6150
  const zGetCartsHeaders = z.object({
@@ -6443,10 +6548,14 @@ const zPutV2SettingsCartStoreIdPath = z.object({
6443
6548
  const zPutV2SettingsCartStoreIdResponse = zSettingsCart;
6444
6549
  const zListOfferingsQuery = z.object({
6445
6550
  filter: z.string().optional(),
6446
- "page[offset]": z.coerce.bigint().gte(BigInt(0)).lte(BigInt(1e4)).optional(),
6447
- "page[limit]": z.coerce.bigint().gte(BigInt(0)).max(BigInt("9223372036854775807"), {
6448
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
6449
- }).optional(),
6551
+ "page[offset]": z.preprocess(
6552
+ (v) => typeof v === "string" ? Number(v) : v,
6553
+ z.number().int().gte(0).lte(1e4)
6554
+ ).optional(),
6555
+ "page[limit]": z.preprocess(
6556
+ (v) => typeof v === "string" ? Number(v) : v,
6557
+ z.number().int().gte(0)
6558
+ ).optional(),
6450
6559
  include: z.array(z.enum(["plans", "pricing_options", "features"])).optional()
6451
6560
  });
6452
6561
  const zListOfferingsResponse = z.object({
@@ -6468,10 +6577,14 @@ const zListOfferingPricingOptionsPath = z.object({
6468
6577
  offering_uuid: zSubscriptionsUuid
6469
6578
  });
6470
6579
  const zListOfferingPricingOptionsQuery = z.object({
6471
- "page[offset]": z.coerce.bigint().gte(BigInt(0)).lte(BigInt(1e4)).optional(),
6472
- "page[limit]": z.coerce.bigint().gte(BigInt(0)).max(BigInt("9223372036854775807"), {
6473
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
6474
- }).optional()
6580
+ "page[offset]": z.preprocess(
6581
+ (v) => typeof v === "string" ? Number(v) : v,
6582
+ z.number().int().gte(0).lte(1e4)
6583
+ ).optional(),
6584
+ "page[limit]": z.preprocess(
6585
+ (v) => typeof v === "string" ? Number(v) : v,
6586
+ z.number().int().gte(0)
6587
+ ).optional()
6475
6588
  });
6476
6589
  const zListOfferingPricingOptionsResponse = z.object({
6477
6590
  data: z.array(zOfferingPricingOption).optional(),
@@ -6481,10 +6594,14 @@ const zListOfferingFeaturesPath = z.object({
6481
6594
  offering_uuid: zSubscriptionsUuid
6482
6595
  });
6483
6596
  const zListOfferingFeaturesQuery = z.object({
6484
- "page[offset]": z.coerce.bigint().gte(BigInt(0)).lte(BigInt(1e4)).optional(),
6485
- "page[limit]": z.coerce.bigint().gte(BigInt(0)).max(BigInt("9223372036854775807"), {
6486
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
6487
- }).optional()
6597
+ "page[offset]": z.preprocess(
6598
+ (v) => typeof v === "string" ? Number(v) : v,
6599
+ z.number().int().gte(0).lte(1e4)
6600
+ ).optional(),
6601
+ "page[limit]": z.preprocess(
6602
+ (v) => typeof v === "string" ? Number(v) : v,
6603
+ z.number().int().gte(0)
6604
+ ).optional()
6488
6605
  });
6489
6606
  const zListOfferingFeaturesResponse = z.object({
6490
6607
  data: z.array(zOfferingFeature).optional(),
@@ -6494,10 +6611,14 @@ const zListOfferingPlansPath = z.object({
6494
6611
  offering_uuid: zSubscriptionsUuid
6495
6612
  });
6496
6613
  const zListOfferingPlansQuery = z.object({
6497
- "page[offset]": z.coerce.bigint().gte(BigInt(0)).lte(BigInt(1e4)).optional(),
6498
- "page[limit]": z.coerce.bigint().gte(BigInt(0)).max(BigInt("9223372036854775807"), {
6499
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
6500
- }).optional()
6614
+ "page[offset]": z.preprocess(
6615
+ (v) => typeof v === "string" ? Number(v) : v,
6616
+ z.number().int().gte(0).lte(1e4)
6617
+ ).optional(),
6618
+ "page[limit]": z.preprocess(
6619
+ (v) => typeof v === "string" ? Number(v) : v,
6620
+ z.number().int().gte(0)
6621
+ ).optional()
6501
6622
  });
6502
6623
  const zListOfferingPlansResponse = z.object({
6503
6624
  data: z.array(zOfferingPlan).optional(),
@@ -6512,10 +6633,14 @@ const zListOfferingPlanPricingOptionsResponse = z.object({
6512
6633
  });
6513
6634
  const zListSubscriptionsQuery = z.object({
6514
6635
  filter: z.string().optional(),
6515
- "page[offset]": z.coerce.bigint().gte(BigInt(0)).lte(BigInt(1e4)).optional(),
6516
- "page[limit]": z.coerce.bigint().gte(BigInt(0)).max(BigInt("9223372036854775807"), {
6517
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
6518
- }).optional(),
6636
+ "page[offset]": z.preprocess(
6637
+ (v) => typeof v === "string" ? Number(v) : v,
6638
+ z.number().int().gte(0).lte(1e4)
6639
+ ).optional(),
6640
+ "page[limit]": z.preprocess(
6641
+ (v) => typeof v === "string" ? Number(v) : v,
6642
+ z.number().int().gte(0)
6643
+ ).optional(),
6519
6644
  include: z.array(z.enum(["plans", "pricing_options"])).optional()
6520
6645
  });
6521
6646
  const zListSubscriptionsResponse = z.object({
@@ -6569,10 +6694,14 @@ const zListSubscriptionInvoicesPath = z.object({
6569
6694
  subscription_uuid: zSubscriptionsUuid
6570
6695
  });
6571
6696
  const zListSubscriptionInvoicesQuery = z.object({
6572
- "page[offset]": z.coerce.bigint().gte(BigInt(0)).lte(BigInt(1e4)).optional(),
6573
- "page[limit]": z.coerce.bigint().gte(BigInt(0)).max(BigInt("9223372036854775807"), {
6574
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
6575
- }).optional()
6697
+ "page[offset]": z.preprocess(
6698
+ (v) => typeof v === "string" ? Number(v) : v,
6699
+ z.number().int().gte(0).lte(1e4)
6700
+ ).optional(),
6701
+ "page[limit]": z.preprocess(
6702
+ (v) => typeof v === "string" ? Number(v) : v,
6703
+ z.number().int().gte(0)
6704
+ ).optional()
6576
6705
  });
6577
6706
  const zListSubscriptionInvoicesResponse = z.object({
6578
6707
  data: z.array(zSubscriptionInvoice).optional(),
@@ -6583,10 +6712,14 @@ const zListSubscriptionInvoicePaymentsPath = z.object({
6583
6712
  invoice_uuid: zSubscriptionsUuid
6584
6713
  });
6585
6714
  const zListSubscriptionInvoicePaymentsQuery = z.object({
6586
- "page[offset]": z.coerce.bigint().gte(BigInt(0)).lte(BigInt(1e4)).optional(),
6587
- "page[limit]": z.coerce.bigint().gte(BigInt(0)).max(BigInt("9223372036854775807"), {
6588
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
6589
- }).optional()
6715
+ "page[offset]": z.preprocess(
6716
+ (v) => typeof v === "string" ? Number(v) : v,
6717
+ z.number().int().gte(0).lte(1e4)
6718
+ ).optional(),
6719
+ "page[limit]": z.preprocess(
6720
+ (v) => typeof v === "string" ? Number(v) : v,
6721
+ z.number().int().gte(0)
6722
+ ).optional()
6590
6723
  });
6591
6724
  const zListSubscriptionInvoicePaymentsResponse = z.object({
6592
6725
  data: z.array(zSubscriptionInvoicePayment).optional(),
@@ -6609,10 +6742,14 @@ const zGetSubscriptionInvoiceResponse = z.object({
6609
6742
  });
6610
6743
  const zListInvoicesQuery = z.object({
6611
6744
  filter: z.string().optional(),
6612
- "page[offset]": z.coerce.bigint().gte(BigInt(0)).lte(BigInt(1e4)).optional(),
6613
- "page[limit]": z.coerce.bigint().gte(BigInt(0)).max(BigInt("9223372036854775807"), {
6614
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
6615
- }).optional()
6745
+ "page[offset]": z.preprocess(
6746
+ (v) => typeof v === "string" ? Number(v) : v,
6747
+ z.number().int().gte(0).lte(1e4)
6748
+ ).optional(),
6749
+ "page[limit]": z.preprocess(
6750
+ (v) => typeof v === "string" ? Number(v) : v,
6751
+ z.number().int().gte(0)
6752
+ ).optional()
6616
6753
  });
6617
6754
  const zListInvoicesResponse = z.object({
6618
6755
  data: z.array(zSubscriptionInvoice).optional(),
@@ -6703,10 +6840,14 @@ const zPutV2AccountAddressResponse = z.object({
6703
6840
  });
6704
6841
  const zGetV2AccountsQuery = z.object({
6705
6842
  filter: z.string().optional(),
6706
- "page[limit]": z.coerce.bigint().gte(BigInt(0)).max(BigInt("9223372036854775807"), {
6707
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
6708
- }).optional(),
6709
- "page[offset]": z.coerce.bigint().gte(BigInt(0)).lte(BigInt(1e4)).optional(),
6843
+ "page[limit]": z.preprocess(
6844
+ (v) => typeof v === "string" ? Number(v) : v,
6845
+ z.number().int().gte(0)
6846
+ ).optional(),
6847
+ "page[offset]": z.preprocess(
6848
+ (v) => typeof v === "string" ? Number(v) : v,
6849
+ z.number().int().gte(0).lte(1e4)
6850
+ ).optional(),
6710
6851
  sort: z.enum([
6711
6852
  "created_at",
6712
6853
  "-created_at",
@@ -6768,10 +6909,14 @@ const zPutV2AccountsAccountIdResponse = z.object({
6768
6909
  }).optional()
6769
6910
  });
6770
6911
  const zGetV2AccountMembersQuery = z.object({
6771
- "page[limit]": z.coerce.bigint().gte(BigInt(0)).max(BigInt("9223372036854775807"), {
6772
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
6773
- }).optional(),
6774
- "page[offset]": z.coerce.bigint().gte(BigInt(0)).lte(BigInt(1e4)).optional(),
6912
+ "page[limit]": z.preprocess(
6913
+ (v) => typeof v === "string" ? Number(v) : v,
6914
+ z.number().int().gte(0)
6915
+ ).optional(),
6916
+ "page[offset]": z.preprocess(
6917
+ (v) => typeof v === "string" ? Number(v) : v,
6918
+ z.number().int().gte(0).lte(1e4)
6919
+ ).optional(),
6775
6920
  filter: z.string().optional(),
6776
6921
  sort: z.enum([
6777
6922
  "created_at",
@@ -6811,10 +6956,14 @@ const zGetV2AccountsAccountIdAccountMembershipsPath = z.object({
6811
6956
  });
6812
6957
  const zGetV2AccountsAccountIdAccountMembershipsQuery = z.object({
6813
6958
  filter: z.string().optional(),
6814
- "page[limit]": z.coerce.bigint().gte(BigInt(0)).max(BigInt("9223372036854775807"), {
6815
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
6816
- }).optional(),
6817
- "page[offset]": z.coerce.bigint().gte(BigInt(0)).lte(BigInt(1e4)).optional(),
6959
+ "page[limit]": z.preprocess(
6960
+ (v) => typeof v === "string" ? Number(v) : v,
6961
+ z.number().int().gte(0)
6962
+ ).optional(),
6963
+ "page[offset]": z.preprocess(
6964
+ (v) => typeof v === "string" ? Number(v) : v,
6965
+ z.number().int().gte(0).lte(1e4)
6966
+ ).optional(),
6818
6967
  include: z.string().optional(),
6819
6968
  sort: z.enum([
6820
6969
  "created_at",
@@ -6918,8 +7067,14 @@ const zGetACurrencyResponse = zResponseData.and(
6918
7067
  );
6919
7068
  const zGetAllFilesQuery = z.object({
6920
7069
  filter: z.string().optional(),
6921
- "page[limit]": z.coerce.bigint().gte(BigInt(0)).lte(BigInt(1e4)).optional(),
6922
- "page[offset]": z.coerce.bigint().gte(BigInt(0)).lte(BigInt(1e4)).optional()
7070
+ "page[limit]": z.preprocess(
7071
+ (v) => typeof v === "string" ? Number(v) : v,
7072
+ z.number().int().gte(0).lte(1e4)
7073
+ ).optional(),
7074
+ "page[offset]": z.preprocess(
7075
+ (v) => typeof v === "string" ? Number(v) : v,
7076
+ z.number().int().gte(0).lte(1e4)
7077
+ ).optional()
6923
7078
  });
6924
7079
  const zGetAllFilesResponse = z.object({
6925
7080
  data: z.array(zFile).optional(),
@@ -6953,10 +7108,14 @@ const zGetByContextAllProductsHeaders = z.object({
6953
7108
  const zGetByContextAllProductsQuery = z.object({
6954
7109
  include: z.array(z.enum(["files", "main_image", "component_products"])).optional(),
6955
7110
  filter: z.string().optional(),
6956
- "page[limit]": z.coerce.bigint().gte(BigInt(1)).max(BigInt("9223372036854775807"), {
6957
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
6958
- }).optional(),
6959
- "page[offset]": z.coerce.bigint().gte(BigInt(0)).lte(BigInt(1e4)).optional()
7111
+ "page[limit]": z.preprocess(
7112
+ (v) => typeof v === "string" ? Number(v) : v,
7113
+ z.number().int().gte(1)
7114
+ ).optional(),
7115
+ "page[offset]": z.preprocess(
7116
+ (v) => typeof v === "string" ? Number(v) : v,
7117
+ z.number().int().gte(0).lte(1e4)
7118
+ ).optional()
6960
7119
  });
6961
7120
  const zGetByContextAllProductsResponse = zProductListData;
6962
7121
  const zGetByContextProductHeaders = z.object({
@@ -6982,10 +7141,14 @@ const zGetByContextAllRelatedProductsPath = z.object({
6982
7141
  });
6983
7142
  const zGetByContextAllRelatedProductsQuery = z.object({
6984
7143
  filter: z.string().optional(),
6985
- "page[limit]": z.coerce.bigint().gte(BigInt(1)).max(BigInt("9223372036854775807"), {
6986
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
6987
- }).optional(),
6988
- "page[offset]": z.coerce.bigint().gte(BigInt(0)).lte(BigInt(1e4)).optional()
7144
+ "page[limit]": z.preprocess(
7145
+ (v) => typeof v === "string" ? Number(v) : v,
7146
+ z.number().int().gte(1)
7147
+ ).optional(),
7148
+ "page[offset]": z.preprocess(
7149
+ (v) => typeof v === "string" ? Number(v) : v,
7150
+ z.number().int().gte(0).lte(1e4)
7151
+ ).optional()
6989
7152
  });
6990
7153
  const zGetByContextAllRelatedProductsResponse = zProductListData;
6991
7154
  const zGetByContextChildProductsHeaders = z.object({
@@ -6999,10 +7162,14 @@ const zGetByContextChildProductsPath = z.object({
6999
7162
  const zGetByContextChildProductsQuery = z.object({
7000
7163
  include: z.array(z.enum(["files", "main_image", "component_products"])).optional(),
7001
7164
  filter: z.string().optional(),
7002
- "page[limit]": z.coerce.bigint().gte(BigInt(1)).max(BigInt("9223372036854775807"), {
7003
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
7004
- }).optional(),
7005
- "page[offset]": z.coerce.bigint().gte(BigInt(0)).lte(BigInt(1e4)).optional()
7165
+ "page[limit]": z.preprocess(
7166
+ (v) => typeof v === "string" ? Number(v) : v,
7167
+ z.number().int().gte(1)
7168
+ ).optional(),
7169
+ "page[offset]": z.preprocess(
7170
+ (v) => typeof v === "string" ? Number(v) : v,
7171
+ z.number().int().gte(0).lte(1e4)
7172
+ ).optional()
7006
7173
  });
7007
7174
  const zGetByContextChildProductsResponse = zProductListData;
7008
7175
  const zGetByContextProductsForHierarchyHeaders = z.object({
@@ -7016,10 +7183,14 @@ const zGetByContextProductsForHierarchyPath = z.object({
7016
7183
  const zGetByContextProductsForHierarchyQuery = z.object({
7017
7184
  include: z.array(z.enum(["files", "main_image", "component_products"])).optional(),
7018
7185
  filter: z.string().optional(),
7019
- "page[limit]": z.coerce.bigint().gte(BigInt(1)).max(BigInt("9223372036854775807"), {
7020
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
7021
- }).optional(),
7022
- "page[offset]": z.coerce.bigint().gte(BigInt(0)).lte(BigInt(1e4)).optional()
7186
+ "page[limit]": z.preprocess(
7187
+ (v) => typeof v === "string" ? Number(v) : v,
7188
+ z.number().int().gte(1)
7189
+ ).optional(),
7190
+ "page[offset]": z.preprocess(
7191
+ (v) => typeof v === "string" ? Number(v) : v,
7192
+ z.number().int().gte(0).lte(1e4)
7193
+ ).optional()
7023
7194
  });
7024
7195
  const zGetByContextProductsForHierarchyResponse = zProductListData;
7025
7196
  const zGetByContextProductsForNodeHeaders = z.object({
@@ -7033,10 +7204,14 @@ const zGetByContextProductsForNodePath = z.object({
7033
7204
  const zGetByContextProductsForNodeQuery = z.object({
7034
7205
  include: z.array(z.enum(["files", "main_image", "component_products"])).optional(),
7035
7206
  filter: z.string().optional(),
7036
- "page[limit]": z.coerce.bigint().gte(BigInt(1)).max(BigInt("9223372036854775807"), {
7037
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
7038
- }).optional(),
7039
- "page[offset]": z.coerce.bigint().gte(BigInt(0)).lte(BigInt(1e4)).optional()
7207
+ "page[limit]": z.preprocess(
7208
+ (v) => typeof v === "string" ? Number(v) : v,
7209
+ z.number().int().gte(1)
7210
+ ).optional(),
7211
+ "page[offset]": z.preprocess(
7212
+ (v) => typeof v === "string" ? Number(v) : v,
7213
+ z.number().int().gte(0).lte(1e4)
7214
+ ).optional()
7040
7215
  });
7041
7216
  const zGetByContextProductsForNodeResponse = zProductListData;
7042
7217
  const zConfigureByContextProductBody = zBundleConfigurationData2;
@@ -7064,10 +7239,14 @@ const zGetAllProductsPath = z.object({
7064
7239
  const zGetAllProductsQuery = z.object({
7065
7240
  include: z.array(z.enum(["files", "main_image", "component_products"])).optional(),
7066
7241
  filter: z.string().optional(),
7067
- "page[limit]": z.coerce.bigint().gte(BigInt(1)).max(BigInt("9223372036854775807"), {
7068
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
7069
- }).optional(),
7070
- "page[offset]": z.coerce.bigint().gte(BigInt(0)).lte(BigInt(1e4)).optional()
7242
+ "page[limit]": z.preprocess(
7243
+ (v) => typeof v === "string" ? Number(v) : v,
7244
+ z.number().int().gte(1)
7245
+ ).optional(),
7246
+ "page[offset]": z.preprocess(
7247
+ (v) => typeof v === "string" ? Number(v) : v,
7248
+ z.number().int().gte(0).lte(1e4)
7249
+ ).optional()
7071
7250
  });
7072
7251
  const zGetAllProductsResponse = zProductListData;
7073
7252
  const zGetProductHeaders = z.object({
@@ -7097,10 +7276,14 @@ const zGetAllRelatedProductsPath = z.object({
7097
7276
  });
7098
7277
  const zGetAllRelatedProductsQuery = z.object({
7099
7278
  filter: z.string().optional(),
7100
- "page[limit]": z.coerce.bigint().gte(BigInt(1)).max(BigInt("9223372036854775807"), {
7101
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
7102
- }).optional(),
7103
- "page[offset]": z.coerce.bigint().gte(BigInt(0)).lte(BigInt(1e4)).optional()
7279
+ "page[limit]": z.preprocess(
7280
+ (v) => typeof v === "string" ? Number(v) : v,
7281
+ z.number().int().gte(1)
7282
+ ).optional(),
7283
+ "page[offset]": z.preprocess(
7284
+ (v) => typeof v === "string" ? Number(v) : v,
7285
+ z.number().int().gte(0).lte(1e4)
7286
+ ).optional()
7104
7287
  });
7105
7288
  const zGetAllRelatedProductsResponse = zProductListData;
7106
7289
  const zGetChildProductsHeaders = z.object({
@@ -7116,10 +7299,14 @@ const zGetChildProductsPath = z.object({
7116
7299
  const zGetChildProductsQuery = z.object({
7117
7300
  include: z.array(z.enum(["files", "main_image", "component_products"])).optional(),
7118
7301
  filter: z.string().optional(),
7119
- "page[limit]": z.coerce.bigint().gte(BigInt(1)).max(BigInt("9223372036854775807"), {
7120
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
7121
- }).optional(),
7122
- "page[offset]": z.coerce.bigint().gte(BigInt(0)).lte(BigInt(1e4)).optional()
7302
+ "page[limit]": z.preprocess(
7303
+ (v) => typeof v === "string" ? Number(v) : v,
7304
+ z.number().int().gte(1)
7305
+ ).optional(),
7306
+ "page[offset]": z.preprocess(
7307
+ (v) => typeof v === "string" ? Number(v) : v,
7308
+ z.number().int().gte(0).lte(1e4)
7309
+ ).optional()
7123
7310
  });
7124
7311
  const zGetChildProductsResponse = zProductListData;
7125
7312
  const zGetProductsForHierarchyHeaders = z.object({
@@ -7135,10 +7322,14 @@ const zGetProductsForHierarchyPath = z.object({
7135
7322
  const zGetProductsForHierarchyQuery = z.object({
7136
7323
  include: z.array(z.enum(["files", "main_image", "component_products"])).optional(),
7137
7324
  filter: z.string().optional(),
7138
- "page[limit]": z.coerce.bigint().gte(BigInt(1)).max(BigInt("9223372036854775807"), {
7139
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
7140
- }).optional(),
7141
- "page[offset]": z.coerce.bigint().gte(BigInt(0)).lte(BigInt(1e4)).optional()
7325
+ "page[limit]": z.preprocess(
7326
+ (v) => typeof v === "string" ? Number(v) : v,
7327
+ z.number().int().gte(1)
7328
+ ).optional(),
7329
+ "page[offset]": z.preprocess(
7330
+ (v) => typeof v === "string" ? Number(v) : v,
7331
+ z.number().int().gte(0).lte(1e4)
7332
+ ).optional()
7142
7333
  });
7143
7334
  const zGetProductsForHierarchyResponse = zProductListData;
7144
7335
  const zGetProductsForNodeHeaders = z.object({
@@ -7154,10 +7345,14 @@ const zGetProductsForNodePath = z.object({
7154
7345
  const zGetProductsForNodeQuery = z.object({
7155
7346
  filter: z.string().optional(),
7156
7347
  include: z.array(z.enum(["files", "main_image", "component_products"])).optional(),
7157
- "page[limit]": z.coerce.bigint().gte(BigInt(1)).max(BigInt("9223372036854775807"), {
7158
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
7159
- }).optional(),
7160
- "page[offset]": z.coerce.bigint().gte(BigInt(0)).lte(BigInt(1e4)).optional()
7348
+ "page[limit]": z.preprocess(
7349
+ (v) => typeof v === "string" ? Number(v) : v,
7350
+ z.number().int().gte(1)
7351
+ ).optional(),
7352
+ "page[offset]": z.preprocess(
7353
+ (v) => typeof v === "string" ? Number(v) : v,
7354
+ z.number().int().gte(0).lte(1e4)
7355
+ ).optional()
7161
7356
  });
7162
7357
  const zGetProductsForNodeResponse = zProductListData;
7163
7358
  export {