autumn-js 1.3.73 → 1.4.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.
Files changed (67) hide show
  1. package/dist/backend/adapters/express.js +9 -10
  2. package/dist/backend/adapters/express.mjs +5 -5
  3. package/dist/backend/adapters/fetch.js +9 -10
  4. package/dist/backend/adapters/fetch.mjs +5 -5
  5. package/dist/backend/adapters/hono.js +9 -10
  6. package/dist/backend/adapters/hono.mjs +5 -5
  7. package/dist/backend/adapters/index.js +9 -10
  8. package/dist/backend/adapters/index.mjs +8 -8
  9. package/dist/backend/adapters/next.js +9 -10
  10. package/dist/backend/adapters/next.mjs +5 -5
  11. package/dist/backend/{chunk-QD5VNLGH.mjs → chunk-2JZN2A5Z.mjs} +1 -1
  12. package/dist/backend/{chunk-MIDKK6HE.mjs → chunk-572QTWBN.mjs} +1 -1
  13. package/dist/backend/{chunk-P46GFHFB.mjs → chunk-ETP3OECB.mjs} +1 -1
  14. package/dist/backend/{chunk-CFBX64LG.mjs → chunk-FJYYK3KF.mjs} +1 -1
  15. package/dist/backend/{chunk-5NZXLCLY.mjs → chunk-HKLICPAL.mjs} +9 -10
  16. package/dist/backend/{chunk-I75WCVDU.mjs → chunk-MSWCEKV6.mjs} +1 -1
  17. package/dist/backend/{chunk-4D2MGLMK.mjs → chunk-QQFPLVJO.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 +9 -10
  21. package/dist/backend/core/handlers/coreHandler.mjs +3 -3
  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 +1 -1
  25. package/dist/backend/core/handlers/handleRouteByName.js +9 -10
  26. package/dist/backend/core/handlers/handleRouteByName.mjs +3 -3
  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 +9 -10
  30. package/dist/backend/core/handlers/index.mjs +6 -6
  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 +9 -10
  34. package/dist/backend/core/index.mjs +8 -8
  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/index.mjs +1 -1
  38. package/dist/backend/core/routes/routeBuilder.d.mts +1 -1
  39. package/dist/backend/core/routes/routeBuilder.d.ts +1 -1
  40. package/dist/backend/core/routes/routeConfigs.d.mts +1 -1
  41. package/dist/backend/core/routes/routeConfigs.d.ts +1 -1
  42. package/dist/backend/core/routes/routeConfigs.mjs +1 -1
  43. package/dist/backend/core/types/handlerTypes.d.mts +1 -1
  44. package/dist/backend/core/types/handlerTypes.d.ts +1 -1
  45. package/dist/backend/core/types/index.d.mts +1 -1
  46. package/dist/backend/core/types/index.d.ts +1 -1
  47. package/dist/backend/core/types/routeTypes.d.mts +1 -1
  48. package/dist/backend/core/types/routeTypes.d.ts +1 -1
  49. package/dist/backend/core/utils/index.mjs +3 -3
  50. package/dist/backend/index.d.mts +2 -2
  51. package/dist/backend/index.d.ts +2 -2
  52. package/dist/backend/index.js +9 -10
  53. package/dist/backend/index.mjs +6 -6
  54. package/dist/backend/{routeTypes-Bq2o3T9X.d.mts → routeTypes-C0SK3Woi.d.mts} +9 -13
  55. package/dist/backend/{routeTypes-B9shWqn_.d.ts → routeTypes-eswiz8Fx.d.ts} +9 -13
  56. package/dist/better-auth/{chunk-TOUOQM4M.mjs → chunk-HJ7J37RU.mjs} +9 -10
  57. package/dist/better-auth/index.js +9 -10
  58. package/dist/better-auth/index.mjs +1 -1
  59. package/dist/better-auth/utils/handleBetterAuthRoute.js +9 -10
  60. package/dist/better-auth/utils/handleBetterAuthRoute.mjs +1 -1
  61. package/dist/better-auth/utils/index.js +9 -10
  62. package/dist/better-auth/utils/index.mjs +1 -1
  63. package/dist/sdk/index.d.mts +11 -16
  64. package/dist/sdk/index.d.ts +11 -16
  65. package/dist/sdk/index.js +9 -10
  66. package/dist/sdk/index.mjs +9 -10
  67. package/package.json +2 -2
@@ -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, {
@@ -66165,7 +66164,7 @@ var Autumn = class extends ClientSDK {
66165
66164
  ));
66166
66165
  }
66167
66166
  /**
66168
- * Records usage for a customer feature and returns updated balances.
66167
+ * Records usage for a customer feature. Queued by default; pass async: false to apply it before responding with updated balances.
66169
66168
  *
66170
66169
  * Use this after an action happens to decrement usage, or send a negative value to credit balance back.
66171
66170
  *
@@ -66189,9 +66188,9 @@ var Autumn = class extends ClientSDK {
66189
66188
  * @param properties - Additional properties to attach to this usage event. (optional)
66190
66189
  * @param timestamp - Unix timestamp in milliseconds to use for the usage event. Defaults to the current time. (optional)
66191
66190
  * @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)
66191
+ * @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
66192
  *
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.
66193
+ * @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
66194
  */
66196
66195
  async track(request, options) {
66197
66196
  return unwrapAsync(track(
@@ -66232,9 +66231,9 @@ var Autumn = class extends ClientSDK {
66232
66231
  * @param properties - Additional properties to attach to this usage event. (optional)
66233
66232
  * @param timestamp - Unix timestamp in milliseconds to use for the usage event. Defaults to the current time. (optional)
66234
66233
  * @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)
66234
+ * @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
66235
  *
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.
66236
+ * @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
66237
  */
66239
66238
  async trackTokens(request, options) {
66240
66239
  return unwrapAsync(trackTokens(
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  autumnHandler
3
- } from "../chunk-4D2MGLMK.mjs";
3
+ } from "../chunk-QQFPLVJO.mjs";
4
4
  import "../chunk-WYDGEDEU.mjs";
5
5
  import "../chunk-VXND2UDT.mjs";
6
- import "../chunk-P46GFHFB.mjs";
7
- import "../chunk-CFBX64LG.mjs";
8
- import "../chunk-5NZXLCLY.mjs";
6
+ import "../chunk-FJYYK3KF.mjs";
7
+ import "../chunk-ETP3OECB.mjs";
8
+ import "../chunk-HKLICPAL.mjs";
9
9
  import "../chunk-MOHYGUMA.mjs";
10
10
  import "../chunk-TBQ27LIK.mjs";
11
11
  import "../chunk-J44WR3QZ.mjs";
@@ -13,8 +13,8 @@ import "../chunk-TSF4YCUO.mjs";
13
13
  import "../chunk-UAR3TMWI.mjs";
14
14
  import "../chunk-WSWENEK2.mjs";
15
15
  import "../chunk-OTXV5FY7.mjs";
16
- import "../chunk-VZIMT7AO.mjs";
17
16
  import "../chunk-I7CD6EB6.mjs";
17
+ import "../chunk-VZIMT7AO.mjs";
18
18
  import "../chunk-N7NFYY54.mjs";
19
19
  export {
20
20
  autumnHandler
@@ -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, {
@@ -66165,7 +66164,7 @@ var Autumn = class extends ClientSDK {
66165
66164
  ));
66166
66165
  }
66167
66166
  /**
66168
- * Records usage for a customer feature and returns updated balances.
66167
+ * Records usage for a customer feature. Queued by default; pass async: false to apply it before responding with updated balances.
66169
66168
  *
66170
66169
  * Use this after an action happens to decrement usage, or send a negative value to credit balance back.
66171
66170
  *
@@ -66189,9 +66188,9 @@ var Autumn = class extends ClientSDK {
66189
66188
  * @param properties - Additional properties to attach to this usage event. (optional)
66190
66189
  * @param timestamp - Unix timestamp in milliseconds to use for the usage event. Defaults to the current time. (optional)
66191
66190
  * @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)
66191
+ * @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
66192
  *
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.
66193
+ * @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
66194
  */
66196
66195
  async track(request, options) {
66197
66196
  return unwrapAsync(track(
@@ -66232,9 +66231,9 @@ var Autumn = class extends ClientSDK {
66232
66231
  * @param properties - Additional properties to attach to this usage event. (optional)
66233
66232
  * @param timestamp - Unix timestamp in milliseconds to use for the usage event. Defaults to the current time. (optional)
66234
66233
  * @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)
66234
+ * @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
66235
  *
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.
66236
+ * @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
66237
  */
66239
66238
  async trackTokens(request, options) {
66240
66239
  return unwrapAsync(trackTokens(
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  autumnHandler
3
- } from "../chunk-I75WCVDU.mjs";
3
+ } from "../chunk-MSWCEKV6.mjs";
4
4
  import "../chunk-WYDGEDEU.mjs";
5
5
  import "../chunk-VXND2UDT.mjs";
6
- import "../chunk-P46GFHFB.mjs";
7
- import "../chunk-CFBX64LG.mjs";
8
- import "../chunk-5NZXLCLY.mjs";
6
+ import "../chunk-FJYYK3KF.mjs";
7
+ import "../chunk-ETP3OECB.mjs";
8
+ import "../chunk-HKLICPAL.mjs";
9
9
  import "../chunk-MOHYGUMA.mjs";
10
10
  import "../chunk-TBQ27LIK.mjs";
11
11
  import "../chunk-J44WR3QZ.mjs";
@@ -13,8 +13,8 @@ import "../chunk-TSF4YCUO.mjs";
13
13
  import "../chunk-UAR3TMWI.mjs";
14
14
  import "../chunk-WSWENEK2.mjs";
15
15
  import "../chunk-OTXV5FY7.mjs";
16
- import "../chunk-VZIMT7AO.mjs";
17
16
  import "../chunk-I7CD6EB6.mjs";
17
+ import "../chunk-VZIMT7AO.mjs";
18
18
  import "../chunk-N7NFYY54.mjs";
19
19
  export {
20
20
  autumnHandler
@@ -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, {
@@ -66165,7 +66164,7 @@ var Autumn = class extends ClientSDK {
66165
66164
  ));
66166
66165
  }
66167
66166
  /**
66168
- * Records usage for a customer feature and returns updated balances.
66167
+ * Records usage for a customer feature. Queued by default; pass async: false to apply it before responding with updated balances.
66169
66168
  *
66170
66169
  * Use this after an action happens to decrement usage, or send a negative value to credit balance back.
66171
66170
  *
@@ -66189,9 +66188,9 @@ var Autumn = class extends ClientSDK {
66189
66188
  * @param properties - Additional properties to attach to this usage event. (optional)
66190
66189
  * @param timestamp - Unix timestamp in milliseconds to use for the usage event. Defaults to the current time. (optional)
66191
66190
  * @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)
66191
+ * @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
66192
  *
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.
66193
+ * @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
66194
  */
66196
66195
  async track(request, options) {
66197
66196
  return unwrapAsync(track(
@@ -66232,9 +66231,9 @@ var Autumn = class extends ClientSDK {
66232
66231
  * @param properties - Additional properties to attach to this usage event. (optional)
66233
66232
  * @param timestamp - Unix timestamp in milliseconds to use for the usage event. Defaults to the current time. (optional)
66234
66233
  * @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)
66234
+ * @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
66235
  *
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.
66236
+ * @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
66237
  */
66239
66238
  async trackTokens(request, options) {
66240
66239
  return unwrapAsync(trackTokens(
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  autumnHandler
3
- } from "../chunk-QD5VNLGH.mjs";
3
+ } from "../chunk-2JZN2A5Z.mjs";
4
4
  import "../chunk-WYDGEDEU.mjs";
5
5
  import "../chunk-VXND2UDT.mjs";
6
- import "../chunk-P46GFHFB.mjs";
7
- import "../chunk-CFBX64LG.mjs";
8
- import "../chunk-5NZXLCLY.mjs";
6
+ import "../chunk-FJYYK3KF.mjs";
7
+ import "../chunk-ETP3OECB.mjs";
8
+ import "../chunk-HKLICPAL.mjs";
9
9
  import "../chunk-MOHYGUMA.mjs";
10
10
  import "../chunk-TBQ27LIK.mjs";
11
11
  import "../chunk-J44WR3QZ.mjs";
@@ -13,8 +13,8 @@ import "../chunk-TSF4YCUO.mjs";
13
13
  import "../chunk-UAR3TMWI.mjs";
14
14
  import "../chunk-WSWENEK2.mjs";
15
15
  import "../chunk-OTXV5FY7.mjs";
16
- import "../chunk-VZIMT7AO.mjs";
17
16
  import "../chunk-I7CD6EB6.mjs";
17
+ import "../chunk-VZIMT7AO.mjs";
18
18
  import "../chunk-N7NFYY54.mjs";
19
19
  export {
20
20
  autumnHandler
@@ -79,10 +79,10 @@ function serverURLFromOptions(options) {
79
79
  }
80
80
  var SDK_METADATA = {
81
81
  language: "typescript",
82
- openapiDocVersion: "2.4.0",
82
+ openapiDocVersion: "2.5.0",
83
83
  sdkVersion: "0.10.18",
84
84
  genVersion: "2.884.13",
85
- userAgent: "speakeasy-sdk/typescript 0.10.18 2.884.13 2.4.0 @useautumn/sdk"
85
+ userAgent: "speakeasy-sdk/typescript 0.10.18 2.884.13 2.5.0 @useautumn/sdk"
86
86
  };
87
87
 
88
88
  // ../sdk/src/lib/http.ts
@@ -852,7 +852,7 @@ function dlv(obj, key, def, p, undef) {
852
852
  // ../sdk/src/lib/env.ts
853
853
  var envSchema = z5.object({
854
854
  AUTUMN_SECRET_KEY: z5.optional(z5.string()),
855
- AUTUMN_X_API_VERSION: z5._default(z5.string(), "2.4.0"),
855
+ AUTUMN_X_API_VERSION: z5._default(z5.string(), "2.5.0"),
856
856
  AUTUMN_FAIL_OPEN: z5.pipe(
857
857
  z5._default(z5.enum(["true", "false"]), "true"),
858
858
  z5.transform((v) => v === "true")
@@ -4201,8 +4201,7 @@ var RequestBody$outboundSchema = z16.pipe(
4201
4201
  properties: z16.optional(z16.record(z16.string(), z16.any())),
4202
4202
  idempotencyKey: z16.optional(z16.string()),
4203
4203
  timestamp: z16.optional(z16.int()),
4204
- overageBehavior: z16.optional(BatchTrackOverageBehavior$outboundSchema),
4205
- async: z16.optional(z16.boolean())
4204
+ overageBehavior: z16.optional(BatchTrackOverageBehavior$outboundSchema)
4206
4205
  }),
4207
4206
  z16.transform((v) => {
4208
4207
  return remap(v, {
@@ -66168,7 +66167,7 @@ var Autumn = class extends ClientSDK {
66168
66167
  ));
66169
66168
  }
66170
66169
  /**
66171
- * Records usage for a customer feature and returns updated balances.
66170
+ * Records usage for a customer feature. Queued by default; pass async: false to apply it before responding with updated balances.
66172
66171
  *
66173
66172
  * Use this after an action happens to decrement usage, or send a negative value to credit balance back.
66174
66173
  *
@@ -66192,9 +66191,9 @@ var Autumn = class extends ClientSDK {
66192
66191
  * @param properties - Additional properties to attach to this usage event. (optional)
66193
66192
  * @param timestamp - Unix timestamp in milliseconds to use for the usage event. Defaults to the current time. (optional)
66194
66193
  * @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)
66195
- * @param async - If true, enqueue the event for asynchronous processing and return 204 immediately. The response will not include balance information. (optional)
66194
+ * @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)
66196
66195
  *
66197
- * @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.
66196
+ * @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.
66198
66197
  */
66199
66198
  async track(request, options) {
66200
66199
  return unwrapAsync(track(
@@ -66235,9 +66234,9 @@ var Autumn = class extends ClientSDK {
66235
66234
  * @param properties - Additional properties to attach to this usage event. (optional)
66236
66235
  * @param timestamp - Unix timestamp in milliseconds to use for the usage event. Defaults to the current time. (optional)
66237
66236
  * @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)
66238
- * @param async - If true, enqueue the event for asynchronous processing and return 204 immediately. The response will not include balance information. (optional)
66237
+ * @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)
66239
66238
  *
66240
- * @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.
66239
+ * @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.
66241
66240
  */
66242
66241
  async trackTokens(request, options) {
66243
66242
  return unwrapAsync(trackTokens(
@@ -1,20 +1,20 @@
1
1
  import {
2
2
  autumnHandler
3
- } from "../chunk-4D2MGLMK.mjs";
3
+ } from "../chunk-QQFPLVJO.mjs";
4
4
  import {
5
5
  autumnHandler as autumnHandler2
6
- } from "../chunk-I75WCVDU.mjs";
6
+ } from "../chunk-MSWCEKV6.mjs";
7
7
  import {
8
8
  autumnHandler as autumnHandler3
9
- } from "../chunk-QD5VNLGH.mjs";
9
+ } from "../chunk-2JZN2A5Z.mjs";
10
10
  import {
11
11
  autumnHandler as autumnHandler4
12
- } from "../chunk-MIDKK6HE.mjs";
12
+ } from "../chunk-572QTWBN.mjs";
13
13
  import "../chunk-WYDGEDEU.mjs";
14
14
  import "../chunk-VXND2UDT.mjs";
15
- import "../chunk-P46GFHFB.mjs";
16
- import "../chunk-CFBX64LG.mjs";
17
- import "../chunk-5NZXLCLY.mjs";
15
+ import "../chunk-FJYYK3KF.mjs";
16
+ import "../chunk-ETP3OECB.mjs";
17
+ import "../chunk-HKLICPAL.mjs";
18
18
  import "../chunk-MOHYGUMA.mjs";
19
19
  import "../chunk-TBQ27LIK.mjs";
20
20
  import "../chunk-J44WR3QZ.mjs";
@@ -22,8 +22,8 @@ import "../chunk-TSF4YCUO.mjs";
22
22
  import "../chunk-UAR3TMWI.mjs";
23
23
  import "../chunk-WSWENEK2.mjs";
24
24
  import "../chunk-OTXV5FY7.mjs";
25
- import "../chunk-VZIMT7AO.mjs";
26
25
  import "../chunk-I7CD6EB6.mjs";
26
+ import "../chunk-VZIMT7AO.mjs";
27
27
  import "../chunk-N7NFYY54.mjs";
28
28
  export {
29
29
  autumnHandler as expressAutumnHandler,
@@ -77,10 +77,10 @@ function serverURLFromOptions(options) {
77
77
  }
78
78
  var SDK_METADATA = {
79
79
  language: "typescript",
80
- openapiDocVersion: "2.4.0",
80
+ openapiDocVersion: "2.5.0",
81
81
  sdkVersion: "0.10.18",
82
82
  genVersion: "2.884.13",
83
- userAgent: "speakeasy-sdk/typescript 0.10.18 2.884.13 2.4.0 @useautumn/sdk"
83
+ userAgent: "speakeasy-sdk/typescript 0.10.18 2.884.13 2.5.0 @useautumn/sdk"
84
84
  };
85
85
 
86
86
  // ../sdk/src/lib/http.ts
@@ -850,7 +850,7 @@ function dlv(obj, key, def, p, undef) {
850
850
  // ../sdk/src/lib/env.ts
851
851
  var envSchema = z5.object({
852
852
  AUTUMN_SECRET_KEY: z5.optional(z5.string()),
853
- AUTUMN_X_API_VERSION: z5._default(z5.string(), "2.4.0"),
853
+ AUTUMN_X_API_VERSION: z5._default(z5.string(), "2.5.0"),
854
854
  AUTUMN_FAIL_OPEN: z5.pipe(
855
855
  z5._default(z5.enum(["true", "false"]), "true"),
856
856
  z5.transform((v) => v === "true")
@@ -4199,8 +4199,7 @@ var RequestBody$outboundSchema = z16.pipe(
4199
4199
  properties: z16.optional(z16.record(z16.string(), z16.any())),
4200
4200
  idempotencyKey: z16.optional(z16.string()),
4201
4201
  timestamp: z16.optional(z16.int()),
4202
- overageBehavior: z16.optional(BatchTrackOverageBehavior$outboundSchema),
4203
- async: z16.optional(z16.boolean())
4202
+ overageBehavior: z16.optional(BatchTrackOverageBehavior$outboundSchema)
4204
4203
  }),
4205
4204
  z16.transform((v) => {
4206
4205
  return remap(v, {
@@ -66166,7 +66165,7 @@ var Autumn = class extends ClientSDK {
66166
66165
  ));
66167
66166
  }
66168
66167
  /**
66169
- * Records usage for a customer feature and returns updated balances.
66168
+ * Records usage for a customer feature. Queued by default; pass async: false to apply it before responding with updated balances.
66170
66169
  *
66171
66170
  * Use this after an action happens to decrement usage, or send a negative value to credit balance back.
66172
66171
  *
@@ -66190,9 +66189,9 @@ var Autumn = class extends ClientSDK {
66190
66189
  * @param properties - Additional properties to attach to this usage event. (optional)
66191
66190
  * @param timestamp - Unix timestamp in milliseconds to use for the usage event. Defaults to the current time. (optional)
66192
66191
  * @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)
66193
- * @param async - If true, enqueue the event for asynchronous processing and return 204 immediately. The response will not include balance information. (optional)
66192
+ * @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)
66194
66193
  *
66195
- * @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.
66194
+ * @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.
66196
66195
  */
66197
66196
  async track(request, options) {
66198
66197
  return unwrapAsync(track(
@@ -66233,9 +66232,9 @@ var Autumn = class extends ClientSDK {
66233
66232
  * @param properties - Additional properties to attach to this usage event. (optional)
66234
66233
  * @param timestamp - Unix timestamp in milliseconds to use for the usage event. Defaults to the current time. (optional)
66235
66234
  * @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)
66236
- * @param async - If true, enqueue the event for asynchronous processing and return 204 immediately. The response will not include balance information. (optional)
66235
+ * @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)
66237
66236
  *
66238
- * @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.
66237
+ * @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.
66239
66238
  */
66240
66239
  async trackTokens(request, options) {
66241
66240
  return unwrapAsync(trackTokens(
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  autumnHandler
3
- } from "../chunk-MIDKK6HE.mjs";
3
+ } from "../chunk-572QTWBN.mjs";
4
4
  import "../chunk-WYDGEDEU.mjs";
5
5
  import "../chunk-VXND2UDT.mjs";
6
- import "../chunk-P46GFHFB.mjs";
7
- import "../chunk-CFBX64LG.mjs";
8
- import "../chunk-5NZXLCLY.mjs";
6
+ import "../chunk-FJYYK3KF.mjs";
7
+ import "../chunk-ETP3OECB.mjs";
8
+ import "../chunk-HKLICPAL.mjs";
9
9
  import "../chunk-MOHYGUMA.mjs";
10
10
  import "../chunk-TBQ27LIK.mjs";
11
11
  import "../chunk-J44WR3QZ.mjs";
@@ -13,8 +13,8 @@ import "../chunk-TSF4YCUO.mjs";
13
13
  import "../chunk-UAR3TMWI.mjs";
14
14
  import "../chunk-WSWENEK2.mjs";
15
15
  import "../chunk-OTXV5FY7.mjs";
16
- import "../chunk-VZIMT7AO.mjs";
17
16
  import "../chunk-I7CD6EB6.mjs";
17
+ import "../chunk-VZIMT7AO.mjs";
18
18
  import "../chunk-N7NFYY54.mjs";
19
19
  export {
20
20
  autumnHandler
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createCoreHandler
3
- } from "./chunk-CFBX64LG.mjs";
3
+ } from "./chunk-FJYYK3KF.mjs";
4
4
 
5
5
  // src/backend/adapters/hono.ts
6
6
  function autumnHandler(options) {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createCoreHandler
3
- } from "./chunk-CFBX64LG.mjs";
3
+ } from "./chunk-FJYYK3KF.mjs";
4
4
 
5
5
  // src/backend/adapters/next.ts
6
6
  import { NextResponse } from "next/server";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Autumn
3
- } from "./chunk-5NZXLCLY.mjs";
3
+ } from "./chunk-HKLICPAL.mjs";
4
4
  import {
5
5
  executeRoute
6
6
  } from "./chunk-MOHYGUMA.mjs";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Autumn
3
- } from "./chunk-5NZXLCLY.mjs";
3
+ } from "./chunk-HKLICPAL.mjs";
4
4
  import {
5
5
  executeRoute
6
6
  } from "./chunk-MOHYGUMA.mjs";
@@ -746,7 +746,7 @@ function dlv(obj, key, def, p, undef) {
746
746
  // ../sdk/src/lib/env.ts
747
747
  var envSchema = z5.object({
748
748
  AUTUMN_SECRET_KEY: z5.optional(z5.string()),
749
- AUTUMN_X_API_VERSION: z5._default(z5.string(), "2.4.0"),
749
+ AUTUMN_X_API_VERSION: z5._default(z5.string(), "2.5.0"),
750
750
  AUTUMN_FAIL_OPEN: z5.pipe(
751
751
  z5._default(z5.enum(["true", "false"]), "true"),
752
752
  z5.transform((v) => v === "true")
@@ -4115,8 +4115,7 @@ var RequestBody$outboundSchema = z16.pipe(
4115
4115
  properties: z16.optional(z16.record(z16.string(), z16.any())),
4116
4116
  idempotencyKey: z16.optional(z16.string()),
4117
4117
  timestamp: z16.optional(z16.int()),
4118
- overageBehavior: z16.optional(BatchTrackOverageBehavior$outboundSchema),
4119
- async: z16.optional(z16.boolean())
4118
+ overageBehavior: z16.optional(BatchTrackOverageBehavior$outboundSchema)
4120
4119
  }),
4121
4120
  z16.transform((v) => {
4122
4121
  return remap(v, {
@@ -57218,10 +57217,10 @@ function serverURLFromOptions(options) {
57218
57217
  }
57219
57218
  var SDK_METADATA = {
57220
57219
  language: "typescript",
57221
- openapiDocVersion: "2.4.0",
57220
+ openapiDocVersion: "2.5.0",
57222
57221
  sdkVersion: "0.10.18",
57223
57222
  genVersion: "2.884.13",
57224
- userAgent: "speakeasy-sdk/typescript 0.10.18 2.884.13 2.4.0 @useautumn/sdk"
57223
+ userAgent: "speakeasy-sdk/typescript 0.10.18 2.884.13 2.5.0 @useautumn/sdk"
57225
57224
  };
57226
57225
 
57227
57226
  // ../sdk/src/lib/retries.ts
@@ -66110,7 +66109,7 @@ var Autumn = class extends ClientSDK {
66110
66109
  ));
66111
66110
  }
66112
66111
  /**
66113
- * Records usage for a customer feature and returns updated balances.
66112
+ * Records usage for a customer feature. Queued by default; pass async: false to apply it before responding with updated balances.
66114
66113
  *
66115
66114
  * Use this after an action happens to decrement usage, or send a negative value to credit balance back.
66116
66115
  *
@@ -66134,9 +66133,9 @@ var Autumn = class extends ClientSDK {
66134
66133
  * @param properties - Additional properties to attach to this usage event. (optional)
66135
66134
  * @param timestamp - Unix timestamp in milliseconds to use for the usage event. Defaults to the current time. (optional)
66136
66135
  * @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)
66137
- * @param async - If true, enqueue the event for asynchronous processing and return 204 immediately. The response will not include balance information. (optional)
66136
+ * @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)
66138
66137
  *
66139
- * @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.
66138
+ * @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.
66140
66139
  */
66141
66140
  async track(request, options) {
66142
66141
  return unwrapAsync(track(
@@ -66177,9 +66176,9 @@ var Autumn = class extends ClientSDK {
66177
66176
  * @param properties - Additional properties to attach to this usage event. (optional)
66178
66177
  * @param timestamp - Unix timestamp in milliseconds to use for the usage event. Defaults to the current time. (optional)
66179
66178
  * @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)
66180
- * @param async - If true, enqueue the event for asynchronous processing and return 204 immediately. The response will not include balance information. (optional)
66179
+ * @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)
66181
66180
  *
66182
- * @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.
66181
+ * @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.
66183
66182
  */
66184
66183
  async trackTokens(request, options) {
66185
66184
  return unwrapAsync(trackTokens(
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createCoreHandler
3
- } from "./chunk-CFBX64LG.mjs";
3
+ } from "./chunk-FJYYK3KF.mjs";
4
4
 
5
5
  // src/backend/adapters/fetch.ts
6
6
  function autumnHandler(options) {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createCoreHandler
3
- } from "./chunk-CFBX64LG.mjs";
3
+ } from "./chunk-FJYYK3KF.mjs";
4
4
 
5
5
  // src/backend/adapters/express.ts
6
6
  function autumnHandler(options) {