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
@@ -4116,6 +4116,7 @@ var RequestBody$outboundSchema = z16.pipe(
4116
4116
  eventName: z16.optional(z16.string()),
4117
4117
  value: z16.optional(z16.number()),
4118
4118
  properties: z16.optional(z16.record(z16.string(), z16.any())),
4119
+ idempotencyKey: z16.optional(z16.string()),
4119
4120
  timestamp: z16.optional(z16.int()),
4120
4121
  overageBehavior: z16.optional(BatchTrackOverageBehavior$outboundSchema),
4121
4122
  async: z16.optional(z16.boolean()),
@@ -4127,13 +4128,21 @@ var RequestBody$outboundSchema = z16.pipe(
4127
4128
  featureId: "feature_id",
4128
4129
  entityId: "entity_id",
4129
4130
  eventName: "event_name",
4131
+ idempotencyKey: "idempotency_key",
4130
4132
  overageBehavior: "overage_behavior"
4131
4133
  });
4132
4134
  })
4133
4135
  );
4134
- var BatchTrackResponse$inboundSchema = z16.object({
4136
+ var BatchTrackResponseBody2$inboundSchema = z16.object({
4135
4137
  success: literal3(true)
4136
4138
  });
4139
+ var BatchTrackResponseBody1$inboundSchema = z16.object({
4140
+ success: literal3(true)
4141
+ });
4142
+ var BatchTrackResponse$inboundSchema = smartUnion([
4143
+ z16.lazy(() => BatchTrackResponseBody1$inboundSchema),
4144
+ z16.lazy(() => BatchTrackResponseBody2$inboundSchema)
4145
+ ]);
4137
4146
 
4138
4147
  // ../sdk/src/models/billing-update-response.ts
4139
4148
  import * as z18 from "zod/v4-mini";
@@ -53310,6 +53319,7 @@ async function $do(client, request, options) {
53310
53319
  }
53311
53320
  const response = doResult.value;
53312
53321
  const [result] = await match(
53322
+ json(200, BatchTrackResponse$inboundSchema),
53313
53323
  json(202, BatchTrackResponse$inboundSchema),
53314
53324
  fail("4XX"),
53315
53325
  fail("5XX")
@@ -62146,7 +62156,7 @@ var Autumn = class extends ClientSDK {
62146
62156
  ));
62147
62157
  }
62148
62158
  /**
62149
- * 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.
62159
+ * 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.
62150
62160
  */
62151
62161
  async batchTrack(request, options) {
62152
62162
  return unwrapAsync(batchTrack(
@@ -10964,6 +10964,7 @@ var RequestBody$outboundSchema = z35.pipe(
10964
10964
  eventName: z35.optional(z35.string()),
10965
10965
  value: z35.optional(z35.number()),
10966
10966
  properties: z35.optional(z35.record(z35.string(), z35.any())),
10967
+ idempotencyKey: z35.optional(z35.string()),
10967
10968
  timestamp: z35.optional(z35.int()),
10968
10969
  overageBehavior: z35.optional(BatchTrackOverageBehavior$outboundSchema),
10969
10970
  async: z35.optional(z35.boolean()),
@@ -10975,13 +10976,21 @@ var RequestBody$outboundSchema = z35.pipe(
10975
10976
  featureId: "feature_id",
10976
10977
  entityId: "entity_id",
10977
10978
  eventName: "event_name",
10979
+ idempotencyKey: "idempotency_key",
10978
10980
  overageBehavior: "overage_behavior"
10979
10981
  });
10980
10982
  })
10981
10983
  );
10982
- var BatchTrackResponse$inboundSchema = z35.object({
10984
+ var BatchTrackResponseBody2$inboundSchema = z35.object({
10983
10985
  success: literal3(true)
10984
10986
  });
10987
+ var BatchTrackResponseBody1$inboundSchema = z35.object({
10988
+ success: literal3(true)
10989
+ });
10990
+ var BatchTrackResponse$inboundSchema = smartUnion([
10991
+ z35.lazy(() => BatchTrackResponseBody1$inboundSchema),
10992
+ z35.lazy(() => BatchTrackResponseBody2$inboundSchema)
10993
+ ]);
10985
10994
 
10986
10995
  // ../sdk/src/models/billing-update-response.ts
10987
10996
  var z37 = __toESM(require("zod/v4-mini"), 1);
@@ -60158,6 +60167,7 @@ async function $do(client, request, options) {
60158
60167
  }
60159
60168
  const response = doResult.value;
60160
60169
  const [result] = await match(
60170
+ json(200, BatchTrackResponse$inboundSchema),
60161
60171
  json(202, BatchTrackResponse$inboundSchema),
60162
60172
  fail("4XX"),
60163
60173
  fail("5XX")
@@ -68994,7 +69004,7 @@ var Autumn = class extends ClientSDK {
68994
69004
  ));
68995
69005
  }
68996
69006
  /**
68997
- * 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.
69007
+ * 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.
68998
69008
  */
68999
69009
  async batchTrack(request, options) {
69000
69010
  return unwrapAsync(batchTrack(
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-MODSHKUF.mjs";
5
5
  import {
6
6
  createHandleBetterAuthRoute
7
- } from "./chunk-Z56SHXX3.mjs";
7
+ } from "./chunk-EBLVOVTN.mjs";
8
8
  import "./chunk-J2WYVGHS.mjs";
9
9
  import "./chunk-H6C42YK7.mjs";
10
10
  import "./chunk-BT3EAYVW.mjs";
@@ -4135,6 +4135,7 @@ var RequestBody$outboundSchema = z16.pipe(
4135
4135
  eventName: z16.optional(z16.string()),
4136
4136
  value: z16.optional(z16.number()),
4137
4137
  properties: z16.optional(z16.record(z16.string(), z16.any())),
4138
+ idempotencyKey: z16.optional(z16.string()),
4138
4139
  timestamp: z16.optional(z16.int()),
4139
4140
  overageBehavior: z16.optional(BatchTrackOverageBehavior$outboundSchema),
4140
4141
  async: z16.optional(z16.boolean()),
@@ -4146,13 +4147,21 @@ var RequestBody$outboundSchema = z16.pipe(
4146
4147
  featureId: "feature_id",
4147
4148
  entityId: "entity_id",
4148
4149
  eventName: "event_name",
4150
+ idempotencyKey: "idempotency_key",
4149
4151
  overageBehavior: "overage_behavior"
4150
4152
  });
4151
4153
  })
4152
4154
  );
4153
- var BatchTrackResponse$inboundSchema = z16.object({
4155
+ var BatchTrackResponseBody2$inboundSchema = z16.object({
4154
4156
  success: literal3(true)
4155
4157
  });
4158
+ var BatchTrackResponseBody1$inboundSchema = z16.object({
4159
+ success: literal3(true)
4160
+ });
4161
+ var BatchTrackResponse$inboundSchema = smartUnion([
4162
+ z16.lazy(() => BatchTrackResponseBody1$inboundSchema),
4163
+ z16.lazy(() => BatchTrackResponseBody2$inboundSchema)
4164
+ ]);
4156
4165
 
4157
4166
  // ../sdk/src/models/billing-update-response.ts
4158
4167
  var z18 = __toESM(require("zod/v4-mini"), 1);
@@ -53329,6 +53338,7 @@ async function $do(client, request, options) {
53329
53338
  }
53330
53339
  const response = doResult.value;
53331
53340
  const [result] = await match(
53341
+ json(200, BatchTrackResponse$inboundSchema),
53332
53342
  json(202, BatchTrackResponse$inboundSchema),
53333
53343
  fail("4XX"),
53334
53344
  fail("5XX")
@@ -62165,7 +62175,7 @@ var Autumn = class extends ClientSDK {
62165
62175
  ));
62166
62176
  }
62167
62177
  /**
62168
- * 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.
62178
+ * 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.
62169
62179
  */
62170
62180
  async batchTrack(request, options) {
62171
62181
  return unwrapAsync(batchTrack(
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createHandleBetterAuthRoute
3
- } from "../chunk-Z56SHXX3.mjs";
3
+ } from "../chunk-EBLVOVTN.mjs";
4
4
  import "../chunk-J2WYVGHS.mjs";
5
5
  import "../chunk-H6C42YK7.mjs";
6
6
  import "../chunk-BT3EAYVW.mjs";
@@ -10968,6 +10968,7 @@ var RequestBody$outboundSchema = z35.pipe(
10968
10968
  eventName: z35.optional(z35.string()),
10969
10969
  value: z35.optional(z35.number()),
10970
10970
  properties: z35.optional(z35.record(z35.string(), z35.any())),
10971
+ idempotencyKey: z35.optional(z35.string()),
10971
10972
  timestamp: z35.optional(z35.int()),
10972
10973
  overageBehavior: z35.optional(BatchTrackOverageBehavior$outboundSchema),
10973
10974
  async: z35.optional(z35.boolean()),
@@ -10979,13 +10980,21 @@ var RequestBody$outboundSchema = z35.pipe(
10979
10980
  featureId: "feature_id",
10980
10981
  entityId: "entity_id",
10981
10982
  eventName: "event_name",
10983
+ idempotencyKey: "idempotency_key",
10982
10984
  overageBehavior: "overage_behavior"
10983
10985
  });
10984
10986
  })
10985
10987
  );
10986
- var BatchTrackResponse$inboundSchema = z35.object({
10988
+ var BatchTrackResponseBody2$inboundSchema = z35.object({
10987
10989
  success: literal3(true)
10988
10990
  });
10991
+ var BatchTrackResponseBody1$inboundSchema = z35.object({
10992
+ success: literal3(true)
10993
+ });
10994
+ var BatchTrackResponse$inboundSchema = smartUnion([
10995
+ z35.lazy(() => BatchTrackResponseBody1$inboundSchema),
10996
+ z35.lazy(() => BatchTrackResponseBody2$inboundSchema)
10997
+ ]);
10989
10998
 
10990
10999
  // ../sdk/src/models/billing-update-response.ts
10991
11000
  var z37 = __toESM(require("zod/v4-mini"), 1);
@@ -60162,6 +60171,7 @@ async function $do(client, request, options) {
60162
60171
  }
60163
60172
  const response = doResult.value;
60164
60173
  const [result] = await match(
60174
+ json(200, BatchTrackResponse$inboundSchema),
60165
60175
  json(202, BatchTrackResponse$inboundSchema),
60166
60176
  fail("4XX"),
60167
60177
  fail("5XX")
@@ -68998,7 +69008,7 @@ var Autumn = class extends ClientSDK {
68998
69008
  ));
68999
69009
  }
69000
69010
  /**
69001
- * 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.
69011
+ * 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.
69002
69012
  */
69003
69013
  async batchTrack(request, options) {
69004
69014
  return unwrapAsync(batchTrack(
@@ -4,7 +4,7 @@ import {
4
4
  } from "../chunk-MODSHKUF.mjs";
5
5
  import {
6
6
  createHandleBetterAuthRoute
7
- } from "../chunk-Z56SHXX3.mjs";
7
+ } from "../chunk-EBLVOVTN.mjs";
8
8
  import {
9
9
  resolveIdentityFromScope
10
10
  } from "../chunk-J2WYVGHS.mjs";