@trigger.dev/sdk 0.0.0-prerelease-20241119135607 → 0.0.0-prerelease-20241119153006
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/commonjs/apiClient.d.ts +53 -63
- package/dist/commonjs/io.d.ts +7 -19
- package/dist/commonjs/status.d.ts +1 -1
- package/dist/commonjs/triggerClient.d.ts +11 -21
- package/dist/commonjs/triggers/invokeTrigger.d.ts +1 -1
- package/dist/commonjs/triggers/scheduled.d.ts +2 -2
- package/dist/commonjs/types.d.ts +6 -6
- package/dist/commonjs/v3/runs.d.ts +61 -61
- package/dist/commonjs/version.js +1 -1
- package/dist/esm/apiClient.d.ts +53 -63
- package/dist/esm/io.d.ts +7 -19
- package/dist/esm/status.d.ts +1 -1
- package/dist/esm/triggerClient.d.ts +9 -21
- package/dist/esm/triggers/invokeTrigger.d.ts +1 -1
- package/dist/esm/triggers/scheduled.d.ts +2 -2
- package/dist/esm/types.d.ts +2 -2
- package/dist/esm/v3/runs.d.ts +55 -55
- package/dist/esm/version.js +1 -1
- package/package.json +3 -3
|
@@ -26,153 +26,153 @@ export type PollOptions = {
|
|
|
26
26
|
declare function poll<TRunId extends AnyRunHandle | AnyTask | string>(runId: RunId<TRunId>, options?: {
|
|
27
27
|
pollIntervalMs?: number;
|
|
28
28
|
}, requestOptions?: ApiRequestOptions): Promise<{
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
status: "COMPLETED" | "CANCELED" | "QUEUED" | "TIMED_OUT" | "EXECUTING" | "FAILED" | "WAITING_FOR_DEPLOY" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
|
|
30
|
+
id: string;
|
|
31
31
|
error?: {
|
|
32
32
|
message: string;
|
|
33
33
|
name?: string | undefined;
|
|
34
34
|
stackTrace?: string | undefined;
|
|
35
35
|
} | undefined;
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
idempotencyKey?: string | undefined;
|
|
37
|
+
startedAt?: Date | undefined;
|
|
38
|
+
updatedAt: Date;
|
|
39
|
+
isTest: boolean;
|
|
40
|
+
version?: string | undefined;
|
|
41
|
+
metadata?: Record<string, any> | undefined;
|
|
42
|
+
createdAt: Date;
|
|
38
43
|
schedule?: {
|
|
39
44
|
id: string;
|
|
40
45
|
generator: {
|
|
41
|
-
description: string;
|
|
42
46
|
type: "CRON";
|
|
47
|
+
description: string;
|
|
43
48
|
expression: string;
|
|
44
49
|
};
|
|
45
50
|
externalId?: string | undefined;
|
|
46
51
|
deduplicationKey?: string | undefined;
|
|
47
52
|
} | undefined;
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
53
|
+
tags: string[];
|
|
54
|
+
taskIdentifier: string;
|
|
55
|
+
attempts: ({
|
|
56
|
+
status: "PENDING" | "COMPLETED" | "CANCELED" | "EXECUTING" | "FAILED" | "PAUSED";
|
|
57
|
+
id: string;
|
|
58
|
+
updatedAt: Date;
|
|
59
|
+
createdAt: Date;
|
|
60
|
+
startedAt?: Date | undefined;
|
|
61
|
+
completedAt?: Date | undefined;
|
|
62
|
+
error?: {
|
|
63
|
+
message: string;
|
|
64
|
+
name?: string | undefined;
|
|
65
|
+
stackTrace?: string | undefined;
|
|
66
|
+
} | undefined;
|
|
67
|
+
} | undefined)[];
|
|
51
68
|
durationMs: number;
|
|
52
69
|
costInCents: number;
|
|
53
70
|
baseCostInCents: number;
|
|
71
|
+
attemptCount: number;
|
|
72
|
+
depth: number;
|
|
73
|
+
triggerFunction: "trigger" | "triggerAndWait" | "batchTriggerAndWait" | "batchTrigger";
|
|
74
|
+
isQueued: boolean;
|
|
75
|
+
isExecuting: boolean;
|
|
76
|
+
isCompleted: boolean;
|
|
77
|
+
isSuccess: boolean;
|
|
78
|
+
isFailed: boolean;
|
|
79
|
+
isCancelled: boolean;
|
|
54
80
|
relatedRuns: {
|
|
55
81
|
root?: {
|
|
56
|
-
status: "
|
|
82
|
+
status: "COMPLETED" | "CANCELED" | "QUEUED" | "TIMED_OUT" | "EXECUTING" | "FAILED" | "WAITING_FOR_DEPLOY" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
|
|
57
83
|
id: string;
|
|
58
|
-
|
|
84
|
+
updatedAt: Date;
|
|
59
85
|
isTest: boolean;
|
|
60
86
|
createdAt: Date;
|
|
87
|
+
tags: string[];
|
|
61
88
|
durationMs: number;
|
|
62
89
|
costInCents: number;
|
|
63
90
|
baseCostInCents: number;
|
|
64
91
|
taskIdentifier: string;
|
|
65
92
|
depth: number;
|
|
66
|
-
triggerFunction: "
|
|
93
|
+
triggerFunction: "trigger" | "triggerAndWait" | "batchTriggerAndWait" | "batchTrigger";
|
|
67
94
|
isQueued: boolean;
|
|
68
95
|
isExecuting: boolean;
|
|
69
96
|
isCompleted: boolean;
|
|
70
97
|
isSuccess: boolean;
|
|
71
98
|
isFailed: boolean;
|
|
72
99
|
isCancelled: boolean;
|
|
73
|
-
|
|
74
|
-
batchId?: string | undefined;
|
|
75
|
-
idempotencyKey?: string | undefined;
|
|
100
|
+
metadata?: Record<string, any> | undefined;
|
|
76
101
|
version?: string | undefined;
|
|
77
102
|
startedAt?: Date | undefined;
|
|
103
|
+
idempotencyKey?: string | undefined;
|
|
104
|
+
ttl?: string | undefined;
|
|
105
|
+
batchId?: string | undefined;
|
|
78
106
|
finishedAt?: Date | undefined;
|
|
79
107
|
delayedUntil?: Date | undefined;
|
|
80
|
-
ttl?: string | undefined;
|
|
81
108
|
expiredAt?: Date | undefined;
|
|
82
|
-
metadata?: Record<string, any> | undefined;
|
|
83
109
|
} | undefined;
|
|
84
110
|
parent?: {
|
|
85
|
-
status: "
|
|
111
|
+
status: "COMPLETED" | "CANCELED" | "QUEUED" | "TIMED_OUT" | "EXECUTING" | "FAILED" | "WAITING_FOR_DEPLOY" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
|
|
86
112
|
id: string;
|
|
87
|
-
|
|
113
|
+
updatedAt: Date;
|
|
88
114
|
isTest: boolean;
|
|
89
115
|
createdAt: Date;
|
|
116
|
+
tags: string[];
|
|
90
117
|
durationMs: number;
|
|
91
118
|
costInCents: number;
|
|
92
119
|
baseCostInCents: number;
|
|
93
120
|
taskIdentifier: string;
|
|
94
121
|
depth: number;
|
|
95
|
-
triggerFunction: "
|
|
122
|
+
triggerFunction: "trigger" | "triggerAndWait" | "batchTriggerAndWait" | "batchTrigger";
|
|
96
123
|
isQueued: boolean;
|
|
97
124
|
isExecuting: boolean;
|
|
98
125
|
isCompleted: boolean;
|
|
99
126
|
isSuccess: boolean;
|
|
100
127
|
isFailed: boolean;
|
|
101
128
|
isCancelled: boolean;
|
|
102
|
-
|
|
103
|
-
batchId?: string | undefined;
|
|
104
|
-
idempotencyKey?: string | undefined;
|
|
129
|
+
metadata?: Record<string, any> | undefined;
|
|
105
130
|
version?: string | undefined;
|
|
106
131
|
startedAt?: Date | undefined;
|
|
132
|
+
idempotencyKey?: string | undefined;
|
|
133
|
+
ttl?: string | undefined;
|
|
134
|
+
batchId?: string | undefined;
|
|
107
135
|
finishedAt?: Date | undefined;
|
|
108
136
|
delayedUntil?: Date | undefined;
|
|
109
|
-
ttl?: string | undefined;
|
|
110
137
|
expiredAt?: Date | undefined;
|
|
111
|
-
metadata?: Record<string, any> | undefined;
|
|
112
138
|
} | undefined;
|
|
113
139
|
children?: {
|
|
114
|
-
status: "
|
|
140
|
+
status: "COMPLETED" | "CANCELED" | "QUEUED" | "TIMED_OUT" | "EXECUTING" | "FAILED" | "WAITING_FOR_DEPLOY" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
|
|
115
141
|
id: string;
|
|
116
|
-
|
|
142
|
+
updatedAt: Date;
|
|
117
143
|
isTest: boolean;
|
|
118
144
|
createdAt: Date;
|
|
145
|
+
tags: string[];
|
|
119
146
|
durationMs: number;
|
|
120
147
|
costInCents: number;
|
|
121
148
|
baseCostInCents: number;
|
|
122
149
|
taskIdentifier: string;
|
|
123
150
|
depth: number;
|
|
124
|
-
triggerFunction: "
|
|
151
|
+
triggerFunction: "trigger" | "triggerAndWait" | "batchTriggerAndWait" | "batchTrigger";
|
|
125
152
|
isQueued: boolean;
|
|
126
153
|
isExecuting: boolean;
|
|
127
154
|
isCompleted: boolean;
|
|
128
155
|
isSuccess: boolean;
|
|
129
156
|
isFailed: boolean;
|
|
130
157
|
isCancelled: boolean;
|
|
131
|
-
|
|
132
|
-
batchId?: string | undefined;
|
|
133
|
-
idempotencyKey?: string | undefined;
|
|
158
|
+
metadata?: Record<string, any> | undefined;
|
|
134
159
|
version?: string | undefined;
|
|
135
160
|
startedAt?: Date | undefined;
|
|
161
|
+
idempotencyKey?: string | undefined;
|
|
162
|
+
ttl?: string | undefined;
|
|
163
|
+
batchId?: string | undefined;
|
|
136
164
|
finishedAt?: Date | undefined;
|
|
137
165
|
delayedUntil?: Date | undefined;
|
|
138
|
-
ttl?: string | undefined;
|
|
139
166
|
expiredAt?: Date | undefined;
|
|
140
|
-
metadata?: Record<string, any> | undefined;
|
|
141
167
|
}[] | undefined;
|
|
142
168
|
};
|
|
143
|
-
|
|
144
|
-
triggerFunction: "triggerAndWait" | "trigger" | "batchTriggerAndWait" | "batchTrigger";
|
|
145
|
-
isQueued: boolean;
|
|
146
|
-
isExecuting: boolean;
|
|
147
|
-
isCompleted: boolean;
|
|
148
|
-
isSuccess: boolean;
|
|
149
|
-
isFailed: boolean;
|
|
150
|
-
isCancelled: boolean;
|
|
151
|
-
updatedAt: Date;
|
|
152
|
-
attempts: ({
|
|
153
|
-
status: "EXECUTING" | "COMPLETED" | "CANCELED" | "FAILED" | "PENDING" | "PAUSED";
|
|
154
|
-
id: string;
|
|
155
|
-
createdAt: Date;
|
|
156
|
-
updatedAt: Date;
|
|
157
|
-
startedAt?: Date | undefined;
|
|
158
|
-
completedAt?: Date | undefined;
|
|
159
|
-
error?: {
|
|
160
|
-
message: string;
|
|
161
|
-
name?: string | undefined;
|
|
162
|
-
stackTrace?: string | undefined;
|
|
163
|
-
} | undefined;
|
|
164
|
-
} | undefined)[];
|
|
165
|
-
attemptCount: number;
|
|
166
|
-
payloadPresignedUrl?: string | undefined;
|
|
167
|
-
outputPresignedUrl?: string | undefined;
|
|
169
|
+
ttl?: string | undefined;
|
|
168
170
|
batchId?: string | undefined;
|
|
169
|
-
idempotencyKey?: string | undefined;
|
|
170
|
-
startedAt?: Date | undefined;
|
|
171
171
|
finishedAt?: Date | undefined;
|
|
172
172
|
delayedUntil?: Date | undefined;
|
|
173
|
-
ttl?: string | undefined;
|
|
174
173
|
expiredAt?: Date | undefined;
|
|
175
|
-
|
|
174
|
+
payloadPresignedUrl?: string | undefined;
|
|
175
|
+
outputPresignedUrl?: string | undefined;
|
|
176
176
|
output?: InferRunTypes<TRunId>["output"] | undefined;
|
|
177
177
|
payload?: InferRunTypes<TRunId>["payload"] | undefined;
|
|
178
178
|
}>;
|
package/dist/commonjs/version.js
CHANGED
package/dist/esm/apiClient.d.ts
CHANGED
|
@@ -41,28 +41,15 @@ export declare class ApiClient {
|
|
|
41
41
|
cachedTasksCursor?: string;
|
|
42
42
|
}): Promise<VersionedResponseBody<{
|
|
43
43
|
"2023-09-29": z.ZodObject<{
|
|
44
|
-
task: z.ZodObject<{
|
|
45
|
-
name: z.ZodString;
|
|
46
|
-
params: z.ZodNullable<z.ZodOptional<z.ZodType<import("@trigger.dev/core").DeserializedJson, z.ZodTypeDef, import("@trigger.dev/core").DeserializedJson>>>;
|
|
47
|
-
status: z.ZodEnum<["PENDING", "WAITING", "RUNNING", "COMPLETED", "ERRORED", "CANCELED"]>;
|
|
48
|
-
error: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
49
|
-
context: z.ZodNullable<z.ZodOptional<z.ZodType<import("@trigger.dev/core").DeserializedJson, z.ZodTypeDef, import("@trigger.dev/core").DeserializedJson>>>;
|
|
44
|
+
task: z.ZodObject<z.objectUtil.extendShape<{
|
|
50
45
|
id: z.ZodString;
|
|
51
|
-
|
|
52
|
-
style: z.ZodEnum<["normal", "minimal"]>;
|
|
53
|
-
variant: z.ZodOptional<z.ZodString>;
|
|
54
|
-
}, "strip", z.ZodTypeAny, {
|
|
55
|
-
style: "normal" | "minimal";
|
|
56
|
-
variant?: string | undefined;
|
|
57
|
-
}, {
|
|
58
|
-
style: "normal" | "minimal";
|
|
59
|
-
variant?: string | undefined;
|
|
60
|
-
}>>>;
|
|
46
|
+
name: z.ZodString;
|
|
61
47
|
icon: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
62
48
|
noop: z.ZodBoolean;
|
|
63
49
|
startedAt: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
|
|
64
50
|
completedAt: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
|
|
65
51
|
delayUntil: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
|
|
52
|
+
status: z.ZodEnum<["PENDING", "WAITING", "RUNNING", "COMPLETED", "ERRORED", "CANCELED"]>;
|
|
66
53
|
description: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
67
54
|
properties: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
68
55
|
label: z.ZodString;
|
|
@@ -96,15 +83,29 @@ export declare class ApiClient {
|
|
|
96
83
|
url?: string | undefined;
|
|
97
84
|
imageUrl?: string[] | undefined;
|
|
98
85
|
}>, "many">>>;
|
|
86
|
+
params: z.ZodNullable<z.ZodOptional<z.ZodType<import("@trigger.dev/core").DeserializedJson, z.ZodTypeDef, import("@trigger.dev/core").DeserializedJson>>>;
|
|
99
87
|
output: z.ZodNullable<z.ZodOptional<z.ZodType<import("@trigger.dev/core").DeserializedJson, z.ZodTypeDef, import("@trigger.dev/core").DeserializedJson>>>;
|
|
88
|
+
context: z.ZodNullable<z.ZodOptional<z.ZodType<import("@trigger.dev/core").DeserializedJson, z.ZodTypeDef, import("@trigger.dev/core").DeserializedJson>>>;
|
|
89
|
+
error: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
100
90
|
parentId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
91
|
+
style: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
92
|
+
style: z.ZodEnum<["normal", "minimal"]>;
|
|
93
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
94
|
+
}, "strip", z.ZodTypeAny, {
|
|
95
|
+
style: "normal" | "minimal";
|
|
96
|
+
variant?: string | undefined;
|
|
97
|
+
}, {
|
|
98
|
+
style: "normal" | "minimal";
|
|
99
|
+
variant?: string | undefined;
|
|
100
|
+
}>>>;
|
|
101
101
|
operation: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
102
102
|
callbackUrl: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
103
103
|
childExecutionMode: z.ZodNullable<z.ZodOptional<z.ZodEnum<["SEQUENTIAL", "PARALLEL"]>>>;
|
|
104
|
+
}, {
|
|
104
105
|
idempotencyKey: z.ZodString;
|
|
105
106
|
attempts: z.ZodNumber;
|
|
106
107
|
forceYield: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
|
|
107
|
-
}
|
|
108
|
+
}>, "strip", z.ZodTypeAny, {
|
|
108
109
|
name: string;
|
|
109
110
|
status: "PENDING" | "WAITING" | "RUNNING" | "COMPLETED" | "ERRORED" | "CANCELED";
|
|
110
111
|
id: string;
|
|
@@ -112,7 +113,6 @@ export declare class ApiClient {
|
|
|
112
113
|
idempotencyKey: string;
|
|
113
114
|
attempts: number;
|
|
114
115
|
params?: import("@trigger.dev/core").DeserializedJson | undefined;
|
|
115
|
-
error?: string | null | undefined;
|
|
116
116
|
context?: import("@trigger.dev/core").DeserializedJson | undefined;
|
|
117
117
|
style?: {
|
|
118
118
|
style: "normal" | "minimal";
|
|
@@ -136,6 +136,7 @@ export declare class ApiClient {
|
|
|
136
136
|
imageUrl?: string[] | undefined;
|
|
137
137
|
}[] | null | undefined;
|
|
138
138
|
output?: import("@trigger.dev/core").DeserializedJson | undefined;
|
|
139
|
+
error?: string | null | undefined;
|
|
139
140
|
parentId?: string | null | undefined;
|
|
140
141
|
operation?: string | null | undefined;
|
|
141
142
|
callbackUrl?: string | null | undefined;
|
|
@@ -149,7 +150,6 @@ export declare class ApiClient {
|
|
|
149
150
|
idempotencyKey: string;
|
|
150
151
|
attempts: number;
|
|
151
152
|
params?: import("@trigger.dev/core").DeserializedJson | undefined;
|
|
152
|
-
error?: string | null | undefined;
|
|
153
153
|
context?: import("@trigger.dev/core").DeserializedJson | undefined;
|
|
154
154
|
style?: {
|
|
155
155
|
style: "normal" | "minimal";
|
|
@@ -173,6 +173,7 @@ export declare class ApiClient {
|
|
|
173
173
|
imageUrl?: string[] | undefined;
|
|
174
174
|
}[] | null | undefined;
|
|
175
175
|
output?: import("@trigger.dev/core").DeserializedJson | undefined;
|
|
176
|
+
error?: string | null | undefined;
|
|
176
177
|
parentId?: string | null | undefined;
|
|
177
178
|
operation?: string | null | undefined;
|
|
178
179
|
callbackUrl?: string | null | undefined;
|
|
@@ -233,7 +234,6 @@ export declare class ApiClient {
|
|
|
233
234
|
idempotencyKey: string;
|
|
234
235
|
attempts: number;
|
|
235
236
|
params?: import("@trigger.dev/core").DeserializedJson | undefined;
|
|
236
|
-
error?: string | null | undefined;
|
|
237
237
|
context?: import("@trigger.dev/core").DeserializedJson | undefined;
|
|
238
238
|
style?: {
|
|
239
239
|
style: "normal" | "minimal";
|
|
@@ -257,6 +257,7 @@ export declare class ApiClient {
|
|
|
257
257
|
imageUrl?: string[] | undefined;
|
|
258
258
|
}[] | null | undefined;
|
|
259
259
|
output?: import("@trigger.dev/core").DeserializedJson | undefined;
|
|
260
|
+
error?: string | null | undefined;
|
|
260
261
|
parentId?: string | null | undefined;
|
|
261
262
|
operation?: string | null | undefined;
|
|
262
263
|
callbackUrl?: string | null | undefined;
|
|
@@ -283,7 +284,6 @@ export declare class ApiClient {
|
|
|
283
284
|
idempotencyKey: string;
|
|
284
285
|
attempts: number;
|
|
285
286
|
params?: import("@trigger.dev/core").DeserializedJson | undefined;
|
|
286
|
-
error?: string | null | undefined;
|
|
287
287
|
context?: import("@trigger.dev/core").DeserializedJson | undefined;
|
|
288
288
|
style?: {
|
|
289
289
|
style: "normal" | "minimal";
|
|
@@ -307,6 +307,7 @@ export declare class ApiClient {
|
|
|
307
307
|
imageUrl?: string[] | undefined;
|
|
308
308
|
}[] | null | undefined;
|
|
309
309
|
output?: import("@trigger.dev/core").DeserializedJson | undefined;
|
|
310
|
+
error?: string | null | undefined;
|
|
310
311
|
parentId?: string | null | undefined;
|
|
311
312
|
operation?: string | null | undefined;
|
|
312
313
|
callbackUrl?: string | null | undefined;
|
|
@@ -325,28 +326,15 @@ export declare class ApiClient {
|
|
|
325
326
|
cursor?: string | undefined;
|
|
326
327
|
} | undefined;
|
|
327
328
|
}>;
|
|
328
|
-
}, z.ZodObject<{
|
|
329
|
-
name: z.ZodString;
|
|
330
|
-
params: z.ZodNullable<z.ZodOptional<z.ZodType<import("@trigger.dev/core").DeserializedJson, z.ZodTypeDef, import("@trigger.dev/core").DeserializedJson>>>;
|
|
331
|
-
status: z.ZodEnum<["PENDING", "WAITING", "RUNNING", "COMPLETED", "ERRORED", "CANCELED"]>;
|
|
332
|
-
error: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
333
|
-
context: z.ZodNullable<z.ZodOptional<z.ZodType<import("@trigger.dev/core").DeserializedJson, z.ZodTypeDef, import("@trigger.dev/core").DeserializedJson>>>;
|
|
329
|
+
}, z.ZodObject<z.objectUtil.extendShape<{
|
|
334
330
|
id: z.ZodString;
|
|
335
|
-
|
|
336
|
-
style: z.ZodEnum<["normal", "minimal"]>;
|
|
337
|
-
variant: z.ZodOptional<z.ZodString>;
|
|
338
|
-
}, "strip", z.ZodTypeAny, {
|
|
339
|
-
style: "normal" | "minimal";
|
|
340
|
-
variant?: string | undefined;
|
|
341
|
-
}, {
|
|
342
|
-
style: "normal" | "minimal";
|
|
343
|
-
variant?: string | undefined;
|
|
344
|
-
}>>>;
|
|
331
|
+
name: z.ZodString;
|
|
345
332
|
icon: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
346
333
|
noop: z.ZodBoolean;
|
|
347
334
|
startedAt: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
|
|
348
335
|
completedAt: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
|
|
349
336
|
delayUntil: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
|
|
337
|
+
status: z.ZodEnum<["PENDING", "WAITING", "RUNNING", "COMPLETED", "ERRORED", "CANCELED"]>;
|
|
350
338
|
description: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
351
339
|
properties: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
352
340
|
label: z.ZodString;
|
|
@@ -380,15 +368,29 @@ export declare class ApiClient {
|
|
|
380
368
|
url?: string | undefined;
|
|
381
369
|
imageUrl?: string[] | undefined;
|
|
382
370
|
}>, "many">>>;
|
|
371
|
+
params: z.ZodNullable<z.ZodOptional<z.ZodType<import("@trigger.dev/core").DeserializedJson, z.ZodTypeDef, import("@trigger.dev/core").DeserializedJson>>>;
|
|
383
372
|
output: z.ZodNullable<z.ZodOptional<z.ZodType<import("@trigger.dev/core").DeserializedJson, z.ZodTypeDef, import("@trigger.dev/core").DeserializedJson>>>;
|
|
373
|
+
context: z.ZodNullable<z.ZodOptional<z.ZodType<import("@trigger.dev/core").DeserializedJson, z.ZodTypeDef, import("@trigger.dev/core").DeserializedJson>>>;
|
|
374
|
+
error: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
384
375
|
parentId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
376
|
+
style: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
377
|
+
style: z.ZodEnum<["normal", "minimal"]>;
|
|
378
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
379
|
+
}, "strip", z.ZodTypeAny, {
|
|
380
|
+
style: "normal" | "minimal";
|
|
381
|
+
variant?: string | undefined;
|
|
382
|
+
}, {
|
|
383
|
+
style: "normal" | "minimal";
|
|
384
|
+
variant?: string | undefined;
|
|
385
|
+
}>>>;
|
|
385
386
|
operation: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
386
387
|
callbackUrl: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
387
388
|
childExecutionMode: z.ZodNullable<z.ZodOptional<z.ZodEnum<["SEQUENTIAL", "PARALLEL"]>>>;
|
|
389
|
+
}, {
|
|
388
390
|
idempotencyKey: z.ZodString;
|
|
389
391
|
attempts: z.ZodNumber;
|
|
390
392
|
forceYield: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
|
|
391
|
-
}
|
|
393
|
+
}>, "strip", z.ZodTypeAny, {
|
|
392
394
|
name: string;
|
|
393
395
|
status: "PENDING" | "WAITING" | "RUNNING" | "COMPLETED" | "ERRORED" | "CANCELED";
|
|
394
396
|
id: string;
|
|
@@ -396,7 +398,6 @@ export declare class ApiClient {
|
|
|
396
398
|
idempotencyKey: string;
|
|
397
399
|
attempts: number;
|
|
398
400
|
params?: import("@trigger.dev/core").DeserializedJson | undefined;
|
|
399
|
-
error?: string | null | undefined;
|
|
400
401
|
context?: import("@trigger.dev/core").DeserializedJson | undefined;
|
|
401
402
|
style?: {
|
|
402
403
|
style: "normal" | "minimal";
|
|
@@ -420,6 +421,7 @@ export declare class ApiClient {
|
|
|
420
421
|
imageUrl?: string[] | undefined;
|
|
421
422
|
}[] | null | undefined;
|
|
422
423
|
output?: import("@trigger.dev/core").DeserializedJson | undefined;
|
|
424
|
+
error?: string | null | undefined;
|
|
423
425
|
parentId?: string | null | undefined;
|
|
424
426
|
operation?: string | null | undefined;
|
|
425
427
|
callbackUrl?: string | null | undefined;
|
|
@@ -433,7 +435,6 @@ export declare class ApiClient {
|
|
|
433
435
|
idempotencyKey: string;
|
|
434
436
|
attempts: number;
|
|
435
437
|
params?: import("@trigger.dev/core").DeserializedJson | undefined;
|
|
436
|
-
error?: string | null | undefined;
|
|
437
438
|
context?: import("@trigger.dev/core").DeserializedJson | undefined;
|
|
438
439
|
style?: {
|
|
439
440
|
style: "normal" | "minimal";
|
|
@@ -457,6 +458,7 @@ export declare class ApiClient {
|
|
|
457
458
|
imageUrl?: string[] | undefined;
|
|
458
459
|
}[] | null | undefined;
|
|
459
460
|
output?: import("@trigger.dev/core").DeserializedJson | undefined;
|
|
461
|
+
error?: string | null | undefined;
|
|
460
462
|
parentId?: string | null | undefined;
|
|
461
463
|
operation?: string | null | undefined;
|
|
462
464
|
callbackUrl?: string | null | undefined;
|
|
@@ -471,7 +473,6 @@ export declare class ApiClient {
|
|
|
471
473
|
idempotencyKey: string;
|
|
472
474
|
attempts: number;
|
|
473
475
|
params?: import("@trigger.dev/core").DeserializedJson | undefined;
|
|
474
|
-
error?: string | null | undefined;
|
|
475
476
|
context?: import("@trigger.dev/core").DeserializedJson | undefined;
|
|
476
477
|
style?: {
|
|
477
478
|
style: "normal" | "minimal";
|
|
@@ -495,6 +496,7 @@ export declare class ApiClient {
|
|
|
495
496
|
imageUrl?: string[] | undefined;
|
|
496
497
|
}[] | null | undefined;
|
|
497
498
|
output?: import("@trigger.dev/core").DeserializedJson | undefined;
|
|
499
|
+
error?: string | null | undefined;
|
|
498
500
|
parentId?: string | null | undefined;
|
|
499
501
|
operation?: string | null | undefined;
|
|
500
502
|
callbackUrl?: string | null | undefined;
|
|
@@ -509,7 +511,6 @@ export declare class ApiClient {
|
|
|
509
511
|
idempotencyKey: string;
|
|
510
512
|
attempts: number;
|
|
511
513
|
params?: import("@trigger.dev/core").DeserializedJson | undefined;
|
|
512
|
-
error?: string | null | undefined;
|
|
513
514
|
context?: import("@trigger.dev/core").DeserializedJson | undefined;
|
|
514
515
|
style?: {
|
|
515
516
|
style: "normal" | "minimal";
|
|
@@ -533,6 +534,7 @@ export declare class ApiClient {
|
|
|
533
534
|
imageUrl?: string[] | undefined;
|
|
534
535
|
}[] | null | undefined;
|
|
535
536
|
output?: import("@trigger.dev/core").DeserializedJson | undefined;
|
|
537
|
+
error?: string | null | undefined;
|
|
536
538
|
parentId?: string | null | undefined;
|
|
537
539
|
operation?: string | null | undefined;
|
|
538
540
|
callbackUrl?: string | null | undefined;
|
|
@@ -541,11 +543,7 @@ export declare class ApiClient {
|
|
|
541
543
|
}>;
|
|
542
544
|
sendEvent(event: SendEvent, options?: SendEventOptions): Promise<{
|
|
543
545
|
name: string;
|
|
544
|
-
payload: (
|
|
545
|
-
[key: string]: import("@trigger.dev/core").DeserializedJson;
|
|
546
|
-
} | import("@trigger.dev/core").DeserializedJson[]) & (string | number | boolean | {
|
|
547
|
-
[key: string]: import("@trigger.dev/core").DeserializedJson;
|
|
548
|
-
} | import("@trigger.dev/core").DeserializedJson[] | undefined)) | null;
|
|
546
|
+
payload: import("@trigger.dev/core").DeserializedJson;
|
|
549
547
|
id: string;
|
|
550
548
|
timestamp: Date;
|
|
551
549
|
context?: import("@trigger.dev/core").DeserializedJson | undefined;
|
|
@@ -555,11 +553,7 @@ export declare class ApiClient {
|
|
|
555
553
|
}>;
|
|
556
554
|
sendEvents(events: SendEvent[], options?: SendEventOptions): Promise<{
|
|
557
555
|
name: string;
|
|
558
|
-
payload: (
|
|
559
|
-
[key: string]: import("@trigger.dev/core").DeserializedJson;
|
|
560
|
-
} | import("@trigger.dev/core").DeserializedJson[]) & (string | number | boolean | {
|
|
561
|
-
[key: string]: import("@trigger.dev/core").DeserializedJson;
|
|
562
|
-
} | import("@trigger.dev/core").DeserializedJson[] | undefined)) | null;
|
|
556
|
+
payload: import("@trigger.dev/core").DeserializedJson;
|
|
563
557
|
id: string;
|
|
564
558
|
timestamp: Date;
|
|
565
559
|
context?: import("@trigger.dev/core").DeserializedJson | undefined;
|
|
@@ -569,11 +563,7 @@ export declare class ApiClient {
|
|
|
569
563
|
}[]>;
|
|
570
564
|
cancelEvent(eventId: string): Promise<{
|
|
571
565
|
name: string;
|
|
572
|
-
payload: (
|
|
573
|
-
[key: string]: import("@trigger.dev/core").DeserializedJson;
|
|
574
|
-
} | import("@trigger.dev/core").DeserializedJson[]) & (string | number | boolean | {
|
|
575
|
-
[key: string]: import("@trigger.dev/core").DeserializedJson;
|
|
576
|
-
} | import("@trigger.dev/core").DeserializedJson[] | undefined)) | null;
|
|
566
|
+
payload: import("@trigger.dev/core").DeserializedJson;
|
|
577
567
|
id: string;
|
|
578
568
|
timestamp: Date;
|
|
579
569
|
context?: import("@trigger.dev/core").DeserializedJson | undefined;
|
|
@@ -593,8 +583,8 @@ export declare class ApiClient {
|
|
|
593
583
|
state?: "loading" | "success" | "failure" | undefined;
|
|
594
584
|
data?: Record<string, import("@trigger.dev/core").SerializableJson> | undefined;
|
|
595
585
|
}[];
|
|
596
|
-
data?: Record<string, import("@trigger.dev/core").SerializableJson> | undefined;
|
|
597
586
|
state?: "loading" | "success" | "failure" | undefined;
|
|
587
|
+
data?: Record<string, import("@trigger.dev/core").SerializableJson> | undefined;
|
|
598
588
|
}>;
|
|
599
589
|
updateSource(client: string, key: string, source: UpdateTriggerSourceBodyV2): Promise<TriggerSource>;
|
|
600
590
|
updateWebhook(key: string, webhookData: UpdateWebhookBody): Promise<TriggerSource>;
|
|
@@ -606,15 +596,15 @@ export declare class ApiClient {
|
|
|
606
596
|
cron: string;
|
|
607
597
|
};
|
|
608
598
|
type: "cron";
|
|
609
|
-
accountId?: string | undefined;
|
|
610
599
|
metadata?: any;
|
|
600
|
+
accountId?: string | undefined;
|
|
611
601
|
} | {
|
|
612
602
|
options: {
|
|
613
603
|
seconds: number;
|
|
614
604
|
};
|
|
615
605
|
type: "interval";
|
|
616
|
-
accountId?: string | undefined;
|
|
617
606
|
metadata?: any;
|
|
607
|
+
accountId?: string | undefined;
|
|
618
608
|
};
|
|
619
609
|
active: boolean;
|
|
620
610
|
metadata?: any;
|
|
@@ -655,8 +645,8 @@ export declare class ApiClient {
|
|
|
655
645
|
state?: "loading" | "success" | "failure" | undefined;
|
|
656
646
|
data?: Record<string, import("@trigger.dev/core").SerializableJson> | undefined;
|
|
657
647
|
}[];
|
|
658
|
-
data?: Record<string, import("@trigger.dev/core").SerializableJson> | undefined;
|
|
659
648
|
state?: "loading" | "success" | "failure" | undefined;
|
|
649
|
+
data?: Record<string, import("@trigger.dev/core").SerializableJson> | undefined;
|
|
660
650
|
}[];
|
|
661
651
|
output?: any;
|
|
662
652
|
nextCursor?: string | undefined;
|
|
@@ -676,8 +666,8 @@ export declare class ApiClient {
|
|
|
676
666
|
state?: "loading" | "success" | "failure" | undefined;
|
|
677
667
|
data?: Record<string, import("@trigger.dev/core").SerializableJson> | undefined;
|
|
678
668
|
}[];
|
|
679
|
-
data?: Record<string, import("@trigger.dev/core").SerializableJson> | undefined;
|
|
680
669
|
state?: "loading" | "success" | "failure" | undefined;
|
|
670
|
+
data?: Record<string, import("@trigger.dev/core").SerializableJson> | undefined;
|
|
681
671
|
}[];
|
|
682
672
|
output?: any;
|
|
683
673
|
nextCursor?: string | undefined;
|
|
@@ -691,8 +681,8 @@ export declare class ApiClient {
|
|
|
691
681
|
state?: "loading" | "success" | "failure" | undefined;
|
|
692
682
|
data?: Record<string, import("@trigger.dev/core").SerializableJson> | undefined;
|
|
693
683
|
}[];
|
|
694
|
-
data?: Record<string, import("@trigger.dev/core").SerializableJson> | undefined;
|
|
695
684
|
state?: "loading" | "success" | "failure" | undefined;
|
|
685
|
+
data?: Record<string, import("@trigger.dev/core").SerializableJson> | undefined;
|
|
696
686
|
}[];
|
|
697
687
|
run: {
|
|
698
688
|
status: "PENDING" | "CANCELED" | "QUEUED" | "WAITING_ON_CONNECTIONS" | "PREPROCESSING" | "STARTED" | "SUCCESS" | "FAILURE" | "TIMED_OUT" | "ABORTED" | "UNRESOLVED_AUTH" | "INVALID_PAYLOAD" | "EXECUTING" | "WAITING_TO_CONTINUE" | "WAITING_TO_EXECUTE";
|
package/dist/esm/io.d.ts
CHANGED
|
@@ -243,11 +243,7 @@ export declare class IO {
|
|
|
243
243
|
*/
|
|
244
244
|
sendEvent(cacheKey: string | any[], event: SendEvent, options?: SendEventOptions): Promise<{
|
|
245
245
|
name: string;
|
|
246
|
-
payload: (
|
|
247
|
-
[key: string]: import("@trigger.dev/core").DeserializedJson;
|
|
248
|
-
} | import("@trigger.dev/core").DeserializedJson[]) & (string | number | boolean | {
|
|
249
|
-
[key: string]: import("@trigger.dev/core").DeserializedJson;
|
|
250
|
-
} | import("@trigger.dev/core").DeserializedJson[] | undefined)) | null;
|
|
246
|
+
payload: import("@trigger.dev/core").DeserializedJson;
|
|
251
247
|
id: string;
|
|
252
248
|
timestamp: Date;
|
|
253
249
|
context?: import("@trigger.dev/core").DeserializedJson | undefined;
|
|
@@ -262,11 +258,7 @@ export declare class IO {
|
|
|
262
258
|
*/
|
|
263
259
|
sendEvents(cacheKey: string | any[], events: SendEvent[], options?: SendEventOptions): Promise<{
|
|
264
260
|
name: string;
|
|
265
|
-
payload: (
|
|
266
|
-
[key: string]: import("@trigger.dev/core").DeserializedJson;
|
|
267
|
-
} | import("@trigger.dev/core").DeserializedJson[]) & (string | number | boolean | {
|
|
268
|
-
[key: string]: import("@trigger.dev/core").DeserializedJson;
|
|
269
|
-
} | import("@trigger.dev/core").DeserializedJson[] | undefined)) | null;
|
|
261
|
+
payload: import("@trigger.dev/core").DeserializedJson;
|
|
270
262
|
id: string;
|
|
271
263
|
timestamp: Date;
|
|
272
264
|
context?: import("@trigger.dev/core").DeserializedJson | undefined;
|
|
@@ -293,11 +285,7 @@ export declare class IO {
|
|
|
293
285
|
*/
|
|
294
286
|
cancelEvent(cacheKey: string | any[], eventId: string): Promise<{
|
|
295
287
|
name: string;
|
|
296
|
-
payload: (
|
|
297
|
-
[key: string]: import("@trigger.dev/core").DeserializedJson;
|
|
298
|
-
} | import("@trigger.dev/core").DeserializedJson[]) & (string | number | boolean | {
|
|
299
|
-
[key: string]: import("@trigger.dev/core").DeserializedJson;
|
|
300
|
-
} | import("@trigger.dev/core").DeserializedJson[] | undefined)) | null;
|
|
288
|
+
payload: import("@trigger.dev/core").DeserializedJson;
|
|
301
289
|
id: string;
|
|
302
290
|
timestamp: Date;
|
|
303
291
|
context?: import("@trigger.dev/core").DeserializedJson | undefined;
|
|
@@ -332,15 +320,15 @@ export declare class IO {
|
|
|
332
320
|
cron: string;
|
|
333
321
|
};
|
|
334
322
|
type: "cron";
|
|
335
|
-
accountId?: string | undefined;
|
|
336
323
|
metadata?: any;
|
|
324
|
+
accountId?: string | undefined;
|
|
337
325
|
} | {
|
|
338
326
|
options: {
|
|
339
327
|
seconds: number;
|
|
340
328
|
};
|
|
341
329
|
type: "interval";
|
|
342
|
-
accountId?: string | undefined;
|
|
343
330
|
metadata?: any;
|
|
331
|
+
accountId?: string | undefined;
|
|
344
332
|
};
|
|
345
333
|
active: boolean;
|
|
346
334
|
metadata?: any;
|
|
@@ -368,15 +356,15 @@ export declare class IO {
|
|
|
368
356
|
cron: string;
|
|
369
357
|
};
|
|
370
358
|
type: "cron";
|
|
371
|
-
accountId?: string | undefined;
|
|
372
359
|
metadata?: any;
|
|
360
|
+
accountId?: string | undefined;
|
|
373
361
|
} | {
|
|
374
362
|
options: {
|
|
375
363
|
seconds: number;
|
|
376
364
|
};
|
|
377
365
|
type: "interval";
|
|
378
|
-
accountId?: string | undefined;
|
|
379
366
|
metadata?: any;
|
|
367
|
+
accountId?: string | undefined;
|
|
380
368
|
};
|
|
381
369
|
active: boolean;
|
|
382
370
|
metadata?: any;
|
package/dist/esm/status.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export declare class TriggerStatus {
|
|
|
13
13
|
state?: "loading" | "success" | "failure" | undefined;
|
|
14
14
|
data?: Record<string, import("@trigger.dev/core").SerializableJson> | undefined;
|
|
15
15
|
}[];
|
|
16
|
-
data?: Record<string, import("@trigger.dev/core").SerializableJson> | undefined;
|
|
17
16
|
state?: "loading" | "success" | "failure" | undefined;
|
|
17
|
+
data?: Record<string, import("@trigger.dev/core").SerializableJson> | undefined;
|
|
18
18
|
}>;
|
|
19
19
|
}
|