autumn-js 1.3.26 → 1.3.28

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 +12 -2
  2. package/dist/backend/adapters/express.mjs +5 -5
  3. package/dist/backend/adapters/fetch.js +12 -2
  4. package/dist/backend/adapters/fetch.mjs +5 -5
  5. package/dist/backend/adapters/hono.js +12 -2
  6. package/dist/backend/adapters/hono.mjs +5 -5
  7. package/dist/backend/adapters/index.js +12 -2
  8. package/dist/backend/adapters/index.mjs +8 -8
  9. package/dist/backend/adapters/next.js +12 -2
  10. package/dist/backend/adapters/next.mjs +5 -5
  11. package/dist/backend/{chunk-JEDV5ITW.mjs → chunk-746ER4JF.mjs} +12 -2
  12. package/dist/backend/{chunk-5CZ6DM4L.mjs → chunk-BQADVXTY.mjs} +1 -1
  13. package/dist/backend/{chunk-UEXBEEDA.mjs → chunk-FMYC62PB.mjs} +1 -1
  14. package/dist/backend/{chunk-ZIV7CUX3.mjs → chunk-MZAOYQT4.mjs} +1 -1
  15. package/dist/backend/{chunk-OJ2W47XG.mjs → chunk-QMG7DDIG.mjs} +1 -1
  16. package/dist/backend/{chunk-OHWJSFDY.mjs → chunk-RPS2BYZQ.mjs} +1 -1
  17. package/dist/backend/{chunk-TVYQMY4Y.mjs → chunk-Y4KIFJY4.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 +12 -2
  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 +12 -2
  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 +12 -2
  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 +12 -2
  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 +12 -2
  53. package/dist/backend/index.mjs +6 -6
  54. package/dist/backend/{routeTypes-DEdA0wMx.d.mts → routeTypes-CRMMAwhb.d.mts} +14 -3
  55. package/dist/backend/{routeTypes-DMd68zE-.d.ts → routeTypes-HV2JbO7a.d.ts} +14 -3
  56. package/dist/better-auth/{chunk-Z56SHXX3.mjs → chunk-EBLVOVTN.mjs} +12 -2
  57. package/dist/better-auth/index.js +12 -2
  58. package/dist/better-auth/index.mjs +1 -1
  59. package/dist/better-auth/utils/handleBetterAuthRoute.js +12 -2
  60. package/dist/better-auth/utils/handleBetterAuthRoute.mjs +1 -1
  61. package/dist/better-auth/utils/index.js +12 -2
  62. package/dist/better-auth/utils/index.mjs +1 -1
  63. package/dist/sdk/index.d.mts +22 -4
  64. package/dist/sdk/index.d.ts +22 -4
  65. package/dist/sdk/index.js +30 -2
  66. package/dist/sdk/index.mjs +27 -3
  67. package/package.json +2 -2
@@ -4134,6 +4134,7 @@ var RequestBody$outboundSchema = z16.pipe(
4134
4134
  eventName: z16.optional(z16.string()),
4135
4135
  value: z16.optional(z16.number()),
4136
4136
  properties: z16.optional(z16.record(z16.string(), z16.any())),
4137
+ idempotencyKey: z16.optional(z16.string()),
4137
4138
  timestamp: z16.optional(z16.int()),
4138
4139
  overageBehavior: z16.optional(BatchTrackOverageBehavior$outboundSchema),
4139
4140
  async: z16.optional(z16.boolean()),
@@ -4145,13 +4146,21 @@ var RequestBody$outboundSchema = z16.pipe(
4145
4146
  featureId: "feature_id",
4146
4147
  entityId: "entity_id",
4147
4148
  eventName: "event_name",
4149
+ idempotencyKey: "idempotency_key",
4148
4150
  overageBehavior: "overage_behavior"
4149
4151
  });
4150
4152
  })
4151
4153
  );
4152
- var BatchTrackResponse$inboundSchema = z16.object({
4154
+ var BatchTrackResponseBody2$inboundSchema = z16.object({
4153
4155
  success: literal3(true)
4154
4156
  });
4157
+ var BatchTrackResponseBody1$inboundSchema = z16.object({
4158
+ success: literal3(true)
4159
+ });
4160
+ var BatchTrackResponse$inboundSchema = smartUnion([
4161
+ z16.lazy(() => BatchTrackResponseBody1$inboundSchema),
4162
+ z16.lazy(() => BatchTrackResponseBody2$inboundSchema)
4163
+ ]);
4155
4164
 
4156
4165
  // ../sdk/src/models/billing-update-response.ts
4157
4166
  var z18 = __toESM(require("zod/v4-mini"), 1);
@@ -53328,6 +53337,7 @@ async function $do(client, request, options) {
53328
53337
  }
53329
53338
  const response = doResult.value;
53330
53339
  const [result] = await match(
53340
+ json(200, BatchTrackResponse$inboundSchema),
53331
53341
  json(202, BatchTrackResponse$inboundSchema),
53332
53342
  fail("4XX"),
53333
53343
  fail("5XX")
@@ -62164,7 +62174,7 @@ var Autumn = class extends ClientSDK {
62164
62174
  ));
62165
62175
  }
62166
62176
  /**
62167
- * Enqueue up to 1000 usage events for asynchronous processing. Items are validated synchronously up front; validated items are then enqueued via SQS for background deduction by workers. The response returns 202 immediately and does not include balance information. On partial enqueue failure (some items fail to enqueue, others succeed), the endpoint still returns 202 and logs the failures server-side; clients should NOT retry, because retrying re-enqueues the already-succeeded items. A 503 is returned only when zero items were successfully enqueued (queue entirely unavailable) — that case is safe to retry.
62177
+ * Enqueue up to 1000 usage events for asynchronous processing. Items are validated synchronously up front; validated items are then enqueued via SQS for background deduction by workers. The response returns 200 (or 202) immediately and does not include balance information. On partial enqueue failure (some items fail to enqueue, others succeed), the endpoint still returns 200 (or 202) and logs the failures server-side; clients should NOT retry, because retrying re-enqueues the already-succeeded items. A 503 is returned only when zero items were successfully enqueued (queue entirely unavailable) — that case is safe to retry.
62168
62178
  */
62169
62179
  async batchTrack(request, options) {
62170
62180
  return unwrapAsync(batchTrack(
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  handleRouteByName
3
- } from "../../chunk-ZIV7CUX3.mjs";
4
- import "../../chunk-JEDV5ITW.mjs";
3
+ } from "../../chunk-MZAOYQT4.mjs";
4
+ import "../../chunk-746ER4JF.mjs";
5
5
  import "../../chunk-MOHYGUMA.mjs";
6
6
  import "../../chunk-TBQ27LIK.mjs";
7
7
  import "../../chunk-J44WR3QZ.mjs";
8
8
  import "../../chunk-IQQQ5P6R.mjs";
9
9
  import "../../chunk-OTXV5FY7.mjs";
10
- import "../../chunk-I7CD6EB6.mjs";
11
10
  import "../../chunk-VZIMT7AO.mjs";
11
+ import "../../chunk-I7CD6EB6.mjs";
12
12
  import "../../chunk-N7NFYY54.mjs";
13
13
  export {
14
14
  handleRouteByName
@@ -5,7 +5,7 @@ export { handleRouteByName } from './handleRouteByName.mjs';
5
5
  export { resolveIdentity } from './resolveIdentity.mjs';
6
6
  import '../types/handlerTypes.mjs';
7
7
  import '../../authTypes-TPWTIfcM.mjs';
8
- import '../../routeTypes-DEdA0wMx.mjs';
8
+ import '../../routeTypes-CRMMAwhb.mjs';
9
9
  import 'zod/v4';
10
10
  import '../utils/sanitizeBody.mjs';
11
11
  import '../types/responseTypes.mjs';
@@ -5,7 +5,7 @@ export { handleRouteByName } from './handleRouteByName.js';
5
5
  export { resolveIdentity } from './resolveIdentity.js';
6
6
  import '../types/handlerTypes.js';
7
7
  import '../../authTypes-TPWTIfcM.js';
8
- import '../../routeTypes-DMd68zE-.js';
8
+ import '../../routeTypes-HV2JbO7a.js';
9
9
  import 'zod/v4';
10
10
  import '../utils/sanitizeBody.js';
11
11
  import '../types/responseTypes.js';
@@ -4138,6 +4138,7 @@ var RequestBody$outboundSchema = z16.pipe(
4138
4138
  eventName: z16.optional(z16.string()),
4139
4139
  value: z16.optional(z16.number()),
4140
4140
  properties: z16.optional(z16.record(z16.string(), z16.any())),
4141
+ idempotencyKey: z16.optional(z16.string()),
4141
4142
  timestamp: z16.optional(z16.int()),
4142
4143
  overageBehavior: z16.optional(BatchTrackOverageBehavior$outboundSchema),
4143
4144
  async: z16.optional(z16.boolean()),
@@ -4149,13 +4150,21 @@ var RequestBody$outboundSchema = z16.pipe(
4149
4150
  featureId: "feature_id",
4150
4151
  entityId: "entity_id",
4151
4152
  eventName: "event_name",
4153
+ idempotencyKey: "idempotency_key",
4152
4154
  overageBehavior: "overage_behavior"
4153
4155
  });
4154
4156
  })
4155
4157
  );
4156
- var BatchTrackResponse$inboundSchema = z16.object({
4158
+ var BatchTrackResponseBody2$inboundSchema = z16.object({
4157
4159
  success: literal3(true)
4158
4160
  });
4161
+ var BatchTrackResponseBody1$inboundSchema = z16.object({
4162
+ success: literal3(true)
4163
+ });
4164
+ var BatchTrackResponse$inboundSchema = smartUnion([
4165
+ z16.lazy(() => BatchTrackResponseBody1$inboundSchema),
4166
+ z16.lazy(() => BatchTrackResponseBody2$inboundSchema)
4167
+ ]);
4159
4168
 
4160
4169
  // ../sdk/src/models/billing-update-response.ts
4161
4170
  var z18 = __toESM(require("zod/v4-mini"), 1);
@@ -53332,6 +53341,7 @@ async function $do(client, request, options) {
53332
53341
  }
53333
53342
  const response = doResult.value;
53334
53343
  const [result] = await match(
53344
+ json(200, BatchTrackResponse$inboundSchema),
53335
53345
  json(202, BatchTrackResponse$inboundSchema),
53336
53346
  fail("4XX"),
53337
53347
  fail("5XX")
@@ -62168,7 +62178,7 @@ var Autumn = class extends ClientSDK {
62168
62178
  ));
62169
62179
  }
62170
62180
  /**
62171
- * Enqueue up to 1000 usage events for asynchronous processing. Items are validated synchronously up front; validated items are then enqueued via SQS for background deduction by workers. The response returns 202 immediately and does not include balance information. On partial enqueue failure (some items fail to enqueue, others succeed), the endpoint still returns 202 and logs the failures server-side; clients should NOT retry, because retrying re-enqueues the already-succeeded items. A 503 is returned only when zero items were successfully enqueued (queue entirely unavailable) — that case is safe to retry.
62181
+ * Enqueue up to 1000 usage events for asynchronous processing. Items are validated synchronously up front; validated items are then enqueued via SQS for background deduction by workers. The response returns 200 (or 202) immediately and does not include balance information. On partial enqueue failure (some items fail to enqueue, others succeed), the endpoint still returns 200 (or 202) and logs the failures server-side; clients should NOT retry, because retrying re-enqueues the already-succeeded items. A 503 is returned only when zero items were successfully enqueued (queue entirely unavailable) — that case is safe to retry.
62172
62182
  */
62173
62183
  async batchTrack(request, options) {
62174
62184
  return unwrapAsync(batchTrack(
@@ -1,11 +1,11 @@
1
1
  import "../../chunk-VXND2UDT.mjs";
2
- import {
3
- createCoreHandler
4
- } from "../../chunk-UEXBEEDA.mjs";
5
2
  import {
6
3
  handleRouteByName
7
- } from "../../chunk-ZIV7CUX3.mjs";
8
- import "../../chunk-JEDV5ITW.mjs";
4
+ } from "../../chunk-MZAOYQT4.mjs";
5
+ import {
6
+ createCoreHandler
7
+ } from "../../chunk-FMYC62PB.mjs";
8
+ import "../../chunk-746ER4JF.mjs";
9
9
  import {
10
10
  executeRoute
11
11
  } from "../../chunk-MOHYGUMA.mjs";
@@ -19,8 +19,8 @@ import "../../chunk-TSF4YCUO.mjs";
19
19
  import "../../chunk-UAR3TMWI.mjs";
20
20
  import "../../chunk-IQQQ5P6R.mjs";
21
21
  import "../../chunk-OTXV5FY7.mjs";
22
- import "../../chunk-I7CD6EB6.mjs";
23
22
  import "../../chunk-VZIMT7AO.mjs";
23
+ import "../../chunk-I7CD6EB6.mjs";
24
24
  import "../../chunk-N7NFYY54.mjs";
25
25
  export {
26
26
  createCoreHandler,
@@ -2,7 +2,7 @@ export { createCoreHandler } from './handlers/coreHandler.mjs';
2
2
  export { A as AuthResult, C as CustomerData, a as CustomerId, R as ResolvedIdentity } from '../authTypes-TPWTIfcM.mjs';
3
3
  export { CoreHandlerOptions, UnifiedRequest, UnifiedResponse } from './types/handlerTypes.mjs';
4
4
  export { BackendErrorBody, BackendResult } from './types/responseTypes.mjs';
5
- export { C as CustomHandlerArgs, a as CustomHandlerFn, R as RouteDefinition } from '../routeTypes-DEdA0wMx.mjs';
5
+ export { C as CustomHandlerArgs, a as CustomHandlerFn, R as RouteDefinition } from '../routeTypes-CRMMAwhb.mjs';
6
6
  export { HandleRouteByNameOptions, HandleRouteByNameResult, handleRouteByName } from './handlers/handleRouteByName.mjs';
7
7
  export { buildRouter } from './routes/routeBuilder.mjs';
8
8
  export { routeConfigs } from './routes/routeConfigs.mjs';
@@ -2,7 +2,7 @@ export { createCoreHandler } from './handlers/coreHandler.js';
2
2
  export { A as AuthResult, C as CustomerData, a as CustomerId, R as ResolvedIdentity } from '../authTypes-TPWTIfcM.js';
3
3
  export { CoreHandlerOptions, UnifiedRequest, UnifiedResponse } from './types/handlerTypes.js';
4
4
  export { BackendErrorBody, BackendResult } from './types/responseTypes.js';
5
- export { C as CustomHandlerArgs, a as CustomHandlerFn, R as RouteDefinition } from '../routeTypes-DMd68zE-.js';
5
+ export { C as CustomHandlerArgs, a as CustomHandlerFn, R as RouteDefinition } from '../routeTypes-HV2JbO7a.js';
6
6
  export { HandleRouteByNameOptions, HandleRouteByNameResult, handleRouteByName } from './handlers/handleRouteByName.js';
7
7
  export { buildRouter } from './routes/routeBuilder.js';
8
8
  export { routeConfigs } from './routes/routeConfigs.js';
@@ -4142,6 +4142,7 @@ var RequestBody$outboundSchema = z16.pipe(
4142
4142
  eventName: z16.optional(z16.string()),
4143
4143
  value: z16.optional(z16.number()),
4144
4144
  properties: z16.optional(z16.record(z16.string(), z16.any())),
4145
+ idempotencyKey: z16.optional(z16.string()),
4145
4146
  timestamp: z16.optional(z16.int()),
4146
4147
  overageBehavior: z16.optional(BatchTrackOverageBehavior$outboundSchema),
4147
4148
  async: z16.optional(z16.boolean()),
@@ -4153,13 +4154,21 @@ var RequestBody$outboundSchema = z16.pipe(
4153
4154
  featureId: "feature_id",
4154
4155
  entityId: "entity_id",
4155
4156
  eventName: "event_name",
4157
+ idempotencyKey: "idempotency_key",
4156
4158
  overageBehavior: "overage_behavior"
4157
4159
  });
4158
4160
  })
4159
4161
  );
4160
- var BatchTrackResponse$inboundSchema = z16.object({
4162
+ var BatchTrackResponseBody2$inboundSchema = z16.object({
4161
4163
  success: literal3(true)
4162
4164
  });
4165
+ var BatchTrackResponseBody1$inboundSchema = z16.object({
4166
+ success: literal3(true)
4167
+ });
4168
+ var BatchTrackResponse$inboundSchema = smartUnion([
4169
+ z16.lazy(() => BatchTrackResponseBody1$inboundSchema),
4170
+ z16.lazy(() => BatchTrackResponseBody2$inboundSchema)
4171
+ ]);
4163
4172
 
4164
4173
  // ../sdk/src/models/billing-update-response.ts
4165
4174
  var z18 = __toESM(require("zod/v4-mini"), 1);
@@ -53336,6 +53345,7 @@ async function $do(client, request, options) {
53336
53345
  }
53337
53346
  const response = doResult.value;
53338
53347
  const [result] = await match(
53348
+ json(200, BatchTrackResponse$inboundSchema),
53339
53349
  json(202, BatchTrackResponse$inboundSchema),
53340
53350
  fail("4XX"),
53341
53351
  fail("5XX")
@@ -62172,7 +62182,7 @@ var Autumn = class extends ClientSDK {
62172
62182
  ));
62173
62183
  }
62174
62184
  /**
62175
- * Enqueue up to 1000 usage events for asynchronous processing. Items are validated synchronously up front; validated items are then enqueued via SQS for background deduction by workers. The response returns 202 immediately and does not include balance information. On partial enqueue failure (some items fail to enqueue, others succeed), the endpoint still returns 202 and logs the failures server-side; clients should NOT retry, because retrying re-enqueues the already-succeeded items. A 503 is returned only when zero items were successfully enqueued (queue entirely unavailable) — that case is safe to retry.
62185
+ * Enqueue up to 1000 usage events for asynchronous processing. Items are validated synchronously up front; validated items are then enqueued via SQS for background deduction by workers. The response returns 200 (or 202) immediately and does not include balance information. On partial enqueue failure (some items fail to enqueue, others succeed), the endpoint still returns 200 (or 202) and logs the failures server-side; clients should NOT retry, because retrying re-enqueues the already-succeeded items. A 503 is returned only when zero items were successfully enqueued (queue entirely unavailable) — that case is safe to retry.
62176
62186
  */
62177
62187
  async batchTrack(request, options) {
62178
62188
  return unwrapAsync(batchTrack(
@@ -1,12 +1,12 @@
1
1
  import "../chunk-WYDGEDEU.mjs";
2
2
  import "../chunk-VXND2UDT.mjs";
3
- import {
4
- createCoreHandler
5
- } from "../chunk-UEXBEEDA.mjs";
6
3
  import {
7
4
  handleRouteByName
8
- } from "../chunk-ZIV7CUX3.mjs";
9
- import "../chunk-JEDV5ITW.mjs";
5
+ } from "../chunk-MZAOYQT4.mjs";
6
+ import {
7
+ createCoreHandler
8
+ } from "../chunk-FMYC62PB.mjs";
9
+ import "../chunk-746ER4JF.mjs";
10
10
  import "../chunk-MOHYGUMA.mjs";
11
11
  import "../chunk-TBQ27LIK.mjs";
12
12
  import "../chunk-J44WR3QZ.mjs";
@@ -18,12 +18,12 @@ import {
18
18
  routeConfigs
19
19
  } from "../chunk-IQQQ5P6R.mjs";
20
20
  import "../chunk-OTXV5FY7.mjs";
21
- import {
22
- sanitizeBody
23
- } from "../chunk-I7CD6EB6.mjs";
24
21
  import {
25
22
  secretKeyCheck
26
23
  } from "../chunk-VZIMT7AO.mjs";
24
+ import {
25
+ sanitizeBody
26
+ } from "../chunk-I7CD6EB6.mjs";
27
27
  import {
28
28
  backendError,
29
29
  backendSuccess,
@@ -1,7 +1,7 @@
1
1
  export { RouteMatch, buildRouter } from './routeBuilder.mjs';
2
2
  export { routeConfigs } from './routeConfigs.mjs';
3
3
  import 'rou3';
4
- import '../../routeTypes-DEdA0wMx.mjs';
4
+ import '../../routeTypes-CRMMAwhb.mjs';
5
5
  import '../../authTypes-TPWTIfcM.mjs';
6
6
  import 'zod/v4';
7
7
  import '../utils/sanitizeBody.mjs';
@@ -1,7 +1,7 @@
1
1
  export { RouteMatch, buildRouter } from './routeBuilder.js';
2
2
  export { routeConfigs } from './routeConfigs.js';
3
3
  import 'rou3';
4
- import '../../routeTypes-DMd68zE-.js';
4
+ import '../../routeTypes-HV2JbO7a.js';
5
5
  import '../../authTypes-TPWTIfcM.js';
6
6
  import 'zod/v4';
7
7
  import '../utils/sanitizeBody.js';
@@ -6,8 +6,8 @@ import {
6
6
  routeConfigs
7
7
  } from "../../chunk-IQQQ5P6R.mjs";
8
8
  import "../../chunk-OTXV5FY7.mjs";
9
- import "../../chunk-I7CD6EB6.mjs";
10
9
  import "../../chunk-VZIMT7AO.mjs";
10
+ import "../../chunk-I7CD6EB6.mjs";
11
11
  import "../../chunk-N7NFYY54.mjs";
12
12
  export {
13
13
  buildRouter,
@@ -1,5 +1,5 @@
1
1
  import { RouterContext } from 'rou3';
2
- import { R as RouteDefinition } from '../../routeTypes-DEdA0wMx.mjs';
2
+ import { R as RouteDefinition } from '../../routeTypes-CRMMAwhb.mjs';
3
3
  import '../../authTypes-TPWTIfcM.mjs';
4
4
  import 'zod/v4';
5
5
  import '../utils/sanitizeBody.mjs';
@@ -1,5 +1,5 @@
1
1
  import { RouterContext } from 'rou3';
2
- import { R as RouteDefinition } from '../../routeTypes-DMd68zE-.js';
2
+ import { R as RouteDefinition } from '../../routeTypes-HV2JbO7a.js';
3
3
  import '../../authTypes-TPWTIfcM.js';
4
4
  import 'zod/v4';
5
5
  import '../utils/sanitizeBody.js';
@@ -1,4 +1,4 @@
1
- import { R as RouteDefinition, b as RouteName } from '../../routeTypes-DEdA0wMx.mjs';
1
+ import { R as RouteDefinition, b as RouteName } from '../../routeTypes-CRMMAwhb.mjs';
2
2
  import '../../authTypes-TPWTIfcM.mjs';
3
3
  import 'zod/v4';
4
4
  import '../utils/sanitizeBody.mjs';
@@ -1,4 +1,4 @@
1
- import { R as RouteDefinition, b as RouteName } from '../../routeTypes-DMd68zE-.js';
1
+ import { R as RouteDefinition, b as RouteName } from '../../routeTypes-HV2JbO7a.js';
2
2
  import '../../authTypes-TPWTIfcM.js';
3
3
  import 'zod/v4';
4
4
  import '../utils/sanitizeBody.js';
@@ -2,8 +2,8 @@ import {
2
2
  routeConfigs
3
3
  } from "../../chunk-IQQQ5P6R.mjs";
4
4
  import "../../chunk-OTXV5FY7.mjs";
5
- import "../../chunk-I7CD6EB6.mjs";
6
5
  import "../../chunk-VZIMT7AO.mjs";
6
+ import "../../chunk-I7CD6EB6.mjs";
7
7
  import "../../chunk-N7NFYY54.mjs";
8
8
  export {
9
9
  routeConfigs
@@ -1,5 +1,5 @@
1
1
  import { A as AuthResult } from '../../authTypes-TPWTIfcM.mjs';
2
- import { R as RouteDefinition } from '../../routeTypes-DEdA0wMx.mjs';
2
+ import { R as RouteDefinition } from '../../routeTypes-CRMMAwhb.mjs';
3
3
  import './responseTypes.mjs';
4
4
  import 'zod/v4';
5
5
  import '../utils/sanitizeBody.mjs';
@@ -1,5 +1,5 @@
1
1
  import { A as AuthResult } from '../../authTypes-TPWTIfcM.js';
2
- import { R as RouteDefinition } from '../../routeTypes-DMd68zE-.js';
2
+ import { R as RouteDefinition } from '../../routeTypes-HV2JbO7a.js';
3
3
  import './responseTypes.js';
4
4
  import 'zod/v4';
5
5
  import '../utils/sanitizeBody.js';
@@ -1,6 +1,6 @@
1
1
  export { A as AuthResult, C as CustomerData, a as CustomerId, R as ResolvedIdentity } from '../../authTypes-TPWTIfcM.mjs';
2
2
  export { CoreHandlerOptions, UnifiedRequest, UnifiedResponse } from './handlerTypes.mjs';
3
3
  export { BackendErrorBody, BackendResult } from './responseTypes.mjs';
4
- export { C as CustomHandlerArgs, a as CustomHandlerFn, c as ROUTE_NAMES, R as RouteDefinition, b as RouteName } from '../../routeTypes-DEdA0wMx.mjs';
4
+ export { C as CustomHandlerArgs, a as CustomHandlerFn, c as ROUTE_NAMES, R as RouteDefinition, b as RouteName } from '../../routeTypes-CRMMAwhb.mjs';
5
5
  import 'zod/v4';
6
6
  import '../utils/sanitizeBody.mjs';
@@ -1,6 +1,6 @@
1
1
  export { A as AuthResult, C as CustomerData, a as CustomerId, R as ResolvedIdentity } from '../../authTypes-TPWTIfcM.js';
2
2
  export { CoreHandlerOptions, UnifiedRequest, UnifiedResponse } from './handlerTypes.js';
3
3
  export { BackendErrorBody, BackendResult } from './responseTypes.js';
4
- export { C as CustomHandlerArgs, a as CustomHandlerFn, c as ROUTE_NAMES, R as RouteDefinition, b as RouteName } from '../../routeTypes-DMd68zE-.js';
4
+ export { C as CustomHandlerArgs, a as CustomHandlerFn, c as ROUTE_NAMES, R as RouteDefinition, b as RouteName } from '../../routeTypes-HV2JbO7a.js';
5
5
  import 'zod/v4';
6
6
  import '../utils/sanitizeBody.js';
@@ -1,4 +1,4 @@
1
- export { C as CustomHandlerArgs, a as CustomHandlerFn, c as ROUTE_NAMES, R as RouteDefinition, b as RouteName } from '../../routeTypes-DEdA0wMx.mjs';
1
+ export { C as CustomHandlerArgs, a as CustomHandlerFn, c as ROUTE_NAMES, R as RouteDefinition, b as RouteName } from '../../routeTypes-CRMMAwhb.mjs';
2
2
  import 'zod/v4';
3
3
  import '../utils/sanitizeBody.mjs';
4
4
  import '../../authTypes-TPWTIfcM.mjs';
@@ -1,4 +1,4 @@
1
- export { C as CustomHandlerArgs, a as CustomHandlerFn, c as ROUTE_NAMES, R as RouteDefinition, b as RouteName } from '../../routeTypes-DMd68zE-.js';
1
+ export { C as CustomHandlerArgs, a as CustomHandlerFn, c as ROUTE_NAMES, R as RouteDefinition, b as RouteName } from '../../routeTypes-HV2JbO7a.js';
2
2
  import 'zod/v4';
3
3
  import '../utils/sanitizeBody.js';
4
4
  import '../../authTypes-TPWTIfcM.js';
@@ -1,12 +1,12 @@
1
1
  import "../../chunk-OTXV5FY7.mjs";
2
+ import {
3
+ secretKeyCheck
4
+ } from "../../chunk-VZIMT7AO.mjs";
2
5
  import {
3
6
  CUSTOMER_PROTECTED_BODY_FIELDS,
4
7
  DEFAULT_PROTECTED_BODY_FIELDS,
5
8
  sanitizeBody
6
9
  } from "../../chunk-I7CD6EB6.mjs";
7
- import {
8
- secretKeyCheck
9
- } from "../../chunk-VZIMT7AO.mjs";
10
10
  import {
11
11
  backendError,
12
12
  backendSuccess,
@@ -3,8 +3,8 @@ import { C as CustomerData } from './authTypes-TPWTIfcM.mjs';
3
3
  export { A as AuthResult, a as CustomerId, R as ResolvedIdentity } from './authTypes-TPWTIfcM.mjs';
4
4
  export { CoreHandlerOptions, UnifiedRequest, UnifiedResponse } from './core/types/handlerTypes.mjs';
5
5
  export { BackendErrorBody, BackendResult } from './core/types/responseTypes.mjs';
6
- import { R as RouteDefinition } from './routeTypes-DEdA0wMx.mjs';
7
- export { C as CustomHandlerArgs, a as CustomHandlerFn } from './routeTypes-DEdA0wMx.mjs';
6
+ import { R as RouteDefinition } from './routeTypes-CRMMAwhb.mjs';
7
+ export { C as CustomHandlerArgs, a as CustomHandlerFn } from './routeTypes-CRMMAwhb.mjs';
8
8
  export { buildRouter } from './core/routes/routeBuilder.mjs';
9
9
  export { routeConfigs } from './core/routes/routeConfigs.mjs';
10
10
  export { secretKeyCheck } from './core/utils/secretKeyCheck.mjs';
@@ -3,8 +3,8 @@ import { C as CustomerData } from './authTypes-TPWTIfcM.js';
3
3
  export { A as AuthResult, a as CustomerId, R as ResolvedIdentity } from './authTypes-TPWTIfcM.js';
4
4
  export { CoreHandlerOptions, UnifiedRequest, UnifiedResponse } from './core/types/handlerTypes.js';
5
5
  export { BackendErrorBody, BackendResult } from './core/types/responseTypes.js';
6
- import { R as RouteDefinition } from './routeTypes-DMd68zE-.js';
7
- export { C as CustomHandlerArgs, a as CustomHandlerFn } from './routeTypes-DMd68zE-.js';
6
+ import { R as RouteDefinition } from './routeTypes-HV2JbO7a.js';
7
+ export { C as CustomHandlerArgs, a as CustomHandlerFn } from './routeTypes-HV2JbO7a.js';
8
8
  export { buildRouter } from './core/routes/routeBuilder.js';
9
9
  export { routeConfigs } from './core/routes/routeConfigs.js';
10
10
  export { secretKeyCheck } from './core/utils/secretKeyCheck.js';
@@ -4142,6 +4142,7 @@ var RequestBody$outboundSchema = z16.pipe(
4142
4142
  eventName: z16.optional(z16.string()),
4143
4143
  value: z16.optional(z16.number()),
4144
4144
  properties: z16.optional(z16.record(z16.string(), z16.any())),
4145
+ idempotencyKey: z16.optional(z16.string()),
4145
4146
  timestamp: z16.optional(z16.int()),
4146
4147
  overageBehavior: z16.optional(BatchTrackOverageBehavior$outboundSchema),
4147
4148
  async: z16.optional(z16.boolean()),
@@ -4153,13 +4154,21 @@ var RequestBody$outboundSchema = z16.pipe(
4153
4154
  featureId: "feature_id",
4154
4155
  entityId: "entity_id",
4155
4156
  eventName: "event_name",
4157
+ idempotencyKey: "idempotency_key",
4156
4158
  overageBehavior: "overage_behavior"
4157
4159
  });
4158
4160
  })
4159
4161
  );
4160
- var BatchTrackResponse$inboundSchema = z16.object({
4162
+ var BatchTrackResponseBody2$inboundSchema = z16.object({
4161
4163
  success: literal3(true)
4162
4164
  });
4165
+ var BatchTrackResponseBody1$inboundSchema = z16.object({
4166
+ success: literal3(true)
4167
+ });
4168
+ var BatchTrackResponse$inboundSchema = smartUnion([
4169
+ z16.lazy(() => BatchTrackResponseBody1$inboundSchema),
4170
+ z16.lazy(() => BatchTrackResponseBody2$inboundSchema)
4171
+ ]);
4163
4172
 
4164
4173
  // ../sdk/src/models/billing-update-response.ts
4165
4174
  var z18 = __toESM(require("zod/v4-mini"), 1);
@@ -53336,6 +53345,7 @@ async function $do(client, request, options) {
53336
53345
  }
53337
53346
  const response = doResult.value;
53338
53347
  const [result] = await match(
53348
+ json(200, BatchTrackResponse$inboundSchema),
53339
53349
  json(202, BatchTrackResponse$inboundSchema),
53340
53350
  fail("4XX"),
53341
53351
  fail("5XX")
@@ -62172,7 +62182,7 @@ var Autumn = class extends ClientSDK {
62172
62182
  ));
62173
62183
  }
62174
62184
  /**
62175
- * Enqueue up to 1000 usage events for asynchronous processing. Items are validated synchronously up front; validated items are then enqueued via SQS for background deduction by workers. The response returns 202 immediately and does not include balance information. On partial enqueue failure (some items fail to enqueue, others succeed), the endpoint still returns 202 and logs the failures server-side; clients should NOT retry, because retrying re-enqueues the already-succeeded items. A 503 is returned only when zero items were successfully enqueued (queue entirely unavailable) — that case is safe to retry.
62185
+ * Enqueue up to 1000 usage events for asynchronous processing. Items are validated synchronously up front; validated items are then enqueued via SQS for background deduction by workers. The response returns 200 (or 202) immediately and does not include balance information. On partial enqueue failure (some items fail to enqueue, others succeed), the endpoint still returns 200 (or 202) and logs the failures server-side; clients should NOT retry, because retrying re-enqueues the already-succeeded items. A 503 is returned only when zero items were successfully enqueued (queue entirely unavailable) — that case is safe to retry.
62176
62186
  */
62177
62187
  async batchTrack(request, options) {
62178
62188
  return unwrapAsync(batchTrack(
@@ -1,10 +1,10 @@
1
1
  import "./chunk-WYDGEDEU.mjs";
2
2
  import "./chunk-VXND2UDT.mjs";
3
+ import "./chunk-MZAOYQT4.mjs";
3
4
  import {
4
5
  createCoreHandler
5
- } from "./chunk-UEXBEEDA.mjs";
6
- import "./chunk-ZIV7CUX3.mjs";
7
- import "./chunk-JEDV5ITW.mjs";
6
+ } from "./chunk-FMYC62PB.mjs";
7
+ import "./chunk-746ER4JF.mjs";
8
8
  import "./chunk-MOHYGUMA.mjs";
9
9
  import "./chunk-TBQ27LIK.mjs";
10
10
  import "./chunk-J44WR3QZ.mjs";
@@ -16,12 +16,12 @@ import {
16
16
  routeConfigs
17
17
  } from "./chunk-IQQQ5P6R.mjs";
18
18
  import "./chunk-OTXV5FY7.mjs";
19
- import {
20
- sanitizeBody
21
- } from "./chunk-I7CD6EB6.mjs";
22
19
  import {
23
20
  secretKeyCheck
24
21
  } from "./chunk-VZIMT7AO.mjs";
22
+ import {
23
+ sanitizeBody
24
+ } from "./chunk-I7CD6EB6.mjs";
25
25
  import {
26
26
  backendError,
27
27
  backendSuccess,
@@ -3448,6 +3448,10 @@ type RequestBody = {
3448
3448
  properties?: {
3449
3449
  [k: string]: any;
3450
3450
  } | undefined;
3451
+ /**
3452
+ * Deduplicates this item: a second track with the same key within 24 hours is ignored.
3453
+ */
3454
+ idempotencyKey?: string | undefined;
3451
3455
  /**
3452
3456
  * Unix timestamp in milliseconds to use for the usage event. Defaults to the current time.
3453
3457
  */
@@ -3463,11 +3467,18 @@ type RequestBody = {
3463
3467
  lock?: BatchTrackLock | undefined;
3464
3468
  };
3465
3469
  /**
3466
- * Batch accepted. All items passed synchronous validation. Enqueue is best-effort: partial failures (some items enqueued, some not) are logged server-side and are NOT surfaced in the response body; clients must not retry on 202. See the endpoint description for full partial-failure semantics.
3470
+ * Batch accepted. All items passed synchronous validation. Enqueue is best-effort: partial failures (some items enqueued, some not) are logged server-side and are NOT surfaced in the response body; clients must not retry on success. See the endpoint description for full partial-failure semantics.
3471
+ */
3472
+ type BatchTrackResponseBody2 = {
3473
+ success: true;
3474
+ };
3475
+ /**
3476
+ * OK
3467
3477
  */
3468
- type BatchTrackResponse = {
3478
+ type BatchTrackResponseBody1 = {
3469
3479
  success: true;
3470
3480
  };
3481
+ type BatchTrackResponse = BatchTrackResponseBody1 | BatchTrackResponseBody2;
3471
3482
 
3472
3483
  /**
3473
3484
  * Quantity configuration for a prepaid feature.
@@ -63696,7 +63707,7 @@ declare class Autumn extends ClientSDK {
63696
63707
  */
63697
63708
  trackTokens(request: TrackTokensParams, options?: RequestOptions): Promise<TrackTokensResponse>;
63698
63709
  /**
63699
- * Enqueue up to 1000 usage events for asynchronous processing. Items are validated synchronously up front; validated items are then enqueued via SQS for background deduction by workers. The response returns 202 immediately and does not include balance information. On partial enqueue failure (some items fail to enqueue, others succeed), the endpoint still returns 202 and logs the failures server-side; clients should NOT retry, because retrying re-enqueues the already-succeeded items. A 503 is returned only when zero items were successfully enqueued (queue entirely unavailable) — that case is safe to retry.
63710
+ * Enqueue up to 1000 usage events for asynchronous processing. Items are validated synchronously up front; validated items are then enqueued via SQS for background deduction by workers. The response returns 200 (or 202) immediately and does not include balance information. On partial enqueue failure (some items fail to enqueue, others succeed), the endpoint still returns 200 (or 202) and logs the failures server-side; clients should NOT retry, because retrying re-enqueues the already-succeeded items. A 503 is returned only when zero items were successfully enqueued (queue entirely unavailable) — that case is safe to retry.
63700
63711
  */
63701
63712
  batchTrack(request: Array<RequestBody>, options?: RequestOptions): Promise<BatchTrackResponse>;
63702
63713
  }
@@ -3448,6 +3448,10 @@ type RequestBody = {
3448
3448
  properties?: {
3449
3449
  [k: string]: any;
3450
3450
  } | undefined;
3451
+ /**
3452
+ * Deduplicates this item: a second track with the same key within 24 hours is ignored.
3453
+ */
3454
+ idempotencyKey?: string | undefined;
3451
3455
  /**
3452
3456
  * Unix timestamp in milliseconds to use for the usage event. Defaults to the current time.
3453
3457
  */
@@ -3463,11 +3467,18 @@ type RequestBody = {
3463
3467
  lock?: BatchTrackLock | undefined;
3464
3468
  };
3465
3469
  /**
3466
- * Batch accepted. All items passed synchronous validation. Enqueue is best-effort: partial failures (some items enqueued, some not) are logged server-side and are NOT surfaced in the response body; clients must not retry on 202. See the endpoint description for full partial-failure semantics.
3470
+ * Batch accepted. All items passed synchronous validation. Enqueue is best-effort: partial failures (some items enqueued, some not) are logged server-side and are NOT surfaced in the response body; clients must not retry on success. See the endpoint description for full partial-failure semantics.
3471
+ */
3472
+ type BatchTrackResponseBody2 = {
3473
+ success: true;
3474
+ };
3475
+ /**
3476
+ * OK
3467
3477
  */
3468
- type BatchTrackResponse = {
3478
+ type BatchTrackResponseBody1 = {
3469
3479
  success: true;
3470
3480
  };
3481
+ type BatchTrackResponse = BatchTrackResponseBody1 | BatchTrackResponseBody2;
3471
3482
 
3472
3483
  /**
3473
3484
  * Quantity configuration for a prepaid feature.
@@ -63696,7 +63707,7 @@ declare class Autumn extends ClientSDK {
63696
63707
  */
63697
63708
  trackTokens(request: TrackTokensParams, options?: RequestOptions): Promise<TrackTokensResponse>;
63698
63709
  /**
63699
- * Enqueue up to 1000 usage events for asynchronous processing. Items are validated synchronously up front; validated items are then enqueued via SQS for background deduction by workers. The response returns 202 immediately and does not include balance information. On partial enqueue failure (some items fail to enqueue, others succeed), the endpoint still returns 202 and logs the failures server-side; clients should NOT retry, because retrying re-enqueues the already-succeeded items. A 503 is returned only when zero items were successfully enqueued (queue entirely unavailable) — that case is safe to retry.
63710
+ * Enqueue up to 1000 usage events for asynchronous processing. Items are validated synchronously up front; validated items are then enqueued via SQS for background deduction by workers. The response returns 200 (or 202) immediately and does not include balance information. On partial enqueue failure (some items fail to enqueue, others succeed), the endpoint still returns 200 (or 202) and logs the failures server-side; clients should NOT retry, because retrying re-enqueues the already-succeeded items. A 503 is returned only when zero items were successfully enqueued (queue entirely unavailable) — that case is safe to retry.
63700
63711
  */
63701
63712
  batchTrack(request: Array<RequestBody>, options?: RequestOptions): Promise<BatchTrackResponse>;
63702
63713
  }