@trigger.dev/core 0.0.0-prerelease-20250116195421 → 0.0.0-prerelease-20250204161430
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/logger.js +38 -0
- package/dist/commonjs/logger.js.map +1 -1
- package/dist/commonjs/schemas/api.d.ts +2123 -2123
- package/dist/commonjs/schemas/events.d.ts +8 -8
- package/dist/commonjs/schemas/fetch.d.ts +54 -54
- package/dist/commonjs/schemas/integrations.d.ts +4 -4
- package/dist/commonjs/schemas/notifications.d.ts +80 -80
- package/dist/commonjs/schemas/properties.d.ts +4 -4
- package/dist/commonjs/schemas/request.d.ts +4 -4
- package/dist/commonjs/schemas/requestFilter.d.ts +2 -2
- package/dist/commonjs/schemas/runs.d.ts +39 -39
- package/dist/commonjs/schemas/schedules.d.ts +12 -12
- package/dist/commonjs/schemas/statuses.d.ts +24 -24
- package/dist/commonjs/schemas/tasks.d.ts +54 -54
- package/dist/commonjs/schemas/triggers.d.ts +36 -36
- package/dist/commonjs/v3/apiClient/core.d.ts +26 -2
- package/dist/commonjs/v3/apiClient/core.js +51 -1
- package/dist/commonjs/v3/apiClient/core.js.map +1 -1
- package/dist/commonjs/v3/apiClient/index.d.ts +70 -70
- package/dist/commonjs/v3/apiClient/index.js.map +1 -1
- package/dist/commonjs/v3/build/runtime.js +15 -1
- package/dist/commonjs/v3/build/runtime.js.map +1 -1
- package/dist/commonjs/v3/runtime/preventMultipleWaits.d.ts +1 -0
- package/dist/commonjs/v3/schemas/api.d.ts +406 -403
- package/dist/commonjs/v3/schemas/api.js +1 -0
- package/dist/commonjs/v3/schemas/api.js.map +1 -1
- package/dist/commonjs/v3/schemas/build.d.ts +178 -178
- package/dist/commonjs/v3/schemas/common.d.ts +1374 -1374
- package/dist/commonjs/v3/schemas/messages.d.ts +3001 -2959
- package/dist/commonjs/v3/schemas/messages.js +4 -4
- package/dist/commonjs/v3/schemas/messages.js.map +1 -1
- package/dist/commonjs/v3/schemas/openTelemetry.d.ts +20 -20
- package/dist/commonjs/v3/schemas/resources.d.ts +52 -52
- package/dist/commonjs/v3/schemas/schemas.d.ts +239 -239
- package/dist/commonjs/v3/schemas/schemas.js +2 -2
- package/dist/commonjs/v3/schemas/schemas.js.map +1 -1
- package/dist/commonjs/v3/schemas/style.d.ts +10 -10
- package/dist/commonjs/v3/zodMessageHandler.d.ts +4 -2
- package/dist/commonjs/v3/zodMessageHandler.js +8 -0
- package/dist/commonjs/v3/zodMessageHandler.js.map +1 -1
- package/dist/commonjs/version.js +1 -1
- package/dist/esm/logger.js +38 -0
- package/dist/esm/logger.js.map +1 -1
- package/dist/esm/schemas/api.d.ts +2123 -2123
- package/dist/esm/schemas/events.d.ts +8 -8
- package/dist/esm/schemas/fetch.d.ts +54 -54
- package/dist/esm/schemas/integrations.d.ts +4 -4
- package/dist/esm/schemas/notifications.d.ts +80 -80
- package/dist/esm/schemas/properties.d.ts +4 -4
- package/dist/esm/schemas/request.d.ts +4 -4
- package/dist/esm/schemas/requestFilter.d.ts +2 -2
- package/dist/esm/schemas/runs.d.ts +39 -39
- package/dist/esm/schemas/schedules.d.ts +12 -12
- package/dist/esm/schemas/statuses.d.ts +24 -24
- package/dist/esm/schemas/tasks.d.ts +54 -54
- package/dist/esm/schemas/triggers.d.ts +36 -36
- package/dist/esm/v3/apiClient/core.d.ts +26 -2
- package/dist/esm/v3/apiClient/core.js +48 -0
- package/dist/esm/v3/apiClient/core.js.map +1 -1
- package/dist/esm/v3/apiClient/index.d.ts +70 -70
- package/dist/esm/v3/apiClient/index.js.map +1 -1
- package/dist/esm/v3/build/runtime.js +15 -1
- package/dist/esm/v3/build/runtime.js.map +1 -1
- package/dist/esm/v3/schemas/api.d.ts +406 -403
- package/dist/esm/v3/schemas/api.js +1 -0
- package/dist/esm/v3/schemas/api.js.map +1 -1
- package/dist/esm/v3/schemas/build.d.ts +178 -178
- package/dist/esm/v3/schemas/common.d.ts +1374 -1374
- package/dist/esm/v3/schemas/messages.d.ts +3001 -2959
- package/dist/esm/v3/schemas/messages.js +3 -3
- package/dist/esm/v3/schemas/messages.js.map +1 -1
- package/dist/esm/v3/schemas/openTelemetry.d.ts +20 -20
- package/dist/esm/v3/schemas/resources.d.ts +52 -52
- package/dist/esm/v3/schemas/schemas.d.ts +239 -239
- package/dist/esm/v3/schemas/schemas.js +2 -2
- package/dist/esm/v3/schemas/schemas.js.map +1 -1
- package/dist/esm/v3/schemas/style.d.ts +10 -10
- package/dist/esm/v3/zodMessageHandler.d.ts +4 -2
- package/dist/esm/v3/zodMessageHandler.js +8 -0
- package/dist/esm/v3/zodMessageHandler.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/package.json +2 -1
|
@@ -17,13 +17,13 @@ export declare const TaskSchema: z.ZodObject<{
|
|
|
17
17
|
url: z.ZodOptional<z.ZodString>;
|
|
18
18
|
imageUrl: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
19
19
|
}, "strip", z.ZodTypeAny, {
|
|
20
|
-
text: string;
|
|
21
20
|
label: string;
|
|
21
|
+
text: string;
|
|
22
22
|
url?: string | undefined;
|
|
23
23
|
imageUrl?: string[] | undefined;
|
|
24
24
|
}, {
|
|
25
|
-
text: string;
|
|
26
25
|
label: string;
|
|
26
|
+
text: string;
|
|
27
27
|
url?: string | undefined;
|
|
28
28
|
imageUrl?: string[] | undefined;
|
|
29
29
|
}>, "many">>>;
|
|
@@ -33,13 +33,13 @@ export declare const TaskSchema: z.ZodObject<{
|
|
|
33
33
|
url: z.ZodOptional<z.ZodString>;
|
|
34
34
|
imageUrl: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
35
35
|
}, "strip", z.ZodTypeAny, {
|
|
36
|
-
text: string;
|
|
37
36
|
label: string;
|
|
37
|
+
text: string;
|
|
38
38
|
url?: string | undefined;
|
|
39
39
|
imageUrl?: string[] | undefined;
|
|
40
40
|
}, {
|
|
41
|
-
text: string;
|
|
42
41
|
label: string;
|
|
42
|
+
text: string;
|
|
43
43
|
url?: string | undefined;
|
|
44
44
|
imageUrl?: string[] | undefined;
|
|
45
45
|
}>, "many">>>;
|
|
@@ -62,71 +62,71 @@ export declare const TaskSchema: z.ZodObject<{
|
|
|
62
62
|
callbackUrl: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
63
63
|
childExecutionMode: z.ZodNullable<z.ZodOptional<z.ZodEnum<["SEQUENTIAL", "PARALLEL"]>>>;
|
|
64
64
|
}, "strip", z.ZodTypeAny, {
|
|
65
|
-
status: "PENDING" | "
|
|
65
|
+
status: "PENDING" | "WAITING" | "RUNNING" | "COMPLETED" | "ERRORED" | "CANCELED";
|
|
66
66
|
name: string;
|
|
67
67
|
id: string;
|
|
68
68
|
noop: boolean;
|
|
69
69
|
params?: import("./json.js").DeserializedJson | undefined;
|
|
70
70
|
context?: import("./json.js").DeserializedJson | undefined;
|
|
71
|
-
startedAt?: Date | null | undefined;
|
|
72
|
-
error?: string | null | undefined;
|
|
73
|
-
output?: import("./json.js").DeserializedJson | undefined;
|
|
74
|
-
description?: string | null | undefined;
|
|
75
|
-
completedAt?: Date | null | undefined;
|
|
76
|
-
delayUntil?: Date | null | undefined;
|
|
77
|
-
operation?: string | null | undefined;
|
|
78
71
|
style?: {
|
|
79
72
|
style: "normal" | "minimal";
|
|
80
73
|
variant?: string | undefined;
|
|
81
74
|
} | null | undefined;
|
|
82
75
|
icon?: string | null | undefined;
|
|
76
|
+
startedAt?: Date | null | undefined;
|
|
77
|
+
completedAt?: Date | null | undefined;
|
|
78
|
+
delayUntil?: Date | null | undefined;
|
|
79
|
+
description?: string | null | undefined;
|
|
83
80
|
properties?: {
|
|
84
|
-
text: string;
|
|
85
81
|
label: string;
|
|
82
|
+
text: string;
|
|
86
83
|
url?: string | undefined;
|
|
87
84
|
imageUrl?: string[] | undefined;
|
|
88
85
|
}[] | null | undefined;
|
|
89
86
|
outputProperties?: {
|
|
90
|
-
text: string;
|
|
91
87
|
label: string;
|
|
88
|
+
text: string;
|
|
92
89
|
url?: string | undefined;
|
|
93
90
|
imageUrl?: string[] | undefined;
|
|
94
91
|
}[] | null | undefined;
|
|
92
|
+
output?: import("./json.js").DeserializedJson | undefined;
|
|
93
|
+
error?: string | null | undefined;
|
|
95
94
|
parentId?: string | null | undefined;
|
|
95
|
+
operation?: string | null | undefined;
|
|
96
96
|
callbackUrl?: string | null | undefined;
|
|
97
97
|
childExecutionMode?: "SEQUENTIAL" | "PARALLEL" | null | undefined;
|
|
98
98
|
}, {
|
|
99
|
-
status: "PENDING" | "
|
|
99
|
+
status: "PENDING" | "WAITING" | "RUNNING" | "COMPLETED" | "ERRORED" | "CANCELED";
|
|
100
100
|
name: string;
|
|
101
101
|
id: string;
|
|
102
102
|
noop: boolean;
|
|
103
103
|
params?: import("./json.js").DeserializedJson | undefined;
|
|
104
104
|
context?: import("./json.js").DeserializedJson | undefined;
|
|
105
|
-
startedAt?: Date | null | undefined;
|
|
106
|
-
error?: string | null | undefined;
|
|
107
|
-
output?: import("./json.js").DeserializedJson | undefined;
|
|
108
|
-
description?: string | null | undefined;
|
|
109
|
-
completedAt?: Date | null | undefined;
|
|
110
|
-
delayUntil?: Date | null | undefined;
|
|
111
|
-
operation?: string | null | undefined;
|
|
112
105
|
style?: {
|
|
113
106
|
style: "normal" | "minimal";
|
|
114
107
|
variant?: string | undefined;
|
|
115
108
|
} | null | undefined;
|
|
116
109
|
icon?: string | null | undefined;
|
|
110
|
+
startedAt?: Date | null | undefined;
|
|
111
|
+
completedAt?: Date | null | undefined;
|
|
112
|
+
delayUntil?: Date | null | undefined;
|
|
113
|
+
description?: string | null | undefined;
|
|
117
114
|
properties?: {
|
|
118
|
-
text: string;
|
|
119
115
|
label: string;
|
|
116
|
+
text: string;
|
|
120
117
|
url?: string | undefined;
|
|
121
118
|
imageUrl?: string[] | undefined;
|
|
122
119
|
}[] | null | undefined;
|
|
123
120
|
outputProperties?: {
|
|
124
|
-
text: string;
|
|
125
121
|
label: string;
|
|
122
|
+
text: string;
|
|
126
123
|
url?: string | undefined;
|
|
127
124
|
imageUrl?: string[] | undefined;
|
|
128
125
|
}[] | null | undefined;
|
|
126
|
+
output?: import("./json.js").DeserializedJson | undefined;
|
|
127
|
+
error?: string | null | undefined;
|
|
129
128
|
parentId?: string | null | undefined;
|
|
129
|
+
operation?: string | null | undefined;
|
|
130
130
|
callbackUrl?: string | null | undefined;
|
|
131
131
|
childExecutionMode?: "SEQUENTIAL" | "PARALLEL" | null | undefined;
|
|
132
132
|
}>;
|
|
@@ -146,13 +146,13 @@ export declare const ServerTaskSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
146
146
|
url: z.ZodOptional<z.ZodString>;
|
|
147
147
|
imageUrl: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
148
148
|
}, "strip", z.ZodTypeAny, {
|
|
149
|
-
text: string;
|
|
150
149
|
label: string;
|
|
150
|
+
text: string;
|
|
151
151
|
url?: string | undefined;
|
|
152
152
|
imageUrl?: string[] | undefined;
|
|
153
153
|
}, {
|
|
154
|
-
text: string;
|
|
155
154
|
label: string;
|
|
155
|
+
text: string;
|
|
156
156
|
url?: string | undefined;
|
|
157
157
|
imageUrl?: string[] | undefined;
|
|
158
158
|
}>, "many">>>;
|
|
@@ -162,13 +162,13 @@ export declare const ServerTaskSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
162
162
|
url: z.ZodOptional<z.ZodString>;
|
|
163
163
|
imageUrl: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
164
164
|
}, "strip", z.ZodTypeAny, {
|
|
165
|
-
text: string;
|
|
166
165
|
label: string;
|
|
166
|
+
text: string;
|
|
167
167
|
url?: string | undefined;
|
|
168
168
|
imageUrl?: string[] | undefined;
|
|
169
169
|
}, {
|
|
170
|
-
text: string;
|
|
171
170
|
label: string;
|
|
171
|
+
text: string;
|
|
172
172
|
url?: string | undefined;
|
|
173
173
|
imageUrl?: string[] | undefined;
|
|
174
174
|
}>, "many">>>;
|
|
@@ -195,76 +195,76 @@ export declare const ServerTaskSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
195
195
|
attempts: z.ZodNumber;
|
|
196
196
|
forceYield: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
|
|
197
197
|
}>, "strip", z.ZodTypeAny, {
|
|
198
|
-
status: "PENDING" | "
|
|
198
|
+
status: "PENDING" | "WAITING" | "RUNNING" | "COMPLETED" | "ERRORED" | "CANCELED";
|
|
199
199
|
name: string;
|
|
200
200
|
id: string;
|
|
201
|
+
noop: boolean;
|
|
201
202
|
idempotencyKey: string;
|
|
202
203
|
attempts: number;
|
|
203
|
-
noop: boolean;
|
|
204
204
|
params?: import("./json.js").DeserializedJson | undefined;
|
|
205
205
|
context?: import("./json.js").DeserializedJson | undefined;
|
|
206
|
-
startedAt?: Date | null | undefined;
|
|
207
|
-
error?: string | null | undefined;
|
|
208
|
-
output?: import("./json.js").DeserializedJson | undefined;
|
|
209
|
-
description?: string | null | undefined;
|
|
210
|
-
completedAt?: Date | null | undefined;
|
|
211
|
-
delayUntil?: Date | null | undefined;
|
|
212
|
-
operation?: string | null | undefined;
|
|
213
206
|
style?: {
|
|
214
207
|
style: "normal" | "minimal";
|
|
215
208
|
variant?: string | undefined;
|
|
216
209
|
} | null | undefined;
|
|
217
210
|
icon?: string | null | undefined;
|
|
211
|
+
startedAt?: Date | null | undefined;
|
|
212
|
+
completedAt?: Date | null | undefined;
|
|
213
|
+
delayUntil?: Date | null | undefined;
|
|
214
|
+
description?: string | null | undefined;
|
|
218
215
|
properties?: {
|
|
219
|
-
text: string;
|
|
220
216
|
label: string;
|
|
217
|
+
text: string;
|
|
221
218
|
url?: string | undefined;
|
|
222
219
|
imageUrl?: string[] | undefined;
|
|
223
220
|
}[] | null | undefined;
|
|
224
221
|
outputProperties?: {
|
|
225
|
-
text: string;
|
|
226
222
|
label: string;
|
|
223
|
+
text: string;
|
|
227
224
|
url?: string | undefined;
|
|
228
225
|
imageUrl?: string[] | undefined;
|
|
229
226
|
}[] | null | undefined;
|
|
227
|
+
output?: import("./json.js").DeserializedJson | undefined;
|
|
228
|
+
error?: string | null | undefined;
|
|
230
229
|
parentId?: string | null | undefined;
|
|
230
|
+
operation?: string | null | undefined;
|
|
231
231
|
callbackUrl?: string | null | undefined;
|
|
232
232
|
childExecutionMode?: "SEQUENTIAL" | "PARALLEL" | null | undefined;
|
|
233
233
|
forceYield?: boolean | null | undefined;
|
|
234
234
|
}, {
|
|
235
|
-
status: "PENDING" | "
|
|
235
|
+
status: "PENDING" | "WAITING" | "RUNNING" | "COMPLETED" | "ERRORED" | "CANCELED";
|
|
236
236
|
name: string;
|
|
237
237
|
id: string;
|
|
238
|
+
noop: boolean;
|
|
238
239
|
idempotencyKey: string;
|
|
239
240
|
attempts: number;
|
|
240
|
-
noop: boolean;
|
|
241
241
|
params?: import("./json.js").DeserializedJson | undefined;
|
|
242
242
|
context?: import("./json.js").DeserializedJson | undefined;
|
|
243
|
-
startedAt?: Date | null | undefined;
|
|
244
|
-
error?: string | null | undefined;
|
|
245
|
-
output?: import("./json.js").DeserializedJson | undefined;
|
|
246
|
-
description?: string | null | undefined;
|
|
247
|
-
completedAt?: Date | null | undefined;
|
|
248
|
-
delayUntil?: Date | null | undefined;
|
|
249
|
-
operation?: string | null | undefined;
|
|
250
243
|
style?: {
|
|
251
244
|
style: "normal" | "minimal";
|
|
252
245
|
variant?: string | undefined;
|
|
253
246
|
} | null | undefined;
|
|
254
247
|
icon?: string | null | undefined;
|
|
248
|
+
startedAt?: Date | null | undefined;
|
|
249
|
+
completedAt?: Date | null | undefined;
|
|
250
|
+
delayUntil?: Date | null | undefined;
|
|
251
|
+
description?: string | null | undefined;
|
|
255
252
|
properties?: {
|
|
256
|
-
text: string;
|
|
257
253
|
label: string;
|
|
254
|
+
text: string;
|
|
258
255
|
url?: string | undefined;
|
|
259
256
|
imageUrl?: string[] | undefined;
|
|
260
257
|
}[] | null | undefined;
|
|
261
258
|
outputProperties?: {
|
|
262
|
-
text: string;
|
|
263
259
|
label: string;
|
|
260
|
+
text: string;
|
|
264
261
|
url?: string | undefined;
|
|
265
262
|
imageUrl?: string[] | undefined;
|
|
266
263
|
}[] | null | undefined;
|
|
264
|
+
output?: import("./json.js").DeserializedJson | undefined;
|
|
265
|
+
error?: string | null | undefined;
|
|
267
266
|
parentId?: string | null | undefined;
|
|
267
|
+
operation?: string | null | undefined;
|
|
268
268
|
callbackUrl?: string | null | undefined;
|
|
269
269
|
childExecutionMode?: "SEQUENTIAL" | "PARALLEL" | null | undefined;
|
|
270
270
|
forceYield?: boolean | null | undefined;
|
|
@@ -278,17 +278,17 @@ export declare const CachedTaskSchema: z.ZodObject<{
|
|
|
278
278
|
output: z.ZodNullable<z.ZodOptional<z.ZodType<import("./json.js").DeserializedJson, z.ZodTypeDef, import("./json.js").DeserializedJson>>>;
|
|
279
279
|
parentId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
280
280
|
}, "strip", z.ZodTypeAny, {
|
|
281
|
-
status: "PENDING" | "
|
|
281
|
+
status: "PENDING" | "WAITING" | "RUNNING" | "COMPLETED" | "ERRORED" | "CANCELED";
|
|
282
282
|
id: string;
|
|
283
|
-
idempotencyKey: string;
|
|
284
283
|
noop: boolean;
|
|
284
|
+
idempotencyKey: string;
|
|
285
285
|
output?: import("./json.js").DeserializedJson | undefined;
|
|
286
286
|
parentId?: string | null | undefined;
|
|
287
287
|
}, {
|
|
288
|
-
status: "PENDING" | "
|
|
288
|
+
status: "PENDING" | "WAITING" | "RUNNING" | "COMPLETED" | "ERRORED" | "CANCELED";
|
|
289
289
|
id: string;
|
|
290
290
|
idempotencyKey: string;
|
|
291
|
-
output?: import("./json.js").DeserializedJson | undefined;
|
|
292
291
|
noop?: boolean | undefined;
|
|
292
|
+
output?: import("./json.js").DeserializedJson | undefined;
|
|
293
293
|
parentId?: string | null | undefined;
|
|
294
294
|
}>;
|
|
@@ -28,13 +28,13 @@ export declare const EventSpecificationSchema: z.ZodObject<{
|
|
|
28
28
|
url: z.ZodOptional<z.ZodString>;
|
|
29
29
|
imageUrl: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
30
30
|
}, "strip", z.ZodTypeAny, {
|
|
31
|
-
text: string;
|
|
32
31
|
label: string;
|
|
32
|
+
text: string;
|
|
33
33
|
url?: string | undefined;
|
|
34
34
|
imageUrl?: string[] | undefined;
|
|
35
35
|
}, {
|
|
36
|
-
text: string;
|
|
37
36
|
label: string;
|
|
37
|
+
text: string;
|
|
38
38
|
url?: string | undefined;
|
|
39
39
|
imageUrl?: string[] | undefined;
|
|
40
40
|
}>, "many">>;
|
|
@@ -56,14 +56,14 @@ export declare const EventSpecificationSchema: z.ZodObject<{
|
|
|
56
56
|
icon?: string | undefined;
|
|
57
57
|
}>, "many">>;
|
|
58
58
|
}, "strip", z.ZodTypeAny, {
|
|
59
|
-
name: string | string[];
|
|
60
|
-
title: string;
|
|
61
59
|
source: string;
|
|
60
|
+
name: string | string[];
|
|
62
61
|
icon: string;
|
|
62
|
+
title: string;
|
|
63
63
|
filter?: import("./eventFilter.js").EventFilter | undefined;
|
|
64
64
|
properties?: {
|
|
65
|
-
text: string;
|
|
66
65
|
label: string;
|
|
66
|
+
text: string;
|
|
67
67
|
url?: string | undefined;
|
|
68
68
|
imageUrl?: string[] | undefined;
|
|
69
69
|
}[] | undefined;
|
|
@@ -75,14 +75,14 @@ export declare const EventSpecificationSchema: z.ZodObject<{
|
|
|
75
75
|
icon?: string | undefined;
|
|
76
76
|
}[] | undefined;
|
|
77
77
|
}, {
|
|
78
|
-
name: string | string[];
|
|
79
|
-
title: string;
|
|
80
78
|
source: string;
|
|
79
|
+
name: string | string[];
|
|
81
80
|
icon: string;
|
|
81
|
+
title: string;
|
|
82
82
|
filter?: import("./eventFilter.js").EventFilter | undefined;
|
|
83
83
|
properties?: {
|
|
84
|
-
text: string;
|
|
85
84
|
label: string;
|
|
85
|
+
text: string;
|
|
86
86
|
url?: string | undefined;
|
|
87
87
|
imageUrl?: string[] | undefined;
|
|
88
88
|
}[] | undefined;
|
|
@@ -135,13 +135,13 @@ export declare const StaticTriggerMetadataSchema: z.ZodObject<{
|
|
|
135
135
|
url: z.ZodOptional<z.ZodString>;
|
|
136
136
|
imageUrl: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
137
137
|
}, "strip", z.ZodTypeAny, {
|
|
138
|
-
text: string;
|
|
139
138
|
label: string;
|
|
139
|
+
text: string;
|
|
140
140
|
url?: string | undefined;
|
|
141
141
|
imageUrl?: string[] | undefined;
|
|
142
142
|
}, {
|
|
143
|
-
text: string;
|
|
144
143
|
label: string;
|
|
144
|
+
text: string;
|
|
145
145
|
url?: string | undefined;
|
|
146
146
|
imageUrl?: string[] | undefined;
|
|
147
147
|
}>, "many">>;
|
|
@@ -193,13 +193,13 @@ export declare const StaticTriggerMetadataSchema: z.ZodObject<{
|
|
|
193
193
|
payload?: import("./eventFilter.js").EventFilter | undefined;
|
|
194
194
|
context?: import("./eventFilter.js").EventFilter | undefined;
|
|
195
195
|
};
|
|
196
|
-
link?: string | undefined;
|
|
197
196
|
properties?: {
|
|
198
|
-
text: string;
|
|
199
197
|
label: string;
|
|
198
|
+
text: string;
|
|
200
199
|
url?: string | undefined;
|
|
201
200
|
imageUrl?: string[] | undefined;
|
|
202
201
|
}[] | undefined;
|
|
202
|
+
link?: string | undefined;
|
|
203
203
|
help?: {
|
|
204
204
|
noRuns?: {
|
|
205
205
|
text: string;
|
|
@@ -215,13 +215,13 @@ export declare const StaticTriggerMetadataSchema: z.ZodObject<{
|
|
|
215
215
|
payload?: import("./eventFilter.js").EventFilter | undefined;
|
|
216
216
|
context?: import("./eventFilter.js").EventFilter | undefined;
|
|
217
217
|
};
|
|
218
|
-
link?: string | undefined;
|
|
219
218
|
properties?: {
|
|
220
|
-
text: string;
|
|
221
219
|
label: string;
|
|
220
|
+
text: string;
|
|
222
221
|
url?: string | undefined;
|
|
223
222
|
imageUrl?: string[] | undefined;
|
|
224
223
|
}[] | undefined;
|
|
224
|
+
link?: string | undefined;
|
|
225
225
|
help?: {
|
|
226
226
|
noRuns?: {
|
|
227
227
|
text: string;
|
|
@@ -250,17 +250,17 @@ export declare const ScheduledTriggerMetadataSchema: z.ZodObject<{
|
|
|
250
250
|
accountId: z.ZodOptional<z.ZodString>;
|
|
251
251
|
metadata: z.ZodAny;
|
|
252
252
|
}, "strip", z.ZodTypeAny, {
|
|
253
|
-
type: "interval";
|
|
254
253
|
options: {
|
|
255
254
|
seconds: number;
|
|
256
255
|
};
|
|
256
|
+
type: "interval";
|
|
257
257
|
metadata?: any;
|
|
258
258
|
accountId?: string | undefined;
|
|
259
259
|
}, {
|
|
260
|
-
type: "interval";
|
|
261
260
|
options: {
|
|
262
261
|
seconds: number;
|
|
263
262
|
};
|
|
263
|
+
type: "interval";
|
|
264
264
|
metadata?: any;
|
|
265
265
|
accountId?: string | undefined;
|
|
266
266
|
}>, z.ZodObject<{
|
|
@@ -275,51 +275,51 @@ export declare const ScheduledTriggerMetadataSchema: z.ZodObject<{
|
|
|
275
275
|
accountId: z.ZodOptional<z.ZodString>;
|
|
276
276
|
metadata: z.ZodAny;
|
|
277
277
|
}, "strip", z.ZodTypeAny, {
|
|
278
|
-
type: "cron";
|
|
279
278
|
options: {
|
|
280
279
|
cron: string;
|
|
281
280
|
};
|
|
281
|
+
type: "cron";
|
|
282
282
|
metadata?: any;
|
|
283
283
|
accountId?: string | undefined;
|
|
284
284
|
}, {
|
|
285
|
-
type: "cron";
|
|
286
285
|
options: {
|
|
287
286
|
cron: string;
|
|
288
287
|
};
|
|
288
|
+
type: "cron";
|
|
289
289
|
metadata?: any;
|
|
290
290
|
accountId?: string | undefined;
|
|
291
291
|
}>]>;
|
|
292
292
|
}, "strip", z.ZodTypeAny, {
|
|
293
293
|
type: "scheduled";
|
|
294
294
|
schedule: {
|
|
295
|
-
type: "cron";
|
|
296
295
|
options: {
|
|
297
296
|
cron: string;
|
|
298
297
|
};
|
|
298
|
+
type: "cron";
|
|
299
299
|
metadata?: any;
|
|
300
300
|
accountId?: string | undefined;
|
|
301
301
|
} | {
|
|
302
|
-
type: "interval";
|
|
303
302
|
options: {
|
|
304
303
|
seconds: number;
|
|
305
304
|
};
|
|
305
|
+
type: "interval";
|
|
306
306
|
metadata?: any;
|
|
307
307
|
accountId?: string | undefined;
|
|
308
308
|
};
|
|
309
309
|
}, {
|
|
310
310
|
type: "scheduled";
|
|
311
311
|
schedule: {
|
|
312
|
-
type: "cron";
|
|
313
312
|
options: {
|
|
314
313
|
cron: string;
|
|
315
314
|
};
|
|
315
|
+
type: "cron";
|
|
316
316
|
metadata?: any;
|
|
317
317
|
accountId?: string | undefined;
|
|
318
318
|
} | {
|
|
319
|
-
type: "interval";
|
|
320
319
|
options: {
|
|
321
320
|
seconds: number;
|
|
322
321
|
};
|
|
322
|
+
type: "interval";
|
|
323
323
|
metadata?: any;
|
|
324
324
|
accountId?: string | undefined;
|
|
325
325
|
};
|
|
@@ -342,13 +342,13 @@ export declare const TriggerMetadataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
|
|
|
342
342
|
url: z.ZodOptional<z.ZodString>;
|
|
343
343
|
imageUrl: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
344
344
|
}, "strip", z.ZodTypeAny, {
|
|
345
|
-
text: string;
|
|
346
345
|
label: string;
|
|
346
|
+
text: string;
|
|
347
347
|
url?: string | undefined;
|
|
348
348
|
imageUrl?: string[] | undefined;
|
|
349
349
|
}, {
|
|
350
|
-
text: string;
|
|
351
350
|
label: string;
|
|
351
|
+
text: string;
|
|
352
352
|
url?: string | undefined;
|
|
353
353
|
imageUrl?: string[] | undefined;
|
|
354
354
|
}>, "many">>;
|
|
@@ -400,13 +400,13 @@ export declare const TriggerMetadataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
|
|
|
400
400
|
payload?: import("./eventFilter.js").EventFilter | undefined;
|
|
401
401
|
context?: import("./eventFilter.js").EventFilter | undefined;
|
|
402
402
|
};
|
|
403
|
-
link?: string | undefined;
|
|
404
403
|
properties?: {
|
|
405
|
-
text: string;
|
|
406
404
|
label: string;
|
|
405
|
+
text: string;
|
|
407
406
|
url?: string | undefined;
|
|
408
407
|
imageUrl?: string[] | undefined;
|
|
409
408
|
}[] | undefined;
|
|
409
|
+
link?: string | undefined;
|
|
410
410
|
help?: {
|
|
411
411
|
noRuns?: {
|
|
412
412
|
text: string;
|
|
@@ -422,13 +422,13 @@ export declare const TriggerMetadataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
|
|
|
422
422
|
payload?: import("./eventFilter.js").EventFilter | undefined;
|
|
423
423
|
context?: import("./eventFilter.js").EventFilter | undefined;
|
|
424
424
|
};
|
|
425
|
-
link?: string | undefined;
|
|
426
425
|
properties?: {
|
|
427
|
-
text: string;
|
|
428
426
|
label: string;
|
|
427
|
+
text: string;
|
|
429
428
|
url?: string | undefined;
|
|
430
429
|
imageUrl?: string[] | undefined;
|
|
431
430
|
}[] | undefined;
|
|
431
|
+
link?: string | undefined;
|
|
432
432
|
help?: {
|
|
433
433
|
noRuns?: {
|
|
434
434
|
text: string;
|
|
@@ -449,17 +449,17 @@ export declare const TriggerMetadataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
|
|
|
449
449
|
accountId: z.ZodOptional<z.ZodString>;
|
|
450
450
|
metadata: z.ZodAny;
|
|
451
451
|
}, "strip", z.ZodTypeAny, {
|
|
452
|
-
type: "interval";
|
|
453
452
|
options: {
|
|
454
453
|
seconds: number;
|
|
455
454
|
};
|
|
455
|
+
type: "interval";
|
|
456
456
|
metadata?: any;
|
|
457
457
|
accountId?: string | undefined;
|
|
458
458
|
}, {
|
|
459
|
-
type: "interval";
|
|
460
459
|
options: {
|
|
461
460
|
seconds: number;
|
|
462
461
|
};
|
|
462
|
+
type: "interval";
|
|
463
463
|
metadata?: any;
|
|
464
464
|
accountId?: string | undefined;
|
|
465
465
|
}>, z.ZodObject<{
|
|
@@ -474,51 +474,51 @@ export declare const TriggerMetadataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
|
|
|
474
474
|
accountId: z.ZodOptional<z.ZodString>;
|
|
475
475
|
metadata: z.ZodAny;
|
|
476
476
|
}, "strip", z.ZodTypeAny, {
|
|
477
|
-
type: "cron";
|
|
478
477
|
options: {
|
|
479
478
|
cron: string;
|
|
480
479
|
};
|
|
480
|
+
type: "cron";
|
|
481
481
|
metadata?: any;
|
|
482
482
|
accountId?: string | undefined;
|
|
483
483
|
}, {
|
|
484
|
-
type: "cron";
|
|
485
484
|
options: {
|
|
486
485
|
cron: string;
|
|
487
486
|
};
|
|
487
|
+
type: "cron";
|
|
488
488
|
metadata?: any;
|
|
489
489
|
accountId?: string | undefined;
|
|
490
490
|
}>]>;
|
|
491
491
|
}, "strip", z.ZodTypeAny, {
|
|
492
492
|
type: "scheduled";
|
|
493
493
|
schedule: {
|
|
494
|
-
type: "cron";
|
|
495
494
|
options: {
|
|
496
495
|
cron: string;
|
|
497
496
|
};
|
|
497
|
+
type: "cron";
|
|
498
498
|
metadata?: any;
|
|
499
499
|
accountId?: string | undefined;
|
|
500
500
|
} | {
|
|
501
|
-
type: "interval";
|
|
502
501
|
options: {
|
|
503
502
|
seconds: number;
|
|
504
503
|
};
|
|
504
|
+
type: "interval";
|
|
505
505
|
metadata?: any;
|
|
506
506
|
accountId?: string | undefined;
|
|
507
507
|
};
|
|
508
508
|
}, {
|
|
509
509
|
type: "scheduled";
|
|
510
510
|
schedule: {
|
|
511
|
-
type: "cron";
|
|
512
511
|
options: {
|
|
513
512
|
cron: string;
|
|
514
513
|
};
|
|
514
|
+
type: "cron";
|
|
515
515
|
metadata?: any;
|
|
516
516
|
accountId?: string | undefined;
|
|
517
517
|
} | {
|
|
518
|
-
type: "interval";
|
|
519
518
|
options: {
|
|
520
519
|
seconds: number;
|
|
521
520
|
};
|
|
521
|
+
type: "interval";
|
|
522
522
|
metadata?: any;
|
|
523
523
|
accountId?: string | undefined;
|
|
524
524
|
};
|
|
@@ -10,14 +10,16 @@ export declare const defaultRetryOptions: {
|
|
|
10
10
|
maxTimeoutInMs: number;
|
|
11
11
|
randomize: false;
|
|
12
12
|
};
|
|
13
|
-
export type ZodFetchOptions = {
|
|
13
|
+
export type ZodFetchOptions<T = unknown> = {
|
|
14
14
|
retry?: RetryOptions;
|
|
15
15
|
tracer?: TriggerTracer;
|
|
16
16
|
name?: string;
|
|
17
17
|
attributes?: Attributes;
|
|
18
18
|
icon?: string;
|
|
19
19
|
onResponseBody?: (body: unknown, span: Span) => void;
|
|
20
|
+
prepareData?: (data: T) => Promise<T> | T;
|
|
20
21
|
};
|
|
22
|
+
export type AnyZodFetchOptions = ZodFetchOptions<any>;
|
|
21
23
|
export type ApiRequestOptions = Pick<ZodFetchOptions, "retry">;
|
|
22
24
|
export declare const isRequestOptions: (obj: unknown) => obj is ApiRequestOptions;
|
|
23
25
|
interface FetchCursorPageParams extends CursorPageParams {
|
|
@@ -26,7 +28,7 @@ interface FetchCursorPageParams extends CursorPageParams {
|
|
|
26
28
|
interface FetchOffsetLimitPageParams extends OffsetLimitPageParams {
|
|
27
29
|
query?: URLSearchParams;
|
|
28
30
|
}
|
|
29
|
-
export declare function zodfetch<TResponseBodySchema extends z.ZodTypeAny>(schema: TResponseBodySchema, url: string, requestInit?: RequestInit, options?: ZodFetchOptions): ApiPromise<z.output<TResponseBodySchema>>;
|
|
31
|
+
export declare function zodfetch<TResponseBodySchema extends z.ZodTypeAny>(schema: TResponseBodySchema, url: string, requestInit?: RequestInit, options?: ZodFetchOptions<z.output<TResponseBodySchema>>): ApiPromise<z.output<TResponseBodySchema>>;
|
|
30
32
|
export declare function zodfetchCursorPage<TItemSchema extends z.ZodTypeAny>(schema: TItemSchema, url: string, params: FetchCursorPageParams, requestInit?: RequestInit, options?: ZodFetchOptions): CursorPagePromise<TItemSchema>;
|
|
31
33
|
export declare function zodfetchOffsetLimitPage<TItemSchema extends z.ZodTypeAny>(schema: TItemSchema, url: string, params: FetchOffsetLimitPageParams, requestInit?: RequestInit, options?: ZodFetchOptions): OffsetLimitPagePromise<TItemSchema>;
|
|
32
34
|
type ZodFetchResult<T> = {
|
|
@@ -99,4 +101,26 @@ export declare class OffsetLimitPagePromise<TItemSchema extends z.ZodTypeAny> ex
|
|
|
99
101
|
}
|
|
100
102
|
export declare function isEmptyObj(obj: Object | null | undefined): boolean;
|
|
101
103
|
export declare function hasOwn(obj: Object, key: string): boolean;
|
|
104
|
+
export type ZodFetchSSEMessageValueSchema<TDiscriminatedUnion extends z.ZodDiscriminatedUnion<any, any>> = z.ZodFirstPartySchemaTypes | TDiscriminatedUnion;
|
|
105
|
+
export interface ZodFetchSSEMessageCatalogSchema {
|
|
106
|
+
[key: string]: ZodFetchSSEMessageValueSchema<any>;
|
|
107
|
+
}
|
|
108
|
+
export type ZodFetchSSEMessageHandlers<TCatalogSchema extends ZodFetchSSEMessageCatalogSchema> = Partial<{
|
|
109
|
+
[K in keyof TCatalogSchema]: (payload: z.infer<TCatalogSchema[K]>) => Promise<void> | void;
|
|
110
|
+
}>;
|
|
111
|
+
export type ZodFetchSSEOptions<TMessageCatalog extends ZodFetchSSEMessageCatalogSchema> = {
|
|
112
|
+
url: string;
|
|
113
|
+
request?: RequestInit;
|
|
114
|
+
messages: TMessageCatalog;
|
|
115
|
+
retry?: RetryOptions;
|
|
116
|
+
};
|
|
117
|
+
export declare class ZodFetchSSEResult<TMessageCatalog extends ZodFetchSSEMessageCatalogSchema> {
|
|
118
|
+
private options;
|
|
119
|
+
private _eventSource;
|
|
120
|
+
constructor(options: ZodFetchSSEOptions<TMessageCatalog>);
|
|
121
|
+
onConnectionError(handler: (error: Event) => void): void;
|
|
122
|
+
onMessage<T extends keyof TMessageCatalog>(type: T, handler: ZodFetchSSEMessageHandlers<TMessageCatalog>[T]): void;
|
|
123
|
+
stop(): void;
|
|
124
|
+
}
|
|
125
|
+
export declare function zodfetchSSE<TMessageCatalog extends ZodFetchSSEMessageCatalogSchema>(options: ZodFetchSSEOptions<TMessageCatalog>): ZodFetchSSEResult<TMessageCatalog>;
|
|
102
126
|
export {};
|