@trigger.dev/core 3.0.0-beta.4 → 3.0.0-beta.41
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/catalog-EP9DGAGm.d.ts +242 -0
- package/dist/catalog-Gjy5NtAB.d.mts +242 -0
- package/dist/index.d.mts +60 -1
- package/dist/index.d.ts +60 -1
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -1
- package/dist/index.mjs.map +1 -1
- package/dist/manager-S98VaLUy.d.mts +1402 -0
- package/dist/manager-S98VaLUy.d.ts +1402 -0
- package/dist/messages-xJbR1Vai.d.mts +18953 -0
- package/dist/messages-xJbR1Vai.d.ts +18953 -0
- package/dist/schemas-Sb0sJcEt.d.mts +2497 -0
- package/dist/schemas-Sb0sJcEt.d.ts +2497 -0
- package/dist/v3/dev/index.d.mts +28 -0
- package/dist/v3/dev/index.d.ts +28 -0
- package/dist/v3/dev/index.js +93 -0
- package/dist/v3/dev/index.js.map +1 -0
- package/dist/v3/dev/index.mjs +91 -0
- package/dist/v3/dev/index.mjs.map +1 -0
- package/dist/v3/index.d.mts +2140 -17560
- package/dist/v3/index.d.ts +2140 -17560
- package/dist/v3/index.js +2611 -2886
- package/dist/v3/index.js.map +1 -1
- package/dist/v3/index.mjs +2563 -2858
- package/dist/v3/index.mjs.map +1 -1
- package/dist/v3/otel/index.js +106 -50
- package/dist/v3/otel/index.js.map +1 -1
- package/dist/v3/otel/index.mjs +106 -50
- package/dist/v3/otel/index.mjs.map +1 -1
- package/dist/v3/prod/index.d.mts +45 -0
- package/dist/v3/prod/index.d.ts +45 -0
- package/dist/v3/prod/index.js +304 -0
- package/dist/v3/prod/index.js.map +1 -0
- package/dist/v3/prod/index.mjs +302 -0
- package/dist/v3/prod/index.mjs.map +1 -0
- package/dist/v3/utils/structuredLogger.d.mts +31 -0
- package/dist/v3/utils/structuredLogger.d.ts +31 -0
- package/dist/v3/utils/structuredLogger.js +88 -0
- package/dist/v3/utils/structuredLogger.js.map +1 -0
- package/dist/v3/utils/structuredLogger.mjs +86 -0
- package/dist/v3/utils/structuredLogger.mjs.map +1 -0
- package/dist/v3/workers/index.d.mts +142 -0
- package/dist/v3/workers/index.d.ts +142 -0
- package/dist/v3/workers/index.js +3485 -0
- package/dist/v3/workers/index.js.map +1 -0
- package/dist/v3/workers/index.mjs +3466 -0
- package/dist/v3/workers/index.mjs.map +1 -0
- package/dist/v3/zodIpc.d.mts +32 -0
- package/dist/v3/zodIpc.d.ts +32 -0
- package/dist/v3/zodIpc.js +268 -0
- package/dist/v3/zodIpc.js.map +1 -0
- package/dist/v3/zodIpc.mjs +266 -0
- package/dist/v3/zodIpc.mjs.map +1 -0
- package/dist/v3/zodMessageHandler.d.mts +69 -0
- package/dist/v3/zodMessageHandler.d.ts +69 -0
- package/dist/v3/zodMessageHandler.js +168 -0
- package/dist/v3/zodMessageHandler.js.map +1 -0
- package/dist/v3/zodMessageHandler.mjs +163 -0
- package/dist/v3/zodMessageHandler.mjs.map +1 -0
- package/dist/v3/zodNamespace.d.mts +3663 -0
- package/dist/v3/zodNamespace.d.ts +3663 -0
- package/dist/v3/zodNamespace.js +366 -0
- package/dist/v3/zodNamespace.js.map +1 -0
- package/dist/v3/zodNamespace.mjs +364 -0
- package/dist/v3/zodNamespace.mjs.map +1 -0
- package/dist/v3/zodSocket.d.mts +88 -0
- package/dist/v3/zodSocket.d.ts +88 -0
- package/dist/v3/zodSocket.js +319 -0
- package/dist/v3/zodSocket.js.map +1 -0
- package/dist/v3/zodSocket.mjs +315 -0
- package/dist/v3/zodSocket.mjs.map +1 -0
- package/dist/v3/zodfetch.d.mts +206 -0
- package/dist/v3/zodfetch.d.ts +206 -0
- package/dist/v3/zodfetch.js +614 -0
- package/dist/v3/zodfetch.js.map +1 -0
- package/dist/v3/zodfetch.mjs +594 -0
- package/dist/v3/zodfetch.mjs.map +1 -0
- package/package.json +79 -5
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
import { Context as Context$1, Span, SpanOptions, Tracer } from '@opentelemetry/api';
|
|
2
|
+
import { Logger } from '@opentelemetry/api-logs';
|
|
3
|
+
import { M as MachinePresetName, a as TaskRunContext } from './manager-S98VaLUy.js';
|
|
4
|
+
import { R as RetryOptions, P as Prettify, b as TaskMetadata, T as TaskFileMetadata, a as TaskMetadataWithFilePath } from './schemas-Sb0sJcEt.js';
|
|
5
|
+
import { InstrumentationOption } from '@opentelemetry/instrumentation';
|
|
6
|
+
|
|
7
|
+
type TriggerTracerConfig = {
|
|
8
|
+
name: string;
|
|
9
|
+
version: string;
|
|
10
|
+
} | {
|
|
11
|
+
tracer: Tracer;
|
|
12
|
+
logger: Logger;
|
|
13
|
+
};
|
|
14
|
+
declare class TriggerTracer {
|
|
15
|
+
private readonly _config;
|
|
16
|
+
constructor(_config: TriggerTracerConfig);
|
|
17
|
+
private _tracer;
|
|
18
|
+
private get tracer();
|
|
19
|
+
private _logger;
|
|
20
|
+
private get logger();
|
|
21
|
+
extractContext(traceContext?: Record<string, unknown>): Context$1;
|
|
22
|
+
startActiveSpan<T>(name: string, fn: (span: Span) => Promise<T>, options?: SpanOptions, ctx?: Context$1): Promise<T>;
|
|
23
|
+
startSpan(name: string, options?: SpanOptions, ctx?: Context$1): Span;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
type LogLevel = "none" | "error" | "warn" | "info" | "debug" | "log";
|
|
27
|
+
declare const logLevels: Array<LogLevel>;
|
|
28
|
+
type TaskLoggerConfig = {
|
|
29
|
+
logger: Logger;
|
|
30
|
+
tracer: TriggerTracer;
|
|
31
|
+
level: LogLevel;
|
|
32
|
+
};
|
|
33
|
+
interface TaskLogger {
|
|
34
|
+
debug(message: string, properties?: Record<string, unknown>): void;
|
|
35
|
+
log(message: string, properties?: Record<string, unknown>): void;
|
|
36
|
+
info(message: string, properties?: Record<string, unknown>): void;
|
|
37
|
+
warn(message: string, properties?: Record<string, unknown>): void;
|
|
38
|
+
error(message: string, properties?: Record<string, unknown>): void;
|
|
39
|
+
trace<T>(name: string, fn: (span: Span) => Promise<T>, options?: SpanOptions): Promise<T>;
|
|
40
|
+
}
|
|
41
|
+
declare class OtelTaskLogger implements TaskLogger {
|
|
42
|
+
#private;
|
|
43
|
+
private readonly _config;
|
|
44
|
+
private readonly _level;
|
|
45
|
+
constructor(_config: TaskLoggerConfig);
|
|
46
|
+
debug(message: string, properties?: Record<string, unknown>): void;
|
|
47
|
+
log(message: string, properties?: Record<string, unknown>): void;
|
|
48
|
+
info(message: string, properties?: Record<string, unknown>): void;
|
|
49
|
+
warn(message: string, properties?: Record<string, unknown>): void;
|
|
50
|
+
error(message: string, properties?: Record<string, unknown>): void;
|
|
51
|
+
trace<T>(name: string, fn: (span: Span) => Promise<T>, options?: SpanOptions): Promise<T>;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
interface ProjectConfig {
|
|
55
|
+
project: string;
|
|
56
|
+
triggerDirectories?: string | string[];
|
|
57
|
+
triggerUrl?: string;
|
|
58
|
+
retries?: {
|
|
59
|
+
enabledInDev?: boolean;
|
|
60
|
+
default?: RetryOptions;
|
|
61
|
+
};
|
|
62
|
+
additionalPackages?: string[];
|
|
63
|
+
/**
|
|
64
|
+
* The default machine preset to use for your deployed trigger.dev tasks. You can override this on a per-task basis.
|
|
65
|
+
* @default "small-1x"
|
|
66
|
+
*/
|
|
67
|
+
machine?: MachinePresetName;
|
|
68
|
+
/**
|
|
69
|
+
* List of additional files to include in your trigger.dev bundle. e.g. ["./prisma/schema.prisma"]
|
|
70
|
+
*
|
|
71
|
+
* Supports glob patterns.
|
|
72
|
+
*
|
|
73
|
+
* Note: The path separator for glob patterns is `/`, even on Windows!
|
|
74
|
+
*/
|
|
75
|
+
additionalFiles?: string[];
|
|
76
|
+
/**
|
|
77
|
+
* List of patterns that determine if a module is included in your trigger.dev bundle. This is needed when consuming ESM only packages, since the trigger.dev bundle is currently built as a CJS module.
|
|
78
|
+
*/
|
|
79
|
+
dependenciesToBundle?: Array<string | RegExp>;
|
|
80
|
+
/**
|
|
81
|
+
* The path to your project's tsconfig.json file. Will use tsconfig.json in the project directory if not provided.
|
|
82
|
+
*/
|
|
83
|
+
tsconfigPath?: string;
|
|
84
|
+
/**
|
|
85
|
+
* The OpenTelemetry instrumentations to enable
|
|
86
|
+
*/
|
|
87
|
+
instrumentations?: InstrumentationOption[];
|
|
88
|
+
/**
|
|
89
|
+
* Set the log level for the logger. Defaults to "info", so you will see "log", "info", "warn", and "error" messages, but not "debug" messages.
|
|
90
|
+
*
|
|
91
|
+
* We automatically set the logLevel to "debug" during test runs
|
|
92
|
+
*
|
|
93
|
+
* @default "info"
|
|
94
|
+
*/
|
|
95
|
+
logLevel?: LogLevel;
|
|
96
|
+
/**
|
|
97
|
+
* Enable console logging while running the dev CLI. This will print out logs from console.log, console.warn, and console.error. By default all logs are sent to the trigger.dev backend, and not logged to the console.
|
|
98
|
+
*/
|
|
99
|
+
enableConsoleLogging?: boolean;
|
|
100
|
+
/**
|
|
101
|
+
* Run before a task is executed, for all tasks. This is useful for setting up any global state that is needed for all tasks.
|
|
102
|
+
*/
|
|
103
|
+
init?: (payload: unknown, params: InitFnParams) => void | Promise<void>;
|
|
104
|
+
/**
|
|
105
|
+
* onSuccess is called after the run function has successfully completed.
|
|
106
|
+
*/
|
|
107
|
+
onSuccess?: (payload: unknown, output: unknown, params: SuccessFnParams<any>) => Promise<void>;
|
|
108
|
+
/**
|
|
109
|
+
* onFailure is called after a task run has failed (meaning the run function threw an error and won't be retried anymore)
|
|
110
|
+
*/
|
|
111
|
+
onFailure?: (payload: unknown, error: unknown, params: FailureFnParams<any>) => Promise<void>;
|
|
112
|
+
/**
|
|
113
|
+
* onStart is called the first time a task is executed in a run (not before every retry)
|
|
114
|
+
*/
|
|
115
|
+
onStart?: (payload: unknown, params: StartFnParams) => Promise<void>;
|
|
116
|
+
/**
|
|
117
|
+
* postInstall will run during the deploy build step, after all the dependencies have been installed.
|
|
118
|
+
*
|
|
119
|
+
* @example "prisma generate"
|
|
120
|
+
*/
|
|
121
|
+
postInstall?: string;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
type InitOutput = Record<string, any> | void | undefined;
|
|
125
|
+
type RunFnParams<TInitOutput extends InitOutput> = Prettify<{
|
|
126
|
+
/** Metadata about the task, run, attempt, queue, environment, organization, project and batch. */
|
|
127
|
+
ctx: Context;
|
|
128
|
+
/** If you use the `init` function, this will be whatever you returned. */
|
|
129
|
+
init?: TInitOutput;
|
|
130
|
+
}>;
|
|
131
|
+
type MiddlewareFnParams = Prettify<{
|
|
132
|
+
ctx: Context;
|
|
133
|
+
next: () => Promise<void>;
|
|
134
|
+
}>;
|
|
135
|
+
type InitFnParams = Prettify<{
|
|
136
|
+
ctx: Context;
|
|
137
|
+
}>;
|
|
138
|
+
type StartFnParams = Prettify<{
|
|
139
|
+
ctx: Context;
|
|
140
|
+
}>;
|
|
141
|
+
type Context = TaskRunContext;
|
|
142
|
+
type SuccessFnParams<TInitOutput extends InitOutput> = RunFnParams<TInitOutput>;
|
|
143
|
+
type FailureFnParams<TInitOutput extends InitOutput> = RunFnParams<TInitOutput>;
|
|
144
|
+
type HandleErrorFnParams<TInitOutput extends InitOutput> = RunFnParams<TInitOutput> & Prettify<{
|
|
145
|
+
retry?: RetryOptions;
|
|
146
|
+
retryAt?: Date;
|
|
147
|
+
retryDelayInMs?: number;
|
|
148
|
+
}>;
|
|
149
|
+
type HandleErrorModificationOptions = {
|
|
150
|
+
skipRetrying?: boolean | undefined;
|
|
151
|
+
retryAt?: Date | undefined;
|
|
152
|
+
retryDelayInMs?: number | undefined;
|
|
153
|
+
retry?: RetryOptions | undefined;
|
|
154
|
+
error?: unknown;
|
|
155
|
+
};
|
|
156
|
+
type HandleErrorResult = undefined | void | HandleErrorModificationOptions | Promise<undefined | void | HandleErrorModificationOptions>;
|
|
157
|
+
type HandleErrorArgs = {
|
|
158
|
+
ctx: Context;
|
|
159
|
+
retry?: RetryOptions;
|
|
160
|
+
retryAt?: Date;
|
|
161
|
+
retryDelayInMs?: number;
|
|
162
|
+
};
|
|
163
|
+
type HandleErrorFunction = (payload: any, error: unknown, params: HandleErrorArgs) => HandleErrorResult;
|
|
164
|
+
type ResolveEnvironmentVariablesOptions = {
|
|
165
|
+
variables: Record<string, string> | Array<{
|
|
166
|
+
name: string;
|
|
167
|
+
value: string;
|
|
168
|
+
}>;
|
|
169
|
+
override?: boolean;
|
|
170
|
+
};
|
|
171
|
+
type ResolveEnvironmentVariablesResult = ResolveEnvironmentVariablesOptions | Promise<void | undefined | ResolveEnvironmentVariablesOptions> | void | undefined;
|
|
172
|
+
type ResolveEnvironmentVariablesParams = {
|
|
173
|
+
projectRef: string;
|
|
174
|
+
environment: "dev" | "staging" | "prod";
|
|
175
|
+
env: Record<string, string>;
|
|
176
|
+
};
|
|
177
|
+
type ResolveEnvironmentVariablesFunction = (params: ResolveEnvironmentVariablesParams) => ResolveEnvironmentVariablesResult;
|
|
178
|
+
type TaskMetadataWithFunctions = TaskMetadata & {
|
|
179
|
+
fns: {
|
|
180
|
+
run: (payload: any, params: RunFnParams<any>) => Promise<any>;
|
|
181
|
+
init?: (payload: any, params: InitFnParams) => Promise<InitOutput>;
|
|
182
|
+
cleanup?: (payload: any, params: RunFnParams<any>) => Promise<void>;
|
|
183
|
+
middleware?: (payload: any, params: MiddlewareFnParams) => Promise<void>;
|
|
184
|
+
handleError?: (payload: any, error: unknown, params: HandleErrorFnParams<any>) => HandleErrorResult;
|
|
185
|
+
onSuccess?: (payload: any, output: any, params: SuccessFnParams<any>) => Promise<void>;
|
|
186
|
+
onFailure?: (payload: any, error: unknown, params: FailureFnParams<any>) => Promise<void>;
|
|
187
|
+
onStart?: (payload: any, params: StartFnParams) => Promise<void>;
|
|
188
|
+
};
|
|
189
|
+
};
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Contains two parts: the first part is the seconds, the second part is the nanoseconds.
|
|
193
|
+
*
|
|
194
|
+
*/
|
|
195
|
+
type ClockTime = [number, number];
|
|
196
|
+
interface Clock {
|
|
197
|
+
preciseNow(): ClockTime;
|
|
198
|
+
reset(): void;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
type UsageSample = {
|
|
202
|
+
cpuTime: number;
|
|
203
|
+
wallTime: number;
|
|
204
|
+
};
|
|
205
|
+
interface UsageMeasurement {
|
|
206
|
+
sample(): UsageSample;
|
|
207
|
+
}
|
|
208
|
+
interface UsageManager {
|
|
209
|
+
disable(): void;
|
|
210
|
+
start(): UsageMeasurement;
|
|
211
|
+
stop(measurement: UsageMeasurement): UsageSample;
|
|
212
|
+
sample(): UsageSample | undefined;
|
|
213
|
+
pauseAsync<T>(cb: () => Promise<T>): Promise<T>;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
declare class UsageAPI implements UsageManager {
|
|
217
|
+
#private;
|
|
218
|
+
private static _instance?;
|
|
219
|
+
private constructor();
|
|
220
|
+
static getInstance(): UsageAPI;
|
|
221
|
+
setGlobalUsageManager(manager: UsageManager): boolean;
|
|
222
|
+
disable(): void;
|
|
223
|
+
start(): UsageMeasurement;
|
|
224
|
+
stop(measurement: UsageMeasurement): UsageSample;
|
|
225
|
+
pauseAsync<T>(cb: () => Promise<T>): Promise<T>;
|
|
226
|
+
sample(): UsageSample | undefined;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/** Entrypoint for usage API */
|
|
230
|
+
declare const usage: UsageAPI;
|
|
231
|
+
|
|
232
|
+
interface TaskCatalog {
|
|
233
|
+
registerTaskMetadata(task: TaskMetadataWithFunctions): void;
|
|
234
|
+
updateTaskMetadata(id: string, task: Partial<TaskMetadataWithFunctions>): void;
|
|
235
|
+
registerTaskFileMetadata(id: string, metadata: TaskFileMetadata): void;
|
|
236
|
+
getAllTaskMetadata(): Array<TaskMetadataWithFilePath>;
|
|
237
|
+
getTaskMetadata(id: string): TaskMetadataWithFilePath | undefined;
|
|
238
|
+
getTask(id: string): TaskMetadataWithFunctions | undefined;
|
|
239
|
+
taskExists(id: string): boolean;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
export { type Clock as C, type FailureFnParams as F, type HandleErrorFunction as H, type InitOutput as I, type LogLevel as L, type MiddlewareFnParams as M, OtelTaskLogger as O, type ProjectConfig as P, type RunFnParams as R, type StartFnParams as S, TriggerTracer as T, type UsageMeasurement as U, type TaskMetadataWithFunctions as a, type ClockTime as b, type TaskCatalog as c, type UsageManager as d, type UsageSample as e, type TaskLogger as f, type InitFnParams as g, type Context as h, type SuccessFnParams as i, type HandleErrorFnParams as j, type HandleErrorModificationOptions as k, logLevels as l, type HandleErrorResult as m, type HandleErrorArgs as n, type ResolveEnvironmentVariablesResult as o, type ResolveEnvironmentVariablesParams as p, type ResolveEnvironmentVariablesFunction as q, usage as u };
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
import { Context as Context$1, Span, SpanOptions, Tracer } from '@opentelemetry/api';
|
|
2
|
+
import { Logger } from '@opentelemetry/api-logs';
|
|
3
|
+
import { M as MachinePresetName, a as TaskRunContext } from './manager-S98VaLUy.mjs';
|
|
4
|
+
import { R as RetryOptions, P as Prettify, b as TaskMetadata, T as TaskFileMetadata, a as TaskMetadataWithFilePath } from './schemas-Sb0sJcEt.mjs';
|
|
5
|
+
import { InstrumentationOption } from '@opentelemetry/instrumentation';
|
|
6
|
+
|
|
7
|
+
type TriggerTracerConfig = {
|
|
8
|
+
name: string;
|
|
9
|
+
version: string;
|
|
10
|
+
} | {
|
|
11
|
+
tracer: Tracer;
|
|
12
|
+
logger: Logger;
|
|
13
|
+
};
|
|
14
|
+
declare class TriggerTracer {
|
|
15
|
+
private readonly _config;
|
|
16
|
+
constructor(_config: TriggerTracerConfig);
|
|
17
|
+
private _tracer;
|
|
18
|
+
private get tracer();
|
|
19
|
+
private _logger;
|
|
20
|
+
private get logger();
|
|
21
|
+
extractContext(traceContext?: Record<string, unknown>): Context$1;
|
|
22
|
+
startActiveSpan<T>(name: string, fn: (span: Span) => Promise<T>, options?: SpanOptions, ctx?: Context$1): Promise<T>;
|
|
23
|
+
startSpan(name: string, options?: SpanOptions, ctx?: Context$1): Span;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
type LogLevel = "none" | "error" | "warn" | "info" | "debug" | "log";
|
|
27
|
+
declare const logLevels: Array<LogLevel>;
|
|
28
|
+
type TaskLoggerConfig = {
|
|
29
|
+
logger: Logger;
|
|
30
|
+
tracer: TriggerTracer;
|
|
31
|
+
level: LogLevel;
|
|
32
|
+
};
|
|
33
|
+
interface TaskLogger {
|
|
34
|
+
debug(message: string, properties?: Record<string, unknown>): void;
|
|
35
|
+
log(message: string, properties?: Record<string, unknown>): void;
|
|
36
|
+
info(message: string, properties?: Record<string, unknown>): void;
|
|
37
|
+
warn(message: string, properties?: Record<string, unknown>): void;
|
|
38
|
+
error(message: string, properties?: Record<string, unknown>): void;
|
|
39
|
+
trace<T>(name: string, fn: (span: Span) => Promise<T>, options?: SpanOptions): Promise<T>;
|
|
40
|
+
}
|
|
41
|
+
declare class OtelTaskLogger implements TaskLogger {
|
|
42
|
+
#private;
|
|
43
|
+
private readonly _config;
|
|
44
|
+
private readonly _level;
|
|
45
|
+
constructor(_config: TaskLoggerConfig);
|
|
46
|
+
debug(message: string, properties?: Record<string, unknown>): void;
|
|
47
|
+
log(message: string, properties?: Record<string, unknown>): void;
|
|
48
|
+
info(message: string, properties?: Record<string, unknown>): void;
|
|
49
|
+
warn(message: string, properties?: Record<string, unknown>): void;
|
|
50
|
+
error(message: string, properties?: Record<string, unknown>): void;
|
|
51
|
+
trace<T>(name: string, fn: (span: Span) => Promise<T>, options?: SpanOptions): Promise<T>;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
interface ProjectConfig {
|
|
55
|
+
project: string;
|
|
56
|
+
triggerDirectories?: string | string[];
|
|
57
|
+
triggerUrl?: string;
|
|
58
|
+
retries?: {
|
|
59
|
+
enabledInDev?: boolean;
|
|
60
|
+
default?: RetryOptions;
|
|
61
|
+
};
|
|
62
|
+
additionalPackages?: string[];
|
|
63
|
+
/**
|
|
64
|
+
* The default machine preset to use for your deployed trigger.dev tasks. You can override this on a per-task basis.
|
|
65
|
+
* @default "small-1x"
|
|
66
|
+
*/
|
|
67
|
+
machine?: MachinePresetName;
|
|
68
|
+
/**
|
|
69
|
+
* List of additional files to include in your trigger.dev bundle. e.g. ["./prisma/schema.prisma"]
|
|
70
|
+
*
|
|
71
|
+
* Supports glob patterns.
|
|
72
|
+
*
|
|
73
|
+
* Note: The path separator for glob patterns is `/`, even on Windows!
|
|
74
|
+
*/
|
|
75
|
+
additionalFiles?: string[];
|
|
76
|
+
/**
|
|
77
|
+
* List of patterns that determine if a module is included in your trigger.dev bundle. This is needed when consuming ESM only packages, since the trigger.dev bundle is currently built as a CJS module.
|
|
78
|
+
*/
|
|
79
|
+
dependenciesToBundle?: Array<string | RegExp>;
|
|
80
|
+
/**
|
|
81
|
+
* The path to your project's tsconfig.json file. Will use tsconfig.json in the project directory if not provided.
|
|
82
|
+
*/
|
|
83
|
+
tsconfigPath?: string;
|
|
84
|
+
/**
|
|
85
|
+
* The OpenTelemetry instrumentations to enable
|
|
86
|
+
*/
|
|
87
|
+
instrumentations?: InstrumentationOption[];
|
|
88
|
+
/**
|
|
89
|
+
* Set the log level for the logger. Defaults to "info", so you will see "log", "info", "warn", and "error" messages, but not "debug" messages.
|
|
90
|
+
*
|
|
91
|
+
* We automatically set the logLevel to "debug" during test runs
|
|
92
|
+
*
|
|
93
|
+
* @default "info"
|
|
94
|
+
*/
|
|
95
|
+
logLevel?: LogLevel;
|
|
96
|
+
/**
|
|
97
|
+
* Enable console logging while running the dev CLI. This will print out logs from console.log, console.warn, and console.error. By default all logs are sent to the trigger.dev backend, and not logged to the console.
|
|
98
|
+
*/
|
|
99
|
+
enableConsoleLogging?: boolean;
|
|
100
|
+
/**
|
|
101
|
+
* Run before a task is executed, for all tasks. This is useful for setting up any global state that is needed for all tasks.
|
|
102
|
+
*/
|
|
103
|
+
init?: (payload: unknown, params: InitFnParams) => void | Promise<void>;
|
|
104
|
+
/**
|
|
105
|
+
* onSuccess is called after the run function has successfully completed.
|
|
106
|
+
*/
|
|
107
|
+
onSuccess?: (payload: unknown, output: unknown, params: SuccessFnParams<any>) => Promise<void>;
|
|
108
|
+
/**
|
|
109
|
+
* onFailure is called after a task run has failed (meaning the run function threw an error and won't be retried anymore)
|
|
110
|
+
*/
|
|
111
|
+
onFailure?: (payload: unknown, error: unknown, params: FailureFnParams<any>) => Promise<void>;
|
|
112
|
+
/**
|
|
113
|
+
* onStart is called the first time a task is executed in a run (not before every retry)
|
|
114
|
+
*/
|
|
115
|
+
onStart?: (payload: unknown, params: StartFnParams) => Promise<void>;
|
|
116
|
+
/**
|
|
117
|
+
* postInstall will run during the deploy build step, after all the dependencies have been installed.
|
|
118
|
+
*
|
|
119
|
+
* @example "prisma generate"
|
|
120
|
+
*/
|
|
121
|
+
postInstall?: string;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
type InitOutput = Record<string, any> | void | undefined;
|
|
125
|
+
type RunFnParams<TInitOutput extends InitOutput> = Prettify<{
|
|
126
|
+
/** Metadata about the task, run, attempt, queue, environment, organization, project and batch. */
|
|
127
|
+
ctx: Context;
|
|
128
|
+
/** If you use the `init` function, this will be whatever you returned. */
|
|
129
|
+
init?: TInitOutput;
|
|
130
|
+
}>;
|
|
131
|
+
type MiddlewareFnParams = Prettify<{
|
|
132
|
+
ctx: Context;
|
|
133
|
+
next: () => Promise<void>;
|
|
134
|
+
}>;
|
|
135
|
+
type InitFnParams = Prettify<{
|
|
136
|
+
ctx: Context;
|
|
137
|
+
}>;
|
|
138
|
+
type StartFnParams = Prettify<{
|
|
139
|
+
ctx: Context;
|
|
140
|
+
}>;
|
|
141
|
+
type Context = TaskRunContext;
|
|
142
|
+
type SuccessFnParams<TInitOutput extends InitOutput> = RunFnParams<TInitOutput>;
|
|
143
|
+
type FailureFnParams<TInitOutput extends InitOutput> = RunFnParams<TInitOutput>;
|
|
144
|
+
type HandleErrorFnParams<TInitOutput extends InitOutput> = RunFnParams<TInitOutput> & Prettify<{
|
|
145
|
+
retry?: RetryOptions;
|
|
146
|
+
retryAt?: Date;
|
|
147
|
+
retryDelayInMs?: number;
|
|
148
|
+
}>;
|
|
149
|
+
type HandleErrorModificationOptions = {
|
|
150
|
+
skipRetrying?: boolean | undefined;
|
|
151
|
+
retryAt?: Date | undefined;
|
|
152
|
+
retryDelayInMs?: number | undefined;
|
|
153
|
+
retry?: RetryOptions | undefined;
|
|
154
|
+
error?: unknown;
|
|
155
|
+
};
|
|
156
|
+
type HandleErrorResult = undefined | void | HandleErrorModificationOptions | Promise<undefined | void | HandleErrorModificationOptions>;
|
|
157
|
+
type HandleErrorArgs = {
|
|
158
|
+
ctx: Context;
|
|
159
|
+
retry?: RetryOptions;
|
|
160
|
+
retryAt?: Date;
|
|
161
|
+
retryDelayInMs?: number;
|
|
162
|
+
};
|
|
163
|
+
type HandleErrorFunction = (payload: any, error: unknown, params: HandleErrorArgs) => HandleErrorResult;
|
|
164
|
+
type ResolveEnvironmentVariablesOptions = {
|
|
165
|
+
variables: Record<string, string> | Array<{
|
|
166
|
+
name: string;
|
|
167
|
+
value: string;
|
|
168
|
+
}>;
|
|
169
|
+
override?: boolean;
|
|
170
|
+
};
|
|
171
|
+
type ResolveEnvironmentVariablesResult = ResolveEnvironmentVariablesOptions | Promise<void | undefined | ResolveEnvironmentVariablesOptions> | void | undefined;
|
|
172
|
+
type ResolveEnvironmentVariablesParams = {
|
|
173
|
+
projectRef: string;
|
|
174
|
+
environment: "dev" | "staging" | "prod";
|
|
175
|
+
env: Record<string, string>;
|
|
176
|
+
};
|
|
177
|
+
type ResolveEnvironmentVariablesFunction = (params: ResolveEnvironmentVariablesParams) => ResolveEnvironmentVariablesResult;
|
|
178
|
+
type TaskMetadataWithFunctions = TaskMetadata & {
|
|
179
|
+
fns: {
|
|
180
|
+
run: (payload: any, params: RunFnParams<any>) => Promise<any>;
|
|
181
|
+
init?: (payload: any, params: InitFnParams) => Promise<InitOutput>;
|
|
182
|
+
cleanup?: (payload: any, params: RunFnParams<any>) => Promise<void>;
|
|
183
|
+
middleware?: (payload: any, params: MiddlewareFnParams) => Promise<void>;
|
|
184
|
+
handleError?: (payload: any, error: unknown, params: HandleErrorFnParams<any>) => HandleErrorResult;
|
|
185
|
+
onSuccess?: (payload: any, output: any, params: SuccessFnParams<any>) => Promise<void>;
|
|
186
|
+
onFailure?: (payload: any, error: unknown, params: FailureFnParams<any>) => Promise<void>;
|
|
187
|
+
onStart?: (payload: any, params: StartFnParams) => Promise<void>;
|
|
188
|
+
};
|
|
189
|
+
};
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Contains two parts: the first part is the seconds, the second part is the nanoseconds.
|
|
193
|
+
*
|
|
194
|
+
*/
|
|
195
|
+
type ClockTime = [number, number];
|
|
196
|
+
interface Clock {
|
|
197
|
+
preciseNow(): ClockTime;
|
|
198
|
+
reset(): void;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
type UsageSample = {
|
|
202
|
+
cpuTime: number;
|
|
203
|
+
wallTime: number;
|
|
204
|
+
};
|
|
205
|
+
interface UsageMeasurement {
|
|
206
|
+
sample(): UsageSample;
|
|
207
|
+
}
|
|
208
|
+
interface UsageManager {
|
|
209
|
+
disable(): void;
|
|
210
|
+
start(): UsageMeasurement;
|
|
211
|
+
stop(measurement: UsageMeasurement): UsageSample;
|
|
212
|
+
sample(): UsageSample | undefined;
|
|
213
|
+
pauseAsync<T>(cb: () => Promise<T>): Promise<T>;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
declare class UsageAPI implements UsageManager {
|
|
217
|
+
#private;
|
|
218
|
+
private static _instance?;
|
|
219
|
+
private constructor();
|
|
220
|
+
static getInstance(): UsageAPI;
|
|
221
|
+
setGlobalUsageManager(manager: UsageManager): boolean;
|
|
222
|
+
disable(): void;
|
|
223
|
+
start(): UsageMeasurement;
|
|
224
|
+
stop(measurement: UsageMeasurement): UsageSample;
|
|
225
|
+
pauseAsync<T>(cb: () => Promise<T>): Promise<T>;
|
|
226
|
+
sample(): UsageSample | undefined;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/** Entrypoint for usage API */
|
|
230
|
+
declare const usage: UsageAPI;
|
|
231
|
+
|
|
232
|
+
interface TaskCatalog {
|
|
233
|
+
registerTaskMetadata(task: TaskMetadataWithFunctions): void;
|
|
234
|
+
updateTaskMetadata(id: string, task: Partial<TaskMetadataWithFunctions>): void;
|
|
235
|
+
registerTaskFileMetadata(id: string, metadata: TaskFileMetadata): void;
|
|
236
|
+
getAllTaskMetadata(): Array<TaskMetadataWithFilePath>;
|
|
237
|
+
getTaskMetadata(id: string): TaskMetadataWithFilePath | undefined;
|
|
238
|
+
getTask(id: string): TaskMetadataWithFunctions | undefined;
|
|
239
|
+
taskExists(id: string): boolean;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
export { type Clock as C, type FailureFnParams as F, type HandleErrorFunction as H, type InitOutput as I, type LogLevel as L, type MiddlewareFnParams as M, OtelTaskLogger as O, type ProjectConfig as P, type RunFnParams as R, type StartFnParams as S, TriggerTracer as T, type UsageMeasurement as U, type TaskMetadataWithFunctions as a, type ClockTime as b, type TaskCatalog as c, type UsageManager as d, type UsageSample as e, type TaskLogger as f, type InitFnParams as g, type Context as h, type SuccessFnParams as i, type HandleErrorFnParams as j, type HandleErrorModificationOptions as k, logLevels as l, type HandleErrorResult as m, type HandleErrorArgs as n, type ResolveEnvironmentVariablesResult as o, type ResolveEnvironmentVariablesParams as p, type ResolveEnvironmentVariablesFunction as q, usage as u };
|
package/dist/index.d.mts
CHANGED
|
@@ -5713,6 +5713,17 @@ declare const RunJobAutoYieldWithCompletedTaskExecutionErrorSchema: z.ZodObject<
|
|
|
5713
5713
|
output?: string | undefined;
|
|
5714
5714
|
}>;
|
|
5715
5715
|
type RunJobAutoYieldWithCompletedTaskExecutionError = z.infer<typeof RunJobAutoYieldWithCompletedTaskExecutionErrorSchema>;
|
|
5716
|
+
declare const RunJobAutoYieldRateLimitErrorSchema: z.ZodObject<{
|
|
5717
|
+
status: z.ZodLiteral<"AUTO_YIELD_RATE_LIMIT">;
|
|
5718
|
+
reset: z.ZodNumber;
|
|
5719
|
+
}, "strip", z.ZodTypeAny, {
|
|
5720
|
+
status: "AUTO_YIELD_RATE_LIMIT";
|
|
5721
|
+
reset: number;
|
|
5722
|
+
}, {
|
|
5723
|
+
status: "AUTO_YIELD_RATE_LIMIT";
|
|
5724
|
+
reset: number;
|
|
5725
|
+
}>;
|
|
5726
|
+
type RunJobAutoYieldRateLimitError = z.infer<typeof RunJobAutoYieldRateLimitErrorSchema>;
|
|
5716
5727
|
declare const RunJobInvalidPayloadErrorSchema: z.ZodObject<{
|
|
5717
5728
|
status: z.ZodLiteral<"INVALID_PAYLOAD">;
|
|
5718
5729
|
errors: z.ZodArray<z.ZodObject<{
|
|
@@ -6518,6 +6529,15 @@ declare const RunJobErrorResponseSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
6518
6529
|
}, {
|
|
6519
6530
|
status: "YIELD_EXECUTION";
|
|
6520
6531
|
key: string;
|
|
6532
|
+
}>, z.ZodObject<{
|
|
6533
|
+
status: z.ZodLiteral<"AUTO_YIELD_RATE_LIMIT">;
|
|
6534
|
+
reset: z.ZodNumber;
|
|
6535
|
+
}, "strip", z.ZodTypeAny, {
|
|
6536
|
+
status: "AUTO_YIELD_RATE_LIMIT";
|
|
6537
|
+
reset: number;
|
|
6538
|
+
}, {
|
|
6539
|
+
status: "AUTO_YIELD_RATE_LIMIT";
|
|
6540
|
+
reset: number;
|
|
6521
6541
|
}>, z.ZodObject<{
|
|
6522
6542
|
status: z.ZodLiteral<"ERROR">;
|
|
6523
6543
|
error: z.ZodObject<{
|
|
@@ -7663,6 +7683,15 @@ declare const RunJobResumeWithParallelTaskSchema: z.ZodObject<{
|
|
|
7663
7683
|
}, {
|
|
7664
7684
|
status: "YIELD_EXECUTION";
|
|
7665
7685
|
key: string;
|
|
7686
|
+
}>, z.ZodObject<{
|
|
7687
|
+
status: z.ZodLiteral<"AUTO_YIELD_RATE_LIMIT">;
|
|
7688
|
+
reset: z.ZodNumber;
|
|
7689
|
+
}, "strip", z.ZodTypeAny, {
|
|
7690
|
+
status: "AUTO_YIELD_RATE_LIMIT";
|
|
7691
|
+
reset: number;
|
|
7692
|
+
}, {
|
|
7693
|
+
status: "AUTO_YIELD_RATE_LIMIT";
|
|
7694
|
+
reset: number;
|
|
7666
7695
|
}>, z.ZodObject<{
|
|
7667
7696
|
status: z.ZodLiteral<"ERROR">;
|
|
7668
7697
|
error: z.ZodObject<{
|
|
@@ -8685,6 +8714,9 @@ declare const RunJobResumeWithParallelTaskSchema: z.ZodObject<{
|
|
|
8685
8714
|
imageUrl?: string[] | undefined;
|
|
8686
8715
|
}[] | undefined;
|
|
8687
8716
|
output?: string | undefined;
|
|
8717
|
+
} | {
|
|
8718
|
+
status: "AUTO_YIELD_RATE_LIMIT";
|
|
8719
|
+
reset: number;
|
|
8688
8720
|
} | {
|
|
8689
8721
|
status: "INVALID_PAYLOAD";
|
|
8690
8722
|
errors: {
|
|
@@ -8919,6 +8951,9 @@ declare const RunJobResumeWithParallelTaskSchema: z.ZodObject<{
|
|
|
8919
8951
|
imageUrl?: string[] | undefined;
|
|
8920
8952
|
}[] | undefined;
|
|
8921
8953
|
output?: string | undefined;
|
|
8954
|
+
} | {
|
|
8955
|
+
status: "AUTO_YIELD_RATE_LIMIT";
|
|
8956
|
+
reset: number;
|
|
8922
8957
|
} | {
|
|
8923
8958
|
status: "INVALID_PAYLOAD";
|
|
8924
8959
|
errors: {
|
|
@@ -9146,6 +9181,15 @@ declare const RunJobResponseSchema: z.ZodDiscriminatedUnion<"status", [z.ZodObje
|
|
|
9146
9181
|
}, {
|
|
9147
9182
|
status: "YIELD_EXECUTION";
|
|
9148
9183
|
key: string;
|
|
9184
|
+
}>, z.ZodObject<{
|
|
9185
|
+
status: z.ZodLiteral<"AUTO_YIELD_RATE_LIMIT">;
|
|
9186
|
+
reset: z.ZodNumber;
|
|
9187
|
+
}, "strip", z.ZodTypeAny, {
|
|
9188
|
+
status: "AUTO_YIELD_RATE_LIMIT";
|
|
9189
|
+
reset: number;
|
|
9190
|
+
}, {
|
|
9191
|
+
status: "AUTO_YIELD_RATE_LIMIT";
|
|
9192
|
+
reset: number;
|
|
9149
9193
|
}>, z.ZodObject<{
|
|
9150
9194
|
status: z.ZodLiteral<"ERROR">;
|
|
9151
9195
|
error: z.ZodObject<{
|
|
@@ -9853,6 +9897,15 @@ declare const RunJobResponseSchema: z.ZodDiscriminatedUnion<"status", [z.ZodObje
|
|
|
9853
9897
|
}, {
|
|
9854
9898
|
status: "YIELD_EXECUTION";
|
|
9855
9899
|
key: string;
|
|
9900
|
+
}>, z.ZodObject<{
|
|
9901
|
+
status: z.ZodLiteral<"AUTO_YIELD_RATE_LIMIT">;
|
|
9902
|
+
reset: z.ZodNumber;
|
|
9903
|
+
}, "strip", z.ZodTypeAny, {
|
|
9904
|
+
status: "AUTO_YIELD_RATE_LIMIT";
|
|
9905
|
+
reset: number;
|
|
9906
|
+
}, {
|
|
9907
|
+
status: "AUTO_YIELD_RATE_LIMIT";
|
|
9908
|
+
reset: number;
|
|
9856
9909
|
}>, z.ZodObject<{
|
|
9857
9910
|
status: z.ZodLiteral<"ERROR">;
|
|
9858
9911
|
error: z.ZodObject<{
|
|
@@ -10875,6 +10928,9 @@ declare const RunJobResponseSchema: z.ZodDiscriminatedUnion<"status", [z.ZodObje
|
|
|
10875
10928
|
imageUrl?: string[] | undefined;
|
|
10876
10929
|
}[] | undefined;
|
|
10877
10930
|
output?: string | undefined;
|
|
10931
|
+
} | {
|
|
10932
|
+
status: "AUTO_YIELD_RATE_LIMIT";
|
|
10933
|
+
reset: number;
|
|
10878
10934
|
} | {
|
|
10879
10935
|
status: "INVALID_PAYLOAD";
|
|
10880
10936
|
errors: {
|
|
@@ -11109,6 +11165,9 @@ declare const RunJobResponseSchema: z.ZodDiscriminatedUnion<"status", [z.ZodObje
|
|
|
11109
11165
|
imageUrl?: string[] | undefined;
|
|
11110
11166
|
}[] | undefined;
|
|
11111
11167
|
output?: string | undefined;
|
|
11168
|
+
} | {
|
|
11169
|
+
status: "AUTO_YIELD_RATE_LIMIT";
|
|
11170
|
+
reset: number;
|
|
11112
11171
|
} | {
|
|
11113
11172
|
status: "INVALID_PAYLOAD";
|
|
11114
11173
|
errors: {
|
|
@@ -16657,4 +16716,4 @@ declare const PLATFORM_FEATURES: {
|
|
|
16657
16716
|
};
|
|
16658
16717
|
declare function supportsFeature<TFeatureName extends keyof typeof PLATFORM_FEATURES>(featureName: TFeatureName, version: string): boolean;
|
|
16659
16718
|
|
|
16660
|
-
export { API_VERSIONS, type ApiEventLog, ApiEventLogSchema, type AsyncMap, type AutoYieldConfig, AutoYieldConfigSchema, type AutoYieldMetadata, AutoYieldMetadataSchema, type CachedTask, CachedTaskSchema, type CancelRunsForEvent, CancelRunsForEventSchema, type CancelRunsForJob, CancelRunsForJobSchema, type ClientTask, CommonMissingConnectionNotificationPayloadSchema, CommonMissingConnectionNotificationResolvedPayloadSchema, type CompleteTaskBodyInput, CompleteTaskBodyInputSchema, type CompleteTaskBodyOutput, type CompleteTaskBodyV2Input, CompleteTaskBodyV2InputSchema, ConcurrencyLimitOptionsSchema, type ConnectionAuth, ConnectionAuthSchema, type CreateExternalConnectionBody, CreateExternalConnectionBodySchema, type CreateRunResponseBody, CreateRunResponseBodySchema, type CronMetadata, CronMetadataSchema, type CronOptions, CronOptionsSchema, DELIVER_WEBHOOK_REQUEST, type DeliverEventResponse, DeliverEventResponseSchema, type DeserializedJson, DeserializedJsonSchema, DisplayPropertiesSchema, type DisplayProperty, DisplayPropertySchema, type DynamicTriggerEndpointMetadata, DynamicTriggerEndpointMetadataSchema, DynamicTriggerMetadataSchema, EndpointHeadersSchema, type EndpointIndexError, EndpointIndexErrorSchema, type EphemeralEventDispatcherRequestBody, EphemeralEventDispatcherRequestBodySchema, type EphemeralEventDispatcherResponseBody, EphemeralEventDispatcherResponseBodySchema, type ErrorWithStack, ErrorWithStackSchema, type EventExample, EventExampleSchema, EventFilter, EventSpecificationSchema, type ExampleReplacement, ExecuteJobHeadersSchema, ExecuteJobRunMetadataSchema, type FailTaskBodyInput, FailTaskBodyInputSchema, type FailedRunNotification, type FetchOperation, FetchOperationSchema, type FetchPollOperation, FetchPollOperationSchema, type FetchRequestInit, FetchRequestInitSchema, type FetchRetryBackoffStrategy, FetchRetryBackoffStrategySchema, type FetchRetryHeadersStrategy, FetchRetryHeadersStrategySchema, type FetchRetryOptions, FetchRetryOptionsSchema, type FetchRetryStrategy, FetchRetryStrategySchema, type FetchTimeoutOptions, FetchTimeoutOptionsSchema, type GetEndpointIndexResponse, GetEndpointIndexResponseSchema, type GetEvent, GetEventSchema, type GetRun, type GetRunOptions, type GetRunOptionsWithTaskDetails, GetRunSchema, type GetRunStatuses, GetRunStatusesSchema, type GetRunsOptions, GetRunsSchema, HTTPMethodUnionSchema, type HandleTriggerSource, HandleTriggerSourceSchema, type HttpEndpointMetadata, HttpEndpointRequestHeadersSchema, type HttpMethod, type HttpSourceRequestHeaders, HttpSourceRequestHeadersSchema, type HttpSourceResponseMetadata, HttpSourceResponseSchema, type IndexEndpointResponse, IndexEndpointResponseSchema, type IndexEndpointStats, type InitialStatusUpdate, InitializeCronScheduleBodySchema, type InitializeTriggerBody, InitializeTriggerBodySchema, type IntegrationConfig, IntegrationConfigSchema, type IntegrationMetadata, IntegrationMetadataSchema, type IntervalMetadata, IntervalMetadataSchema, type IntervalOptions, IntervalOptionsSchema, type InvokeJobRequestBody, InvokeJobRequestBodySchema, InvokeJobResponseSchema, type InvokeOptions, InvokeOptionsSchema, InvokeTriggerMetadataSchema, type JobMetadata, JobMetadataSchema, type JobRunStatusRecord, JobRunStatusRecordSchema, type KeyValueStoreResponseBody, KeyValueStoreResponseBodySchema, type LogMessage, LogMessageSchema, MISSING_CONNECTION_NOTIFICATION, MISSING_CONNECTION_RESOLVED_NOTIFICATION, type MissingConnectionNotificationPayload, MissingConnectionNotificationPayloadSchema, type MissingConnectionResolvedNotificationPayload, MissingConnectionResolvedNotificationPayloadSchema, MissingDeveloperConnectionNotificationPayloadSchema, MissingDeveloperConnectionResolvedNotificationPayloadSchema, MissingExternalConnectionNotificationPayloadSchema, MissingExternalConnectionResolvedNotificationPayloadSchema, type NormalizedRequest, NormalizedRequestSchema, type NormalizedResponse, NormalizedResponseSchema, type OverridableRunTaskOptions, PLATFORM_FEATURES, PongErrorResponseSchema, type PongResponse, PongResponseSchema, PongSuccessResponseSchema, type PreprocessRunBody, PreprocessRunBodySchema, type PreprocessRunResponse, PreprocessRunResponseSchema, type Prettify, type QueueOptions, QueueOptionsSchema, REGISTER_SOURCE_EVENT_V1, REGISTER_SOURCE_EVENT_V2, REGISTER_WEBHOOK, type RawEvent, RawEventSchema, RedactSchema, type RedactString, RedactStringSchema, type RegisterCronScheduleBody, type RegisterDynamicSchedulePayload, RegisterDynamicSchedulePayloadSchema, RegisterHTTPTriggerSourceBodySchema, type RegisterIntervalScheduleBody, RegisterIntervalScheduleBodySchema, RegisterSMTPTriggerSourceBodySchema, RegisterSQSTriggerSourceBodySchema, type RegisterScheduleBody, RegisterScheduleBodySchema, type RegisterScheduleResponseBody, RegisterScheduleResponseBodySchema, RegisterSourceChannelBodySchema, type RegisterSourceEventOptions, RegisterSourceEventSchemaV1, RegisterSourceEventSchemaV2, type RegisterSourceEventV1, type RegisterSourceEventV2, RegisterTriggerBodySchemaV1, RegisterTriggerBodySchemaV2, type RegisterTriggerBodyV1, type RegisterTriggerBodyV2, type RegisterTriggerSource, RegisterTriggerSourceSchema, type RegisterWebhookPayload, RegisterWebhookPayloadSchema, type RegisterWebhookSource, RegisterWebhookSourceSchema, type RegisteredOptionsDiff, type RequestFilter, RequestFilterSchema, RequestWithRawBodySchema, type ResponseFilter, type ResponseFilterMatchResult, ResponseFilterSchema, type RetryOptions, RetryOptionsSchema, type RunJobAutoYieldExecutionError, RunJobAutoYieldExecutionErrorSchema, type RunJobAutoYieldWithCompletedTaskExecutionError, RunJobAutoYieldWithCompletedTaskExecutionErrorSchema, type RunJobBody, RunJobBodySchema, type RunJobCanceledWithTask, RunJobCanceledWithTaskSchema, type RunJobError, type RunJobErrorResponse, RunJobErrorResponseSchema, RunJobErrorSchema, type RunJobInvalidPayloadError, RunJobInvalidPayloadErrorSchema, type RunJobResponse, RunJobResponseSchema, type RunJobResumeWithParallelTask, RunJobResumeWithParallelTaskSchema, type RunJobResumeWithTask, RunJobResumeWithTaskSchema, type RunJobRetryWithTask, RunJobRetryWithTaskSchema, type RunJobSuccess, RunJobSuccessSchema, type RunJobUnresolvedAuthError, RunJobUnresolvedAuthErrorSchema, type RunJobYieldExecutionError, RunJobYieldExecutionErrorSchema, type RunNotification, type RunNotificationAccountMetadata, type RunNotificationEnvMetadata, type RunNotificationInvocationMetadata, type RunNotificationJobMetadata, type RunNotificationOrgMetadata, type RunNotificationProjectMetadata, type RunNotificationRunMetadata, type RunSourceContext, RunSourceContextSchema, RunStatusSchema, type RunTaskBodyInput, RunTaskBodyInputSchema, type RunTaskBodyOutput, RunTaskBodyOutputSchema, type RunTaskOptions, RunTaskOptionsSchema, type RunTaskResponseWithCachedTasksBody, RunTaskResponseWithCachedTasksBodySchema, RunTaskSchema, type RunTaskWithSubtasks, type RuntimeEnvironmentType, RuntimeEnvironmentTypeSchema, SCHEDULED_EVENT, type ScheduleMetadata, ScheduleMetadataSchema, type ScheduledPayload, ScheduledPayloadSchema, ScheduledTriggerMetadataSchema, type SchemaError, SchemaErrorSchema, SendBulkEventsBodySchema, type SendEvent, type SendEventBody, SendEventBodySchema, type SendEventOptions, SendEventOptionsSchema, type SerializableJson, SerializableJsonSchema, type ServerTask, ServerTaskSchema, type SourceEventOption, type SourceMetadataV1, type SourceMetadataV2, SourceMetadataV2Schema, StaticTriggerMetadataSchema, type StatusHistory, StatusHistorySchema, type StatusUpdate, type StatusUpdateData, StatusUpdateSchema, type StatusUpdateState, StatusUpdateStateSchema, type StringMatch, type Style, type StyleName, StyleSchema, type SuccessfulRunNotification, TaskSchema, type TaskStatus, TaskStatusSchema, TriggerHelpSchema, type TriggerMetadata, TriggerMetadataSchema, type TriggerSource, TriggerSourceSchema, type UpdateTriggerSourceBodyV1, UpdateTriggerSourceBodyV1Schema, type UpdateTriggerSourceBodyV2, UpdateTriggerSourceBodyV2Schema, type UpdateWebhookBody, UpdateWebhookBodySchema, ValidateErrorResponseSchema, type ValidateResponse, ValidateResponseSchema, ValidateSuccessResponseSchema, type WebhookContextMetadata, WebhookContextMetadataSchema, type WebhookDeliveryResponse, WebhookDeliveryResponseSchema, type WebhookMetadata, WebhookMetadataSchema, type WebhookSourceRequestHeaders, WebhookSourceRequestHeadersSchema, addMissingVersionField, assertExhaustive, calculateResetAt, calculateRetryAt, currentDate, currentTimestampMilliseconds, currentTimestampSeconds, deepMergeFilters, parseEndpointIndexStats, replacements, requestFilterMatches, responseFilterMatches, supportsFeature, urlWithSearchParams };
|
|
16719
|
+
export { API_VERSIONS, type ApiEventLog, ApiEventLogSchema, type AsyncMap, type AutoYieldConfig, AutoYieldConfigSchema, type AutoYieldMetadata, AutoYieldMetadataSchema, type CachedTask, CachedTaskSchema, type CancelRunsForEvent, CancelRunsForEventSchema, type CancelRunsForJob, CancelRunsForJobSchema, type ClientTask, CommonMissingConnectionNotificationPayloadSchema, CommonMissingConnectionNotificationResolvedPayloadSchema, type CompleteTaskBodyInput, CompleteTaskBodyInputSchema, type CompleteTaskBodyOutput, type CompleteTaskBodyV2Input, CompleteTaskBodyV2InputSchema, ConcurrencyLimitOptionsSchema, type ConnectionAuth, ConnectionAuthSchema, type CreateExternalConnectionBody, CreateExternalConnectionBodySchema, type CreateRunResponseBody, CreateRunResponseBodySchema, type CronMetadata, CronMetadataSchema, type CronOptions, CronOptionsSchema, DELIVER_WEBHOOK_REQUEST, type DeliverEventResponse, DeliverEventResponseSchema, type DeserializedJson, DeserializedJsonSchema, DisplayPropertiesSchema, type DisplayProperty, DisplayPropertySchema, type DynamicTriggerEndpointMetadata, DynamicTriggerEndpointMetadataSchema, DynamicTriggerMetadataSchema, EndpointHeadersSchema, type EndpointIndexError, EndpointIndexErrorSchema, type EphemeralEventDispatcherRequestBody, EphemeralEventDispatcherRequestBodySchema, type EphemeralEventDispatcherResponseBody, EphemeralEventDispatcherResponseBodySchema, type ErrorWithStack, ErrorWithStackSchema, type EventExample, EventExampleSchema, EventFilter, EventSpecificationSchema, type ExampleReplacement, ExecuteJobHeadersSchema, ExecuteJobRunMetadataSchema, type FailTaskBodyInput, FailTaskBodyInputSchema, type FailedRunNotification, type FetchOperation, FetchOperationSchema, type FetchPollOperation, FetchPollOperationSchema, type FetchRequestInit, FetchRequestInitSchema, type FetchRetryBackoffStrategy, FetchRetryBackoffStrategySchema, type FetchRetryHeadersStrategy, FetchRetryHeadersStrategySchema, type FetchRetryOptions, FetchRetryOptionsSchema, type FetchRetryStrategy, FetchRetryStrategySchema, type FetchTimeoutOptions, FetchTimeoutOptionsSchema, type GetEndpointIndexResponse, GetEndpointIndexResponseSchema, type GetEvent, GetEventSchema, type GetRun, type GetRunOptions, type GetRunOptionsWithTaskDetails, GetRunSchema, type GetRunStatuses, GetRunStatusesSchema, type GetRunsOptions, GetRunsSchema, HTTPMethodUnionSchema, type HandleTriggerSource, HandleTriggerSourceSchema, type HttpEndpointMetadata, HttpEndpointRequestHeadersSchema, type HttpMethod, type HttpSourceRequestHeaders, HttpSourceRequestHeadersSchema, type HttpSourceResponseMetadata, HttpSourceResponseSchema, type IndexEndpointResponse, IndexEndpointResponseSchema, type IndexEndpointStats, type InitialStatusUpdate, InitializeCronScheduleBodySchema, type InitializeTriggerBody, InitializeTriggerBodySchema, type IntegrationConfig, IntegrationConfigSchema, type IntegrationMetadata, IntegrationMetadataSchema, type IntervalMetadata, IntervalMetadataSchema, type IntervalOptions, IntervalOptionsSchema, type InvokeJobRequestBody, InvokeJobRequestBodySchema, InvokeJobResponseSchema, type InvokeOptions, InvokeOptionsSchema, InvokeTriggerMetadataSchema, type JobMetadata, JobMetadataSchema, type JobRunStatusRecord, JobRunStatusRecordSchema, type KeyValueStoreResponseBody, KeyValueStoreResponseBodySchema, type LogMessage, LogMessageSchema, MISSING_CONNECTION_NOTIFICATION, MISSING_CONNECTION_RESOLVED_NOTIFICATION, type MissingConnectionNotificationPayload, MissingConnectionNotificationPayloadSchema, type MissingConnectionResolvedNotificationPayload, MissingConnectionResolvedNotificationPayloadSchema, MissingDeveloperConnectionNotificationPayloadSchema, MissingDeveloperConnectionResolvedNotificationPayloadSchema, MissingExternalConnectionNotificationPayloadSchema, MissingExternalConnectionResolvedNotificationPayloadSchema, type NormalizedRequest, NormalizedRequestSchema, type NormalizedResponse, NormalizedResponseSchema, type OverridableRunTaskOptions, PLATFORM_FEATURES, PongErrorResponseSchema, type PongResponse, PongResponseSchema, PongSuccessResponseSchema, type PreprocessRunBody, PreprocessRunBodySchema, type PreprocessRunResponse, PreprocessRunResponseSchema, type Prettify, type QueueOptions, QueueOptionsSchema, REGISTER_SOURCE_EVENT_V1, REGISTER_SOURCE_EVENT_V2, REGISTER_WEBHOOK, type RawEvent, RawEventSchema, RedactSchema, type RedactString, RedactStringSchema, type RegisterCronScheduleBody, type RegisterDynamicSchedulePayload, RegisterDynamicSchedulePayloadSchema, RegisterHTTPTriggerSourceBodySchema, type RegisterIntervalScheduleBody, RegisterIntervalScheduleBodySchema, RegisterSMTPTriggerSourceBodySchema, RegisterSQSTriggerSourceBodySchema, type RegisterScheduleBody, RegisterScheduleBodySchema, type RegisterScheduleResponseBody, RegisterScheduleResponseBodySchema, RegisterSourceChannelBodySchema, type RegisterSourceEventOptions, RegisterSourceEventSchemaV1, RegisterSourceEventSchemaV2, type RegisterSourceEventV1, type RegisterSourceEventV2, RegisterTriggerBodySchemaV1, RegisterTriggerBodySchemaV2, type RegisterTriggerBodyV1, type RegisterTriggerBodyV2, type RegisterTriggerSource, RegisterTriggerSourceSchema, type RegisterWebhookPayload, RegisterWebhookPayloadSchema, type RegisterWebhookSource, RegisterWebhookSourceSchema, type RegisteredOptionsDiff, type RequestFilter, RequestFilterSchema, RequestWithRawBodySchema, type ResponseFilter, type ResponseFilterMatchResult, ResponseFilterSchema, type RetryOptions, RetryOptionsSchema, type RunJobAutoYieldExecutionError, RunJobAutoYieldExecutionErrorSchema, type RunJobAutoYieldRateLimitError, RunJobAutoYieldRateLimitErrorSchema, type RunJobAutoYieldWithCompletedTaskExecutionError, RunJobAutoYieldWithCompletedTaskExecutionErrorSchema, type RunJobBody, RunJobBodySchema, type RunJobCanceledWithTask, RunJobCanceledWithTaskSchema, type RunJobError, type RunJobErrorResponse, RunJobErrorResponseSchema, RunJobErrorSchema, type RunJobInvalidPayloadError, RunJobInvalidPayloadErrorSchema, type RunJobResponse, RunJobResponseSchema, type RunJobResumeWithParallelTask, RunJobResumeWithParallelTaskSchema, type RunJobResumeWithTask, RunJobResumeWithTaskSchema, type RunJobRetryWithTask, RunJobRetryWithTaskSchema, type RunJobSuccess, RunJobSuccessSchema, type RunJobUnresolvedAuthError, RunJobUnresolvedAuthErrorSchema, type RunJobYieldExecutionError, RunJobYieldExecutionErrorSchema, type RunNotification, type RunNotificationAccountMetadata, type RunNotificationEnvMetadata, type RunNotificationInvocationMetadata, type RunNotificationJobMetadata, type RunNotificationOrgMetadata, type RunNotificationProjectMetadata, type RunNotificationRunMetadata, type RunSourceContext, RunSourceContextSchema, RunStatusSchema, type RunTaskBodyInput, RunTaskBodyInputSchema, type RunTaskBodyOutput, RunTaskBodyOutputSchema, type RunTaskOptions, RunTaskOptionsSchema, type RunTaskResponseWithCachedTasksBody, RunTaskResponseWithCachedTasksBodySchema, RunTaskSchema, type RunTaskWithSubtasks, type RuntimeEnvironmentType, RuntimeEnvironmentTypeSchema, SCHEDULED_EVENT, type ScheduleMetadata, ScheduleMetadataSchema, type ScheduledPayload, ScheduledPayloadSchema, ScheduledTriggerMetadataSchema, type SchemaError, SchemaErrorSchema, SendBulkEventsBodySchema, type SendEvent, type SendEventBody, SendEventBodySchema, type SendEventOptions, SendEventOptionsSchema, type SerializableJson, SerializableJsonSchema, type ServerTask, ServerTaskSchema, type SourceEventOption, type SourceMetadataV1, type SourceMetadataV2, SourceMetadataV2Schema, StaticTriggerMetadataSchema, type StatusHistory, StatusHistorySchema, type StatusUpdate, type StatusUpdateData, StatusUpdateSchema, type StatusUpdateState, StatusUpdateStateSchema, type StringMatch, type Style, type StyleName, StyleSchema, type SuccessfulRunNotification, TaskSchema, type TaskStatus, TaskStatusSchema, TriggerHelpSchema, type TriggerMetadata, TriggerMetadataSchema, type TriggerSource, TriggerSourceSchema, type UpdateTriggerSourceBodyV1, UpdateTriggerSourceBodyV1Schema, type UpdateTriggerSourceBodyV2, UpdateTriggerSourceBodyV2Schema, type UpdateWebhookBody, UpdateWebhookBodySchema, ValidateErrorResponseSchema, type ValidateResponse, ValidateResponseSchema, ValidateSuccessResponseSchema, type WebhookContextMetadata, WebhookContextMetadataSchema, type WebhookDeliveryResponse, WebhookDeliveryResponseSchema, type WebhookMetadata, WebhookMetadataSchema, type WebhookSourceRequestHeaders, WebhookSourceRequestHeadersSchema, addMissingVersionField, assertExhaustive, calculateResetAt, calculateRetryAt, currentDate, currentTimestampMilliseconds, currentTimestampSeconds, deepMergeFilters, parseEndpointIndexStats, replacements, requestFilterMatches, responseFilterMatches, supportsFeature, urlWithSearchParams };
|