autumn-js 1.3.27 → 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.
- package/dist/backend/adapters/express.js +12 -2
- package/dist/backend/adapters/express.mjs +9 -9
- package/dist/backend/adapters/fetch.js +12 -2
- package/dist/backend/adapters/fetch.mjs +9 -9
- package/dist/backend/adapters/hono.js +12 -2
- package/dist/backend/adapters/hono.mjs +9 -9
- package/dist/backend/adapters/index.js +12 -2
- package/dist/backend/adapters/index.mjs +12 -12
- package/dist/backend/adapters/next.js +12 -2
- package/dist/backend/adapters/next.mjs +9 -9
- package/dist/backend/{chunk-JEDV5ITW.mjs → chunk-746ER4JF.mjs} +12 -2
- package/dist/backend/{chunk-RV6S5BLJ.mjs → chunk-BQADVXTY.mjs} +1 -1
- package/dist/backend/{chunk-EARUIF5Q.mjs → chunk-FMYC62PB.mjs} +7 -7
- package/dist/backend/{chunk-GQ5KLVRT.mjs → chunk-MZAOYQT4.mjs} +5 -5
- package/dist/backend/{chunk-BMOQW4NQ.mjs → chunk-QMG7DDIG.mjs} +1 -1
- package/dist/backend/{chunk-SLKIMK3F.mjs → chunk-RPS2BYZQ.mjs} +1 -1
- package/dist/backend/{chunk-OGY6VQFQ.mjs → chunk-Y4KIFJY4.mjs} +1 -1
- package/dist/backend/core/handlers/coreHandler.d.mts +1 -1
- package/dist/backend/core/handlers/coreHandler.d.ts +1 -1
- package/dist/backend/core/handlers/coreHandler.js +12 -2
- package/dist/backend/core/handlers/coreHandler.mjs +7 -7
- package/dist/backend/core/handlers/executeRoute.d.mts +1 -1
- package/dist/backend/core/handlers/executeRoute.d.ts +1 -1
- package/dist/backend/core/handlers/executeRoute.mjs +2 -2
- package/dist/backend/core/handlers/handleRouteByName.js +12 -2
- package/dist/backend/core/handlers/handleRouteByName.mjs +5 -5
- package/dist/backend/core/handlers/index.d.mts +1 -1
- package/dist/backend/core/handlers/index.d.ts +1 -1
- package/dist/backend/core/handlers/index.js +12 -2
- package/dist/backend/core/handlers/index.mjs +8 -8
- package/dist/backend/core/index.d.mts +1 -1
- package/dist/backend/core/index.d.ts +1 -1
- package/dist/backend/core/index.js +12 -2
- package/dist/backend/core/index.mjs +10 -10
- package/dist/backend/core/routes/index.d.mts +1 -1
- package/dist/backend/core/routes/index.d.ts +1 -1
- package/dist/backend/core/routes/index.mjs +2 -2
- package/dist/backend/core/routes/routeBuilder.d.mts +1 -1
- package/dist/backend/core/routes/routeBuilder.d.ts +1 -1
- package/dist/backend/core/routes/routeConfigs.d.mts +1 -1
- package/dist/backend/core/routes/routeConfigs.d.ts +1 -1
- package/dist/backend/core/routes/routeConfigs.mjs +2 -2
- package/dist/backend/core/types/handlerTypes.d.mts +1 -1
- package/dist/backend/core/types/handlerTypes.d.ts +1 -1
- package/dist/backend/core/types/index.d.mts +1 -1
- package/dist/backend/core/types/index.d.ts +1 -1
- package/dist/backend/core/types/routeTypes.d.mts +1 -1
- package/dist/backend/core/types/routeTypes.d.ts +1 -1
- package/dist/backend/core/utils/index.mjs +5 -5
- package/dist/backend/index.d.mts +2 -2
- package/dist/backend/index.d.ts +2 -2
- package/dist/backend/index.js +12 -2
- package/dist/backend/index.mjs +10 -10
- package/dist/backend/{routeTypes-DEdA0wMx.d.mts → routeTypes-CRMMAwhb.d.mts} +14 -3
- package/dist/backend/{routeTypes-DMd68zE-.d.ts → routeTypes-HV2JbO7a.d.ts} +14 -3
- package/dist/better-auth/{chunk-Z56SHXX3.mjs → chunk-EBLVOVTN.mjs} +12 -2
- package/dist/better-auth/index.js +12 -2
- package/dist/better-auth/index.mjs +1 -1
- package/dist/better-auth/utils/handleBetterAuthRoute.js +12 -2
- package/dist/better-auth/utils/handleBetterAuthRoute.mjs +1 -1
- package/dist/better-auth/utils/index.js +12 -2
- package/dist/better-auth/utils/index.mjs +1 -1
- package/dist/sdk/index.d.mts +22 -4
- package/dist/sdk/index.d.ts +22 -4
- package/dist/sdk/index.js +30 -2
- package/dist/sdk/index.mjs +27 -3
- package/package.json +2 -2
- package/dist/backend/{chunk-G3VGTFCP.mjs → chunk-IQQQ5P6R.mjs} +4 -4
- package/dist/backend/{chunk-OVAKKRI6.mjs → chunk-MOHYGUMA.mjs} +3 -3
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
executeRoute
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-MOHYGUMA.mjs";
|
|
4
4
|
import "../../chunk-TBQ27LIK.mjs";
|
|
5
5
|
import "../../chunk-J44WR3QZ.mjs";
|
|
6
6
|
import "../../chunk-OTXV5FY7.mjs";
|
|
7
7
|
import "../../chunk-VZIMT7AO.mjs";
|
|
8
|
-
import "../../chunk-N7NFYY54.mjs";
|
|
9
8
|
import "../../chunk-I7CD6EB6.mjs";
|
|
9
|
+
import "../../chunk-N7NFYY54.mjs";
|
|
10
10
|
export {
|
|
11
11
|
executeRoute
|
|
12
12
|
};
|
|
@@ -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
|
|
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,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
handleRouteByName
|
|
3
|
-
} from "../../chunk-
|
|
4
|
-
import "../../chunk-
|
|
5
|
-
import "../../chunk-
|
|
6
|
-
import "../../chunk-OVAKKRI6.mjs";
|
|
3
|
+
} from "../../chunk-MZAOYQT4.mjs";
|
|
4
|
+
import "../../chunk-746ER4JF.mjs";
|
|
5
|
+
import "../../chunk-MOHYGUMA.mjs";
|
|
7
6
|
import "../../chunk-TBQ27LIK.mjs";
|
|
8
7
|
import "../../chunk-J44WR3QZ.mjs";
|
|
8
|
+
import "../../chunk-IQQQ5P6R.mjs";
|
|
9
9
|
import "../../chunk-OTXV5FY7.mjs";
|
|
10
10
|
import "../../chunk-VZIMT7AO.mjs";
|
|
11
|
-
import "../../chunk-N7NFYY54.mjs";
|
|
12
11
|
import "../../chunk-I7CD6EB6.mjs";
|
|
12
|
+
import "../../chunk-N7NFYY54.mjs";
|
|
13
13
|
export {
|
|
14
14
|
handleRouteByName
|
|
15
15
|
};
|
|
@@ -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-
|
|
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-
|
|
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
|
|
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,27 +1,27 @@
|
|
|
1
1
|
import "../../chunk-VXND2UDT.mjs";
|
|
2
2
|
import {
|
|
3
3
|
handleRouteByName
|
|
4
|
-
} from "../../chunk-
|
|
4
|
+
} from "../../chunk-MZAOYQT4.mjs";
|
|
5
5
|
import {
|
|
6
6
|
createCoreHandler
|
|
7
|
-
} from "../../chunk-
|
|
8
|
-
import "../../chunk-
|
|
9
|
-
import "../../chunk-UAR3TMWI.mjs";
|
|
10
|
-
import "../../chunk-JEDV5ITW.mjs";
|
|
11
|
-
import "../../chunk-G3VGTFCP.mjs";
|
|
7
|
+
} from "../../chunk-FMYC62PB.mjs";
|
|
8
|
+
import "../../chunk-746ER4JF.mjs";
|
|
12
9
|
import {
|
|
13
10
|
executeRoute
|
|
14
|
-
} from "../../chunk-
|
|
11
|
+
} from "../../chunk-MOHYGUMA.mjs";
|
|
15
12
|
import {
|
|
16
13
|
resolveIdentity
|
|
17
14
|
} from "../../chunk-TBQ27LIK.mjs";
|
|
18
15
|
import {
|
|
19
16
|
transformSdkError
|
|
20
17
|
} from "../../chunk-J44WR3QZ.mjs";
|
|
18
|
+
import "../../chunk-TSF4YCUO.mjs";
|
|
19
|
+
import "../../chunk-UAR3TMWI.mjs";
|
|
20
|
+
import "../../chunk-IQQQ5P6R.mjs";
|
|
21
21
|
import "../../chunk-OTXV5FY7.mjs";
|
|
22
22
|
import "../../chunk-VZIMT7AO.mjs";
|
|
23
|
-
import "../../chunk-N7NFYY54.mjs";
|
|
24
23
|
import "../../chunk-I7CD6EB6.mjs";
|
|
24
|
+
import "../../chunk-N7NFYY54.mjs";
|
|
25
25
|
export {
|
|
26
26
|
createCoreHandler,
|
|
27
27
|
executeRoute,
|
|
@@ -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-
|
|
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-
|
|
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
|
|
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(
|
|
@@ -2,33 +2,33 @@ import "../chunk-WYDGEDEU.mjs";
|
|
|
2
2
|
import "../chunk-VXND2UDT.mjs";
|
|
3
3
|
import {
|
|
4
4
|
handleRouteByName
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-MZAOYQT4.mjs";
|
|
6
6
|
import {
|
|
7
7
|
createCoreHandler
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-FMYC62PB.mjs";
|
|
9
|
+
import "../chunk-746ER4JF.mjs";
|
|
10
|
+
import "../chunk-MOHYGUMA.mjs";
|
|
11
|
+
import "../chunk-TBQ27LIK.mjs";
|
|
12
|
+
import "../chunk-J44WR3QZ.mjs";
|
|
9
13
|
import "../chunk-TSF4YCUO.mjs";
|
|
10
14
|
import {
|
|
11
15
|
buildRouter
|
|
12
16
|
} from "../chunk-UAR3TMWI.mjs";
|
|
13
|
-
import "../chunk-JEDV5ITW.mjs";
|
|
14
17
|
import {
|
|
15
18
|
routeConfigs
|
|
16
|
-
} from "../chunk-
|
|
17
|
-
import "../chunk-OVAKKRI6.mjs";
|
|
18
|
-
import "../chunk-TBQ27LIK.mjs";
|
|
19
|
-
import "../chunk-J44WR3QZ.mjs";
|
|
19
|
+
} from "../chunk-IQQQ5P6R.mjs";
|
|
20
20
|
import "../chunk-OTXV5FY7.mjs";
|
|
21
21
|
import {
|
|
22
22
|
secretKeyCheck
|
|
23
23
|
} from "../chunk-VZIMT7AO.mjs";
|
|
24
|
+
import {
|
|
25
|
+
sanitizeBody
|
|
26
|
+
} from "../chunk-I7CD6EB6.mjs";
|
|
24
27
|
import {
|
|
25
28
|
backendError,
|
|
26
29
|
backendSuccess,
|
|
27
30
|
isBackendResult
|
|
28
31
|
} from "../chunk-N7NFYY54.mjs";
|
|
29
|
-
import {
|
|
30
|
-
sanitizeBody
|
|
31
|
-
} from "../chunk-I7CD6EB6.mjs";
|
|
32
32
|
export {
|
|
33
33
|
backendError,
|
|
34
34
|
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-
|
|
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-
|
|
4
|
+
import '../../routeTypes-HV2JbO7a.js';
|
|
5
5
|
import '../../authTypes-TPWTIfcM.js';
|
|
6
6
|
import 'zod/v4';
|
|
7
7
|
import '../utils/sanitizeBody.js';
|
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
} from "../../chunk-UAR3TMWI.mjs";
|
|
5
5
|
import {
|
|
6
6
|
routeConfigs
|
|
7
|
-
} from "../../chunk-
|
|
7
|
+
} from "../../chunk-IQQQ5P6R.mjs";
|
|
8
8
|
import "../../chunk-OTXV5FY7.mjs";
|
|
9
9
|
import "../../chunk-VZIMT7AO.mjs";
|
|
10
|
-
import "../../chunk-N7NFYY54.mjs";
|
|
11
10
|
import "../../chunk-I7CD6EB6.mjs";
|
|
11
|
+
import "../../chunk-N7NFYY54.mjs";
|
|
12
12
|
export {
|
|
13
13
|
buildRouter,
|
|
14
14
|
routeConfigs
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RouterContext } from 'rou3';
|
|
2
|
-
import { R as RouteDefinition } from '../../routeTypes-
|
|
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-
|
|
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,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
routeConfigs
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-IQQQ5P6R.mjs";
|
|
4
4
|
import "../../chunk-OTXV5FY7.mjs";
|
|
5
5
|
import "../../chunk-VZIMT7AO.mjs";
|
|
6
|
-
import "../../chunk-N7NFYY54.mjs";
|
|
7
6
|
import "../../chunk-I7CD6EB6.mjs";
|
|
7
|
+
import "../../chunk-N7NFYY54.mjs";
|
|
8
8
|
export {
|
|
9
9
|
routeConfigs
|
|
10
10
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { A as AuthResult } from '../../authTypes-TPWTIfcM.mjs';
|
|
2
|
-
import { R as RouteDefinition } from '../../routeTypes-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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';
|
|
@@ -2,16 +2,16 @@ import "../../chunk-OTXV5FY7.mjs";
|
|
|
2
2
|
import {
|
|
3
3
|
secretKeyCheck
|
|
4
4
|
} from "../../chunk-VZIMT7AO.mjs";
|
|
5
|
-
import {
|
|
6
|
-
backendError,
|
|
7
|
-
backendSuccess,
|
|
8
|
-
isBackendResult
|
|
9
|
-
} from "../../chunk-N7NFYY54.mjs";
|
|
10
5
|
import {
|
|
11
6
|
CUSTOMER_PROTECTED_BODY_FIELDS,
|
|
12
7
|
DEFAULT_PROTECTED_BODY_FIELDS,
|
|
13
8
|
sanitizeBody
|
|
14
9
|
} from "../../chunk-I7CD6EB6.mjs";
|
|
10
|
+
import {
|
|
11
|
+
backendError,
|
|
12
|
+
backendSuccess,
|
|
13
|
+
isBackendResult
|
|
14
|
+
} from "../../chunk-N7NFYY54.mjs";
|
|
15
15
|
export {
|
|
16
16
|
CUSTOMER_PROTECTED_BODY_FIELDS,
|
|
17
17
|
DEFAULT_PROTECTED_BODY_FIELDS,
|
package/dist/backend/index.d.mts
CHANGED
|
@@ -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-
|
|
7
|
-
export { C as CustomHandlerArgs, a as CustomHandlerFn } from './routeTypes-
|
|
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';
|
package/dist/backend/index.d.ts
CHANGED
|
@@ -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-
|
|
7
|
-
export { C as CustomHandlerArgs, a as CustomHandlerFn } from './routeTypes-
|
|
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';
|
package/dist/backend/index.js
CHANGED
|
@@ -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
|
|
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(
|
package/dist/backend/index.mjs
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import "./chunk-WYDGEDEU.mjs";
|
|
2
2
|
import "./chunk-VXND2UDT.mjs";
|
|
3
|
-
import "./chunk-
|
|
3
|
+
import "./chunk-MZAOYQT4.mjs";
|
|
4
4
|
import {
|
|
5
5
|
createCoreHandler
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-FMYC62PB.mjs";
|
|
7
|
+
import "./chunk-746ER4JF.mjs";
|
|
8
|
+
import "./chunk-MOHYGUMA.mjs";
|
|
9
|
+
import "./chunk-TBQ27LIK.mjs";
|
|
10
|
+
import "./chunk-J44WR3QZ.mjs";
|
|
7
11
|
import "./chunk-TSF4YCUO.mjs";
|
|
8
12
|
import {
|
|
9
13
|
buildRouter
|
|
10
14
|
} from "./chunk-UAR3TMWI.mjs";
|
|
11
|
-
import "./chunk-JEDV5ITW.mjs";
|
|
12
15
|
import {
|
|
13
16
|
routeConfigs
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-OVAKKRI6.mjs";
|
|
16
|
-
import "./chunk-TBQ27LIK.mjs";
|
|
17
|
-
import "./chunk-J44WR3QZ.mjs";
|
|
17
|
+
} from "./chunk-IQQQ5P6R.mjs";
|
|
18
18
|
import "./chunk-OTXV5FY7.mjs";
|
|
19
19
|
import {
|
|
20
20
|
secretKeyCheck
|
|
21
21
|
} from "./chunk-VZIMT7AO.mjs";
|
|
22
|
+
import {
|
|
23
|
+
sanitizeBody
|
|
24
|
+
} from "./chunk-I7CD6EB6.mjs";
|
|
22
25
|
import {
|
|
23
26
|
backendError,
|
|
24
27
|
backendSuccess,
|
|
25
28
|
isBackendResult
|
|
26
29
|
} from "./chunk-N7NFYY54.mjs";
|
|
27
|
-
import {
|
|
28
|
-
sanitizeBody
|
|
29
|
-
} from "./chunk-I7CD6EB6.mjs";
|
|
30
30
|
|
|
31
31
|
// src/backend/index.ts
|
|
32
32
|
async function autumnHandler(options) {
|
|
@@ -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
|
|
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
|
|
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
|
}
|