@contractspec/lib.jobs 1.57.0 → 1.59.0
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/contracts/index.d.ts +494 -500
- package/dist/contracts/index.d.ts.map +1 -1
- package/dist/contracts/index.js +298 -461
- package/dist/entities/index.d.ts +117 -122
- package/dist/entities/index.d.ts.map +1 -1
- package/dist/entities/index.js +170 -193
- package/dist/events.d.ts +297 -303
- package/dist/events.d.ts.map +1 -1
- package/dist/events.js +199 -351
- package/dist/handlers/gmail-sync-handler.d.ts +5 -9
- package/dist/handlers/gmail-sync-handler.d.ts.map +1 -1
- package/dist/handlers/gmail-sync-handler.js +8 -8
- package/dist/handlers/index.d.ts +5 -9
- package/dist/handlers/index.d.ts.map +1 -1
- package/dist/handlers/index.js +53 -10
- package/dist/handlers/ping-job.d.ts +6 -10
- package/dist/handlers/ping-job.d.ts.map +1 -1
- package/dist/handlers/ping-job.js +13 -12
- package/dist/handlers/storage-document-handler.d.ts +7 -11
- package/dist/handlers/storage-document-handler.d.ts.map +1 -1
- package/dist/handlers/storage-document-handler.js +15 -13
- package/dist/index.d.ts +7 -24
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1366 -64
- package/dist/jobs.capability.d.ts +2 -7
- package/dist/jobs.capability.d.ts.map +1 -1
- package/dist/jobs.capability.js +29 -33
- package/dist/jobs.feature.d.ts +1 -6
- package/dist/jobs.feature.d.ts.map +1 -1
- package/dist/jobs.feature.js +45 -108
- package/dist/node/contracts/index.js +318 -0
- package/dist/node/entities/index.js +174 -0
- package/dist/node/events.js +200 -0
- package/dist/node/handlers/gmail-sync-handler.js +9 -0
- package/dist/node/handlers/index.js +55 -0
- package/dist/node/handlers/ping-job.js +14 -0
- package/dist/node/handlers/storage-document-handler.js +16 -0
- package/dist/node/index.js +1368 -0
- package/dist/node/jobs.capability.js +28 -0
- package/dist/node/jobs.feature.js +46 -0
- package/dist/node/queue/gcp-cloud-tasks.js +66 -0
- package/dist/node/queue/gcp-pubsub.js +54 -0
- package/dist/node/queue/index.js +478 -0
- package/dist/node/queue/memory-queue.js +160 -0
- package/dist/node/queue/register-defined-job.js +15 -0
- package/dist/node/queue/scaleway-sqs-queue.js +206 -0
- package/dist/node/queue/types.js +10 -0
- package/dist/node/scheduler/index.js +117 -0
- package/dist/queue/gcp-cloud-tasks.d.ts +33 -36
- package/dist/queue/gcp-cloud-tasks.d.ts.map +1 -1
- package/dist/queue/gcp-cloud-tasks.js +65 -59
- package/dist/queue/gcp-pubsub.d.ts +18 -21
- package/dist/queue/gcp-pubsub.d.ts.map +1 -1
- package/dist/queue/gcp-pubsub.js +53 -45
- package/dist/queue/index.d.ts +6 -15
- package/dist/queue/index.d.ts.map +1 -1
- package/dist/queue/index.js +476 -20
- package/dist/queue/memory-queue.d.ts +25 -29
- package/dist/queue/memory-queue.d.ts.map +1 -1
- package/dist/queue/memory-queue.js +159 -138
- package/dist/queue/register-defined-job.d.ts +3 -7
- package/dist/queue/register-defined-job.d.ts.map +1 -1
- package/dist/queue/register-defined-job.js +14 -14
- package/dist/queue/scaleway-sqs-queue.d.ts +31 -35
- package/dist/queue/scaleway-sqs-queue.d.ts.map +1 -1
- package/dist/queue/scaleway-sqs-queue.js +205 -173
- package/dist/queue/types.d.ts +2 -8
- package/dist/queue/types.d.ts.map +1 -1
- package/dist/queue/types.js +11 -12
- package/dist/scheduler/index.d.ts +68 -72
- package/dist/scheduler/index.d.ts.map +1 -1
- package/dist/scheduler/index.js +113 -141
- package/package.json +176 -50
- package/dist/_virtual/_rolldown/runtime.js +0 -36
- package/dist/contracts/index.js.map +0 -1
- package/dist/entities/index.js.map +0 -1
- package/dist/events.js.map +0 -1
- package/dist/handlers/gmail-sync-handler.js.map +0 -1
- package/dist/handlers/index.js.map +0 -1
- package/dist/handlers/ping-job.js.map +0 -1
- package/dist/handlers/storage-document-handler.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/jobs.capability.js.map +0 -1
- package/dist/jobs.feature.js.map +0 -1
- package/dist/queue/gcp-cloud-tasks.js.map +0 -1
- package/dist/queue/gcp-pubsub.js.map +0 -1
- package/dist/queue/index.js.map +0 -1
- package/dist/queue/memory-queue.js.map +0 -1
- package/dist/queue/register-defined-job.js.map +0 -1
- package/dist/queue/scaleway-sqs-queue.js.map +0 -1
- package/dist/queue/types.js.map +0 -1
- package/dist/scheduler/index.js.map +0 -1
package/dist/events.d.ts
CHANGED
|
@@ -1,388 +1,382 @@
|
|
|
1
|
-
import * as _contractspec_lib_schema0 from "@contractspec/lib.schema";
|
|
2
|
-
import * as _contractspec_lib_contracts0 from "@contractspec/lib.contracts";
|
|
3
|
-
|
|
4
|
-
//#region src/events.d.ts
|
|
5
1
|
/**
|
|
6
2
|
* Emitted when a job is enqueued.
|
|
7
3
|
*/
|
|
8
|
-
declare const JobEnqueuedEvent:
|
|
9
|
-
jobId: {
|
|
10
|
-
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
11
|
-
isOptional: false;
|
|
12
|
-
};
|
|
13
|
-
type: {
|
|
14
|
-
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
15
|
-
isOptional: false;
|
|
16
|
-
};
|
|
17
|
-
priority: {
|
|
18
|
-
type: _contractspec_lib_schema0.FieldType<number, number>;
|
|
19
|
-
isOptional: false;
|
|
20
|
-
};
|
|
21
|
-
scheduledAt: {
|
|
22
|
-
type: _contractspec_lib_schema0.FieldType<Date, string>;
|
|
23
|
-
isOptional: true;
|
|
24
|
-
};
|
|
25
|
-
tenantId: {
|
|
26
|
-
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
27
|
-
isOptional: true;
|
|
28
|
-
};
|
|
29
|
-
enqueuedAt: {
|
|
30
|
-
type: _contractspec_lib_schema0.FieldType<Date, string>;
|
|
31
|
-
isOptional: false;
|
|
32
|
-
};
|
|
33
|
-
}>>;
|
|
34
|
-
/**
|
|
35
|
-
* Emitted when a job starts processing.
|
|
36
|
-
*/
|
|
37
|
-
declare const JobStartedEvent: _contractspec_lib_contracts0.EventSpec<_contractspec_lib_schema0.SchemaModel<{
|
|
38
|
-
jobId: {
|
|
39
|
-
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
40
|
-
isOptional: false;
|
|
41
|
-
};
|
|
42
|
-
type: {
|
|
43
|
-
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
44
|
-
isOptional: false;
|
|
45
|
-
};
|
|
46
|
-
attempt: {
|
|
47
|
-
type: _contractspec_lib_schema0.FieldType<number, number>;
|
|
48
|
-
isOptional: false;
|
|
49
|
-
};
|
|
50
|
-
startedAt: {
|
|
51
|
-
type: _contractspec_lib_schema0.FieldType<Date, string>;
|
|
52
|
-
isOptional: false;
|
|
53
|
-
};
|
|
54
|
-
}>>;
|
|
55
|
-
/**
|
|
56
|
-
* Emitted when a job completes successfully.
|
|
57
|
-
*/
|
|
58
|
-
declare const JobCompletedEvent: _contractspec_lib_contracts0.EventSpec<_contractspec_lib_schema0.SchemaModel<{
|
|
59
|
-
jobId: {
|
|
60
|
-
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
61
|
-
isOptional: false;
|
|
62
|
-
};
|
|
63
|
-
type: {
|
|
64
|
-
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
65
|
-
isOptional: false;
|
|
66
|
-
};
|
|
67
|
-
attempt: {
|
|
68
|
-
type: _contractspec_lib_schema0.FieldType<number, number>;
|
|
69
|
-
isOptional: false;
|
|
70
|
-
};
|
|
71
|
-
durationMs: {
|
|
72
|
-
type: _contractspec_lib_schema0.FieldType<number, number>;
|
|
73
|
-
isOptional: false;
|
|
74
|
-
};
|
|
75
|
-
completedAt: {
|
|
76
|
-
type: _contractspec_lib_schema0.FieldType<Date, string>;
|
|
77
|
-
isOptional: false;
|
|
78
|
-
};
|
|
79
|
-
}>>;
|
|
80
|
-
/**
|
|
81
|
-
* Emitted when a job fails (single attempt).
|
|
82
|
-
*/
|
|
83
|
-
declare const JobFailedEvent: _contractspec_lib_contracts0.EventSpec<_contractspec_lib_schema0.SchemaModel<{
|
|
84
|
-
jobId: {
|
|
85
|
-
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
86
|
-
isOptional: false;
|
|
87
|
-
};
|
|
88
|
-
type: {
|
|
89
|
-
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
90
|
-
isOptional: false;
|
|
91
|
-
};
|
|
92
|
-
attempt: {
|
|
93
|
-
type: _contractspec_lib_schema0.FieldType<number, number>;
|
|
94
|
-
isOptional: false;
|
|
95
|
-
};
|
|
96
|
-
error: {
|
|
97
|
-
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
98
|
-
isOptional: false;
|
|
99
|
-
};
|
|
100
|
-
willRetry: {
|
|
101
|
-
type: _contractspec_lib_schema0.FieldType<boolean, boolean>;
|
|
102
|
-
isOptional: false;
|
|
103
|
-
};
|
|
104
|
-
failedAt: {
|
|
105
|
-
type: _contractspec_lib_schema0.FieldType<Date, string>;
|
|
106
|
-
isOptional: false;
|
|
107
|
-
};
|
|
108
|
-
}>>;
|
|
109
|
-
/**
|
|
110
|
-
* Emitted when a job is being retried.
|
|
111
|
-
*/
|
|
112
|
-
declare const JobRetryingEvent: _contractspec_lib_contracts0.EventSpec<_contractspec_lib_schema0.SchemaModel<{
|
|
113
|
-
jobId: {
|
|
114
|
-
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
115
|
-
isOptional: false;
|
|
116
|
-
};
|
|
117
|
-
type: {
|
|
118
|
-
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
119
|
-
isOptional: false;
|
|
120
|
-
};
|
|
121
|
-
attempt: {
|
|
122
|
-
type: _contractspec_lib_schema0.FieldType<number, number>;
|
|
123
|
-
isOptional: false;
|
|
124
|
-
};
|
|
125
|
-
nextAttemptAt: {
|
|
126
|
-
type: _contractspec_lib_schema0.FieldType<Date, string>;
|
|
127
|
-
isOptional: false;
|
|
128
|
-
};
|
|
129
|
-
backoffMs: {
|
|
130
|
-
type: _contractspec_lib_schema0.FieldType<number, number>;
|
|
131
|
-
isOptional: false;
|
|
132
|
-
};
|
|
133
|
-
}>>;
|
|
134
|
-
/**
|
|
135
|
-
* Emitted when a job is moved to dead letter queue.
|
|
136
|
-
*/
|
|
137
|
-
declare const JobDeadLetteredEvent: _contractspec_lib_contracts0.EventSpec<_contractspec_lib_schema0.SchemaModel<{
|
|
138
|
-
jobId: {
|
|
139
|
-
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
140
|
-
isOptional: false;
|
|
141
|
-
};
|
|
142
|
-
type: {
|
|
143
|
-
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
144
|
-
isOptional: false;
|
|
145
|
-
};
|
|
146
|
-
attempts: {
|
|
147
|
-
type: _contractspec_lib_schema0.FieldType<number, number>;
|
|
148
|
-
isOptional: false;
|
|
149
|
-
};
|
|
150
|
-
lastError: {
|
|
151
|
-
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
152
|
-
isOptional: false;
|
|
153
|
-
};
|
|
154
|
-
deadLetteredAt: {
|
|
155
|
-
type: _contractspec_lib_schema0.FieldType<Date, string>;
|
|
156
|
-
isOptional: false;
|
|
157
|
-
};
|
|
158
|
-
}>>;
|
|
159
|
-
/**
|
|
160
|
-
* Emitted when a job is cancelled.
|
|
161
|
-
*/
|
|
162
|
-
declare const JobCancelledEvent: _contractspec_lib_contracts0.EventSpec<_contractspec_lib_schema0.SchemaModel<{
|
|
163
|
-
jobId: {
|
|
164
|
-
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
165
|
-
isOptional: false;
|
|
166
|
-
};
|
|
167
|
-
type: {
|
|
168
|
-
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
169
|
-
isOptional: false;
|
|
170
|
-
};
|
|
171
|
-
cancelledBy: {
|
|
172
|
-
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
173
|
-
isOptional: true;
|
|
174
|
-
};
|
|
175
|
-
cancelledAt: {
|
|
176
|
-
type: _contractspec_lib_schema0.FieldType<Date, string>;
|
|
177
|
-
isOptional: false;
|
|
178
|
-
};
|
|
179
|
-
}>>;
|
|
180
|
-
/**
|
|
181
|
-
* Emitted when a scheduled job is triggered.
|
|
182
|
-
*/
|
|
183
|
-
declare const ScheduledJobTriggeredEvent: _contractspec_lib_contracts0.EventSpec<_contractspec_lib_schema0.SchemaModel<{
|
|
184
|
-
scheduleName: {
|
|
185
|
-
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
186
|
-
isOptional: false;
|
|
187
|
-
};
|
|
188
|
-
jobId: {
|
|
189
|
-
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
190
|
-
isOptional: false;
|
|
191
|
-
};
|
|
192
|
-
jobType: {
|
|
193
|
-
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
194
|
-
isOptional: false;
|
|
195
|
-
};
|
|
196
|
-
triggeredAt: {
|
|
197
|
-
type: _contractspec_lib_schema0.FieldType<Date, string>;
|
|
198
|
-
isOptional: false;
|
|
199
|
-
};
|
|
200
|
-
nextRunAt: {
|
|
201
|
-
type: _contractspec_lib_schema0.FieldType<Date, string>;
|
|
202
|
-
isOptional: true;
|
|
203
|
-
};
|
|
204
|
-
}>>;
|
|
205
|
-
/**
|
|
206
|
-
* All job events.
|
|
207
|
-
*/
|
|
208
|
-
declare const JobEvents: {
|
|
209
|
-
JobEnqueuedEvent: _contractspec_lib_contracts0.EventSpec<_contractspec_lib_schema0.SchemaModel<{
|
|
4
|
+
export declare const JobEnqueuedEvent: import("@contractspec/lib.contracts").EventSpec<import("@contractspec/lib.schema").SchemaModel<{
|
|
210
5
|
jobId: {
|
|
211
|
-
|
|
212
|
-
|
|
6
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
7
|
+
isOptional: false;
|
|
213
8
|
};
|
|
214
9
|
type: {
|
|
215
|
-
|
|
216
|
-
|
|
10
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
11
|
+
isOptional: false;
|
|
217
12
|
};
|
|
218
13
|
priority: {
|
|
219
|
-
|
|
220
|
-
|
|
14
|
+
type: import("@contractspec/lib.schema").FieldType<number, number>;
|
|
15
|
+
isOptional: false;
|
|
221
16
|
};
|
|
222
17
|
scheduledAt: {
|
|
223
|
-
|
|
224
|
-
|
|
18
|
+
type: import("@contractspec/lib.schema").FieldType<Date, string>;
|
|
19
|
+
isOptional: true;
|
|
225
20
|
};
|
|
226
21
|
tenantId: {
|
|
227
|
-
|
|
228
|
-
|
|
22
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
23
|
+
isOptional: true;
|
|
229
24
|
};
|
|
230
25
|
enqueuedAt: {
|
|
231
|
-
|
|
232
|
-
|
|
26
|
+
type: import("@contractspec/lib.schema").FieldType<Date, string>;
|
|
27
|
+
isOptional: false;
|
|
233
28
|
};
|
|
234
|
-
|
|
235
|
-
|
|
29
|
+
}>>;
|
|
30
|
+
/**
|
|
31
|
+
* Emitted when a job starts processing.
|
|
32
|
+
*/
|
|
33
|
+
export declare const JobStartedEvent: import("@contractspec/lib.contracts").EventSpec<import("@contractspec/lib.schema").SchemaModel<{
|
|
236
34
|
jobId: {
|
|
237
|
-
|
|
238
|
-
|
|
35
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
36
|
+
isOptional: false;
|
|
239
37
|
};
|
|
240
38
|
type: {
|
|
241
|
-
|
|
242
|
-
|
|
39
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
40
|
+
isOptional: false;
|
|
243
41
|
};
|
|
244
42
|
attempt: {
|
|
245
|
-
|
|
246
|
-
|
|
43
|
+
type: import("@contractspec/lib.schema").FieldType<number, number>;
|
|
44
|
+
isOptional: false;
|
|
247
45
|
};
|
|
248
46
|
startedAt: {
|
|
249
|
-
|
|
250
|
-
|
|
47
|
+
type: import("@contractspec/lib.schema").FieldType<Date, string>;
|
|
48
|
+
isOptional: false;
|
|
251
49
|
};
|
|
252
|
-
|
|
253
|
-
|
|
50
|
+
}>>;
|
|
51
|
+
/**
|
|
52
|
+
* Emitted when a job completes successfully.
|
|
53
|
+
*/
|
|
54
|
+
export declare const JobCompletedEvent: import("@contractspec/lib.contracts").EventSpec<import("@contractspec/lib.schema").SchemaModel<{
|
|
254
55
|
jobId: {
|
|
255
|
-
|
|
256
|
-
|
|
56
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
57
|
+
isOptional: false;
|
|
257
58
|
};
|
|
258
59
|
type: {
|
|
259
|
-
|
|
260
|
-
|
|
60
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
61
|
+
isOptional: false;
|
|
261
62
|
};
|
|
262
63
|
attempt: {
|
|
263
|
-
|
|
264
|
-
|
|
64
|
+
type: import("@contractspec/lib.schema").FieldType<number, number>;
|
|
65
|
+
isOptional: false;
|
|
265
66
|
};
|
|
266
67
|
durationMs: {
|
|
267
|
-
|
|
268
|
-
|
|
68
|
+
type: import("@contractspec/lib.schema").FieldType<number, number>;
|
|
69
|
+
isOptional: false;
|
|
269
70
|
};
|
|
270
71
|
completedAt: {
|
|
271
|
-
|
|
272
|
-
|
|
72
|
+
type: import("@contractspec/lib.schema").FieldType<Date, string>;
|
|
73
|
+
isOptional: false;
|
|
273
74
|
};
|
|
274
|
-
|
|
275
|
-
|
|
75
|
+
}>>;
|
|
76
|
+
/**
|
|
77
|
+
* Emitted when a job fails (single attempt).
|
|
78
|
+
*/
|
|
79
|
+
export declare const JobFailedEvent: import("@contractspec/lib.contracts").EventSpec<import("@contractspec/lib.schema").SchemaModel<{
|
|
276
80
|
jobId: {
|
|
277
|
-
|
|
278
|
-
|
|
81
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
82
|
+
isOptional: false;
|
|
279
83
|
};
|
|
280
84
|
type: {
|
|
281
|
-
|
|
282
|
-
|
|
85
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
86
|
+
isOptional: false;
|
|
283
87
|
};
|
|
284
88
|
attempt: {
|
|
285
|
-
|
|
286
|
-
|
|
89
|
+
type: import("@contractspec/lib.schema").FieldType<number, number>;
|
|
90
|
+
isOptional: false;
|
|
287
91
|
};
|
|
288
92
|
error: {
|
|
289
|
-
|
|
290
|
-
|
|
93
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
94
|
+
isOptional: false;
|
|
291
95
|
};
|
|
292
96
|
willRetry: {
|
|
293
|
-
|
|
294
|
-
|
|
97
|
+
type: import("@contractspec/lib.schema").FieldType<boolean, boolean>;
|
|
98
|
+
isOptional: false;
|
|
295
99
|
};
|
|
296
100
|
failedAt: {
|
|
297
|
-
|
|
298
|
-
|
|
101
|
+
type: import("@contractspec/lib.schema").FieldType<Date, string>;
|
|
102
|
+
isOptional: false;
|
|
299
103
|
};
|
|
300
|
-
|
|
301
|
-
|
|
104
|
+
}>>;
|
|
105
|
+
/**
|
|
106
|
+
* Emitted when a job is being retried.
|
|
107
|
+
*/
|
|
108
|
+
export declare const JobRetryingEvent: import("@contractspec/lib.contracts").EventSpec<import("@contractspec/lib.schema").SchemaModel<{
|
|
302
109
|
jobId: {
|
|
303
|
-
|
|
304
|
-
|
|
110
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
111
|
+
isOptional: false;
|
|
305
112
|
};
|
|
306
113
|
type: {
|
|
307
|
-
|
|
308
|
-
|
|
114
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
115
|
+
isOptional: false;
|
|
309
116
|
};
|
|
310
117
|
attempt: {
|
|
311
|
-
|
|
312
|
-
|
|
118
|
+
type: import("@contractspec/lib.schema").FieldType<number, number>;
|
|
119
|
+
isOptional: false;
|
|
313
120
|
};
|
|
314
121
|
nextAttemptAt: {
|
|
315
|
-
|
|
316
|
-
|
|
122
|
+
type: import("@contractspec/lib.schema").FieldType<Date, string>;
|
|
123
|
+
isOptional: false;
|
|
317
124
|
};
|
|
318
125
|
backoffMs: {
|
|
319
|
-
|
|
320
|
-
|
|
126
|
+
type: import("@contractspec/lib.schema").FieldType<number, number>;
|
|
127
|
+
isOptional: false;
|
|
321
128
|
};
|
|
322
|
-
|
|
323
|
-
|
|
129
|
+
}>>;
|
|
130
|
+
/**
|
|
131
|
+
* Emitted when a job is moved to dead letter queue.
|
|
132
|
+
*/
|
|
133
|
+
export declare const JobDeadLetteredEvent: import("@contractspec/lib.contracts").EventSpec<import("@contractspec/lib.schema").SchemaModel<{
|
|
324
134
|
jobId: {
|
|
325
|
-
|
|
326
|
-
|
|
135
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
136
|
+
isOptional: false;
|
|
327
137
|
};
|
|
328
138
|
type: {
|
|
329
|
-
|
|
330
|
-
|
|
139
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
140
|
+
isOptional: false;
|
|
331
141
|
};
|
|
332
142
|
attempts: {
|
|
333
|
-
|
|
334
|
-
|
|
143
|
+
type: import("@contractspec/lib.schema").FieldType<number, number>;
|
|
144
|
+
isOptional: false;
|
|
335
145
|
};
|
|
336
146
|
lastError: {
|
|
337
|
-
|
|
338
|
-
|
|
147
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
148
|
+
isOptional: false;
|
|
339
149
|
};
|
|
340
150
|
deadLetteredAt: {
|
|
341
|
-
|
|
342
|
-
|
|
151
|
+
type: import("@contractspec/lib.schema").FieldType<Date, string>;
|
|
152
|
+
isOptional: false;
|
|
343
153
|
};
|
|
344
|
-
|
|
345
|
-
|
|
154
|
+
}>>;
|
|
155
|
+
/**
|
|
156
|
+
* Emitted when a job is cancelled.
|
|
157
|
+
*/
|
|
158
|
+
export declare const JobCancelledEvent: import("@contractspec/lib.contracts").EventSpec<import("@contractspec/lib.schema").SchemaModel<{
|
|
346
159
|
jobId: {
|
|
347
|
-
|
|
348
|
-
|
|
160
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
161
|
+
isOptional: false;
|
|
349
162
|
};
|
|
350
163
|
type: {
|
|
351
|
-
|
|
352
|
-
|
|
164
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
165
|
+
isOptional: false;
|
|
353
166
|
};
|
|
354
167
|
cancelledBy: {
|
|
355
|
-
|
|
356
|
-
|
|
168
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
169
|
+
isOptional: true;
|
|
357
170
|
};
|
|
358
171
|
cancelledAt: {
|
|
359
|
-
|
|
360
|
-
|
|
172
|
+
type: import("@contractspec/lib.schema").FieldType<Date, string>;
|
|
173
|
+
isOptional: false;
|
|
361
174
|
};
|
|
362
|
-
|
|
363
|
-
|
|
175
|
+
}>>;
|
|
176
|
+
/**
|
|
177
|
+
* Emitted when a scheduled job is triggered.
|
|
178
|
+
*/
|
|
179
|
+
export declare const ScheduledJobTriggeredEvent: import("@contractspec/lib.contracts").EventSpec<import("@contractspec/lib.schema").SchemaModel<{
|
|
364
180
|
scheduleName: {
|
|
365
|
-
|
|
366
|
-
|
|
181
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
182
|
+
isOptional: false;
|
|
367
183
|
};
|
|
368
184
|
jobId: {
|
|
369
|
-
|
|
370
|
-
|
|
185
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
186
|
+
isOptional: false;
|
|
371
187
|
};
|
|
372
188
|
jobType: {
|
|
373
|
-
|
|
374
|
-
|
|
189
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
190
|
+
isOptional: false;
|
|
375
191
|
};
|
|
376
192
|
triggeredAt: {
|
|
377
|
-
|
|
378
|
-
|
|
193
|
+
type: import("@contractspec/lib.schema").FieldType<Date, string>;
|
|
194
|
+
isOptional: false;
|
|
379
195
|
};
|
|
380
196
|
nextRunAt: {
|
|
381
|
-
|
|
382
|
-
|
|
197
|
+
type: import("@contractspec/lib.schema").FieldType<Date, string>;
|
|
198
|
+
isOptional: true;
|
|
383
199
|
};
|
|
384
|
-
|
|
200
|
+
}>>;
|
|
201
|
+
/**
|
|
202
|
+
* All job events.
|
|
203
|
+
*/
|
|
204
|
+
export declare const JobEvents: {
|
|
205
|
+
JobEnqueuedEvent: import("@contractspec/lib.contracts").EventSpec<import("@contractspec/lib.schema").SchemaModel<{
|
|
206
|
+
jobId: {
|
|
207
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
208
|
+
isOptional: false;
|
|
209
|
+
};
|
|
210
|
+
type: {
|
|
211
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
212
|
+
isOptional: false;
|
|
213
|
+
};
|
|
214
|
+
priority: {
|
|
215
|
+
type: import("@contractspec/lib.schema").FieldType<number, number>;
|
|
216
|
+
isOptional: false;
|
|
217
|
+
};
|
|
218
|
+
scheduledAt: {
|
|
219
|
+
type: import("@contractspec/lib.schema").FieldType<Date, string>;
|
|
220
|
+
isOptional: true;
|
|
221
|
+
};
|
|
222
|
+
tenantId: {
|
|
223
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
224
|
+
isOptional: true;
|
|
225
|
+
};
|
|
226
|
+
enqueuedAt: {
|
|
227
|
+
type: import("@contractspec/lib.schema").FieldType<Date, string>;
|
|
228
|
+
isOptional: false;
|
|
229
|
+
};
|
|
230
|
+
}>>;
|
|
231
|
+
JobStartedEvent: import("@contractspec/lib.contracts").EventSpec<import("@contractspec/lib.schema").SchemaModel<{
|
|
232
|
+
jobId: {
|
|
233
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
234
|
+
isOptional: false;
|
|
235
|
+
};
|
|
236
|
+
type: {
|
|
237
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
238
|
+
isOptional: false;
|
|
239
|
+
};
|
|
240
|
+
attempt: {
|
|
241
|
+
type: import("@contractspec/lib.schema").FieldType<number, number>;
|
|
242
|
+
isOptional: false;
|
|
243
|
+
};
|
|
244
|
+
startedAt: {
|
|
245
|
+
type: import("@contractspec/lib.schema").FieldType<Date, string>;
|
|
246
|
+
isOptional: false;
|
|
247
|
+
};
|
|
248
|
+
}>>;
|
|
249
|
+
JobCompletedEvent: import("@contractspec/lib.contracts").EventSpec<import("@contractspec/lib.schema").SchemaModel<{
|
|
250
|
+
jobId: {
|
|
251
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
252
|
+
isOptional: false;
|
|
253
|
+
};
|
|
254
|
+
type: {
|
|
255
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
256
|
+
isOptional: false;
|
|
257
|
+
};
|
|
258
|
+
attempt: {
|
|
259
|
+
type: import("@contractspec/lib.schema").FieldType<number, number>;
|
|
260
|
+
isOptional: false;
|
|
261
|
+
};
|
|
262
|
+
durationMs: {
|
|
263
|
+
type: import("@contractspec/lib.schema").FieldType<number, number>;
|
|
264
|
+
isOptional: false;
|
|
265
|
+
};
|
|
266
|
+
completedAt: {
|
|
267
|
+
type: import("@contractspec/lib.schema").FieldType<Date, string>;
|
|
268
|
+
isOptional: false;
|
|
269
|
+
};
|
|
270
|
+
}>>;
|
|
271
|
+
JobFailedEvent: import("@contractspec/lib.contracts").EventSpec<import("@contractspec/lib.schema").SchemaModel<{
|
|
272
|
+
jobId: {
|
|
273
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
274
|
+
isOptional: false;
|
|
275
|
+
};
|
|
276
|
+
type: {
|
|
277
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
278
|
+
isOptional: false;
|
|
279
|
+
};
|
|
280
|
+
attempt: {
|
|
281
|
+
type: import("@contractspec/lib.schema").FieldType<number, number>;
|
|
282
|
+
isOptional: false;
|
|
283
|
+
};
|
|
284
|
+
error: {
|
|
285
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
286
|
+
isOptional: false;
|
|
287
|
+
};
|
|
288
|
+
willRetry: {
|
|
289
|
+
type: import("@contractspec/lib.schema").FieldType<boolean, boolean>;
|
|
290
|
+
isOptional: false;
|
|
291
|
+
};
|
|
292
|
+
failedAt: {
|
|
293
|
+
type: import("@contractspec/lib.schema").FieldType<Date, string>;
|
|
294
|
+
isOptional: false;
|
|
295
|
+
};
|
|
296
|
+
}>>;
|
|
297
|
+
JobRetryingEvent: import("@contractspec/lib.contracts").EventSpec<import("@contractspec/lib.schema").SchemaModel<{
|
|
298
|
+
jobId: {
|
|
299
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
300
|
+
isOptional: false;
|
|
301
|
+
};
|
|
302
|
+
type: {
|
|
303
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
304
|
+
isOptional: false;
|
|
305
|
+
};
|
|
306
|
+
attempt: {
|
|
307
|
+
type: import("@contractspec/lib.schema").FieldType<number, number>;
|
|
308
|
+
isOptional: false;
|
|
309
|
+
};
|
|
310
|
+
nextAttemptAt: {
|
|
311
|
+
type: import("@contractspec/lib.schema").FieldType<Date, string>;
|
|
312
|
+
isOptional: false;
|
|
313
|
+
};
|
|
314
|
+
backoffMs: {
|
|
315
|
+
type: import("@contractspec/lib.schema").FieldType<number, number>;
|
|
316
|
+
isOptional: false;
|
|
317
|
+
};
|
|
318
|
+
}>>;
|
|
319
|
+
JobDeadLetteredEvent: import("@contractspec/lib.contracts").EventSpec<import("@contractspec/lib.schema").SchemaModel<{
|
|
320
|
+
jobId: {
|
|
321
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
322
|
+
isOptional: false;
|
|
323
|
+
};
|
|
324
|
+
type: {
|
|
325
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
326
|
+
isOptional: false;
|
|
327
|
+
};
|
|
328
|
+
attempts: {
|
|
329
|
+
type: import("@contractspec/lib.schema").FieldType<number, number>;
|
|
330
|
+
isOptional: false;
|
|
331
|
+
};
|
|
332
|
+
lastError: {
|
|
333
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
334
|
+
isOptional: false;
|
|
335
|
+
};
|
|
336
|
+
deadLetteredAt: {
|
|
337
|
+
type: import("@contractspec/lib.schema").FieldType<Date, string>;
|
|
338
|
+
isOptional: false;
|
|
339
|
+
};
|
|
340
|
+
}>>;
|
|
341
|
+
JobCancelledEvent: import("@contractspec/lib.contracts").EventSpec<import("@contractspec/lib.schema").SchemaModel<{
|
|
342
|
+
jobId: {
|
|
343
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
344
|
+
isOptional: false;
|
|
345
|
+
};
|
|
346
|
+
type: {
|
|
347
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
348
|
+
isOptional: false;
|
|
349
|
+
};
|
|
350
|
+
cancelledBy: {
|
|
351
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
352
|
+
isOptional: true;
|
|
353
|
+
};
|
|
354
|
+
cancelledAt: {
|
|
355
|
+
type: import("@contractspec/lib.schema").FieldType<Date, string>;
|
|
356
|
+
isOptional: false;
|
|
357
|
+
};
|
|
358
|
+
}>>;
|
|
359
|
+
ScheduledJobTriggeredEvent: import("@contractspec/lib.contracts").EventSpec<import("@contractspec/lib.schema").SchemaModel<{
|
|
360
|
+
scheduleName: {
|
|
361
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
362
|
+
isOptional: false;
|
|
363
|
+
};
|
|
364
|
+
jobId: {
|
|
365
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
366
|
+
isOptional: false;
|
|
367
|
+
};
|
|
368
|
+
jobType: {
|
|
369
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
370
|
+
isOptional: false;
|
|
371
|
+
};
|
|
372
|
+
triggeredAt: {
|
|
373
|
+
type: import("@contractspec/lib.schema").FieldType<Date, string>;
|
|
374
|
+
isOptional: false;
|
|
375
|
+
};
|
|
376
|
+
nextRunAt: {
|
|
377
|
+
type: import("@contractspec/lib.schema").FieldType<Date, string>;
|
|
378
|
+
isOptional: true;
|
|
379
|
+
};
|
|
380
|
+
}>>;
|
|
385
381
|
};
|
|
386
|
-
//#endregion
|
|
387
|
-
export { JobCancelledEvent, JobCompletedEvent, JobDeadLetteredEvent, JobEnqueuedEvent, JobEvents, JobFailedEvent, JobRetryingEvent, JobStartedEvent, ScheduledJobTriggeredEvent };
|
|
388
382
|
//# sourceMappingURL=events.d.ts.map
|