autumn-js 1.3.73 → 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/dist/backend/adapters/express.js +799 -30
  2. package/dist/backend/adapters/express.mjs +7 -7
  3. package/dist/backend/adapters/fetch.js +799 -30
  4. package/dist/backend/adapters/fetch.mjs +7 -7
  5. package/dist/backend/adapters/hono.js +799 -30
  6. package/dist/backend/adapters/hono.mjs +7 -7
  7. package/dist/backend/adapters/index.js +799 -30
  8. package/dist/backend/adapters/index.mjs +10 -10
  9. package/dist/backend/adapters/next.js +799 -30
  10. package/dist/backend/adapters/next.mjs +7 -7
  11. package/dist/backend/{chunk-I75WCVDU.mjs → chunk-2BK6PFVP.mjs} +1 -1
  12. package/dist/backend/{chunk-P46GFHFB.mjs → chunk-A2MYEGBE.mjs} +4 -4
  13. package/dist/backend/{chunk-MIDKK6HE.mjs → chunk-BHDI32OW.mjs} +1 -1
  14. package/dist/backend/{chunk-5NZXLCLY.mjs → chunk-MGI2SXQ3.mjs} +799 -30
  15. package/dist/backend/{chunk-CFBX64LG.mjs → chunk-SAS32PCE.mjs} +6 -6
  16. package/dist/backend/{chunk-QD5VNLGH.mjs → chunk-TL6Z4F7T.mjs} +1 -1
  17. package/dist/backend/{chunk-4D2MGLMK.mjs → chunk-WEIK2UUE.mjs} +1 -1
  18. package/dist/backend/core/handlers/coreHandler.d.mts +1 -1
  19. package/dist/backend/core/handlers/coreHandler.d.ts +1 -1
  20. package/dist/backend/core/handlers/coreHandler.js +799 -30
  21. package/dist/backend/core/handlers/coreHandler.mjs +5 -5
  22. package/dist/backend/core/handlers/executeRoute.d.mts +1 -1
  23. package/dist/backend/core/handlers/executeRoute.d.ts +1 -1
  24. package/dist/backend/core/handlers/executeRoute.mjs +3 -3
  25. package/dist/backend/core/handlers/handleRouteByName.js +799 -30
  26. package/dist/backend/core/handlers/handleRouteByName.mjs +5 -5
  27. package/dist/backend/core/handlers/index.d.mts +1 -1
  28. package/dist/backend/core/handlers/index.d.ts +1 -1
  29. package/dist/backend/core/handlers/index.js +799 -30
  30. package/dist/backend/core/handlers/index.mjs +10 -10
  31. package/dist/backend/core/index.d.mts +1 -1
  32. package/dist/backend/core/index.d.ts +1 -1
  33. package/dist/backend/core/index.js +799 -30
  34. package/dist/backend/core/index.mjs +6 -6
  35. package/dist/backend/core/routes/index.d.mts +1 -1
  36. package/dist/backend/core/routes/index.d.ts +1 -1
  37. package/dist/backend/core/routes/routeBuilder.d.mts +1 -1
  38. package/dist/backend/core/routes/routeBuilder.d.ts +1 -1
  39. package/dist/backend/core/routes/routeConfigs.d.mts +1 -1
  40. package/dist/backend/core/routes/routeConfigs.d.ts +1 -1
  41. package/dist/backend/core/types/handlerTypes.d.mts +1 -1
  42. package/dist/backend/core/types/handlerTypes.d.ts +1 -1
  43. package/dist/backend/core/types/index.d.mts +1 -1
  44. package/dist/backend/core/types/index.d.ts +1 -1
  45. package/dist/backend/core/types/routeTypes.d.mts +1 -1
  46. package/dist/backend/core/types/routeTypes.d.ts +1 -1
  47. package/dist/backend/index.d.mts +2 -2
  48. package/dist/backend/index.d.ts +2 -2
  49. package/dist/backend/index.js +799 -30
  50. package/dist/backend/index.mjs +6 -6
  51. package/dist/backend/{routeTypes-Bq2o3T9X.d.mts → routeTypes-CFr8UAdD.d.mts} +745 -29
  52. package/dist/backend/{routeTypes-B9shWqn_.d.ts → routeTypes-CSvStBNU.d.ts} +745 -29
  53. package/dist/better-auth/{chunk-TOUOQM4M.mjs → chunk-W3TWBLAT.mjs} +799 -30
  54. package/dist/better-auth/index.js +799 -30
  55. package/dist/better-auth/index.mjs +1 -1
  56. package/dist/better-auth/utils/handleBetterAuthRoute.js +799 -30
  57. package/dist/better-auth/utils/handleBetterAuthRoute.mjs +1 -1
  58. package/dist/better-auth/utils/index.js +799 -30
  59. package/dist/better-auth/utils/index.mjs +1 -1
  60. package/dist/sdk/index.d.mts +1341 -33
  61. package/dist/sdk/index.d.ts +1341 -33
  62. package/dist/sdk/index.js +1379 -30
  63. package/dist/sdk/index.mjs +1232 -31
  64. package/package.json +2 -2
  65. package/dist/backend/{chunk-MOHYGUMA.mjs → chunk-IXUCY7AU.mjs} +3 -3
@@ -76,10 +76,10 @@ function serverURLFromOptions(options) {
76
76
  }
77
77
  var SDK_METADATA = {
78
78
  language: "typescript",
79
- openapiDocVersion: "2.4.0",
79
+ openapiDocVersion: "2.5.0",
80
80
  sdkVersion: "0.10.18",
81
81
  genVersion: "2.884.13",
82
- userAgent: "speakeasy-sdk/typescript 0.10.18 2.884.13 2.4.0 @useautumn/sdk"
82
+ userAgent: "speakeasy-sdk/typescript 0.10.18 2.884.13 2.5.0 @useautumn/sdk"
83
83
  };
84
84
 
85
85
  // ../sdk/src/lib/http.ts
@@ -849,7 +849,7 @@ function dlv(obj, key, def, p, undef) {
849
849
  // ../sdk/src/lib/env.ts
850
850
  var envSchema = z5.object({
851
851
  AUTUMN_SECRET_KEY: z5.optional(z5.string()),
852
- AUTUMN_X_API_VERSION: z5._default(z5.string(), "2.4.0"),
852
+ AUTUMN_X_API_VERSION: z5._default(z5.string(), "2.5.0"),
853
853
  AUTUMN_FAIL_OPEN: z5.pipe(
854
854
  z5._default(z5.enum(["true", "false"]), "true"),
855
855
  z5.transform((v) => v === "true")
@@ -4198,8 +4198,7 @@ var RequestBody$outboundSchema = z16.pipe(
4198
4198
  properties: z16.optional(z16.record(z16.string(), z16.any())),
4199
4199
  idempotencyKey: z16.optional(z16.string()),
4200
4200
  timestamp: z16.optional(z16.int()),
4201
- overageBehavior: z16.optional(BatchTrackOverageBehavior$outboundSchema),
4202
- async: z16.optional(z16.boolean())
4201
+ overageBehavior: z16.optional(BatchTrackOverageBehavior$outboundSchema)
4203
4202
  }),
4204
4203
  z16.transform((v) => {
4205
4204
  return remap(v, {
@@ -11884,6 +11883,31 @@ var CreateInvoiceLicenseQuantityInterval = {
11884
11883
  SemiAnnual: "semi_annual",
11885
11884
  Year: "year"
11886
11885
  };
11886
+ var CreateInvoiceLicenseQuantityTierBehavior = {
11887
+ Graduated: "graduated",
11888
+ Volume: "volume"
11889
+ };
11890
+ var CreateInvoiceLicenseQuantityItemInterval = {
11891
+ OneOff: "one_off",
11892
+ Week: "week",
11893
+ Month: "month",
11894
+ Quarter: "quarter",
11895
+ SemiAnnual: "semi_annual",
11896
+ Year: "year"
11897
+ };
11898
+ var CreateInvoiceLicenseQuantityBillingMethod = {
11899
+ Prepaid: "prepaid",
11900
+ UsageBased: "usage_based"
11901
+ };
11902
+ var CreateInvoiceDimensionsToLicenseQuantityEnum2 = {
11903
+ Inf: "inf"
11904
+ };
11905
+ var CreateInvoiceDimensionsToLicenseQuantityEnum1 = {
11906
+ Inf: "inf"
11907
+ };
11908
+ var CreateInvoiceToLicenseQuantityEnum = {
11909
+ Inf: "inf"
11910
+ };
11887
11911
  var CreateInvoiceLicenseQuantityBillingBehavior = {
11888
11912
  Prepaid: "prepaid",
11889
11913
  UsageBased: "usage_based"
@@ -12249,12 +12273,16 @@ var CreateInvoiceFeatureQuantity$outboundSchema = z26.pipe(
12249
12273
  billingBehavior: CreateInvoiceBillingBehavior$outboundSchema,
12250
12274
  quantity: z26.optional(z26.number()),
12251
12275
  usage: z26.optional(z26.array(z26.lazy(() => CreateInvoiceUsage$outboundSchema))),
12252
- prorate: z26.optional(z26.boolean())
12276
+ prorate: z26.optional(z26.boolean()),
12277
+ periodStart: z26.optional(z26.int()),
12278
+ periodEnd: z26.optional(z26.int())
12253
12279
  }),
12254
12280
  z26.transform((v) => {
12255
12281
  return remap(v, {
12256
12282
  featureId: "feature_id",
12257
- billingBehavior: "billing_behavior"
12283
+ billingBehavior: "billing_behavior",
12284
+ periodStart: "period_start",
12285
+ periodEnd: "period_end"
12258
12286
  });
12259
12287
  })
12260
12288
  );
@@ -12291,9 +12319,343 @@ var CreateInvoiceLicenseQuantityPrice$outboundSchema = z26.pipe(
12291
12319
  });
12292
12320
  })
12293
12321
  );
12322
+ var CreateInvoiceLicenseQuantityPriceTo$outboundSchema = smartUnion([z26.number(), z26.string()]);
12323
+ var CreateInvoiceLicenseQuantityAdditionalCurrency$outboundSchema = z26.pipe(
12324
+ z26.object({
12325
+ currency: z26.string(),
12326
+ amount: z26.optional(z26.number()),
12327
+ flatAmount: z26.optional(z26.number())
12328
+ }),
12329
+ z26.transform((v) => {
12330
+ return remap(v, {
12331
+ flatAmount: "flat_amount"
12332
+ });
12333
+ })
12334
+ );
12335
+ var CreateInvoiceLicenseQuantityPriceTier$outboundSchema = z26.pipe(
12336
+ z26.object({
12337
+ to: smartUnion([z26.number(), z26.string()]),
12338
+ amount: z26.optional(z26.number()),
12339
+ flatAmount: z26.optional(z26.number()),
12340
+ additionalCurrencies: z26.optional(z26.array(z26.lazy(
12341
+ () => CreateInvoiceLicenseQuantityAdditionalCurrency$outboundSchema
12342
+ )))
12343
+ }),
12344
+ z26.transform((v) => {
12345
+ return remap(v, {
12346
+ flatAmount: "flat_amount",
12347
+ additionalCurrencies: "additional_currencies"
12348
+ });
12349
+ })
12350
+ );
12351
+ var CreateInvoiceLicenseQuantityTierBehavior$outboundSchema = z26.enum(
12352
+ CreateInvoiceLicenseQuantityTierBehavior
12353
+ );
12354
+ var CreateInvoiceLicenseQuantityItemInterval$outboundSchema = z26.enum(
12355
+ CreateInvoiceLicenseQuantityItemInterval
12356
+ );
12357
+ var CreateInvoiceLicenseQuantityBillingMethod$outboundSchema = z26.enum(
12358
+ CreateInvoiceLicenseQuantityBillingMethod
12359
+ );
12360
+ var CreateInvoiceLicenseQuantityItemStripe$outboundSchema = z26.pipe(
12361
+ z26.object({
12362
+ priceId: z26.string()
12363
+ }),
12364
+ z26.transform((v) => {
12365
+ return remap(v, {
12366
+ priceId: "price_id"
12367
+ });
12368
+ })
12369
+ );
12370
+ var CreateInvoiceLicenseQuantityItemProcessors$outboundSchema = z26.object({
12371
+ stripe: z26.optional(
12372
+ z26.nullable(z26.lazy(
12373
+ () => CreateInvoiceLicenseQuantityItemStripe$outboundSchema
12374
+ ))
12375
+ )
12376
+ });
12377
+ var CreateInvoiceLicenseQuantityItemPrice$outboundSchema = z26.pipe(
12378
+ z26.object({
12379
+ amount: z26.optional(z26.number()),
12380
+ tiers: z26.optional(z26.array(z26.lazy(
12381
+ () => CreateInvoiceLicenseQuantityPriceTier$outboundSchema
12382
+ ))),
12383
+ tierBehavior: z26.optional(
12384
+ CreateInvoiceLicenseQuantityTierBehavior$outboundSchema
12385
+ ),
12386
+ interval: CreateInvoiceLicenseQuantityItemInterval$outboundSchema,
12387
+ intervalCount: z26._default(z26.number(), 1),
12388
+ billingUnits: z26._default(z26.number(), 1),
12389
+ billingMethod: CreateInvoiceLicenseQuantityBillingMethod$outboundSchema,
12390
+ processors: z26.optional(z26.lazy(
12391
+ () => CreateInvoiceLicenseQuantityItemProcessors$outboundSchema
12392
+ ))
12393
+ }),
12394
+ z26.transform((v) => {
12395
+ return remap(v, {
12396
+ tierBehavior: "tier_behavior",
12397
+ intervalCount: "interval_count",
12398
+ billingUnits: "billing_units",
12399
+ billingMethod: "billing_method"
12400
+ });
12401
+ })
12402
+ );
12403
+ var CreateInvoiceDimensionsLicenseQuantityMatch4$outboundSchema = smartUnion([z26.string(), z26.number(), z26.boolean()]);
12404
+ var CreateInvoiceDimensionsLicenseQuantity4$outboundSchema = z26.pipe(
12405
+ z26.object({
12406
+ match: z26.record(
12407
+ z26.string(),
12408
+ smartUnion([z26.string(), z26.number(), z26.boolean()])
12409
+ ),
12410
+ priority: z26.optional(z26.int()),
12411
+ creditCost: z26.number()
12412
+ }),
12413
+ z26.transform((v) => {
12414
+ return remap(v, {
12415
+ creditCost: "credit_cost"
12416
+ });
12417
+ })
12418
+ );
12419
+ var CreateInvoiceDimensionsLicenseQuantityMatch3$outboundSchema = smartUnion([z26.string(), z26.number(), z26.boolean()]);
12420
+ var CreateInvoiceDimensionsToLicenseQuantityEnum2$outboundSchema = z26.enum(
12421
+ CreateInvoiceDimensionsToLicenseQuantityEnum2
12422
+ );
12423
+ var CreateInvoiceDimensionsLicenseQuantityToUnion2$outboundSchema = smartUnion([
12424
+ z26.number(),
12425
+ CreateInvoiceDimensionsToLicenseQuantityEnum2$outboundSchema
12426
+ ]);
12427
+ var CreateInvoiceDimensionsLicenseQuantityTier2$outboundSchema = z26.pipe(
12428
+ z26.object({
12429
+ to: smartUnion([
12430
+ z26.number(),
12431
+ CreateInvoiceDimensionsToLicenseQuantityEnum2$outboundSchema
12432
+ ]),
12433
+ creditCost: z26.number()
12434
+ }),
12435
+ z26.transform((v) => {
12436
+ return remap(v, {
12437
+ creditCost: "credit_cost"
12438
+ });
12439
+ })
12440
+ );
12441
+ var CreateInvoiceDimensionsLicenseQuantity3$outboundSchema = z26.pipe(
12442
+ z26.object({
12443
+ match: z26.record(
12444
+ z26.string(),
12445
+ smartUnion([z26.string(), z26.number(), z26.boolean()])
12446
+ ),
12447
+ priority: z26.optional(z26.int()),
12448
+ tierBehavior: z26.literal("graduated"),
12449
+ tiers: z26.array(
12450
+ z26.lazy(
12451
+ () => CreateInvoiceDimensionsLicenseQuantityTier2$outboundSchema
12452
+ )
12453
+ )
12454
+ }),
12455
+ z26.transform((v) => {
12456
+ return remap(v, {
12457
+ tierBehavior: "tier_behavior"
12458
+ });
12459
+ })
12460
+ );
12461
+ var CreateInvoiceLicenseQuantityDimensionsUnion2$outboundSchema = smartUnion([
12462
+ z26.lazy(() => CreateInvoiceDimensionsLicenseQuantity3$outboundSchema),
12463
+ z26.lazy(() => CreateInvoiceDimensionsLicenseQuantity4$outboundSchema)
12464
+ ]);
12465
+ var CreateInvoiceLicenseQuantityMultipliersMatch2$outboundSchema = smartUnion([z26.string(), z26.number(), z26.boolean()]);
12466
+ var CreateInvoiceLicenseQuantityMultipliers2$outboundSchema = z26.object({
12467
+ match: z26.record(
12468
+ z26.string(),
12469
+ smartUnion([z26.string(), z26.number(), z26.boolean()])
12470
+ ),
12471
+ factor: z26.optional(z26.number()),
12472
+ add: z26.optional(z26.number())
12473
+ });
12474
+ var CreateInvoiceCreditSchemaLicenseQuantity2$outboundSchema = z26.pipe(
12475
+ z26.object({
12476
+ meteredFeatureId: z26.string(),
12477
+ billingUnits: z26.optional(z26.number()),
12478
+ dimensions: z26.optional(z26.record(
12479
+ z26.string(),
12480
+ smartUnion([
12481
+ z26.lazy(() => CreateInvoiceDimensionsLicenseQuantity3$outboundSchema),
12482
+ z26.lazy(() => CreateInvoiceDimensionsLicenseQuantity4$outboundSchema)
12483
+ ])
12484
+ )),
12485
+ multipliers: z26.optional(z26.record(
12486
+ z26.string(),
12487
+ z26.lazy(() => CreateInvoiceLicenseQuantityMultipliers2$outboundSchema)
12488
+ )),
12489
+ creditCost: z26.number()
12490
+ }),
12491
+ z26.transform((v) => {
12492
+ return remap(v, {
12493
+ meteredFeatureId: "metered_feature_id",
12494
+ billingUnits: "billing_units",
12495
+ creditCost: "credit_cost"
12496
+ });
12497
+ })
12498
+ );
12499
+ var CreateInvoiceDimensionsLicenseQuantityMatch2$outboundSchema = smartUnion([z26.string(), z26.number(), z26.boolean()]);
12500
+ var CreateInvoiceDimensionsLicenseQuantity2$outboundSchema = z26.pipe(
12501
+ z26.object({
12502
+ match: z26.record(
12503
+ z26.string(),
12504
+ smartUnion([z26.string(), z26.number(), z26.boolean()])
12505
+ ),
12506
+ priority: z26.optional(z26.int()),
12507
+ creditCost: z26.number()
12508
+ }),
12509
+ z26.transform((v) => {
12510
+ return remap(v, {
12511
+ creditCost: "credit_cost"
12512
+ });
12513
+ })
12514
+ );
12515
+ var CreateInvoiceDimensionsLicenseQuantityMatch1$outboundSchema = smartUnion([z26.string(), z26.number(), z26.boolean()]);
12516
+ var CreateInvoiceDimensionsToLicenseQuantityEnum1$outboundSchema = z26.enum(
12517
+ CreateInvoiceDimensionsToLicenseQuantityEnum1
12518
+ );
12519
+ var CreateInvoiceDimensionsLicenseQuantityToUnion1$outboundSchema = smartUnion([
12520
+ z26.number(),
12521
+ CreateInvoiceDimensionsToLicenseQuantityEnum1$outboundSchema
12522
+ ]);
12523
+ var CreateInvoiceDimensionsLicenseQuantityTier1$outboundSchema = z26.pipe(
12524
+ z26.object({
12525
+ to: smartUnion([
12526
+ z26.number(),
12527
+ CreateInvoiceDimensionsToLicenseQuantityEnum1$outboundSchema
12528
+ ]),
12529
+ creditCost: z26.number()
12530
+ }),
12531
+ z26.transform((v) => {
12532
+ return remap(v, {
12533
+ creditCost: "credit_cost"
12534
+ });
12535
+ })
12536
+ );
12537
+ var CreateInvoiceDimensionsLicenseQuantity1$outboundSchema = z26.pipe(
12538
+ z26.object({
12539
+ match: z26.record(
12540
+ z26.string(),
12541
+ smartUnion([z26.string(), z26.number(), z26.boolean()])
12542
+ ),
12543
+ priority: z26.optional(z26.int()),
12544
+ tierBehavior: z26.literal("graduated"),
12545
+ tiers: z26.array(
12546
+ z26.lazy(
12547
+ () => CreateInvoiceDimensionsLicenseQuantityTier1$outboundSchema
12548
+ )
12549
+ )
12550
+ }),
12551
+ z26.transform((v) => {
12552
+ return remap(v, {
12553
+ tierBehavior: "tier_behavior"
12554
+ });
12555
+ })
12556
+ );
12557
+ var CreateInvoiceLicenseQuantityDimensionsUnion1$outboundSchema = smartUnion([
12558
+ z26.lazy(() => CreateInvoiceDimensionsLicenseQuantity1$outboundSchema),
12559
+ z26.lazy(() => CreateInvoiceDimensionsLicenseQuantity2$outboundSchema)
12560
+ ]);
12561
+ var CreateInvoiceLicenseQuantityMultipliersMatch1$outboundSchema = smartUnion([z26.string(), z26.number(), z26.boolean()]);
12562
+ var CreateInvoiceLicenseQuantityMultipliers1$outboundSchema = z26.object({
12563
+ match: z26.record(
12564
+ z26.string(),
12565
+ smartUnion([z26.string(), z26.number(), z26.boolean()])
12566
+ ),
12567
+ factor: z26.optional(z26.number()),
12568
+ add: z26.optional(z26.number())
12569
+ });
12570
+ var CreateInvoiceToLicenseQuantityEnum$outboundSchema = z26.enum(CreateInvoiceToLicenseQuantityEnum);
12571
+ var CreateInvoiceLicenseQuantityFeatureOverrideToUnion$outboundSchema = smartUnion([
12572
+ z26.number(),
12573
+ CreateInvoiceToLicenseQuantityEnum$outboundSchema
12574
+ ]);
12575
+ var CreateInvoiceLicenseQuantityFeatureOverrideTier$outboundSchema = z26.pipe(
12576
+ z26.object({
12577
+ to: smartUnion([
12578
+ z26.number(),
12579
+ CreateInvoiceToLicenseQuantityEnum$outboundSchema
12580
+ ]),
12581
+ creditCost: z26.number()
12582
+ }),
12583
+ z26.transform((v) => {
12584
+ return remap(v, {
12585
+ creditCost: "credit_cost"
12586
+ });
12587
+ })
12588
+ );
12589
+ var CreateInvoiceCreditSchemaLicenseQuantity1$outboundSchema = z26.pipe(
12590
+ z26.object({
12591
+ meteredFeatureId: z26.string(),
12592
+ billingUnits: z26.optional(z26.number()),
12593
+ dimensions: z26.optional(z26.record(
12594
+ z26.string(),
12595
+ smartUnion([
12596
+ z26.lazy(() => CreateInvoiceDimensionsLicenseQuantity1$outboundSchema),
12597
+ z26.lazy(() => CreateInvoiceDimensionsLicenseQuantity2$outboundSchema)
12598
+ ])
12599
+ )),
12600
+ multipliers: z26.optional(z26.record(
12601
+ z26.string(),
12602
+ z26.lazy(() => CreateInvoiceLicenseQuantityMultipliers1$outboundSchema)
12603
+ )),
12604
+ tierBehavior: z26.literal("graduated"),
12605
+ tiers: z26.array(z26.lazy(
12606
+ () => CreateInvoiceLicenseQuantityFeatureOverrideTier$outboundSchema
12607
+ ))
12608
+ }),
12609
+ z26.transform((v) => {
12610
+ return remap(v, {
12611
+ meteredFeatureId: "metered_feature_id",
12612
+ billingUnits: "billing_units",
12613
+ tierBehavior: "tier_behavior"
12614
+ });
12615
+ })
12616
+ );
12617
+ var CreateInvoiceLicenseQuantityCreditSchemaUnion$outboundSchema = smartUnion([
12618
+ z26.lazy(() => CreateInvoiceCreditSchemaLicenseQuantity1$outboundSchema),
12619
+ z26.lazy(() => CreateInvoiceCreditSchemaLicenseQuantity2$outboundSchema)
12620
+ ]);
12621
+ var CreateInvoiceLicenseQuantityFeatureOverride$outboundSchema = z26.pipe(
12622
+ z26.object({
12623
+ creditSchema: z26.optional(z26.array(smartUnion([
12624
+ z26.lazy(() => CreateInvoiceCreditSchemaLicenseQuantity1$outboundSchema),
12625
+ z26.lazy(
12626
+ () => CreateInvoiceCreditSchemaLicenseQuantity2$outboundSchema
12627
+ )
12628
+ ])))
12629
+ }),
12630
+ z26.transform((v) => {
12631
+ return remap(v, {
12632
+ creditSchema: "credit_schema"
12633
+ });
12634
+ })
12635
+ );
12636
+ var CreateInvoiceLicenseQuantityItem$outboundSchema = z26.pipe(
12637
+ z26.object({
12638
+ featureId: z26.string(),
12639
+ price: z26.optional(
12640
+ z26.lazy(() => CreateInvoiceLicenseQuantityItemPrice$outboundSchema)
12641
+ ),
12642
+ featureOverride: z26.optional(
12643
+ z26.lazy(() => CreateInvoiceLicenseQuantityFeatureOverride$outboundSchema)
12644
+ )
12645
+ }),
12646
+ z26.transform((v) => {
12647
+ return remap(v, {
12648
+ featureId: "feature_id",
12649
+ featureOverride: "feature_override"
12650
+ });
12651
+ })
12652
+ );
12294
12653
  var CreateInvoiceCustomize$outboundSchema = z26.object({
12295
12654
  price: z26.optional(
12296
12655
  z26.nullable(z26.lazy(() => CreateInvoiceLicenseQuantityPrice$outboundSchema))
12656
+ ),
12657
+ items: z26.optional(
12658
+ z26.array(z26.lazy(() => CreateInvoiceLicenseQuantityItem$outboundSchema))
12297
12659
  )
12298
12660
  });
12299
12661
  var CreateInvoiceLicenseQuantityBillingBehavior$outboundSchema = z26.enum(
@@ -12319,12 +12681,16 @@ var CreateInvoiceLicenseQuantityFeatureQuantity$outboundSchema = z26.pipe(
12319
12681
  usage: z26.optional(
12320
12682
  z26.array(z26.lazy(() => CreateInvoiceLicenseQuantityUsage$outboundSchema))
12321
12683
  ),
12322
- prorate: z26.optional(z26.boolean())
12684
+ prorate: z26.optional(z26.boolean()),
12685
+ periodStart: z26.optional(z26.int()),
12686
+ periodEnd: z26.optional(z26.int())
12323
12687
  }),
12324
12688
  z26.transform((v) => {
12325
12689
  return remap(v, {
12326
12690
  featureId: "feature_id",
12327
- billingBehavior: "billing_behavior"
12691
+ billingBehavior: "billing_behavior",
12692
+ periodStart: "period_start",
12693
+ periodEnd: "period_end"
12328
12694
  });
12329
12695
  })
12330
12696
  );
@@ -12336,12 +12702,16 @@ var CreateInvoiceLicenseQuantity$outboundSchema = z26.pipe(
12336
12702
  featureQuantities: z26.optional(z26.array(z26.lazy(
12337
12703
  () => CreateInvoiceLicenseQuantityFeatureQuantity$outboundSchema
12338
12704
  ))),
12339
- prorate: z26.optional(z26.boolean())
12705
+ prorate: z26.optional(z26.boolean()),
12706
+ periodStart: z26.optional(z26.int()),
12707
+ periodEnd: z26.optional(z26.int())
12340
12708
  }),
12341
12709
  z26.transform((v) => {
12342
12710
  return remap(v, {
12343
12711
  licensePlanId: "license_plan_id",
12344
- featureQuantities: "feature_quantities"
12712
+ featureQuantities: "feature_quantities",
12713
+ periodStart: "period_start",
12714
+ periodEnd: "period_end"
12345
12715
  });
12346
12716
  })
12347
12717
  );
@@ -12361,6 +12731,7 @@ var CreateInvoicePlan$outboundSchema = z26.pipe(
12361
12731
  z26.object({
12362
12732
  planId: z26.string(),
12363
12733
  version: z26.optional(z26.number()),
12734
+ entityId: z26.optional(z26.nullable(z26.string())),
12364
12735
  customize: z26.optional(
12365
12736
  z26.lazy(() => CreateInvoiceInvoiceCustomize$outboundSchema)
12366
12737
  ),
@@ -12373,20 +12744,35 @@ var CreateInvoicePlan$outboundSchema = z26.pipe(
12373
12744
  discounts: z26.optional(
12374
12745
  z26.array(z26.lazy(() => PlanAttachDiscount$outboundSchema))
12375
12746
  ),
12376
- prorate: z26.optional(z26.boolean())
12747
+ prorate: z26.optional(z26.boolean()),
12748
+ periodStart: z26.optional(z26.int()),
12749
+ periodEnd: z26.optional(z26.int())
12377
12750
  }),
12378
12751
  z26.transform((v) => {
12379
12752
  return remap(v, {
12380
12753
  planId: "plan_id",
12754
+ entityId: "entity_id",
12381
12755
  featureQuantities: "feature_quantities",
12382
- licenseQuantities: "license_quantities"
12756
+ licenseQuantities: "license_quantities",
12757
+ periodStart: "period_start",
12758
+ periodEnd: "period_end"
12759
+ });
12760
+ })
12761
+ );
12762
+ var CreateInvoiceCustomLineItem$outboundSchema = z26.pipe(
12763
+ z26.object({
12764
+ amount: z26.number(),
12765
+ description: z26.string(),
12766
+ periodStart: z26.optional(z26.int()),
12767
+ periodEnd: z26.optional(z26.int())
12768
+ }),
12769
+ z26.transform((v) => {
12770
+ return remap(v, {
12771
+ periodStart: "period_start",
12772
+ periodEnd: "period_end"
12383
12773
  });
12384
12774
  })
12385
12775
  );
12386
- var CreateInvoiceCustomLineItem$outboundSchema = z26.object({
12387
- amount: z26.number(),
12388
- description: z26.string()
12389
- });
12390
12776
  var CreateInvoiceAttachDiscount$outboundSchema = z26.pipe(
12391
12777
  z26.object({
12392
12778
  rewardId: z26.optional(z26.string()),
@@ -12403,6 +12789,7 @@ var CreateInvoiceIssueMethod$outboundSchema = z26.enum(CreateInvoiceIssueMethod)
12403
12789
  var CreateInvoiceParams$outboundSchema = z26.pipe(
12404
12790
  z26.object({
12405
12791
  customerId: z26.string(),
12792
+ entityId: z26.optional(z26.string()),
12406
12793
  plans: z26.optional(z26.array(z26.lazy(() => CreateInvoicePlan$outboundSchema))),
12407
12794
  customLineItems: z26.optional(
12408
12795
  z26.array(z26.lazy(() => CreateInvoiceCustomLineItem$outboundSchema))
@@ -12423,6 +12810,7 @@ var CreateInvoiceParams$outboundSchema = z26.pipe(
12423
12810
  z26.transform((v) => {
12424
12811
  return remap(v, {
12425
12812
  customerId: "customer_id",
12813
+ entityId: "entity_id",
12426
12814
  customLineItems: "custom_line_items",
12427
12815
  invoiceTemplateId: "invoice_template_id",
12428
12816
  netTermsDays: "net_terms_days",
@@ -12511,6 +12899,7 @@ var CreateInvoiceLine$inboundSchema = z26.pipe(
12511
12899
  z26.object({
12512
12900
  plan_id: nullable(string5()),
12513
12901
  feature_id: nullable(string5()),
12902
+ entity_id: nullable(string5()),
12514
12903
  description: string5(),
12515
12904
  amount: number2(),
12516
12905
  amount_after_discounts: number2(),
@@ -12523,6 +12912,7 @@ var CreateInvoiceLine$inboundSchema = z26.pipe(
12523
12912
  return remap(v, {
12524
12913
  "plan_id": "planId",
12525
12914
  "feature_id": "featureId",
12915
+ "entity_id": "entityId",
12526
12916
  "amount_after_discounts": "amountAfterDiscounts",
12527
12917
  "period_start": "periodStart",
12528
12918
  "period_end": "periodEnd"
@@ -43610,6 +44000,31 @@ var ReissueInvoiceLicenseQuantityInterval = {
43610
44000
  SemiAnnual: "semi_annual",
43611
44001
  Year: "year"
43612
44002
  };
44003
+ var ReissueInvoiceLicenseQuantityTierBehavior = {
44004
+ Graduated: "graduated",
44005
+ Volume: "volume"
44006
+ };
44007
+ var ReissueInvoiceLicenseQuantityItemInterval = {
44008
+ OneOff: "one_off",
44009
+ Week: "week",
44010
+ Month: "month",
44011
+ Quarter: "quarter",
44012
+ SemiAnnual: "semi_annual",
44013
+ Year: "year"
44014
+ };
44015
+ var ReissueInvoiceLicenseQuantityBillingMethod = {
44016
+ Prepaid: "prepaid",
44017
+ UsageBased: "usage_based"
44018
+ };
44019
+ var ReissueInvoiceDimensionsToLicenseQuantityEnum2 = {
44020
+ Inf: "inf"
44021
+ };
44022
+ var ReissueInvoiceDimensionsToLicenseQuantityEnum1 = {
44023
+ Inf: "inf"
44024
+ };
44025
+ var ReissueInvoiceToLicenseQuantityEnum = {
44026
+ Inf: "inf"
44027
+ };
43613
44028
  var ReissueInvoiceLicenseQuantityBillingBehavior = {
43614
44029
  Prepaid: "prepaid",
43615
44030
  UsageBased: "usage_based"
@@ -44042,12 +44457,16 @@ var ReissueInvoiceFeatureQuantity$outboundSchema = z99.pipe(
44042
44457
  usage: z99.optional(
44043
44458
  z99.array(z99.lazy(() => ReissueInvoiceUsage$outboundSchema))
44044
44459
  ),
44045
- prorate: z99.optional(z99.boolean())
44460
+ prorate: z99.optional(z99.boolean()),
44461
+ periodStart: z99.optional(z99.int()),
44462
+ periodEnd: z99.optional(z99.int())
44046
44463
  }),
44047
44464
  z99.transform((v) => {
44048
44465
  return remap(v, {
44049
44466
  featureId: "feature_id",
44050
- billingBehavior: "billing_behavior"
44467
+ billingBehavior: "billing_behavior",
44468
+ periodStart: "period_start",
44469
+ periodEnd: "period_end"
44051
44470
  });
44052
44471
  })
44053
44472
  );
@@ -44086,9 +44505,343 @@ var ReissueInvoiceLicenseQuantityPrice$outboundSchema = z99.pipe(
44086
44505
  });
44087
44506
  })
44088
44507
  );
44508
+ var ReissueInvoiceLicenseQuantityPriceTo$outboundSchema = smartUnion([z99.number(), z99.string()]);
44509
+ var ReissueInvoiceLicenseQuantityAdditionalCurrency$outboundSchema = z99.pipe(
44510
+ z99.object({
44511
+ currency: z99.string(),
44512
+ amount: z99.optional(z99.number()),
44513
+ flatAmount: z99.optional(z99.number())
44514
+ }),
44515
+ z99.transform((v) => {
44516
+ return remap(v, {
44517
+ flatAmount: "flat_amount"
44518
+ });
44519
+ })
44520
+ );
44521
+ var ReissueInvoiceLicenseQuantityPriceTier$outboundSchema = z99.pipe(
44522
+ z99.object({
44523
+ to: smartUnion([z99.number(), z99.string()]),
44524
+ amount: z99.optional(z99.number()),
44525
+ flatAmount: z99.optional(z99.number()),
44526
+ additionalCurrencies: z99.optional(z99.array(z99.lazy(
44527
+ () => ReissueInvoiceLicenseQuantityAdditionalCurrency$outboundSchema
44528
+ )))
44529
+ }),
44530
+ z99.transform((v) => {
44531
+ return remap(v, {
44532
+ flatAmount: "flat_amount",
44533
+ additionalCurrencies: "additional_currencies"
44534
+ });
44535
+ })
44536
+ );
44537
+ var ReissueInvoiceLicenseQuantityTierBehavior$outboundSchema = z99.enum(
44538
+ ReissueInvoiceLicenseQuantityTierBehavior
44539
+ );
44540
+ var ReissueInvoiceLicenseQuantityItemInterval$outboundSchema = z99.enum(
44541
+ ReissueInvoiceLicenseQuantityItemInterval
44542
+ );
44543
+ var ReissueInvoiceLicenseQuantityBillingMethod$outboundSchema = z99.enum(
44544
+ ReissueInvoiceLicenseQuantityBillingMethod
44545
+ );
44546
+ var ReissueInvoiceLicenseQuantityItemStripe$outboundSchema = z99.pipe(
44547
+ z99.object({
44548
+ priceId: z99.string()
44549
+ }),
44550
+ z99.transform((v) => {
44551
+ return remap(v, {
44552
+ priceId: "price_id"
44553
+ });
44554
+ })
44555
+ );
44556
+ var ReissueInvoiceLicenseQuantityItemProcessors$outboundSchema = z99.object({
44557
+ stripe: z99.optional(
44558
+ z99.nullable(z99.lazy(
44559
+ () => ReissueInvoiceLicenseQuantityItemStripe$outboundSchema
44560
+ ))
44561
+ )
44562
+ });
44563
+ var ReissueInvoiceLicenseQuantityItemPrice$outboundSchema = z99.pipe(
44564
+ z99.object({
44565
+ amount: z99.optional(z99.number()),
44566
+ tiers: z99.optional(z99.array(z99.lazy(
44567
+ () => ReissueInvoiceLicenseQuantityPriceTier$outboundSchema
44568
+ ))),
44569
+ tierBehavior: z99.optional(
44570
+ ReissueInvoiceLicenseQuantityTierBehavior$outboundSchema
44571
+ ),
44572
+ interval: ReissueInvoiceLicenseQuantityItemInterval$outboundSchema,
44573
+ intervalCount: z99._default(z99.number(), 1),
44574
+ billingUnits: z99._default(z99.number(), 1),
44575
+ billingMethod: ReissueInvoiceLicenseQuantityBillingMethod$outboundSchema,
44576
+ processors: z99.optional(z99.lazy(
44577
+ () => ReissueInvoiceLicenseQuantityItemProcessors$outboundSchema
44578
+ ))
44579
+ }),
44580
+ z99.transform((v) => {
44581
+ return remap(v, {
44582
+ tierBehavior: "tier_behavior",
44583
+ intervalCount: "interval_count",
44584
+ billingUnits: "billing_units",
44585
+ billingMethod: "billing_method"
44586
+ });
44587
+ })
44588
+ );
44589
+ var ReissueInvoiceDimensionsLicenseQuantityMatch4$outboundSchema = smartUnion([z99.string(), z99.number(), z99.boolean()]);
44590
+ var ReissueInvoiceDimensionsLicenseQuantity4$outboundSchema = z99.pipe(
44591
+ z99.object({
44592
+ match: z99.record(
44593
+ z99.string(),
44594
+ smartUnion([z99.string(), z99.number(), z99.boolean()])
44595
+ ),
44596
+ priority: z99.optional(z99.int()),
44597
+ creditCost: z99.number()
44598
+ }),
44599
+ z99.transform((v) => {
44600
+ return remap(v, {
44601
+ creditCost: "credit_cost"
44602
+ });
44603
+ })
44604
+ );
44605
+ var ReissueInvoiceDimensionsLicenseQuantityMatch3$outboundSchema = smartUnion([z99.string(), z99.number(), z99.boolean()]);
44606
+ var ReissueInvoiceDimensionsToLicenseQuantityEnum2$outboundSchema = z99.enum(
44607
+ ReissueInvoiceDimensionsToLicenseQuantityEnum2
44608
+ );
44609
+ var ReissueInvoiceDimensionsLicenseQuantityToUnion2$outboundSchema = smartUnion([
44610
+ z99.number(),
44611
+ ReissueInvoiceDimensionsToLicenseQuantityEnum2$outboundSchema
44612
+ ]);
44613
+ var ReissueInvoiceDimensionsLicenseQuantityTier2$outboundSchema = z99.pipe(
44614
+ z99.object({
44615
+ to: smartUnion([
44616
+ z99.number(),
44617
+ ReissueInvoiceDimensionsToLicenseQuantityEnum2$outboundSchema
44618
+ ]),
44619
+ creditCost: z99.number()
44620
+ }),
44621
+ z99.transform((v) => {
44622
+ return remap(v, {
44623
+ creditCost: "credit_cost"
44624
+ });
44625
+ })
44626
+ );
44627
+ var ReissueInvoiceDimensionsLicenseQuantity3$outboundSchema = z99.pipe(
44628
+ z99.object({
44629
+ match: z99.record(
44630
+ z99.string(),
44631
+ smartUnion([z99.string(), z99.number(), z99.boolean()])
44632
+ ),
44633
+ priority: z99.optional(z99.int()),
44634
+ tierBehavior: z99.literal("graduated"),
44635
+ tiers: z99.array(
44636
+ z99.lazy(
44637
+ () => ReissueInvoiceDimensionsLicenseQuantityTier2$outboundSchema
44638
+ )
44639
+ )
44640
+ }),
44641
+ z99.transform((v) => {
44642
+ return remap(v, {
44643
+ tierBehavior: "tier_behavior"
44644
+ });
44645
+ })
44646
+ );
44647
+ var ReissueInvoiceLicenseQuantityDimensionsUnion2$outboundSchema = smartUnion([
44648
+ z99.lazy(() => ReissueInvoiceDimensionsLicenseQuantity3$outboundSchema),
44649
+ z99.lazy(() => ReissueInvoiceDimensionsLicenseQuantity4$outboundSchema)
44650
+ ]);
44651
+ var ReissueInvoiceLicenseQuantityMultipliersMatch2$outboundSchema = smartUnion([z99.string(), z99.number(), z99.boolean()]);
44652
+ var ReissueInvoiceLicenseQuantityMultipliers2$outboundSchema = z99.object({
44653
+ match: z99.record(
44654
+ z99.string(),
44655
+ smartUnion([z99.string(), z99.number(), z99.boolean()])
44656
+ ),
44657
+ factor: z99.optional(z99.number()),
44658
+ add: z99.optional(z99.number())
44659
+ });
44660
+ var ReissueInvoiceCreditSchemaLicenseQuantity2$outboundSchema = z99.pipe(
44661
+ z99.object({
44662
+ meteredFeatureId: z99.string(),
44663
+ billingUnits: z99.optional(z99.number()),
44664
+ dimensions: z99.optional(z99.record(
44665
+ z99.string(),
44666
+ smartUnion([
44667
+ z99.lazy(() => ReissueInvoiceDimensionsLicenseQuantity3$outboundSchema),
44668
+ z99.lazy(() => ReissueInvoiceDimensionsLicenseQuantity4$outboundSchema)
44669
+ ])
44670
+ )),
44671
+ multipliers: z99.optional(z99.record(
44672
+ z99.string(),
44673
+ z99.lazy(() => ReissueInvoiceLicenseQuantityMultipliers2$outboundSchema)
44674
+ )),
44675
+ creditCost: z99.number()
44676
+ }),
44677
+ z99.transform((v) => {
44678
+ return remap(v, {
44679
+ meteredFeatureId: "metered_feature_id",
44680
+ billingUnits: "billing_units",
44681
+ creditCost: "credit_cost"
44682
+ });
44683
+ })
44684
+ );
44685
+ var ReissueInvoiceDimensionsLicenseQuantityMatch2$outboundSchema = smartUnion([z99.string(), z99.number(), z99.boolean()]);
44686
+ var ReissueInvoiceDimensionsLicenseQuantity2$outboundSchema = z99.pipe(
44687
+ z99.object({
44688
+ match: z99.record(
44689
+ z99.string(),
44690
+ smartUnion([z99.string(), z99.number(), z99.boolean()])
44691
+ ),
44692
+ priority: z99.optional(z99.int()),
44693
+ creditCost: z99.number()
44694
+ }),
44695
+ z99.transform((v) => {
44696
+ return remap(v, {
44697
+ creditCost: "credit_cost"
44698
+ });
44699
+ })
44700
+ );
44701
+ var ReissueInvoiceDimensionsLicenseQuantityMatch1$outboundSchema = smartUnion([z99.string(), z99.number(), z99.boolean()]);
44702
+ var ReissueInvoiceDimensionsToLicenseQuantityEnum1$outboundSchema = z99.enum(
44703
+ ReissueInvoiceDimensionsToLicenseQuantityEnum1
44704
+ );
44705
+ var ReissueInvoiceDimensionsLicenseQuantityToUnion1$outboundSchema = smartUnion([
44706
+ z99.number(),
44707
+ ReissueInvoiceDimensionsToLicenseQuantityEnum1$outboundSchema
44708
+ ]);
44709
+ var ReissueInvoiceDimensionsLicenseQuantityTier1$outboundSchema = z99.pipe(
44710
+ z99.object({
44711
+ to: smartUnion([
44712
+ z99.number(),
44713
+ ReissueInvoiceDimensionsToLicenseQuantityEnum1$outboundSchema
44714
+ ]),
44715
+ creditCost: z99.number()
44716
+ }),
44717
+ z99.transform((v) => {
44718
+ return remap(v, {
44719
+ creditCost: "credit_cost"
44720
+ });
44721
+ })
44722
+ );
44723
+ var ReissueInvoiceDimensionsLicenseQuantity1$outboundSchema = z99.pipe(
44724
+ z99.object({
44725
+ match: z99.record(
44726
+ z99.string(),
44727
+ smartUnion([z99.string(), z99.number(), z99.boolean()])
44728
+ ),
44729
+ priority: z99.optional(z99.int()),
44730
+ tierBehavior: z99.literal("graduated"),
44731
+ tiers: z99.array(
44732
+ z99.lazy(
44733
+ () => ReissueInvoiceDimensionsLicenseQuantityTier1$outboundSchema
44734
+ )
44735
+ )
44736
+ }),
44737
+ z99.transform((v) => {
44738
+ return remap(v, {
44739
+ tierBehavior: "tier_behavior"
44740
+ });
44741
+ })
44742
+ );
44743
+ var ReissueInvoiceLicenseQuantityDimensionsUnion1$outboundSchema = smartUnion([
44744
+ z99.lazy(() => ReissueInvoiceDimensionsLicenseQuantity1$outboundSchema),
44745
+ z99.lazy(() => ReissueInvoiceDimensionsLicenseQuantity2$outboundSchema)
44746
+ ]);
44747
+ var ReissueInvoiceLicenseQuantityMultipliersMatch1$outboundSchema = smartUnion([z99.string(), z99.number(), z99.boolean()]);
44748
+ var ReissueInvoiceLicenseQuantityMultipliers1$outboundSchema = z99.object({
44749
+ match: z99.record(
44750
+ z99.string(),
44751
+ smartUnion([z99.string(), z99.number(), z99.boolean()])
44752
+ ),
44753
+ factor: z99.optional(z99.number()),
44754
+ add: z99.optional(z99.number())
44755
+ });
44756
+ var ReissueInvoiceToLicenseQuantityEnum$outboundSchema = z99.enum(ReissueInvoiceToLicenseQuantityEnum);
44757
+ var ReissueInvoiceLicenseQuantityFeatureOverrideToUnion$outboundSchema = smartUnion([
44758
+ z99.number(),
44759
+ ReissueInvoiceToLicenseQuantityEnum$outboundSchema
44760
+ ]);
44761
+ var ReissueInvoiceLicenseQuantityFeatureOverrideTier$outboundSchema = z99.pipe(
44762
+ z99.object({
44763
+ to: smartUnion([
44764
+ z99.number(),
44765
+ ReissueInvoiceToLicenseQuantityEnum$outboundSchema
44766
+ ]),
44767
+ creditCost: z99.number()
44768
+ }),
44769
+ z99.transform((v) => {
44770
+ return remap(v, {
44771
+ creditCost: "credit_cost"
44772
+ });
44773
+ })
44774
+ );
44775
+ var ReissueInvoiceCreditSchemaLicenseQuantity1$outboundSchema = z99.pipe(
44776
+ z99.object({
44777
+ meteredFeatureId: z99.string(),
44778
+ billingUnits: z99.optional(z99.number()),
44779
+ dimensions: z99.optional(z99.record(
44780
+ z99.string(),
44781
+ smartUnion([
44782
+ z99.lazy(() => ReissueInvoiceDimensionsLicenseQuantity1$outboundSchema),
44783
+ z99.lazy(() => ReissueInvoiceDimensionsLicenseQuantity2$outboundSchema)
44784
+ ])
44785
+ )),
44786
+ multipliers: z99.optional(z99.record(
44787
+ z99.string(),
44788
+ z99.lazy(() => ReissueInvoiceLicenseQuantityMultipliers1$outboundSchema)
44789
+ )),
44790
+ tierBehavior: z99.literal("graduated"),
44791
+ tiers: z99.array(z99.lazy(
44792
+ () => ReissueInvoiceLicenseQuantityFeatureOverrideTier$outboundSchema
44793
+ ))
44794
+ }),
44795
+ z99.transform((v) => {
44796
+ return remap(v, {
44797
+ meteredFeatureId: "metered_feature_id",
44798
+ billingUnits: "billing_units",
44799
+ tierBehavior: "tier_behavior"
44800
+ });
44801
+ })
44802
+ );
44803
+ var ReissueInvoiceLicenseQuantityCreditSchemaUnion$outboundSchema = smartUnion([
44804
+ z99.lazy(() => ReissueInvoiceCreditSchemaLicenseQuantity1$outboundSchema),
44805
+ z99.lazy(() => ReissueInvoiceCreditSchemaLicenseQuantity2$outboundSchema)
44806
+ ]);
44807
+ var ReissueInvoiceLicenseQuantityFeatureOverride$outboundSchema = z99.pipe(
44808
+ z99.object({
44809
+ creditSchema: z99.optional(z99.array(smartUnion([
44810
+ z99.lazy(() => ReissueInvoiceCreditSchemaLicenseQuantity1$outboundSchema),
44811
+ z99.lazy(
44812
+ () => ReissueInvoiceCreditSchemaLicenseQuantity2$outboundSchema
44813
+ )
44814
+ ])))
44815
+ }),
44816
+ z99.transform((v) => {
44817
+ return remap(v, {
44818
+ creditSchema: "credit_schema"
44819
+ });
44820
+ })
44821
+ );
44822
+ var AddLicenseQuantityItem$outboundSchema = z99.pipe(
44823
+ z99.object({
44824
+ featureId: z99.string(),
44825
+ price: z99.optional(
44826
+ z99.lazy(() => ReissueInvoiceLicenseQuantityItemPrice$outboundSchema)
44827
+ ),
44828
+ featureOverride: z99.optional(
44829
+ z99.lazy(() => ReissueInvoiceLicenseQuantityFeatureOverride$outboundSchema)
44830
+ )
44831
+ }),
44832
+ z99.transform((v) => {
44833
+ return remap(v, {
44834
+ featureId: "feature_id",
44835
+ featureOverride: "feature_override"
44836
+ });
44837
+ })
44838
+ );
44089
44839
  var ReissueInvoiceCustomize$outboundSchema = z99.object({
44090
44840
  price: z99.optional(
44091
44841
  z99.nullable(z99.lazy(() => ReissueInvoiceLicenseQuantityPrice$outboundSchema))
44842
+ ),
44843
+ items: z99.optional(
44844
+ z99.array(z99.lazy(() => AddLicenseQuantityItem$outboundSchema))
44092
44845
  )
44093
44846
  });
44094
44847
  var ReissueInvoiceLicenseQuantityBillingBehavior$outboundSchema = z99.enum(
@@ -44116,12 +44869,16 @@ var ReissueInvoiceLicenseQuantityFeatureQuantity$outboundSchema = z99.pipe(
44116
44869
  z99.lazy(() => ReissueInvoiceLicenseQuantityUsage$outboundSchema)
44117
44870
  )
44118
44871
  ),
44119
- prorate: z99.optional(z99.boolean())
44872
+ prorate: z99.optional(z99.boolean()),
44873
+ periodStart: z99.optional(z99.int()),
44874
+ periodEnd: z99.optional(z99.int())
44120
44875
  }),
44121
44876
  z99.transform((v) => {
44122
44877
  return remap(v, {
44123
44878
  featureId: "feature_id",
44124
- billingBehavior: "billing_behavior"
44879
+ billingBehavior: "billing_behavior",
44880
+ periodStart: "period_start",
44881
+ periodEnd: "period_end"
44125
44882
  });
44126
44883
  })
44127
44884
  );
@@ -44133,12 +44890,16 @@ var ReissueInvoiceLicenseQuantity$outboundSchema = z99.pipe(
44133
44890
  featureQuantities: z99.optional(z99.array(z99.lazy(
44134
44891
  () => ReissueInvoiceLicenseQuantityFeatureQuantity$outboundSchema
44135
44892
  ))),
44136
- prorate: z99.optional(z99.boolean())
44893
+ prorate: z99.optional(z99.boolean()),
44894
+ periodStart: z99.optional(z99.int()),
44895
+ periodEnd: z99.optional(z99.int())
44137
44896
  }),
44138
44897
  z99.transform((v) => {
44139
44898
  return remap(v, {
44140
44899
  licensePlanId: "license_plan_id",
44141
- featureQuantities: "feature_quantities"
44900
+ featureQuantities: "feature_quantities",
44901
+ periodStart: "period_start",
44902
+ periodEnd: "period_end"
44142
44903
  });
44143
44904
  })
44144
44905
  );
@@ -44158,6 +44919,7 @@ var Add2$outboundSchema = z99.pipe(
44158
44919
  z99.object({
44159
44920
  planId: z99.string(),
44160
44921
  version: z99.optional(z99.number()),
44922
+ entityId: z99.optional(z99.nullable(z99.string())),
44161
44923
  customize: z99.optional(z99.lazy(
44162
44924
  () => ReissueInvoiceInvoiceCustomize$outboundSchema
44163
44925
  )),
@@ -44170,13 +44932,18 @@ var Add2$outboundSchema = z99.pipe(
44170
44932
  discounts: z99.optional(z99.array(z99.lazy(
44171
44933
  () => ReissueInvoiceAttachDiscount$outboundSchema
44172
44934
  ))),
44173
- prorate: z99.optional(z99.boolean())
44935
+ prorate: z99.optional(z99.boolean()),
44936
+ periodStart: z99.optional(z99.int()),
44937
+ periodEnd: z99.optional(z99.int())
44174
44938
  }),
44175
44939
  z99.transform((v) => {
44176
44940
  return remap(v, {
44177
44941
  planId: "plan_id",
44942
+ entityId: "entity_id",
44178
44943
  featureQuantities: "feature_quantities",
44179
- licenseQuantities: "license_quantities"
44944
+ licenseQuantities: "license_quantities",
44945
+ periodStart: "period_start",
44946
+ periodEnd: "period_end"
44180
44947
  });
44181
44948
  })
44182
44949
  );
@@ -44309,6 +45076,7 @@ var ReissueInvoiceLine$inboundSchema = z99.pipe(
44309
45076
  z99.object({
44310
45077
  plan_id: nullable(string5()),
44311
45078
  feature_id: nullable(string5()),
45079
+ entity_id: nullable(string5()),
44312
45080
  description: string5(),
44313
45081
  amount: number2(),
44314
45082
  amount_after_discounts: number2(),
@@ -44321,6 +45089,7 @@ var ReissueInvoiceLine$inboundSchema = z99.pipe(
44321
45089
  return remap(v, {
44322
45090
  "plan_id": "planId",
44323
45091
  "feature_id": "featureId",
45092
+ "entity_id": "entityId",
44324
45093
  "amount_after_discounts": "amountAfterDiscounts",
44325
45094
  "period_start": "periodStart",
44326
45095
  "period_end": "periodEnd"
@@ -66165,7 +66934,7 @@ var Autumn = class extends ClientSDK {
66165
66934
  ));
66166
66935
  }
66167
66936
  /**
66168
- * Records usage for a customer feature and returns updated balances.
66937
+ * Records usage for a customer feature. Queued by default; pass async: false to apply it before responding with updated balances.
66169
66938
  *
66170
66939
  * Use this after an action happens to decrement usage, or send a negative value to credit balance back.
66171
66940
  *
@@ -66189,9 +66958,9 @@ var Autumn = class extends ClientSDK {
66189
66958
  * @param properties - Additional properties to attach to this usage event. (optional)
66190
66959
  * @param timestamp - Unix timestamp in milliseconds to use for the usage event. Defaults to the current time. (optional)
66191
66960
  * @param overageBehavior - How to handle usage that exceeds the available balance. "cap" (default) deducts only what fits, stopping at zero. "overflow" deducts the full value: the balance can go negative and usage limits do not clamp the deduction, though spend limits still apply. (optional)
66192
- * @param async - If true, enqueue the event for asynchronous processing and return 204 immediately. The response will not include balance information. (optional)
66961
+ * @param async - Defaults to true: the event is queued and the response is a 202 with balance: null. Set to false to apply the usage before responding with a 200 and the updated balance. (optional)
66193
66962
  *
66194
- * @returns The usage value recorded, with either a single updated balance or a map of updated balances. If Autumn is experiencing degraded service from a downstream provider, the API may return 202 after accepting the event for replay so it can be tracked as soon as the service is restored.
66963
+ * @returns The usage value recorded. By default the event is queued and the API returns 202 with balance: null. With async: false it returns 200 with either a single updated balance or a map of updated balances, or 202 if Autumn is experiencing degraded service and accepted the event for replay.
66195
66964
  */
66196
66965
  async track(request, options) {
66197
66966
  return unwrapAsync(track(
@@ -66232,9 +67001,9 @@ var Autumn = class extends ClientSDK {
66232
67001
  * @param properties - Additional properties to attach to this usage event. (optional)
66233
67002
  * @param timestamp - Unix timestamp in milliseconds to use for the usage event. Defaults to the current time. (optional)
66234
67003
  * @param overageBehavior - How to handle usage that exceeds the available balance. "cap" (default) deducts only what fits, stopping at zero. "overflow" deducts the full value: the balance can go negative and usage limits do not clamp the deduction, though spend limits still apply. (optional)
66235
- * @param async - If true, enqueue the event for asynchronous processing and return 204 immediately. The response will not include balance information. (optional)
67004
+ * @param async - Defaults to true: the event is queued and the response is a 202 with balance: null. Set to false to apply the usage before responding with a 200 and the updated balance. (optional)
66236
67005
  *
66237
- * @returns The dollar value recorded and the updated AI credit system balance. If Autumn is experiencing degraded service from a downstream provider, the API may return 202 after accepting the token usage event for replay so it can be tracked as soon as the service is restored.
67006
+ * @returns The dollar value recorded. By default the event is queued and the API returns 202 with balance: null. With async: false it returns 200 with the updated AI credit system balance, or 202 if Autumn is experiencing degraded service and accepted the event for replay.
66238
67007
  */
66239
67008
  async trackTokens(request, options) {
66240
67009
  return unwrapAsync(trackTokens(