@trigger.dev/core 2.2.10 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +16783 -0
- package/dist/index.d.ts +1 -9
- package/dist/index.js +983 -1048
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2028 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +12 -6
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,194 +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
32
|
var logLevels = [
|
|
231
33
|
"log",
|
|
232
34
|
"error",
|
|
@@ -244,7 +46,7 @@ var _Logger = class _Logger {
|
|
|
244
46
|
__privateAdd(this, _jsonReplacer, void 0);
|
|
245
47
|
__privateAdd(this, _additionalFields, void 0);
|
|
246
48
|
__privateSet(this, _name, name);
|
|
247
|
-
__privateSet(this, _level, logLevels.indexOf(
|
|
49
|
+
__privateSet(this, _level, logLevels.indexOf(node_process.env.TRIGGER_LOG_LEVEL ?? level));
|
|
248
50
|
__privateSet(this, _filteredKeys, filteredKeys);
|
|
249
51
|
__privateSet(this, _jsonReplacer, createReplacer(jsonReplacer));
|
|
250
52
|
__privateSet(this, _additionalFields, additionalFields ?? (() => ({})));
|
|
@@ -365,7 +167,7 @@ function filterKeys(obj, keys) {
|
|
|
365
167
|
}
|
|
366
168
|
__name(filterKeys, "filterKeys");
|
|
367
169
|
function prettyPrintBytes(value) {
|
|
368
|
-
if (
|
|
170
|
+
if (node_process.env.NODE_ENV === "production") {
|
|
369
171
|
return "skipped size";
|
|
370
172
|
}
|
|
371
173
|
const sizeInBytes = getSizeInBytes(value);
|
|
@@ -384,17 +186,13 @@ __name(prettyPrintBytes, "prettyPrintBytes");
|
|
|
384
186
|
function getSizeInBytes(value) {
|
|
385
187
|
const jsonString = JSON.stringify(value);
|
|
386
188
|
if (typeof window === "undefined") {
|
|
387
|
-
return Buffer.byteLength(jsonString, "utf8");
|
|
189
|
+
return node_buffer.Buffer.byteLength(jsonString, "utf8");
|
|
388
190
|
} else {
|
|
389
191
|
return new TextEncoder().encode(jsonString).length;
|
|
390
192
|
}
|
|
391
193
|
}
|
|
392
194
|
__name(getSizeInBytes, "getSizeInBytes");
|
|
393
195
|
|
|
394
|
-
// src/schemas/api.ts
|
|
395
|
-
var import_ulidx = require("ulidx");
|
|
396
|
-
var import_zod12 = require("zod");
|
|
397
|
-
|
|
398
196
|
// src/schemas/addMissingVersionField.ts
|
|
399
197
|
function addMissingVersionField(val) {
|
|
400
198
|
if (val !== null && typeof val === "object" && !("version" in val)) {
|
|
@@ -406,225 +204,204 @@ function addMissingVersionField(val) {
|
|
|
406
204
|
return val;
|
|
407
205
|
}
|
|
408
206
|
__name(addMissingVersionField, "addMissingVersionField");
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
message: import_zod.z.string(),
|
|
414
|
-
name: import_zod.z.string().optional(),
|
|
415
|
-
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()
|
|
416
211
|
});
|
|
417
|
-
var SchemaErrorSchema =
|
|
418
|
-
path:
|
|
419
|
-
message:
|
|
212
|
+
var SchemaErrorSchema = zod.z.object({
|
|
213
|
+
path: zod.z.array(zod.z.string()),
|
|
214
|
+
message: zod.z.string()
|
|
420
215
|
});
|
|
421
|
-
|
|
422
|
-
// src/schemas/eventFilter.ts
|
|
423
|
-
var import_zod2 = require("zod");
|
|
424
216
|
var stringPatternMatchers = [
|
|
425
|
-
|
|
426
|
-
$endsWith:
|
|
217
|
+
zod.z.object({
|
|
218
|
+
$endsWith: zod.z.string()
|
|
427
219
|
}),
|
|
428
|
-
|
|
429
|
-
$startsWith:
|
|
220
|
+
zod.z.object({
|
|
221
|
+
$startsWith: zod.z.string()
|
|
430
222
|
}),
|
|
431
|
-
|
|
432
|
-
$ignoreCaseEquals:
|
|
223
|
+
zod.z.object({
|
|
224
|
+
$ignoreCaseEquals: zod.z.string()
|
|
433
225
|
})
|
|
434
226
|
];
|
|
435
|
-
var EventMatcherSchema =
|
|
227
|
+
var EventMatcherSchema = zod.z.union([
|
|
436
228
|
/** Match against a string */
|
|
437
|
-
|
|
229
|
+
zod.z.array(zod.z.string()),
|
|
438
230
|
/** Match against a number */
|
|
439
|
-
|
|
231
|
+
zod.z.array(zod.z.number()),
|
|
440
232
|
/** Match against a boolean */
|
|
441
|
-
|
|
442
|
-
|
|
233
|
+
zod.z.array(zod.z.boolean()),
|
|
234
|
+
zod.z.array(zod.z.union([
|
|
443
235
|
...stringPatternMatchers,
|
|
444
|
-
|
|
445
|
-
$exists:
|
|
236
|
+
zod.z.object({
|
|
237
|
+
$exists: zod.z.boolean()
|
|
446
238
|
}),
|
|
447
|
-
|
|
448
|
-
$isNull:
|
|
239
|
+
zod.z.object({
|
|
240
|
+
$isNull: zod.z.boolean()
|
|
449
241
|
}),
|
|
450
|
-
|
|
451
|
-
$anythingBut:
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
242
|
+
zod.z.object({
|
|
243
|
+
$anythingBut: zod.z.union([
|
|
244
|
+
zod.z.string(),
|
|
245
|
+
zod.z.number(),
|
|
246
|
+
zod.z.boolean()
|
|
455
247
|
])
|
|
456
248
|
}),
|
|
457
|
-
|
|
458
|
-
$anythingBut:
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
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())
|
|
462
254
|
])
|
|
463
255
|
}),
|
|
464
|
-
|
|
465
|
-
$gt:
|
|
256
|
+
zod.z.object({
|
|
257
|
+
$gt: zod.z.number()
|
|
466
258
|
}),
|
|
467
|
-
|
|
468
|
-
$lt:
|
|
259
|
+
zod.z.object({
|
|
260
|
+
$lt: zod.z.number()
|
|
469
261
|
}),
|
|
470
|
-
|
|
471
|
-
$gte:
|
|
262
|
+
zod.z.object({
|
|
263
|
+
$gte: zod.z.number()
|
|
472
264
|
}),
|
|
473
|
-
|
|
474
|
-
$lte:
|
|
265
|
+
zod.z.object({
|
|
266
|
+
$lte: zod.z.number()
|
|
475
267
|
}),
|
|
476
|
-
|
|
477
|
-
$between:
|
|
478
|
-
|
|
479
|
-
|
|
268
|
+
zod.z.object({
|
|
269
|
+
$between: zod.z.tuple([
|
|
270
|
+
zod.z.number(),
|
|
271
|
+
zod.z.number()
|
|
480
272
|
])
|
|
481
273
|
}),
|
|
482
|
-
|
|
483
|
-
$includes:
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
274
|
+
zod.z.object({
|
|
275
|
+
$includes: zod.z.union([
|
|
276
|
+
zod.z.string(),
|
|
277
|
+
zod.z.number(),
|
|
278
|
+
zod.z.boolean()
|
|
487
279
|
])
|
|
488
280
|
})
|
|
489
281
|
]))
|
|
490
282
|
]);
|
|
491
|
-
var EventFilterSchema =
|
|
283
|
+
var EventFilterSchema = zod.z.lazy(() => zod.z.record(zod.z.union([
|
|
492
284
|
EventMatcherSchema,
|
|
493
285
|
EventFilterSchema
|
|
494
286
|
])));
|
|
495
|
-
var EventRuleSchema =
|
|
496
|
-
event:
|
|
497
|
-
source:
|
|
287
|
+
var EventRuleSchema = zod.z.object({
|
|
288
|
+
event: zod.z.string().or(zod.z.array(zod.z.string())),
|
|
289
|
+
source: zod.z.string(),
|
|
498
290
|
payload: EventFilterSchema.optional(),
|
|
499
291
|
context: EventFilterSchema.optional()
|
|
500
292
|
});
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
var import_zod3 = require("zod");
|
|
504
|
-
var ConnectionAuthSchema = import_zod3.z.object({
|
|
505
|
-
type: import_zod3.z.enum([
|
|
293
|
+
var ConnectionAuthSchema = zod.z.object({
|
|
294
|
+
type: zod.z.enum([
|
|
506
295
|
"oauth2",
|
|
507
296
|
"apiKey"
|
|
508
297
|
]),
|
|
509
|
-
accessToken:
|
|
510
|
-
scopes:
|
|
511
|
-
additionalFields:
|
|
298
|
+
accessToken: zod.z.string(),
|
|
299
|
+
scopes: zod.z.array(zod.z.string()).optional(),
|
|
300
|
+
additionalFields: zod.z.record(zod.z.string()).optional()
|
|
512
301
|
});
|
|
513
|
-
var IntegrationMetadataSchema =
|
|
514
|
-
id:
|
|
515
|
-
name:
|
|
516
|
-
instructions:
|
|
302
|
+
var IntegrationMetadataSchema = zod.z.object({
|
|
303
|
+
id: zod.z.string(),
|
|
304
|
+
name: zod.z.string(),
|
|
305
|
+
instructions: zod.z.string().optional()
|
|
517
306
|
});
|
|
518
|
-
var IntegrationConfigSchema =
|
|
519
|
-
id:
|
|
307
|
+
var IntegrationConfigSchema = zod.z.object({
|
|
308
|
+
id: zod.z.string(),
|
|
520
309
|
metadata: IntegrationMetadataSchema,
|
|
521
|
-
authSource:
|
|
310
|
+
authSource: zod.z.enum([
|
|
522
311
|
"HOSTED",
|
|
523
312
|
"LOCAL",
|
|
524
313
|
"RESOLVER"
|
|
525
314
|
])
|
|
526
315
|
});
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
import_zod4.z.number(),
|
|
533
|
-
import_zod4.z.boolean(),
|
|
534
|
-
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()
|
|
535
321
|
]);
|
|
536
|
-
var DeserializedJsonSchema =
|
|
322
|
+
var DeserializedJsonSchema = zod.z.lazy(() => zod.z.union([
|
|
537
323
|
LiteralSchema,
|
|
538
|
-
|
|
539
|
-
|
|
324
|
+
zod.z.array(DeserializedJsonSchema),
|
|
325
|
+
zod.z.record(DeserializedJsonSchema)
|
|
540
326
|
]));
|
|
541
|
-
var SerializableSchema =
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
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()
|
|
549
335
|
]);
|
|
550
|
-
var SerializableJsonSchema =
|
|
336
|
+
var SerializableJsonSchema = zod.z.lazy(() => zod.z.union([
|
|
551
337
|
SerializableSchema,
|
|
552
|
-
|
|
553
|
-
|
|
338
|
+
zod.z.array(SerializableJsonSchema),
|
|
339
|
+
zod.z.record(SerializableJsonSchema)
|
|
554
340
|
]));
|
|
555
|
-
|
|
556
|
-
// src/schemas/properties.ts
|
|
557
|
-
var import_zod5 = require("zod");
|
|
558
|
-
var DisplayPropertySchema = import_zod5.z.object({
|
|
341
|
+
var DisplayPropertySchema = zod.z.object({
|
|
559
342
|
/** The label for the property */
|
|
560
|
-
label:
|
|
343
|
+
label: zod.z.string(),
|
|
561
344
|
/** The value of the property */
|
|
562
|
-
text:
|
|
345
|
+
text: zod.z.string(),
|
|
563
346
|
/** The URL to link to when the property is clicked */
|
|
564
|
-
url:
|
|
347
|
+
url: zod.z.string().optional(),
|
|
565
348
|
/** The URL to a list of images to display next to the property */
|
|
566
|
-
imageUrl:
|
|
349
|
+
imageUrl: zod.z.array(zod.z.string()).optional()
|
|
567
350
|
});
|
|
568
|
-
var DisplayPropertiesSchema =
|
|
569
|
-
var StyleSchema =
|
|
351
|
+
var DisplayPropertiesSchema = zod.z.array(DisplayPropertySchema);
|
|
352
|
+
var StyleSchema = zod.z.object({
|
|
570
353
|
/** The style, `normal` or `minimal` */
|
|
571
|
-
style:
|
|
354
|
+
style: zod.z.enum([
|
|
572
355
|
"normal",
|
|
573
356
|
"minimal"
|
|
574
357
|
]),
|
|
575
358
|
/** A variant of the style. */
|
|
576
|
-
variant:
|
|
359
|
+
variant: zod.z.string().optional()
|
|
577
360
|
});
|
|
578
|
-
|
|
579
|
-
// src/schemas/schedules.ts
|
|
580
|
-
var import_zod6 = require("zod");
|
|
581
361
|
var SCHEDULED_EVENT = "dev.trigger.scheduled";
|
|
582
|
-
var ScheduledPayloadSchema =
|
|
583
|
-
ts:
|
|
584
|
-
lastTimestamp:
|
|
362
|
+
var ScheduledPayloadSchema = zod.z.object({
|
|
363
|
+
ts: zod.z.coerce.date(),
|
|
364
|
+
lastTimestamp: zod.z.coerce.date().optional()
|
|
585
365
|
});
|
|
586
|
-
var IntervalOptionsSchema =
|
|
366
|
+
var IntervalOptionsSchema = zod.z.object({
|
|
587
367
|
/** The number of seconds for the interval. Min = 60, Max = 2_592_000 (30 days) */
|
|
588
|
-
seconds:
|
|
368
|
+
seconds: zod.z.number().int().positive().min(60).max(2592e3)
|
|
589
369
|
});
|
|
590
|
-
var CronOptionsSchema =
|
|
370
|
+
var CronOptionsSchema = zod.z.object({
|
|
591
371
|
/** A CRON expression that defines the schedule. A useful tool when writing CRON
|
|
592
372
|
expressions is [crontab guru](https://crontab.guru). Note that the timezone
|
|
593
373
|
used is UTC. */
|
|
594
|
-
cron:
|
|
374
|
+
cron: zod.z.string()
|
|
595
375
|
});
|
|
596
|
-
var CronMetadataSchema =
|
|
597
|
-
type:
|
|
376
|
+
var CronMetadataSchema = zod.z.object({
|
|
377
|
+
type: zod.z.literal("cron"),
|
|
598
378
|
options: CronOptionsSchema,
|
|
599
379
|
/** An optional Account ID to associate with runs triggered by this interval */
|
|
600
|
-
accountId:
|
|
601
|
-
metadata:
|
|
380
|
+
accountId: zod.z.string().optional(),
|
|
381
|
+
metadata: zod.z.any()
|
|
602
382
|
});
|
|
603
|
-
var IntervalMetadataSchema =
|
|
383
|
+
var IntervalMetadataSchema = zod.z.object({
|
|
604
384
|
/** An interval reoccurs at the specified number of seconds */
|
|
605
|
-
type:
|
|
385
|
+
type: zod.z.literal("interval"),
|
|
606
386
|
/** An object containing options about the interval. */
|
|
607
387
|
options: IntervalOptionsSchema,
|
|
608
388
|
/** An optional Account ID to associate with runs triggered by this interval */
|
|
609
|
-
accountId:
|
|
389
|
+
accountId: zod.z.string().optional(),
|
|
610
390
|
/** Any additional metadata about the schedule. */
|
|
611
|
-
metadata:
|
|
391
|
+
metadata: zod.z.any()
|
|
612
392
|
});
|
|
613
|
-
var ScheduleMetadataSchema =
|
|
393
|
+
var ScheduleMetadataSchema = zod.z.discriminatedUnion("type", [
|
|
614
394
|
IntervalMetadataSchema,
|
|
615
395
|
CronMetadataSchema
|
|
616
396
|
]);
|
|
617
|
-
var RegisterDynamicSchedulePayloadSchema =
|
|
618
|
-
id:
|
|
619
|
-
jobs:
|
|
620
|
-
id:
|
|
621
|
-
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()
|
|
622
402
|
}))
|
|
623
403
|
});
|
|
624
|
-
|
|
625
|
-
// src/schemas/tasks.ts
|
|
626
|
-
var import_zod7 = require("zod");
|
|
627
|
-
var TaskStatusSchema = import_zod7.z.enum([
|
|
404
|
+
var TaskStatusSchema = zod.z.enum([
|
|
628
405
|
"PENDING",
|
|
629
406
|
"WAITING",
|
|
630
407
|
"RUNNING",
|
|
@@ -632,229 +409,217 @@ var TaskStatusSchema = import_zod7.z.enum([
|
|
|
632
409
|
"ERRORED",
|
|
633
410
|
"CANCELED"
|
|
634
411
|
]);
|
|
635
|
-
var TaskSchema =
|
|
636
|
-
id:
|
|
637
|
-
name:
|
|
638
|
-
icon:
|
|
639
|
-
noop:
|
|
640
|
-
startedAt:
|
|
641
|
-
completedAt:
|
|
642
|
-
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(),
|
|
643
420
|
status: TaskStatusSchema,
|
|
644
|
-
description:
|
|
645
|
-
properties:
|
|
646
|
-
outputProperties:
|
|
421
|
+
description: zod.z.string().optional().nullable(),
|
|
422
|
+
properties: zod.z.array(DisplayPropertySchema).optional().nullable(),
|
|
423
|
+
outputProperties: zod.z.array(DisplayPropertySchema).optional().nullable(),
|
|
647
424
|
params: DeserializedJsonSchema.optional().nullable(),
|
|
648
425
|
output: DeserializedJsonSchema.optional().nullable(),
|
|
649
426
|
context: DeserializedJsonSchema.optional().nullable(),
|
|
650
|
-
error:
|
|
651
|
-
parentId:
|
|
427
|
+
error: zod.z.string().optional().nullable(),
|
|
428
|
+
parentId: zod.z.string().optional().nullable(),
|
|
652
429
|
style: StyleSchema.optional().nullable(),
|
|
653
|
-
operation:
|
|
654
|
-
callbackUrl:
|
|
655
|
-
childExecutionMode:
|
|
430
|
+
operation: zod.z.string().optional().nullable(),
|
|
431
|
+
callbackUrl: zod.z.string().optional().nullable(),
|
|
432
|
+
childExecutionMode: zod.z.enum([
|
|
656
433
|
"SEQUENTIAL",
|
|
657
434
|
"PARALLEL"
|
|
658
435
|
]).optional().nullable()
|
|
659
436
|
});
|
|
660
437
|
var ServerTaskSchema = TaskSchema.extend({
|
|
661
|
-
idempotencyKey:
|
|
662
|
-
attempts:
|
|
663
|
-
forceYield:
|
|
438
|
+
idempotencyKey: zod.z.string(),
|
|
439
|
+
attempts: zod.z.number(),
|
|
440
|
+
forceYield: zod.z.boolean().optional().nullable()
|
|
664
441
|
});
|
|
665
|
-
var CachedTaskSchema =
|
|
666
|
-
id:
|
|
667
|
-
idempotencyKey:
|
|
442
|
+
var CachedTaskSchema = zod.z.object({
|
|
443
|
+
id: zod.z.string(),
|
|
444
|
+
idempotencyKey: zod.z.string(),
|
|
668
445
|
status: TaskStatusSchema,
|
|
669
|
-
noop:
|
|
446
|
+
noop: zod.z.boolean().default(false),
|
|
670
447
|
output: DeserializedJsonSchema.optional().nullable(),
|
|
671
|
-
parentId:
|
|
672
|
-
});
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
title: import_zod8.z.string(),
|
|
685
|
-
source: import_zod8.z.string(),
|
|
686
|
-
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(),
|
|
687
461
|
filter: EventFilterSchema.optional(),
|
|
688
|
-
properties:
|
|
689
|
-
schema:
|
|
690
|
-
examples:
|
|
691
|
-
});
|
|
692
|
-
var DynamicTriggerMetadataSchema =
|
|
693
|
-
type:
|
|
694
|
-
id:
|
|
695
|
-
});
|
|
696
|
-
var TriggerHelpSchema =
|
|
697
|
-
noRuns:
|
|
698
|
-
text:
|
|
699
|
-
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()
|
|
700
474
|
}).optional()
|
|
701
475
|
});
|
|
702
|
-
var StaticTriggerMetadataSchema =
|
|
703
|
-
type:
|
|
704
|
-
title:
|
|
705
|
-
|
|
706
|
-
|
|
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())
|
|
707
481
|
]),
|
|
708
|
-
properties:
|
|
482
|
+
properties: zod.z.array(DisplayPropertySchema).optional(),
|
|
709
483
|
rule: EventRuleSchema,
|
|
710
|
-
link:
|
|
484
|
+
link: zod.z.string().optional(),
|
|
711
485
|
help: TriggerHelpSchema.optional()
|
|
712
486
|
});
|
|
713
|
-
var InvokeTriggerMetadataSchema =
|
|
714
|
-
type:
|
|
487
|
+
var InvokeTriggerMetadataSchema = zod.z.object({
|
|
488
|
+
type: zod.z.literal("invoke")
|
|
715
489
|
});
|
|
716
|
-
var ScheduledTriggerMetadataSchema =
|
|
717
|
-
type:
|
|
490
|
+
var ScheduledTriggerMetadataSchema = zod.z.object({
|
|
491
|
+
type: zod.z.literal("scheduled"),
|
|
718
492
|
schedule: ScheduleMetadataSchema
|
|
719
493
|
});
|
|
720
|
-
var TriggerMetadataSchema =
|
|
494
|
+
var TriggerMetadataSchema = zod.z.discriminatedUnion("type", [
|
|
721
495
|
DynamicTriggerMetadataSchema,
|
|
722
496
|
StaticTriggerMetadataSchema,
|
|
723
497
|
ScheduledTriggerMetadataSchema,
|
|
724
498
|
InvokeTriggerMetadataSchema
|
|
725
499
|
]);
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
// src/schemas/statuses.ts
|
|
731
|
-
var import_zod9 = require("zod");
|
|
732
|
-
var StatusUpdateStateSchema = import_zod9.z.union([
|
|
733
|
-
import_zod9.z.literal("loading"),
|
|
734
|
-
import_zod9.z.literal("success"),
|
|
735
|
-
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")
|
|
736
504
|
]);
|
|
737
|
-
var StatusUpdateDataSchema =
|
|
738
|
-
var StatusUpdateSchema =
|
|
739
|
-
label:
|
|
505
|
+
var StatusUpdateDataSchema = zod.z.record(SerializableJsonSchema);
|
|
506
|
+
var StatusUpdateSchema = zod.z.object({
|
|
507
|
+
label: zod.z.string().optional(),
|
|
740
508
|
state: StatusUpdateStateSchema.optional(),
|
|
741
509
|
data: StatusUpdateDataSchema.optional()
|
|
742
510
|
});
|
|
743
511
|
var InitalStatusUpdateSchema = StatusUpdateSchema.required({
|
|
744
512
|
label: true
|
|
745
513
|
});
|
|
746
|
-
var StatusHistorySchema =
|
|
514
|
+
var StatusHistorySchema = zod.z.array(StatusUpdateSchema);
|
|
747
515
|
var JobRunStatusRecordSchema = InitalStatusUpdateSchema.extend({
|
|
748
|
-
key:
|
|
516
|
+
key: zod.z.string(),
|
|
749
517
|
history: StatusHistorySchema
|
|
750
518
|
});
|
|
751
519
|
|
|
752
520
|
// src/schemas/runs.ts
|
|
753
|
-
var RunStatusSchema =
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
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")
|
|
769
537
|
]);
|
|
770
|
-
var RunTaskSchema =
|
|
538
|
+
var RunTaskSchema = zod.z.object({
|
|
771
539
|
/** The Task id */
|
|
772
|
-
id:
|
|
540
|
+
id: zod.z.string(),
|
|
773
541
|
/** The key that you defined when creating the Task, the first param in any task. */
|
|
774
|
-
displayKey:
|
|
542
|
+
displayKey: zod.z.string().nullable(),
|
|
775
543
|
/** The Task status */
|
|
776
544
|
status: TaskStatusSchema,
|
|
777
545
|
/** The name of the Task */
|
|
778
|
-
name:
|
|
546
|
+
name: zod.z.string(),
|
|
779
547
|
/** The icon of the Task, a string.
|
|
780
548
|
* For integrations, this will be a lowercase name of the company.
|
|
781
549
|
* Can be used with the [@trigger.dev/companyicons](https://www.npmjs.com/package/@trigger.dev/companyicons) package to display an svg. */
|
|
782
|
-
icon:
|
|
550
|
+
icon: zod.z.string().nullable(),
|
|
783
551
|
/** When the task started */
|
|
784
|
-
startedAt:
|
|
552
|
+
startedAt: zod.z.coerce.date().nullable(),
|
|
785
553
|
/** When the task completed */
|
|
786
|
-
completedAt:
|
|
554
|
+
completedAt: zod.z.coerce.date().nullable()
|
|
787
555
|
});
|
|
788
556
|
var RunTaskWithSubtasksSchema = RunTaskSchema.extend({
|
|
789
|
-
subtasks:
|
|
557
|
+
subtasks: zod.z.lazy(() => RunTaskWithSubtasksSchema.array()).optional()
|
|
790
558
|
});
|
|
791
|
-
var GetRunOptionsSchema =
|
|
559
|
+
var GetRunOptionsSchema = zod.z.object({
|
|
792
560
|
/** Return subtasks, which appear in a `subtasks` array on a task. @default false */
|
|
793
|
-
subtasks:
|
|
561
|
+
subtasks: zod.z.boolean().optional(),
|
|
794
562
|
/** You can use this to get more tasks, if there are more than are returned in a single batch @default undefined */
|
|
795
|
-
cursor:
|
|
563
|
+
cursor: zod.z.string().optional(),
|
|
796
564
|
/** How many tasks you want to return in one go, max 50. @default 20 */
|
|
797
|
-
take:
|
|
565
|
+
take: zod.z.number().optional()
|
|
798
566
|
});
|
|
799
|
-
|
|
567
|
+
GetRunOptionsSchema.extend({
|
|
800
568
|
/** If `true`, it returns the `params` and `output` of all tasks. @default false */
|
|
801
|
-
taskdetails:
|
|
569
|
+
taskdetails: zod.z.boolean().optional()
|
|
802
570
|
});
|
|
803
|
-
var RunSchema =
|
|
571
|
+
var RunSchema = zod.z.object({
|
|
804
572
|
/** The Run id */
|
|
805
|
-
id:
|
|
573
|
+
id: zod.z.string(),
|
|
806
574
|
/** The Run status */
|
|
807
575
|
status: RunStatusSchema,
|
|
808
576
|
/** When the run started */
|
|
809
|
-
startedAt:
|
|
577
|
+
startedAt: zod.z.coerce.date().nullable(),
|
|
810
578
|
/** When the run was last updated */
|
|
811
|
-
updatedAt:
|
|
579
|
+
updatedAt: zod.z.coerce.date().nullable(),
|
|
812
580
|
/** When the run was completed */
|
|
813
|
-
completedAt:
|
|
581
|
+
completedAt: zod.z.coerce.date().nullable()
|
|
814
582
|
});
|
|
815
583
|
var GetRunSchema = RunSchema.extend({
|
|
816
584
|
/** The output of the run */
|
|
817
|
-
output:
|
|
585
|
+
output: zod.z.any().optional(),
|
|
818
586
|
/** The tasks from the run */
|
|
819
|
-
tasks:
|
|
587
|
+
tasks: zod.z.array(RunTaskWithSubtasksSchema),
|
|
820
588
|
/** Any status updates that were published from the run */
|
|
821
|
-
statuses:
|
|
589
|
+
statuses: zod.z.array(JobRunStatusRecordSchema).default([]),
|
|
822
590
|
/** If there are more tasks, you can use this to get them */
|
|
823
|
-
nextCursor:
|
|
591
|
+
nextCursor: zod.z.string().optional()
|
|
824
592
|
});
|
|
825
|
-
|
|
593
|
+
zod.z.object({
|
|
826
594
|
/** You can use this to get more tasks, if there are more than are returned in a single batch @default undefined */
|
|
827
|
-
cursor:
|
|
595
|
+
cursor: zod.z.string().optional(),
|
|
828
596
|
/** How many runs you want to return in one go, max 50. @default 20 */
|
|
829
|
-
take:
|
|
597
|
+
take: zod.z.number().optional()
|
|
830
598
|
});
|
|
831
|
-
var GetRunsSchema =
|
|
599
|
+
var GetRunsSchema = zod.z.object({
|
|
832
600
|
/** The runs from the query */
|
|
833
601
|
runs: RunSchema.array(),
|
|
834
602
|
/** If there are more runs, you can use this to get them */
|
|
835
|
-
nextCursor:
|
|
603
|
+
nextCursor: zod.z.string().optional()
|
|
836
604
|
});
|
|
837
|
-
|
|
838
|
-
// src/schemas/requestFilter.ts
|
|
839
|
-
var import_zod11 = require("zod");
|
|
840
|
-
var StringMatchSchema = import_zod11.z.union([
|
|
605
|
+
var StringMatchSchema = zod.z.union([
|
|
841
606
|
/** Match against a string */
|
|
842
|
-
|
|
843
|
-
|
|
607
|
+
zod.z.array(zod.z.string()),
|
|
608
|
+
zod.z.array(zod.z.union(stringPatternMatchers))
|
|
844
609
|
]);
|
|
845
|
-
var HTTPMethodUnionSchema =
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
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")
|
|
853
618
|
]);
|
|
854
|
-
var RequestFilterSchema =
|
|
619
|
+
var RequestFilterSchema = zod.z.object({
|
|
855
620
|
/** An array of HTTP methods to match.
|
|
856
621
|
* For example, `["GET", "POST"]` will match both `GET` and `POST` Requests. */
|
|
857
|
-
method:
|
|
622
|
+
method: zod.z.array(HTTPMethodUnionSchema).optional(),
|
|
858
623
|
/** An object of header key/values to match.
|
|
859
624
|
* This uses the [EventFilter matching syntax](https://trigger.dev/docs/documentation/guides/event-filter).
|
|
860
625
|
|
|
@@ -866,7 +631,7 @@ var RequestFilterSchema = import_zod11.z.object({
|
|
|
866
631
|
},
|
|
867
632
|
},
|
|
868
633
|
``` */
|
|
869
|
-
headers:
|
|
634
|
+
headers: zod.z.record(StringMatchSchema).optional(),
|
|
870
635
|
/** An object of query parameters to match.
|
|
871
636
|
* This uses the [EventFilter matching syntax](https://trigger.dev/docs/documentation/guides/event-filter).
|
|
872
637
|
|
|
@@ -878,7 +643,7 @@ var RequestFilterSchema = import_zod11.z.object({
|
|
|
878
643
|
},
|
|
879
644
|
},
|
|
880
645
|
``` */
|
|
881
|
-
query:
|
|
646
|
+
query: zod.z.record(StringMatchSchema).optional(),
|
|
882
647
|
/** An object of key/values to match.
|
|
883
648
|
* This uses the [EventFilter matching syntax](https://trigger.dev/docs/documentation/guides/event-filter).
|
|
884
649
|
*/
|
|
@@ -888,304 +653,304 @@ var ResponseFilterSchema = RequestFilterSchema.omit({
|
|
|
888
653
|
method: true,
|
|
889
654
|
query: true
|
|
890
655
|
}).extend({
|
|
891
|
-
status:
|
|
656
|
+
status: zod.z.array(zod.z.number()).optional()
|
|
892
657
|
});
|
|
893
658
|
|
|
894
659
|
// src/schemas/api.ts
|
|
895
|
-
var UpdateTriggerSourceBodyV1Schema =
|
|
896
|
-
registeredEvents:
|
|
897
|
-
secret:
|
|
660
|
+
var UpdateTriggerSourceBodyV1Schema = zod.z.object({
|
|
661
|
+
registeredEvents: zod.z.array(zod.z.string()),
|
|
662
|
+
secret: zod.z.string().optional(),
|
|
898
663
|
data: SerializableJsonSchema.optional()
|
|
899
664
|
});
|
|
900
|
-
var UpdateTriggerSourceBodyV2Schema =
|
|
901
|
-
secret:
|
|
665
|
+
var UpdateTriggerSourceBodyV2Schema = zod.z.object({
|
|
666
|
+
secret: zod.z.string().optional(),
|
|
902
667
|
data: SerializableJsonSchema.optional(),
|
|
903
|
-
options:
|
|
904
|
-
event:
|
|
905
|
-
}).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())
|
|
906
671
|
});
|
|
907
|
-
var UpdateWebhookBodySchema =
|
|
908
|
-
|
|
909
|
-
active:
|
|
672
|
+
var UpdateWebhookBodySchema = zod.z.discriminatedUnion("active", [
|
|
673
|
+
zod.z.object({
|
|
674
|
+
active: zod.z.literal(false)
|
|
910
675
|
}),
|
|
911
|
-
|
|
912
|
-
active:
|
|
913
|
-
config:
|
|
676
|
+
zod.z.object({
|
|
677
|
+
active: zod.z.literal(true),
|
|
678
|
+
config: zod.z.record(zod.z.string().array())
|
|
914
679
|
})
|
|
915
680
|
]);
|
|
916
|
-
var RegisterHTTPTriggerSourceBodySchema =
|
|
917
|
-
type:
|
|
918
|
-
url:
|
|
681
|
+
var RegisterHTTPTriggerSourceBodySchema = zod.z.object({
|
|
682
|
+
type: zod.z.literal("HTTP"),
|
|
683
|
+
url: zod.z.string().url()
|
|
919
684
|
});
|
|
920
|
-
var RegisterSMTPTriggerSourceBodySchema =
|
|
921
|
-
type:
|
|
685
|
+
var RegisterSMTPTriggerSourceBodySchema = zod.z.object({
|
|
686
|
+
type: zod.z.literal("SMTP")
|
|
922
687
|
});
|
|
923
|
-
var RegisterSQSTriggerSourceBodySchema =
|
|
924
|
-
type:
|
|
688
|
+
var RegisterSQSTriggerSourceBodySchema = zod.z.object({
|
|
689
|
+
type: zod.z.literal("SQS")
|
|
925
690
|
});
|
|
926
|
-
var RegisterSourceChannelBodySchema =
|
|
691
|
+
var RegisterSourceChannelBodySchema = zod.z.discriminatedUnion("type", [
|
|
927
692
|
RegisterHTTPTriggerSourceBodySchema,
|
|
928
693
|
RegisterSMTPTriggerSourceBodySchema,
|
|
929
694
|
RegisterSQSTriggerSourceBodySchema
|
|
930
695
|
]);
|
|
931
696
|
var REGISTER_WEBHOOK = "dev.trigger.webhook.register";
|
|
932
697
|
var DELIVER_WEBHOOK_REQUEST = "dev.trigger.webhook.deliver";
|
|
933
|
-
var RegisterWebhookSourceSchema =
|
|
934
|
-
key:
|
|
935
|
-
params:
|
|
936
|
-
config:
|
|
937
|
-
active:
|
|
938
|
-
secret:
|
|
939
|
-
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(),
|
|
940
705
|
data: DeserializedJsonSchema.optional(),
|
|
941
|
-
clientId:
|
|
942
|
-
});
|
|
943
|
-
var RegisterWebhookPayloadSchema =
|
|
944
|
-
active:
|
|
945
|
-
params:
|
|
946
|
-
config:
|
|
947
|
-
current:
|
|
948
|
-
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())
|
|
949
714
|
}),
|
|
950
715
|
// from HTTP Endpoint
|
|
951
|
-
url:
|
|
952
|
-
secret:
|
|
716
|
+
url: zod.z.string(),
|
|
717
|
+
secret: zod.z.string()
|
|
953
718
|
});
|
|
954
719
|
var REGISTER_SOURCE_EVENT_V1 = "dev.trigger.source.register";
|
|
955
720
|
var REGISTER_SOURCE_EVENT_V2 = "dev.trigger.source.register.v2";
|
|
956
|
-
var RegisterTriggerSourceSchema =
|
|
957
|
-
key:
|
|
958
|
-
params:
|
|
959
|
-
active:
|
|
960
|
-
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(),
|
|
961
726
|
data: DeserializedJsonSchema.optional(),
|
|
962
727
|
channel: RegisterSourceChannelBodySchema,
|
|
963
|
-
clientId:
|
|
728
|
+
clientId: zod.z.string().optional()
|
|
964
729
|
});
|
|
965
|
-
|
|
966
|
-
name:
|
|
967
|
-
value:
|
|
730
|
+
zod.z.object({
|
|
731
|
+
name: zod.z.string(),
|
|
732
|
+
value: zod.z.string()
|
|
968
733
|
});
|
|
969
|
-
var RegisterSourceEventSchemaV1 =
|
|
734
|
+
var RegisterSourceEventSchemaV1 = zod.z.object({
|
|
970
735
|
/** The id of the source */
|
|
971
|
-
id:
|
|
736
|
+
id: zod.z.string(),
|
|
972
737
|
source: RegisterTriggerSourceSchema,
|
|
973
|
-
events:
|
|
974
|
-
missingEvents:
|
|
975
|
-
orphanedEvents:
|
|
976
|
-
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()
|
|
977
742
|
});
|
|
978
|
-
var RegisteredOptionsDiffSchema =
|
|
979
|
-
desired:
|
|
980
|
-
missing:
|
|
981
|
-
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())
|
|
982
747
|
});
|
|
983
|
-
var RegisterSourceEventOptionsSchema =
|
|
748
|
+
var RegisterSourceEventOptionsSchema = zod.z.object({
|
|
984
749
|
event: RegisteredOptionsDiffSchema
|
|
985
|
-
}).and(
|
|
986
|
-
var RegisterSourceEventSchemaV2 =
|
|
750
|
+
}).and(zod.z.record(zod.z.string(), RegisteredOptionsDiffSchema));
|
|
751
|
+
var RegisterSourceEventSchemaV2 = zod.z.object({
|
|
987
752
|
/** The id of the source */
|
|
988
|
-
id:
|
|
753
|
+
id: zod.z.string(),
|
|
989
754
|
source: RegisterTriggerSourceSchema,
|
|
990
755
|
options: RegisterSourceEventOptionsSchema,
|
|
991
|
-
dynamicTriggerId:
|
|
756
|
+
dynamicTriggerId: zod.z.string().optional()
|
|
992
757
|
});
|
|
993
|
-
var TriggerSourceSchema =
|
|
994
|
-
id:
|
|
995
|
-
key:
|
|
758
|
+
var TriggerSourceSchema = zod.z.object({
|
|
759
|
+
id: zod.z.string(),
|
|
760
|
+
key: zod.z.string()
|
|
996
761
|
});
|
|
997
762
|
var HttpSourceResponseMetadataSchema = DeserializedJsonSchema;
|
|
998
|
-
var HandleTriggerSourceSchema =
|
|
999
|
-
key:
|
|
1000
|
-
secret:
|
|
1001
|
-
data:
|
|
1002
|
-
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(),
|
|
1003
768
|
auth: ConnectionAuthSchema.optional(),
|
|
1004
769
|
metadata: HttpSourceResponseMetadataSchema.optional()
|
|
1005
770
|
});
|
|
1006
|
-
var HttpSourceRequestHeadersSchema =
|
|
1007
|
-
"x-ts-key":
|
|
1008
|
-
"x-ts-dynamic-id":
|
|
1009
|
-
"x-ts-secret":
|
|
1010
|
-
"x-ts-data":
|
|
1011
|
-
"x-ts-params":
|
|
1012
|
-
"x-ts-http-url":
|
|
1013
|
-
"x-ts-http-method":
|
|
1014
|
-
"x-ts-http-headers":
|
|
1015
|
-
"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) => {
|
|
1016
781
|
if (s === void 0)
|
|
1017
782
|
return;
|
|
1018
783
|
const json = JSON.parse(s);
|
|
1019
784
|
return ConnectionAuthSchema.parse(json);
|
|
1020
785
|
}),
|
|
1021
|
-
"x-ts-metadata":
|
|
786
|
+
"x-ts-metadata": zod.z.string().optional().transform((s) => {
|
|
1022
787
|
if (s === void 0)
|
|
1023
788
|
return;
|
|
1024
789
|
const json = JSON.parse(s);
|
|
1025
790
|
return DeserializedJsonSchema.parse(json);
|
|
1026
791
|
})
|
|
1027
792
|
});
|
|
1028
|
-
var HttpEndpointRequestHeadersSchema =
|
|
1029
|
-
"x-ts-key":
|
|
1030
|
-
"x-ts-http-url":
|
|
1031
|
-
"x-ts-http-method":
|
|
1032
|
-
"x-ts-http-headers":
|
|
1033
|
-
});
|
|
1034
|
-
var WebhookSourceRequestHeadersSchema =
|
|
1035
|
-
"x-ts-key":
|
|
1036
|
-
"x-ts-dynamic-id":
|
|
1037
|
-
"x-ts-secret":
|
|
1038
|
-
"x-ts-params":
|
|
1039
|
-
"x-ts-http-url":
|
|
1040
|
-
"x-ts-http-method":
|
|
1041
|
-
"x-ts-http-headers":
|
|
1042
|
-
});
|
|
1043
|
-
var PongSuccessResponseSchema =
|
|
1044
|
-
ok:
|
|
1045
|
-
triggerVersion:
|
|
1046
|
-
triggerSdkVersion:
|
|
1047
|
-
});
|
|
1048
|
-
var PongErrorResponseSchema =
|
|
1049
|
-
ok:
|
|
1050
|
-
error:
|
|
1051
|
-
triggerVersion:
|
|
1052
|
-
triggerSdkVersion:
|
|
1053
|
-
});
|
|
1054
|
-
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", [
|
|
1055
820
|
PongSuccessResponseSchema,
|
|
1056
821
|
PongErrorResponseSchema
|
|
1057
822
|
]);
|
|
1058
|
-
var ValidateSuccessResponseSchema =
|
|
1059
|
-
ok:
|
|
1060
|
-
endpointId:
|
|
1061
|
-
triggerVersion:
|
|
823
|
+
var ValidateSuccessResponseSchema = zod.z.object({
|
|
824
|
+
ok: zod.z.literal(true),
|
|
825
|
+
endpointId: zod.z.string(),
|
|
826
|
+
triggerVersion: zod.z.string().optional()
|
|
1062
827
|
});
|
|
1063
|
-
var ValidateErrorResponseSchema =
|
|
1064
|
-
ok:
|
|
1065
|
-
error:
|
|
1066
|
-
triggerVersion:
|
|
828
|
+
var ValidateErrorResponseSchema = zod.z.object({
|
|
829
|
+
ok: zod.z.literal(false),
|
|
830
|
+
error: zod.z.string(),
|
|
831
|
+
triggerVersion: zod.z.string().optional()
|
|
1067
832
|
});
|
|
1068
|
-
var ValidateResponseSchema =
|
|
833
|
+
var ValidateResponseSchema = zod.z.discriminatedUnion("ok", [
|
|
1069
834
|
ValidateSuccessResponseSchema,
|
|
1070
835
|
ValidateErrorResponseSchema
|
|
1071
836
|
]);
|
|
1072
|
-
var QueueOptionsSchema =
|
|
1073
|
-
name:
|
|
1074
|
-
maxConcurrent:
|
|
1075
|
-
});
|
|
1076
|
-
var ConcurrencyLimitOptionsSchema =
|
|
1077
|
-
id:
|
|
1078
|
-
limit:
|
|
1079
|
-
});
|
|
1080
|
-
var JobMetadataSchema =
|
|
1081
|
-
id:
|
|
1082
|
-
name:
|
|
1083
|
-
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(),
|
|
1084
849
|
event: EventSpecificationSchema,
|
|
1085
850
|
trigger: TriggerMetadataSchema,
|
|
1086
|
-
integrations:
|
|
1087
|
-
internal:
|
|
1088
|
-
enabled:
|
|
1089
|
-
startPosition:
|
|
851
|
+
integrations: zod.z.record(IntegrationConfigSchema),
|
|
852
|
+
internal: zod.z.boolean().default(false),
|
|
853
|
+
enabled: zod.z.boolean(),
|
|
854
|
+
startPosition: zod.z.enum([
|
|
1090
855
|
"initial",
|
|
1091
856
|
"latest"
|
|
1092
857
|
]),
|
|
1093
|
-
preprocessRuns:
|
|
1094
|
-
concurrencyLimit: ConcurrencyLimitOptionsSchema.or(
|
|
858
|
+
preprocessRuns: zod.z.boolean(),
|
|
859
|
+
concurrencyLimit: ConcurrencyLimitOptionsSchema.or(zod.z.number().int().positive()).optional()
|
|
1095
860
|
});
|
|
1096
|
-
var SourceMetadataV1Schema =
|
|
1097
|
-
version:
|
|
1098
|
-
channel:
|
|
861
|
+
var SourceMetadataV1Schema = zod.z.object({
|
|
862
|
+
version: zod.z.literal("1"),
|
|
863
|
+
channel: zod.z.enum([
|
|
1099
864
|
"HTTP",
|
|
1100
865
|
"SQS",
|
|
1101
866
|
"SMTP"
|
|
1102
867
|
]),
|
|
1103
868
|
integration: IntegrationConfigSchema,
|
|
1104
|
-
key:
|
|
1105
|
-
params:
|
|
1106
|
-
events:
|
|
1107
|
-
registerSourceJob:
|
|
1108
|
-
id:
|
|
1109
|
-
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()
|
|
1110
875
|
}).optional()
|
|
1111
876
|
});
|
|
1112
|
-
var SourceMetadataV2Schema =
|
|
1113
|
-
version:
|
|
1114
|
-
channel:
|
|
877
|
+
var SourceMetadataV2Schema = zod.z.object({
|
|
878
|
+
version: zod.z.literal("2"),
|
|
879
|
+
channel: zod.z.enum([
|
|
1115
880
|
"HTTP",
|
|
1116
881
|
"SQS",
|
|
1117
882
|
"SMTP"
|
|
1118
883
|
]),
|
|
1119
884
|
integration: IntegrationConfigSchema,
|
|
1120
|
-
key:
|
|
1121
|
-
params:
|
|
1122
|
-
options:
|
|
1123
|
-
registerSourceJob:
|
|
1124
|
-
id:
|
|
1125
|
-
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()
|
|
1126
891
|
}).optional()
|
|
1127
892
|
});
|
|
1128
|
-
var SourceMetadataSchema =
|
|
893
|
+
var SourceMetadataSchema = zod.z.preprocess(addMissingVersionField, zod.z.discriminatedUnion("version", [
|
|
1129
894
|
SourceMetadataV1Schema,
|
|
1130
895
|
SourceMetadataV2Schema
|
|
1131
896
|
]));
|
|
1132
|
-
var WebhookMetadataSchema =
|
|
1133
|
-
key:
|
|
1134
|
-
params:
|
|
1135
|
-
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())),
|
|
1136
901
|
integration: IntegrationConfigSchema,
|
|
1137
|
-
httpEndpoint:
|
|
1138
|
-
id:
|
|
902
|
+
httpEndpoint: zod.z.object({
|
|
903
|
+
id: zod.z.string()
|
|
1139
904
|
})
|
|
1140
905
|
});
|
|
1141
|
-
var WebhookContextMetadataSchema =
|
|
1142
|
-
params:
|
|
1143
|
-
config:
|
|
1144
|
-
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()
|
|
1145
910
|
});
|
|
1146
|
-
var DynamicTriggerEndpointMetadataSchema =
|
|
1147
|
-
id:
|
|
1148
|
-
jobs:
|
|
911
|
+
var DynamicTriggerEndpointMetadataSchema = zod.z.object({
|
|
912
|
+
id: zod.z.string(),
|
|
913
|
+
jobs: zod.z.array(JobMetadataSchema.pick({
|
|
1149
914
|
id: true,
|
|
1150
915
|
version: true
|
|
1151
916
|
})),
|
|
1152
|
-
registerSourceJob:
|
|
1153
|
-
id:
|
|
1154
|
-
version:
|
|
917
|
+
registerSourceJob: zod.z.object({
|
|
918
|
+
id: zod.z.string(),
|
|
919
|
+
version: zod.z.string()
|
|
1155
920
|
}).optional()
|
|
1156
921
|
});
|
|
1157
|
-
var HttpEndpointMetadataSchema =
|
|
1158
|
-
id:
|
|
1159
|
-
version:
|
|
1160
|
-
enabled:
|
|
1161
|
-
title:
|
|
1162
|
-
icon:
|
|
1163
|
-
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(),
|
|
1164
929
|
event: EventSpecificationSchema,
|
|
1165
930
|
immediateResponseFilter: RequestFilterSchema.optional(),
|
|
1166
|
-
skipTriggeringRuns:
|
|
1167
|
-
source:
|
|
1168
|
-
});
|
|
1169
|
-
var IndexEndpointResponseSchema =
|
|
1170
|
-
jobs:
|
|
1171
|
-
sources:
|
|
1172
|
-
webhooks:
|
|
1173
|
-
dynamicTriggers:
|
|
1174
|
-
dynamicSchedules:
|
|
1175
|
-
httpEndpoints:
|
|
1176
|
-
});
|
|
1177
|
-
var EndpointIndexErrorSchema =
|
|
1178
|
-
message:
|
|
1179
|
-
raw:
|
|
1180
|
-
});
|
|
1181
|
-
var IndexEndpointStatsSchema =
|
|
1182
|
-
jobs:
|
|
1183
|
-
sources:
|
|
1184
|
-
webhooks:
|
|
1185
|
-
dynamicTriggers:
|
|
1186
|
-
dynamicSchedules:
|
|
1187
|
-
disabledJobs:
|
|
1188
|
-
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)
|
|
1189
954
|
});
|
|
1190
955
|
function parseEndpointIndexStats(stats) {
|
|
1191
956
|
if (stats === null || stats === void 0) {
|
|
@@ -1194,227 +959,227 @@ function parseEndpointIndexStats(stats) {
|
|
|
1194
959
|
return IndexEndpointStatsSchema.parse(stats);
|
|
1195
960
|
}
|
|
1196
961
|
__name(parseEndpointIndexStats, "parseEndpointIndexStats");
|
|
1197
|
-
var GetEndpointIndexResponseSchema =
|
|
1198
|
-
|
|
1199
|
-
status:
|
|
1200
|
-
updatedAt:
|
|
962
|
+
var GetEndpointIndexResponseSchema = zod.z.discriminatedUnion("status", [
|
|
963
|
+
zod.z.object({
|
|
964
|
+
status: zod.z.literal("PENDING"),
|
|
965
|
+
updatedAt: zod.z.coerce.date()
|
|
1201
966
|
}),
|
|
1202
|
-
|
|
1203
|
-
status:
|
|
1204
|
-
updatedAt:
|
|
967
|
+
zod.z.object({
|
|
968
|
+
status: zod.z.literal("STARTED"),
|
|
969
|
+
updatedAt: zod.z.coerce.date()
|
|
1205
970
|
}),
|
|
1206
|
-
|
|
1207
|
-
status:
|
|
971
|
+
zod.z.object({
|
|
972
|
+
status: zod.z.literal("SUCCESS"),
|
|
1208
973
|
stats: IndexEndpointStatsSchema,
|
|
1209
|
-
updatedAt:
|
|
974
|
+
updatedAt: zod.z.coerce.date()
|
|
1210
975
|
}),
|
|
1211
|
-
|
|
1212
|
-
status:
|
|
976
|
+
zod.z.object({
|
|
977
|
+
status: zod.z.literal("FAILURE"),
|
|
1213
978
|
error: EndpointIndexErrorSchema,
|
|
1214
|
-
updatedAt:
|
|
979
|
+
updatedAt: zod.z.coerce.date()
|
|
1215
980
|
})
|
|
1216
981
|
]);
|
|
1217
|
-
var EndpointHeadersSchema =
|
|
1218
|
-
"trigger-version":
|
|
1219
|
-
"trigger-sdk-version":
|
|
982
|
+
var EndpointHeadersSchema = zod.z.object({
|
|
983
|
+
"trigger-version": zod.z.string().optional(),
|
|
984
|
+
"trigger-sdk-version": zod.z.string().optional()
|
|
1220
985
|
});
|
|
1221
|
-
var ExecuteJobRunMetadataSchema =
|
|
1222
|
-
successSubscription:
|
|
1223
|
-
failedSubscription:
|
|
986
|
+
var ExecuteJobRunMetadataSchema = zod.z.object({
|
|
987
|
+
successSubscription: zod.z.boolean().optional(),
|
|
988
|
+
failedSubscription: zod.z.boolean().optional()
|
|
1224
989
|
});
|
|
1225
990
|
var ExecuteJobHeadersSchema = EndpointHeadersSchema.extend({
|
|
1226
|
-
"x-trigger-run-metadata":
|
|
991
|
+
"x-trigger-run-metadata": zod.z.preprocess((val) => typeof val === "string" && JSON.parse(val), ExecuteJobRunMetadataSchema).optional()
|
|
1227
992
|
});
|
|
1228
|
-
var RawEventSchema =
|
|
993
|
+
var RawEventSchema = zod.z.object({
|
|
1229
994
|
/** The `name` property must exactly match any subscriptions you want to
|
|
1230
995
|
trigger. */
|
|
1231
|
-
name:
|
|
996
|
+
name: zod.z.string(),
|
|
1232
997
|
/** The `payload` property will be sent to any matching Jobs and will appear
|
|
1233
998
|
as the `payload` param of the `run()` function. You can leave this
|
|
1234
999
|
parameter out if you just want to trigger a Job without any input data. */
|
|
1235
|
-
payload:
|
|
1000
|
+
payload: zod.z.any(),
|
|
1236
1001
|
/** The optional `context` property will be sent to any matching Jobs and will
|
|
1237
1002
|
be passed through as the `context.event.context` param of the `run()`
|
|
1238
1003
|
function. This is optional but can be useful if you want to pass through
|
|
1239
1004
|
some additional context to the Job. */
|
|
1240
|
-
context:
|
|
1005
|
+
context: zod.z.any().optional(),
|
|
1241
1006
|
/** The `id` property uniquely identify this particular event. If unset it
|
|
1242
1007
|
will be set automatically using `ulid`. */
|
|
1243
|
-
id:
|
|
1008
|
+
id: zod.z.string().default(() => ulidx.ulid()),
|
|
1244
1009
|
/** This is optional, it defaults to the current timestamp. Usually you would
|
|
1245
1010
|
only set this if you have a timestamp that you wish to pass through, e.g.
|
|
1246
1011
|
you receive a timestamp from a service and you want the same timestamp to
|
|
1247
1012
|
be used in your Job. */
|
|
1248
|
-
timestamp:
|
|
1013
|
+
timestamp: zod.z.coerce.date().optional(),
|
|
1249
1014
|
/** This is optional, it defaults to "trigger.dev". It can be useful to set
|
|
1250
1015
|
this as you can filter events using this in the `eventTrigger()`. */
|
|
1251
|
-
source:
|
|
1016
|
+
source: zod.z.string().optional(),
|
|
1252
1017
|
/** This is optional, it defaults to "JSON". If your event is actually a request,
|
|
1253
1018
|
with a url, headers, method and rawBody you can use "REQUEST" */
|
|
1254
|
-
payloadType:
|
|
1255
|
-
|
|
1256
|
-
|
|
1019
|
+
payloadType: zod.z.union([
|
|
1020
|
+
zod.z.literal("JSON"),
|
|
1021
|
+
zod.z.literal("REQUEST")
|
|
1257
1022
|
]).optional()
|
|
1258
1023
|
});
|
|
1259
|
-
var ApiEventLogSchema =
|
|
1024
|
+
var ApiEventLogSchema = zod.z.object({
|
|
1260
1025
|
/** The `id` of the event that was sent.
|
|
1261
1026
|
*/
|
|
1262
|
-
id:
|
|
1027
|
+
id: zod.z.string(),
|
|
1263
1028
|
/** The `name` of the event that was sent. */
|
|
1264
|
-
name:
|
|
1029
|
+
name: zod.z.string(),
|
|
1265
1030
|
/** The `payload` of the event that was sent */
|
|
1266
1031
|
payload: DeserializedJsonSchema,
|
|
1267
1032
|
/** The `context` of the event that was sent. Is `undefined` if no context was
|
|
1268
1033
|
set when sending the event. */
|
|
1269
1034
|
context: DeserializedJsonSchema.optional().nullable(),
|
|
1270
1035
|
/** The `timestamp` of the event that was sent */
|
|
1271
|
-
timestamp:
|
|
1036
|
+
timestamp: zod.z.coerce.date(),
|
|
1272
1037
|
/** The timestamp when the event will be delivered to any matching Jobs. Is
|
|
1273
1038
|
`undefined` if `deliverAt` or `deliverAfter` wasn't set when sending the
|
|
1274
1039
|
event. */
|
|
1275
|
-
deliverAt:
|
|
1040
|
+
deliverAt: zod.z.coerce.date().optional().nullable(),
|
|
1276
1041
|
/** The timestamp when the event was delivered. Is `undefined` if `deliverAt`
|
|
1277
1042
|
or `deliverAfter` were set when sending the event. */
|
|
1278
|
-
deliveredAt:
|
|
1043
|
+
deliveredAt: zod.z.coerce.date().optional().nullable(),
|
|
1279
1044
|
/** The timestamp when the event was cancelled. Is `undefined` if the event
|
|
1280
1045
|
* wasn't cancelled. */
|
|
1281
|
-
cancelledAt:
|
|
1046
|
+
cancelledAt: zod.z.coerce.date().optional().nullable()
|
|
1282
1047
|
});
|
|
1283
|
-
var SendEventOptionsSchema =
|
|
1048
|
+
var SendEventOptionsSchema = zod.z.object({
|
|
1284
1049
|
/** An optional Date when you want the event to trigger Jobs. The event will
|
|
1285
1050
|
be sent to the platform immediately but won't be acted upon until the
|
|
1286
1051
|
specified time. */
|
|
1287
|
-
deliverAt:
|
|
1052
|
+
deliverAt: zod.z.coerce.date().optional(),
|
|
1288
1053
|
/** An optional number of seconds you want to wait for the event to trigger
|
|
1289
1054
|
any relevant Jobs. The event will be sent to the platform immediately but
|
|
1290
1055
|
won't be delivered until after the elapsed number of seconds. */
|
|
1291
|
-
deliverAfter:
|
|
1056
|
+
deliverAfter: zod.z.number().int().optional(),
|
|
1292
1057
|
/** This optional param will be used by Trigger.dev Connect, which
|
|
1293
1058
|
is coming soon. */
|
|
1294
|
-
accountId:
|
|
1059
|
+
accountId: zod.z.string().optional()
|
|
1295
1060
|
});
|
|
1296
|
-
var SendEventBodySchema =
|
|
1061
|
+
var SendEventBodySchema = zod.z.object({
|
|
1297
1062
|
event: RawEventSchema,
|
|
1298
1063
|
options: SendEventOptionsSchema.optional()
|
|
1299
1064
|
});
|
|
1300
|
-
var SendBulkEventsBodySchema =
|
|
1065
|
+
var SendBulkEventsBodySchema = zod.z.object({
|
|
1301
1066
|
events: RawEventSchema.array(),
|
|
1302
1067
|
options: SendEventOptionsSchema.optional()
|
|
1303
1068
|
});
|
|
1304
|
-
var DeliverEventResponseSchema =
|
|
1305
|
-
deliveredAt:
|
|
1069
|
+
var DeliverEventResponseSchema = zod.z.object({
|
|
1070
|
+
deliveredAt: zod.z.string().datetime()
|
|
1306
1071
|
});
|
|
1307
|
-
var RuntimeEnvironmentTypeSchema =
|
|
1072
|
+
var RuntimeEnvironmentTypeSchema = zod.z.enum([
|
|
1308
1073
|
"PRODUCTION",
|
|
1309
1074
|
"STAGING",
|
|
1310
1075
|
"DEVELOPMENT",
|
|
1311
1076
|
"PREVIEW"
|
|
1312
1077
|
]);
|
|
1313
|
-
var RunSourceContextSchema =
|
|
1314
|
-
id:
|
|
1315
|
-
metadata:
|
|
1078
|
+
var RunSourceContextSchema = zod.z.object({
|
|
1079
|
+
id: zod.z.string(),
|
|
1080
|
+
metadata: zod.z.any()
|
|
1316
1081
|
});
|
|
1317
|
-
var AutoYieldConfigSchema =
|
|
1318
|
-
startTaskThreshold:
|
|
1319
|
-
beforeExecuteTaskThreshold:
|
|
1320
|
-
beforeCompleteTaskThreshold:
|
|
1321
|
-
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()
|
|
1322
1087
|
});
|
|
1323
|
-
var RunJobBodySchema =
|
|
1088
|
+
var RunJobBodySchema = zod.z.object({
|
|
1324
1089
|
event: ApiEventLogSchema,
|
|
1325
|
-
job:
|
|
1326
|
-
id:
|
|
1327
|
-
version:
|
|
1090
|
+
job: zod.z.object({
|
|
1091
|
+
id: zod.z.string(),
|
|
1092
|
+
version: zod.z.string()
|
|
1328
1093
|
}),
|
|
1329
|
-
run:
|
|
1330
|
-
id:
|
|
1331
|
-
isTest:
|
|
1332
|
-
isRetry:
|
|
1333
|
-
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()
|
|
1334
1099
|
}),
|
|
1335
|
-
environment:
|
|
1336
|
-
id:
|
|
1337
|
-
slug:
|
|
1100
|
+
environment: zod.z.object({
|
|
1101
|
+
id: zod.z.string(),
|
|
1102
|
+
slug: zod.z.string(),
|
|
1338
1103
|
type: RuntimeEnvironmentTypeSchema
|
|
1339
1104
|
}),
|
|
1340
|
-
organization:
|
|
1341
|
-
id:
|
|
1342
|
-
title:
|
|
1343
|
-
slug:
|
|
1105
|
+
organization: zod.z.object({
|
|
1106
|
+
id: zod.z.string(),
|
|
1107
|
+
title: zod.z.string(),
|
|
1108
|
+
slug: zod.z.string()
|
|
1344
1109
|
}),
|
|
1345
|
-
project:
|
|
1346
|
-
id:
|
|
1347
|
-
name:
|
|
1348
|
-
slug:
|
|
1110
|
+
project: zod.z.object({
|
|
1111
|
+
id: zod.z.string(),
|
|
1112
|
+
name: zod.z.string(),
|
|
1113
|
+
slug: zod.z.string()
|
|
1349
1114
|
}).optional(),
|
|
1350
|
-
account:
|
|
1351
|
-
id:
|
|
1352
|
-
metadata:
|
|
1115
|
+
account: zod.z.object({
|
|
1116
|
+
id: zod.z.string(),
|
|
1117
|
+
metadata: zod.z.any()
|
|
1353
1118
|
}).optional(),
|
|
1354
1119
|
source: RunSourceContextSchema.optional(),
|
|
1355
|
-
tasks:
|
|
1356
|
-
cachedTaskCursor:
|
|
1357
|
-
noopTasksSet:
|
|
1358
|
-
connections:
|
|
1359
|
-
yieldedExecutions:
|
|
1360
|
-
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(),
|
|
1361
1126
|
autoYieldConfig: AutoYieldConfigSchema.optional()
|
|
1362
1127
|
});
|
|
1363
|
-
var RunJobErrorSchema =
|
|
1364
|
-
status:
|
|
1128
|
+
var RunJobErrorSchema = zod.z.object({
|
|
1129
|
+
status: zod.z.literal("ERROR"),
|
|
1365
1130
|
error: ErrorWithStackSchema,
|
|
1366
1131
|
task: TaskSchema.optional()
|
|
1367
1132
|
});
|
|
1368
|
-
var RunJobYieldExecutionErrorSchema =
|
|
1369
|
-
status:
|
|
1370
|
-
key:
|
|
1133
|
+
var RunJobYieldExecutionErrorSchema = zod.z.object({
|
|
1134
|
+
status: zod.z.literal("YIELD_EXECUTION"),
|
|
1135
|
+
key: zod.z.string()
|
|
1371
1136
|
});
|
|
1372
|
-
var AutoYieldMetadataSchema =
|
|
1373
|
-
location:
|
|
1374
|
-
timeRemaining:
|
|
1375
|
-
timeElapsed:
|
|
1376
|
-
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()
|
|
1377
1142
|
});
|
|
1378
1143
|
var RunJobAutoYieldExecutionErrorSchema = AutoYieldMetadataSchema.extend({
|
|
1379
|
-
status:
|
|
1144
|
+
status: zod.z.literal("AUTO_YIELD_EXECUTION")
|
|
1380
1145
|
});
|
|
1381
|
-
var RunJobAutoYieldWithCompletedTaskExecutionErrorSchema =
|
|
1382
|
-
status:
|
|
1383
|
-
id:
|
|
1384
|
-
properties:
|
|
1385
|
-
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(),
|
|
1386
1151
|
data: AutoYieldMetadataSchema
|
|
1387
1152
|
});
|
|
1388
|
-
var RunJobInvalidPayloadErrorSchema =
|
|
1389
|
-
status:
|
|
1390
|
-
errors:
|
|
1153
|
+
var RunJobInvalidPayloadErrorSchema = zod.z.object({
|
|
1154
|
+
status: zod.z.literal("INVALID_PAYLOAD"),
|
|
1155
|
+
errors: zod.z.array(SchemaErrorSchema)
|
|
1391
1156
|
});
|
|
1392
|
-
var RunJobUnresolvedAuthErrorSchema =
|
|
1393
|
-
status:
|
|
1394
|
-
issues:
|
|
1395
|
-
id:
|
|
1396
|
-
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()
|
|
1397
1162
|
}))
|
|
1398
1163
|
});
|
|
1399
|
-
var RunJobResumeWithTaskSchema =
|
|
1400
|
-
status:
|
|
1164
|
+
var RunJobResumeWithTaskSchema = zod.z.object({
|
|
1165
|
+
status: zod.z.literal("RESUME_WITH_TASK"),
|
|
1401
1166
|
task: TaskSchema
|
|
1402
1167
|
});
|
|
1403
|
-
var RunJobRetryWithTaskSchema =
|
|
1404
|
-
status:
|
|
1168
|
+
var RunJobRetryWithTaskSchema = zod.z.object({
|
|
1169
|
+
status: zod.z.literal("RETRY_WITH_TASK"),
|
|
1405
1170
|
task: TaskSchema,
|
|
1406
1171
|
error: ErrorWithStackSchema,
|
|
1407
|
-
retryAt:
|
|
1172
|
+
retryAt: zod.z.coerce.date()
|
|
1408
1173
|
});
|
|
1409
|
-
var RunJobCanceledWithTaskSchema =
|
|
1410
|
-
status:
|
|
1174
|
+
var RunJobCanceledWithTaskSchema = zod.z.object({
|
|
1175
|
+
status: zod.z.literal("CANCELED"),
|
|
1411
1176
|
task: TaskSchema
|
|
1412
1177
|
});
|
|
1413
|
-
var RunJobSuccessSchema =
|
|
1414
|
-
status:
|
|
1178
|
+
var RunJobSuccessSchema = zod.z.object({
|
|
1179
|
+
status: zod.z.literal("SUCCESS"),
|
|
1415
1180
|
output: DeserializedJsonSchema.optional()
|
|
1416
1181
|
});
|
|
1417
|
-
var RunJobErrorResponseSchema =
|
|
1182
|
+
var RunJobErrorResponseSchema = zod.z.union([
|
|
1418
1183
|
RunJobAutoYieldExecutionErrorSchema,
|
|
1419
1184
|
RunJobAutoYieldWithCompletedTaskExecutionErrorSchema,
|
|
1420
1185
|
RunJobYieldExecutionErrorSchema,
|
|
@@ -1425,12 +1190,12 @@ var RunJobErrorResponseSchema = import_zod12.z.union([
|
|
|
1425
1190
|
RunJobRetryWithTaskSchema,
|
|
1426
1191
|
RunJobCanceledWithTaskSchema
|
|
1427
1192
|
]);
|
|
1428
|
-
var RunJobResumeWithParallelTaskSchema =
|
|
1429
|
-
status:
|
|
1193
|
+
var RunJobResumeWithParallelTaskSchema = zod.z.object({
|
|
1194
|
+
status: zod.z.literal("RESUME_WITH_PARALLEL_TASK"),
|
|
1430
1195
|
task: TaskSchema,
|
|
1431
|
-
childErrors:
|
|
1196
|
+
childErrors: zod.z.array(RunJobErrorResponseSchema)
|
|
1432
1197
|
});
|
|
1433
|
-
var RunJobResponseSchema =
|
|
1198
|
+
var RunJobResponseSchema = zod.z.discriminatedUnion("status", [
|
|
1434
1199
|
RunJobAutoYieldExecutionErrorSchema,
|
|
1435
1200
|
RunJobAutoYieldWithCompletedTaskExecutionErrorSchema,
|
|
1436
1201
|
RunJobYieldExecutionErrorSchema,
|
|
@@ -1443,137 +1208,137 @@ var RunJobResponseSchema = import_zod12.z.discriminatedUnion("status", [
|
|
|
1443
1208
|
RunJobCanceledWithTaskSchema,
|
|
1444
1209
|
RunJobSuccessSchema
|
|
1445
1210
|
]);
|
|
1446
|
-
var PreprocessRunBodySchema =
|
|
1211
|
+
var PreprocessRunBodySchema = zod.z.object({
|
|
1447
1212
|
event: ApiEventLogSchema,
|
|
1448
|
-
job:
|
|
1449
|
-
id:
|
|
1450
|
-
version:
|
|
1213
|
+
job: zod.z.object({
|
|
1214
|
+
id: zod.z.string(),
|
|
1215
|
+
version: zod.z.string()
|
|
1451
1216
|
}),
|
|
1452
|
-
run:
|
|
1453
|
-
id:
|
|
1454
|
-
isTest:
|
|
1217
|
+
run: zod.z.object({
|
|
1218
|
+
id: zod.z.string(),
|
|
1219
|
+
isTest: zod.z.boolean()
|
|
1455
1220
|
}),
|
|
1456
|
-
environment:
|
|
1457
|
-
id:
|
|
1458
|
-
slug:
|
|
1221
|
+
environment: zod.z.object({
|
|
1222
|
+
id: zod.z.string(),
|
|
1223
|
+
slug: zod.z.string(),
|
|
1459
1224
|
type: RuntimeEnvironmentTypeSchema
|
|
1460
1225
|
}),
|
|
1461
|
-
organization:
|
|
1462
|
-
id:
|
|
1463
|
-
title:
|
|
1464
|
-
slug:
|
|
1226
|
+
organization: zod.z.object({
|
|
1227
|
+
id: zod.z.string(),
|
|
1228
|
+
title: zod.z.string(),
|
|
1229
|
+
slug: zod.z.string()
|
|
1465
1230
|
}),
|
|
1466
|
-
account:
|
|
1467
|
-
id:
|
|
1468
|
-
metadata:
|
|
1231
|
+
account: zod.z.object({
|
|
1232
|
+
id: zod.z.string(),
|
|
1233
|
+
metadata: zod.z.any()
|
|
1469
1234
|
}).optional()
|
|
1470
1235
|
});
|
|
1471
|
-
var PreprocessRunResponseSchema =
|
|
1472
|
-
abort:
|
|
1473
|
-
properties:
|
|
1236
|
+
var PreprocessRunResponseSchema = zod.z.object({
|
|
1237
|
+
abort: zod.z.boolean(),
|
|
1238
|
+
properties: zod.z.array(DisplayPropertySchema).optional()
|
|
1474
1239
|
});
|
|
1475
|
-
var CreateRunResponseOkSchema =
|
|
1476
|
-
ok:
|
|
1477
|
-
data:
|
|
1478
|
-
id:
|
|
1240
|
+
var CreateRunResponseOkSchema = zod.z.object({
|
|
1241
|
+
ok: zod.z.literal(true),
|
|
1242
|
+
data: zod.z.object({
|
|
1243
|
+
id: zod.z.string()
|
|
1479
1244
|
})
|
|
1480
1245
|
});
|
|
1481
|
-
var CreateRunResponseErrorSchema =
|
|
1482
|
-
ok:
|
|
1483
|
-
error:
|
|
1246
|
+
var CreateRunResponseErrorSchema = zod.z.object({
|
|
1247
|
+
ok: zod.z.literal(false),
|
|
1248
|
+
error: zod.z.string()
|
|
1484
1249
|
});
|
|
1485
|
-
var CreateRunResponseBodySchema =
|
|
1250
|
+
var CreateRunResponseBodySchema = zod.z.discriminatedUnion("ok", [
|
|
1486
1251
|
CreateRunResponseOkSchema,
|
|
1487
1252
|
CreateRunResponseErrorSchema
|
|
1488
1253
|
]);
|
|
1489
|
-
var RedactStringSchema =
|
|
1490
|
-
__redactedString:
|
|
1491
|
-
strings:
|
|
1492
|
-
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())
|
|
1493
1258
|
});
|
|
1494
|
-
var LogMessageSchema =
|
|
1495
|
-
level:
|
|
1259
|
+
var LogMessageSchema = zod.z.object({
|
|
1260
|
+
level: zod.z.enum([
|
|
1496
1261
|
"DEBUG",
|
|
1497
1262
|
"INFO",
|
|
1498
1263
|
"WARN",
|
|
1499
1264
|
"ERROR"
|
|
1500
1265
|
]),
|
|
1501
|
-
message:
|
|
1266
|
+
message: zod.z.string(),
|
|
1502
1267
|
data: SerializableJsonSchema.optional()
|
|
1503
1268
|
});
|
|
1504
|
-
var RedactSchema =
|
|
1505
|
-
paths:
|
|
1269
|
+
var RedactSchema = zod.z.object({
|
|
1270
|
+
paths: zod.z.array(zod.z.string())
|
|
1506
1271
|
});
|
|
1507
|
-
var RetryOptionsSchema =
|
|
1272
|
+
var RetryOptionsSchema = zod.z.object({
|
|
1508
1273
|
/** The maximum number of times to retry the request. */
|
|
1509
|
-
limit:
|
|
1274
|
+
limit: zod.z.number().optional(),
|
|
1510
1275
|
/** The exponential factor to use when calculating the next retry time. */
|
|
1511
|
-
factor:
|
|
1276
|
+
factor: zod.z.number().optional(),
|
|
1512
1277
|
/** The minimum amount of time to wait before retrying the request. */
|
|
1513
|
-
minTimeoutInMs:
|
|
1278
|
+
minTimeoutInMs: zod.z.number().optional(),
|
|
1514
1279
|
/** The maximum amount of time to wait before retrying the request. */
|
|
1515
|
-
maxTimeoutInMs:
|
|
1280
|
+
maxTimeoutInMs: zod.z.number().optional(),
|
|
1516
1281
|
/** Whether to randomize the retry time. */
|
|
1517
|
-
randomize:
|
|
1282
|
+
randomize: zod.z.boolean().optional()
|
|
1518
1283
|
});
|
|
1519
|
-
var RunTaskOptionsSchema =
|
|
1284
|
+
var RunTaskOptionsSchema = zod.z.object({
|
|
1520
1285
|
/** The name of the Task is required. This is displayed on the Task in the logs. */
|
|
1521
|
-
name:
|
|
1286
|
+
name: zod.z.string().optional(),
|
|
1522
1287
|
/** The Task will wait and only start at the specified Date */
|
|
1523
|
-
delayUntil:
|
|
1288
|
+
delayUntil: zod.z.coerce.date().optional(),
|
|
1524
1289
|
/** Retry options */
|
|
1525
1290
|
retry: RetryOptionsSchema.optional(),
|
|
1526
1291
|
/** The icon for the Task, it will appear in the logs.
|
|
1527
1292
|
* You can use the name of a company in lowercase, e.g. "github".
|
|
1528
1293
|
* Or any icon name that [Tabler Icons](https://tabler-icons.io/) supports. */
|
|
1529
|
-
icon:
|
|
1294
|
+
icon: zod.z.string().optional(),
|
|
1530
1295
|
/** The key for the Task that you want to appear in the logs */
|
|
1531
|
-
displayKey:
|
|
1296
|
+
displayKey: zod.z.string().optional(),
|
|
1532
1297
|
/** A description of the Task */
|
|
1533
|
-
description:
|
|
1298
|
+
description: zod.z.string().optional(),
|
|
1534
1299
|
/** Properties that are displayed in the logs */
|
|
1535
|
-
properties:
|
|
1300
|
+
properties: zod.z.array(DisplayPropertySchema).optional(),
|
|
1536
1301
|
/** The input params to the Task, will be displayed in the logs */
|
|
1537
|
-
params:
|
|
1302
|
+
params: zod.z.any(),
|
|
1538
1303
|
/** The style of the log entry. */
|
|
1539
1304
|
style: StyleSchema.optional(),
|
|
1540
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. */
|
|
1541
|
-
callback:
|
|
1306
|
+
callback: zod.z.object({
|
|
1542
1307
|
/** Causes the task to wait for and return the data of the first request sent to `task.callbackUrl`. */
|
|
1543
|
-
enabled:
|
|
1308
|
+
enabled: zod.z.boolean(),
|
|
1544
1309
|
/** Time to wait for the first request to `task.callbackUrl`. Default: One hour. */
|
|
1545
|
-
timeoutInSeconds:
|
|
1310
|
+
timeoutInSeconds: zod.z.number()
|
|
1546
1311
|
}).partial().optional(),
|
|
1547
1312
|
/** Allows you to link the Integration connection in the logs. This is handled automatically in integrations. */
|
|
1548
|
-
connectionKey:
|
|
1313
|
+
connectionKey: zod.z.string().optional(),
|
|
1549
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. */
|
|
1550
|
-
operation:
|
|
1315
|
+
operation: zod.z.enum([
|
|
1551
1316
|
"fetch",
|
|
1552
1317
|
"fetch-response",
|
|
1553
1318
|
"fetch-poll"
|
|
1554
1319
|
]).optional(),
|
|
1555
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). */
|
|
1556
|
-
noop:
|
|
1321
|
+
noop: zod.z.boolean().default(false),
|
|
1557
1322
|
redact: RedactSchema.optional(),
|
|
1558
|
-
parallel:
|
|
1323
|
+
parallel: zod.z.boolean().optional()
|
|
1559
1324
|
});
|
|
1560
1325
|
var RunTaskBodyInputSchema = RunTaskOptionsSchema.extend({
|
|
1561
|
-
idempotencyKey:
|
|
1562
|
-
parentId:
|
|
1326
|
+
idempotencyKey: zod.z.string(),
|
|
1327
|
+
parentId: zod.z.string().optional()
|
|
1563
1328
|
});
|
|
1564
1329
|
var RunTaskBodyOutputSchema = RunTaskBodyInputSchema.extend({
|
|
1565
|
-
properties:
|
|
1330
|
+
properties: zod.z.array(DisplayPropertySchema.partial()).optional(),
|
|
1566
1331
|
params: DeserializedJsonSchema.optional().nullable(),
|
|
1567
|
-
callback:
|
|
1568
|
-
enabled:
|
|
1569
|
-
timeoutInSeconds:
|
|
1332
|
+
callback: zod.z.object({
|
|
1333
|
+
enabled: zod.z.boolean(),
|
|
1334
|
+
timeoutInSeconds: zod.z.number().default(3600)
|
|
1570
1335
|
}).optional()
|
|
1571
1336
|
});
|
|
1572
|
-
var RunTaskResponseWithCachedTasksBodySchema =
|
|
1337
|
+
var RunTaskResponseWithCachedTasksBodySchema = zod.z.object({
|
|
1573
1338
|
task: ServerTaskSchema,
|
|
1574
|
-
cachedTasks:
|
|
1575
|
-
tasks:
|
|
1576
|
-
cursor:
|
|
1339
|
+
cachedTasks: zod.z.object({
|
|
1340
|
+
tasks: zod.z.array(CachedTaskSchema),
|
|
1341
|
+
cursor: zod.z.string().optional()
|
|
1577
1342
|
}).optional()
|
|
1578
1343
|
});
|
|
1579
1344
|
var CompleteTaskBodyInputSchema = RunTaskBodyInputSchema.pick({
|
|
@@ -1588,208 +1353,202 @@ var CompleteTaskBodyV2InputSchema = RunTaskBodyInputSchema.pick({
|
|
|
1588
1353
|
description: true,
|
|
1589
1354
|
params: true
|
|
1590
1355
|
}).extend({
|
|
1591
|
-
output:
|
|
1356
|
+
output: zod.z.string().optional()
|
|
1592
1357
|
});
|
|
1593
|
-
var FailTaskBodyInputSchema =
|
|
1358
|
+
var FailTaskBodyInputSchema = zod.z.object({
|
|
1594
1359
|
error: ErrorWithStackSchema
|
|
1595
1360
|
});
|
|
1596
|
-
var NormalizedRequestSchema =
|
|
1597
|
-
headers:
|
|
1598
|
-
method:
|
|
1599
|
-
query:
|
|
1600
|
-
url:
|
|
1601
|
-
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()
|
|
1602
1367
|
});
|
|
1603
|
-
var NormalizedResponseSchema =
|
|
1604
|
-
status:
|
|
1605
|
-
body:
|
|
1606
|
-
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()
|
|
1607
1372
|
});
|
|
1608
|
-
var HttpSourceResponseSchema =
|
|
1373
|
+
var HttpSourceResponseSchema = zod.z.object({
|
|
1609
1374
|
response: NormalizedResponseSchema,
|
|
1610
|
-
events:
|
|
1375
|
+
events: zod.z.array(RawEventSchema),
|
|
1611
1376
|
metadata: HttpSourceResponseMetadataSchema.optional()
|
|
1612
1377
|
});
|
|
1613
|
-
var WebhookDeliveryResponseSchema =
|
|
1378
|
+
var WebhookDeliveryResponseSchema = zod.z.object({
|
|
1614
1379
|
response: NormalizedResponseSchema,
|
|
1615
|
-
verified:
|
|
1616
|
-
error:
|
|
1380
|
+
verified: zod.z.boolean(),
|
|
1381
|
+
error: zod.z.string().optional()
|
|
1617
1382
|
});
|
|
1618
|
-
var RegisterTriggerBodySchemaV1 =
|
|
1383
|
+
var RegisterTriggerBodySchemaV1 = zod.z.object({
|
|
1619
1384
|
rule: EventRuleSchema,
|
|
1620
1385
|
source: SourceMetadataV1Schema
|
|
1621
1386
|
});
|
|
1622
|
-
var RegisterTriggerBodySchemaV2 =
|
|
1387
|
+
var RegisterTriggerBodySchemaV2 = zod.z.object({
|
|
1623
1388
|
rule: EventRuleSchema,
|
|
1624
1389
|
source: SourceMetadataV2Schema,
|
|
1625
|
-
accountId:
|
|
1390
|
+
accountId: zod.z.string().optional()
|
|
1626
1391
|
});
|
|
1627
|
-
var InitializeTriggerBodySchema =
|
|
1628
|
-
id:
|
|
1629
|
-
params:
|
|
1630
|
-
accountId:
|
|
1631
|
-
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()
|
|
1632
1397
|
});
|
|
1633
|
-
var RegisterCommonScheduleBodySchema =
|
|
1398
|
+
var RegisterCommonScheduleBodySchema = zod.z.object({
|
|
1634
1399
|
/** A unique id for the schedule. This is used to identify and unregister the schedule later. */
|
|
1635
|
-
id:
|
|
1400
|
+
id: zod.z.string(),
|
|
1636
1401
|
/** Any additional metadata about the schedule. */
|
|
1637
|
-
metadata:
|
|
1402
|
+
metadata: zod.z.any(),
|
|
1638
1403
|
/** An optional Account ID to associate with runs triggered by this schedule */
|
|
1639
|
-
accountId:
|
|
1404
|
+
accountId: zod.z.string().optional()
|
|
1640
1405
|
});
|
|
1641
1406
|
var RegisterIntervalScheduleBodySchema = RegisterCommonScheduleBodySchema.merge(IntervalMetadataSchema);
|
|
1642
1407
|
var InitializeCronScheduleBodySchema = RegisterCommonScheduleBodySchema.merge(CronMetadataSchema);
|
|
1643
|
-
var RegisterScheduleBodySchema =
|
|
1408
|
+
var RegisterScheduleBodySchema = zod.z.discriminatedUnion("type", [
|
|
1644
1409
|
RegisterIntervalScheduleBodySchema,
|
|
1645
1410
|
InitializeCronScheduleBodySchema
|
|
1646
1411
|
]);
|
|
1647
|
-
var RegisterScheduleResponseBodySchema =
|
|
1648
|
-
id:
|
|
1412
|
+
var RegisterScheduleResponseBodySchema = zod.z.object({
|
|
1413
|
+
id: zod.z.string(),
|
|
1649
1414
|
schedule: ScheduleMetadataSchema,
|
|
1650
|
-
metadata:
|
|
1651
|
-
active:
|
|
1415
|
+
metadata: zod.z.any(),
|
|
1416
|
+
active: zod.z.boolean()
|
|
1652
1417
|
});
|
|
1653
|
-
var CreateExternalConnectionBodySchema =
|
|
1654
|
-
accessToken:
|
|
1655
|
-
type:
|
|
1418
|
+
var CreateExternalConnectionBodySchema = zod.z.object({
|
|
1419
|
+
accessToken: zod.z.string(),
|
|
1420
|
+
type: zod.z.enum([
|
|
1656
1421
|
"oauth2"
|
|
1657
1422
|
]),
|
|
1658
|
-
scopes:
|
|
1659
|
-
metadata:
|
|
1423
|
+
scopes: zod.z.array(zod.z.string()).optional(),
|
|
1424
|
+
metadata: zod.z.any()
|
|
1660
1425
|
});
|
|
1661
|
-
var GetRunStatusesSchema =
|
|
1662
|
-
run:
|
|
1663
|
-
id:
|
|
1426
|
+
var GetRunStatusesSchema = zod.z.object({
|
|
1427
|
+
run: zod.z.object({
|
|
1428
|
+
id: zod.z.string(),
|
|
1664
1429
|
status: RunStatusSchema,
|
|
1665
|
-
output:
|
|
1430
|
+
output: zod.z.any().optional()
|
|
1666
1431
|
}),
|
|
1667
|
-
statuses:
|
|
1432
|
+
statuses: zod.z.array(JobRunStatusRecordSchema)
|
|
1668
1433
|
});
|
|
1669
|
-
var InvokeJobResponseSchema =
|
|
1670
|
-
id:
|
|
1434
|
+
var InvokeJobResponseSchema = zod.z.object({
|
|
1435
|
+
id: zod.z.string()
|
|
1671
1436
|
});
|
|
1672
|
-
var InvokeJobRequestBodySchema =
|
|
1673
|
-
payload:
|
|
1674
|
-
context:
|
|
1675
|
-
options:
|
|
1676
|
-
accountId:
|
|
1677
|
-
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()
|
|
1678
1443
|
}).optional()
|
|
1679
1444
|
});
|
|
1680
|
-
var InvokeOptionsSchema =
|
|
1681
|
-
accountId:
|
|
1682
|
-
idempotencyKey:
|
|
1683
|
-
context:
|
|
1684
|
-
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()
|
|
1685
1450
|
});
|
|
1686
|
-
var EphemeralEventDispatcherRequestBodySchema =
|
|
1687
|
-
url:
|
|
1688
|
-
name:
|
|
1689
|
-
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(),
|
|
1690
1455
|
filter: EventFilterSchema.optional(),
|
|
1691
1456
|
contextFilter: EventFilterSchema.optional(),
|
|
1692
|
-
accountId:
|
|
1693
|
-
timeoutInSeconds:
|
|
1457
|
+
accountId: zod.z.string().optional(),
|
|
1458
|
+
timeoutInSeconds: zod.z.number().int().positive().min(10).max(60 * 60 * 24 * 365).default(3600)
|
|
1694
1459
|
});
|
|
1695
|
-
var EphemeralEventDispatcherResponseBodySchema =
|
|
1696
|
-
id:
|
|
1460
|
+
var EphemeralEventDispatcherResponseBodySchema = zod.z.object({
|
|
1461
|
+
id: zod.z.string()
|
|
1697
1462
|
});
|
|
1698
|
-
var KeyValueStoreResponseBodySchema =
|
|
1699
|
-
|
|
1700
|
-
action:
|
|
1701
|
-
key:
|
|
1702
|
-
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()
|
|
1703
1468
|
}),
|
|
1704
|
-
|
|
1705
|
-
action:
|
|
1706
|
-
key:
|
|
1707
|
-
value:
|
|
1469
|
+
zod.z.object({
|
|
1470
|
+
action: zod.z.literal("GET"),
|
|
1471
|
+
key: zod.z.string(),
|
|
1472
|
+
value: zod.z.string().optional()
|
|
1708
1473
|
}),
|
|
1709
|
-
|
|
1710
|
-
action:
|
|
1711
|
-
key:
|
|
1712
|
-
has:
|
|
1474
|
+
zod.z.object({
|
|
1475
|
+
action: zod.z.literal("HAS"),
|
|
1476
|
+
key: zod.z.string(),
|
|
1477
|
+
has: zod.z.boolean()
|
|
1713
1478
|
}),
|
|
1714
|
-
|
|
1715
|
-
action:
|
|
1716
|
-
key:
|
|
1717
|
-
value:
|
|
1479
|
+
zod.z.object({
|
|
1480
|
+
action: zod.z.literal("SET"),
|
|
1481
|
+
key: zod.z.string(),
|
|
1482
|
+
value: zod.z.string().optional()
|
|
1718
1483
|
})
|
|
1719
1484
|
]);
|
|
1720
|
-
|
|
1721
|
-
// src/schemas/notifications.ts
|
|
1722
|
-
var import_zod13 = require("zod");
|
|
1723
1485
|
var MISSING_CONNECTION_NOTIFICATION = "dev.trigger.notifications.missingConnection";
|
|
1724
1486
|
var MISSING_CONNECTION_RESOLVED_NOTIFICATION = "dev.trigger.notifications.missingConnectionResolved";
|
|
1725
|
-
var CommonMissingConnectionNotificationPayloadSchema =
|
|
1726
|
-
id:
|
|
1727
|
-
client:
|
|
1728
|
-
id:
|
|
1729
|
-
title:
|
|
1730
|
-
scopes:
|
|
1731
|
-
createdAt:
|
|
1732
|
-
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()
|
|
1733
1495
|
}),
|
|
1734
|
-
authorizationUrl:
|
|
1496
|
+
authorizationUrl: zod.z.string()
|
|
1735
1497
|
});
|
|
1736
1498
|
var MissingDeveloperConnectionNotificationPayloadSchema = CommonMissingConnectionNotificationPayloadSchema.extend({
|
|
1737
|
-
type:
|
|
1499
|
+
type: zod.z.literal("DEVELOPER")
|
|
1738
1500
|
});
|
|
1739
1501
|
var MissingExternalConnectionNotificationPayloadSchema = CommonMissingConnectionNotificationPayloadSchema.extend({
|
|
1740
|
-
type:
|
|
1741
|
-
account:
|
|
1742
|
-
id:
|
|
1743
|
-
metadata:
|
|
1502
|
+
type: zod.z.literal("EXTERNAL"),
|
|
1503
|
+
account: zod.z.object({
|
|
1504
|
+
id: zod.z.string(),
|
|
1505
|
+
metadata: zod.z.any()
|
|
1744
1506
|
})
|
|
1745
1507
|
});
|
|
1746
|
-
var MissingConnectionNotificationPayloadSchema =
|
|
1508
|
+
var MissingConnectionNotificationPayloadSchema = zod.z.discriminatedUnion("type", [
|
|
1747
1509
|
MissingDeveloperConnectionNotificationPayloadSchema,
|
|
1748
1510
|
MissingExternalConnectionNotificationPayloadSchema
|
|
1749
1511
|
]);
|
|
1750
|
-
var CommonMissingConnectionNotificationResolvedPayloadSchema =
|
|
1751
|
-
id:
|
|
1752
|
-
client:
|
|
1753
|
-
id:
|
|
1754
|
-
title:
|
|
1755
|
-
scopes:
|
|
1756
|
-
createdAt:
|
|
1757
|
-
updatedAt:
|
|
1758
|
-
integrationIdentifier:
|
|
1759
|
-
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()
|
|
1760
1522
|
}),
|
|
1761
|
-
expiresAt:
|
|
1523
|
+
expiresAt: zod.z.coerce.date()
|
|
1762
1524
|
});
|
|
1763
1525
|
var MissingDeveloperConnectionResolvedNotificationPayloadSchema = CommonMissingConnectionNotificationResolvedPayloadSchema.extend({
|
|
1764
|
-
type:
|
|
1526
|
+
type: zod.z.literal("DEVELOPER")
|
|
1765
1527
|
});
|
|
1766
1528
|
var MissingExternalConnectionResolvedNotificationPayloadSchema = CommonMissingConnectionNotificationResolvedPayloadSchema.extend({
|
|
1767
|
-
type:
|
|
1768
|
-
account:
|
|
1769
|
-
id:
|
|
1770
|
-
metadata:
|
|
1529
|
+
type: zod.z.literal("EXTERNAL"),
|
|
1530
|
+
account: zod.z.object({
|
|
1531
|
+
id: zod.z.string(),
|
|
1532
|
+
metadata: zod.z.any()
|
|
1771
1533
|
})
|
|
1772
1534
|
});
|
|
1773
|
-
var MissingConnectionResolvedNotificationPayloadSchema =
|
|
1535
|
+
var MissingConnectionResolvedNotificationPayloadSchema = zod.z.discriminatedUnion("type", [
|
|
1774
1536
|
MissingDeveloperConnectionResolvedNotificationPayloadSchema,
|
|
1775
1537
|
MissingExternalConnectionResolvedNotificationPayloadSchema
|
|
1776
1538
|
]);
|
|
1777
|
-
|
|
1778
|
-
// src/schemas/fetch.ts
|
|
1779
|
-
var import_zod14 = require("zod");
|
|
1780
|
-
var FetchRetryHeadersStrategySchema = import_zod14.z.object({
|
|
1539
|
+
var FetchRetryHeadersStrategySchema = zod.z.object({
|
|
1781
1540
|
/** The `headers` strategy retries the request using info from the response headers. */
|
|
1782
|
-
strategy:
|
|
1541
|
+
strategy: zod.z.literal("headers"),
|
|
1783
1542
|
/** The header to use to determine the maximum number of times to retry the request. */
|
|
1784
|
-
limitHeader:
|
|
1543
|
+
limitHeader: zod.z.string(),
|
|
1785
1544
|
/** The header to use to determine the number of remaining retries. */
|
|
1786
|
-
remainingHeader:
|
|
1545
|
+
remainingHeader: zod.z.string(),
|
|
1787
1546
|
/** The header to use to determine the time when the number of remaining retries will be reset. */
|
|
1788
|
-
resetHeader:
|
|
1547
|
+
resetHeader: zod.z.string(),
|
|
1789
1548
|
/** The event filter to use to determine if the request should be retried. */
|
|
1790
1549
|
bodyFilter: EventFilterSchema.optional(),
|
|
1791
1550
|
/** The format of the `resetHeader` value. */
|
|
1792
|
-
resetFormat:
|
|
1551
|
+
resetFormat: zod.z.enum([
|
|
1793
1552
|
"unix_timestamp",
|
|
1794
1553
|
"unix_timestamp_in_ms",
|
|
1795
1554
|
"iso_8601",
|
|
@@ -1798,83 +1557,77 @@ var FetchRetryHeadersStrategySchema = import_zod14.z.object({
|
|
|
1798
1557
|
});
|
|
1799
1558
|
var FetchRetryBackoffStrategySchema = RetryOptionsSchema.extend({
|
|
1800
1559
|
/** The `backoff` strategy retries the request with an exponential backoff. */
|
|
1801
|
-
strategy:
|
|
1560
|
+
strategy: zod.z.literal("backoff"),
|
|
1802
1561
|
/** The event filter to use to determine if the request should be retried. */
|
|
1803
1562
|
bodyFilter: EventFilterSchema.optional()
|
|
1804
1563
|
});
|
|
1805
|
-
var FetchRetryStrategySchema =
|
|
1564
|
+
var FetchRetryStrategySchema = zod.z.discriminatedUnion("strategy", [
|
|
1806
1565
|
FetchRetryHeadersStrategySchema,
|
|
1807
1566
|
FetchRetryBackoffStrategySchema
|
|
1808
1567
|
]);
|
|
1809
|
-
var FetchRequestInitSchema =
|
|
1568
|
+
var FetchRequestInitSchema = zod.z.object({
|
|
1810
1569
|
/** The HTTP method to use for the request. */
|
|
1811
|
-
method:
|
|
1570
|
+
method: zod.z.string().optional(),
|
|
1812
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. */
|
|
1813
|
-
headers:
|
|
1814
|
-
|
|
1572
|
+
headers: zod.z.record(zod.z.union([
|
|
1573
|
+
zod.z.string(),
|
|
1815
1574
|
RedactStringSchema
|
|
1816
1575
|
])).optional(),
|
|
1817
1576
|
/** The body of the request. */
|
|
1818
|
-
body:
|
|
1819
|
-
|
|
1820
|
-
|
|
1577
|
+
body: zod.z.union([
|
|
1578
|
+
zod.z.string(),
|
|
1579
|
+
zod.z.instanceof(ArrayBuffer)
|
|
1821
1580
|
]).optional()
|
|
1822
1581
|
});
|
|
1823
|
-
var FetchRetryOptionsSchema =
|
|
1824
|
-
var FetchTimeoutOptionsSchema =
|
|
1825
|
-
durationInMs:
|
|
1582
|
+
var FetchRetryOptionsSchema = zod.z.record(FetchRetryStrategySchema);
|
|
1583
|
+
var FetchTimeoutOptionsSchema = zod.z.object({
|
|
1584
|
+
durationInMs: zod.z.number(),
|
|
1826
1585
|
retry: RetryOptionsSchema.optional()
|
|
1827
1586
|
});
|
|
1828
|
-
var FetchOperationSchema =
|
|
1829
|
-
url:
|
|
1587
|
+
var FetchOperationSchema = zod.z.object({
|
|
1588
|
+
url: zod.z.string(),
|
|
1830
1589
|
requestInit: FetchRequestInitSchema.optional(),
|
|
1831
|
-
retry:
|
|
1590
|
+
retry: zod.z.record(FetchRetryStrategySchema).optional(),
|
|
1832
1591
|
timeout: FetchTimeoutOptionsSchema.optional()
|
|
1833
1592
|
});
|
|
1834
|
-
var FetchPollOperationSchema =
|
|
1835
|
-
url:
|
|
1836
|
-
interval:
|
|
1837
|
-
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),
|
|
1838
1597
|
responseFilter: ResponseFilterSchema,
|
|
1839
1598
|
requestInit: FetchRequestInitSchema.optional(),
|
|
1840
1599
|
requestTimeout: FetchTimeoutOptionsSchema.optional()
|
|
1841
1600
|
});
|
|
1842
|
-
|
|
1843
|
-
// src/schemas/events.ts
|
|
1844
|
-
var import_zod15 = require("zod");
|
|
1845
|
-
var GetEventSchema = import_zod15.z.object({
|
|
1601
|
+
var GetEventSchema = zod.z.object({
|
|
1846
1602
|
/** The event id */
|
|
1847
|
-
id:
|
|
1603
|
+
id: zod.z.string(),
|
|
1848
1604
|
/** The event name */
|
|
1849
|
-
name:
|
|
1605
|
+
name: zod.z.string(),
|
|
1850
1606
|
/** When the event was created */
|
|
1851
|
-
createdAt:
|
|
1607
|
+
createdAt: zod.z.coerce.date(),
|
|
1852
1608
|
/** When the event was last updated */
|
|
1853
|
-
updatedAt:
|
|
1609
|
+
updatedAt: zod.z.coerce.date(),
|
|
1854
1610
|
/** The runs that were triggered by the event */
|
|
1855
|
-
runs:
|
|
1611
|
+
runs: zod.z.array(zod.z.object({
|
|
1856
1612
|
/** The Run id */
|
|
1857
|
-
id:
|
|
1613
|
+
id: zod.z.string(),
|
|
1858
1614
|
/** The Run status */
|
|
1859
1615
|
status: RunStatusSchema,
|
|
1860
1616
|
/** When the run started */
|
|
1861
|
-
startedAt:
|
|
1617
|
+
startedAt: zod.z.coerce.date().optional().nullable(),
|
|
1862
1618
|
/** When the run completed */
|
|
1863
|
-
completedAt:
|
|
1619
|
+
completedAt: zod.z.coerce.date().optional().nullable()
|
|
1864
1620
|
}))
|
|
1865
1621
|
});
|
|
1866
|
-
var CancelRunsForEventSchema =
|
|
1867
|
-
cancelledRunIds:
|
|
1868
|
-
failedToCancelRunIds:
|
|
1622
|
+
var CancelRunsForEventSchema = zod.z.object({
|
|
1623
|
+
cancelledRunIds: zod.z.array(zod.z.string()),
|
|
1624
|
+
failedToCancelRunIds: zod.z.array(zod.z.string())
|
|
1869
1625
|
});
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
method: import_zod16.z.string(),
|
|
1876
|
-
headers: import_zod16.z.record(import_zod16.z.string()),
|
|
1877
|
-
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()
|
|
1878
1631
|
});
|
|
1879
1632
|
|
|
1880
1633
|
// src/utils.ts
|
|
@@ -2086,7 +1839,7 @@ __name(eventFilterMatches, "eventFilterMatches");
|
|
|
2086
1839
|
function contentFiltersMatches(actualValue, contentFilters) {
|
|
2087
1840
|
for (const contentFilter of contentFilters) {
|
|
2088
1841
|
if (typeof contentFilter === "object") {
|
|
2089
|
-
|
|
1842
|
+
Object.entries(contentFilter)[0];
|
|
2090
1843
|
if (!contentFilterMatches(actualValue, contentFilter)) {
|
|
2091
1844
|
return false;
|
|
2092
1845
|
}
|
|
@@ -2271,4 +2024,186 @@ function supportsFeature(featureName, version) {
|
|
|
2271
2024
|
return version >= supportedVersion;
|
|
2272
2025
|
}
|
|
2273
2026
|
__name(supportsFeature, "supportsFeature");
|
|
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
|
|
2274
2209
|
//# sourceMappingURL=index.js.map
|