@trigger.dev/core 4.6.4 → 4.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commonjs/v3/apiClient/index.d.ts +201 -20
- package/dist/commonjs/v3/apiClient/index.js +38 -0
- package/dist/commonjs/v3/apiClient/index.js.map +1 -1
- package/dist/commonjs/v3/apiClient/runStream.d.ts +3 -0
- package/dist/commonjs/v3/apiClient/runStream.js +21 -5
- package/dist/commonjs/v3/apiClient/runStream.js.map +1 -1
- package/dist/commonjs/v3/errors.d.ts +4 -0
- package/dist/commonjs/v3/errors.js +28 -1
- package/dist/commonjs/v3/errors.js.map +1 -1
- package/dist/commonjs/v3/resource-catalog/catalog.d.ts +3 -1
- package/dist/commonjs/v3/resource-catalog/index.d.ts +3 -1
- package/dist/commonjs/v3/resource-catalog/index.js +6 -0
- package/dist/commonjs/v3/resource-catalog/index.js.map +1 -1
- package/dist/commonjs/v3/resource-catalog/noopResourceCatalog.d.ts +3 -1
- package/dist/commonjs/v3/resource-catalog/noopResourceCatalog.js +4 -0
- package/dist/commonjs/v3/resource-catalog/noopResourceCatalog.js.map +1 -1
- package/dist/commonjs/v3/resource-catalog/standardResourceCatalog.d.ts +4 -1
- package/dist/commonjs/v3/resource-catalog/standardResourceCatalog.js +27 -2
- package/dist/commonjs/v3/resource-catalog/standardResourceCatalog.js.map +1 -1
- package/dist/commonjs/v3/schemas/api.d.ts +99 -2
- package/dist/commonjs/v3/schemas/api.js +48 -4
- package/dist/commonjs/v3/schemas/api.js.map +1 -1
- package/dist/commonjs/v3/schemas/build.d.ts +84 -4
- package/dist/commonjs/v3/schemas/build.js +1 -0
- package/dist/commonjs/v3/schemas/build.js.map +1 -1
- package/dist/commonjs/v3/schemas/messages.d.ts +49 -2
- package/dist/commonjs/v3/schemas/messages.js +4 -0
- package/dist/commonjs/v3/schemas/messages.js.map +1 -1
- package/dist/commonjs/v3/schemas/queues.d.ts +124 -3
- package/dist/commonjs/v3/schemas/queues.js +91 -19
- package/dist/commonjs/v3/schemas/queues.js.map +1 -1
- package/dist/commonjs/v3/schemas/resources.d.ts +78 -4
- package/dist/commonjs/v3/schemas/resources.js +3 -0
- package/dist/commonjs/v3/schemas/resources.js.map +1 -1
- package/dist/commonjs/v3/schemas/schemas.d.ts +108 -4
- package/dist/commonjs/v3/schemas/schemas.js +35 -1
- package/dist/commonjs/v3/schemas/schemas.js.map +1 -1
- package/dist/commonjs/v3/schemas/webhookConfig.d.ts +48 -3
- package/dist/commonjs/v3/schemas/webhookConfig.js +58 -5
- package/dist/commonjs/v3/schemas/webhookConfig.js.map +1 -1
- package/dist/commonjs/v3/types/queues.d.ts +39 -3
- package/dist/commonjs/v3/types/tasks.d.ts +39 -5
- package/dist/commonjs/v3/utils/zod.d.ts +6 -0
- package/dist/commonjs/v3/utils/zod.js +9 -0
- package/dist/commonjs/v3/utils/zod.js.map +1 -1
- package/dist/commonjs/v3/webhooks/index.d.ts +8 -1
- package/dist/commonjs/v3/webhooks/index.js +34 -2
- package/dist/commonjs/v3/webhooks/index.js.map +1 -1
- package/dist/commonjs/v3/zodIpc.js +3 -1
- package/dist/commonjs/v3/zodIpc.js.map +1 -1
- package/dist/commonjs/version.js +1 -1
- package/dist/esm/v3/apiClient/index.d.ts +201 -20
- package/dist/esm/v3/apiClient/index.js +39 -1
- package/dist/esm/v3/apiClient/index.js.map +1 -1
- package/dist/esm/v3/apiClient/runStream.d.ts +3 -0
- package/dist/esm/v3/apiClient/runStream.js +21 -5
- package/dist/esm/v3/apiClient/runStream.js.map +1 -1
- package/dist/esm/v3/errors.d.ts +4 -0
- package/dist/esm/v3/errors.js +26 -0
- package/dist/esm/v3/errors.js.map +1 -1
- package/dist/esm/v3/resource-catalog/catalog.d.ts +3 -1
- package/dist/esm/v3/resource-catalog/index.d.ts +3 -1
- package/dist/esm/v3/resource-catalog/index.js +6 -0
- package/dist/esm/v3/resource-catalog/index.js.map +1 -1
- package/dist/esm/v3/resource-catalog/noopResourceCatalog.d.ts +3 -1
- package/dist/esm/v3/resource-catalog/noopResourceCatalog.js +4 -0
- package/dist/esm/v3/resource-catalog/noopResourceCatalog.js.map +1 -1
- package/dist/esm/v3/resource-catalog/standardResourceCatalog.d.ts +4 -1
- package/dist/esm/v3/resource-catalog/standardResourceCatalog.js +27 -2
- package/dist/esm/v3/resource-catalog/standardResourceCatalog.js.map +1 -1
- package/dist/esm/v3/schemas/api.d.ts +99 -2
- package/dist/esm/v3/schemas/api.js +44 -0
- package/dist/esm/v3/schemas/api.js.map +1 -1
- package/dist/esm/v3/schemas/build.d.ts +84 -4
- package/dist/esm/v3/schemas/build.js +2 -1
- package/dist/esm/v3/schemas/build.js.map +1 -1
- package/dist/esm/v3/schemas/messages.d.ts +49 -2
- package/dist/esm/v3/schemas/messages.js +4 -0
- package/dist/esm/v3/schemas/messages.js.map +1 -1
- package/dist/esm/v3/schemas/queues.d.ts +124 -3
- package/dist/esm/v3/schemas/queues.js +90 -18
- package/dist/esm/v3/schemas/queues.js.map +1 -1
- package/dist/esm/v3/schemas/resources.d.ts +78 -4
- package/dist/esm/v3/schemas/resources.js +4 -1
- package/dist/esm/v3/schemas/resources.js.map +1 -1
- package/dist/esm/v3/schemas/schemas.d.ts +108 -4
- package/dist/esm/v3/schemas/schemas.js +34 -0
- package/dist/esm/v3/schemas/schemas.js.map +1 -1
- package/dist/esm/v3/schemas/webhookConfig.d.ts +48 -3
- package/dist/esm/v3/schemas/webhookConfig.js +57 -4
- package/dist/esm/v3/schemas/webhookConfig.js.map +1 -1
- package/dist/esm/v3/types/queues.d.ts +39 -3
- package/dist/esm/v3/types/tasks.d.ts +39 -5
- package/dist/esm/v3/utils/zod.d.ts +6 -0
- package/dist/esm/v3/utils/zod.js +8 -0
- package/dist/esm/v3/utils/zod.js.map +1 -1
- package/dist/esm/v3/webhooks/index.d.ts +8 -1
- package/dist/esm/v3/webhooks/index.js +33 -2
- package/dist/esm/v3/webhooks/index.js.map +1 -1
- package/dist/esm/v3/zodIpc.js +3 -1
- package/dist/esm/v3/zodIpc.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/package.json +1 -1
|
@@ -15,7 +15,16 @@ export declare const RetrieveQueueType: z.ZodEnum<{
|
|
|
15
15
|
task: "task";
|
|
16
16
|
}>;
|
|
17
17
|
export type RetrieveQueueType = z.infer<typeof RetrieveQueueType>;
|
|
18
|
-
|
|
18
|
+
/**
|
|
19
|
+
* The queue's `version` discriminates its shape. V1 queues carry their own
|
|
20
|
+
* concurrency limit (applied per key when runs pass a `concurrencyKey`, to the
|
|
21
|
+
* whole queue when they don't) and its override state. V2 queues are only the
|
|
22
|
+
* line runs wait in: concurrency is declared with the task `concurrency`
|
|
23
|
+
* option and read or overridden through `concurrencyLimits`. A response from a
|
|
24
|
+
* server that predates the discriminator has V1 semantics by definition, so a
|
|
25
|
+
* missing `version` defaults to "V1" rather than failing the parse.
|
|
26
|
+
*/
|
|
27
|
+
declare const QueueItemUnion: import("../utils/zod.js").CompatibleZodDiscriminatedUnion<readonly [z.ZodObject<{
|
|
19
28
|
id: z.ZodString;
|
|
20
29
|
name: z.ZodString;
|
|
21
30
|
type: z.ZodEnum<{
|
|
@@ -26,6 +35,7 @@ export declare const QueueItem: z.ZodObject<{
|
|
|
26
35
|
queued: z.ZodNumber;
|
|
27
36
|
paused: z.ZodBoolean;
|
|
28
37
|
concurrencyLimit: z.ZodNullable<z.ZodNumber>;
|
|
38
|
+
version: z.ZodLiteral<"V1">;
|
|
29
39
|
concurrency: z.ZodOptional<z.ZodObject<{
|
|
30
40
|
current: z.ZodNullable<z.ZodNumber>;
|
|
31
41
|
base: z.ZodNullable<z.ZodNumber>;
|
|
@@ -33,8 +43,74 @@ export declare const QueueItem: z.ZodObject<{
|
|
|
33
43
|
overriddenAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
34
44
|
overriddenBy: z.ZodNullable<z.ZodString>;
|
|
35
45
|
}, z.core.$strip>>;
|
|
36
|
-
}, z.core.$strip
|
|
37
|
-
|
|
46
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
47
|
+
id: z.ZodString;
|
|
48
|
+
name: z.ZodString;
|
|
49
|
+
type: z.ZodEnum<{
|
|
50
|
+
custom: "custom";
|
|
51
|
+
task: "task";
|
|
52
|
+
}>;
|
|
53
|
+
running: z.ZodNumber;
|
|
54
|
+
queued: z.ZodNumber;
|
|
55
|
+
paused: z.ZodBoolean;
|
|
56
|
+
concurrencyLimit: z.ZodNullable<z.ZodNumber>;
|
|
57
|
+
version: z.ZodLiteral<"V2">;
|
|
58
|
+
concurrency: z.ZodOptional<z.ZodUndefined>;
|
|
59
|
+
}, z.core.$strip>]>;
|
|
60
|
+
export declare const QueueItem: z.ZodType<{
|
|
61
|
+
id: string;
|
|
62
|
+
name: string;
|
|
63
|
+
type: "custom" | "task";
|
|
64
|
+
running: number;
|
|
65
|
+
queued: number;
|
|
66
|
+
paused: boolean;
|
|
67
|
+
concurrencyLimit: number | null;
|
|
68
|
+
version: "V1";
|
|
69
|
+
concurrency?: {
|
|
70
|
+
current: number | null;
|
|
71
|
+
base: number | null;
|
|
72
|
+
override: number | null;
|
|
73
|
+
overriddenAt: Date | null;
|
|
74
|
+
overriddenBy: string | null;
|
|
75
|
+
} | undefined;
|
|
76
|
+
} | {
|
|
77
|
+
id: string;
|
|
78
|
+
name: string;
|
|
79
|
+
type: "custom" | "task";
|
|
80
|
+
running: number;
|
|
81
|
+
queued: number;
|
|
82
|
+
paused: boolean;
|
|
83
|
+
concurrencyLimit: number | null;
|
|
84
|
+
version: "V2";
|
|
85
|
+
concurrency?: undefined;
|
|
86
|
+
}, unknown, z.core.$ZodTypeInternals<{
|
|
87
|
+
id: string;
|
|
88
|
+
name: string;
|
|
89
|
+
type: "custom" | "task";
|
|
90
|
+
running: number;
|
|
91
|
+
queued: number;
|
|
92
|
+
paused: boolean;
|
|
93
|
+
concurrencyLimit: number | null;
|
|
94
|
+
version: "V1";
|
|
95
|
+
concurrency?: {
|
|
96
|
+
current: number | null;
|
|
97
|
+
base: number | null;
|
|
98
|
+
override: number | null;
|
|
99
|
+
overriddenAt: Date | null;
|
|
100
|
+
overriddenBy: string | null;
|
|
101
|
+
} | undefined;
|
|
102
|
+
} | {
|
|
103
|
+
id: string;
|
|
104
|
+
name: string;
|
|
105
|
+
type: "custom" | "task";
|
|
106
|
+
running: number;
|
|
107
|
+
queued: number;
|
|
108
|
+
paused: boolean;
|
|
109
|
+
concurrencyLimit: number | null;
|
|
110
|
+
version: "V2";
|
|
111
|
+
concurrency?: undefined;
|
|
112
|
+
}, unknown>>;
|
|
113
|
+
export type QueueItem = z.infer<typeof QueueItemUnion>;
|
|
38
114
|
export declare const ListQueueOptions: z.ZodObject<{
|
|
39
115
|
page: z.ZodOptional<z.ZodNumber>;
|
|
40
116
|
perPage: z.ZodOptional<z.ZodNumber>;
|
|
@@ -74,3 +150,48 @@ export declare const RetrieveQueueParam: z.ZodUnion<readonly [z.ZodString, z.Zod
|
|
|
74
150
|
name: z.ZodString;
|
|
75
151
|
}, z.core.$strip>]>;
|
|
76
152
|
export type RetrieveQueueParam = z.infer<typeof RetrieveQueueParam>;
|
|
153
|
+
/** One bound of a concurrency limit: the enforced value, the declared base, and
|
|
154
|
+
* any active override. `current` is the cap this bound enforces right now (the
|
|
155
|
+
* stored value clamped to the environment concurrency limit). Pausing an
|
|
156
|
+
* environment or queue stops dequeues without changing its configured bounds,
|
|
157
|
+
* so pause state is reported separately, never as a `current` of 0. */
|
|
158
|
+
export declare const ConcurrencyLimitBound: z.ZodObject<{
|
|
159
|
+
current: z.ZodNullable<z.ZodNumber>;
|
|
160
|
+
base: z.ZodNullable<z.ZodNumber>;
|
|
161
|
+
override: z.ZodNullable<z.ZodNumber>;
|
|
162
|
+
overriddenAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
163
|
+
}, z.core.$strip>;
|
|
164
|
+
export type ConcurrencyLimitBound = z.infer<typeof ConcurrencyLimitBound>;
|
|
165
|
+
export declare const ConcurrencyLimitItem: z.ZodObject<{
|
|
166
|
+
id: z.ZodString;
|
|
167
|
+
name: z.ZodString;
|
|
168
|
+
perKey: z.ZodObject<{
|
|
169
|
+
current: z.ZodNullable<z.ZodNumber>;
|
|
170
|
+
base: z.ZodNullable<z.ZodNumber>;
|
|
171
|
+
override: z.ZodNullable<z.ZodNumber>;
|
|
172
|
+
overriddenAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
173
|
+
}, z.core.$strip>;
|
|
174
|
+
total: z.ZodObject<{
|
|
175
|
+
current: z.ZodNullable<z.ZodNumber>;
|
|
176
|
+
base: z.ZodNullable<z.ZodNumber>;
|
|
177
|
+
override: z.ZodNullable<z.ZodNumber>;
|
|
178
|
+
overriddenAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
179
|
+
}, z.core.$strip>;
|
|
180
|
+
running: z.ZodNumber;
|
|
181
|
+
queued: z.ZodNumber;
|
|
182
|
+
paused: z.ZodDefault<z.ZodBoolean>;
|
|
183
|
+
}, z.core.$strip>;
|
|
184
|
+
export type ConcurrencyLimitItem = z.infer<typeof ConcurrencyLimitItem>;
|
|
185
|
+
export declare const ListConcurrencyLimitOptions: z.ZodObject<{
|
|
186
|
+
page: z.ZodOptional<z.ZodNumber>;
|
|
187
|
+
perPage: z.ZodOptional<z.ZodNumber>;
|
|
188
|
+
}, z.core.$strip>;
|
|
189
|
+
export type ListConcurrencyLimitOptions = z.infer<typeof ListConcurrencyLimitOptions>;
|
|
190
|
+
/** Changes only the given bounds. Zero blocks every run holding the limit, which
|
|
191
|
+
* is how a limit is paused; `reset` restores the declared values. */
|
|
192
|
+
export declare const OverrideConcurrencyLimitRequestBody: z.ZodObject<{
|
|
193
|
+
perKey: z.ZodOptional<z.ZodNumber>;
|
|
194
|
+
total: z.ZodOptional<z.ZodNumber>;
|
|
195
|
+
}, z.core.$strip>;
|
|
196
|
+
export type OverrideConcurrencyLimitRequestBody = z.infer<typeof OverrideConcurrencyLimitRequestBody>;
|
|
197
|
+
export {};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RetrieveQueueParam = exports.QueueTypeName = exports.ListQueueOptions = exports.QueueItem = exports.RetrieveQueueType = exports.QueueType = void 0;
|
|
3
|
+
exports.OverrideConcurrencyLimitRequestBody = exports.ListConcurrencyLimitOptions = exports.ConcurrencyLimitItem = exports.ConcurrencyLimitBound = exports.RetrieveQueueParam = exports.QueueTypeName = exports.ListQueueOptions = exports.QueueItem = exports.RetrieveQueueType = exports.QueueType = void 0;
|
|
4
4
|
const v4_1 = require("zod/v4");
|
|
5
|
+
const zod_js_1 = require("../utils/zod.js");
|
|
5
6
|
const queueTypes = ["task", "custom"];
|
|
6
7
|
/**
|
|
7
8
|
* The type of queue, either "task" or "custom"
|
|
@@ -10,7 +11,7 @@ const queueTypes = ["task", "custom"];
|
|
|
10
11
|
* */
|
|
11
12
|
exports.QueueType = v4_1.z.enum(queueTypes);
|
|
12
13
|
exports.RetrieveQueueType = v4_1.z.enum([...queueTypes, "id"]);
|
|
13
|
-
|
|
14
|
+
const QueueItemCommon = {
|
|
14
15
|
/** The queue id, e.g. queue_12345 */
|
|
15
16
|
id: v4_1.z.string(),
|
|
16
17
|
/** The queue name */
|
|
@@ -27,24 +28,52 @@ exports.QueueItem = v4_1.z.object({
|
|
|
27
28
|
queued: v4_1.z.number(),
|
|
28
29
|
/** Whether the queue is paused. If it's paused, no new runs will be started. */
|
|
29
30
|
paused: v4_1.z.boolean(),
|
|
30
|
-
/**
|
|
31
|
+
/**
|
|
32
|
+
* The queue's own concurrency limit. Meaningful on V1 queues only; always
|
|
33
|
+
* null on V2 queues (kept on both so existing clients keep parsing).
|
|
34
|
+
*/
|
|
31
35
|
concurrencyLimit: v4_1.z.number().nullable(),
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* The queue's `version` discriminates its shape. V1 queues carry their own
|
|
39
|
+
* concurrency limit (applied per key when runs pass a `concurrencyKey`, to the
|
|
40
|
+
* whole queue when they don't) and its override state. V2 queues are only the
|
|
41
|
+
* line runs wait in: concurrency is declared with the task `concurrency`
|
|
42
|
+
* option and read or overridden through `concurrencyLimits`. A response from a
|
|
43
|
+
* server that predates the discriminator has V1 semantics by definition, so a
|
|
44
|
+
* missing `version` defaults to "V1" rather than failing the parse.
|
|
45
|
+
*/
|
|
46
|
+
const QueueItemUnion = (0, zod_js_1.discriminatedUnion)("version", [
|
|
47
|
+
v4_1.z.object({
|
|
48
|
+
...QueueItemCommon,
|
|
49
|
+
version: v4_1.z.literal("V1"),
|
|
50
|
+
/** The queue's concurrency limit override state */
|
|
51
|
+
concurrency: v4_1.z
|
|
52
|
+
.object({
|
|
53
|
+
/** The effective/current concurrency limit */
|
|
54
|
+
current: v4_1.z.number().nullable(),
|
|
55
|
+
/** The base concurrency limit (default) */
|
|
56
|
+
base: v4_1.z.number().nullable(),
|
|
57
|
+
/** The overridden concurrency limit, when an override is active */
|
|
58
|
+
override: v4_1.z.number().nullable(),
|
|
59
|
+
/** When the override was applied */
|
|
60
|
+
overriddenAt: v4_1.z.coerce.date().nullable(),
|
|
61
|
+
/** Who overrode the concurrency limit (will be null if overridden via the API) */
|
|
62
|
+
overriddenBy: v4_1.z.string().nullable(),
|
|
63
|
+
})
|
|
64
|
+
.optional(),
|
|
65
|
+
}),
|
|
66
|
+
v4_1.z.object({
|
|
67
|
+
...QueueItemCommon,
|
|
68
|
+
version: v4_1.z.literal("V2"),
|
|
69
|
+
/** Never present on V2 queues; declared so existing `queue.concurrency?.…`
|
|
70
|
+
* reads keep compiling across the union and see undefined. */
|
|
71
|
+
concurrency: v4_1.z.undefined().optional(),
|
|
72
|
+
}),
|
|
73
|
+
]);
|
|
74
|
+
exports.QueueItem = (0, zod_js_1.preprocess)((value) => value && typeof value === "object" && !("version" in value)
|
|
75
|
+
? { ...value, version: "V1" }
|
|
76
|
+
: value, QueueItemUnion);
|
|
48
77
|
exports.ListQueueOptions = v4_1.z.object({
|
|
49
78
|
/** The page number */
|
|
50
79
|
page: v4_1.z.number().optional(),
|
|
@@ -78,4 +107,47 @@ exports.QueueTypeName = v4_1.z.object({
|
|
|
78
107
|
* ```
|
|
79
108
|
*/
|
|
80
109
|
exports.RetrieveQueueParam = v4_1.z.union([v4_1.z.string(), exports.QueueTypeName]);
|
|
110
|
+
/** One bound of a concurrency limit: the enforced value, the declared base, and
|
|
111
|
+
* any active override. `current` is the cap this bound enforces right now (the
|
|
112
|
+
* stored value clamped to the environment concurrency limit). Pausing an
|
|
113
|
+
* environment or queue stops dequeues without changing its configured bounds,
|
|
114
|
+
* so pause state is reported separately, never as a `current` of 0. */
|
|
115
|
+
exports.ConcurrencyLimitBound = v4_1.z.object({
|
|
116
|
+
current: v4_1.z.number().nullable(),
|
|
117
|
+
base: v4_1.z.number().nullable(),
|
|
118
|
+
override: v4_1.z.number().nullable(),
|
|
119
|
+
overriddenAt: v4_1.z.coerce.date().nullable(),
|
|
120
|
+
});
|
|
121
|
+
exports.ConcurrencyLimitItem = v4_1.z.object({
|
|
122
|
+
/** The limit's id, starting with `climit_`. */
|
|
123
|
+
id: v4_1.z.string(),
|
|
124
|
+
/** The limit's name, as declared with `concurrencyLimit()` (anonymous inline
|
|
125
|
+
* limits use the derived name `task/<taskId>`). */
|
|
126
|
+
name: v4_1.z.string(),
|
|
127
|
+
/** Caps each concurrencyKey pool; runs without a key share one pool. */
|
|
128
|
+
perKey: exports.ConcurrencyLimitBound,
|
|
129
|
+
/** Caps every run holding this limit, keys or not. */
|
|
130
|
+
total: exports.ConcurrencyLimitBound,
|
|
131
|
+
/** Runs executing that hold this limit. */
|
|
132
|
+
running: v4_1.z.number(),
|
|
133
|
+
/** Runs that are queued and must clear this limit to execute. */
|
|
134
|
+
queued: v4_1.z.number(),
|
|
135
|
+
/** Whether the limit is paused. A paused limit admits no runs until resumed;
|
|
136
|
+
* its configured bounds are kept. Older servers omit the field. */
|
|
137
|
+
paused: v4_1.z.boolean().default(false),
|
|
138
|
+
});
|
|
139
|
+
exports.ListConcurrencyLimitOptions = v4_1.z.object({
|
|
140
|
+
page: v4_1.z.number().optional(),
|
|
141
|
+
perPage: v4_1.z.number().optional(),
|
|
142
|
+
});
|
|
143
|
+
/** Changes only the given bounds. Zero blocks every run holding the limit, which
|
|
144
|
+
* is how a limit is paused; `reset` restores the declared values. */
|
|
145
|
+
exports.OverrideConcurrencyLimitRequestBody = v4_1.z
|
|
146
|
+
.object({
|
|
147
|
+
perKey: v4_1.z.number().int().min(0).max(100000).optional(),
|
|
148
|
+
total: v4_1.z.number().int().min(0).max(100000).optional(),
|
|
149
|
+
})
|
|
150
|
+
.refine((body) => body.perKey !== undefined || body.total !== undefined, {
|
|
151
|
+
message: "Provide at least one of `perKey` or `total`",
|
|
152
|
+
});
|
|
81
153
|
//# sourceMappingURL=queues.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queues.js","sourceRoot":"","sources":["../../../../src/v3/schemas/queues.ts"],"names":[],"mappings":";;;AAAA,+BAA2B;
|
|
1
|
+
{"version":3,"file":"queues.js","sourceRoot":"","sources":["../../../../src/v3/schemas/queues.ts"],"names":[],"mappings":";;;AAAA,+BAA2B;AAC3B,4CAAiE;AAEjE,MAAM,UAAU,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAU,CAAC;AAE/C;;;;KAIK;AACQ,QAAA,SAAS,GAAG,MAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;AAG/B,QAAA,iBAAiB,GAAG,MAAC,CAAC,IAAI,CAAC,CAAC,GAAG,UAAU,EAAE,IAAI,CAAC,CAAC,CAAC;AAG/D,MA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{
|
|
|
10
10
|
exportName: z.ZodOptional<z.ZodString>;
|
|
11
11
|
queue: z.ZodOptional<z.ZodObject<{
|
|
12
12
|
concurrencyLimit: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
13
|
+
combinedConcurrencyLimit: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
13
14
|
name: z.ZodOptional<z.ZodString>;
|
|
14
15
|
}, z.core.$strip>>;
|
|
16
|
+
gates: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
17
|
+
queue: z.ZodString;
|
|
18
|
+
concurrencyKey: z.ZodOptional<z.ZodString>;
|
|
19
|
+
}, z.core.$strip>>>;
|
|
20
|
+
concurrency: z.ZodOptional<z.ZodObject<{
|
|
21
|
+
inline: z.ZodOptional<z.ZodObject<{
|
|
22
|
+
perKey: z.ZodOptional<z.ZodNumber>;
|
|
23
|
+
total: z.ZodOptional<z.ZodNumber>;
|
|
24
|
+
}, z.core.$strip>>;
|
|
25
|
+
limits: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
26
|
+
}, z.core.$strip>>;
|
|
15
27
|
retry: z.ZodOptional<z.ZodObject<{
|
|
16
28
|
maxAttempts: z.ZodOptional<z.ZodNumber>;
|
|
17
29
|
factor: z.ZodOptional<z.ZodNumber>;
|
|
@@ -268,7 +280,18 @@ export declare const WebhookResource: z.ZodObject<{
|
|
|
268
280
|
handshake: z.ZodOptional<z.ZodObject<{
|
|
269
281
|
matchPath: z.ZodString;
|
|
270
282
|
matchValue: z.ZodString;
|
|
271
|
-
respondPath: z.ZodString
|
|
283
|
+
respondPath: z.ZodOptional<z.ZodString>;
|
|
284
|
+
respondStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<200>, z.ZodLiteral<204>]>>;
|
|
285
|
+
}, z.core.$strip>>;
|
|
286
|
+
getHandshake: z.ZodOptional<z.ZodObject<{
|
|
287
|
+
matchParam: z.ZodOptional<z.ZodString>;
|
|
288
|
+
matchValue: z.ZodOptional<z.ZodString>;
|
|
289
|
+
tokenParam: z.ZodString;
|
|
290
|
+
challengeParam: z.ZodString;
|
|
291
|
+
}, z.core.$strip>>;
|
|
292
|
+
response: z.ZodOptional<z.ZodObject<{
|
|
293
|
+
acceptedStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<200>, z.ZodLiteral<202>, z.ZodLiteral<204>]>>;
|
|
294
|
+
rejectedStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<400>, z.ZodLiteral<401>, z.ZodLiteral<403>]>>;
|
|
272
295
|
}, z.core.$strip>>;
|
|
273
296
|
}, z.core.$strip>, z.ZodObject<{
|
|
274
297
|
kind: z.ZodLiteral<"preset">;
|
|
@@ -452,7 +475,18 @@ export declare const WebhookResource: z.ZodObject<{
|
|
|
452
475
|
handshake: z.ZodOptional<z.ZodObject<{
|
|
453
476
|
matchPath: z.ZodString;
|
|
454
477
|
matchValue: z.ZodString;
|
|
455
|
-
respondPath: z.ZodString
|
|
478
|
+
respondPath: z.ZodOptional<z.ZodString>;
|
|
479
|
+
respondStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<200>, z.ZodLiteral<204>]>>;
|
|
480
|
+
}, z.core.$strip>>;
|
|
481
|
+
getHandshake: z.ZodOptional<z.ZodObject<{
|
|
482
|
+
matchParam: z.ZodOptional<z.ZodString>;
|
|
483
|
+
matchValue: z.ZodOptional<z.ZodString>;
|
|
484
|
+
tokenParam: z.ZodString;
|
|
485
|
+
challengeParam: z.ZodString;
|
|
486
|
+
}, z.core.$strip>>;
|
|
487
|
+
response: z.ZodOptional<z.ZodObject<{
|
|
488
|
+
acceptedStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<200>, z.ZodLiteral<202>, z.ZodLiteral<204>]>>;
|
|
489
|
+
rejectedStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<400>, z.ZodLiteral<401>, z.ZodLiteral<403>]>>;
|
|
456
490
|
}, z.core.$strip>>;
|
|
457
491
|
}, z.core.$strip>, z.ZodObject<{
|
|
458
492
|
kind: z.ZodLiteral<"bundle">;
|
|
@@ -495,8 +529,20 @@ export declare const BackgroundWorkerMetadata: z.ZodObject<{
|
|
|
495
529
|
exportName: z.ZodOptional<z.ZodString>;
|
|
496
530
|
queue: z.ZodOptional<z.ZodObject<{
|
|
497
531
|
concurrencyLimit: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
532
|
+
combinedConcurrencyLimit: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
498
533
|
name: z.ZodOptional<z.ZodString>;
|
|
499
534
|
}, z.core.$strip>>;
|
|
535
|
+
gates: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
536
|
+
queue: z.ZodString;
|
|
537
|
+
concurrencyKey: z.ZodOptional<z.ZodString>;
|
|
538
|
+
}, z.core.$strip>>>;
|
|
539
|
+
concurrency: z.ZodOptional<z.ZodObject<{
|
|
540
|
+
inline: z.ZodOptional<z.ZodObject<{
|
|
541
|
+
perKey: z.ZodOptional<z.ZodNumber>;
|
|
542
|
+
total: z.ZodOptional<z.ZodNumber>;
|
|
543
|
+
}, z.core.$strip>>;
|
|
544
|
+
limits: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
545
|
+
}, z.core.$strip>>;
|
|
500
546
|
retry: z.ZodOptional<z.ZodObject<{
|
|
501
547
|
maxAttempts: z.ZodOptional<z.ZodNumber>;
|
|
502
548
|
factor: z.ZodOptional<z.ZodNumber>;
|
|
@@ -744,7 +790,18 @@ export declare const BackgroundWorkerMetadata: z.ZodObject<{
|
|
|
744
790
|
handshake: z.ZodOptional<z.ZodObject<{
|
|
745
791
|
matchPath: z.ZodString;
|
|
746
792
|
matchValue: z.ZodString;
|
|
747
|
-
respondPath: z.ZodString
|
|
793
|
+
respondPath: z.ZodOptional<z.ZodString>;
|
|
794
|
+
respondStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<200>, z.ZodLiteral<204>]>>;
|
|
795
|
+
}, z.core.$strip>>;
|
|
796
|
+
getHandshake: z.ZodOptional<z.ZodObject<{
|
|
797
|
+
matchParam: z.ZodOptional<z.ZodString>;
|
|
798
|
+
matchValue: z.ZodOptional<z.ZodString>;
|
|
799
|
+
tokenParam: z.ZodString;
|
|
800
|
+
challengeParam: z.ZodString;
|
|
801
|
+
}, z.core.$strip>>;
|
|
802
|
+
response: z.ZodOptional<z.ZodObject<{
|
|
803
|
+
acceptedStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<200>, z.ZodLiteral<202>, z.ZodLiteral<204>]>>;
|
|
804
|
+
rejectedStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<400>, z.ZodLiteral<401>, z.ZodLiteral<403>]>>;
|
|
748
805
|
}, z.core.$strip>>;
|
|
749
806
|
}, z.core.$strip>, z.ZodObject<{
|
|
750
807
|
kind: z.ZodLiteral<"preset">;
|
|
@@ -928,7 +985,18 @@ export declare const BackgroundWorkerMetadata: z.ZodObject<{
|
|
|
928
985
|
handshake: z.ZodOptional<z.ZodObject<{
|
|
929
986
|
matchPath: z.ZodString;
|
|
930
987
|
matchValue: z.ZodString;
|
|
931
|
-
respondPath: z.ZodString
|
|
988
|
+
respondPath: z.ZodOptional<z.ZodString>;
|
|
989
|
+
respondStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<200>, z.ZodLiteral<204>]>>;
|
|
990
|
+
}, z.core.$strip>>;
|
|
991
|
+
getHandshake: z.ZodOptional<z.ZodObject<{
|
|
992
|
+
matchParam: z.ZodOptional<z.ZodString>;
|
|
993
|
+
matchValue: z.ZodOptional<z.ZodString>;
|
|
994
|
+
tokenParam: z.ZodString;
|
|
995
|
+
challengeParam: z.ZodString;
|
|
996
|
+
}, z.core.$strip>>;
|
|
997
|
+
response: z.ZodOptional<z.ZodObject<{
|
|
998
|
+
acceptedStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<200>, z.ZodLiteral<202>, z.ZodLiteral<204>]>>;
|
|
999
|
+
rejectedStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<400>, z.ZodLiteral<401>, z.ZodLiteral<403>]>>;
|
|
932
1000
|
}, z.core.$strip>>;
|
|
933
1001
|
}, z.core.$strip>, z.ZodObject<{
|
|
934
1002
|
kind: z.ZodLiteral<"bundle">;
|
|
@@ -962,6 +1030,12 @@ export declare const BackgroundWorkerMetadata: z.ZodObject<{
|
|
|
962
1030
|
queues: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
963
1031
|
name: z.ZodString;
|
|
964
1032
|
concurrencyLimit: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
1033
|
+
combinedConcurrencyLimit: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
1034
|
+
}, z.core.$strip>>>;
|
|
1035
|
+
concurrencyLimits: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1036
|
+
perKey: z.ZodOptional<z.ZodNumber>;
|
|
1037
|
+
total: z.ZodOptional<z.ZodNumber>;
|
|
1038
|
+
name: z.ZodString;
|
|
965
1039
|
}, z.core.$strip>>>;
|
|
966
1040
|
sourceFiles: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
967
1041
|
filePath: z.ZodString;
|
|
@@ -14,6 +14,8 @@ exports.TaskResource = v4_1.z.object({
|
|
|
14
14
|
filePath: v4_1.z.string(),
|
|
15
15
|
exportName: v4_1.z.string().optional(),
|
|
16
16
|
queue: schemas_js_1.QueueManifest.extend({ name: v4_1.z.string().optional() }).optional(),
|
|
17
|
+
gates: schemas_js_1.QueueGateManifest.array().max(2).optional(),
|
|
18
|
+
concurrency: schemas_js_1.TaskConcurrencyManifest.optional(),
|
|
17
19
|
retry: schemas_js_1.RetryOptions.optional(),
|
|
18
20
|
machine: common_js_1.MachineConfig.optional(),
|
|
19
21
|
triggerSource: v4_1.z.string().optional(),
|
|
@@ -64,6 +66,7 @@ exports.BackgroundWorkerMetadata = v4_1.z.object({
|
|
|
64
66
|
prompts: v4_1.z.array(exports.PromptResource).optional(),
|
|
65
67
|
webhooks: v4_1.z.array(exports.WebhookResource).optional(), // NEW
|
|
66
68
|
queues: v4_1.z.array(schemas_js_1.QueueManifest).optional(),
|
|
69
|
+
concurrencyLimits: v4_1.z.array(schemas_js_1.ConcurrencyLimitManifest).optional(),
|
|
67
70
|
sourceFiles: v4_1.z.array(exports.BackgroundWorkerSourceFileMetadata).optional(),
|
|
68
71
|
runtime: v4_1.z.string().optional(),
|
|
69
72
|
runtimeVersion: v4_1.z.string().optional(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resources.js","sourceRoot":"","sources":["../../../../src/v3/schemas/resources.ts"],"names":[],"mappings":";;;AAAA,+BAA2B;AAC3B,
|
|
1
|
+
{"version":3,"file":"resources.js","sourceRoot":"","sources":["../../../../src/v3/schemas/resources.ts"],"names":[],"mappings":";;;AAAA,+BAA2B;AAC3B,6CAOsB;AACtB,2CAA4C;AAC5C,yDAI4B;AAEf,QAAA,WAAW,GAAG,MAAC,CAAC,MAAM,CAAC;IAClC,IAAI,EAAE,MAAC,CAAC,MAAM,EAAE,EAAE,6DAA6D;CAChF,CAAC,CAAC;AAIU,QAAA,YAAY,GAAG,MAAC,CAAC,MAAM,CAAC;IACnC,EAAE,EAAE,MAAC,CAAC,MAAM,EAAE;IACd,WAAW,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,QAAQ,EAAE,MAAC,CAAC,MAAM,EAAE;IACpB,UAAU,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,KAAK,EAAE,0BAAa,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,QAAQ,EAAE;IACvE,KAAK,EAAE,8BAAiB,CAAC,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IAClD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AC3C,QAAQ,EAAE,MAAC,CAAC,KAAK,CAAC,QAAA,eAAe,CAAC,CAAC,QAAQ,EAAE,EAAE,MAAM;IACrD,MAAM,EAAE,MAAC,CAAC,KAAK,CAAC,0BAAa,CAAC,CAAC,QAAQ,EAAE;IACzC,iBAAiB,EAAE,MAAC,CAAC,KAAK,CAAC,qCAAwB,CAAC,CAAC,QAAQ,EAAE;IAC/D,WAAW,EAAE,MAAC,CAAC,KAAK,CAAC,QAAA,kCAAkC,CAAC,CAAC,QAAQ,EAAE;IACnE,OAAO,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC9B,cAAc,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACtC,CAAC,CAAC;AAIU,QAAA,oBAAoB,GAAG,MAAC,CAAC,MAAM,CAAC;IAC3C,WAAW,EAAE,MAAC,CAAC,MAAM,EAAE;IACvB,QAAQ,EAAE,MAAC,CAAC,MAAM,EAAE;CACrB,CAAC,CAAC"}
|
|
@@ -484,8 +484,44 @@ export type RetryOptions = z.infer<typeof RetryOptions>;
|
|
|
484
484
|
export declare const QueueManifest: z.ZodObject<{
|
|
485
485
|
name: z.ZodString;
|
|
486
486
|
concurrencyLimit: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
487
|
+
combinedConcurrencyLimit: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
487
488
|
}, z.core.$strip>;
|
|
488
489
|
export type QueueManifest = z.infer<typeof QueueManifest>;
|
|
490
|
+
/** A gate a task's runs must also hold a concurrency slot in while executing.
|
|
491
|
+
* `queue` is the gate queue's name. When `concurrencyKey` is omitted the run's own
|
|
492
|
+
* `concurrencyKey` is used, so the gate is keyed per tenant; a literal value pins
|
|
493
|
+
* the gate to one shared slot pool. */
|
|
494
|
+
export declare const QueueGateManifest: z.ZodObject<{
|
|
495
|
+
queue: z.ZodString;
|
|
496
|
+
concurrencyKey: z.ZodOptional<z.ZodString>;
|
|
497
|
+
}, z.core.$strip>;
|
|
498
|
+
export type QueueGateManifest = z.infer<typeof QueueGateManifest>;
|
|
499
|
+
/** One limit shape everywhere a limit appears: perKey caps each concurrencyKey pool
|
|
500
|
+
* (runs without a key share one pool); total caps across everything, keys or not.
|
|
501
|
+
* Limits start at 1 — "block everything" is a pause or an override, not a declared
|
|
502
|
+
* limit — so a stored zero always means "no limit" in metrics and engine keys. */
|
|
503
|
+
export declare const ConcurrencyShapeManifest: z.ZodObject<{
|
|
504
|
+
perKey: z.ZodOptional<z.ZodNumber>;
|
|
505
|
+
total: z.ZodOptional<z.ZodNumber>;
|
|
506
|
+
}, z.core.$strip>;
|
|
507
|
+
export type ConcurrencyShapeManifest = z.infer<typeof ConcurrencyShapeManifest>;
|
|
508
|
+
/** A named, shareable concurrency limit declared with concurrencyLimit(). */
|
|
509
|
+
export declare const ConcurrencyLimitManifest: z.ZodObject<{
|
|
510
|
+
perKey: z.ZodOptional<z.ZodNumber>;
|
|
511
|
+
total: z.ZodOptional<z.ZodNumber>;
|
|
512
|
+
name: z.ZodString;
|
|
513
|
+
}, z.core.$strip>;
|
|
514
|
+
export type ConcurrencyLimitManifest = z.infer<typeof ConcurrencyLimitManifest>;
|
|
515
|
+
/** A task's concurrency declaration: an optional inline limit scoped to the task,
|
|
516
|
+
* plus up to two named limits the task's runs also hold while executing. */
|
|
517
|
+
export declare const TaskConcurrencyManifest: z.ZodObject<{
|
|
518
|
+
inline: z.ZodOptional<z.ZodObject<{
|
|
519
|
+
perKey: z.ZodOptional<z.ZodNumber>;
|
|
520
|
+
total: z.ZodOptional<z.ZodNumber>;
|
|
521
|
+
}, z.core.$strip>>;
|
|
522
|
+
limits: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
523
|
+
}, z.core.$strip>;
|
|
524
|
+
export type TaskConcurrencyManifest = z.infer<typeof TaskConcurrencyManifest>;
|
|
489
525
|
export declare const ScheduleMetadata: z.ZodObject<{
|
|
490
526
|
cron: z.ZodString;
|
|
491
527
|
timezone: z.ZodString;
|
|
@@ -502,8 +538,20 @@ export declare const TaskMetadata: z.ZodObject<{
|
|
|
502
538
|
description: z.ZodOptional<z.ZodString>;
|
|
503
539
|
queue: z.ZodOptional<z.ZodObject<{
|
|
504
540
|
concurrencyLimit: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
541
|
+
combinedConcurrencyLimit: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
505
542
|
name: z.ZodOptional<z.ZodString>;
|
|
506
543
|
}, z.core.$strip>>;
|
|
544
|
+
gates: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
545
|
+
queue: z.ZodString;
|
|
546
|
+
concurrencyKey: z.ZodOptional<z.ZodString>;
|
|
547
|
+
}, z.core.$strip>>>;
|
|
548
|
+
concurrency: z.ZodOptional<z.ZodObject<{
|
|
549
|
+
inline: z.ZodOptional<z.ZodObject<{
|
|
550
|
+
perKey: z.ZodOptional<z.ZodNumber>;
|
|
551
|
+
total: z.ZodOptional<z.ZodNumber>;
|
|
552
|
+
}, z.core.$strip>>;
|
|
553
|
+
limits: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
554
|
+
}, z.core.$strip>>;
|
|
507
555
|
retry: z.ZodOptional<z.ZodObject<{
|
|
508
556
|
maxAttempts: z.ZodOptional<z.ZodNumber>;
|
|
509
557
|
factor: z.ZodOptional<z.ZodNumber>;
|
|
@@ -571,8 +619,20 @@ export declare const TaskManifest: z.ZodObject<{
|
|
|
571
619
|
description: z.ZodOptional<z.ZodString>;
|
|
572
620
|
queue: z.ZodOptional<z.ZodObject<{
|
|
573
621
|
concurrencyLimit: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
622
|
+
combinedConcurrencyLimit: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
574
623
|
name: z.ZodOptional<z.ZodString>;
|
|
575
624
|
}, z.core.$strip>>;
|
|
625
|
+
gates: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
626
|
+
queue: z.ZodString;
|
|
627
|
+
concurrencyKey: z.ZodOptional<z.ZodString>;
|
|
628
|
+
}, z.core.$strip>>>;
|
|
629
|
+
concurrency: z.ZodOptional<z.ZodObject<{
|
|
630
|
+
inline: z.ZodOptional<z.ZodObject<{
|
|
631
|
+
perKey: z.ZodOptional<z.ZodNumber>;
|
|
632
|
+
total: z.ZodOptional<z.ZodNumber>;
|
|
633
|
+
}, z.core.$strip>>;
|
|
634
|
+
limits: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
635
|
+
}, z.core.$strip>>;
|
|
576
636
|
retry: z.ZodOptional<z.ZodObject<{
|
|
577
637
|
maxAttempts: z.ZodOptional<z.ZodNumber>;
|
|
578
638
|
factor: z.ZodOptional<z.ZodNumber>;
|
|
@@ -846,7 +906,18 @@ export declare const WebhookMetadata: z.ZodObject<{
|
|
|
846
906
|
handshake: z.ZodOptional<z.ZodObject<{
|
|
847
907
|
matchPath: z.ZodString;
|
|
848
908
|
matchValue: z.ZodString;
|
|
849
|
-
respondPath: z.ZodString
|
|
909
|
+
respondPath: z.ZodOptional<z.ZodString>;
|
|
910
|
+
respondStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<200>, z.ZodLiteral<204>]>>;
|
|
911
|
+
}, z.core.$strip>>;
|
|
912
|
+
getHandshake: z.ZodOptional<z.ZodObject<{
|
|
913
|
+
matchParam: z.ZodOptional<z.ZodString>;
|
|
914
|
+
matchValue: z.ZodOptional<z.ZodString>;
|
|
915
|
+
tokenParam: z.ZodString;
|
|
916
|
+
challengeParam: z.ZodString;
|
|
917
|
+
}, z.core.$strip>>;
|
|
918
|
+
response: z.ZodOptional<z.ZodObject<{
|
|
919
|
+
acceptedStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<200>, z.ZodLiteral<202>, z.ZodLiteral<204>]>>;
|
|
920
|
+
rejectedStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<400>, z.ZodLiteral<401>, z.ZodLiteral<403>]>>;
|
|
850
921
|
}, z.core.$strip>>;
|
|
851
922
|
}, z.core.$strip>, z.ZodObject<{
|
|
852
923
|
kind: z.ZodLiteral<"preset">;
|
|
@@ -1030,7 +1101,18 @@ export declare const WebhookMetadata: z.ZodObject<{
|
|
|
1030
1101
|
handshake: z.ZodOptional<z.ZodObject<{
|
|
1031
1102
|
matchPath: z.ZodString;
|
|
1032
1103
|
matchValue: z.ZodString;
|
|
1033
|
-
respondPath: z.ZodString
|
|
1104
|
+
respondPath: z.ZodOptional<z.ZodString>;
|
|
1105
|
+
respondStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<200>, z.ZodLiteral<204>]>>;
|
|
1106
|
+
}, z.core.$strip>>;
|
|
1107
|
+
getHandshake: z.ZodOptional<z.ZodObject<{
|
|
1108
|
+
matchParam: z.ZodOptional<z.ZodString>;
|
|
1109
|
+
matchValue: z.ZodOptional<z.ZodString>;
|
|
1110
|
+
tokenParam: z.ZodString;
|
|
1111
|
+
challengeParam: z.ZodString;
|
|
1112
|
+
}, z.core.$strip>>;
|
|
1113
|
+
response: z.ZodOptional<z.ZodObject<{
|
|
1114
|
+
acceptedStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<200>, z.ZodLiteral<202>, z.ZodLiteral<204>]>>;
|
|
1115
|
+
rejectedStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<400>, z.ZodLiteral<401>, z.ZodLiteral<403>]>>;
|
|
1034
1116
|
}, z.core.$strip>>;
|
|
1035
1117
|
}, z.core.$strip>, z.ZodObject<{
|
|
1036
1118
|
kind: z.ZodLiteral<"bundle">;
|
|
@@ -1250,7 +1332,18 @@ export declare const WebhookManifest: z.ZodObject<{
|
|
|
1250
1332
|
handshake: z.ZodOptional<z.ZodObject<{
|
|
1251
1333
|
matchPath: z.ZodString;
|
|
1252
1334
|
matchValue: z.ZodString;
|
|
1253
|
-
respondPath: z.ZodString
|
|
1335
|
+
respondPath: z.ZodOptional<z.ZodString>;
|
|
1336
|
+
respondStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<200>, z.ZodLiteral<204>]>>;
|
|
1337
|
+
}, z.core.$strip>>;
|
|
1338
|
+
getHandshake: z.ZodOptional<z.ZodObject<{
|
|
1339
|
+
matchParam: z.ZodOptional<z.ZodString>;
|
|
1340
|
+
matchValue: z.ZodOptional<z.ZodString>;
|
|
1341
|
+
tokenParam: z.ZodString;
|
|
1342
|
+
challengeParam: z.ZodString;
|
|
1343
|
+
}, z.core.$strip>>;
|
|
1344
|
+
response: z.ZodOptional<z.ZodObject<{
|
|
1345
|
+
acceptedStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<200>, z.ZodLiteral<202>, z.ZodLiteral<204>]>>;
|
|
1346
|
+
rejectedStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<400>, z.ZodLiteral<401>, z.ZodLiteral<403>]>>;
|
|
1254
1347
|
}, z.core.$strip>>;
|
|
1255
1348
|
}, z.core.$strip>, z.ZodObject<{
|
|
1256
1349
|
kind: z.ZodLiteral<"preset">;
|
|
@@ -1434,7 +1527,18 @@ export declare const WebhookManifest: z.ZodObject<{
|
|
|
1434
1527
|
handshake: z.ZodOptional<z.ZodObject<{
|
|
1435
1528
|
matchPath: z.ZodString;
|
|
1436
1529
|
matchValue: z.ZodString;
|
|
1437
|
-
respondPath: z.ZodString
|
|
1530
|
+
respondPath: z.ZodOptional<z.ZodString>;
|
|
1531
|
+
respondStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<200>, z.ZodLiteral<204>]>>;
|
|
1532
|
+
}, z.core.$strip>>;
|
|
1533
|
+
getHandshake: z.ZodOptional<z.ZodObject<{
|
|
1534
|
+
matchParam: z.ZodOptional<z.ZodString>;
|
|
1535
|
+
matchValue: z.ZodOptional<z.ZodString>;
|
|
1536
|
+
tokenParam: z.ZodString;
|
|
1537
|
+
challengeParam: z.ZodString;
|
|
1538
|
+
}, z.core.$strip>>;
|
|
1539
|
+
response: z.ZodOptional<z.ZodObject<{
|
|
1540
|
+
acceptedStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<200>, z.ZodLiteral<202>, z.ZodLiteral<204>]>>;
|
|
1541
|
+
rejectedStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<400>, z.ZodLiteral<401>, z.ZodLiteral<403>]>>;
|
|
1438
1542
|
}, z.core.$strip>>;
|
|
1439
1543
|
}, z.core.$strip>, z.ZodObject<{
|
|
1440
1544
|
kind: z.ZodLiteral<"bundle">;
|