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