@epcc-sdk/sdks-shopper 0.6.1 → 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
  });
@@ -2260,11 +2251,10 @@ const zTimePeriod = z.object({
2260
2251
  });
2261
2252
  const zSingleCurrencyPrice = z.object({
2262
2253
  currency: z.string().max(1024),
2263
- amount: z.coerce.bigint().min(BigInt("-9223372036854775808"), {
2264
- message: "Invalid value: Expected int64 to be >= -9223372036854775808"
2265
- }).max(BigInt("9223372036854775807"), {
2266
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
2267
- }),
2254
+ amount: z.preprocess(
2255
+ (v) => typeof v === "string" ? Number(v) : v,
2256
+ z.number().int()
2257
+ ),
2268
2258
  includes_tax: z.boolean().optional()
2269
2259
  });
2270
2260
  const zPriceUnits = z.object({
@@ -2278,20 +2268,18 @@ const zNullablePriceUnits = z.object({
2278
2268
  const zPrice = z.unknown();
2279
2269
  const zNullablePrice = z.record(
2280
2270
  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
- }),
2271
+ amount: z.preprocess(
2272
+ (v) => typeof v === "string" ? Number(v) : v,
2273
+ z.number().int()
2274
+ ),
2286
2275
  includes_tax: z.boolean().optional()
2287
2276
  }).nullable()
2288
2277
  ).nullable();
2289
2278
  const zPriceFormatting = z.object({
2290
- amount: z.coerce.bigint().min(BigInt("-9223372036854775808"), {
2291
- message: "Invalid value: Expected int64 to be >= -9223372036854775808"
2292
- }).max(BigInt("9223372036854775807"), {
2293
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
2294
- }),
2279
+ amount: z.preprocess(
2280
+ (v) => typeof v === "string" ? Number(v) : v,
2281
+ z.number().int()
2282
+ ),
2295
2283
  currency: z.string(),
2296
2284
  formatted: z.string()
2297
2285
  });
@@ -2337,12 +2325,16 @@ const zPlanUpdateAttributes = z.object({
2337
2325
  });
2338
2326
  const zDunningRuleAttributes = z.object({
2339
2327
  payment_retry_type: z.enum(["fixed", "backoff", "tiered"]),
2340
- 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(),
2341
2332
  payment_retry_unit: z.enum(["day", "week"]).optional(),
2342
2333
  payment_retry_multiplier: z.number().gte(1).lte(1024).optional(),
2343
- payment_retries_limit: z.coerce.bigint().gte(BigInt(0)).max(BigInt("9223372036854775807"), {
2344
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
2345
- }),
2334
+ payment_retries_limit: z.preprocess(
2335
+ (v) => typeof v === "string" ? Number(v) : v,
2336
+ z.number().int().gte(0)
2337
+ ),
2346
2338
  action: z.enum(["none", "pause", "close", "suspend"]),
2347
2339
  default: z.boolean().optional()
2348
2340
  });
@@ -2352,19 +2344,24 @@ const zDunningRuleCreate = z.object({
2352
2344
  });
2353
2345
  const zDunningRuleUpdateAttributes = z.object({
2354
2346
  payment_retry_type: z.enum(["fixed", "backoff", "tiered"]).optional(),
2355
- 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(),
2356
2351
  payment_retry_unit: z.enum(["day", "week"]).optional(),
2357
2352
  payment_retry_multiplier: z.number().gte(1).lte(1024).nullish(),
2358
- payment_retries_limit: z.coerce.bigint().gte(BigInt(0)).max(BigInt("9223372036854775807"), {
2359
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
2360
- }).optional(),
2353
+ payment_retries_limit: z.preprocess(
2354
+ (v) => typeof v === "string" ? Number(v) : v,
2355
+ z.number().int().gte(0)
2356
+ ).optional(),
2361
2357
  action: z.enum(["none", "pause", "close", "suspend"]).optional(),
2362
2358
  default: z.boolean().optional()
2363
2359
  });
2364
2360
  const zProrationPolicyAttributes = z.object({
2365
2361
  name: z.string().min(3).max(1024),
2366
2362
  rounding: z.enum(["up", "down", "nearest"]),
2367
- external_ref: zExternalRef.optional()
2363
+ external_ref: zExternalRef.optional(),
2364
+ allow_negative_proration_refund: z.boolean().optional().default(false)
2368
2365
  });
2369
2366
  const zProrationPolicyResponseAttributes = zProrationPolicyAttributes;
2370
2367
  const zProrationPolicyCreate = z.object({
@@ -2374,7 +2371,8 @@ const zProrationPolicyCreate = z.object({
2374
2371
  const zProrationPolicyUpdateAttributes = z.object({
2375
2372
  external_ref: zExternalRefUpdate.optional(),
2376
2373
  name: z.string().min(3).max(1024).optional(),
2377
- rounding: z.enum(["up", "down", "nearest"]).optional()
2374
+ rounding: z.enum(["up", "down", "nearest"]).optional(),
2375
+ allow_negative_proration_refund: z.boolean().optional()
2378
2376
  });
2379
2377
  const zFeatureConfigAccessAttributes = z.object({
2380
2378
  type: z.literal("access")
@@ -2491,22 +2489,29 @@ const zProrationPreviewType = z.literal("proration_preview");
2491
2489
  const zProrationPreviewAttributes = z.object({
2492
2490
  trigger: zProrationPreviewTriggerType,
2493
2491
  would_prorate: z.boolean(),
2494
- rejection_reason: z.enum(["negative_amount", "no_change"]),
2495
- billing_cost_before_proration: z.coerce.bigint().min(BigInt("-9223372036854775808"), {
2496
- message: "Invalid value: Expected int64 to be >= -9223372036854775808"
2497
- }).max(BigInt("9223372036854775807"), {
2498
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
2499
- }).nullish(),
2500
- refunded_cost_for_unused_pricing_option_period: z.coerce.bigint().min(BigInt("-9223372036854775808"), {
2501
- message: "Invalid value: Expected int64 to be >= -9223372036854775808"
2502
- }).max(BigInt("9223372036854775807"), {
2503
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
2504
- }).nullish(),
2505
- new_pricing_option_cost: z.coerce.bigint().min(BigInt("-9223372036854775808"), {
2506
- message: "Invalid value: Expected int64 to be >= -9223372036854775808"
2507
- }).max(BigInt("9223372036854775807"), {
2508
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
2509
- }).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(),
2510
2515
  proration_policy_id: z.string().uuid().nullish(),
2511
2516
  prorated_at: z.string().nullish(),
2512
2517
  billing_period_end_date_after_proration: z.string().nullish(),
@@ -2698,9 +2703,10 @@ const zUpdateInvoicePaymentAttributes = z.object({
2698
2703
  payment_taken_at: z.string().optional()
2699
2704
  });
2700
2705
  const zSubscriptionInvoicePaymentRefundAttributes = z.object({
2701
- amount: z.coerce.bigint().gte(BigInt(1)).max(BigInt("9223372036854775807"), {
2702
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
2703
- }),
2706
+ amount: z.preprocess(
2707
+ (v) => typeof v === "string" ? Number(v) : v,
2708
+ z.number().int().gte(1)
2709
+ ),
2704
2710
  reason: z.string().max(1024),
2705
2711
  gateway: z.string().max(1024),
2706
2712
  external_refund_id: z.string().max(1024),
@@ -2709,9 +2715,10 @@ const zSubscriptionInvoicePaymentRefundAttributes = z.object({
2709
2715
  const zCreateInvoicePaymentRefund = z.object({
2710
2716
  type: zSubscriptionInvoicePaymentRefundType,
2711
2717
  attributes: z.object({
2712
- amount: z.coerce.bigint().gte(BigInt(1)).max(BigInt("9223372036854775807"), {
2713
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
2714
- }),
2718
+ amount: z.preprocess(
2719
+ (v) => typeof v === "string" ? Number(v) : v,
2720
+ z.number().int().gte(1)
2721
+ ),
2715
2722
  reason: z.string().min(1).max(1024)
2716
2723
  })
2717
2724
  });
@@ -2768,9 +2775,10 @@ const zNullableLeadTime = z.object({
2768
2775
  const zNotificationSchedule = z.object({
2769
2776
  name: z.string().min(1).max(1024),
2770
2777
  unit: z.enum(["day", "week", "month"]),
2771
- amount: z.coerce.bigint().gte(BigInt(1)).max(BigInt("9223372036854775807"), {
2772
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
2773
- })
2778
+ amount: z.preprocess(
2779
+ (v) => typeof v === "string" ? Number(v) : v,
2780
+ z.number().int().gte(1)
2781
+ )
2774
2782
  });
2775
2783
  const zPricingOptionAttributes = z.object({
2776
2784
  external_ref: zExternalRef.optional(),
@@ -3152,7 +3160,13 @@ const zSubscriptionMeta = z.object({
3152
3160
  pending: z.boolean(),
3153
3161
  invoice_after: z.string(),
3154
3162
  pending_price_change: zSubscriptionPriceChanges.optional(),
3155
- 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()
3156
3170
  }).readonly();
3157
3171
  const zBuildSubscription = z.object({
3158
3172
  external_ref: zExternalRef.optional(),
@@ -3259,21 +3273,18 @@ const zUpdateInvoicePayment = z.object({
3259
3273
  });
3260
3274
  const zProrationEvent = z.object({
3261
3275
  proration_policy_id: zSubscriptionsUuid,
3262
- billing_cost_before_proration: z.coerce.bigint().min(BigInt("-9223372036854775808"), {
3263
- message: "Invalid value: Expected int64 to be >= -9223372036854775808"
3264
- }).max(BigInt("9223372036854775807"), {
3265
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
3266
- }),
3267
- refunded_amount_for_unused_pricing_option: z.coerce.bigint().min(BigInt("-9223372036854775808"), {
3268
- message: "Invalid value: Expected int64 to be >= -9223372036854775808"
3269
- }).max(BigInt("9223372036854775807"), {
3270
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
3271
- }),
3272
- new_pricing_option_cost: z.coerce.bigint().min(BigInt("-9223372036854775808"), {
3273
- message: "Invalid value: Expected int64 to be >= -9223372036854775808"
3274
- }).max(BigInt("9223372036854775807"), {
3275
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
3276
- }),
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
+ ),
3277
3288
  prorated_at: z.string()
3278
3289
  });
3279
3290
  const zSubscriptionInvoiceMeta = z.object({
@@ -3285,11 +3296,10 @@ const zSubscriptionInvoiceMeta = z.object({
3285
3296
  notifications: z.array(zInvoiceNotification).optional(),
3286
3297
  timestamps: zInvoiceTimestamps,
3287
3298
  proration_events: z.array(zProrationEvent).nullable(),
3288
- pro_rata_remaining_value: z.coerce.bigint().min(BigInt("-9223372036854775808"), {
3289
- message: "Invalid value: Expected int64 to be >= -9223372036854775808"
3290
- }).max(BigInt("9223372036854775807"), {
3291
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
3292
- })
3299
+ pro_rata_remaining_value: z.preprocess(
3300
+ (v) => typeof v === "string" ? Number(v) : v,
3301
+ z.number().int()
3302
+ )
3293
3303
  }).readonly();
3294
3304
  const zSubscriptionInvoicePaymentRefund = z.object({
3295
3305
  id: zSubscriptionsUuid,
@@ -3389,67 +3399,58 @@ const zMultipleProducts = z.object({
3389
3399
  id: z.string().uuid()
3390
3400
  });
3391
3401
  const zNullableLocation = z.object({
3392
- available: z.coerce.bigint().min(BigInt("-9223372036854775808"), {
3393
- message: "Invalid value: Expected int64 to be >= -9223372036854775808"
3394
- }).max(BigInt("9223372036854775807"), {
3395
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
3396
- })
3402
+ available: z.preprocess(
3403
+ (v) => typeof v === "string" ? Number(v) : v,
3404
+ z.number().int()
3405
+ )
3397
3406
  }).nullable();
3398
3407
  const zNullableLocations = z.record(zNullableLocation);
3399
3408
  const zStockUpdateAttributes = z.object({
3400
3409
  locations: zNullableLocations.optional()
3401
3410
  });
3402
3411
  const zStockCreateAttributes = z.object({
3403
- available: z.coerce.bigint().min(BigInt("-9223372036854775808"), {
3404
- message: "Invalid value: Expected int64 to be >= -9223372036854775808"
3405
- }).max(BigInt("9223372036854775807"), {
3406
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
3407
- }).optional(),
3412
+ available: z.preprocess(
3413
+ (v) => typeof v === "string" ? Number(v) : v,
3414
+ z.number().int()
3415
+ ).optional(),
3408
3416
  locations: z.record(
3409
3417
  z.object({
3410
- available: z.coerce.bigint().min(BigInt("-9223372036854775808"), {
3411
- message: "Invalid value: Expected int64 to be >= -9223372036854775808"
3412
- }).max(BigInt("9223372036854775807"), {
3413
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
3414
- })
3418
+ available: z.preprocess(
3419
+ (v) => typeof v === "string" ? Number(v) : v,
3420
+ z.number().int()
3421
+ )
3415
3422
  })
3416
3423
  ).optional()
3417
3424
  });
3418
3425
  const zStockLocations = z.record(
3419
3426
  z.object({
3420
- available: z.coerce.bigint().min(BigInt("-9223372036854775808"), {
3421
- message: "Invalid value: Expected int64 to be >= -9223372036854775808"
3422
- }).max(BigInt("9223372036854775807"), {
3423
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
3424
- }),
3425
- allocated: z.coerce.bigint().min(BigInt("-9223372036854775808"), {
3426
- message: "Invalid value: Expected int64 to be >= -9223372036854775808"
3427
- }).max(BigInt("9223372036854775807"), {
3428
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
3429
- }),
3430
- total: z.coerce.bigint().min(BigInt("-9223372036854775808"), {
3431
- message: "Invalid value: Expected int64 to be >= -9223372036854775808"
3432
- }).max(BigInt("9223372036854775807"), {
3433
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
3434
- })
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
+ )
3435
3439
  })
3436
3440
  );
3437
3441
  const zStockResponseAttributes = z.object({
3438
- available: z.coerce.bigint().min(BigInt("-9223372036854775808"), {
3439
- message: "Invalid value: Expected int64 to be >= -9223372036854775808"
3440
- }).max(BigInt("9223372036854775807"), {
3441
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
3442
- }),
3443
- allocated: z.coerce.bigint().min(BigInt("-9223372036854775808"), {
3444
- message: "Invalid value: Expected int64 to be >= -9223372036854775808"
3445
- }).max(BigInt("9223372036854775807"), {
3446
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
3447
- }),
3448
- total: z.coerce.bigint().min(BigInt("-9223372036854775808"), {
3449
- message: "Invalid value: Expected int64 to be >= -9223372036854775808"
3450
- }).max(BigInt("9223372036854775807"), {
3451
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
3452
- }),
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
+ ),
3453
3454
  locations: zStockLocations.optional()
3454
3455
  });
3455
3456
  const zGeolocationDetails = z.object({
@@ -3483,11 +3484,10 @@ const zInventoriesUuid = z.string();
3483
3484
  const zTransactionResponseAttributes = z.object({
3484
3485
  action: z.enum(["increment", "decrement", "allocate", "deallocate"]),
3485
3486
  product_id: zInventoriesUuid,
3486
- quantity: z.coerce.bigint().min(BigInt("-9223372036854775808"), {
3487
- message: "Invalid value: Expected int64 to be >= -9223372036854775808"
3488
- }).max(BigInt("9223372036854775807"), {
3489
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
3490
- }),
3487
+ quantity: z.preprocess(
3488
+ (v) => typeof v === "string" ? Number(v) : v,
3489
+ z.number().int()
3490
+ ),
3491
3491
  location: z.string().min(1).max(128).optional()
3492
3492
  });
3493
3493
  const zStockCreate = z.object({
@@ -3503,9 +3503,10 @@ const zStockUpdateRequest = z.object({
3503
3503
  const zTransactionCreateAttributes = z.object({
3504
3504
  product_id: zInventoriesUuid.optional(),
3505
3505
  action: z.enum(["increment", "decrement", "allocate", "deallocate", "set"]),
3506
- quantity: z.coerce.bigint().gte(BigInt(0)).max(BigInt("9223372036854775807"), {
3507
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
3508
- }),
3506
+ quantity: z.preprocess(
3507
+ (v) => typeof v === "string" ? Number(v) : v,
3508
+ z.number().int().gte(0)
3509
+ ),
3509
3510
  location: z.string().min(1).max(128).optional()
3510
3511
  });
3511
3512
  const zTransactionCreate = z.object({
@@ -4270,11 +4271,10 @@ const zTextMatchInfo = z.object({
4270
4271
  best_field_score: z.string().optional(),
4271
4272
  best_field_weight: z.number().int().optional(),
4272
4273
  fields_matched: z.number().int().optional(),
4273
- num_tokens_dropped: z.coerce.bigint().min(BigInt("-9223372036854775808"), {
4274
- message: "Invalid value: Expected int64 to be >= -9223372036854775808"
4275
- }).max(BigInt("9223372036854775807"), {
4276
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
4277
- }).optional(),
4274
+ num_tokens_dropped: z.preprocess(
4275
+ (v) => typeof v === "string" ? Number(v) : v,
4276
+ z.number().int()
4277
+ ).optional(),
4278
4278
  score: z.string().optional(),
4279
4279
  tokens_matched: z.number().int().optional(),
4280
4280
  typo_prefix_score: z.number().int().optional()
@@ -5365,7 +5365,13 @@ const zSubscriptionMetaWritable = z.object({
5365
5365
  pending: z.boolean(),
5366
5366
  invoice_after: z.string(),
5367
5367
  pending_price_change: zSubscriptionPriceChanges.optional(),
5368
- 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()
5369
5375
  }).readonly();
5370
5376
  const zPaymentAuthorityWritable = z.intersection(
5371
5377
  z.union([
@@ -5495,11 +5501,10 @@ const zSubscriptionInvoiceMetaWritable = z.object({
5495
5501
  notifications: z.array(zInvoiceNotification).optional(),
5496
5502
  timestamps: zInvoiceTimestamps,
5497
5503
  proration_events: z.array(zProrationEvent).nullable(),
5498
- pro_rata_remaining_value: z.coerce.bigint().min(BigInt("-9223372036854775808"), {
5499
- message: "Invalid value: Expected int64 to be >= -9223372036854775808"
5500
- }).max(BigInt("9223372036854775807"), {
5501
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
5502
- })
5504
+ pro_rata_remaining_value: z.preprocess(
5505
+ (v) => typeof v === "string" ? Number(v) : v,
5506
+ z.number().int()
5507
+ )
5503
5508
  }).readonly();
5504
5509
  const zSubscriptionInvoiceWritable = z.object({
5505
5510
  id: zSubscriptionsUuid.optional(),
@@ -5688,10 +5693,14 @@ const zFilterRule = z.string();
5688
5693
  const zInclude = z.array(
5689
5694
  z.enum(["files", "main_image", "component_products"])
5690
5695
  );
5691
- const zLimit = z.coerce.bigint().gte(BigInt(1)).max(BigInt("9223372036854775807"), {
5692
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
5693
- });
5694
- 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
+ );
5695
5704
  const zPricebookIdsForPriceSegmentationPreview = z.array(z.string()).max(5);
5696
5705
  const zPricebookIdsOfAvailablePricesToShow = z.array(z.string());
5697
5706
  const zTag = z.string();
@@ -5710,30 +5719,48 @@ const zSubscriptionInclude = z.array(
5710
5719
  z.enum(["plans", "pricing_options"])
5711
5720
  );
5712
5721
  const zSubscriptionsFilter = z.string();
5713
- const zSubscriptionsPageLimit = z.coerce.bigint().gte(BigInt(0)).max(BigInt("9223372036854775807"), {
5714
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
5715
- });
5716
- 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
+ );
5717
5730
  const zEpGeolocation = z.string().regex(/^-?\d+(\.\d+)?,-?\d+(\.\d+)?$/);
5718
5731
  const zInventoriesFilter = z.string();
5719
5732
  const zInventoriesPageLimit = z.number().int().gte(0);
5720
5733
  const zInventoriesPageOffset = z.number().int().gte(0).lte(1e4);
5721
5734
  const zFilter = z.string();
5722
- const zPageLimit = z.coerce.bigint().gte(BigInt(0)).max(BigInt("9223372036854775807"), {
5723
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
5724
- });
5725
- 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
+ );
5726
5743
  const zIncludeAccountMember = z.string();
5727
5744
  const zIncludeAccount = z.string();
5728
5745
  const zAccountTagId = z.string().uuid();
5729
- const zAuthenticationRealmspageLimit = z.coerce.bigint().gte(BigInt(1)).lte(BigInt(100)).default(BigInt(25));
5730
- const zAuthenticationRealmspageOffset = z.coerce.bigint().gte(BigInt(0)).max(BigInt("9223372036854775807"), {
5731
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
5732
- }).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);
5733
5754
  const zAuthenticationRealmsfilter = z.string();
5734
5755
  const zFilesfilter = z.string();
5735
- const zFilespageOffset = z.coerce.bigint().gte(BigInt(0)).lte(BigInt(1e4));
5736
- 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
+ );
5737
5764
  const zCatalogSearchacceptLanguage = z.string();
5738
5765
  const zCatalogSearchpricebookIdsForPriceSegmentationPreview = z.array(z.string()).max(5);
5739
5766
  const zCatalogSearchpricebookIdsOfAvailablePricesToShow = z.array(z.string()).max(5);
@@ -5765,10 +5792,14 @@ const zGetByContextAllHierarchiesHeaders = z.object({
5765
5792
  });
5766
5793
  const zGetByContextAllHierarchiesQuery = z.object({
5767
5794
  filter: z.string().optional(),
5768
- "page[limit]": z.coerce.bigint().gte(BigInt(1)).max(BigInt("9223372036854775807"), {
5769
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
5770
- }).optional(),
5771
- "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()
5772
5803
  });
5773
5804
  const zGetByContextAllHierarchiesResponse = zHierarchyListData;
5774
5805
  const zGetByContextHierarchyHeaders = z.object({
@@ -5790,10 +5821,14 @@ const zGetByContextHierarchyNodesPath = z.object({
5790
5821
  });
5791
5822
  const zGetByContextHierarchyNodesQuery = z.object({
5792
5823
  filter: z.string().optional(),
5793
- "page[limit]": z.coerce.bigint().gte(BigInt(1)).max(BigInt("9223372036854775807"), {
5794
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
5795
- }).optional(),
5796
- "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()
5797
5832
  });
5798
5833
  const zGetByContextHierarchyNodesResponse = zNodeListData;
5799
5834
  const zGetByContextHierarchyChildNodesHeaders = z.object({
@@ -5806,10 +5841,14 @@ const zGetByContextHierarchyChildNodesPath = z.object({
5806
5841
  });
5807
5842
  const zGetByContextHierarchyChildNodesQuery = z.object({
5808
5843
  filter: z.string().optional(),
5809
- "page[limit]": z.coerce.bigint().gte(BigInt(1)).max(BigInt("9223372036854775807"), {
5810
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
5811
- }).optional(),
5812
- "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()
5813
5852
  });
5814
5853
  const zGetByContextHierarchyChildNodesResponse = zNodeListData;
5815
5854
  const zGetByContextAllNodesHeaders = z.object({
@@ -5819,10 +5858,14 @@ const zGetByContextAllNodesHeaders = z.object({
5819
5858
  });
5820
5859
  const zGetByContextAllNodesQuery = z.object({
5821
5860
  filter: z.string().optional(),
5822
- "page[limit]": z.coerce.bigint().gte(BigInt(1)).max(BigInt("9223372036854775807"), {
5823
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
5824
- }).optional(),
5825
- "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()
5826
5869
  });
5827
5870
  const zGetByContextAllNodesResponse = zNodeListData;
5828
5871
  const zGetByContextNodeHeaders = z.object({
@@ -5844,10 +5887,14 @@ const zGetByContextChildNodesPath = z.object({
5844
5887
  });
5845
5888
  const zGetByContextChildNodesQuery = z.object({
5846
5889
  filter: z.string().optional(),
5847
- "page[limit]": z.coerce.bigint().gte(BigInt(1)).max(BigInt("9223372036854775807"), {
5848
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
5849
- }).optional(),
5850
- "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()
5851
5898
  });
5852
5899
  const zGetByContextChildNodesResponse = zNodeListData;
5853
5900
  const zGetByContextComponentProductIdsHeaders = z.object({
@@ -5858,18 +5905,26 @@ const zGetByContextComponentProductIdsPath = z.object({
5858
5905
  product_id: z.string()
5859
5906
  });
5860
5907
  const zGetByContextComponentProductIdsQuery = z.object({
5861
- "page[limit]": z.coerce.bigint().gte(BigInt(1)).max(BigInt("9223372036854775807"), {
5862
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
5863
- }).optional(),
5864
- "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()
5865
5916
  });
5866
5917
  const zGetByContextComponentProductIdsResponse = zProductReferenceListData;
5867
5918
  const zGetCatalogsQuery = z.object({
5868
5919
  filter: z.string().optional(),
5869
- "page[limit]": z.coerce.bigint().gte(BigInt(1)).max(BigInt("9223372036854775807"), {
5870
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
5871
- }).optional(),
5872
- "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()
5873
5928
  });
5874
5929
  const zGetCatalogsResponse = zCatalogListData;
5875
5930
  const zCreateCatalogBody = zCatalogCreateData;
@@ -5918,10 +5973,14 @@ const zGetReleaseByIdPath = z.object({
5918
5973
  const zGetReleaseByIdResponse = zReleaseData;
5919
5974
  const zGetRulesQuery = z.object({
5920
5975
  filter: z.string().optional(),
5921
- "page[limit]": z.coerce.bigint().gte(BigInt(1)).max(BigInt("9223372036854775807"), {
5922
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
5923
- }).optional(),
5924
- "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()
5925
5984
  });
5926
5985
  const zGetRulesResponse = zRuleListData;
5927
5986
  const zCreateRuleBody = zRuleCreateData;
@@ -5941,10 +6000,14 @@ const zUpdateRulePath = z.object({
5941
6000
  const zUpdateRuleResponse = zRuleData;
5942
6001
  const zValidateCatalogRulesBody = zCatalogRuleValidatorRequest;
5943
6002
  const zValidateCatalogRulesQuery = z.object({
5944
- "page[limit]": z.coerce.bigint().gte(BigInt(1)).max(BigInt("9223372036854775807"), {
5945
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
5946
- }).optional(),
5947
- "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()
5948
6011
  });
5949
6012
  const zValidateCatalogRulesResponse = zRuleListData;
5950
6013
  const zGetAllHierarchiesHeaders = z.object({
@@ -5956,10 +6019,14 @@ const zGetAllHierarchiesPath = z.object({
5956
6019
  });
5957
6020
  const zGetAllHierarchiesQuery = z.object({
5958
6021
  filter: z.string().optional(),
5959
- "page[limit]": z.coerce.bigint().gte(BigInt(1)).max(BigInt("9223372036854775807"), {
5960
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
5961
- }).optional(),
5962
- "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()
5963
6030
  });
5964
6031
  const zGetAllHierarchiesResponse = zHierarchyListData;
5965
6032
  const zGetHierarchyHeaders = z.object({
@@ -5981,10 +6048,14 @@ const zGetHierarchyNodesPath = z.object({
5981
6048
  });
5982
6049
  const zGetHierarchyNodesQuery = z.object({
5983
6050
  filter: z.string().optional(),
5984
- "page[limit]": z.coerce.bigint().gte(BigInt(1)).max(BigInt("9223372036854775807"), {
5985
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
5986
- }).optional(),
5987
- "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()
5988
6059
  });
5989
6060
  const zGetHierarchyNodesResponse = zNodeListData;
5990
6061
  const zGetHierarchyChildNodesHeaders = z.object({
@@ -5997,10 +6068,14 @@ const zGetHierarchyChildNodesPath = z.object({
5997
6068
  });
5998
6069
  const zGetHierarchyChildNodesQuery = z.object({
5999
6070
  filter: z.string().optional(),
6000
- "page[limit]": z.coerce.bigint().gte(BigInt(1)).max(BigInt("9223372036854775807"), {
6001
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
6002
- }).optional(),
6003
- "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()
6004
6079
  });
6005
6080
  const zGetHierarchyChildNodesResponse = zNodeListData;
6006
6081
  const zGetAllNodesHeaders = z.object({
@@ -6012,10 +6087,14 @@ const zGetAllNodesPath = z.object({
6012
6087
  });
6013
6088
  const zGetAllNodesQuery = z.object({
6014
6089
  filter: z.string().optional(),
6015
- "page[limit]": z.coerce.bigint().gte(BigInt(1)).max(BigInt("9223372036854775807"), {
6016
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
6017
- }).optional(),
6018
- "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()
6019
6098
  });
6020
6099
  const zGetAllNodesResponse = zNodeListData;
6021
6100
  const zGetNodeHeaders = z.object({
@@ -6037,10 +6116,14 @@ const zGetChildNodesPath = z.object({
6037
6116
  });
6038
6117
  const zGetChildNodesQuery = z.object({
6039
6118
  filter: z.string().optional(),
6040
- "page[limit]": z.coerce.bigint().gte(BigInt(1)).max(BigInt("9223372036854775807"), {
6041
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
6042
- }).optional(),
6043
- "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()
6044
6127
  });
6045
6128
  const zGetChildNodesResponse = zNodeListData;
6046
6129
  const zGetComponentProductIdsHeaders = z.object({
@@ -6054,10 +6137,14 @@ const zGetComponentProductIdsPath = z.object({
6054
6137
  });
6055
6138
  const zGetComponentProductIdsQuery = z.object({
6056
6139
  include: z.array(z.enum(["files", "main_image", "component_products"])).optional(),
6057
- "page[limit]": z.coerce.bigint().gte(BigInt(1)).max(BigInt("9223372036854775807"), {
6058
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
6059
- }).optional(),
6060
- "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()
6061
6148
  });
6062
6149
  const zGetComponentProductIdsResponse = zProductReferenceListData;
6063
6150
  const zGetCartsHeaders = z.object({
@@ -6461,10 +6548,14 @@ const zPutV2SettingsCartStoreIdPath = z.object({
6461
6548
  const zPutV2SettingsCartStoreIdResponse = zSettingsCart;
6462
6549
  const zListOfferingsQuery = z.object({
6463
6550
  filter: z.string().optional(),
6464
- "page[offset]": z.coerce.bigint().gte(BigInt(0)).lte(BigInt(1e4)).optional(),
6465
- "page[limit]": z.coerce.bigint().gte(BigInt(0)).max(BigInt("9223372036854775807"), {
6466
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
6467
- }).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(),
6468
6559
  include: z.array(z.enum(["plans", "pricing_options", "features"])).optional()
6469
6560
  });
6470
6561
  const zListOfferingsResponse = z.object({
@@ -6486,10 +6577,14 @@ const zListOfferingPricingOptionsPath = z.object({
6486
6577
  offering_uuid: zSubscriptionsUuid
6487
6578
  });
6488
6579
  const zListOfferingPricingOptionsQuery = z.object({
6489
- "page[offset]": z.coerce.bigint().gte(BigInt(0)).lte(BigInt(1e4)).optional(),
6490
- "page[limit]": z.coerce.bigint().gte(BigInt(0)).max(BigInt("9223372036854775807"), {
6491
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
6492
- }).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()
6493
6588
  });
6494
6589
  const zListOfferingPricingOptionsResponse = z.object({
6495
6590
  data: z.array(zOfferingPricingOption).optional(),
@@ -6499,10 +6594,14 @@ const zListOfferingFeaturesPath = z.object({
6499
6594
  offering_uuid: zSubscriptionsUuid
6500
6595
  });
6501
6596
  const zListOfferingFeaturesQuery = z.object({
6502
- "page[offset]": z.coerce.bigint().gte(BigInt(0)).lte(BigInt(1e4)).optional(),
6503
- "page[limit]": z.coerce.bigint().gte(BigInt(0)).max(BigInt("9223372036854775807"), {
6504
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
6505
- }).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()
6506
6605
  });
6507
6606
  const zListOfferingFeaturesResponse = z.object({
6508
6607
  data: z.array(zOfferingFeature).optional(),
@@ -6512,10 +6611,14 @@ const zListOfferingPlansPath = z.object({
6512
6611
  offering_uuid: zSubscriptionsUuid
6513
6612
  });
6514
6613
  const zListOfferingPlansQuery = z.object({
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()
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()
6519
6622
  });
6520
6623
  const zListOfferingPlansResponse = z.object({
6521
6624
  data: z.array(zOfferingPlan).optional(),
@@ -6530,10 +6633,14 @@ const zListOfferingPlanPricingOptionsResponse = z.object({
6530
6633
  });
6531
6634
  const zListSubscriptionsQuery = z.object({
6532
6635
  filter: z.string().optional(),
6533
- "page[offset]": z.coerce.bigint().gte(BigInt(0)).lte(BigInt(1e4)).optional(),
6534
- "page[limit]": z.coerce.bigint().gte(BigInt(0)).max(BigInt("9223372036854775807"), {
6535
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
6536
- }).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(),
6537
6644
  include: z.array(z.enum(["plans", "pricing_options"])).optional()
6538
6645
  });
6539
6646
  const zListSubscriptionsResponse = z.object({
@@ -6587,10 +6694,14 @@ const zListSubscriptionInvoicesPath = z.object({
6587
6694
  subscription_uuid: zSubscriptionsUuid
6588
6695
  });
6589
6696
  const zListSubscriptionInvoicesQuery = z.object({
6590
- "page[offset]": z.coerce.bigint().gte(BigInt(0)).lte(BigInt(1e4)).optional(),
6591
- "page[limit]": z.coerce.bigint().gte(BigInt(0)).max(BigInt("9223372036854775807"), {
6592
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
6593
- }).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()
6594
6705
  });
6595
6706
  const zListSubscriptionInvoicesResponse = z.object({
6596
6707
  data: z.array(zSubscriptionInvoice).optional(),
@@ -6601,10 +6712,14 @@ const zListSubscriptionInvoicePaymentsPath = z.object({
6601
6712
  invoice_uuid: zSubscriptionsUuid
6602
6713
  });
6603
6714
  const zListSubscriptionInvoicePaymentsQuery = z.object({
6604
- "page[offset]": z.coerce.bigint().gte(BigInt(0)).lte(BigInt(1e4)).optional(),
6605
- "page[limit]": z.coerce.bigint().gte(BigInt(0)).max(BigInt("9223372036854775807"), {
6606
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
6607
- }).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()
6608
6723
  });
6609
6724
  const zListSubscriptionInvoicePaymentsResponse = z.object({
6610
6725
  data: z.array(zSubscriptionInvoicePayment).optional(),
@@ -6627,10 +6742,14 @@ const zGetSubscriptionInvoiceResponse = z.object({
6627
6742
  });
6628
6743
  const zListInvoicesQuery = z.object({
6629
6744
  filter: z.string().optional(),
6630
- "page[offset]": z.coerce.bigint().gte(BigInt(0)).lte(BigInt(1e4)).optional(),
6631
- "page[limit]": z.coerce.bigint().gte(BigInt(0)).max(BigInt("9223372036854775807"), {
6632
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
6633
- }).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()
6634
6753
  });
6635
6754
  const zListInvoicesResponse = z.object({
6636
6755
  data: z.array(zSubscriptionInvoice).optional(),
@@ -6721,10 +6840,14 @@ const zPutV2AccountAddressResponse = z.object({
6721
6840
  });
6722
6841
  const zGetV2AccountsQuery = z.object({
6723
6842
  filter: z.string().optional(),
6724
- "page[limit]": z.coerce.bigint().gte(BigInt(0)).max(BigInt("9223372036854775807"), {
6725
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
6726
- }).optional(),
6727
- "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(),
6728
6851
  sort: z.enum([
6729
6852
  "created_at",
6730
6853
  "-created_at",
@@ -6786,10 +6909,14 @@ const zPutV2AccountsAccountIdResponse = z.object({
6786
6909
  }).optional()
6787
6910
  });
6788
6911
  const zGetV2AccountMembersQuery = z.object({
6789
- "page[limit]": z.coerce.bigint().gte(BigInt(0)).max(BigInt("9223372036854775807"), {
6790
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
6791
- }).optional(),
6792
- "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(),
6793
6920
  filter: z.string().optional(),
6794
6921
  sort: z.enum([
6795
6922
  "created_at",
@@ -6829,10 +6956,14 @@ const zGetV2AccountsAccountIdAccountMembershipsPath = z.object({
6829
6956
  });
6830
6957
  const zGetV2AccountsAccountIdAccountMembershipsQuery = z.object({
6831
6958
  filter: z.string().optional(),
6832
- "page[limit]": z.coerce.bigint().gte(BigInt(0)).max(BigInt("9223372036854775807"), {
6833
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
6834
- }).optional(),
6835
- "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(),
6836
6967
  include: z.string().optional(),
6837
6968
  sort: z.enum([
6838
6969
  "created_at",
@@ -6936,8 +7067,14 @@ const zGetACurrencyResponse = zResponseData.and(
6936
7067
  );
6937
7068
  const zGetAllFilesQuery = z.object({
6938
7069
  filter: z.string().optional(),
6939
- "page[limit]": z.coerce.bigint().gte(BigInt(0)).lte(BigInt(1e4)).optional(),
6940
- "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()
6941
7078
  });
6942
7079
  const zGetAllFilesResponse = z.object({
6943
7080
  data: z.array(zFile).optional(),
@@ -6971,10 +7108,14 @@ const zGetByContextAllProductsHeaders = z.object({
6971
7108
  const zGetByContextAllProductsQuery = z.object({
6972
7109
  include: z.array(z.enum(["files", "main_image", "component_products"])).optional(),
6973
7110
  filter: z.string().optional(),
6974
- "page[limit]": z.coerce.bigint().gte(BigInt(1)).max(BigInt("9223372036854775807"), {
6975
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
6976
- }).optional(),
6977
- "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()
6978
7119
  });
6979
7120
  const zGetByContextAllProductsResponse = zProductListData;
6980
7121
  const zGetByContextProductHeaders = z.object({
@@ -7000,10 +7141,14 @@ const zGetByContextAllRelatedProductsPath = z.object({
7000
7141
  });
7001
7142
  const zGetByContextAllRelatedProductsQuery = z.object({
7002
7143
  filter: z.string().optional(),
7003
- "page[limit]": z.coerce.bigint().gte(BigInt(1)).max(BigInt("9223372036854775807"), {
7004
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
7005
- }).optional(),
7006
- "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()
7007
7152
  });
7008
7153
  const zGetByContextAllRelatedProductsResponse = zProductListData;
7009
7154
  const zGetByContextChildProductsHeaders = z.object({
@@ -7017,10 +7162,14 @@ const zGetByContextChildProductsPath = z.object({
7017
7162
  const zGetByContextChildProductsQuery = z.object({
7018
7163
  include: z.array(z.enum(["files", "main_image", "component_products"])).optional(),
7019
7164
  filter: z.string().optional(),
7020
- "page[limit]": z.coerce.bigint().gte(BigInt(1)).max(BigInt("9223372036854775807"), {
7021
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
7022
- }).optional(),
7023
- "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()
7024
7173
  });
7025
7174
  const zGetByContextChildProductsResponse = zProductListData;
7026
7175
  const zGetByContextProductsForHierarchyHeaders = z.object({
@@ -7034,10 +7183,14 @@ const zGetByContextProductsForHierarchyPath = z.object({
7034
7183
  const zGetByContextProductsForHierarchyQuery = z.object({
7035
7184
  include: z.array(z.enum(["files", "main_image", "component_products"])).optional(),
7036
7185
  filter: z.string().optional(),
7037
- "page[limit]": z.coerce.bigint().gte(BigInt(1)).max(BigInt("9223372036854775807"), {
7038
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
7039
- }).optional(),
7040
- "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()
7041
7194
  });
7042
7195
  const zGetByContextProductsForHierarchyResponse = zProductListData;
7043
7196
  const zGetByContextProductsForNodeHeaders = z.object({
@@ -7051,10 +7204,14 @@ const zGetByContextProductsForNodePath = z.object({
7051
7204
  const zGetByContextProductsForNodeQuery = z.object({
7052
7205
  include: z.array(z.enum(["files", "main_image", "component_products"])).optional(),
7053
7206
  filter: z.string().optional(),
7054
- "page[limit]": z.coerce.bigint().gte(BigInt(1)).max(BigInt("9223372036854775807"), {
7055
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
7056
- }).optional(),
7057
- "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()
7058
7215
  });
7059
7216
  const zGetByContextProductsForNodeResponse = zProductListData;
7060
7217
  const zConfigureByContextProductBody = zBundleConfigurationData2;
@@ -7082,10 +7239,14 @@ const zGetAllProductsPath = z.object({
7082
7239
  const zGetAllProductsQuery = z.object({
7083
7240
  include: z.array(z.enum(["files", "main_image", "component_products"])).optional(),
7084
7241
  filter: z.string().optional(),
7085
- "page[limit]": z.coerce.bigint().gte(BigInt(1)).max(BigInt("9223372036854775807"), {
7086
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
7087
- }).optional(),
7088
- "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()
7089
7250
  });
7090
7251
  const zGetAllProductsResponse = zProductListData;
7091
7252
  const zGetProductHeaders = z.object({
@@ -7115,10 +7276,14 @@ const zGetAllRelatedProductsPath = z.object({
7115
7276
  });
7116
7277
  const zGetAllRelatedProductsQuery = z.object({
7117
7278
  filter: z.string().optional(),
7118
- "page[limit]": z.coerce.bigint().gte(BigInt(1)).max(BigInt("9223372036854775807"), {
7119
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
7120
- }).optional(),
7121
- "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()
7122
7287
  });
7123
7288
  const zGetAllRelatedProductsResponse = zProductListData;
7124
7289
  const zGetChildProductsHeaders = z.object({
@@ -7134,10 +7299,14 @@ const zGetChildProductsPath = z.object({
7134
7299
  const zGetChildProductsQuery = z.object({
7135
7300
  include: z.array(z.enum(["files", "main_image", "component_products"])).optional(),
7136
7301
  filter: z.string().optional(),
7137
- "page[limit]": z.coerce.bigint().gte(BigInt(1)).max(BigInt("9223372036854775807"), {
7138
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
7139
- }).optional(),
7140
- "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()
7141
7310
  });
7142
7311
  const zGetChildProductsResponse = zProductListData;
7143
7312
  const zGetProductsForHierarchyHeaders = z.object({
@@ -7153,10 +7322,14 @@ const zGetProductsForHierarchyPath = z.object({
7153
7322
  const zGetProductsForHierarchyQuery = z.object({
7154
7323
  include: z.array(z.enum(["files", "main_image", "component_products"])).optional(),
7155
7324
  filter: z.string().optional(),
7156
- "page[limit]": z.coerce.bigint().gte(BigInt(1)).max(BigInt("9223372036854775807"), {
7157
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
7158
- }).optional(),
7159
- "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()
7160
7333
  });
7161
7334
  const zGetProductsForHierarchyResponse = zProductListData;
7162
7335
  const zGetProductsForNodeHeaders = z.object({
@@ -7172,10 +7345,14 @@ const zGetProductsForNodePath = z.object({
7172
7345
  const zGetProductsForNodeQuery = z.object({
7173
7346
  filter: z.string().optional(),
7174
7347
  include: z.array(z.enum(["files", "main_image", "component_products"])).optional(),
7175
- "page[limit]": z.coerce.bigint().gte(BigInt(1)).max(BigInt("9223372036854775807"), {
7176
- message: "Invalid value: Expected int64 to be <= 9223372036854775807"
7177
- }).optional(),
7178
- "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()
7179
7356
  });
7180
7357
  const zGetProductsForNodeResponse = zProductListData;
7181
7358
  export {