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