@trigger.dev/core 0.0.0-cross-runtime-20231204083620 → 0.0.0-cross-runtime-20231204115010
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/index.js +983 -1233
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +793 -1020
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,22 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var node_process = require('node:process');
|
|
4
|
+
var node_buffer = require('node:buffer');
|
|
5
|
+
var ulidx = require('ulidx');
|
|
6
|
+
var zod = require('zod');
|
|
7
|
+
|
|
2
8
|
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
9
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all)
|
|
9
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
-
};
|
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
-
for (let key of __getOwnPropNames(from))
|
|
14
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
-
}
|
|
17
|
-
return to;
|
|
18
|
-
};
|
|
19
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
10
|
var __accessCheck = (obj, member, msg) => {
|
|
21
11
|
if (!member.has(obj))
|
|
22
12
|
throw TypeError("Cannot " + msg);
|
|
@@ -39,196 +29,6 @@ var __privateMethod = (obj, member, method) => {
|
|
|
39
29
|
__accessCheck(obj, member, "access private method");
|
|
40
30
|
return method;
|
|
41
31
|
};
|
|
42
|
-
|
|
43
|
-
// src/index.ts
|
|
44
|
-
var src_exports = {};
|
|
45
|
-
__export(src_exports, {
|
|
46
|
-
API_VERSIONS: () => API_VERSIONS,
|
|
47
|
-
ApiEventLogSchema: () => ApiEventLogSchema,
|
|
48
|
-
AutoYieldConfigSchema: () => AutoYieldConfigSchema,
|
|
49
|
-
AutoYieldMetadataSchema: () => AutoYieldMetadataSchema,
|
|
50
|
-
CachedTaskSchema: () => CachedTaskSchema,
|
|
51
|
-
CancelRunsForEventSchema: () => CancelRunsForEventSchema,
|
|
52
|
-
CommonMissingConnectionNotificationPayloadSchema: () => CommonMissingConnectionNotificationPayloadSchema,
|
|
53
|
-
CommonMissingConnectionNotificationResolvedPayloadSchema: () => CommonMissingConnectionNotificationResolvedPayloadSchema,
|
|
54
|
-
CompleteTaskBodyInputSchema: () => CompleteTaskBodyInputSchema,
|
|
55
|
-
CompleteTaskBodyV2InputSchema: () => CompleteTaskBodyV2InputSchema,
|
|
56
|
-
ConcurrencyLimitOptionsSchema: () => ConcurrencyLimitOptionsSchema,
|
|
57
|
-
ConnectionAuthSchema: () => ConnectionAuthSchema,
|
|
58
|
-
CreateExternalConnectionBodySchema: () => CreateExternalConnectionBodySchema,
|
|
59
|
-
CreateRunResponseBodySchema: () => CreateRunResponseBodySchema,
|
|
60
|
-
CronMetadataSchema: () => CronMetadataSchema,
|
|
61
|
-
CronOptionsSchema: () => CronOptionsSchema,
|
|
62
|
-
DELIVER_WEBHOOK_REQUEST: () => DELIVER_WEBHOOK_REQUEST,
|
|
63
|
-
DeliverEventResponseSchema: () => DeliverEventResponseSchema,
|
|
64
|
-
DeserializedJsonSchema: () => DeserializedJsonSchema,
|
|
65
|
-
DisplayPropertiesSchema: () => DisplayPropertiesSchema,
|
|
66
|
-
DisplayPropertySchema: () => DisplayPropertySchema,
|
|
67
|
-
DynamicTriggerEndpointMetadataSchema: () => DynamicTriggerEndpointMetadataSchema,
|
|
68
|
-
DynamicTriggerMetadataSchema: () => DynamicTriggerMetadataSchema,
|
|
69
|
-
EndpointHeadersSchema: () => EndpointHeadersSchema,
|
|
70
|
-
EndpointIndexErrorSchema: () => EndpointIndexErrorSchema,
|
|
71
|
-
EphemeralEventDispatcherRequestBodySchema: () => EphemeralEventDispatcherRequestBodySchema,
|
|
72
|
-
EphemeralEventDispatcherResponseBodySchema: () => EphemeralEventDispatcherResponseBodySchema,
|
|
73
|
-
ErrorWithStackSchema: () => ErrorWithStackSchema,
|
|
74
|
-
EventExampleSchema: () => EventExampleSchema,
|
|
75
|
-
EventFilterSchema: () => EventFilterSchema,
|
|
76
|
-
EventRuleSchema: () => EventRuleSchema,
|
|
77
|
-
EventSpecificationSchema: () => EventSpecificationSchema,
|
|
78
|
-
ExecuteJobHeadersSchema: () => ExecuteJobHeadersSchema,
|
|
79
|
-
ExecuteJobRunMetadataSchema: () => ExecuteJobRunMetadataSchema,
|
|
80
|
-
FailTaskBodyInputSchema: () => FailTaskBodyInputSchema,
|
|
81
|
-
FetchOperationSchema: () => FetchOperationSchema,
|
|
82
|
-
FetchPollOperationSchema: () => FetchPollOperationSchema,
|
|
83
|
-
FetchRequestInitSchema: () => FetchRequestInitSchema,
|
|
84
|
-
FetchRetryBackoffStrategySchema: () => FetchRetryBackoffStrategySchema,
|
|
85
|
-
FetchRetryHeadersStrategySchema: () => FetchRetryHeadersStrategySchema,
|
|
86
|
-
FetchRetryOptionsSchema: () => FetchRetryOptionsSchema,
|
|
87
|
-
FetchRetryStrategySchema: () => FetchRetryStrategySchema,
|
|
88
|
-
FetchTimeoutOptionsSchema: () => FetchTimeoutOptionsSchema,
|
|
89
|
-
GetEndpointIndexResponseSchema: () => GetEndpointIndexResponseSchema,
|
|
90
|
-
GetEventSchema: () => GetEventSchema,
|
|
91
|
-
GetRunSchema: () => GetRunSchema,
|
|
92
|
-
GetRunStatusesSchema: () => GetRunStatusesSchema,
|
|
93
|
-
GetRunsSchema: () => GetRunsSchema,
|
|
94
|
-
HTTPMethodUnionSchema: () => HTTPMethodUnionSchema,
|
|
95
|
-
HandleTriggerSourceSchema: () => HandleTriggerSourceSchema,
|
|
96
|
-
HttpEndpointRequestHeadersSchema: () => HttpEndpointRequestHeadersSchema,
|
|
97
|
-
HttpSourceRequestHeadersSchema: () => HttpSourceRequestHeadersSchema,
|
|
98
|
-
HttpSourceResponseSchema: () => HttpSourceResponseSchema,
|
|
99
|
-
IndexEndpointResponseSchema: () => IndexEndpointResponseSchema,
|
|
100
|
-
InitializeCronScheduleBodySchema: () => InitializeCronScheduleBodySchema,
|
|
101
|
-
InitializeTriggerBodySchema: () => InitializeTriggerBodySchema,
|
|
102
|
-
IntegrationConfigSchema: () => IntegrationConfigSchema,
|
|
103
|
-
IntegrationMetadataSchema: () => IntegrationMetadataSchema,
|
|
104
|
-
IntervalMetadataSchema: () => IntervalMetadataSchema,
|
|
105
|
-
IntervalOptionsSchema: () => IntervalOptionsSchema,
|
|
106
|
-
InvokeJobRequestBodySchema: () => InvokeJobRequestBodySchema,
|
|
107
|
-
InvokeJobResponseSchema: () => InvokeJobResponseSchema,
|
|
108
|
-
InvokeOptionsSchema: () => InvokeOptionsSchema,
|
|
109
|
-
InvokeTriggerMetadataSchema: () => InvokeTriggerMetadataSchema,
|
|
110
|
-
JobMetadataSchema: () => JobMetadataSchema,
|
|
111
|
-
JobRunStatusRecordSchema: () => JobRunStatusRecordSchema,
|
|
112
|
-
KeyValueStoreResponseBodySchema: () => KeyValueStoreResponseBodySchema,
|
|
113
|
-
LogMessageSchema: () => LogMessageSchema,
|
|
114
|
-
Logger: () => Logger,
|
|
115
|
-
MISSING_CONNECTION_NOTIFICATION: () => MISSING_CONNECTION_NOTIFICATION,
|
|
116
|
-
MISSING_CONNECTION_RESOLVED_NOTIFICATION: () => MISSING_CONNECTION_RESOLVED_NOTIFICATION,
|
|
117
|
-
MissingConnectionNotificationPayloadSchema: () => MissingConnectionNotificationPayloadSchema,
|
|
118
|
-
MissingConnectionResolvedNotificationPayloadSchema: () => MissingConnectionResolvedNotificationPayloadSchema,
|
|
119
|
-
MissingDeveloperConnectionNotificationPayloadSchema: () => MissingDeveloperConnectionNotificationPayloadSchema,
|
|
120
|
-
MissingDeveloperConnectionResolvedNotificationPayloadSchema: () => MissingDeveloperConnectionResolvedNotificationPayloadSchema,
|
|
121
|
-
MissingExternalConnectionNotificationPayloadSchema: () => MissingExternalConnectionNotificationPayloadSchema,
|
|
122
|
-
MissingExternalConnectionResolvedNotificationPayloadSchema: () => MissingExternalConnectionResolvedNotificationPayloadSchema,
|
|
123
|
-
NormalizedRequestSchema: () => NormalizedRequestSchema,
|
|
124
|
-
NormalizedResponseSchema: () => NormalizedResponseSchema,
|
|
125
|
-
PLATFORM_FEATURES: () => PLATFORM_FEATURES,
|
|
126
|
-
PongErrorResponseSchema: () => PongErrorResponseSchema,
|
|
127
|
-
PongResponseSchema: () => PongResponseSchema,
|
|
128
|
-
PongSuccessResponseSchema: () => PongSuccessResponseSchema,
|
|
129
|
-
PreprocessRunBodySchema: () => PreprocessRunBodySchema,
|
|
130
|
-
PreprocessRunResponseSchema: () => PreprocessRunResponseSchema,
|
|
131
|
-
QueueOptionsSchema: () => QueueOptionsSchema,
|
|
132
|
-
REGISTER_SOURCE_EVENT_V1: () => REGISTER_SOURCE_EVENT_V1,
|
|
133
|
-
REGISTER_SOURCE_EVENT_V2: () => REGISTER_SOURCE_EVENT_V2,
|
|
134
|
-
REGISTER_WEBHOOK: () => REGISTER_WEBHOOK,
|
|
135
|
-
RawEventSchema: () => RawEventSchema,
|
|
136
|
-
RedactSchema: () => RedactSchema,
|
|
137
|
-
RedactStringSchema: () => RedactStringSchema,
|
|
138
|
-
RegisterDynamicSchedulePayloadSchema: () => RegisterDynamicSchedulePayloadSchema,
|
|
139
|
-
RegisterHTTPTriggerSourceBodySchema: () => RegisterHTTPTriggerSourceBodySchema,
|
|
140
|
-
RegisterIntervalScheduleBodySchema: () => RegisterIntervalScheduleBodySchema,
|
|
141
|
-
RegisterSMTPTriggerSourceBodySchema: () => RegisterSMTPTriggerSourceBodySchema,
|
|
142
|
-
RegisterSQSTriggerSourceBodySchema: () => RegisterSQSTriggerSourceBodySchema,
|
|
143
|
-
RegisterScheduleBodySchema: () => RegisterScheduleBodySchema,
|
|
144
|
-
RegisterScheduleResponseBodySchema: () => RegisterScheduleResponseBodySchema,
|
|
145
|
-
RegisterSourceChannelBodySchema: () => RegisterSourceChannelBodySchema,
|
|
146
|
-
RegisterSourceEventSchemaV1: () => RegisterSourceEventSchemaV1,
|
|
147
|
-
RegisterSourceEventSchemaV2: () => RegisterSourceEventSchemaV2,
|
|
148
|
-
RegisterTriggerBodySchemaV1: () => RegisterTriggerBodySchemaV1,
|
|
149
|
-
RegisterTriggerBodySchemaV2: () => RegisterTriggerBodySchemaV2,
|
|
150
|
-
RegisterTriggerSourceSchema: () => RegisterTriggerSourceSchema,
|
|
151
|
-
RegisterWebhookPayloadSchema: () => RegisterWebhookPayloadSchema,
|
|
152
|
-
RegisterWebhookSourceSchema: () => RegisterWebhookSourceSchema,
|
|
153
|
-
RequestFilterSchema: () => RequestFilterSchema,
|
|
154
|
-
RequestWithRawBodySchema: () => RequestWithRawBodySchema,
|
|
155
|
-
ResponseFilterSchema: () => ResponseFilterSchema,
|
|
156
|
-
RetryOptionsSchema: () => RetryOptionsSchema,
|
|
157
|
-
RunJobAutoYieldExecutionErrorSchema: () => RunJobAutoYieldExecutionErrorSchema,
|
|
158
|
-
RunJobAutoYieldWithCompletedTaskExecutionErrorSchema: () => RunJobAutoYieldWithCompletedTaskExecutionErrorSchema,
|
|
159
|
-
RunJobBodySchema: () => RunJobBodySchema,
|
|
160
|
-
RunJobCanceledWithTaskSchema: () => RunJobCanceledWithTaskSchema,
|
|
161
|
-
RunJobErrorResponseSchema: () => RunJobErrorResponseSchema,
|
|
162
|
-
RunJobErrorSchema: () => RunJobErrorSchema,
|
|
163
|
-
RunJobInvalidPayloadErrorSchema: () => RunJobInvalidPayloadErrorSchema,
|
|
164
|
-
RunJobResponseSchema: () => RunJobResponseSchema,
|
|
165
|
-
RunJobResumeWithParallelTaskSchema: () => RunJobResumeWithParallelTaskSchema,
|
|
166
|
-
RunJobResumeWithTaskSchema: () => RunJobResumeWithTaskSchema,
|
|
167
|
-
RunJobRetryWithTaskSchema: () => RunJobRetryWithTaskSchema,
|
|
168
|
-
RunJobSuccessSchema: () => RunJobSuccessSchema,
|
|
169
|
-
RunJobUnresolvedAuthErrorSchema: () => RunJobUnresolvedAuthErrorSchema,
|
|
170
|
-
RunJobYieldExecutionErrorSchema: () => RunJobYieldExecutionErrorSchema,
|
|
171
|
-
RunSourceContextSchema: () => RunSourceContextSchema,
|
|
172
|
-
RunStatusSchema: () => RunStatusSchema,
|
|
173
|
-
RunTaskBodyInputSchema: () => RunTaskBodyInputSchema,
|
|
174
|
-
RunTaskBodyOutputSchema: () => RunTaskBodyOutputSchema,
|
|
175
|
-
RunTaskOptionsSchema: () => RunTaskOptionsSchema,
|
|
176
|
-
RunTaskResponseWithCachedTasksBodySchema: () => RunTaskResponseWithCachedTasksBodySchema,
|
|
177
|
-
RunTaskSchema: () => RunTaskSchema,
|
|
178
|
-
RuntimeEnvironmentTypeSchema: () => RuntimeEnvironmentTypeSchema,
|
|
179
|
-
SCHEDULED_EVENT: () => SCHEDULED_EVENT,
|
|
180
|
-
ScheduleMetadataSchema: () => ScheduleMetadataSchema,
|
|
181
|
-
ScheduledPayloadSchema: () => ScheduledPayloadSchema,
|
|
182
|
-
ScheduledTriggerMetadataSchema: () => ScheduledTriggerMetadataSchema,
|
|
183
|
-
SchemaErrorSchema: () => SchemaErrorSchema,
|
|
184
|
-
SendBulkEventsBodySchema: () => SendBulkEventsBodySchema,
|
|
185
|
-
SendEventBodySchema: () => SendEventBodySchema,
|
|
186
|
-
SendEventOptionsSchema: () => SendEventOptionsSchema,
|
|
187
|
-
SerializableJsonSchema: () => SerializableJsonSchema,
|
|
188
|
-
ServerTaskSchema: () => ServerTaskSchema,
|
|
189
|
-
SourceMetadataV2Schema: () => SourceMetadataV2Schema,
|
|
190
|
-
StaticTriggerMetadataSchema: () => StaticTriggerMetadataSchema,
|
|
191
|
-
StatusHistorySchema: () => StatusHistorySchema,
|
|
192
|
-
StatusUpdateSchema: () => StatusUpdateSchema,
|
|
193
|
-
StatusUpdateStateSchema: () => StatusUpdateStateSchema,
|
|
194
|
-
StyleSchema: () => StyleSchema,
|
|
195
|
-
TaskSchema: () => TaskSchema,
|
|
196
|
-
TaskStatusSchema: () => TaskStatusSchema,
|
|
197
|
-
TriggerHelpSchema: () => TriggerHelpSchema,
|
|
198
|
-
TriggerMetadataSchema: () => TriggerMetadataSchema,
|
|
199
|
-
TriggerSourceSchema: () => TriggerSourceSchema,
|
|
200
|
-
UpdateTriggerSourceBodyV1Schema: () => UpdateTriggerSourceBodyV1Schema,
|
|
201
|
-
UpdateTriggerSourceBodyV2Schema: () => UpdateTriggerSourceBodyV2Schema,
|
|
202
|
-
UpdateWebhookBodySchema: () => UpdateWebhookBodySchema,
|
|
203
|
-
ValidateErrorResponseSchema: () => ValidateErrorResponseSchema,
|
|
204
|
-
ValidateResponseSchema: () => ValidateResponseSchema,
|
|
205
|
-
ValidateSuccessResponseSchema: () => ValidateSuccessResponseSchema,
|
|
206
|
-
WebhookContextMetadataSchema: () => WebhookContextMetadataSchema,
|
|
207
|
-
WebhookDeliveryResponseSchema: () => WebhookDeliveryResponseSchema,
|
|
208
|
-
WebhookMetadataSchema: () => WebhookMetadataSchema,
|
|
209
|
-
WebhookSourceRequestHeadersSchema: () => WebhookSourceRequestHeadersSchema,
|
|
210
|
-
addMissingVersionField: () => addMissingVersionField,
|
|
211
|
-
assertExhaustive: () => assertExhaustive,
|
|
212
|
-
calculateResetAt: () => calculateResetAt,
|
|
213
|
-
calculateRetryAt: () => calculateRetryAt,
|
|
214
|
-
currentDate: () => currentDate,
|
|
215
|
-
currentTimestampMilliseconds: () => currentTimestampMilliseconds,
|
|
216
|
-
currentTimestampSeconds: () => currentTimestampSeconds,
|
|
217
|
-
deepMergeFilters: () => deepMergeFilters,
|
|
218
|
-
eventFilterMatches: () => eventFilterMatches,
|
|
219
|
-
parseEndpointIndexStats: () => parseEndpointIndexStats,
|
|
220
|
-
replacements: () => replacements,
|
|
221
|
-
requestFilterMatches: () => requestFilterMatches,
|
|
222
|
-
responseFilterMatches: () => responseFilterMatches,
|
|
223
|
-
stringPatternMatchers: () => stringPatternMatchers,
|
|
224
|
-
supportsFeature: () => supportsFeature,
|
|
225
|
-
urlWithSearchParams: () => urlWithSearchParams
|
|
226
|
-
});
|
|
227
|
-
module.exports = __toCommonJS(src_exports);
|
|
228
|
-
|
|
229
|
-
// src/logger.ts
|
|
230
|
-
var import_node_process = require("node:process");
|
|
231
|
-
var import_node_buffer = require("node:buffer");
|
|
232
32
|
var logLevels = [
|
|
233
33
|
"log",
|
|
234
34
|
"error",
|
|
@@ -246,7 +46,7 @@ var _Logger = class _Logger {
|
|
|
246
46
|
__privateAdd(this, _jsonReplacer, void 0);
|
|
247
47
|
__privateAdd(this, _additionalFields, void 0);
|
|
248
48
|
__privateSet(this, _name, name);
|
|
249
|
-
__privateSet(this, _level, logLevels.indexOf(
|
|
49
|
+
__privateSet(this, _level, logLevels.indexOf(node_process.env.TRIGGER_LOG_LEVEL ?? level));
|
|
250
50
|
__privateSet(this, _filteredKeys, filteredKeys);
|
|
251
51
|
__privateSet(this, _jsonReplacer, createReplacer(jsonReplacer));
|
|
252
52
|
__privateSet(this, _additionalFields, additionalFields ?? (() => ({})));
|
|
@@ -367,7 +167,7 @@ function filterKeys(obj, keys) {
|
|
|
367
167
|
}
|
|
368
168
|
__name(filterKeys, "filterKeys");
|
|
369
169
|
function prettyPrintBytes(value) {
|
|
370
|
-
if (
|
|
170
|
+
if (node_process.env.NODE_ENV === "production") {
|
|
371
171
|
return "skipped size";
|
|
372
172
|
}
|
|
373
173
|
const sizeInBytes = getSizeInBytes(value);
|
|
@@ -386,17 +186,13 @@ __name(prettyPrintBytes, "prettyPrintBytes");
|
|
|
386
186
|
function getSizeInBytes(value) {
|
|
387
187
|
const jsonString = JSON.stringify(value);
|
|
388
188
|
if (typeof window === "undefined") {
|
|
389
|
-
return
|
|
189
|
+
return node_buffer.Buffer.byteLength(jsonString, "utf8");
|
|
390
190
|
} else {
|
|
391
191
|
return new TextEncoder().encode(jsonString).length;
|
|
392
192
|
}
|
|
393
193
|
}
|
|
394
194
|
__name(getSizeInBytes, "getSizeInBytes");
|
|
395
195
|
|
|
396
|
-
// src/schemas/api.ts
|
|
397
|
-
var import_ulidx = require("ulidx");
|
|
398
|
-
var import_zod12 = require("zod");
|
|
399
|
-
|
|
400
196
|
// src/schemas/addMissingVersionField.ts
|
|
401
197
|
function addMissingVersionField(val) {
|
|
402
198
|
if (val !== null && typeof val === "object" && !("version" in val)) {
|
|
@@ -408,225 +204,204 @@ function addMissingVersionField(val) {
|
|
|
408
204
|
return val;
|
|
409
205
|
}
|
|
410
206
|
__name(addMissingVersionField, "addMissingVersionField");
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
message: import_zod.z.string(),
|
|
416
|
-
name: import_zod.z.string().optional(),
|
|
417
|
-
stack: import_zod.z.string().optional()
|
|
207
|
+
var ErrorWithStackSchema = zod.z.object({
|
|
208
|
+
message: zod.z.string(),
|
|
209
|
+
name: zod.z.string().optional(),
|
|
210
|
+
stack: zod.z.string().optional()
|
|
418
211
|
});
|
|
419
|
-
var SchemaErrorSchema =
|
|
420
|
-
path:
|
|
421
|
-
message:
|
|
212
|
+
var SchemaErrorSchema = zod.z.object({
|
|
213
|
+
path: zod.z.array(zod.z.string()),
|
|
214
|
+
message: zod.z.string()
|
|
422
215
|
});
|
|
423
|
-
|
|
424
|
-
// src/schemas/eventFilter.ts
|
|
425
|
-
var import_zod2 = require("zod");
|
|
426
216
|
var stringPatternMatchers = [
|
|
427
|
-
|
|
428
|
-
$endsWith:
|
|
217
|
+
zod.z.object({
|
|
218
|
+
$endsWith: zod.z.string()
|
|
429
219
|
}),
|
|
430
|
-
|
|
431
|
-
$startsWith:
|
|
220
|
+
zod.z.object({
|
|
221
|
+
$startsWith: zod.z.string()
|
|
432
222
|
}),
|
|
433
|
-
|
|
434
|
-
$ignoreCaseEquals:
|
|
223
|
+
zod.z.object({
|
|
224
|
+
$ignoreCaseEquals: zod.z.string()
|
|
435
225
|
})
|
|
436
226
|
];
|
|
437
|
-
var EventMatcherSchema =
|
|
227
|
+
var EventMatcherSchema = zod.z.union([
|
|
438
228
|
/** Match against a string */
|
|
439
|
-
|
|
229
|
+
zod.z.array(zod.z.string()),
|
|
440
230
|
/** Match against a number */
|
|
441
|
-
|
|
231
|
+
zod.z.array(zod.z.number()),
|
|
442
232
|
/** Match against a boolean */
|
|
443
|
-
|
|
444
|
-
|
|
233
|
+
zod.z.array(zod.z.boolean()),
|
|
234
|
+
zod.z.array(zod.z.union([
|
|
445
235
|
...stringPatternMatchers,
|
|
446
|
-
|
|
447
|
-
$exists:
|
|
236
|
+
zod.z.object({
|
|
237
|
+
$exists: zod.z.boolean()
|
|
448
238
|
}),
|
|
449
|
-
|
|
450
|
-
$isNull:
|
|
239
|
+
zod.z.object({
|
|
240
|
+
$isNull: zod.z.boolean()
|
|
451
241
|
}),
|
|
452
|
-
|
|
453
|
-
$anythingBut:
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
242
|
+
zod.z.object({
|
|
243
|
+
$anythingBut: zod.z.union([
|
|
244
|
+
zod.z.string(),
|
|
245
|
+
zod.z.number(),
|
|
246
|
+
zod.z.boolean()
|
|
457
247
|
])
|
|
458
248
|
}),
|
|
459
|
-
|
|
460
|
-
$anythingBut:
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
249
|
+
zod.z.object({
|
|
250
|
+
$anythingBut: zod.z.union([
|
|
251
|
+
zod.z.array(zod.z.string()),
|
|
252
|
+
zod.z.array(zod.z.number()),
|
|
253
|
+
zod.z.array(zod.z.boolean())
|
|
464
254
|
])
|
|
465
255
|
}),
|
|
466
|
-
|
|
467
|
-
$gt:
|
|
256
|
+
zod.z.object({
|
|
257
|
+
$gt: zod.z.number()
|
|
468
258
|
}),
|
|
469
|
-
|
|
470
|
-
$lt:
|
|
259
|
+
zod.z.object({
|
|
260
|
+
$lt: zod.z.number()
|
|
471
261
|
}),
|
|
472
|
-
|
|
473
|
-
$gte:
|
|
262
|
+
zod.z.object({
|
|
263
|
+
$gte: zod.z.number()
|
|
474
264
|
}),
|
|
475
|
-
|
|
476
|
-
$lte:
|
|
265
|
+
zod.z.object({
|
|
266
|
+
$lte: zod.z.number()
|
|
477
267
|
}),
|
|
478
|
-
|
|
479
|
-
$between:
|
|
480
|
-
|
|
481
|
-
|
|
268
|
+
zod.z.object({
|
|
269
|
+
$between: zod.z.tuple([
|
|
270
|
+
zod.z.number(),
|
|
271
|
+
zod.z.number()
|
|
482
272
|
])
|
|
483
273
|
}),
|
|
484
|
-
|
|
485
|
-
$includes:
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
274
|
+
zod.z.object({
|
|
275
|
+
$includes: zod.z.union([
|
|
276
|
+
zod.z.string(),
|
|
277
|
+
zod.z.number(),
|
|
278
|
+
zod.z.boolean()
|
|
489
279
|
])
|
|
490
280
|
})
|
|
491
281
|
]))
|
|
492
282
|
]);
|
|
493
|
-
var EventFilterSchema =
|
|
283
|
+
var EventFilterSchema = zod.z.lazy(() => zod.z.record(zod.z.union([
|
|
494
284
|
EventMatcherSchema,
|
|
495
285
|
EventFilterSchema
|
|
496
286
|
])));
|
|
497
|
-
var EventRuleSchema =
|
|
498
|
-
event:
|
|
499
|
-
source:
|
|
287
|
+
var EventRuleSchema = zod.z.object({
|
|
288
|
+
event: zod.z.string().or(zod.z.array(zod.z.string())),
|
|
289
|
+
source: zod.z.string(),
|
|
500
290
|
payload: EventFilterSchema.optional(),
|
|
501
291
|
context: EventFilterSchema.optional()
|
|
502
292
|
});
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
var import_zod3 = require("zod");
|
|
506
|
-
var ConnectionAuthSchema = import_zod3.z.object({
|
|
507
|
-
type: import_zod3.z.enum([
|
|
293
|
+
var ConnectionAuthSchema = zod.z.object({
|
|
294
|
+
type: zod.z.enum([
|
|
508
295
|
"oauth2",
|
|
509
296
|
"apiKey"
|
|
510
297
|
]),
|
|
511
|
-
accessToken:
|
|
512
|
-
scopes:
|
|
513
|
-
additionalFields:
|
|
298
|
+
accessToken: zod.z.string(),
|
|
299
|
+
scopes: zod.z.array(zod.z.string()).optional(),
|
|
300
|
+
additionalFields: zod.z.record(zod.z.string()).optional()
|
|
514
301
|
});
|
|
515
|
-
var IntegrationMetadataSchema =
|
|
516
|
-
id:
|
|
517
|
-
name:
|
|
518
|
-
instructions:
|
|
302
|
+
var IntegrationMetadataSchema = zod.z.object({
|
|
303
|
+
id: zod.z.string(),
|
|
304
|
+
name: zod.z.string(),
|
|
305
|
+
instructions: zod.z.string().optional()
|
|
519
306
|
});
|
|
520
|
-
var IntegrationConfigSchema =
|
|
521
|
-
id:
|
|
307
|
+
var IntegrationConfigSchema = zod.z.object({
|
|
308
|
+
id: zod.z.string(),
|
|
522
309
|
metadata: IntegrationMetadataSchema,
|
|
523
|
-
authSource:
|
|
310
|
+
authSource: zod.z.enum([
|
|
524
311
|
"HOSTED",
|
|
525
312
|
"LOCAL",
|
|
526
313
|
"RESOLVER"
|
|
527
314
|
])
|
|
528
315
|
});
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
import_zod4.z.number(),
|
|
535
|
-
import_zod4.z.boolean(),
|
|
536
|
-
import_zod4.z.null()
|
|
316
|
+
var LiteralSchema = zod.z.union([
|
|
317
|
+
zod.z.string(),
|
|
318
|
+
zod.z.number(),
|
|
319
|
+
zod.z.boolean(),
|
|
320
|
+
zod.z.null()
|
|
537
321
|
]);
|
|
538
|
-
var DeserializedJsonSchema =
|
|
322
|
+
var DeserializedJsonSchema = zod.z.lazy(() => zod.z.union([
|
|
539
323
|
LiteralSchema,
|
|
540
|
-
|
|
541
|
-
|
|
324
|
+
zod.z.array(DeserializedJsonSchema),
|
|
325
|
+
zod.z.record(DeserializedJsonSchema)
|
|
542
326
|
]));
|
|
543
|
-
var SerializableSchema =
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
327
|
+
var SerializableSchema = zod.z.union([
|
|
328
|
+
zod.z.string(),
|
|
329
|
+
zod.z.number(),
|
|
330
|
+
zod.z.boolean(),
|
|
331
|
+
zod.z.null(),
|
|
332
|
+
zod.z.date(),
|
|
333
|
+
zod.z.undefined(),
|
|
334
|
+
zod.z.symbol()
|
|
551
335
|
]);
|
|
552
|
-
var SerializableJsonSchema =
|
|
336
|
+
var SerializableJsonSchema = zod.z.lazy(() => zod.z.union([
|
|
553
337
|
SerializableSchema,
|
|
554
|
-
|
|
555
|
-
|
|
338
|
+
zod.z.array(SerializableJsonSchema),
|
|
339
|
+
zod.z.record(SerializableJsonSchema)
|
|
556
340
|
]));
|
|
557
|
-
|
|
558
|
-
// src/schemas/properties.ts
|
|
559
|
-
var import_zod5 = require("zod");
|
|
560
|
-
var DisplayPropertySchema = import_zod5.z.object({
|
|
341
|
+
var DisplayPropertySchema = zod.z.object({
|
|
561
342
|
/** The label for the property */
|
|
562
|
-
label:
|
|
343
|
+
label: zod.z.string(),
|
|
563
344
|
/** The value of the property */
|
|
564
|
-
text:
|
|
345
|
+
text: zod.z.string(),
|
|
565
346
|
/** The URL to link to when the property is clicked */
|
|
566
|
-
url:
|
|
347
|
+
url: zod.z.string().optional(),
|
|
567
348
|
/** The URL to a list of images to display next to the property */
|
|
568
|
-
imageUrl:
|
|
349
|
+
imageUrl: zod.z.array(zod.z.string()).optional()
|
|
569
350
|
});
|
|
570
|
-
var DisplayPropertiesSchema =
|
|
571
|
-
var StyleSchema =
|
|
351
|
+
var DisplayPropertiesSchema = zod.z.array(DisplayPropertySchema);
|
|
352
|
+
var StyleSchema = zod.z.object({
|
|
572
353
|
/** The style, `normal` or `minimal` */
|
|
573
|
-
style:
|
|
354
|
+
style: zod.z.enum([
|
|
574
355
|
"normal",
|
|
575
356
|
"minimal"
|
|
576
357
|
]),
|
|
577
358
|
/** A variant of the style. */
|
|
578
|
-
variant:
|
|
359
|
+
variant: zod.z.string().optional()
|
|
579
360
|
});
|
|
580
|
-
|
|
581
|
-
// src/schemas/schedules.ts
|
|
582
|
-
var import_zod6 = require("zod");
|
|
583
361
|
var SCHEDULED_EVENT = "dev.trigger.scheduled";
|
|
584
|
-
var ScheduledPayloadSchema =
|
|
585
|
-
ts:
|
|
586
|
-
lastTimestamp:
|
|
362
|
+
var ScheduledPayloadSchema = zod.z.object({
|
|
363
|
+
ts: zod.z.coerce.date(),
|
|
364
|
+
lastTimestamp: zod.z.coerce.date().optional()
|
|
587
365
|
});
|
|
588
|
-
var IntervalOptionsSchema =
|
|
366
|
+
var IntervalOptionsSchema = zod.z.object({
|
|
589
367
|
/** The number of seconds for the interval. Min = 60, Max = 2_592_000 (30 days) */
|
|
590
|
-
seconds:
|
|
368
|
+
seconds: zod.z.number().int().positive().min(60).max(2592e3)
|
|
591
369
|
});
|
|
592
|
-
var CronOptionsSchema =
|
|
370
|
+
var CronOptionsSchema = zod.z.object({
|
|
593
371
|
/** A CRON expression that defines the schedule. A useful tool when writing CRON
|
|
594
372
|
expressions is [crontab guru](https://crontab.guru). Note that the timezone
|
|
595
373
|
used is UTC. */
|
|
596
|
-
cron:
|
|
374
|
+
cron: zod.z.string()
|
|
597
375
|
});
|
|
598
|
-
var CronMetadataSchema =
|
|
599
|
-
type:
|
|
376
|
+
var CronMetadataSchema = zod.z.object({
|
|
377
|
+
type: zod.z.literal("cron"),
|
|
600
378
|
options: CronOptionsSchema,
|
|
601
379
|
/** An optional Account ID to associate with runs triggered by this interval */
|
|
602
|
-
accountId:
|
|
603
|
-
metadata:
|
|
380
|
+
accountId: zod.z.string().optional(),
|
|
381
|
+
metadata: zod.z.any()
|
|
604
382
|
});
|
|
605
|
-
var IntervalMetadataSchema =
|
|
383
|
+
var IntervalMetadataSchema = zod.z.object({
|
|
606
384
|
/** An interval reoccurs at the specified number of seconds */
|
|
607
|
-
type:
|
|
385
|
+
type: zod.z.literal("interval"),
|
|
608
386
|
/** An object containing options about the interval. */
|
|
609
387
|
options: IntervalOptionsSchema,
|
|
610
388
|
/** An optional Account ID to associate with runs triggered by this interval */
|
|
611
|
-
accountId:
|
|
389
|
+
accountId: zod.z.string().optional(),
|
|
612
390
|
/** Any additional metadata about the schedule. */
|
|
613
|
-
metadata:
|
|
391
|
+
metadata: zod.z.any()
|
|
614
392
|
});
|
|
615
|
-
var ScheduleMetadataSchema =
|
|
393
|
+
var ScheduleMetadataSchema = zod.z.discriminatedUnion("type", [
|
|
616
394
|
IntervalMetadataSchema,
|
|
617
395
|
CronMetadataSchema
|
|
618
396
|
]);
|
|
619
|
-
var RegisterDynamicSchedulePayloadSchema =
|
|
620
|
-
id:
|
|
621
|
-
jobs:
|
|
622
|
-
id:
|
|
623
|
-
version:
|
|
397
|
+
var RegisterDynamicSchedulePayloadSchema = zod.z.object({
|
|
398
|
+
id: zod.z.string(),
|
|
399
|
+
jobs: zod.z.array(zod.z.object({
|
|
400
|
+
id: zod.z.string(),
|
|
401
|
+
version: zod.z.string()
|
|
624
402
|
}))
|
|
625
403
|
});
|
|
626
|
-
|
|
627
|
-
// src/schemas/tasks.ts
|
|
628
|
-
var import_zod7 = require("zod");
|
|
629
|
-
var TaskStatusSchema = import_zod7.z.enum([
|
|
404
|
+
var TaskStatusSchema = zod.z.enum([
|
|
630
405
|
"PENDING",
|
|
631
406
|
"WAITING",
|
|
632
407
|
"RUNNING",
|
|
@@ -634,229 +409,217 @@ var TaskStatusSchema = import_zod7.z.enum([
|
|
|
634
409
|
"ERRORED",
|
|
635
410
|
"CANCELED"
|
|
636
411
|
]);
|
|
637
|
-
var TaskSchema =
|
|
638
|
-
id:
|
|
639
|
-
name:
|
|
640
|
-
icon:
|
|
641
|
-
noop:
|
|
642
|
-
startedAt:
|
|
643
|
-
completedAt:
|
|
644
|
-
delayUntil:
|
|
412
|
+
var TaskSchema = zod.z.object({
|
|
413
|
+
id: zod.z.string(),
|
|
414
|
+
name: zod.z.string(),
|
|
415
|
+
icon: zod.z.string().optional().nullable(),
|
|
416
|
+
noop: zod.z.boolean(),
|
|
417
|
+
startedAt: zod.z.coerce.date().optional().nullable(),
|
|
418
|
+
completedAt: zod.z.coerce.date().optional().nullable(),
|
|
419
|
+
delayUntil: zod.z.coerce.date().optional().nullable(),
|
|
645
420
|
status: TaskStatusSchema,
|
|
646
|
-
description:
|
|
647
|
-
properties:
|
|
648
|
-
outputProperties:
|
|
421
|
+
description: zod.z.string().optional().nullable(),
|
|
422
|
+
properties: zod.z.array(DisplayPropertySchema).optional().nullable(),
|
|
423
|
+
outputProperties: zod.z.array(DisplayPropertySchema).optional().nullable(),
|
|
649
424
|
params: DeserializedJsonSchema.optional().nullable(),
|
|
650
425
|
output: DeserializedJsonSchema.optional().nullable(),
|
|
651
426
|
context: DeserializedJsonSchema.optional().nullable(),
|
|
652
|
-
error:
|
|
653
|
-
parentId:
|
|
427
|
+
error: zod.z.string().optional().nullable(),
|
|
428
|
+
parentId: zod.z.string().optional().nullable(),
|
|
654
429
|
style: StyleSchema.optional().nullable(),
|
|
655
|
-
operation:
|
|
656
|
-
callbackUrl:
|
|
657
|
-
childExecutionMode:
|
|
430
|
+
operation: zod.z.string().optional().nullable(),
|
|
431
|
+
callbackUrl: zod.z.string().optional().nullable(),
|
|
432
|
+
childExecutionMode: zod.z.enum([
|
|
658
433
|
"SEQUENTIAL",
|
|
659
434
|
"PARALLEL"
|
|
660
435
|
]).optional().nullable()
|
|
661
436
|
});
|
|
662
437
|
var ServerTaskSchema = TaskSchema.extend({
|
|
663
|
-
idempotencyKey:
|
|
664
|
-
attempts:
|
|
665
|
-
forceYield:
|
|
438
|
+
idempotencyKey: zod.z.string(),
|
|
439
|
+
attempts: zod.z.number(),
|
|
440
|
+
forceYield: zod.z.boolean().optional().nullable()
|
|
666
441
|
});
|
|
667
|
-
var CachedTaskSchema =
|
|
668
|
-
id:
|
|
669
|
-
idempotencyKey:
|
|
442
|
+
var CachedTaskSchema = zod.z.object({
|
|
443
|
+
id: zod.z.string(),
|
|
444
|
+
idempotencyKey: zod.z.string(),
|
|
670
445
|
status: TaskStatusSchema,
|
|
671
|
-
noop:
|
|
446
|
+
noop: zod.z.boolean().default(false),
|
|
672
447
|
output: DeserializedJsonSchema.optional().nullable(),
|
|
673
|
-
parentId:
|
|
674
|
-
});
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
title: import_zod8.z.string(),
|
|
687
|
-
source: import_zod8.z.string(),
|
|
688
|
-
icon: import_zod8.z.string(),
|
|
448
|
+
parentId: zod.z.string().optional().nullable()
|
|
449
|
+
});
|
|
450
|
+
var EventExampleSchema = zod.z.object({
|
|
451
|
+
id: zod.z.string(),
|
|
452
|
+
icon: zod.z.string().optional(),
|
|
453
|
+
name: zod.z.string(),
|
|
454
|
+
payload: zod.z.any()
|
|
455
|
+
});
|
|
456
|
+
var EventSpecificationSchema = zod.z.object({
|
|
457
|
+
name: zod.z.string().or(zod.z.array(zod.z.string())),
|
|
458
|
+
title: zod.z.string(),
|
|
459
|
+
source: zod.z.string(),
|
|
460
|
+
icon: zod.z.string(),
|
|
689
461
|
filter: EventFilterSchema.optional(),
|
|
690
|
-
properties:
|
|
691
|
-
schema:
|
|
692
|
-
examples:
|
|
693
|
-
});
|
|
694
|
-
var DynamicTriggerMetadataSchema =
|
|
695
|
-
type:
|
|
696
|
-
id:
|
|
697
|
-
});
|
|
698
|
-
var TriggerHelpSchema =
|
|
699
|
-
noRuns:
|
|
700
|
-
text:
|
|
701
|
-
link:
|
|
462
|
+
properties: zod.z.array(DisplayPropertySchema).optional(),
|
|
463
|
+
schema: zod.z.any().optional(),
|
|
464
|
+
examples: zod.z.array(EventExampleSchema).optional()
|
|
465
|
+
});
|
|
466
|
+
var DynamicTriggerMetadataSchema = zod.z.object({
|
|
467
|
+
type: zod.z.literal("dynamic"),
|
|
468
|
+
id: zod.z.string()
|
|
469
|
+
});
|
|
470
|
+
var TriggerHelpSchema = zod.z.object({
|
|
471
|
+
noRuns: zod.z.object({
|
|
472
|
+
text: zod.z.string(),
|
|
473
|
+
link: zod.z.string().optional()
|
|
702
474
|
}).optional()
|
|
703
475
|
});
|
|
704
|
-
var StaticTriggerMetadataSchema =
|
|
705
|
-
type:
|
|
706
|
-
title:
|
|
707
|
-
|
|
708
|
-
|
|
476
|
+
var StaticTriggerMetadataSchema = zod.z.object({
|
|
477
|
+
type: zod.z.literal("static"),
|
|
478
|
+
title: zod.z.union([
|
|
479
|
+
zod.z.string(),
|
|
480
|
+
zod.z.array(zod.z.string())
|
|
709
481
|
]),
|
|
710
|
-
properties:
|
|
482
|
+
properties: zod.z.array(DisplayPropertySchema).optional(),
|
|
711
483
|
rule: EventRuleSchema,
|
|
712
|
-
link:
|
|
484
|
+
link: zod.z.string().optional(),
|
|
713
485
|
help: TriggerHelpSchema.optional()
|
|
714
486
|
});
|
|
715
|
-
var InvokeTriggerMetadataSchema =
|
|
716
|
-
type:
|
|
487
|
+
var InvokeTriggerMetadataSchema = zod.z.object({
|
|
488
|
+
type: zod.z.literal("invoke")
|
|
717
489
|
});
|
|
718
|
-
var ScheduledTriggerMetadataSchema =
|
|
719
|
-
type:
|
|
490
|
+
var ScheduledTriggerMetadataSchema = zod.z.object({
|
|
491
|
+
type: zod.z.literal("scheduled"),
|
|
720
492
|
schedule: ScheduleMetadataSchema
|
|
721
493
|
});
|
|
722
|
-
var TriggerMetadataSchema =
|
|
494
|
+
var TriggerMetadataSchema = zod.z.discriminatedUnion("type", [
|
|
723
495
|
DynamicTriggerMetadataSchema,
|
|
724
496
|
StaticTriggerMetadataSchema,
|
|
725
497
|
ScheduledTriggerMetadataSchema,
|
|
726
498
|
InvokeTriggerMetadataSchema
|
|
727
499
|
]);
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
// src/schemas/statuses.ts
|
|
733
|
-
var import_zod9 = require("zod");
|
|
734
|
-
var StatusUpdateStateSchema = import_zod9.z.union([
|
|
735
|
-
import_zod9.z.literal("loading"),
|
|
736
|
-
import_zod9.z.literal("success"),
|
|
737
|
-
import_zod9.z.literal("failure")
|
|
500
|
+
var StatusUpdateStateSchema = zod.z.union([
|
|
501
|
+
zod.z.literal("loading"),
|
|
502
|
+
zod.z.literal("success"),
|
|
503
|
+
zod.z.literal("failure")
|
|
738
504
|
]);
|
|
739
|
-
var StatusUpdateDataSchema =
|
|
740
|
-
var StatusUpdateSchema =
|
|
741
|
-
label:
|
|
505
|
+
var StatusUpdateDataSchema = zod.z.record(SerializableJsonSchema);
|
|
506
|
+
var StatusUpdateSchema = zod.z.object({
|
|
507
|
+
label: zod.z.string().optional(),
|
|
742
508
|
state: StatusUpdateStateSchema.optional(),
|
|
743
509
|
data: StatusUpdateDataSchema.optional()
|
|
744
510
|
});
|
|
745
511
|
var InitalStatusUpdateSchema = StatusUpdateSchema.required({
|
|
746
512
|
label: true
|
|
747
513
|
});
|
|
748
|
-
var StatusHistorySchema =
|
|
514
|
+
var StatusHistorySchema = zod.z.array(StatusUpdateSchema);
|
|
749
515
|
var JobRunStatusRecordSchema = InitalStatusUpdateSchema.extend({
|
|
750
|
-
key:
|
|
516
|
+
key: zod.z.string(),
|
|
751
517
|
history: StatusHistorySchema
|
|
752
518
|
});
|
|
753
519
|
|
|
754
520
|
// src/schemas/runs.ts
|
|
755
|
-
var RunStatusSchema =
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
521
|
+
var RunStatusSchema = zod.z.union([
|
|
522
|
+
zod.z.literal("PENDING"),
|
|
523
|
+
zod.z.literal("QUEUED"),
|
|
524
|
+
zod.z.literal("WAITING_ON_CONNECTIONS"),
|
|
525
|
+
zod.z.literal("PREPROCESSING"),
|
|
526
|
+
zod.z.literal("STARTED"),
|
|
527
|
+
zod.z.literal("SUCCESS"),
|
|
528
|
+
zod.z.literal("FAILURE"),
|
|
529
|
+
zod.z.literal("TIMED_OUT"),
|
|
530
|
+
zod.z.literal("ABORTED"),
|
|
531
|
+
zod.z.literal("CANCELED"),
|
|
532
|
+
zod.z.literal("UNRESOLVED_AUTH"),
|
|
533
|
+
zod.z.literal("INVALID_PAYLOAD"),
|
|
534
|
+
zod.z.literal("EXECUTING"),
|
|
535
|
+
zod.z.literal("WAITING_TO_CONTINUE"),
|
|
536
|
+
zod.z.literal("WAITING_TO_EXECUTE")
|
|
771
537
|
]);
|
|
772
|
-
var RunTaskSchema =
|
|
538
|
+
var RunTaskSchema = zod.z.object({
|
|
773
539
|
/** The Task id */
|
|
774
|
-
id:
|
|
540
|
+
id: zod.z.string(),
|
|
775
541
|
/** The key that you defined when creating the Task, the first param in any task. */
|
|
776
|
-
displayKey:
|
|
542
|
+
displayKey: zod.z.string().nullable(),
|
|
777
543
|
/** The Task status */
|
|
778
544
|
status: TaskStatusSchema,
|
|
779
545
|
/** The name of the Task */
|
|
780
|
-
name:
|
|
546
|
+
name: zod.z.string(),
|
|
781
547
|
/** The icon of the Task, a string.
|
|
782
548
|
* For integrations, this will be a lowercase name of the company.
|
|
783
549
|
* Can be used with the [@trigger.dev/companyicons](https://www.npmjs.com/package/@trigger.dev/companyicons) package to display an svg. */
|
|
784
|
-
icon:
|
|
550
|
+
icon: zod.z.string().nullable(),
|
|
785
551
|
/** When the task started */
|
|
786
|
-
startedAt:
|
|
552
|
+
startedAt: zod.z.coerce.date().nullable(),
|
|
787
553
|
/** When the task completed */
|
|
788
|
-
completedAt:
|
|
554
|
+
completedAt: zod.z.coerce.date().nullable()
|
|
789
555
|
});
|
|
790
556
|
var RunTaskWithSubtasksSchema = RunTaskSchema.extend({
|
|
791
|
-
subtasks:
|
|
557
|
+
subtasks: zod.z.lazy(() => RunTaskWithSubtasksSchema.array()).optional()
|
|
792
558
|
});
|
|
793
|
-
var GetRunOptionsSchema =
|
|
559
|
+
var GetRunOptionsSchema = zod.z.object({
|
|
794
560
|
/** Return subtasks, which appear in a `subtasks` array on a task. @default false */
|
|
795
|
-
subtasks:
|
|
561
|
+
subtasks: zod.z.boolean().optional(),
|
|
796
562
|
/** You can use this to get more tasks, if there are more than are returned in a single batch @default undefined */
|
|
797
|
-
cursor:
|
|
563
|
+
cursor: zod.z.string().optional(),
|
|
798
564
|
/** How many tasks you want to return in one go, max 50. @default 20 */
|
|
799
|
-
take:
|
|
565
|
+
take: zod.z.number().optional()
|
|
800
566
|
});
|
|
801
|
-
|
|
567
|
+
GetRunOptionsSchema.extend({
|
|
802
568
|
/** If `true`, it returns the `params` and `output` of all tasks. @default false */
|
|
803
|
-
taskdetails:
|
|
569
|
+
taskdetails: zod.z.boolean().optional()
|
|
804
570
|
});
|
|
805
|
-
var RunSchema =
|
|
571
|
+
var RunSchema = zod.z.object({
|
|
806
572
|
/** The Run id */
|
|
807
|
-
id:
|
|
573
|
+
id: zod.z.string(),
|
|
808
574
|
/** The Run status */
|
|
809
575
|
status: RunStatusSchema,
|
|
810
576
|
/** When the run started */
|
|
811
|
-
startedAt:
|
|
577
|
+
startedAt: zod.z.coerce.date().nullable(),
|
|
812
578
|
/** When the run was last updated */
|
|
813
|
-
updatedAt:
|
|
579
|
+
updatedAt: zod.z.coerce.date().nullable(),
|
|
814
580
|
/** When the run was completed */
|
|
815
|
-
completedAt:
|
|
581
|
+
completedAt: zod.z.coerce.date().nullable()
|
|
816
582
|
});
|
|
817
583
|
var GetRunSchema = RunSchema.extend({
|
|
818
584
|
/** The output of the run */
|
|
819
|
-
output:
|
|
585
|
+
output: zod.z.any().optional(),
|
|
820
586
|
/** The tasks from the run */
|
|
821
|
-
tasks:
|
|
587
|
+
tasks: zod.z.array(RunTaskWithSubtasksSchema),
|
|
822
588
|
/** Any status updates that were published from the run */
|
|
823
|
-
statuses:
|
|
589
|
+
statuses: zod.z.array(JobRunStatusRecordSchema).default([]),
|
|
824
590
|
/** If there are more tasks, you can use this to get them */
|
|
825
|
-
nextCursor:
|
|
591
|
+
nextCursor: zod.z.string().optional()
|
|
826
592
|
});
|
|
827
|
-
|
|
593
|
+
zod.z.object({
|
|
828
594
|
/** You can use this to get more tasks, if there are more than are returned in a single batch @default undefined */
|
|
829
|
-
cursor:
|
|
595
|
+
cursor: zod.z.string().optional(),
|
|
830
596
|
/** How many runs you want to return in one go, max 50. @default 20 */
|
|
831
|
-
take:
|
|
597
|
+
take: zod.z.number().optional()
|
|
832
598
|
});
|
|
833
|
-
var GetRunsSchema =
|
|
599
|
+
var GetRunsSchema = zod.z.object({
|
|
834
600
|
/** The runs from the query */
|
|
835
601
|
runs: RunSchema.array(),
|
|
836
602
|
/** If there are more runs, you can use this to get them */
|
|
837
|
-
nextCursor:
|
|
603
|
+
nextCursor: zod.z.string().optional()
|
|
838
604
|
});
|
|
839
|
-
|
|
840
|
-
// src/schemas/requestFilter.ts
|
|
841
|
-
var import_zod11 = require("zod");
|
|
842
|
-
var StringMatchSchema = import_zod11.z.union([
|
|
605
|
+
var StringMatchSchema = zod.z.union([
|
|
843
606
|
/** Match against a string */
|
|
844
|
-
|
|
845
|
-
|
|
607
|
+
zod.z.array(zod.z.string()),
|
|
608
|
+
zod.z.array(zod.z.union(stringPatternMatchers))
|
|
846
609
|
]);
|
|
847
|
-
var HTTPMethodUnionSchema =
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
610
|
+
var HTTPMethodUnionSchema = zod.z.union([
|
|
611
|
+
zod.z.literal("GET"),
|
|
612
|
+
zod.z.literal("POST"),
|
|
613
|
+
zod.z.literal("PUT"),
|
|
614
|
+
zod.z.literal("PATCH"),
|
|
615
|
+
zod.z.literal("DELETE"),
|
|
616
|
+
zod.z.literal("HEAD"),
|
|
617
|
+
zod.z.literal("OPTIONS")
|
|
855
618
|
]);
|
|
856
|
-
var RequestFilterSchema =
|
|
619
|
+
var RequestFilterSchema = zod.z.object({
|
|
857
620
|
/** An array of HTTP methods to match.
|
|
858
621
|
* For example, `["GET", "POST"]` will match both `GET` and `POST` Requests. */
|
|
859
|
-
method:
|
|
622
|
+
method: zod.z.array(HTTPMethodUnionSchema).optional(),
|
|
860
623
|
/** An object of header key/values to match.
|
|
861
624
|
* This uses the [EventFilter matching syntax](https://trigger.dev/docs/documentation/guides/event-filter).
|
|
862
625
|
|
|
@@ -868,7 +631,7 @@ var RequestFilterSchema = import_zod11.z.object({
|
|
|
868
631
|
},
|
|
869
632
|
},
|
|
870
633
|
``` */
|
|
871
|
-
headers:
|
|
634
|
+
headers: zod.z.record(StringMatchSchema).optional(),
|
|
872
635
|
/** An object of query parameters to match.
|
|
873
636
|
* This uses the [EventFilter matching syntax](https://trigger.dev/docs/documentation/guides/event-filter).
|
|
874
637
|
|
|
@@ -880,7 +643,7 @@ var RequestFilterSchema = import_zod11.z.object({
|
|
|
880
643
|
},
|
|
881
644
|
},
|
|
882
645
|
``` */
|
|
883
|
-
query:
|
|
646
|
+
query: zod.z.record(StringMatchSchema).optional(),
|
|
884
647
|
/** An object of key/values to match.
|
|
885
648
|
* This uses the [EventFilter matching syntax](https://trigger.dev/docs/documentation/guides/event-filter).
|
|
886
649
|
*/
|
|
@@ -890,304 +653,304 @@ var ResponseFilterSchema = RequestFilterSchema.omit({
|
|
|
890
653
|
method: true,
|
|
891
654
|
query: true
|
|
892
655
|
}).extend({
|
|
893
|
-
status:
|
|
656
|
+
status: zod.z.array(zod.z.number()).optional()
|
|
894
657
|
});
|
|
895
658
|
|
|
896
659
|
// src/schemas/api.ts
|
|
897
|
-
var UpdateTriggerSourceBodyV1Schema =
|
|
898
|
-
registeredEvents:
|
|
899
|
-
secret:
|
|
660
|
+
var UpdateTriggerSourceBodyV1Schema = zod.z.object({
|
|
661
|
+
registeredEvents: zod.z.array(zod.z.string()),
|
|
662
|
+
secret: zod.z.string().optional(),
|
|
900
663
|
data: SerializableJsonSchema.optional()
|
|
901
664
|
});
|
|
902
|
-
var UpdateTriggerSourceBodyV2Schema =
|
|
903
|
-
secret:
|
|
665
|
+
var UpdateTriggerSourceBodyV2Schema = zod.z.object({
|
|
666
|
+
secret: zod.z.string().optional(),
|
|
904
667
|
data: SerializableJsonSchema.optional(),
|
|
905
|
-
options:
|
|
906
|
-
event:
|
|
907
|
-
}).and(
|
|
668
|
+
options: zod.z.object({
|
|
669
|
+
event: zod.z.array(zod.z.string())
|
|
670
|
+
}).and(zod.z.record(zod.z.string(), zod.z.array(zod.z.string())).optional())
|
|
908
671
|
});
|
|
909
|
-
var UpdateWebhookBodySchema =
|
|
910
|
-
|
|
911
|
-
active:
|
|
672
|
+
var UpdateWebhookBodySchema = zod.z.discriminatedUnion("active", [
|
|
673
|
+
zod.z.object({
|
|
674
|
+
active: zod.z.literal(false)
|
|
912
675
|
}),
|
|
913
|
-
|
|
914
|
-
active:
|
|
915
|
-
config:
|
|
676
|
+
zod.z.object({
|
|
677
|
+
active: zod.z.literal(true),
|
|
678
|
+
config: zod.z.record(zod.z.string().array())
|
|
916
679
|
})
|
|
917
680
|
]);
|
|
918
|
-
var RegisterHTTPTriggerSourceBodySchema =
|
|
919
|
-
type:
|
|
920
|
-
url:
|
|
681
|
+
var RegisterHTTPTriggerSourceBodySchema = zod.z.object({
|
|
682
|
+
type: zod.z.literal("HTTP"),
|
|
683
|
+
url: zod.z.string().url()
|
|
921
684
|
});
|
|
922
|
-
var RegisterSMTPTriggerSourceBodySchema =
|
|
923
|
-
type:
|
|
685
|
+
var RegisterSMTPTriggerSourceBodySchema = zod.z.object({
|
|
686
|
+
type: zod.z.literal("SMTP")
|
|
924
687
|
});
|
|
925
|
-
var RegisterSQSTriggerSourceBodySchema =
|
|
926
|
-
type:
|
|
688
|
+
var RegisterSQSTriggerSourceBodySchema = zod.z.object({
|
|
689
|
+
type: zod.z.literal("SQS")
|
|
927
690
|
});
|
|
928
|
-
var RegisterSourceChannelBodySchema =
|
|
691
|
+
var RegisterSourceChannelBodySchema = zod.z.discriminatedUnion("type", [
|
|
929
692
|
RegisterHTTPTriggerSourceBodySchema,
|
|
930
693
|
RegisterSMTPTriggerSourceBodySchema,
|
|
931
694
|
RegisterSQSTriggerSourceBodySchema
|
|
932
695
|
]);
|
|
933
696
|
var REGISTER_WEBHOOK = "dev.trigger.webhook.register";
|
|
934
697
|
var DELIVER_WEBHOOK_REQUEST = "dev.trigger.webhook.deliver";
|
|
935
|
-
var RegisterWebhookSourceSchema =
|
|
936
|
-
key:
|
|
937
|
-
params:
|
|
938
|
-
config:
|
|
939
|
-
active:
|
|
940
|
-
secret:
|
|
941
|
-
url:
|
|
698
|
+
var RegisterWebhookSourceSchema = zod.z.object({
|
|
699
|
+
key: zod.z.string(),
|
|
700
|
+
params: zod.z.any(),
|
|
701
|
+
config: zod.z.any(),
|
|
702
|
+
active: zod.z.boolean(),
|
|
703
|
+
secret: zod.z.string(),
|
|
704
|
+
url: zod.z.string(),
|
|
942
705
|
data: DeserializedJsonSchema.optional(),
|
|
943
|
-
clientId:
|
|
944
|
-
});
|
|
945
|
-
var RegisterWebhookPayloadSchema =
|
|
946
|
-
active:
|
|
947
|
-
params:
|
|
948
|
-
config:
|
|
949
|
-
current:
|
|
950
|
-
desired:
|
|
706
|
+
clientId: zod.z.string().optional()
|
|
707
|
+
});
|
|
708
|
+
var RegisterWebhookPayloadSchema = zod.z.object({
|
|
709
|
+
active: zod.z.boolean(),
|
|
710
|
+
params: zod.z.any().optional(),
|
|
711
|
+
config: zod.z.object({
|
|
712
|
+
current: zod.z.record(zod.z.string().array()),
|
|
713
|
+
desired: zod.z.record(zod.z.string().array())
|
|
951
714
|
}),
|
|
952
715
|
// from HTTP Endpoint
|
|
953
|
-
url:
|
|
954
|
-
secret:
|
|
716
|
+
url: zod.z.string(),
|
|
717
|
+
secret: zod.z.string()
|
|
955
718
|
});
|
|
956
719
|
var REGISTER_SOURCE_EVENT_V1 = "dev.trigger.source.register";
|
|
957
720
|
var REGISTER_SOURCE_EVENT_V2 = "dev.trigger.source.register.v2";
|
|
958
|
-
var RegisterTriggerSourceSchema =
|
|
959
|
-
key:
|
|
960
|
-
params:
|
|
961
|
-
active:
|
|
962
|
-
secret:
|
|
721
|
+
var RegisterTriggerSourceSchema = zod.z.object({
|
|
722
|
+
key: zod.z.string(),
|
|
723
|
+
params: zod.z.any(),
|
|
724
|
+
active: zod.z.boolean(),
|
|
725
|
+
secret: zod.z.string(),
|
|
963
726
|
data: DeserializedJsonSchema.optional(),
|
|
964
727
|
channel: RegisterSourceChannelBodySchema,
|
|
965
|
-
clientId:
|
|
728
|
+
clientId: zod.z.string().optional()
|
|
966
729
|
});
|
|
967
|
-
|
|
968
|
-
name:
|
|
969
|
-
value:
|
|
730
|
+
zod.z.object({
|
|
731
|
+
name: zod.z.string(),
|
|
732
|
+
value: zod.z.string()
|
|
970
733
|
});
|
|
971
|
-
var RegisterSourceEventSchemaV1 =
|
|
734
|
+
var RegisterSourceEventSchemaV1 = zod.z.object({
|
|
972
735
|
/** The id of the source */
|
|
973
|
-
id:
|
|
736
|
+
id: zod.z.string(),
|
|
974
737
|
source: RegisterTriggerSourceSchema,
|
|
975
|
-
events:
|
|
976
|
-
missingEvents:
|
|
977
|
-
orphanedEvents:
|
|
978
|
-
dynamicTriggerId:
|
|
738
|
+
events: zod.z.array(zod.z.string()),
|
|
739
|
+
missingEvents: zod.z.array(zod.z.string()),
|
|
740
|
+
orphanedEvents: zod.z.array(zod.z.string()),
|
|
741
|
+
dynamicTriggerId: zod.z.string().optional()
|
|
979
742
|
});
|
|
980
|
-
var RegisteredOptionsDiffSchema =
|
|
981
|
-
desired:
|
|
982
|
-
missing:
|
|
983
|
-
orphaned:
|
|
743
|
+
var RegisteredOptionsDiffSchema = zod.z.object({
|
|
744
|
+
desired: zod.z.array(zod.z.string()),
|
|
745
|
+
missing: zod.z.array(zod.z.string()),
|
|
746
|
+
orphaned: zod.z.array(zod.z.string())
|
|
984
747
|
});
|
|
985
|
-
var RegisterSourceEventOptionsSchema =
|
|
748
|
+
var RegisterSourceEventOptionsSchema = zod.z.object({
|
|
986
749
|
event: RegisteredOptionsDiffSchema
|
|
987
|
-
}).and(
|
|
988
|
-
var RegisterSourceEventSchemaV2 =
|
|
750
|
+
}).and(zod.z.record(zod.z.string(), RegisteredOptionsDiffSchema));
|
|
751
|
+
var RegisterSourceEventSchemaV2 = zod.z.object({
|
|
989
752
|
/** The id of the source */
|
|
990
|
-
id:
|
|
753
|
+
id: zod.z.string(),
|
|
991
754
|
source: RegisterTriggerSourceSchema,
|
|
992
755
|
options: RegisterSourceEventOptionsSchema,
|
|
993
|
-
dynamicTriggerId:
|
|
756
|
+
dynamicTriggerId: zod.z.string().optional()
|
|
994
757
|
});
|
|
995
|
-
var TriggerSourceSchema =
|
|
996
|
-
id:
|
|
997
|
-
key:
|
|
758
|
+
var TriggerSourceSchema = zod.z.object({
|
|
759
|
+
id: zod.z.string(),
|
|
760
|
+
key: zod.z.string()
|
|
998
761
|
});
|
|
999
762
|
var HttpSourceResponseMetadataSchema = DeserializedJsonSchema;
|
|
1000
|
-
var HandleTriggerSourceSchema =
|
|
1001
|
-
key:
|
|
1002
|
-
secret:
|
|
1003
|
-
data:
|
|
1004
|
-
params:
|
|
763
|
+
var HandleTriggerSourceSchema = zod.z.object({
|
|
764
|
+
key: zod.z.string(),
|
|
765
|
+
secret: zod.z.string(),
|
|
766
|
+
data: zod.z.any(),
|
|
767
|
+
params: zod.z.any(),
|
|
1005
768
|
auth: ConnectionAuthSchema.optional(),
|
|
1006
769
|
metadata: HttpSourceResponseMetadataSchema.optional()
|
|
1007
770
|
});
|
|
1008
|
-
var HttpSourceRequestHeadersSchema =
|
|
1009
|
-
"x-ts-key":
|
|
1010
|
-
"x-ts-dynamic-id":
|
|
1011
|
-
"x-ts-secret":
|
|
1012
|
-
"x-ts-data":
|
|
1013
|
-
"x-ts-params":
|
|
1014
|
-
"x-ts-http-url":
|
|
1015
|
-
"x-ts-http-method":
|
|
1016
|
-
"x-ts-http-headers":
|
|
1017
|
-
"x-ts-auth":
|
|
771
|
+
var HttpSourceRequestHeadersSchema = zod.z.object({
|
|
772
|
+
"x-ts-key": zod.z.string(),
|
|
773
|
+
"x-ts-dynamic-id": zod.z.string().optional(),
|
|
774
|
+
"x-ts-secret": zod.z.string(),
|
|
775
|
+
"x-ts-data": zod.z.string().transform((s) => JSON.parse(s)),
|
|
776
|
+
"x-ts-params": zod.z.string().transform((s) => JSON.parse(s)),
|
|
777
|
+
"x-ts-http-url": zod.z.string(),
|
|
778
|
+
"x-ts-http-method": zod.z.string(),
|
|
779
|
+
"x-ts-http-headers": zod.z.string().transform((s) => zod.z.record(zod.z.string()).parse(JSON.parse(s))),
|
|
780
|
+
"x-ts-auth": zod.z.string().optional().transform((s) => {
|
|
1018
781
|
if (s === void 0)
|
|
1019
782
|
return;
|
|
1020
783
|
const json = JSON.parse(s);
|
|
1021
784
|
return ConnectionAuthSchema.parse(json);
|
|
1022
785
|
}),
|
|
1023
|
-
"x-ts-metadata":
|
|
786
|
+
"x-ts-metadata": zod.z.string().optional().transform((s) => {
|
|
1024
787
|
if (s === void 0)
|
|
1025
788
|
return;
|
|
1026
789
|
const json = JSON.parse(s);
|
|
1027
790
|
return DeserializedJsonSchema.parse(json);
|
|
1028
791
|
})
|
|
1029
792
|
});
|
|
1030
|
-
var HttpEndpointRequestHeadersSchema =
|
|
1031
|
-
"x-ts-key":
|
|
1032
|
-
"x-ts-http-url":
|
|
1033
|
-
"x-ts-http-method":
|
|
1034
|
-
"x-ts-http-headers":
|
|
1035
|
-
});
|
|
1036
|
-
var WebhookSourceRequestHeadersSchema =
|
|
1037
|
-
"x-ts-key":
|
|
1038
|
-
"x-ts-dynamic-id":
|
|
1039
|
-
"x-ts-secret":
|
|
1040
|
-
"x-ts-params":
|
|
1041
|
-
"x-ts-http-url":
|
|
1042
|
-
"x-ts-http-method":
|
|
1043
|
-
"x-ts-http-headers":
|
|
1044
|
-
});
|
|
1045
|
-
var PongSuccessResponseSchema =
|
|
1046
|
-
ok:
|
|
1047
|
-
triggerVersion:
|
|
1048
|
-
triggerSdkVersion:
|
|
1049
|
-
});
|
|
1050
|
-
var PongErrorResponseSchema =
|
|
1051
|
-
ok:
|
|
1052
|
-
error:
|
|
1053
|
-
triggerVersion:
|
|
1054
|
-
triggerSdkVersion:
|
|
1055
|
-
});
|
|
1056
|
-
var PongResponseSchema =
|
|
793
|
+
var HttpEndpointRequestHeadersSchema = zod.z.object({
|
|
794
|
+
"x-ts-key": zod.z.string(),
|
|
795
|
+
"x-ts-http-url": zod.z.string(),
|
|
796
|
+
"x-ts-http-method": zod.z.string(),
|
|
797
|
+
"x-ts-http-headers": zod.z.string().transform((s) => zod.z.record(zod.z.string()).parse(JSON.parse(s)))
|
|
798
|
+
});
|
|
799
|
+
var WebhookSourceRequestHeadersSchema = zod.z.object({
|
|
800
|
+
"x-ts-key": zod.z.string(),
|
|
801
|
+
"x-ts-dynamic-id": zod.z.string().optional(),
|
|
802
|
+
"x-ts-secret": zod.z.string(),
|
|
803
|
+
"x-ts-params": zod.z.string().transform((s) => JSON.parse(s)),
|
|
804
|
+
"x-ts-http-url": zod.z.string(),
|
|
805
|
+
"x-ts-http-method": zod.z.string(),
|
|
806
|
+
"x-ts-http-headers": zod.z.string().transform((s) => zod.z.record(zod.z.string()).parse(JSON.parse(s)))
|
|
807
|
+
});
|
|
808
|
+
var PongSuccessResponseSchema = zod.z.object({
|
|
809
|
+
ok: zod.z.literal(true),
|
|
810
|
+
triggerVersion: zod.z.string().optional(),
|
|
811
|
+
triggerSdkVersion: zod.z.string().optional()
|
|
812
|
+
});
|
|
813
|
+
var PongErrorResponseSchema = zod.z.object({
|
|
814
|
+
ok: zod.z.literal(false),
|
|
815
|
+
error: zod.z.string(),
|
|
816
|
+
triggerVersion: zod.z.string().optional(),
|
|
817
|
+
triggerSdkVersion: zod.z.string().optional()
|
|
818
|
+
});
|
|
819
|
+
var PongResponseSchema = zod.z.discriminatedUnion("ok", [
|
|
1057
820
|
PongSuccessResponseSchema,
|
|
1058
821
|
PongErrorResponseSchema
|
|
1059
822
|
]);
|
|
1060
|
-
var ValidateSuccessResponseSchema =
|
|
1061
|
-
ok:
|
|
1062
|
-
endpointId:
|
|
1063
|
-
triggerVersion:
|
|
823
|
+
var ValidateSuccessResponseSchema = zod.z.object({
|
|
824
|
+
ok: zod.z.literal(true),
|
|
825
|
+
endpointId: zod.z.string(),
|
|
826
|
+
triggerVersion: zod.z.string().optional()
|
|
1064
827
|
});
|
|
1065
|
-
var ValidateErrorResponseSchema =
|
|
1066
|
-
ok:
|
|
1067
|
-
error:
|
|
1068
|
-
triggerVersion:
|
|
828
|
+
var ValidateErrorResponseSchema = zod.z.object({
|
|
829
|
+
ok: zod.z.literal(false),
|
|
830
|
+
error: zod.z.string(),
|
|
831
|
+
triggerVersion: zod.z.string().optional()
|
|
1069
832
|
});
|
|
1070
|
-
var ValidateResponseSchema =
|
|
833
|
+
var ValidateResponseSchema = zod.z.discriminatedUnion("ok", [
|
|
1071
834
|
ValidateSuccessResponseSchema,
|
|
1072
835
|
ValidateErrorResponseSchema
|
|
1073
836
|
]);
|
|
1074
|
-
var QueueOptionsSchema =
|
|
1075
|
-
name:
|
|
1076
|
-
maxConcurrent:
|
|
1077
|
-
});
|
|
1078
|
-
var ConcurrencyLimitOptionsSchema =
|
|
1079
|
-
id:
|
|
1080
|
-
limit:
|
|
1081
|
-
});
|
|
1082
|
-
var JobMetadataSchema =
|
|
1083
|
-
id:
|
|
1084
|
-
name:
|
|
1085
|
-
version:
|
|
837
|
+
var QueueOptionsSchema = zod.z.object({
|
|
838
|
+
name: zod.z.string(),
|
|
839
|
+
maxConcurrent: zod.z.number().optional()
|
|
840
|
+
});
|
|
841
|
+
var ConcurrencyLimitOptionsSchema = zod.z.object({
|
|
842
|
+
id: zod.z.string(),
|
|
843
|
+
limit: zod.z.number()
|
|
844
|
+
});
|
|
845
|
+
var JobMetadataSchema = zod.z.object({
|
|
846
|
+
id: zod.z.string(),
|
|
847
|
+
name: zod.z.string(),
|
|
848
|
+
version: zod.z.string(),
|
|
1086
849
|
event: EventSpecificationSchema,
|
|
1087
850
|
trigger: TriggerMetadataSchema,
|
|
1088
|
-
integrations:
|
|
1089
|
-
internal:
|
|
1090
|
-
enabled:
|
|
1091
|
-
startPosition:
|
|
851
|
+
integrations: zod.z.record(IntegrationConfigSchema),
|
|
852
|
+
internal: zod.z.boolean().default(false),
|
|
853
|
+
enabled: zod.z.boolean(),
|
|
854
|
+
startPosition: zod.z.enum([
|
|
1092
855
|
"initial",
|
|
1093
856
|
"latest"
|
|
1094
857
|
]),
|
|
1095
|
-
preprocessRuns:
|
|
1096
|
-
concurrencyLimit: ConcurrencyLimitOptionsSchema.or(
|
|
858
|
+
preprocessRuns: zod.z.boolean(),
|
|
859
|
+
concurrencyLimit: ConcurrencyLimitOptionsSchema.or(zod.z.number().int().positive()).optional()
|
|
1097
860
|
});
|
|
1098
|
-
var SourceMetadataV1Schema =
|
|
1099
|
-
version:
|
|
1100
|
-
channel:
|
|
861
|
+
var SourceMetadataV1Schema = zod.z.object({
|
|
862
|
+
version: zod.z.literal("1"),
|
|
863
|
+
channel: zod.z.enum([
|
|
1101
864
|
"HTTP",
|
|
1102
865
|
"SQS",
|
|
1103
866
|
"SMTP"
|
|
1104
867
|
]),
|
|
1105
868
|
integration: IntegrationConfigSchema,
|
|
1106
|
-
key:
|
|
1107
|
-
params:
|
|
1108
|
-
events:
|
|
1109
|
-
registerSourceJob:
|
|
1110
|
-
id:
|
|
1111
|
-
version:
|
|
869
|
+
key: zod.z.string(),
|
|
870
|
+
params: zod.z.any(),
|
|
871
|
+
events: zod.z.array(zod.z.string()),
|
|
872
|
+
registerSourceJob: zod.z.object({
|
|
873
|
+
id: zod.z.string(),
|
|
874
|
+
version: zod.z.string()
|
|
1112
875
|
}).optional()
|
|
1113
876
|
});
|
|
1114
|
-
var SourceMetadataV2Schema =
|
|
1115
|
-
version:
|
|
1116
|
-
channel:
|
|
877
|
+
var SourceMetadataV2Schema = zod.z.object({
|
|
878
|
+
version: zod.z.literal("2"),
|
|
879
|
+
channel: zod.z.enum([
|
|
1117
880
|
"HTTP",
|
|
1118
881
|
"SQS",
|
|
1119
882
|
"SMTP"
|
|
1120
883
|
]),
|
|
1121
884
|
integration: IntegrationConfigSchema,
|
|
1122
|
-
key:
|
|
1123
|
-
params:
|
|
1124
|
-
options:
|
|
1125
|
-
registerSourceJob:
|
|
1126
|
-
id:
|
|
1127
|
-
version:
|
|
885
|
+
key: zod.z.string(),
|
|
886
|
+
params: zod.z.any(),
|
|
887
|
+
options: zod.z.record(zod.z.array(zod.z.string())),
|
|
888
|
+
registerSourceJob: zod.z.object({
|
|
889
|
+
id: zod.z.string(),
|
|
890
|
+
version: zod.z.string()
|
|
1128
891
|
}).optional()
|
|
1129
892
|
});
|
|
1130
|
-
var SourceMetadataSchema =
|
|
893
|
+
var SourceMetadataSchema = zod.z.preprocess(addMissingVersionField, zod.z.discriminatedUnion("version", [
|
|
1131
894
|
SourceMetadataV1Schema,
|
|
1132
895
|
SourceMetadataV2Schema
|
|
1133
896
|
]));
|
|
1134
|
-
var WebhookMetadataSchema =
|
|
1135
|
-
key:
|
|
1136
|
-
params:
|
|
1137
|
-
config:
|
|
897
|
+
var WebhookMetadataSchema = zod.z.object({
|
|
898
|
+
key: zod.z.string(),
|
|
899
|
+
params: zod.z.any(),
|
|
900
|
+
config: zod.z.record(zod.z.array(zod.z.string())),
|
|
1138
901
|
integration: IntegrationConfigSchema,
|
|
1139
|
-
httpEndpoint:
|
|
1140
|
-
id:
|
|
902
|
+
httpEndpoint: zod.z.object({
|
|
903
|
+
id: zod.z.string()
|
|
1141
904
|
})
|
|
1142
905
|
});
|
|
1143
|
-
var WebhookContextMetadataSchema =
|
|
1144
|
-
params:
|
|
1145
|
-
config:
|
|
1146
|
-
secret:
|
|
906
|
+
var WebhookContextMetadataSchema = zod.z.object({
|
|
907
|
+
params: zod.z.any(),
|
|
908
|
+
config: zod.z.record(zod.z.string().array()),
|
|
909
|
+
secret: zod.z.string()
|
|
1147
910
|
});
|
|
1148
|
-
var DynamicTriggerEndpointMetadataSchema =
|
|
1149
|
-
id:
|
|
1150
|
-
jobs:
|
|
911
|
+
var DynamicTriggerEndpointMetadataSchema = zod.z.object({
|
|
912
|
+
id: zod.z.string(),
|
|
913
|
+
jobs: zod.z.array(JobMetadataSchema.pick({
|
|
1151
914
|
id: true,
|
|
1152
915
|
version: true
|
|
1153
916
|
})),
|
|
1154
|
-
registerSourceJob:
|
|
1155
|
-
id:
|
|
1156
|
-
version:
|
|
917
|
+
registerSourceJob: zod.z.object({
|
|
918
|
+
id: zod.z.string(),
|
|
919
|
+
version: zod.z.string()
|
|
1157
920
|
}).optional()
|
|
1158
921
|
});
|
|
1159
|
-
var HttpEndpointMetadataSchema =
|
|
1160
|
-
id:
|
|
1161
|
-
version:
|
|
1162
|
-
enabled:
|
|
1163
|
-
title:
|
|
1164
|
-
icon:
|
|
1165
|
-
properties:
|
|
922
|
+
var HttpEndpointMetadataSchema = zod.z.object({
|
|
923
|
+
id: zod.z.string(),
|
|
924
|
+
version: zod.z.string(),
|
|
925
|
+
enabled: zod.z.boolean(),
|
|
926
|
+
title: zod.z.string().optional(),
|
|
927
|
+
icon: zod.z.string().optional(),
|
|
928
|
+
properties: zod.z.array(DisplayPropertySchema).optional(),
|
|
1166
929
|
event: EventSpecificationSchema,
|
|
1167
930
|
immediateResponseFilter: RequestFilterSchema.optional(),
|
|
1168
|
-
skipTriggeringRuns:
|
|
1169
|
-
source:
|
|
1170
|
-
});
|
|
1171
|
-
var IndexEndpointResponseSchema =
|
|
1172
|
-
jobs:
|
|
1173
|
-
sources:
|
|
1174
|
-
webhooks:
|
|
1175
|
-
dynamicTriggers:
|
|
1176
|
-
dynamicSchedules:
|
|
1177
|
-
httpEndpoints:
|
|
1178
|
-
});
|
|
1179
|
-
var EndpointIndexErrorSchema =
|
|
1180
|
-
message:
|
|
1181
|
-
raw:
|
|
1182
|
-
});
|
|
1183
|
-
var IndexEndpointStatsSchema =
|
|
1184
|
-
jobs:
|
|
1185
|
-
sources:
|
|
1186
|
-
webhooks:
|
|
1187
|
-
dynamicTriggers:
|
|
1188
|
-
dynamicSchedules:
|
|
1189
|
-
disabledJobs:
|
|
1190
|
-
httpEndpoints:
|
|
931
|
+
skipTriggeringRuns: zod.z.boolean().optional(),
|
|
932
|
+
source: zod.z.string()
|
|
933
|
+
});
|
|
934
|
+
var IndexEndpointResponseSchema = zod.z.object({
|
|
935
|
+
jobs: zod.z.array(JobMetadataSchema),
|
|
936
|
+
sources: zod.z.array(SourceMetadataSchema),
|
|
937
|
+
webhooks: zod.z.array(WebhookMetadataSchema).optional(),
|
|
938
|
+
dynamicTriggers: zod.z.array(DynamicTriggerEndpointMetadataSchema),
|
|
939
|
+
dynamicSchedules: zod.z.array(RegisterDynamicSchedulePayloadSchema),
|
|
940
|
+
httpEndpoints: zod.z.array(HttpEndpointMetadataSchema).optional()
|
|
941
|
+
});
|
|
942
|
+
var EndpointIndexErrorSchema = zod.z.object({
|
|
943
|
+
message: zod.z.string(),
|
|
944
|
+
raw: zod.z.any().optional()
|
|
945
|
+
});
|
|
946
|
+
var IndexEndpointStatsSchema = zod.z.object({
|
|
947
|
+
jobs: zod.z.number(),
|
|
948
|
+
sources: zod.z.number(),
|
|
949
|
+
webhooks: zod.z.number().optional(),
|
|
950
|
+
dynamicTriggers: zod.z.number(),
|
|
951
|
+
dynamicSchedules: zod.z.number(),
|
|
952
|
+
disabledJobs: zod.z.number().default(0),
|
|
953
|
+
httpEndpoints: zod.z.number().default(0)
|
|
1191
954
|
});
|
|
1192
955
|
function parseEndpointIndexStats(stats) {
|
|
1193
956
|
if (stats === null || stats === void 0) {
|
|
@@ -1196,227 +959,227 @@ function parseEndpointIndexStats(stats) {
|
|
|
1196
959
|
return IndexEndpointStatsSchema.parse(stats);
|
|
1197
960
|
}
|
|
1198
961
|
__name(parseEndpointIndexStats, "parseEndpointIndexStats");
|
|
1199
|
-
var GetEndpointIndexResponseSchema =
|
|
1200
|
-
|
|
1201
|
-
status:
|
|
1202
|
-
updatedAt:
|
|
962
|
+
var GetEndpointIndexResponseSchema = zod.z.discriminatedUnion("status", [
|
|
963
|
+
zod.z.object({
|
|
964
|
+
status: zod.z.literal("PENDING"),
|
|
965
|
+
updatedAt: zod.z.coerce.date()
|
|
1203
966
|
}),
|
|
1204
|
-
|
|
1205
|
-
status:
|
|
1206
|
-
updatedAt:
|
|
967
|
+
zod.z.object({
|
|
968
|
+
status: zod.z.literal("STARTED"),
|
|
969
|
+
updatedAt: zod.z.coerce.date()
|
|
1207
970
|
}),
|
|
1208
|
-
|
|
1209
|
-
status:
|
|
971
|
+
zod.z.object({
|
|
972
|
+
status: zod.z.literal("SUCCESS"),
|
|
1210
973
|
stats: IndexEndpointStatsSchema,
|
|
1211
|
-
updatedAt:
|
|
974
|
+
updatedAt: zod.z.coerce.date()
|
|
1212
975
|
}),
|
|
1213
|
-
|
|
1214
|
-
status:
|
|
976
|
+
zod.z.object({
|
|
977
|
+
status: zod.z.literal("FAILURE"),
|
|
1215
978
|
error: EndpointIndexErrorSchema,
|
|
1216
|
-
updatedAt:
|
|
979
|
+
updatedAt: zod.z.coerce.date()
|
|
1217
980
|
})
|
|
1218
981
|
]);
|
|
1219
|
-
var EndpointHeadersSchema =
|
|
1220
|
-
"trigger-version":
|
|
1221
|
-
"trigger-sdk-version":
|
|
982
|
+
var EndpointHeadersSchema = zod.z.object({
|
|
983
|
+
"trigger-version": zod.z.string().optional(),
|
|
984
|
+
"trigger-sdk-version": zod.z.string().optional()
|
|
1222
985
|
});
|
|
1223
|
-
var ExecuteJobRunMetadataSchema =
|
|
1224
|
-
successSubscription:
|
|
1225
|
-
failedSubscription:
|
|
986
|
+
var ExecuteJobRunMetadataSchema = zod.z.object({
|
|
987
|
+
successSubscription: zod.z.boolean().optional(),
|
|
988
|
+
failedSubscription: zod.z.boolean().optional()
|
|
1226
989
|
});
|
|
1227
990
|
var ExecuteJobHeadersSchema = EndpointHeadersSchema.extend({
|
|
1228
|
-
"x-trigger-run-metadata":
|
|
991
|
+
"x-trigger-run-metadata": zod.z.preprocess((val) => typeof val === "string" && JSON.parse(val), ExecuteJobRunMetadataSchema).optional()
|
|
1229
992
|
});
|
|
1230
|
-
var RawEventSchema =
|
|
993
|
+
var RawEventSchema = zod.z.object({
|
|
1231
994
|
/** The `name` property must exactly match any subscriptions you want to
|
|
1232
995
|
trigger. */
|
|
1233
|
-
name:
|
|
996
|
+
name: zod.z.string(),
|
|
1234
997
|
/** The `payload` property will be sent to any matching Jobs and will appear
|
|
1235
998
|
as the `payload` param of the `run()` function. You can leave this
|
|
1236
999
|
parameter out if you just want to trigger a Job without any input data. */
|
|
1237
|
-
payload:
|
|
1000
|
+
payload: zod.z.any(),
|
|
1238
1001
|
/** The optional `context` property will be sent to any matching Jobs and will
|
|
1239
1002
|
be passed through as the `context.event.context` param of the `run()`
|
|
1240
1003
|
function. This is optional but can be useful if you want to pass through
|
|
1241
1004
|
some additional context to the Job. */
|
|
1242
|
-
context:
|
|
1005
|
+
context: zod.z.any().optional(),
|
|
1243
1006
|
/** The `id` property uniquely identify this particular event. If unset it
|
|
1244
1007
|
will be set automatically using `ulid`. */
|
|
1245
|
-
id:
|
|
1008
|
+
id: zod.z.string().default(() => ulidx.ulid()),
|
|
1246
1009
|
/** This is optional, it defaults to the current timestamp. Usually you would
|
|
1247
1010
|
only set this if you have a timestamp that you wish to pass through, e.g.
|
|
1248
1011
|
you receive a timestamp from a service and you want the same timestamp to
|
|
1249
1012
|
be used in your Job. */
|
|
1250
|
-
timestamp:
|
|
1013
|
+
timestamp: zod.z.coerce.date().optional(),
|
|
1251
1014
|
/** This is optional, it defaults to "trigger.dev". It can be useful to set
|
|
1252
1015
|
this as you can filter events using this in the `eventTrigger()`. */
|
|
1253
|
-
source:
|
|
1016
|
+
source: zod.z.string().optional(),
|
|
1254
1017
|
/** This is optional, it defaults to "JSON". If your event is actually a request,
|
|
1255
1018
|
with a url, headers, method and rawBody you can use "REQUEST" */
|
|
1256
|
-
payloadType:
|
|
1257
|
-
|
|
1258
|
-
|
|
1019
|
+
payloadType: zod.z.union([
|
|
1020
|
+
zod.z.literal("JSON"),
|
|
1021
|
+
zod.z.literal("REQUEST")
|
|
1259
1022
|
]).optional()
|
|
1260
1023
|
});
|
|
1261
|
-
var ApiEventLogSchema =
|
|
1024
|
+
var ApiEventLogSchema = zod.z.object({
|
|
1262
1025
|
/** The `id` of the event that was sent.
|
|
1263
1026
|
*/
|
|
1264
|
-
id:
|
|
1027
|
+
id: zod.z.string(),
|
|
1265
1028
|
/** The `name` of the event that was sent. */
|
|
1266
|
-
name:
|
|
1029
|
+
name: zod.z.string(),
|
|
1267
1030
|
/** The `payload` of the event that was sent */
|
|
1268
1031
|
payload: DeserializedJsonSchema,
|
|
1269
1032
|
/** The `context` of the event that was sent. Is `undefined` if no context was
|
|
1270
1033
|
set when sending the event. */
|
|
1271
1034
|
context: DeserializedJsonSchema.optional().nullable(),
|
|
1272
1035
|
/** The `timestamp` of the event that was sent */
|
|
1273
|
-
timestamp:
|
|
1036
|
+
timestamp: zod.z.coerce.date(),
|
|
1274
1037
|
/** The timestamp when the event will be delivered to any matching Jobs. Is
|
|
1275
1038
|
`undefined` if `deliverAt` or `deliverAfter` wasn't set when sending the
|
|
1276
1039
|
event. */
|
|
1277
|
-
deliverAt:
|
|
1040
|
+
deliverAt: zod.z.coerce.date().optional().nullable(),
|
|
1278
1041
|
/** The timestamp when the event was delivered. Is `undefined` if `deliverAt`
|
|
1279
1042
|
or `deliverAfter` were set when sending the event. */
|
|
1280
|
-
deliveredAt:
|
|
1043
|
+
deliveredAt: zod.z.coerce.date().optional().nullable(),
|
|
1281
1044
|
/** The timestamp when the event was cancelled. Is `undefined` if the event
|
|
1282
1045
|
* wasn't cancelled. */
|
|
1283
|
-
cancelledAt:
|
|
1046
|
+
cancelledAt: zod.z.coerce.date().optional().nullable()
|
|
1284
1047
|
});
|
|
1285
|
-
var SendEventOptionsSchema =
|
|
1048
|
+
var SendEventOptionsSchema = zod.z.object({
|
|
1286
1049
|
/** An optional Date when you want the event to trigger Jobs. The event will
|
|
1287
1050
|
be sent to the platform immediately but won't be acted upon until the
|
|
1288
1051
|
specified time. */
|
|
1289
|
-
deliverAt:
|
|
1052
|
+
deliverAt: zod.z.coerce.date().optional(),
|
|
1290
1053
|
/** An optional number of seconds you want to wait for the event to trigger
|
|
1291
1054
|
any relevant Jobs. The event will be sent to the platform immediately but
|
|
1292
1055
|
won't be delivered until after the elapsed number of seconds. */
|
|
1293
|
-
deliverAfter:
|
|
1056
|
+
deliverAfter: zod.z.number().int().optional(),
|
|
1294
1057
|
/** This optional param will be used by Trigger.dev Connect, which
|
|
1295
1058
|
is coming soon. */
|
|
1296
|
-
accountId:
|
|
1059
|
+
accountId: zod.z.string().optional()
|
|
1297
1060
|
});
|
|
1298
|
-
var SendEventBodySchema =
|
|
1061
|
+
var SendEventBodySchema = zod.z.object({
|
|
1299
1062
|
event: RawEventSchema,
|
|
1300
1063
|
options: SendEventOptionsSchema.optional()
|
|
1301
1064
|
});
|
|
1302
|
-
var SendBulkEventsBodySchema =
|
|
1065
|
+
var SendBulkEventsBodySchema = zod.z.object({
|
|
1303
1066
|
events: RawEventSchema.array(),
|
|
1304
1067
|
options: SendEventOptionsSchema.optional()
|
|
1305
1068
|
});
|
|
1306
|
-
var DeliverEventResponseSchema =
|
|
1307
|
-
deliveredAt:
|
|
1069
|
+
var DeliverEventResponseSchema = zod.z.object({
|
|
1070
|
+
deliveredAt: zod.z.string().datetime()
|
|
1308
1071
|
});
|
|
1309
|
-
var RuntimeEnvironmentTypeSchema =
|
|
1072
|
+
var RuntimeEnvironmentTypeSchema = zod.z.enum([
|
|
1310
1073
|
"PRODUCTION",
|
|
1311
1074
|
"STAGING",
|
|
1312
1075
|
"DEVELOPMENT",
|
|
1313
1076
|
"PREVIEW"
|
|
1314
1077
|
]);
|
|
1315
|
-
var RunSourceContextSchema =
|
|
1316
|
-
id:
|
|
1317
|
-
metadata:
|
|
1078
|
+
var RunSourceContextSchema = zod.z.object({
|
|
1079
|
+
id: zod.z.string(),
|
|
1080
|
+
metadata: zod.z.any()
|
|
1318
1081
|
});
|
|
1319
|
-
var AutoYieldConfigSchema =
|
|
1320
|
-
startTaskThreshold:
|
|
1321
|
-
beforeExecuteTaskThreshold:
|
|
1322
|
-
beforeCompleteTaskThreshold:
|
|
1323
|
-
afterCompleteTaskThreshold:
|
|
1082
|
+
var AutoYieldConfigSchema = zod.z.object({
|
|
1083
|
+
startTaskThreshold: zod.z.number(),
|
|
1084
|
+
beforeExecuteTaskThreshold: zod.z.number(),
|
|
1085
|
+
beforeCompleteTaskThreshold: zod.z.number(),
|
|
1086
|
+
afterCompleteTaskThreshold: zod.z.number()
|
|
1324
1087
|
});
|
|
1325
|
-
var RunJobBodySchema =
|
|
1088
|
+
var RunJobBodySchema = zod.z.object({
|
|
1326
1089
|
event: ApiEventLogSchema,
|
|
1327
|
-
job:
|
|
1328
|
-
id:
|
|
1329
|
-
version:
|
|
1090
|
+
job: zod.z.object({
|
|
1091
|
+
id: zod.z.string(),
|
|
1092
|
+
version: zod.z.string()
|
|
1330
1093
|
}),
|
|
1331
|
-
run:
|
|
1332
|
-
id:
|
|
1333
|
-
isTest:
|
|
1334
|
-
isRetry:
|
|
1335
|
-
startedAt:
|
|
1094
|
+
run: zod.z.object({
|
|
1095
|
+
id: zod.z.string(),
|
|
1096
|
+
isTest: zod.z.boolean(),
|
|
1097
|
+
isRetry: zod.z.boolean().default(false),
|
|
1098
|
+
startedAt: zod.z.coerce.date()
|
|
1336
1099
|
}),
|
|
1337
|
-
environment:
|
|
1338
|
-
id:
|
|
1339
|
-
slug:
|
|
1100
|
+
environment: zod.z.object({
|
|
1101
|
+
id: zod.z.string(),
|
|
1102
|
+
slug: zod.z.string(),
|
|
1340
1103
|
type: RuntimeEnvironmentTypeSchema
|
|
1341
1104
|
}),
|
|
1342
|
-
organization:
|
|
1343
|
-
id:
|
|
1344
|
-
title:
|
|
1345
|
-
slug:
|
|
1105
|
+
organization: zod.z.object({
|
|
1106
|
+
id: zod.z.string(),
|
|
1107
|
+
title: zod.z.string(),
|
|
1108
|
+
slug: zod.z.string()
|
|
1346
1109
|
}),
|
|
1347
|
-
project:
|
|
1348
|
-
id:
|
|
1349
|
-
name:
|
|
1350
|
-
slug:
|
|
1110
|
+
project: zod.z.object({
|
|
1111
|
+
id: zod.z.string(),
|
|
1112
|
+
name: zod.z.string(),
|
|
1113
|
+
slug: zod.z.string()
|
|
1351
1114
|
}).optional(),
|
|
1352
|
-
account:
|
|
1353
|
-
id:
|
|
1354
|
-
metadata:
|
|
1115
|
+
account: zod.z.object({
|
|
1116
|
+
id: zod.z.string(),
|
|
1117
|
+
metadata: zod.z.any()
|
|
1355
1118
|
}).optional(),
|
|
1356
1119
|
source: RunSourceContextSchema.optional(),
|
|
1357
|
-
tasks:
|
|
1358
|
-
cachedTaskCursor:
|
|
1359
|
-
noopTasksSet:
|
|
1360
|
-
connections:
|
|
1361
|
-
yieldedExecutions:
|
|
1362
|
-
runChunkExecutionLimit:
|
|
1120
|
+
tasks: zod.z.array(CachedTaskSchema).optional(),
|
|
1121
|
+
cachedTaskCursor: zod.z.string().optional(),
|
|
1122
|
+
noopTasksSet: zod.z.string().optional(),
|
|
1123
|
+
connections: zod.z.record(ConnectionAuthSchema).optional(),
|
|
1124
|
+
yieldedExecutions: zod.z.string().array().optional(),
|
|
1125
|
+
runChunkExecutionLimit: zod.z.number().optional(),
|
|
1363
1126
|
autoYieldConfig: AutoYieldConfigSchema.optional()
|
|
1364
1127
|
});
|
|
1365
|
-
var RunJobErrorSchema =
|
|
1366
|
-
status:
|
|
1128
|
+
var RunJobErrorSchema = zod.z.object({
|
|
1129
|
+
status: zod.z.literal("ERROR"),
|
|
1367
1130
|
error: ErrorWithStackSchema,
|
|
1368
1131
|
task: TaskSchema.optional()
|
|
1369
1132
|
});
|
|
1370
|
-
var RunJobYieldExecutionErrorSchema =
|
|
1371
|
-
status:
|
|
1372
|
-
key:
|
|
1133
|
+
var RunJobYieldExecutionErrorSchema = zod.z.object({
|
|
1134
|
+
status: zod.z.literal("YIELD_EXECUTION"),
|
|
1135
|
+
key: zod.z.string()
|
|
1373
1136
|
});
|
|
1374
|
-
var AutoYieldMetadataSchema =
|
|
1375
|
-
location:
|
|
1376
|
-
timeRemaining:
|
|
1377
|
-
timeElapsed:
|
|
1378
|
-
limit:
|
|
1137
|
+
var AutoYieldMetadataSchema = zod.z.object({
|
|
1138
|
+
location: zod.z.string(),
|
|
1139
|
+
timeRemaining: zod.z.number(),
|
|
1140
|
+
timeElapsed: zod.z.number(),
|
|
1141
|
+
limit: zod.z.number().optional()
|
|
1379
1142
|
});
|
|
1380
1143
|
var RunJobAutoYieldExecutionErrorSchema = AutoYieldMetadataSchema.extend({
|
|
1381
|
-
status:
|
|
1144
|
+
status: zod.z.literal("AUTO_YIELD_EXECUTION")
|
|
1382
1145
|
});
|
|
1383
|
-
var RunJobAutoYieldWithCompletedTaskExecutionErrorSchema =
|
|
1384
|
-
status:
|
|
1385
|
-
id:
|
|
1386
|
-
properties:
|
|
1387
|
-
output:
|
|
1146
|
+
var RunJobAutoYieldWithCompletedTaskExecutionErrorSchema = zod.z.object({
|
|
1147
|
+
status: zod.z.literal("AUTO_YIELD_EXECUTION_WITH_COMPLETED_TASK"),
|
|
1148
|
+
id: zod.z.string(),
|
|
1149
|
+
properties: zod.z.array(DisplayPropertySchema).optional(),
|
|
1150
|
+
output: zod.z.string().optional(),
|
|
1388
1151
|
data: AutoYieldMetadataSchema
|
|
1389
1152
|
});
|
|
1390
|
-
var RunJobInvalidPayloadErrorSchema =
|
|
1391
|
-
status:
|
|
1392
|
-
errors:
|
|
1153
|
+
var RunJobInvalidPayloadErrorSchema = zod.z.object({
|
|
1154
|
+
status: zod.z.literal("INVALID_PAYLOAD"),
|
|
1155
|
+
errors: zod.z.array(SchemaErrorSchema)
|
|
1393
1156
|
});
|
|
1394
|
-
var RunJobUnresolvedAuthErrorSchema =
|
|
1395
|
-
status:
|
|
1396
|
-
issues:
|
|
1397
|
-
id:
|
|
1398
|
-
error:
|
|
1157
|
+
var RunJobUnresolvedAuthErrorSchema = zod.z.object({
|
|
1158
|
+
status: zod.z.literal("UNRESOLVED_AUTH_ERROR"),
|
|
1159
|
+
issues: zod.z.record(zod.z.object({
|
|
1160
|
+
id: zod.z.string(),
|
|
1161
|
+
error: zod.z.string()
|
|
1399
1162
|
}))
|
|
1400
1163
|
});
|
|
1401
|
-
var RunJobResumeWithTaskSchema =
|
|
1402
|
-
status:
|
|
1164
|
+
var RunJobResumeWithTaskSchema = zod.z.object({
|
|
1165
|
+
status: zod.z.literal("RESUME_WITH_TASK"),
|
|
1403
1166
|
task: TaskSchema
|
|
1404
1167
|
});
|
|
1405
|
-
var RunJobRetryWithTaskSchema =
|
|
1406
|
-
status:
|
|
1168
|
+
var RunJobRetryWithTaskSchema = zod.z.object({
|
|
1169
|
+
status: zod.z.literal("RETRY_WITH_TASK"),
|
|
1407
1170
|
task: TaskSchema,
|
|
1408
1171
|
error: ErrorWithStackSchema,
|
|
1409
|
-
retryAt:
|
|
1172
|
+
retryAt: zod.z.coerce.date()
|
|
1410
1173
|
});
|
|
1411
|
-
var RunJobCanceledWithTaskSchema =
|
|
1412
|
-
status:
|
|
1174
|
+
var RunJobCanceledWithTaskSchema = zod.z.object({
|
|
1175
|
+
status: zod.z.literal("CANCELED"),
|
|
1413
1176
|
task: TaskSchema
|
|
1414
1177
|
});
|
|
1415
|
-
var RunJobSuccessSchema =
|
|
1416
|
-
status:
|
|
1178
|
+
var RunJobSuccessSchema = zod.z.object({
|
|
1179
|
+
status: zod.z.literal("SUCCESS"),
|
|
1417
1180
|
output: DeserializedJsonSchema.optional()
|
|
1418
1181
|
});
|
|
1419
|
-
var RunJobErrorResponseSchema =
|
|
1182
|
+
var RunJobErrorResponseSchema = zod.z.union([
|
|
1420
1183
|
RunJobAutoYieldExecutionErrorSchema,
|
|
1421
1184
|
RunJobAutoYieldWithCompletedTaskExecutionErrorSchema,
|
|
1422
1185
|
RunJobYieldExecutionErrorSchema,
|
|
@@ -1427,12 +1190,12 @@ var RunJobErrorResponseSchema = import_zod12.z.union([
|
|
|
1427
1190
|
RunJobRetryWithTaskSchema,
|
|
1428
1191
|
RunJobCanceledWithTaskSchema
|
|
1429
1192
|
]);
|
|
1430
|
-
var RunJobResumeWithParallelTaskSchema =
|
|
1431
|
-
status:
|
|
1193
|
+
var RunJobResumeWithParallelTaskSchema = zod.z.object({
|
|
1194
|
+
status: zod.z.literal("RESUME_WITH_PARALLEL_TASK"),
|
|
1432
1195
|
task: TaskSchema,
|
|
1433
|
-
childErrors:
|
|
1196
|
+
childErrors: zod.z.array(RunJobErrorResponseSchema)
|
|
1434
1197
|
});
|
|
1435
|
-
var RunJobResponseSchema =
|
|
1198
|
+
var RunJobResponseSchema = zod.z.discriminatedUnion("status", [
|
|
1436
1199
|
RunJobAutoYieldExecutionErrorSchema,
|
|
1437
1200
|
RunJobAutoYieldWithCompletedTaskExecutionErrorSchema,
|
|
1438
1201
|
RunJobYieldExecutionErrorSchema,
|
|
@@ -1445,137 +1208,137 @@ var RunJobResponseSchema = import_zod12.z.discriminatedUnion("status", [
|
|
|
1445
1208
|
RunJobCanceledWithTaskSchema,
|
|
1446
1209
|
RunJobSuccessSchema
|
|
1447
1210
|
]);
|
|
1448
|
-
var PreprocessRunBodySchema =
|
|
1211
|
+
var PreprocessRunBodySchema = zod.z.object({
|
|
1449
1212
|
event: ApiEventLogSchema,
|
|
1450
|
-
job:
|
|
1451
|
-
id:
|
|
1452
|
-
version:
|
|
1213
|
+
job: zod.z.object({
|
|
1214
|
+
id: zod.z.string(),
|
|
1215
|
+
version: zod.z.string()
|
|
1453
1216
|
}),
|
|
1454
|
-
run:
|
|
1455
|
-
id:
|
|
1456
|
-
isTest:
|
|
1217
|
+
run: zod.z.object({
|
|
1218
|
+
id: zod.z.string(),
|
|
1219
|
+
isTest: zod.z.boolean()
|
|
1457
1220
|
}),
|
|
1458
|
-
environment:
|
|
1459
|
-
id:
|
|
1460
|
-
slug:
|
|
1221
|
+
environment: zod.z.object({
|
|
1222
|
+
id: zod.z.string(),
|
|
1223
|
+
slug: zod.z.string(),
|
|
1461
1224
|
type: RuntimeEnvironmentTypeSchema
|
|
1462
1225
|
}),
|
|
1463
|
-
organization:
|
|
1464
|
-
id:
|
|
1465
|
-
title:
|
|
1466
|
-
slug:
|
|
1226
|
+
organization: zod.z.object({
|
|
1227
|
+
id: zod.z.string(),
|
|
1228
|
+
title: zod.z.string(),
|
|
1229
|
+
slug: zod.z.string()
|
|
1467
1230
|
}),
|
|
1468
|
-
account:
|
|
1469
|
-
id:
|
|
1470
|
-
metadata:
|
|
1231
|
+
account: zod.z.object({
|
|
1232
|
+
id: zod.z.string(),
|
|
1233
|
+
metadata: zod.z.any()
|
|
1471
1234
|
}).optional()
|
|
1472
1235
|
});
|
|
1473
|
-
var PreprocessRunResponseSchema =
|
|
1474
|
-
abort:
|
|
1475
|
-
properties:
|
|
1236
|
+
var PreprocessRunResponseSchema = zod.z.object({
|
|
1237
|
+
abort: zod.z.boolean(),
|
|
1238
|
+
properties: zod.z.array(DisplayPropertySchema).optional()
|
|
1476
1239
|
});
|
|
1477
|
-
var CreateRunResponseOkSchema =
|
|
1478
|
-
ok:
|
|
1479
|
-
data:
|
|
1480
|
-
id:
|
|
1240
|
+
var CreateRunResponseOkSchema = zod.z.object({
|
|
1241
|
+
ok: zod.z.literal(true),
|
|
1242
|
+
data: zod.z.object({
|
|
1243
|
+
id: zod.z.string()
|
|
1481
1244
|
})
|
|
1482
1245
|
});
|
|
1483
|
-
var CreateRunResponseErrorSchema =
|
|
1484
|
-
ok:
|
|
1485
|
-
error:
|
|
1246
|
+
var CreateRunResponseErrorSchema = zod.z.object({
|
|
1247
|
+
ok: zod.z.literal(false),
|
|
1248
|
+
error: zod.z.string()
|
|
1486
1249
|
});
|
|
1487
|
-
var CreateRunResponseBodySchema =
|
|
1250
|
+
var CreateRunResponseBodySchema = zod.z.discriminatedUnion("ok", [
|
|
1488
1251
|
CreateRunResponseOkSchema,
|
|
1489
1252
|
CreateRunResponseErrorSchema
|
|
1490
1253
|
]);
|
|
1491
|
-
var RedactStringSchema =
|
|
1492
|
-
__redactedString:
|
|
1493
|
-
strings:
|
|
1494
|
-
interpolations:
|
|
1254
|
+
var RedactStringSchema = zod.z.object({
|
|
1255
|
+
__redactedString: zod.z.literal(true),
|
|
1256
|
+
strings: zod.z.array(zod.z.string()),
|
|
1257
|
+
interpolations: zod.z.array(zod.z.string())
|
|
1495
1258
|
});
|
|
1496
|
-
var LogMessageSchema =
|
|
1497
|
-
level:
|
|
1259
|
+
var LogMessageSchema = zod.z.object({
|
|
1260
|
+
level: zod.z.enum([
|
|
1498
1261
|
"DEBUG",
|
|
1499
1262
|
"INFO",
|
|
1500
1263
|
"WARN",
|
|
1501
1264
|
"ERROR"
|
|
1502
1265
|
]),
|
|
1503
|
-
message:
|
|
1266
|
+
message: zod.z.string(),
|
|
1504
1267
|
data: SerializableJsonSchema.optional()
|
|
1505
1268
|
});
|
|
1506
|
-
var RedactSchema =
|
|
1507
|
-
paths:
|
|
1269
|
+
var RedactSchema = zod.z.object({
|
|
1270
|
+
paths: zod.z.array(zod.z.string())
|
|
1508
1271
|
});
|
|
1509
|
-
var RetryOptionsSchema =
|
|
1272
|
+
var RetryOptionsSchema = zod.z.object({
|
|
1510
1273
|
/** The maximum number of times to retry the request. */
|
|
1511
|
-
limit:
|
|
1274
|
+
limit: zod.z.number().optional(),
|
|
1512
1275
|
/** The exponential factor to use when calculating the next retry time. */
|
|
1513
|
-
factor:
|
|
1276
|
+
factor: zod.z.number().optional(),
|
|
1514
1277
|
/** The minimum amount of time to wait before retrying the request. */
|
|
1515
|
-
minTimeoutInMs:
|
|
1278
|
+
minTimeoutInMs: zod.z.number().optional(),
|
|
1516
1279
|
/** The maximum amount of time to wait before retrying the request. */
|
|
1517
|
-
maxTimeoutInMs:
|
|
1280
|
+
maxTimeoutInMs: zod.z.number().optional(),
|
|
1518
1281
|
/** Whether to randomize the retry time. */
|
|
1519
|
-
randomize:
|
|
1282
|
+
randomize: zod.z.boolean().optional()
|
|
1520
1283
|
});
|
|
1521
|
-
var RunTaskOptionsSchema =
|
|
1284
|
+
var RunTaskOptionsSchema = zod.z.object({
|
|
1522
1285
|
/** The name of the Task is required. This is displayed on the Task in the logs. */
|
|
1523
|
-
name:
|
|
1286
|
+
name: zod.z.string().optional(),
|
|
1524
1287
|
/** The Task will wait and only start at the specified Date */
|
|
1525
|
-
delayUntil:
|
|
1288
|
+
delayUntil: zod.z.coerce.date().optional(),
|
|
1526
1289
|
/** Retry options */
|
|
1527
1290
|
retry: RetryOptionsSchema.optional(),
|
|
1528
1291
|
/** The icon for the Task, it will appear in the logs.
|
|
1529
1292
|
* You can use the name of a company in lowercase, e.g. "github".
|
|
1530
1293
|
* Or any icon name that [Tabler Icons](https://tabler-icons.io/) supports. */
|
|
1531
|
-
icon:
|
|
1294
|
+
icon: zod.z.string().optional(),
|
|
1532
1295
|
/** The key for the Task that you want to appear in the logs */
|
|
1533
|
-
displayKey:
|
|
1296
|
+
displayKey: zod.z.string().optional(),
|
|
1534
1297
|
/** A description of the Task */
|
|
1535
|
-
description:
|
|
1298
|
+
description: zod.z.string().optional(),
|
|
1536
1299
|
/** Properties that are displayed in the logs */
|
|
1537
|
-
properties:
|
|
1300
|
+
properties: zod.z.array(DisplayPropertySchema).optional(),
|
|
1538
1301
|
/** The input params to the Task, will be displayed in the logs */
|
|
1539
|
-
params:
|
|
1302
|
+
params: zod.z.any(),
|
|
1540
1303
|
/** The style of the log entry. */
|
|
1541
1304
|
style: StyleSchema.optional(),
|
|
1542
1305
|
/** Allows you to expose a `task.callbackUrl` to use in your tasks. Enabling this feature will cause the task to return the data sent to the callbackUrl instead of the usual async callback result. */
|
|
1543
|
-
callback:
|
|
1306
|
+
callback: zod.z.object({
|
|
1544
1307
|
/** Causes the task to wait for and return the data of the first request sent to `task.callbackUrl`. */
|
|
1545
|
-
enabled:
|
|
1308
|
+
enabled: zod.z.boolean(),
|
|
1546
1309
|
/** Time to wait for the first request to `task.callbackUrl`. Default: One hour. */
|
|
1547
|
-
timeoutInSeconds:
|
|
1310
|
+
timeoutInSeconds: zod.z.number()
|
|
1548
1311
|
}).partial().optional(),
|
|
1549
1312
|
/** Allows you to link the Integration connection in the logs. This is handled automatically in integrations. */
|
|
1550
|
-
connectionKey:
|
|
1313
|
+
connectionKey: zod.z.string().optional(),
|
|
1551
1314
|
/** An operation you want to perform on the Trigger.dev platform, current only "fetch", "fetch-response", and "fetch-poll" is supported. If you wish to `fetch` use [`io.backgroundFetch()`](https://trigger.dev/docs/sdk/io/backgroundfetch) instead. */
|
|
1552
|
-
operation:
|
|
1315
|
+
operation: zod.z.enum([
|
|
1553
1316
|
"fetch",
|
|
1554
1317
|
"fetch-response",
|
|
1555
1318
|
"fetch-poll"
|
|
1556
1319
|
]).optional(),
|
|
1557
1320
|
/** A No Operation means that the code won't be executed. This is used internally to implement features like [io.wait()](https://trigger.dev/docs/sdk/io/wait). */
|
|
1558
|
-
noop:
|
|
1321
|
+
noop: zod.z.boolean().default(false),
|
|
1559
1322
|
redact: RedactSchema.optional(),
|
|
1560
|
-
parallel:
|
|
1323
|
+
parallel: zod.z.boolean().optional()
|
|
1561
1324
|
});
|
|
1562
1325
|
var RunTaskBodyInputSchema = RunTaskOptionsSchema.extend({
|
|
1563
|
-
idempotencyKey:
|
|
1564
|
-
parentId:
|
|
1326
|
+
idempotencyKey: zod.z.string(),
|
|
1327
|
+
parentId: zod.z.string().optional()
|
|
1565
1328
|
});
|
|
1566
1329
|
var RunTaskBodyOutputSchema = RunTaskBodyInputSchema.extend({
|
|
1567
|
-
properties:
|
|
1330
|
+
properties: zod.z.array(DisplayPropertySchema.partial()).optional(),
|
|
1568
1331
|
params: DeserializedJsonSchema.optional().nullable(),
|
|
1569
|
-
callback:
|
|
1570
|
-
enabled:
|
|
1571
|
-
timeoutInSeconds:
|
|
1332
|
+
callback: zod.z.object({
|
|
1333
|
+
enabled: zod.z.boolean(),
|
|
1334
|
+
timeoutInSeconds: zod.z.number().default(3600)
|
|
1572
1335
|
}).optional()
|
|
1573
1336
|
});
|
|
1574
|
-
var RunTaskResponseWithCachedTasksBodySchema =
|
|
1337
|
+
var RunTaskResponseWithCachedTasksBodySchema = zod.z.object({
|
|
1575
1338
|
task: ServerTaskSchema,
|
|
1576
|
-
cachedTasks:
|
|
1577
|
-
tasks:
|
|
1578
|
-
cursor:
|
|
1339
|
+
cachedTasks: zod.z.object({
|
|
1340
|
+
tasks: zod.z.array(CachedTaskSchema),
|
|
1341
|
+
cursor: zod.z.string().optional()
|
|
1579
1342
|
}).optional()
|
|
1580
1343
|
});
|
|
1581
1344
|
var CompleteTaskBodyInputSchema = RunTaskBodyInputSchema.pick({
|
|
@@ -1590,208 +1353,202 @@ var CompleteTaskBodyV2InputSchema = RunTaskBodyInputSchema.pick({
|
|
|
1590
1353
|
description: true,
|
|
1591
1354
|
params: true
|
|
1592
1355
|
}).extend({
|
|
1593
|
-
output:
|
|
1356
|
+
output: zod.z.string().optional()
|
|
1594
1357
|
});
|
|
1595
|
-
var FailTaskBodyInputSchema =
|
|
1358
|
+
var FailTaskBodyInputSchema = zod.z.object({
|
|
1596
1359
|
error: ErrorWithStackSchema
|
|
1597
1360
|
});
|
|
1598
|
-
var NormalizedRequestSchema =
|
|
1599
|
-
headers:
|
|
1600
|
-
method:
|
|
1601
|
-
query:
|
|
1602
|
-
url:
|
|
1603
|
-
body:
|
|
1361
|
+
var NormalizedRequestSchema = zod.z.object({
|
|
1362
|
+
headers: zod.z.record(zod.z.string()),
|
|
1363
|
+
method: zod.z.string(),
|
|
1364
|
+
query: zod.z.record(zod.z.string()),
|
|
1365
|
+
url: zod.z.string(),
|
|
1366
|
+
body: zod.z.any()
|
|
1604
1367
|
});
|
|
1605
|
-
var NormalizedResponseSchema =
|
|
1606
|
-
status:
|
|
1607
|
-
body:
|
|
1608
|
-
headers:
|
|
1368
|
+
var NormalizedResponseSchema = zod.z.object({
|
|
1369
|
+
status: zod.z.number(),
|
|
1370
|
+
body: zod.z.any(),
|
|
1371
|
+
headers: zod.z.record(zod.z.string()).optional()
|
|
1609
1372
|
});
|
|
1610
|
-
var HttpSourceResponseSchema =
|
|
1373
|
+
var HttpSourceResponseSchema = zod.z.object({
|
|
1611
1374
|
response: NormalizedResponseSchema,
|
|
1612
|
-
events:
|
|
1375
|
+
events: zod.z.array(RawEventSchema),
|
|
1613
1376
|
metadata: HttpSourceResponseMetadataSchema.optional()
|
|
1614
1377
|
});
|
|
1615
|
-
var WebhookDeliveryResponseSchema =
|
|
1378
|
+
var WebhookDeliveryResponseSchema = zod.z.object({
|
|
1616
1379
|
response: NormalizedResponseSchema,
|
|
1617
|
-
verified:
|
|
1618
|
-
error:
|
|
1380
|
+
verified: zod.z.boolean(),
|
|
1381
|
+
error: zod.z.string().optional()
|
|
1619
1382
|
});
|
|
1620
|
-
var RegisterTriggerBodySchemaV1 =
|
|
1383
|
+
var RegisterTriggerBodySchemaV1 = zod.z.object({
|
|
1621
1384
|
rule: EventRuleSchema,
|
|
1622
1385
|
source: SourceMetadataV1Schema
|
|
1623
1386
|
});
|
|
1624
|
-
var RegisterTriggerBodySchemaV2 =
|
|
1387
|
+
var RegisterTriggerBodySchemaV2 = zod.z.object({
|
|
1625
1388
|
rule: EventRuleSchema,
|
|
1626
1389
|
source: SourceMetadataV2Schema,
|
|
1627
|
-
accountId:
|
|
1390
|
+
accountId: zod.z.string().optional()
|
|
1628
1391
|
});
|
|
1629
|
-
var InitializeTriggerBodySchema =
|
|
1630
|
-
id:
|
|
1631
|
-
params:
|
|
1632
|
-
accountId:
|
|
1633
|
-
metadata:
|
|
1392
|
+
var InitializeTriggerBodySchema = zod.z.object({
|
|
1393
|
+
id: zod.z.string(),
|
|
1394
|
+
params: zod.z.any(),
|
|
1395
|
+
accountId: zod.z.string().optional(),
|
|
1396
|
+
metadata: zod.z.any().optional()
|
|
1634
1397
|
});
|
|
1635
|
-
var RegisterCommonScheduleBodySchema =
|
|
1398
|
+
var RegisterCommonScheduleBodySchema = zod.z.object({
|
|
1636
1399
|
/** A unique id for the schedule. This is used to identify and unregister the schedule later. */
|
|
1637
|
-
id:
|
|
1400
|
+
id: zod.z.string(),
|
|
1638
1401
|
/** Any additional metadata about the schedule. */
|
|
1639
|
-
metadata:
|
|
1402
|
+
metadata: zod.z.any(),
|
|
1640
1403
|
/** An optional Account ID to associate with runs triggered by this schedule */
|
|
1641
|
-
accountId:
|
|
1404
|
+
accountId: zod.z.string().optional()
|
|
1642
1405
|
});
|
|
1643
1406
|
var RegisterIntervalScheduleBodySchema = RegisterCommonScheduleBodySchema.merge(IntervalMetadataSchema);
|
|
1644
1407
|
var InitializeCronScheduleBodySchema = RegisterCommonScheduleBodySchema.merge(CronMetadataSchema);
|
|
1645
|
-
var RegisterScheduleBodySchema =
|
|
1408
|
+
var RegisterScheduleBodySchema = zod.z.discriminatedUnion("type", [
|
|
1646
1409
|
RegisterIntervalScheduleBodySchema,
|
|
1647
1410
|
InitializeCronScheduleBodySchema
|
|
1648
1411
|
]);
|
|
1649
|
-
var RegisterScheduleResponseBodySchema =
|
|
1650
|
-
id:
|
|
1412
|
+
var RegisterScheduleResponseBodySchema = zod.z.object({
|
|
1413
|
+
id: zod.z.string(),
|
|
1651
1414
|
schedule: ScheduleMetadataSchema,
|
|
1652
|
-
metadata:
|
|
1653
|
-
active:
|
|
1415
|
+
metadata: zod.z.any(),
|
|
1416
|
+
active: zod.z.boolean()
|
|
1654
1417
|
});
|
|
1655
|
-
var CreateExternalConnectionBodySchema =
|
|
1656
|
-
accessToken:
|
|
1657
|
-
type:
|
|
1418
|
+
var CreateExternalConnectionBodySchema = zod.z.object({
|
|
1419
|
+
accessToken: zod.z.string(),
|
|
1420
|
+
type: zod.z.enum([
|
|
1658
1421
|
"oauth2"
|
|
1659
1422
|
]),
|
|
1660
|
-
scopes:
|
|
1661
|
-
metadata:
|
|
1423
|
+
scopes: zod.z.array(zod.z.string()).optional(),
|
|
1424
|
+
metadata: zod.z.any()
|
|
1662
1425
|
});
|
|
1663
|
-
var GetRunStatusesSchema =
|
|
1664
|
-
run:
|
|
1665
|
-
id:
|
|
1426
|
+
var GetRunStatusesSchema = zod.z.object({
|
|
1427
|
+
run: zod.z.object({
|
|
1428
|
+
id: zod.z.string(),
|
|
1666
1429
|
status: RunStatusSchema,
|
|
1667
|
-
output:
|
|
1430
|
+
output: zod.z.any().optional()
|
|
1668
1431
|
}),
|
|
1669
|
-
statuses:
|
|
1432
|
+
statuses: zod.z.array(JobRunStatusRecordSchema)
|
|
1670
1433
|
});
|
|
1671
|
-
var InvokeJobResponseSchema =
|
|
1672
|
-
id:
|
|
1434
|
+
var InvokeJobResponseSchema = zod.z.object({
|
|
1435
|
+
id: zod.z.string()
|
|
1673
1436
|
});
|
|
1674
|
-
var InvokeJobRequestBodySchema =
|
|
1675
|
-
payload:
|
|
1676
|
-
context:
|
|
1677
|
-
options:
|
|
1678
|
-
accountId:
|
|
1679
|
-
callbackUrl:
|
|
1437
|
+
var InvokeJobRequestBodySchema = zod.z.object({
|
|
1438
|
+
payload: zod.z.any(),
|
|
1439
|
+
context: zod.z.any().optional(),
|
|
1440
|
+
options: zod.z.object({
|
|
1441
|
+
accountId: zod.z.string().optional(),
|
|
1442
|
+
callbackUrl: zod.z.string().optional()
|
|
1680
1443
|
}).optional()
|
|
1681
1444
|
});
|
|
1682
|
-
var InvokeOptionsSchema =
|
|
1683
|
-
accountId:
|
|
1684
|
-
idempotencyKey:
|
|
1685
|
-
context:
|
|
1686
|
-
callbackUrl:
|
|
1445
|
+
var InvokeOptionsSchema = zod.z.object({
|
|
1446
|
+
accountId: zod.z.string().optional(),
|
|
1447
|
+
idempotencyKey: zod.z.string().optional(),
|
|
1448
|
+
context: zod.z.any().optional(),
|
|
1449
|
+
callbackUrl: zod.z.string().optional()
|
|
1687
1450
|
});
|
|
1688
|
-
var EphemeralEventDispatcherRequestBodySchema =
|
|
1689
|
-
url:
|
|
1690
|
-
name:
|
|
1691
|
-
source:
|
|
1451
|
+
var EphemeralEventDispatcherRequestBodySchema = zod.z.object({
|
|
1452
|
+
url: zod.z.string(),
|
|
1453
|
+
name: zod.z.string().or(zod.z.array(zod.z.string())),
|
|
1454
|
+
source: zod.z.string().optional(),
|
|
1692
1455
|
filter: EventFilterSchema.optional(),
|
|
1693
1456
|
contextFilter: EventFilterSchema.optional(),
|
|
1694
|
-
accountId:
|
|
1695
|
-
timeoutInSeconds:
|
|
1457
|
+
accountId: zod.z.string().optional(),
|
|
1458
|
+
timeoutInSeconds: zod.z.number().int().positive().min(10).max(60 * 60 * 24 * 365).default(3600)
|
|
1696
1459
|
});
|
|
1697
|
-
var EphemeralEventDispatcherResponseBodySchema =
|
|
1698
|
-
id:
|
|
1460
|
+
var EphemeralEventDispatcherResponseBodySchema = zod.z.object({
|
|
1461
|
+
id: zod.z.string()
|
|
1699
1462
|
});
|
|
1700
|
-
var KeyValueStoreResponseBodySchema =
|
|
1701
|
-
|
|
1702
|
-
action:
|
|
1703
|
-
key:
|
|
1704
|
-
deleted:
|
|
1463
|
+
var KeyValueStoreResponseBodySchema = zod.z.discriminatedUnion("action", [
|
|
1464
|
+
zod.z.object({
|
|
1465
|
+
action: zod.z.literal("DELETE"),
|
|
1466
|
+
key: zod.z.string(),
|
|
1467
|
+
deleted: zod.z.boolean()
|
|
1705
1468
|
}),
|
|
1706
|
-
|
|
1707
|
-
action:
|
|
1708
|
-
key:
|
|
1709
|
-
value:
|
|
1469
|
+
zod.z.object({
|
|
1470
|
+
action: zod.z.literal("GET"),
|
|
1471
|
+
key: zod.z.string(),
|
|
1472
|
+
value: zod.z.string().optional()
|
|
1710
1473
|
}),
|
|
1711
|
-
|
|
1712
|
-
action:
|
|
1713
|
-
key:
|
|
1714
|
-
has:
|
|
1474
|
+
zod.z.object({
|
|
1475
|
+
action: zod.z.literal("HAS"),
|
|
1476
|
+
key: zod.z.string(),
|
|
1477
|
+
has: zod.z.boolean()
|
|
1715
1478
|
}),
|
|
1716
|
-
|
|
1717
|
-
action:
|
|
1718
|
-
key:
|
|
1719
|
-
value:
|
|
1479
|
+
zod.z.object({
|
|
1480
|
+
action: zod.z.literal("SET"),
|
|
1481
|
+
key: zod.z.string(),
|
|
1482
|
+
value: zod.z.string().optional()
|
|
1720
1483
|
})
|
|
1721
1484
|
]);
|
|
1722
|
-
|
|
1723
|
-
// src/schemas/notifications.ts
|
|
1724
|
-
var import_zod13 = require("zod");
|
|
1725
1485
|
var MISSING_CONNECTION_NOTIFICATION = "dev.trigger.notifications.missingConnection";
|
|
1726
1486
|
var MISSING_CONNECTION_RESOLVED_NOTIFICATION = "dev.trigger.notifications.missingConnectionResolved";
|
|
1727
|
-
var CommonMissingConnectionNotificationPayloadSchema =
|
|
1728
|
-
id:
|
|
1729
|
-
client:
|
|
1730
|
-
id:
|
|
1731
|
-
title:
|
|
1732
|
-
scopes:
|
|
1733
|
-
createdAt:
|
|
1734
|
-
updatedAt:
|
|
1487
|
+
var CommonMissingConnectionNotificationPayloadSchema = zod.z.object({
|
|
1488
|
+
id: zod.z.string(),
|
|
1489
|
+
client: zod.z.object({
|
|
1490
|
+
id: zod.z.string(),
|
|
1491
|
+
title: zod.z.string(),
|
|
1492
|
+
scopes: zod.z.array(zod.z.string()),
|
|
1493
|
+
createdAt: zod.z.coerce.date(),
|
|
1494
|
+
updatedAt: zod.z.coerce.date()
|
|
1735
1495
|
}),
|
|
1736
|
-
authorizationUrl:
|
|
1496
|
+
authorizationUrl: zod.z.string()
|
|
1737
1497
|
});
|
|
1738
1498
|
var MissingDeveloperConnectionNotificationPayloadSchema = CommonMissingConnectionNotificationPayloadSchema.extend({
|
|
1739
|
-
type:
|
|
1499
|
+
type: zod.z.literal("DEVELOPER")
|
|
1740
1500
|
});
|
|
1741
1501
|
var MissingExternalConnectionNotificationPayloadSchema = CommonMissingConnectionNotificationPayloadSchema.extend({
|
|
1742
|
-
type:
|
|
1743
|
-
account:
|
|
1744
|
-
id:
|
|
1745
|
-
metadata:
|
|
1502
|
+
type: zod.z.literal("EXTERNAL"),
|
|
1503
|
+
account: zod.z.object({
|
|
1504
|
+
id: zod.z.string(),
|
|
1505
|
+
metadata: zod.z.any()
|
|
1746
1506
|
})
|
|
1747
1507
|
});
|
|
1748
|
-
var MissingConnectionNotificationPayloadSchema =
|
|
1508
|
+
var MissingConnectionNotificationPayloadSchema = zod.z.discriminatedUnion("type", [
|
|
1749
1509
|
MissingDeveloperConnectionNotificationPayloadSchema,
|
|
1750
1510
|
MissingExternalConnectionNotificationPayloadSchema
|
|
1751
1511
|
]);
|
|
1752
|
-
var CommonMissingConnectionNotificationResolvedPayloadSchema =
|
|
1753
|
-
id:
|
|
1754
|
-
client:
|
|
1755
|
-
id:
|
|
1756
|
-
title:
|
|
1757
|
-
scopes:
|
|
1758
|
-
createdAt:
|
|
1759
|
-
updatedAt:
|
|
1760
|
-
integrationIdentifier:
|
|
1761
|
-
integrationAuthMethod:
|
|
1512
|
+
var CommonMissingConnectionNotificationResolvedPayloadSchema = zod.z.object({
|
|
1513
|
+
id: zod.z.string(),
|
|
1514
|
+
client: zod.z.object({
|
|
1515
|
+
id: zod.z.string(),
|
|
1516
|
+
title: zod.z.string(),
|
|
1517
|
+
scopes: zod.z.array(zod.z.string()),
|
|
1518
|
+
createdAt: zod.z.coerce.date(),
|
|
1519
|
+
updatedAt: zod.z.coerce.date(),
|
|
1520
|
+
integrationIdentifier: zod.z.string(),
|
|
1521
|
+
integrationAuthMethod: zod.z.string()
|
|
1762
1522
|
}),
|
|
1763
|
-
expiresAt:
|
|
1523
|
+
expiresAt: zod.z.coerce.date()
|
|
1764
1524
|
});
|
|
1765
1525
|
var MissingDeveloperConnectionResolvedNotificationPayloadSchema = CommonMissingConnectionNotificationResolvedPayloadSchema.extend({
|
|
1766
|
-
type:
|
|
1526
|
+
type: zod.z.literal("DEVELOPER")
|
|
1767
1527
|
});
|
|
1768
1528
|
var MissingExternalConnectionResolvedNotificationPayloadSchema = CommonMissingConnectionNotificationResolvedPayloadSchema.extend({
|
|
1769
|
-
type:
|
|
1770
|
-
account:
|
|
1771
|
-
id:
|
|
1772
|
-
metadata:
|
|
1529
|
+
type: zod.z.literal("EXTERNAL"),
|
|
1530
|
+
account: zod.z.object({
|
|
1531
|
+
id: zod.z.string(),
|
|
1532
|
+
metadata: zod.z.any()
|
|
1773
1533
|
})
|
|
1774
1534
|
});
|
|
1775
|
-
var MissingConnectionResolvedNotificationPayloadSchema =
|
|
1535
|
+
var MissingConnectionResolvedNotificationPayloadSchema = zod.z.discriminatedUnion("type", [
|
|
1776
1536
|
MissingDeveloperConnectionResolvedNotificationPayloadSchema,
|
|
1777
1537
|
MissingExternalConnectionResolvedNotificationPayloadSchema
|
|
1778
1538
|
]);
|
|
1779
|
-
|
|
1780
|
-
// src/schemas/fetch.ts
|
|
1781
|
-
var import_zod14 = require("zod");
|
|
1782
|
-
var FetchRetryHeadersStrategySchema = import_zod14.z.object({
|
|
1539
|
+
var FetchRetryHeadersStrategySchema = zod.z.object({
|
|
1783
1540
|
/** The `headers` strategy retries the request using info from the response headers. */
|
|
1784
|
-
strategy:
|
|
1541
|
+
strategy: zod.z.literal("headers"),
|
|
1785
1542
|
/** The header to use to determine the maximum number of times to retry the request. */
|
|
1786
|
-
limitHeader:
|
|
1543
|
+
limitHeader: zod.z.string(),
|
|
1787
1544
|
/** The header to use to determine the number of remaining retries. */
|
|
1788
|
-
remainingHeader:
|
|
1545
|
+
remainingHeader: zod.z.string(),
|
|
1789
1546
|
/** The header to use to determine the time when the number of remaining retries will be reset. */
|
|
1790
|
-
resetHeader:
|
|
1547
|
+
resetHeader: zod.z.string(),
|
|
1791
1548
|
/** The event filter to use to determine if the request should be retried. */
|
|
1792
1549
|
bodyFilter: EventFilterSchema.optional(),
|
|
1793
1550
|
/** The format of the `resetHeader` value. */
|
|
1794
|
-
resetFormat:
|
|
1551
|
+
resetFormat: zod.z.enum([
|
|
1795
1552
|
"unix_timestamp",
|
|
1796
1553
|
"unix_timestamp_in_ms",
|
|
1797
1554
|
"iso_8601",
|
|
@@ -1800,83 +1557,77 @@ var FetchRetryHeadersStrategySchema = import_zod14.z.object({
|
|
|
1800
1557
|
});
|
|
1801
1558
|
var FetchRetryBackoffStrategySchema = RetryOptionsSchema.extend({
|
|
1802
1559
|
/** The `backoff` strategy retries the request with an exponential backoff. */
|
|
1803
|
-
strategy:
|
|
1560
|
+
strategy: zod.z.literal("backoff"),
|
|
1804
1561
|
/** The event filter to use to determine if the request should be retried. */
|
|
1805
1562
|
bodyFilter: EventFilterSchema.optional()
|
|
1806
1563
|
});
|
|
1807
|
-
var FetchRetryStrategySchema =
|
|
1564
|
+
var FetchRetryStrategySchema = zod.z.discriminatedUnion("strategy", [
|
|
1808
1565
|
FetchRetryHeadersStrategySchema,
|
|
1809
1566
|
FetchRetryBackoffStrategySchema
|
|
1810
1567
|
]);
|
|
1811
|
-
var FetchRequestInitSchema =
|
|
1568
|
+
var FetchRequestInitSchema = zod.z.object({
|
|
1812
1569
|
/** The HTTP method to use for the request. */
|
|
1813
|
-
method:
|
|
1570
|
+
method: zod.z.string().optional(),
|
|
1814
1571
|
/** Any headers to send with the request. Note that you can use [redactString](https://trigger.dev/docs/sdk/redactString) to prevent sensitive information from being stored (e.g. in the logs), like API keys and tokens. */
|
|
1815
|
-
headers:
|
|
1816
|
-
|
|
1572
|
+
headers: zod.z.record(zod.z.union([
|
|
1573
|
+
zod.z.string(),
|
|
1817
1574
|
RedactStringSchema
|
|
1818
1575
|
])).optional(),
|
|
1819
1576
|
/** The body of the request. */
|
|
1820
|
-
body:
|
|
1821
|
-
|
|
1822
|
-
|
|
1577
|
+
body: zod.z.union([
|
|
1578
|
+
zod.z.string(),
|
|
1579
|
+
zod.z.instanceof(ArrayBuffer)
|
|
1823
1580
|
]).optional()
|
|
1824
1581
|
});
|
|
1825
|
-
var FetchRetryOptionsSchema =
|
|
1826
|
-
var FetchTimeoutOptionsSchema =
|
|
1827
|
-
durationInMs:
|
|
1582
|
+
var FetchRetryOptionsSchema = zod.z.record(FetchRetryStrategySchema);
|
|
1583
|
+
var FetchTimeoutOptionsSchema = zod.z.object({
|
|
1584
|
+
durationInMs: zod.z.number(),
|
|
1828
1585
|
retry: RetryOptionsSchema.optional()
|
|
1829
1586
|
});
|
|
1830
|
-
var FetchOperationSchema =
|
|
1831
|
-
url:
|
|
1587
|
+
var FetchOperationSchema = zod.z.object({
|
|
1588
|
+
url: zod.z.string(),
|
|
1832
1589
|
requestInit: FetchRequestInitSchema.optional(),
|
|
1833
|
-
retry:
|
|
1590
|
+
retry: zod.z.record(FetchRetryStrategySchema).optional(),
|
|
1834
1591
|
timeout: FetchTimeoutOptionsSchema.optional()
|
|
1835
1592
|
});
|
|
1836
|
-
var FetchPollOperationSchema =
|
|
1837
|
-
url:
|
|
1838
|
-
interval:
|
|
1839
|
-
timeout:
|
|
1593
|
+
var FetchPollOperationSchema = zod.z.object({
|
|
1594
|
+
url: zod.z.string(),
|
|
1595
|
+
interval: zod.z.number().int().positive().min(10).max(600).default(10),
|
|
1596
|
+
timeout: zod.z.number().int().positive().min(30).max(3600).default(600),
|
|
1840
1597
|
responseFilter: ResponseFilterSchema,
|
|
1841
1598
|
requestInit: FetchRequestInitSchema.optional(),
|
|
1842
1599
|
requestTimeout: FetchTimeoutOptionsSchema.optional()
|
|
1843
1600
|
});
|
|
1844
|
-
|
|
1845
|
-
// src/schemas/events.ts
|
|
1846
|
-
var import_zod15 = require("zod");
|
|
1847
|
-
var GetEventSchema = import_zod15.z.object({
|
|
1601
|
+
var GetEventSchema = zod.z.object({
|
|
1848
1602
|
/** The event id */
|
|
1849
|
-
id:
|
|
1603
|
+
id: zod.z.string(),
|
|
1850
1604
|
/** The event name */
|
|
1851
|
-
name:
|
|
1605
|
+
name: zod.z.string(),
|
|
1852
1606
|
/** When the event was created */
|
|
1853
|
-
createdAt:
|
|
1607
|
+
createdAt: zod.z.coerce.date(),
|
|
1854
1608
|
/** When the event was last updated */
|
|
1855
|
-
updatedAt:
|
|
1609
|
+
updatedAt: zod.z.coerce.date(),
|
|
1856
1610
|
/** The runs that were triggered by the event */
|
|
1857
|
-
runs:
|
|
1611
|
+
runs: zod.z.array(zod.z.object({
|
|
1858
1612
|
/** The Run id */
|
|
1859
|
-
id:
|
|
1613
|
+
id: zod.z.string(),
|
|
1860
1614
|
/** The Run status */
|
|
1861
1615
|
status: RunStatusSchema,
|
|
1862
1616
|
/** When the run started */
|
|
1863
|
-
startedAt:
|
|
1617
|
+
startedAt: zod.z.coerce.date().optional().nullable(),
|
|
1864
1618
|
/** When the run completed */
|
|
1865
|
-
completedAt:
|
|
1619
|
+
completedAt: zod.z.coerce.date().optional().nullable()
|
|
1866
1620
|
}))
|
|
1867
1621
|
});
|
|
1868
|
-
var CancelRunsForEventSchema =
|
|
1869
|
-
cancelledRunIds:
|
|
1870
|
-
failedToCancelRunIds:
|
|
1622
|
+
var CancelRunsForEventSchema = zod.z.object({
|
|
1623
|
+
cancelledRunIds: zod.z.array(zod.z.string()),
|
|
1624
|
+
failedToCancelRunIds: zod.z.array(zod.z.string())
|
|
1871
1625
|
});
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
method: import_zod16.z.string(),
|
|
1878
|
-
headers: import_zod16.z.record(import_zod16.z.string()),
|
|
1879
|
-
rawBody: import_zod16.z.string()
|
|
1626
|
+
var RequestWithRawBodySchema = zod.z.object({
|
|
1627
|
+
url: zod.z.string(),
|
|
1628
|
+
method: zod.z.string(),
|
|
1629
|
+
headers: zod.z.record(zod.z.string()),
|
|
1630
|
+
rawBody: zod.z.string()
|
|
1880
1631
|
});
|
|
1881
1632
|
|
|
1882
1633
|
// src/utils.ts
|
|
@@ -2088,7 +1839,7 @@ __name(eventFilterMatches, "eventFilterMatches");
|
|
|
2088
1839
|
function contentFiltersMatches(actualValue, contentFilters) {
|
|
2089
1840
|
for (const contentFilter of contentFilters) {
|
|
2090
1841
|
if (typeof contentFilter === "object") {
|
|
2091
|
-
|
|
1842
|
+
Object.entries(contentFilter)[0];
|
|
2092
1843
|
if (!contentFilterMatches(actualValue, contentFilter)) {
|
|
2093
1844
|
return false;
|
|
2094
1845
|
}
|
|
@@ -2273,187 +2024,186 @@ function supportsFeature(featureName, version) {
|
|
|
2273
2024
|
return version >= supportedVersion;
|
|
2274
2025
|
}
|
|
2275
2026
|
__name(supportsFeature, "supportsFeature");
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
});
|
|
2027
|
+
|
|
2028
|
+
exports.API_VERSIONS = API_VERSIONS;
|
|
2029
|
+
exports.ApiEventLogSchema = ApiEventLogSchema;
|
|
2030
|
+
exports.AutoYieldConfigSchema = AutoYieldConfigSchema;
|
|
2031
|
+
exports.AutoYieldMetadataSchema = AutoYieldMetadataSchema;
|
|
2032
|
+
exports.CachedTaskSchema = CachedTaskSchema;
|
|
2033
|
+
exports.CancelRunsForEventSchema = CancelRunsForEventSchema;
|
|
2034
|
+
exports.CommonMissingConnectionNotificationPayloadSchema = CommonMissingConnectionNotificationPayloadSchema;
|
|
2035
|
+
exports.CommonMissingConnectionNotificationResolvedPayloadSchema = CommonMissingConnectionNotificationResolvedPayloadSchema;
|
|
2036
|
+
exports.CompleteTaskBodyInputSchema = CompleteTaskBodyInputSchema;
|
|
2037
|
+
exports.CompleteTaskBodyV2InputSchema = CompleteTaskBodyV2InputSchema;
|
|
2038
|
+
exports.ConcurrencyLimitOptionsSchema = ConcurrencyLimitOptionsSchema;
|
|
2039
|
+
exports.ConnectionAuthSchema = ConnectionAuthSchema;
|
|
2040
|
+
exports.CreateExternalConnectionBodySchema = CreateExternalConnectionBodySchema;
|
|
2041
|
+
exports.CreateRunResponseBodySchema = CreateRunResponseBodySchema;
|
|
2042
|
+
exports.CronMetadataSchema = CronMetadataSchema;
|
|
2043
|
+
exports.CronOptionsSchema = CronOptionsSchema;
|
|
2044
|
+
exports.DELIVER_WEBHOOK_REQUEST = DELIVER_WEBHOOK_REQUEST;
|
|
2045
|
+
exports.DeliverEventResponseSchema = DeliverEventResponseSchema;
|
|
2046
|
+
exports.DeserializedJsonSchema = DeserializedJsonSchema;
|
|
2047
|
+
exports.DisplayPropertiesSchema = DisplayPropertiesSchema;
|
|
2048
|
+
exports.DisplayPropertySchema = DisplayPropertySchema;
|
|
2049
|
+
exports.DynamicTriggerEndpointMetadataSchema = DynamicTriggerEndpointMetadataSchema;
|
|
2050
|
+
exports.DynamicTriggerMetadataSchema = DynamicTriggerMetadataSchema;
|
|
2051
|
+
exports.EndpointHeadersSchema = EndpointHeadersSchema;
|
|
2052
|
+
exports.EndpointIndexErrorSchema = EndpointIndexErrorSchema;
|
|
2053
|
+
exports.EphemeralEventDispatcherRequestBodySchema = EphemeralEventDispatcherRequestBodySchema;
|
|
2054
|
+
exports.EphemeralEventDispatcherResponseBodySchema = EphemeralEventDispatcherResponseBodySchema;
|
|
2055
|
+
exports.ErrorWithStackSchema = ErrorWithStackSchema;
|
|
2056
|
+
exports.EventExampleSchema = EventExampleSchema;
|
|
2057
|
+
exports.EventFilterSchema = EventFilterSchema;
|
|
2058
|
+
exports.EventRuleSchema = EventRuleSchema;
|
|
2059
|
+
exports.EventSpecificationSchema = EventSpecificationSchema;
|
|
2060
|
+
exports.ExecuteJobHeadersSchema = ExecuteJobHeadersSchema;
|
|
2061
|
+
exports.ExecuteJobRunMetadataSchema = ExecuteJobRunMetadataSchema;
|
|
2062
|
+
exports.FailTaskBodyInputSchema = FailTaskBodyInputSchema;
|
|
2063
|
+
exports.FetchOperationSchema = FetchOperationSchema;
|
|
2064
|
+
exports.FetchPollOperationSchema = FetchPollOperationSchema;
|
|
2065
|
+
exports.FetchRequestInitSchema = FetchRequestInitSchema;
|
|
2066
|
+
exports.FetchRetryBackoffStrategySchema = FetchRetryBackoffStrategySchema;
|
|
2067
|
+
exports.FetchRetryHeadersStrategySchema = FetchRetryHeadersStrategySchema;
|
|
2068
|
+
exports.FetchRetryOptionsSchema = FetchRetryOptionsSchema;
|
|
2069
|
+
exports.FetchRetryStrategySchema = FetchRetryStrategySchema;
|
|
2070
|
+
exports.FetchTimeoutOptionsSchema = FetchTimeoutOptionsSchema;
|
|
2071
|
+
exports.GetEndpointIndexResponseSchema = GetEndpointIndexResponseSchema;
|
|
2072
|
+
exports.GetEventSchema = GetEventSchema;
|
|
2073
|
+
exports.GetRunSchema = GetRunSchema;
|
|
2074
|
+
exports.GetRunStatusesSchema = GetRunStatusesSchema;
|
|
2075
|
+
exports.GetRunsSchema = GetRunsSchema;
|
|
2076
|
+
exports.HTTPMethodUnionSchema = HTTPMethodUnionSchema;
|
|
2077
|
+
exports.HandleTriggerSourceSchema = HandleTriggerSourceSchema;
|
|
2078
|
+
exports.HttpEndpointRequestHeadersSchema = HttpEndpointRequestHeadersSchema;
|
|
2079
|
+
exports.HttpSourceRequestHeadersSchema = HttpSourceRequestHeadersSchema;
|
|
2080
|
+
exports.HttpSourceResponseSchema = HttpSourceResponseSchema;
|
|
2081
|
+
exports.IndexEndpointResponseSchema = IndexEndpointResponseSchema;
|
|
2082
|
+
exports.InitializeCronScheduleBodySchema = InitializeCronScheduleBodySchema;
|
|
2083
|
+
exports.InitializeTriggerBodySchema = InitializeTriggerBodySchema;
|
|
2084
|
+
exports.IntegrationConfigSchema = IntegrationConfigSchema;
|
|
2085
|
+
exports.IntegrationMetadataSchema = IntegrationMetadataSchema;
|
|
2086
|
+
exports.IntervalMetadataSchema = IntervalMetadataSchema;
|
|
2087
|
+
exports.IntervalOptionsSchema = IntervalOptionsSchema;
|
|
2088
|
+
exports.InvokeJobRequestBodySchema = InvokeJobRequestBodySchema;
|
|
2089
|
+
exports.InvokeJobResponseSchema = InvokeJobResponseSchema;
|
|
2090
|
+
exports.InvokeOptionsSchema = InvokeOptionsSchema;
|
|
2091
|
+
exports.InvokeTriggerMetadataSchema = InvokeTriggerMetadataSchema;
|
|
2092
|
+
exports.JobMetadataSchema = JobMetadataSchema;
|
|
2093
|
+
exports.JobRunStatusRecordSchema = JobRunStatusRecordSchema;
|
|
2094
|
+
exports.KeyValueStoreResponseBodySchema = KeyValueStoreResponseBodySchema;
|
|
2095
|
+
exports.LogMessageSchema = LogMessageSchema;
|
|
2096
|
+
exports.Logger = Logger;
|
|
2097
|
+
exports.MISSING_CONNECTION_NOTIFICATION = MISSING_CONNECTION_NOTIFICATION;
|
|
2098
|
+
exports.MISSING_CONNECTION_RESOLVED_NOTIFICATION = MISSING_CONNECTION_RESOLVED_NOTIFICATION;
|
|
2099
|
+
exports.MissingConnectionNotificationPayloadSchema = MissingConnectionNotificationPayloadSchema;
|
|
2100
|
+
exports.MissingConnectionResolvedNotificationPayloadSchema = MissingConnectionResolvedNotificationPayloadSchema;
|
|
2101
|
+
exports.MissingDeveloperConnectionNotificationPayloadSchema = MissingDeveloperConnectionNotificationPayloadSchema;
|
|
2102
|
+
exports.MissingDeveloperConnectionResolvedNotificationPayloadSchema = MissingDeveloperConnectionResolvedNotificationPayloadSchema;
|
|
2103
|
+
exports.MissingExternalConnectionNotificationPayloadSchema = MissingExternalConnectionNotificationPayloadSchema;
|
|
2104
|
+
exports.MissingExternalConnectionResolvedNotificationPayloadSchema = MissingExternalConnectionResolvedNotificationPayloadSchema;
|
|
2105
|
+
exports.NormalizedRequestSchema = NormalizedRequestSchema;
|
|
2106
|
+
exports.NormalizedResponseSchema = NormalizedResponseSchema;
|
|
2107
|
+
exports.PLATFORM_FEATURES = PLATFORM_FEATURES;
|
|
2108
|
+
exports.PongErrorResponseSchema = PongErrorResponseSchema;
|
|
2109
|
+
exports.PongResponseSchema = PongResponseSchema;
|
|
2110
|
+
exports.PongSuccessResponseSchema = PongSuccessResponseSchema;
|
|
2111
|
+
exports.PreprocessRunBodySchema = PreprocessRunBodySchema;
|
|
2112
|
+
exports.PreprocessRunResponseSchema = PreprocessRunResponseSchema;
|
|
2113
|
+
exports.QueueOptionsSchema = QueueOptionsSchema;
|
|
2114
|
+
exports.REGISTER_SOURCE_EVENT_V1 = REGISTER_SOURCE_EVENT_V1;
|
|
2115
|
+
exports.REGISTER_SOURCE_EVENT_V2 = REGISTER_SOURCE_EVENT_V2;
|
|
2116
|
+
exports.REGISTER_WEBHOOK = REGISTER_WEBHOOK;
|
|
2117
|
+
exports.RawEventSchema = RawEventSchema;
|
|
2118
|
+
exports.RedactSchema = RedactSchema;
|
|
2119
|
+
exports.RedactStringSchema = RedactStringSchema;
|
|
2120
|
+
exports.RegisterDynamicSchedulePayloadSchema = RegisterDynamicSchedulePayloadSchema;
|
|
2121
|
+
exports.RegisterHTTPTriggerSourceBodySchema = RegisterHTTPTriggerSourceBodySchema;
|
|
2122
|
+
exports.RegisterIntervalScheduleBodySchema = RegisterIntervalScheduleBodySchema;
|
|
2123
|
+
exports.RegisterSMTPTriggerSourceBodySchema = RegisterSMTPTriggerSourceBodySchema;
|
|
2124
|
+
exports.RegisterSQSTriggerSourceBodySchema = RegisterSQSTriggerSourceBodySchema;
|
|
2125
|
+
exports.RegisterScheduleBodySchema = RegisterScheduleBodySchema;
|
|
2126
|
+
exports.RegisterScheduleResponseBodySchema = RegisterScheduleResponseBodySchema;
|
|
2127
|
+
exports.RegisterSourceChannelBodySchema = RegisterSourceChannelBodySchema;
|
|
2128
|
+
exports.RegisterSourceEventSchemaV1 = RegisterSourceEventSchemaV1;
|
|
2129
|
+
exports.RegisterSourceEventSchemaV2 = RegisterSourceEventSchemaV2;
|
|
2130
|
+
exports.RegisterTriggerBodySchemaV1 = RegisterTriggerBodySchemaV1;
|
|
2131
|
+
exports.RegisterTriggerBodySchemaV2 = RegisterTriggerBodySchemaV2;
|
|
2132
|
+
exports.RegisterTriggerSourceSchema = RegisterTriggerSourceSchema;
|
|
2133
|
+
exports.RegisterWebhookPayloadSchema = RegisterWebhookPayloadSchema;
|
|
2134
|
+
exports.RegisterWebhookSourceSchema = RegisterWebhookSourceSchema;
|
|
2135
|
+
exports.RequestFilterSchema = RequestFilterSchema;
|
|
2136
|
+
exports.RequestWithRawBodySchema = RequestWithRawBodySchema;
|
|
2137
|
+
exports.ResponseFilterSchema = ResponseFilterSchema;
|
|
2138
|
+
exports.RetryOptionsSchema = RetryOptionsSchema;
|
|
2139
|
+
exports.RunJobAutoYieldExecutionErrorSchema = RunJobAutoYieldExecutionErrorSchema;
|
|
2140
|
+
exports.RunJobAutoYieldWithCompletedTaskExecutionErrorSchema = RunJobAutoYieldWithCompletedTaskExecutionErrorSchema;
|
|
2141
|
+
exports.RunJobBodySchema = RunJobBodySchema;
|
|
2142
|
+
exports.RunJobCanceledWithTaskSchema = RunJobCanceledWithTaskSchema;
|
|
2143
|
+
exports.RunJobErrorResponseSchema = RunJobErrorResponseSchema;
|
|
2144
|
+
exports.RunJobErrorSchema = RunJobErrorSchema;
|
|
2145
|
+
exports.RunJobInvalidPayloadErrorSchema = RunJobInvalidPayloadErrorSchema;
|
|
2146
|
+
exports.RunJobResponseSchema = RunJobResponseSchema;
|
|
2147
|
+
exports.RunJobResumeWithParallelTaskSchema = RunJobResumeWithParallelTaskSchema;
|
|
2148
|
+
exports.RunJobResumeWithTaskSchema = RunJobResumeWithTaskSchema;
|
|
2149
|
+
exports.RunJobRetryWithTaskSchema = RunJobRetryWithTaskSchema;
|
|
2150
|
+
exports.RunJobSuccessSchema = RunJobSuccessSchema;
|
|
2151
|
+
exports.RunJobUnresolvedAuthErrorSchema = RunJobUnresolvedAuthErrorSchema;
|
|
2152
|
+
exports.RunJobYieldExecutionErrorSchema = RunJobYieldExecutionErrorSchema;
|
|
2153
|
+
exports.RunSourceContextSchema = RunSourceContextSchema;
|
|
2154
|
+
exports.RunStatusSchema = RunStatusSchema;
|
|
2155
|
+
exports.RunTaskBodyInputSchema = RunTaskBodyInputSchema;
|
|
2156
|
+
exports.RunTaskBodyOutputSchema = RunTaskBodyOutputSchema;
|
|
2157
|
+
exports.RunTaskOptionsSchema = RunTaskOptionsSchema;
|
|
2158
|
+
exports.RunTaskResponseWithCachedTasksBodySchema = RunTaskResponseWithCachedTasksBodySchema;
|
|
2159
|
+
exports.RunTaskSchema = RunTaskSchema;
|
|
2160
|
+
exports.RuntimeEnvironmentTypeSchema = RuntimeEnvironmentTypeSchema;
|
|
2161
|
+
exports.SCHEDULED_EVENT = SCHEDULED_EVENT;
|
|
2162
|
+
exports.ScheduleMetadataSchema = ScheduleMetadataSchema;
|
|
2163
|
+
exports.ScheduledPayloadSchema = ScheduledPayloadSchema;
|
|
2164
|
+
exports.ScheduledTriggerMetadataSchema = ScheduledTriggerMetadataSchema;
|
|
2165
|
+
exports.SchemaErrorSchema = SchemaErrorSchema;
|
|
2166
|
+
exports.SendBulkEventsBodySchema = SendBulkEventsBodySchema;
|
|
2167
|
+
exports.SendEventBodySchema = SendEventBodySchema;
|
|
2168
|
+
exports.SendEventOptionsSchema = SendEventOptionsSchema;
|
|
2169
|
+
exports.SerializableJsonSchema = SerializableJsonSchema;
|
|
2170
|
+
exports.ServerTaskSchema = ServerTaskSchema;
|
|
2171
|
+
exports.SourceMetadataV2Schema = SourceMetadataV2Schema;
|
|
2172
|
+
exports.StaticTriggerMetadataSchema = StaticTriggerMetadataSchema;
|
|
2173
|
+
exports.StatusHistorySchema = StatusHistorySchema;
|
|
2174
|
+
exports.StatusUpdateSchema = StatusUpdateSchema;
|
|
2175
|
+
exports.StatusUpdateStateSchema = StatusUpdateStateSchema;
|
|
2176
|
+
exports.StyleSchema = StyleSchema;
|
|
2177
|
+
exports.TaskSchema = TaskSchema;
|
|
2178
|
+
exports.TaskStatusSchema = TaskStatusSchema;
|
|
2179
|
+
exports.TriggerHelpSchema = TriggerHelpSchema;
|
|
2180
|
+
exports.TriggerMetadataSchema = TriggerMetadataSchema;
|
|
2181
|
+
exports.TriggerSourceSchema = TriggerSourceSchema;
|
|
2182
|
+
exports.UpdateTriggerSourceBodyV1Schema = UpdateTriggerSourceBodyV1Schema;
|
|
2183
|
+
exports.UpdateTriggerSourceBodyV2Schema = UpdateTriggerSourceBodyV2Schema;
|
|
2184
|
+
exports.UpdateWebhookBodySchema = UpdateWebhookBodySchema;
|
|
2185
|
+
exports.ValidateErrorResponseSchema = ValidateErrorResponseSchema;
|
|
2186
|
+
exports.ValidateResponseSchema = ValidateResponseSchema;
|
|
2187
|
+
exports.ValidateSuccessResponseSchema = ValidateSuccessResponseSchema;
|
|
2188
|
+
exports.WebhookContextMetadataSchema = WebhookContextMetadataSchema;
|
|
2189
|
+
exports.WebhookDeliveryResponseSchema = WebhookDeliveryResponseSchema;
|
|
2190
|
+
exports.WebhookMetadataSchema = WebhookMetadataSchema;
|
|
2191
|
+
exports.WebhookSourceRequestHeadersSchema = WebhookSourceRequestHeadersSchema;
|
|
2192
|
+
exports.addMissingVersionField = addMissingVersionField;
|
|
2193
|
+
exports.assertExhaustive = assertExhaustive;
|
|
2194
|
+
exports.calculateResetAt = calculateResetAt;
|
|
2195
|
+
exports.calculateRetryAt = calculateRetryAt;
|
|
2196
|
+
exports.currentDate = currentDate;
|
|
2197
|
+
exports.currentTimestampMilliseconds = currentTimestampMilliseconds;
|
|
2198
|
+
exports.currentTimestampSeconds = currentTimestampSeconds;
|
|
2199
|
+
exports.deepMergeFilters = deepMergeFilters;
|
|
2200
|
+
exports.eventFilterMatches = eventFilterMatches;
|
|
2201
|
+
exports.parseEndpointIndexStats = parseEndpointIndexStats;
|
|
2202
|
+
exports.replacements = replacements;
|
|
2203
|
+
exports.requestFilterMatches = requestFilterMatches;
|
|
2204
|
+
exports.responseFilterMatches = responseFilterMatches;
|
|
2205
|
+
exports.stringPatternMatchers = stringPatternMatchers;
|
|
2206
|
+
exports.supportsFeature = supportsFeature;
|
|
2207
|
+
exports.urlWithSearchParams = urlWithSearchParams;
|
|
2208
|
+
//# sourceMappingURL=out.js.map
|
|
2459
2209
|
//# sourceMappingURL=index.js.map
|