@trigger.dev/core 0.0.0-prerelease-20260331093145 → 0.0.0-prerelease-20260415092849
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/v3/config.d.ts +18 -0
- package/dist/commonjs/v3/schemas/api.d.ts +7 -0
- package/dist/commonjs/v3/schemas/build.d.ts +14 -0
- package/dist/commonjs/v3/schemas/messages.d.ts +31 -0
- package/dist/commonjs/v3/schemas/resources.d.ts +8 -0
- package/dist/commonjs/v3/schemas/resources.js +1 -0
- package/dist/commonjs/v3/schemas/resources.js.map +1 -1
- package/dist/commonjs/v3/schemas/schemas.d.ts +6 -0
- package/dist/commonjs/v3/schemas/schemas.js +1 -0
- package/dist/commonjs/v3/schemas/schemas.js.map +1 -1
- package/dist/commonjs/v3/schemas/webhooks.d.ts +381 -0
- package/dist/commonjs/v3/schemas/webhooks.js +60 -1
- package/dist/commonjs/v3/schemas/webhooks.js.map +1 -1
- package/dist/commonjs/v3/types/tasks.d.ts +22 -0
- package/dist/commonjs/version.js +1 -1
- package/dist/esm/v3/config.d.ts +18 -0
- package/dist/esm/v3/schemas/api.d.ts +7 -0
- package/dist/esm/v3/schemas/build.d.ts +14 -0
- package/dist/esm/v3/schemas/messages.d.ts +31 -0
- package/dist/esm/v3/schemas/resources.d.ts +8 -0
- package/dist/esm/v3/schemas/resources.js +1 -0
- package/dist/esm/v3/schemas/resources.js.map +1 -1
- package/dist/esm/v3/schemas/schemas.d.ts +6 -0
- package/dist/esm/v3/schemas/schemas.js +1 -0
- package/dist/esm/v3/schemas/schemas.js.map +1 -1
- package/dist/esm/v3/schemas/webhooks.d.ts +381 -0
- package/dist/esm/v3/schemas/webhooks.js +59 -0
- package/dist/esm/v3/schemas/webhooks.js.map +1 -1
- package/dist/esm/v3/types/tasks.d.ts +22 -0
- package/dist/esm/version.js +1 -1
- package/package.json +1 -1
|
@@ -820,6 +820,158 @@ export declare const AlertWebhookDeploymentFailedObject: z.ZodObject<{
|
|
|
820
820
|
}>;
|
|
821
821
|
export type AlertWebhookDeploymentSuccessObject = z.infer<typeof AlertWebhookDeploymentSuccessObject>;
|
|
822
822
|
export type AlertWebhookDeploymentFailedObject = z.infer<typeof AlertWebhookDeploymentFailedObject>;
|
|
823
|
+
/** Represents an error group alert webhook payload */
|
|
824
|
+
export declare const AlertWebhookErrorGroupObject: z.ZodObject<{
|
|
825
|
+
/** Classification of the error alert */
|
|
826
|
+
classification: z.ZodEnum<["new_issue", "regression", "unignored"]>;
|
|
827
|
+
/** Error information */
|
|
828
|
+
error: z.ZodObject<{
|
|
829
|
+
/** Error fingerprint identifier */
|
|
830
|
+
fingerprint: z.ZodString;
|
|
831
|
+
/** Error type */
|
|
832
|
+
type: z.ZodString;
|
|
833
|
+
/** Error message */
|
|
834
|
+
message: z.ZodString;
|
|
835
|
+
/** Sample stack trace */
|
|
836
|
+
stackTrace: z.ZodOptional<z.ZodString>;
|
|
837
|
+
/** When the error was first seen */
|
|
838
|
+
firstSeen: z.ZodDate;
|
|
839
|
+
/** When the error was last seen */
|
|
840
|
+
lastSeen: z.ZodDate;
|
|
841
|
+
/** Number of occurrences */
|
|
842
|
+
occurrenceCount: z.ZodNumber;
|
|
843
|
+
/** Task identifier where the error occurred */
|
|
844
|
+
taskIdentifier: z.ZodString;
|
|
845
|
+
}, "strip", z.ZodTypeAny, {
|
|
846
|
+
message: string;
|
|
847
|
+
type: string;
|
|
848
|
+
taskIdentifier: string;
|
|
849
|
+
fingerprint: string;
|
|
850
|
+
firstSeen: Date;
|
|
851
|
+
lastSeen: Date;
|
|
852
|
+
occurrenceCount: number;
|
|
853
|
+
stackTrace?: string | undefined;
|
|
854
|
+
}, {
|
|
855
|
+
message: string;
|
|
856
|
+
type: string;
|
|
857
|
+
taskIdentifier: string;
|
|
858
|
+
fingerprint: string;
|
|
859
|
+
firstSeen: Date;
|
|
860
|
+
lastSeen: Date;
|
|
861
|
+
occurrenceCount: number;
|
|
862
|
+
stackTrace?: string | undefined;
|
|
863
|
+
}>;
|
|
864
|
+
/** Environment information */
|
|
865
|
+
environment: z.ZodObject<{
|
|
866
|
+
/** Environment ID */
|
|
867
|
+
id: z.ZodString;
|
|
868
|
+
/** Environment name */
|
|
869
|
+
name: z.ZodString;
|
|
870
|
+
}, "strip", z.ZodTypeAny, {
|
|
871
|
+
name: string;
|
|
872
|
+
id: string;
|
|
873
|
+
}, {
|
|
874
|
+
name: string;
|
|
875
|
+
id: string;
|
|
876
|
+
}>;
|
|
877
|
+
/** Organization information */
|
|
878
|
+
organization: z.ZodObject<{
|
|
879
|
+
/** Organization ID */
|
|
880
|
+
id: z.ZodString;
|
|
881
|
+
/** Organization slug */
|
|
882
|
+
slug: z.ZodString;
|
|
883
|
+
/** Organization name */
|
|
884
|
+
name: z.ZodString;
|
|
885
|
+
}, "strip", z.ZodTypeAny, {
|
|
886
|
+
name: string;
|
|
887
|
+
id: string;
|
|
888
|
+
slug: string;
|
|
889
|
+
}, {
|
|
890
|
+
name: string;
|
|
891
|
+
id: string;
|
|
892
|
+
slug: string;
|
|
893
|
+
}>;
|
|
894
|
+
/** Project information */
|
|
895
|
+
project: z.ZodObject<{
|
|
896
|
+
/** Project ID */
|
|
897
|
+
id: z.ZodString;
|
|
898
|
+
/** Project reference */
|
|
899
|
+
ref: z.ZodString;
|
|
900
|
+
/** Project slug */
|
|
901
|
+
slug: z.ZodString;
|
|
902
|
+
/** Project name */
|
|
903
|
+
name: z.ZodString;
|
|
904
|
+
}, "strip", z.ZodTypeAny, {
|
|
905
|
+
name: string;
|
|
906
|
+
id: string;
|
|
907
|
+
slug: string;
|
|
908
|
+
ref: string;
|
|
909
|
+
}, {
|
|
910
|
+
name: string;
|
|
911
|
+
id: string;
|
|
912
|
+
slug: string;
|
|
913
|
+
ref: string;
|
|
914
|
+
}>;
|
|
915
|
+
/** URL to view the error in the dashboard */
|
|
916
|
+
dashboardUrl: z.ZodString;
|
|
917
|
+
}, "strip", z.ZodTypeAny, {
|
|
918
|
+
error: {
|
|
919
|
+
message: string;
|
|
920
|
+
type: string;
|
|
921
|
+
taskIdentifier: string;
|
|
922
|
+
fingerprint: string;
|
|
923
|
+
firstSeen: Date;
|
|
924
|
+
lastSeen: Date;
|
|
925
|
+
occurrenceCount: number;
|
|
926
|
+
stackTrace?: string | undefined;
|
|
927
|
+
};
|
|
928
|
+
environment: {
|
|
929
|
+
name: string;
|
|
930
|
+
id: string;
|
|
931
|
+
};
|
|
932
|
+
organization: {
|
|
933
|
+
name: string;
|
|
934
|
+
id: string;
|
|
935
|
+
slug: string;
|
|
936
|
+
};
|
|
937
|
+
project: {
|
|
938
|
+
name: string;
|
|
939
|
+
id: string;
|
|
940
|
+
slug: string;
|
|
941
|
+
ref: string;
|
|
942
|
+
};
|
|
943
|
+
dashboardUrl: string;
|
|
944
|
+
classification: "new_issue" | "regression" | "unignored";
|
|
945
|
+
}, {
|
|
946
|
+
error: {
|
|
947
|
+
message: string;
|
|
948
|
+
type: string;
|
|
949
|
+
taskIdentifier: string;
|
|
950
|
+
fingerprint: string;
|
|
951
|
+
firstSeen: Date;
|
|
952
|
+
lastSeen: Date;
|
|
953
|
+
occurrenceCount: number;
|
|
954
|
+
stackTrace?: string | undefined;
|
|
955
|
+
};
|
|
956
|
+
environment: {
|
|
957
|
+
name: string;
|
|
958
|
+
id: string;
|
|
959
|
+
};
|
|
960
|
+
organization: {
|
|
961
|
+
name: string;
|
|
962
|
+
id: string;
|
|
963
|
+
slug: string;
|
|
964
|
+
};
|
|
965
|
+
project: {
|
|
966
|
+
name: string;
|
|
967
|
+
id: string;
|
|
968
|
+
slug: string;
|
|
969
|
+
ref: string;
|
|
970
|
+
};
|
|
971
|
+
dashboardUrl: string;
|
|
972
|
+
classification: "new_issue" | "regression" | "unignored";
|
|
973
|
+
}>;
|
|
974
|
+
export type AlertWebhookErrorGroupObject = z.infer<typeof AlertWebhookErrorGroupObject>;
|
|
823
975
|
/** Represents all possible webhook types */
|
|
824
976
|
export declare const Webhook: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
825
977
|
type: z.ZodLiteral<"alert.run.failed">;
|
|
@@ -1968,6 +2120,232 @@ export declare const Webhook: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
1968
2120
|
id: string;
|
|
1969
2121
|
created: Date;
|
|
1970
2122
|
webhookVersion: string;
|
|
2123
|
+
}>, z.ZodObject<{
|
|
2124
|
+
type: z.ZodLiteral<"alert.error">;
|
|
2125
|
+
object: z.ZodObject<{
|
|
2126
|
+
/** Classification of the error alert */
|
|
2127
|
+
classification: z.ZodEnum<["new_issue", "regression", "unignored"]>;
|
|
2128
|
+
/** Error information */
|
|
2129
|
+
error: z.ZodObject<{
|
|
2130
|
+
/** Error fingerprint identifier */
|
|
2131
|
+
fingerprint: z.ZodString;
|
|
2132
|
+
/** Error type */
|
|
2133
|
+
type: z.ZodString;
|
|
2134
|
+
/** Error message */
|
|
2135
|
+
message: z.ZodString;
|
|
2136
|
+
/** Sample stack trace */
|
|
2137
|
+
stackTrace: z.ZodOptional<z.ZodString>;
|
|
2138
|
+
/** When the error was first seen */
|
|
2139
|
+
firstSeen: z.ZodDate;
|
|
2140
|
+
/** When the error was last seen */
|
|
2141
|
+
lastSeen: z.ZodDate;
|
|
2142
|
+
/** Number of occurrences */
|
|
2143
|
+
occurrenceCount: z.ZodNumber;
|
|
2144
|
+
/** Task identifier where the error occurred */
|
|
2145
|
+
taskIdentifier: z.ZodString;
|
|
2146
|
+
}, "strip", z.ZodTypeAny, {
|
|
2147
|
+
message: string;
|
|
2148
|
+
type: string;
|
|
2149
|
+
taskIdentifier: string;
|
|
2150
|
+
fingerprint: string;
|
|
2151
|
+
firstSeen: Date;
|
|
2152
|
+
lastSeen: Date;
|
|
2153
|
+
occurrenceCount: number;
|
|
2154
|
+
stackTrace?: string | undefined;
|
|
2155
|
+
}, {
|
|
2156
|
+
message: string;
|
|
2157
|
+
type: string;
|
|
2158
|
+
taskIdentifier: string;
|
|
2159
|
+
fingerprint: string;
|
|
2160
|
+
firstSeen: Date;
|
|
2161
|
+
lastSeen: Date;
|
|
2162
|
+
occurrenceCount: number;
|
|
2163
|
+
stackTrace?: string | undefined;
|
|
2164
|
+
}>;
|
|
2165
|
+
/** Environment information */
|
|
2166
|
+
environment: z.ZodObject<{
|
|
2167
|
+
/** Environment ID */
|
|
2168
|
+
id: z.ZodString;
|
|
2169
|
+
/** Environment name */
|
|
2170
|
+
name: z.ZodString;
|
|
2171
|
+
}, "strip", z.ZodTypeAny, {
|
|
2172
|
+
name: string;
|
|
2173
|
+
id: string;
|
|
2174
|
+
}, {
|
|
2175
|
+
name: string;
|
|
2176
|
+
id: string;
|
|
2177
|
+
}>;
|
|
2178
|
+
/** Organization information */
|
|
2179
|
+
organization: z.ZodObject<{
|
|
2180
|
+
/** Organization ID */
|
|
2181
|
+
id: z.ZodString;
|
|
2182
|
+
/** Organization slug */
|
|
2183
|
+
slug: z.ZodString;
|
|
2184
|
+
/** Organization name */
|
|
2185
|
+
name: z.ZodString;
|
|
2186
|
+
}, "strip", z.ZodTypeAny, {
|
|
2187
|
+
name: string;
|
|
2188
|
+
id: string;
|
|
2189
|
+
slug: string;
|
|
2190
|
+
}, {
|
|
2191
|
+
name: string;
|
|
2192
|
+
id: string;
|
|
2193
|
+
slug: string;
|
|
2194
|
+
}>;
|
|
2195
|
+
/** Project information */
|
|
2196
|
+
project: z.ZodObject<{
|
|
2197
|
+
/** Project ID */
|
|
2198
|
+
id: z.ZodString;
|
|
2199
|
+
/** Project reference */
|
|
2200
|
+
ref: z.ZodString;
|
|
2201
|
+
/** Project slug */
|
|
2202
|
+
slug: z.ZodString;
|
|
2203
|
+
/** Project name */
|
|
2204
|
+
name: z.ZodString;
|
|
2205
|
+
}, "strip", z.ZodTypeAny, {
|
|
2206
|
+
name: string;
|
|
2207
|
+
id: string;
|
|
2208
|
+
slug: string;
|
|
2209
|
+
ref: string;
|
|
2210
|
+
}, {
|
|
2211
|
+
name: string;
|
|
2212
|
+
id: string;
|
|
2213
|
+
slug: string;
|
|
2214
|
+
ref: string;
|
|
2215
|
+
}>;
|
|
2216
|
+
/** URL to view the error in the dashboard */
|
|
2217
|
+
dashboardUrl: z.ZodString;
|
|
2218
|
+
}, "strip", z.ZodTypeAny, {
|
|
2219
|
+
error: {
|
|
2220
|
+
message: string;
|
|
2221
|
+
type: string;
|
|
2222
|
+
taskIdentifier: string;
|
|
2223
|
+
fingerprint: string;
|
|
2224
|
+
firstSeen: Date;
|
|
2225
|
+
lastSeen: Date;
|
|
2226
|
+
occurrenceCount: number;
|
|
2227
|
+
stackTrace?: string | undefined;
|
|
2228
|
+
};
|
|
2229
|
+
environment: {
|
|
2230
|
+
name: string;
|
|
2231
|
+
id: string;
|
|
2232
|
+
};
|
|
2233
|
+
organization: {
|
|
2234
|
+
name: string;
|
|
2235
|
+
id: string;
|
|
2236
|
+
slug: string;
|
|
2237
|
+
};
|
|
2238
|
+
project: {
|
|
2239
|
+
name: string;
|
|
2240
|
+
id: string;
|
|
2241
|
+
slug: string;
|
|
2242
|
+
ref: string;
|
|
2243
|
+
};
|
|
2244
|
+
dashboardUrl: string;
|
|
2245
|
+
classification: "new_issue" | "regression" | "unignored";
|
|
2246
|
+
}, {
|
|
2247
|
+
error: {
|
|
2248
|
+
message: string;
|
|
2249
|
+
type: string;
|
|
2250
|
+
taskIdentifier: string;
|
|
2251
|
+
fingerprint: string;
|
|
2252
|
+
firstSeen: Date;
|
|
2253
|
+
lastSeen: Date;
|
|
2254
|
+
occurrenceCount: number;
|
|
2255
|
+
stackTrace?: string | undefined;
|
|
2256
|
+
};
|
|
2257
|
+
environment: {
|
|
2258
|
+
name: string;
|
|
2259
|
+
id: string;
|
|
2260
|
+
};
|
|
2261
|
+
organization: {
|
|
2262
|
+
name: string;
|
|
2263
|
+
id: string;
|
|
2264
|
+
slug: string;
|
|
2265
|
+
};
|
|
2266
|
+
project: {
|
|
2267
|
+
name: string;
|
|
2268
|
+
id: string;
|
|
2269
|
+
slug: string;
|
|
2270
|
+
ref: string;
|
|
2271
|
+
};
|
|
2272
|
+
dashboardUrl: string;
|
|
2273
|
+
classification: "new_issue" | "regression" | "unignored";
|
|
2274
|
+
}>;
|
|
2275
|
+
/** Webhook ID */
|
|
2276
|
+
id: z.ZodString;
|
|
2277
|
+
/** When the webhook was created */
|
|
2278
|
+
created: z.ZodDate;
|
|
2279
|
+
/** Version of the webhook */
|
|
2280
|
+
webhookVersion: z.ZodString;
|
|
2281
|
+
}, "strip", z.ZodTypeAny, {
|
|
2282
|
+
object: {
|
|
2283
|
+
error: {
|
|
2284
|
+
message: string;
|
|
2285
|
+
type: string;
|
|
2286
|
+
taskIdentifier: string;
|
|
2287
|
+
fingerprint: string;
|
|
2288
|
+
firstSeen: Date;
|
|
2289
|
+
lastSeen: Date;
|
|
2290
|
+
occurrenceCount: number;
|
|
2291
|
+
stackTrace?: string | undefined;
|
|
2292
|
+
};
|
|
2293
|
+
environment: {
|
|
2294
|
+
name: string;
|
|
2295
|
+
id: string;
|
|
2296
|
+
};
|
|
2297
|
+
organization: {
|
|
2298
|
+
name: string;
|
|
2299
|
+
id: string;
|
|
2300
|
+
slug: string;
|
|
2301
|
+
};
|
|
2302
|
+
project: {
|
|
2303
|
+
name: string;
|
|
2304
|
+
id: string;
|
|
2305
|
+
slug: string;
|
|
2306
|
+
ref: string;
|
|
2307
|
+
};
|
|
2308
|
+
dashboardUrl: string;
|
|
2309
|
+
classification: "new_issue" | "regression" | "unignored";
|
|
2310
|
+
};
|
|
2311
|
+
type: "alert.error";
|
|
2312
|
+
id: string;
|
|
2313
|
+
created: Date;
|
|
2314
|
+
webhookVersion: string;
|
|
2315
|
+
}, {
|
|
2316
|
+
object: {
|
|
2317
|
+
error: {
|
|
2318
|
+
message: string;
|
|
2319
|
+
type: string;
|
|
2320
|
+
taskIdentifier: string;
|
|
2321
|
+
fingerprint: string;
|
|
2322
|
+
firstSeen: Date;
|
|
2323
|
+
lastSeen: Date;
|
|
2324
|
+
occurrenceCount: number;
|
|
2325
|
+
stackTrace?: string | undefined;
|
|
2326
|
+
};
|
|
2327
|
+
environment: {
|
|
2328
|
+
name: string;
|
|
2329
|
+
id: string;
|
|
2330
|
+
};
|
|
2331
|
+
organization: {
|
|
2332
|
+
name: string;
|
|
2333
|
+
id: string;
|
|
2334
|
+
slug: string;
|
|
2335
|
+
};
|
|
2336
|
+
project: {
|
|
2337
|
+
name: string;
|
|
2338
|
+
id: string;
|
|
2339
|
+
slug: string;
|
|
2340
|
+
ref: string;
|
|
2341
|
+
};
|
|
2342
|
+
dashboardUrl: string;
|
|
2343
|
+
classification: "new_issue" | "regression" | "unignored";
|
|
2344
|
+
};
|
|
2345
|
+
type: "alert.error";
|
|
2346
|
+
id: string;
|
|
2347
|
+
created: Date;
|
|
2348
|
+
webhookVersion: string;
|
|
1971
2349
|
}>]>;
|
|
1972
2350
|
export type Webhook = z.infer<typeof Webhook>;
|
|
1973
2351
|
export type RunFailedWebhook = Extract<Webhook, {
|
|
@@ -1979,4 +2357,7 @@ export type DeploymentSuccessWebhook = Extract<Webhook, {
|
|
|
1979
2357
|
export type DeploymentFailedWebhook = Extract<Webhook, {
|
|
1980
2358
|
type: "alert.deployment.failed";
|
|
1981
2359
|
}>;
|
|
2360
|
+
export type ErrorWebhook = Extract<Webhook, {
|
|
2361
|
+
type: "alert.error";
|
|
2362
|
+
}>;
|
|
1982
2363
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Webhook = exports.AlertWebhookDeploymentFailedObject = exports.AlertWebhookDeploymentSuccessObject = exports.DeployError = void 0;
|
|
3
|
+
exports.Webhook = exports.AlertWebhookErrorGroupObject = exports.AlertWebhookDeploymentFailedObject = exports.AlertWebhookDeploymentSuccessObject = exports.DeployError = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const api_js_1 = require("./api.js");
|
|
6
6
|
const common_js_1 = require("./common.js");
|
|
@@ -177,6 +177,59 @@ exports.AlertWebhookDeploymentFailedObject = zod_1.z.object({
|
|
|
177
177
|
/** Error information */
|
|
178
178
|
error: exports.DeployError,
|
|
179
179
|
});
|
|
180
|
+
/** Represents an error group alert webhook payload */
|
|
181
|
+
exports.AlertWebhookErrorGroupObject = zod_1.z.object({
|
|
182
|
+
/** Classification of the error alert */
|
|
183
|
+
classification: zod_1.z.enum(["new_issue", "regression", "unignored"]),
|
|
184
|
+
/** Error information */
|
|
185
|
+
error: zod_1.z.object({
|
|
186
|
+
/** Error fingerprint identifier */
|
|
187
|
+
fingerprint: zod_1.z.string(),
|
|
188
|
+
/** Error type */
|
|
189
|
+
type: zod_1.z.string(),
|
|
190
|
+
/** Error message */
|
|
191
|
+
message: zod_1.z.string(),
|
|
192
|
+
/** Sample stack trace */
|
|
193
|
+
stackTrace: zod_1.z.string().optional(),
|
|
194
|
+
/** When the error was first seen */
|
|
195
|
+
firstSeen: zod_1.z.coerce.date(),
|
|
196
|
+
/** When the error was last seen */
|
|
197
|
+
lastSeen: zod_1.z.coerce.date(),
|
|
198
|
+
/** Number of occurrences */
|
|
199
|
+
occurrenceCount: zod_1.z.number(),
|
|
200
|
+
/** Task identifier where the error occurred */
|
|
201
|
+
taskIdentifier: zod_1.z.string(),
|
|
202
|
+
}),
|
|
203
|
+
/** Environment information */
|
|
204
|
+
environment: zod_1.z.object({
|
|
205
|
+
/** Environment ID */
|
|
206
|
+
id: zod_1.z.string(),
|
|
207
|
+
/** Environment name */
|
|
208
|
+
name: zod_1.z.string(),
|
|
209
|
+
}),
|
|
210
|
+
/** Organization information */
|
|
211
|
+
organization: zod_1.z.object({
|
|
212
|
+
/** Organization ID */
|
|
213
|
+
id: zod_1.z.string(),
|
|
214
|
+
/** Organization slug */
|
|
215
|
+
slug: zod_1.z.string(),
|
|
216
|
+
/** Organization name */
|
|
217
|
+
name: zod_1.z.string(),
|
|
218
|
+
}),
|
|
219
|
+
/** Project information */
|
|
220
|
+
project: zod_1.z.object({
|
|
221
|
+
/** Project ID */
|
|
222
|
+
id: zod_1.z.string(),
|
|
223
|
+
/** Project reference */
|
|
224
|
+
ref: zod_1.z.string(),
|
|
225
|
+
/** Project slug */
|
|
226
|
+
slug: zod_1.z.string(),
|
|
227
|
+
/** Project name */
|
|
228
|
+
name: zod_1.z.string(),
|
|
229
|
+
}),
|
|
230
|
+
/** URL to view the error in the dashboard */
|
|
231
|
+
dashboardUrl: zod_1.z.string(),
|
|
232
|
+
});
|
|
180
233
|
/** Common properties for all webhooks */
|
|
181
234
|
const commonProperties = {
|
|
182
235
|
/** Webhook ID */
|
|
@@ -206,5 +259,11 @@ exports.Webhook = zod_1.z.discriminatedUnion("type", [
|
|
|
206
259
|
type: zod_1.z.literal("alert.deployment.failed"),
|
|
207
260
|
object: exports.AlertWebhookDeploymentFailedObject,
|
|
208
261
|
}),
|
|
262
|
+
/** Error group alert webhook */
|
|
263
|
+
zod_1.z.object({
|
|
264
|
+
...commonProperties,
|
|
265
|
+
type: zod_1.z.literal("alert.error"),
|
|
266
|
+
object: exports.AlertWebhookErrorGroupObject,
|
|
267
|
+
}),
|
|
209
268
|
]);
|
|
210
269
|
//# sourceMappingURL=webhooks.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhooks.js","sourceRoot":"","sources":["../../../../src/v3/schemas/webhooks.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,qCAAqC;AACrC,2CAAyE;AAEzE,oDAAoD;AACpD,MAAM,2BAA2B,GAAG,OAAC,CAAC,MAAM,CAAC;IAC3C,uBAAuB;IACvB,IAAI,EAAE,OAAC,CAAC,MAAM,CAAC;QACb,qCAAqC;QACrC,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE;QACd,0CAA0C;QAC1C,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE;QACpB,yCAAyC;QACzC,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QACjC,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EAAE;KACjB,CAAC;IACF,6CAA6C;IAC7C,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE;CACzB,CAAC,CAAC;AAIH,yCAAyC;AACzC,MAAM,gBAAgB,GAAG;IACvB,iBAAiB;IACjB,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE;IACd,mCAAmC;IACnC,OAAO,EAAE,OAAC,CAAC,MAAM,CAAC,IAAI,EAAE;IACxB,6BAA6B;IAC7B,cAAc,EAAE,OAAC,CAAC,MAAM,EAAE;CAC3B,CAAC;AAEF,4CAA4C;AAC/B,QAAA,OAAO,GAAG,OAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE;IAClD,+BAA+B;IAC/B,OAAC,CAAC,MAAM,CAAC;QACP,GAAG,gBAAgB;QACnB,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,kBAAkB,CAAC;QACnC,MAAM,EAAE,2BAA2B;KACpC,CAAC;IACF,uCAAuC;IACvC,OAAC,CAAC,MAAM,CAAC;QACP,GAAG,gBAAgB;QACnB,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,0BAA0B,CAAC;QAC3C,MAAM,EAAE,2CAAmC;KAC5C,CAAC;IACF,sCAAsC;IACtC,OAAC,CAAC,MAAM,CAAC;QACP,GAAG,gBAAgB;QACnB,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,yBAAyB,CAAC;QAC1C,MAAM,EAAE,0CAAkC;KAC3C,CAAC;IACF,gCAAgC;IAChC,OAAC,CAAC,MAAM,CAAC;QACP,GAAG,gBAAgB;QACnB,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,aAAa,CAAC;QAC9B,MAAM,EAAE,oCAA4B;KACrC,CAAC;CACH,CAAC,CAAC"}
|
|
@@ -183,6 +183,28 @@ type CommonTaskOptions<TIdentifier extends string, TPayload = void, TOutput = un
|
|
|
183
183
|
* Minimum value is 5 seconds
|
|
184
184
|
*/
|
|
185
185
|
maxDuration?: number;
|
|
186
|
+
/**
|
|
187
|
+
* Set a default time-to-live for runs of this task. If the run is not executed within this time, it will be removed from the queue and never execute.
|
|
188
|
+
*
|
|
189
|
+
* This can be a string like "1h" (1 hour), "30m" (30 minutes), "1d" (1 day), or a number of seconds.
|
|
190
|
+
*
|
|
191
|
+
* If omitted it will use the value in your `trigger.config.ts` file, if set.
|
|
192
|
+
*
|
|
193
|
+
* You can override this on a per-trigger basis by setting the `ttl` option when triggering the task.
|
|
194
|
+
*
|
|
195
|
+
* @example
|
|
196
|
+
*
|
|
197
|
+
* ```ts
|
|
198
|
+
* export const myTask = task({
|
|
199
|
+
* id: "my-task",
|
|
200
|
+
* ttl: "10m",
|
|
201
|
+
* run: async (payload) => {
|
|
202
|
+
* //...
|
|
203
|
+
* },
|
|
204
|
+
* });
|
|
205
|
+
* ```
|
|
206
|
+
*/
|
|
207
|
+
ttl?: string | number;
|
|
186
208
|
/** This gets called when a task is triggered. It's where you put the code you want to execute.
|
|
187
209
|
*
|
|
188
210
|
* @param payload - The payload that is passed to your task when it's triggered. This must be JSON serializable.
|
package/dist/commonjs/version.js
CHANGED
package/dist/esm/v3/config.d.ts
CHANGED
|
@@ -146,6 +146,24 @@ export type TriggerConfig = {
|
|
|
146
146
|
* @see https://trigger.dev/docs/tasks/overview#maxduration-option
|
|
147
147
|
*/
|
|
148
148
|
maxDuration: number;
|
|
149
|
+
/**
|
|
150
|
+
* Set a default time-to-live (TTL) for all task runs in the project. If a run is not executed within this time, it will be removed from the queue and never execute.
|
|
151
|
+
*
|
|
152
|
+
* This can be a string like "1h" (1 hour), "30m" (30 minutes), "1d" (1 day), or a number of seconds.
|
|
153
|
+
*
|
|
154
|
+
* You can override this on a per-task basis by setting the `ttl` option on the task definition, or per-trigger by setting the `ttl` option when triggering.
|
|
155
|
+
*
|
|
156
|
+
* @example
|
|
157
|
+
*
|
|
158
|
+
* ```ts
|
|
159
|
+
* export default defineConfig({
|
|
160
|
+
* project: "my-project",
|
|
161
|
+
* maxDuration: 3600,
|
|
162
|
+
* ttl: "1h",
|
|
163
|
+
* });
|
|
164
|
+
* ```
|
|
165
|
+
*/
|
|
166
|
+
ttl?: string | number;
|
|
149
167
|
/**
|
|
150
168
|
* 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.
|
|
151
169
|
*/
|
|
@@ -413,6 +413,7 @@ export declare const CreateBackgroundWorkerRequestBody: z.ZodObject<{
|
|
|
413
413
|
environments?: ("PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW")[] | undefined;
|
|
414
414
|
}>>;
|
|
415
415
|
maxDuration: z.ZodOptional<z.ZodNumber>;
|
|
416
|
+
ttl: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
416
417
|
payloadSchema: z.ZodOptional<z.ZodUnknown>;
|
|
417
418
|
}, "strip", z.ZodTypeAny, {
|
|
418
419
|
id: string;
|
|
@@ -439,6 +440,7 @@ export declare const CreateBackgroundWorkerRequestBody: z.ZodObject<{
|
|
|
439
440
|
} | undefined;
|
|
440
441
|
} | undefined;
|
|
441
442
|
description?: string | undefined;
|
|
443
|
+
ttl?: string | number | undefined;
|
|
442
444
|
triggerSource?: string | undefined;
|
|
443
445
|
schedule?: {
|
|
444
446
|
cron: string;
|
|
@@ -471,6 +473,7 @@ export declare const CreateBackgroundWorkerRequestBody: z.ZodObject<{
|
|
|
471
473
|
} | undefined;
|
|
472
474
|
} | undefined;
|
|
473
475
|
description?: string | undefined;
|
|
476
|
+
ttl?: string | number | undefined;
|
|
474
477
|
triggerSource?: string | undefined;
|
|
475
478
|
schedule?: {
|
|
476
479
|
cron: string;
|
|
@@ -563,6 +566,7 @@ export declare const CreateBackgroundWorkerRequestBody: z.ZodObject<{
|
|
|
563
566
|
} | undefined;
|
|
564
567
|
} | undefined;
|
|
565
568
|
description?: string | undefined;
|
|
569
|
+
ttl?: string | number | undefined;
|
|
566
570
|
triggerSource?: string | undefined;
|
|
567
571
|
schedule?: {
|
|
568
572
|
cron: string;
|
|
@@ -622,6 +626,7 @@ export declare const CreateBackgroundWorkerRequestBody: z.ZodObject<{
|
|
|
622
626
|
} | undefined;
|
|
623
627
|
} | undefined;
|
|
624
628
|
description?: string | undefined;
|
|
629
|
+
ttl?: string | number | undefined;
|
|
625
630
|
triggerSource?: string | undefined;
|
|
626
631
|
schedule?: {
|
|
627
632
|
cron: string;
|
|
@@ -687,6 +692,7 @@ export declare const CreateBackgroundWorkerRequestBody: z.ZodObject<{
|
|
|
687
692
|
} | undefined;
|
|
688
693
|
} | undefined;
|
|
689
694
|
description?: string | undefined;
|
|
695
|
+
ttl?: string | number | undefined;
|
|
690
696
|
triggerSource?: string | undefined;
|
|
691
697
|
schedule?: {
|
|
692
698
|
cron: string;
|
|
@@ -753,6 +759,7 @@ export declare const CreateBackgroundWorkerRequestBody: z.ZodObject<{
|
|
|
753
759
|
} | undefined;
|
|
754
760
|
} | undefined;
|
|
755
761
|
description?: string | undefined;
|
|
762
|
+
ttl?: string | number | undefined;
|
|
756
763
|
triggerSource?: string | undefined;
|
|
757
764
|
schedule?: {
|
|
758
765
|
cron: string;
|