@contractspec/lib.jobs 1.57.0 → 1.58.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.
Files changed (92) hide show
  1. package/dist/contracts/index.d.ts +494 -500
  2. package/dist/contracts/index.d.ts.map +1 -1
  3. package/dist/contracts/index.js +298 -461
  4. package/dist/entities/index.d.ts +117 -122
  5. package/dist/entities/index.d.ts.map +1 -1
  6. package/dist/entities/index.js +170 -193
  7. package/dist/events.d.ts +297 -303
  8. package/dist/events.d.ts.map +1 -1
  9. package/dist/events.js +199 -351
  10. package/dist/handlers/gmail-sync-handler.d.ts +5 -9
  11. package/dist/handlers/gmail-sync-handler.d.ts.map +1 -1
  12. package/dist/handlers/gmail-sync-handler.js +8 -8
  13. package/dist/handlers/index.d.ts +5 -9
  14. package/dist/handlers/index.d.ts.map +1 -1
  15. package/dist/handlers/index.js +53 -10
  16. package/dist/handlers/ping-job.d.ts +6 -10
  17. package/dist/handlers/ping-job.d.ts.map +1 -1
  18. package/dist/handlers/ping-job.js +13 -12
  19. package/dist/handlers/storage-document-handler.d.ts +7 -11
  20. package/dist/handlers/storage-document-handler.d.ts.map +1 -1
  21. package/dist/handlers/storage-document-handler.js +15 -13
  22. package/dist/index.d.ts +7 -24
  23. package/dist/index.d.ts.map +1 -1
  24. package/dist/index.js +1366 -64
  25. package/dist/jobs.capability.d.ts +2 -7
  26. package/dist/jobs.capability.d.ts.map +1 -1
  27. package/dist/jobs.capability.js +29 -33
  28. package/dist/jobs.feature.d.ts +1 -6
  29. package/dist/jobs.feature.d.ts.map +1 -1
  30. package/dist/jobs.feature.js +45 -108
  31. package/dist/node/contracts/index.js +318 -0
  32. package/dist/node/entities/index.js +174 -0
  33. package/dist/node/events.js +200 -0
  34. package/dist/node/handlers/gmail-sync-handler.js +9 -0
  35. package/dist/node/handlers/index.js +55 -0
  36. package/dist/node/handlers/ping-job.js +14 -0
  37. package/dist/node/handlers/storage-document-handler.js +16 -0
  38. package/dist/node/index.js +1368 -0
  39. package/dist/node/jobs.capability.js +28 -0
  40. package/dist/node/jobs.feature.js +46 -0
  41. package/dist/node/queue/gcp-cloud-tasks.js +66 -0
  42. package/dist/node/queue/gcp-pubsub.js +54 -0
  43. package/dist/node/queue/index.js +478 -0
  44. package/dist/node/queue/memory-queue.js +160 -0
  45. package/dist/node/queue/register-defined-job.js +15 -0
  46. package/dist/node/queue/scaleway-sqs-queue.js +206 -0
  47. package/dist/node/queue/types.js +10 -0
  48. package/dist/node/scheduler/index.js +117 -0
  49. package/dist/queue/gcp-cloud-tasks.d.ts +33 -36
  50. package/dist/queue/gcp-cloud-tasks.d.ts.map +1 -1
  51. package/dist/queue/gcp-cloud-tasks.js +65 -59
  52. package/dist/queue/gcp-pubsub.d.ts +18 -21
  53. package/dist/queue/gcp-pubsub.d.ts.map +1 -1
  54. package/dist/queue/gcp-pubsub.js +53 -45
  55. package/dist/queue/index.d.ts +6 -15
  56. package/dist/queue/index.d.ts.map +1 -1
  57. package/dist/queue/index.js +476 -20
  58. package/dist/queue/memory-queue.d.ts +25 -29
  59. package/dist/queue/memory-queue.d.ts.map +1 -1
  60. package/dist/queue/memory-queue.js +159 -138
  61. package/dist/queue/register-defined-job.d.ts +3 -7
  62. package/dist/queue/register-defined-job.d.ts.map +1 -1
  63. package/dist/queue/register-defined-job.js +14 -14
  64. package/dist/queue/scaleway-sqs-queue.d.ts +31 -35
  65. package/dist/queue/scaleway-sqs-queue.d.ts.map +1 -1
  66. package/dist/queue/scaleway-sqs-queue.js +205 -173
  67. package/dist/queue/types.d.ts +2 -8
  68. package/dist/queue/types.d.ts.map +1 -1
  69. package/dist/queue/types.js +11 -12
  70. package/dist/scheduler/index.d.ts +68 -72
  71. package/dist/scheduler/index.d.ts.map +1 -1
  72. package/dist/scheduler/index.js +113 -141
  73. package/package.json +176 -50
  74. package/dist/_virtual/_rolldown/runtime.js +0 -36
  75. package/dist/contracts/index.js.map +0 -1
  76. package/dist/entities/index.js.map +0 -1
  77. package/dist/events.js.map +0 -1
  78. package/dist/handlers/gmail-sync-handler.js.map +0 -1
  79. package/dist/handlers/index.js.map +0 -1
  80. package/dist/handlers/ping-job.js.map +0 -1
  81. package/dist/handlers/storage-document-handler.js.map +0 -1
  82. package/dist/index.js.map +0 -1
  83. package/dist/jobs.capability.js.map +0 -1
  84. package/dist/jobs.feature.js.map +0 -1
  85. package/dist/queue/gcp-cloud-tasks.js.map +0 -1
  86. package/dist/queue/gcp-pubsub.js.map +0 -1
  87. package/dist/queue/index.js.map +0 -1
  88. package/dist/queue/memory-queue.js.map +0 -1
  89. package/dist/queue/register-defined-job.js.map +0 -1
  90. package/dist/queue/scaleway-sqs-queue.js.map +0 -1
  91. package/dist/queue/types.js.map +0 -1
  92. package/dist/scheduler/index.js.map +0 -1
@@ -1,547 +1,541 @@
1
- import * as _contractspec_lib_schema0 from "@contractspec/lib.schema";
2
- import * as _contractspec_lib_contracts0 from "@contractspec/lib.contracts";
3
-
4
- //#region src/contracts/index.d.ts
5
- declare const JobModel: _contractspec_lib_schema0.SchemaModel<{
6
- id: {
7
- type: _contractspec_lib_schema0.FieldType<string, string>;
8
- isOptional: false;
9
- };
10
- type: {
11
- type: _contractspec_lib_schema0.FieldType<string, string>;
12
- isOptional: false;
13
- };
14
- version: {
15
- type: _contractspec_lib_schema0.FieldType<string, string>;
16
- isOptional: false;
17
- };
18
- payload: {
19
- type: _contractspec_lib_schema0.FieldType<unknown, unknown>;
20
- isOptional: false;
21
- };
22
- status: {
23
- type: _contractspec_lib_schema0.FieldType<string, string>;
24
- isOptional: false;
25
- };
26
- priority: {
27
- type: _contractspec_lib_schema0.FieldType<number, number>;
28
- isOptional: false;
29
- };
30
- attempts: {
31
- type: _contractspec_lib_schema0.FieldType<number, number>;
32
- isOptional: false;
33
- };
34
- maxRetries: {
35
- type: _contractspec_lib_schema0.FieldType<number, number>;
36
- isOptional: false;
37
- };
38
- createdAt: {
39
- type: _contractspec_lib_schema0.FieldType<Date, string>;
40
- isOptional: false;
41
- };
42
- updatedAt: {
43
- type: _contractspec_lib_schema0.FieldType<Date, string>;
44
- isOptional: false;
45
- };
46
- scheduledAt: {
47
- type: _contractspec_lib_schema0.FieldType<Date, string>;
48
- isOptional: true;
49
- };
50
- startedAt: {
51
- type: _contractspec_lib_schema0.FieldType<Date, string>;
52
- isOptional: true;
53
- };
54
- completedAt: {
55
- type: _contractspec_lib_schema0.FieldType<Date, string>;
56
- isOptional: true;
57
- };
58
- lastError: {
59
- type: _contractspec_lib_schema0.FieldType<string, string>;
60
- isOptional: true;
61
- };
1
+ export declare const JobModel: import("@contractspec/lib.schema").SchemaModel<{
2
+ id: {
3
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
4
+ isOptional: false;
5
+ };
6
+ type: {
7
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
8
+ isOptional: false;
9
+ };
10
+ version: {
11
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
12
+ isOptional: false;
13
+ };
14
+ payload: {
15
+ type: import("@contractspec/lib.schema").FieldType<unknown, unknown>;
16
+ isOptional: false;
17
+ };
18
+ status: {
19
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
20
+ isOptional: false;
21
+ };
22
+ priority: {
23
+ type: import("@contractspec/lib.schema").FieldType<number, number>;
24
+ isOptional: false;
25
+ };
26
+ attempts: {
27
+ type: import("@contractspec/lib.schema").FieldType<number, number>;
28
+ isOptional: false;
29
+ };
30
+ maxRetries: {
31
+ type: import("@contractspec/lib.schema").FieldType<number, number>;
32
+ isOptional: false;
33
+ };
34
+ createdAt: {
35
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
36
+ isOptional: false;
37
+ };
38
+ updatedAt: {
39
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
40
+ isOptional: false;
41
+ };
42
+ scheduledAt: {
43
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
44
+ isOptional: true;
45
+ };
46
+ startedAt: {
47
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
48
+ isOptional: true;
49
+ };
50
+ completedAt: {
51
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
52
+ isOptional: true;
53
+ };
54
+ lastError: {
55
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
56
+ isOptional: true;
57
+ };
62
58
  }>;
63
- declare const ScheduledJobModel: _contractspec_lib_schema0.SchemaModel<{
64
- id: {
65
- type: _contractspec_lib_schema0.FieldType<string, string>;
66
- isOptional: false;
67
- };
68
- name: {
69
- type: _contractspec_lib_schema0.FieldType<string, string>;
70
- isOptional: false;
71
- };
72
- description: {
73
- type: _contractspec_lib_schema0.FieldType<string, string>;
74
- isOptional: true;
75
- };
76
- cronExpression: {
77
- type: _contractspec_lib_schema0.FieldType<string, string>;
78
- isOptional: false;
79
- };
80
- timezone: {
81
- type: _contractspec_lib_schema0.FieldType<string, string>;
82
- isOptional: false;
83
- };
84
- jobType: {
85
- type: _contractspec_lib_schema0.FieldType<string, string>;
86
- isOptional: false;
87
- };
88
- enabled: {
89
- type: _contractspec_lib_schema0.FieldType<boolean, boolean>;
90
- isOptional: false;
91
- };
92
- lastRunAt: {
93
- type: _contractspec_lib_schema0.FieldType<Date, string>;
94
- isOptional: true;
95
- };
96
- nextRunAt: {
97
- type: _contractspec_lib_schema0.FieldType<Date, string>;
98
- isOptional: true;
99
- };
100
- createdAt: {
101
- type: _contractspec_lib_schema0.FieldType<Date, string>;
102
- isOptional: false;
103
- };
59
+ export declare const ScheduledJobModel: import("@contractspec/lib.schema").SchemaModel<{
60
+ id: {
61
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
62
+ isOptional: false;
63
+ };
64
+ name: {
65
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
66
+ isOptional: false;
67
+ };
68
+ description: {
69
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
70
+ isOptional: true;
71
+ };
72
+ cronExpression: {
73
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
74
+ isOptional: false;
75
+ };
76
+ timezone: {
77
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
78
+ isOptional: false;
79
+ };
80
+ jobType: {
81
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
82
+ isOptional: false;
83
+ };
84
+ enabled: {
85
+ type: import("@contractspec/lib.schema").FieldType<boolean, boolean>;
86
+ isOptional: false;
87
+ };
88
+ lastRunAt: {
89
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
90
+ isOptional: true;
91
+ };
92
+ nextRunAt: {
93
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
94
+ isOptional: true;
95
+ };
96
+ createdAt: {
97
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
98
+ isOptional: false;
99
+ };
104
100
  }>;
105
- declare const QueueStatsModel: _contractspec_lib_schema0.SchemaModel<{
106
- pending: {
107
- type: _contractspec_lib_schema0.FieldType<number, number>;
108
- isOptional: false;
109
- };
110
- running: {
111
- type: _contractspec_lib_schema0.FieldType<number, number>;
112
- isOptional: false;
113
- };
114
- completed: {
115
- type: _contractspec_lib_schema0.FieldType<number, number>;
116
- isOptional: false;
117
- };
118
- failed: {
119
- type: _contractspec_lib_schema0.FieldType<number, number>;
120
- isOptional: false;
121
- };
122
- deadLetter: {
123
- type: _contractspec_lib_schema0.FieldType<number, number>;
124
- isOptional: false;
125
- };
101
+ export declare const QueueStatsModel: import("@contractspec/lib.schema").SchemaModel<{
102
+ pending: {
103
+ type: import("@contractspec/lib.schema").FieldType<number, number>;
104
+ isOptional: false;
105
+ };
106
+ running: {
107
+ type: import("@contractspec/lib.schema").FieldType<number, number>;
108
+ isOptional: false;
109
+ };
110
+ completed: {
111
+ type: import("@contractspec/lib.schema").FieldType<number, number>;
112
+ isOptional: false;
113
+ };
114
+ failed: {
115
+ type: import("@contractspec/lib.schema").FieldType<number, number>;
116
+ isOptional: false;
117
+ };
118
+ deadLetter: {
119
+ type: import("@contractspec/lib.schema").FieldType<number, number>;
120
+ isOptional: false;
121
+ };
126
122
  }>;
127
123
  /**
128
124
  * Enqueue a job.
129
125
  */
130
- declare const EnqueueJobContract: _contractspec_lib_contracts0.OperationSpec<_contractspec_lib_schema0.SchemaModel<{
131
- type: {
132
- type: _contractspec_lib_schema0.FieldType<string, string>;
133
- isOptional: false;
134
- };
135
- payload: {
136
- type: _contractspec_lib_schema0.FieldType<unknown, unknown>;
137
- isOptional: false;
138
- };
139
- delaySeconds: {
140
- type: _contractspec_lib_schema0.FieldType<number, number>;
141
- isOptional: true;
142
- };
143
- dedupeKey: {
144
- type: _contractspec_lib_schema0.FieldType<string, string>;
145
- isOptional: true;
146
- };
147
- maxRetries: {
148
- type: _contractspec_lib_schema0.FieldType<number, number>;
149
- isOptional: true;
150
- };
151
- priority: {
152
- type: _contractspec_lib_schema0.FieldType<number, number>;
153
- isOptional: true;
154
- };
155
- timeoutMs: {
156
- type: _contractspec_lib_schema0.FieldType<number, number>;
157
- isOptional: true;
158
- };
159
- }>, _contractspec_lib_schema0.SchemaModel<{
160
- id: {
161
- type: _contractspec_lib_schema0.FieldType<string, string>;
162
- isOptional: false;
163
- };
164
- type: {
165
- type: _contractspec_lib_schema0.FieldType<string, string>;
166
- isOptional: false;
167
- };
168
- version: {
169
- type: _contractspec_lib_schema0.FieldType<string, string>;
170
- isOptional: false;
171
- };
172
- payload: {
173
- type: _contractspec_lib_schema0.FieldType<unknown, unknown>;
174
- isOptional: false;
175
- };
176
- status: {
177
- type: _contractspec_lib_schema0.FieldType<string, string>;
178
- isOptional: false;
179
- };
180
- priority: {
181
- type: _contractspec_lib_schema0.FieldType<number, number>;
182
- isOptional: false;
183
- };
184
- attempts: {
185
- type: _contractspec_lib_schema0.FieldType<number, number>;
186
- isOptional: false;
187
- };
188
- maxRetries: {
189
- type: _contractspec_lib_schema0.FieldType<number, number>;
190
- isOptional: false;
191
- };
192
- createdAt: {
193
- type: _contractspec_lib_schema0.FieldType<Date, string>;
194
- isOptional: false;
195
- };
196
- updatedAt: {
197
- type: _contractspec_lib_schema0.FieldType<Date, string>;
198
- isOptional: false;
199
- };
200
- scheduledAt: {
201
- type: _contractspec_lib_schema0.FieldType<Date, string>;
202
- isOptional: true;
203
- };
204
- startedAt: {
205
- type: _contractspec_lib_schema0.FieldType<Date, string>;
206
- isOptional: true;
207
- };
208
- completedAt: {
209
- type: _contractspec_lib_schema0.FieldType<Date, string>;
210
- isOptional: true;
211
- };
212
- lastError: {
213
- type: _contractspec_lib_schema0.FieldType<string, string>;
214
- isOptional: true;
215
- };
216
- }>, {
217
- key: string;
218
- version: string;
219
- when: string;
220
- payload: _contractspec_lib_schema0.SchemaModel<{
221
- jobId: {
222
- type: _contractspec_lib_schema0.FieldType<string, string>;
223
- isOptional: false;
126
+ export declare const EnqueueJobContract: import("@contractspec/lib.contracts").OperationSpec<import("@contractspec/lib.schema").SchemaModel<{
127
+ type: {
128
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
129
+ isOptional: false;
130
+ };
131
+ payload: {
132
+ type: import("@contractspec/lib.schema").FieldType<unknown, unknown>;
133
+ isOptional: false;
134
+ };
135
+ delaySeconds: {
136
+ type: import("@contractspec/lib.schema").FieldType<number, number>;
137
+ isOptional: true;
138
+ };
139
+ dedupeKey: {
140
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
141
+ isOptional: true;
142
+ };
143
+ maxRetries: {
144
+ type: import("@contractspec/lib.schema").FieldType<number, number>;
145
+ isOptional: true;
146
+ };
147
+ priority: {
148
+ type: import("@contractspec/lib.schema").FieldType<number, number>;
149
+ isOptional: true;
150
+ };
151
+ timeoutMs: {
152
+ type: import("@contractspec/lib.schema").FieldType<number, number>;
153
+ isOptional: true;
154
+ };
155
+ }>, import("@contractspec/lib.schema").SchemaModel<{
156
+ id: {
157
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
158
+ isOptional: false;
224
159
  };
225
160
  type: {
226
- type: _contractspec_lib_schema0.FieldType<string, string>;
227
- isOptional: false;
161
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
162
+ isOptional: false;
163
+ };
164
+ version: {
165
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
166
+ isOptional: false;
167
+ };
168
+ payload: {
169
+ type: import("@contractspec/lib.schema").FieldType<unknown, unknown>;
170
+ isOptional: false;
171
+ };
172
+ status: {
173
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
174
+ isOptional: false;
228
175
  };
229
176
  priority: {
230
- type: _contractspec_lib_schema0.FieldType<number, number>;
231
- isOptional: false;
177
+ type: import("@contractspec/lib.schema").FieldType<number, number>;
178
+ isOptional: false;
179
+ };
180
+ attempts: {
181
+ type: import("@contractspec/lib.schema").FieldType<number, number>;
182
+ isOptional: false;
183
+ };
184
+ maxRetries: {
185
+ type: import("@contractspec/lib.schema").FieldType<number, number>;
186
+ isOptional: false;
187
+ };
188
+ createdAt: {
189
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
190
+ isOptional: false;
191
+ };
192
+ updatedAt: {
193
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
194
+ isOptional: false;
232
195
  };
233
196
  scheduledAt: {
234
- type: _contractspec_lib_schema0.FieldType<Date, string>;
235
- isOptional: true;
197
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
198
+ isOptional: true;
236
199
  };
237
- tenantId: {
238
- type: _contractspec_lib_schema0.FieldType<string, string>;
239
- isOptional: true;
200
+ startedAt: {
201
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
202
+ isOptional: true;
240
203
  };
241
- enqueuedAt: {
242
- type: _contractspec_lib_schema0.FieldType<Date, string>;
243
- isOptional: false;
204
+ completedAt: {
205
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
206
+ isOptional: true;
244
207
  };
245
- }>;
208
+ lastError: {
209
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
210
+ isOptional: true;
211
+ };
212
+ }>, {
213
+ key: string;
214
+ version: string;
215
+ when: string;
216
+ payload: import("@contractspec/lib.schema").SchemaModel<{
217
+ jobId: {
218
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
219
+ isOptional: false;
220
+ };
221
+ type: {
222
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
223
+ isOptional: false;
224
+ };
225
+ priority: {
226
+ type: import("@contractspec/lib.schema").FieldType<number, number>;
227
+ isOptional: false;
228
+ };
229
+ scheduledAt: {
230
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
231
+ isOptional: true;
232
+ };
233
+ tenantId: {
234
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
235
+ isOptional: true;
236
+ };
237
+ enqueuedAt: {
238
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
239
+ isOptional: false;
240
+ };
241
+ }>;
246
242
  }[]>;
247
243
  /**
248
244
  * Get job by ID.
249
245
  */
250
- declare const GetJobContract: _contractspec_lib_contracts0.OperationSpec<_contractspec_lib_schema0.SchemaModel<{
251
- jobId: {
252
- type: _contractspec_lib_schema0.FieldType<string, string>;
253
- isOptional: false;
254
- };
255
- }>, _contractspec_lib_schema0.SchemaModel<{
256
- id: {
257
- type: _contractspec_lib_schema0.FieldType<string, string>;
258
- isOptional: false;
259
- };
260
- type: {
261
- type: _contractspec_lib_schema0.FieldType<string, string>;
262
- isOptional: false;
263
- };
264
- version: {
265
- type: _contractspec_lib_schema0.FieldType<string, string>;
266
- isOptional: false;
267
- };
268
- payload: {
269
- type: _contractspec_lib_schema0.FieldType<unknown, unknown>;
270
- isOptional: false;
271
- };
272
- status: {
273
- type: _contractspec_lib_schema0.FieldType<string, string>;
274
- isOptional: false;
275
- };
276
- priority: {
277
- type: _contractspec_lib_schema0.FieldType<number, number>;
278
- isOptional: false;
279
- };
280
- attempts: {
281
- type: _contractspec_lib_schema0.FieldType<number, number>;
282
- isOptional: false;
283
- };
284
- maxRetries: {
285
- type: _contractspec_lib_schema0.FieldType<number, number>;
286
- isOptional: false;
287
- };
288
- createdAt: {
289
- type: _contractspec_lib_schema0.FieldType<Date, string>;
290
- isOptional: false;
291
- };
292
- updatedAt: {
293
- type: _contractspec_lib_schema0.FieldType<Date, string>;
294
- isOptional: false;
295
- };
296
- scheduledAt: {
297
- type: _contractspec_lib_schema0.FieldType<Date, string>;
298
- isOptional: true;
299
- };
300
- startedAt: {
301
- type: _contractspec_lib_schema0.FieldType<Date, string>;
302
- isOptional: true;
303
- };
304
- completedAt: {
305
- type: _contractspec_lib_schema0.FieldType<Date, string>;
306
- isOptional: true;
307
- };
308
- lastError: {
309
- type: _contractspec_lib_schema0.FieldType<string, string>;
310
- isOptional: true;
311
- };
246
+ export declare const GetJobContract: import("@contractspec/lib.contracts").OperationSpec<import("@contractspec/lib.schema").SchemaModel<{
247
+ jobId: {
248
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
249
+ isOptional: false;
250
+ };
251
+ }>, import("@contractspec/lib.schema").SchemaModel<{
252
+ id: {
253
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
254
+ isOptional: false;
255
+ };
256
+ type: {
257
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
258
+ isOptional: false;
259
+ };
260
+ version: {
261
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
262
+ isOptional: false;
263
+ };
264
+ payload: {
265
+ type: import("@contractspec/lib.schema").FieldType<unknown, unknown>;
266
+ isOptional: false;
267
+ };
268
+ status: {
269
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
270
+ isOptional: false;
271
+ };
272
+ priority: {
273
+ type: import("@contractspec/lib.schema").FieldType<number, number>;
274
+ isOptional: false;
275
+ };
276
+ attempts: {
277
+ type: import("@contractspec/lib.schema").FieldType<number, number>;
278
+ isOptional: false;
279
+ };
280
+ maxRetries: {
281
+ type: import("@contractspec/lib.schema").FieldType<number, number>;
282
+ isOptional: false;
283
+ };
284
+ createdAt: {
285
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
286
+ isOptional: false;
287
+ };
288
+ updatedAt: {
289
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
290
+ isOptional: false;
291
+ };
292
+ scheduledAt: {
293
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
294
+ isOptional: true;
295
+ };
296
+ startedAt: {
297
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
298
+ isOptional: true;
299
+ };
300
+ completedAt: {
301
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
302
+ isOptional: true;
303
+ };
304
+ lastError: {
305
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
306
+ isOptional: true;
307
+ };
312
308
  }>, undefined>;
313
309
  /**
314
310
  * Cancel a job.
315
311
  */
316
- declare const CancelJobContract: _contractspec_lib_contracts0.OperationSpec<_contractspec_lib_schema0.SchemaModel<{
317
- jobId: {
318
- type: _contractspec_lib_schema0.FieldType<string, string>;
319
- isOptional: false;
320
- };
321
- }>, _contractspec_lib_schema0.SchemaModel<{
322
- success: {
323
- type: _contractspec_lib_schema0.FieldType<boolean, boolean>;
324
- isOptional: false;
325
- };
326
- }>, {
327
- key: string;
328
- version: string;
329
- when: string;
330
- payload: _contractspec_lib_schema0.SchemaModel<{
312
+ export declare const CancelJobContract: import("@contractspec/lib.contracts").OperationSpec<import("@contractspec/lib.schema").SchemaModel<{
331
313
  jobId: {
332
- type: _contractspec_lib_schema0.FieldType<string, string>;
333
- isOptional: false;
314
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
315
+ isOptional: false;
334
316
  };
335
- }>;
317
+ }>, import("@contractspec/lib.schema").SchemaModel<{
318
+ success: {
319
+ type: import("@contractspec/lib.schema").FieldType<boolean, boolean>;
320
+ isOptional: false;
321
+ };
322
+ }>, {
323
+ key: string;
324
+ version: string;
325
+ when: string;
326
+ payload: import("@contractspec/lib.schema").SchemaModel<{
327
+ jobId: {
328
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
329
+ isOptional: false;
330
+ };
331
+ }>;
336
332
  }[]>;
337
333
  /**
338
334
  * Get queue statistics.
339
335
  */
340
- declare const GetQueueStatsContract: _contractspec_lib_contracts0.OperationSpec<_contractspec_lib_schema0.AnySchemaModel, _contractspec_lib_schema0.SchemaModel<{
341
- pending: {
342
- type: _contractspec_lib_schema0.FieldType<number, number>;
343
- isOptional: false;
344
- };
345
- running: {
346
- type: _contractspec_lib_schema0.FieldType<number, number>;
347
- isOptional: false;
348
- };
349
- completed: {
350
- type: _contractspec_lib_schema0.FieldType<number, number>;
351
- isOptional: false;
352
- };
353
- failed: {
354
- type: _contractspec_lib_schema0.FieldType<number, number>;
355
- isOptional: false;
356
- };
357
- deadLetter: {
358
- type: _contractspec_lib_schema0.FieldType<number, number>;
359
- isOptional: false;
360
- };
336
+ export declare const GetQueueStatsContract: import("@contractspec/lib.contracts").OperationSpec<import("@contractspec/lib.schema").AnySchemaModel, import("@contractspec/lib.schema").SchemaModel<{
337
+ pending: {
338
+ type: import("@contractspec/lib.schema").FieldType<number, number>;
339
+ isOptional: false;
340
+ };
341
+ running: {
342
+ type: import("@contractspec/lib.schema").FieldType<number, number>;
343
+ isOptional: false;
344
+ };
345
+ completed: {
346
+ type: import("@contractspec/lib.schema").FieldType<number, number>;
347
+ isOptional: false;
348
+ };
349
+ failed: {
350
+ type: import("@contractspec/lib.schema").FieldType<number, number>;
351
+ isOptional: false;
352
+ };
353
+ deadLetter: {
354
+ type: import("@contractspec/lib.schema").FieldType<number, number>;
355
+ isOptional: false;
356
+ };
361
357
  }>, undefined>;
362
358
  /**
363
359
  * Create a scheduled job.
364
360
  */
365
- declare const CreateScheduledJobContract: _contractspec_lib_contracts0.OperationSpec<_contractspec_lib_schema0.SchemaModel<{
366
- name: {
367
- type: _contractspec_lib_schema0.FieldType<string, string>;
368
- isOptional: false;
369
- };
370
- description: {
371
- type: _contractspec_lib_schema0.FieldType<string, string>;
372
- isOptional: true;
373
- };
374
- cronExpression: {
375
- type: _contractspec_lib_schema0.FieldType<string, string>;
376
- isOptional: false;
377
- };
378
- timezone: {
379
- type: _contractspec_lib_schema0.FieldType<string, string>;
380
- isOptional: true;
381
- };
382
- jobType: {
383
- type: _contractspec_lib_schema0.FieldType<string, string>;
384
- isOptional: false;
385
- };
386
- payload: {
387
- type: _contractspec_lib_schema0.FieldType<unknown, unknown>;
388
- isOptional: true;
389
- };
390
- maxRetries: {
391
- type: _contractspec_lib_schema0.FieldType<number, number>;
392
- isOptional: true;
393
- };
394
- enabled: {
395
- type: _contractspec_lib_schema0.FieldType<boolean, boolean>;
396
- isOptional: true;
397
- };
398
- }>, _contractspec_lib_schema0.SchemaModel<{
399
- id: {
400
- type: _contractspec_lib_schema0.FieldType<string, string>;
401
- isOptional: false;
402
- };
403
- name: {
404
- type: _contractspec_lib_schema0.FieldType<string, string>;
405
- isOptional: false;
406
- };
407
- description: {
408
- type: _contractspec_lib_schema0.FieldType<string, string>;
409
- isOptional: true;
410
- };
411
- cronExpression: {
412
- type: _contractspec_lib_schema0.FieldType<string, string>;
413
- isOptional: false;
414
- };
415
- timezone: {
416
- type: _contractspec_lib_schema0.FieldType<string, string>;
417
- isOptional: false;
418
- };
419
- jobType: {
420
- type: _contractspec_lib_schema0.FieldType<string, string>;
421
- isOptional: false;
422
- };
423
- enabled: {
424
- type: _contractspec_lib_schema0.FieldType<boolean, boolean>;
425
- isOptional: false;
426
- };
427
- lastRunAt: {
428
- type: _contractspec_lib_schema0.FieldType<Date, string>;
429
- isOptional: true;
430
- };
431
- nextRunAt: {
432
- type: _contractspec_lib_schema0.FieldType<Date, string>;
433
- isOptional: true;
434
- };
435
- createdAt: {
436
- type: _contractspec_lib_schema0.FieldType<Date, string>;
437
- isOptional: false;
438
- };
439
- }>, undefined>;
440
- /**
441
- * List scheduled jobs.
442
- */
443
- declare const ListScheduledJobsContract: _contractspec_lib_contracts0.OperationSpec<_contractspec_lib_schema0.AnySchemaModel, _contractspec_lib_schema0.SchemaModel<{
444
- schedules: {
445
- type: _contractspec_lib_schema0.SchemaModel<{
446
- id: {
447
- type: _contractspec_lib_schema0.FieldType<string, string>;
448
- isOptional: false;
449
- };
450
- name: {
451
- type: _contractspec_lib_schema0.FieldType<string, string>;
452
- isOptional: false;
453
- };
454
- description: {
455
- type: _contractspec_lib_schema0.FieldType<string, string>;
361
+ export declare const CreateScheduledJobContract: import("@contractspec/lib.contracts").OperationSpec<import("@contractspec/lib.schema").SchemaModel<{
362
+ name: {
363
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
364
+ isOptional: false;
365
+ };
366
+ description: {
367
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
368
+ isOptional: true;
369
+ };
370
+ cronExpression: {
371
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
372
+ isOptional: false;
373
+ };
374
+ timezone: {
375
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
456
376
  isOptional: true;
457
- };
458
- cronExpression: {
459
- type: _contractspec_lib_schema0.FieldType<string, string>;
377
+ };
378
+ jobType: {
379
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
460
380
  isOptional: false;
461
- };
462
- timezone: {
463
- type: _contractspec_lib_schema0.FieldType<string, string>;
381
+ };
382
+ payload: {
383
+ type: import("@contractspec/lib.schema").FieldType<unknown, unknown>;
384
+ isOptional: true;
385
+ };
386
+ maxRetries: {
387
+ type: import("@contractspec/lib.schema").FieldType<number, number>;
388
+ isOptional: true;
389
+ };
390
+ enabled: {
391
+ type: import("@contractspec/lib.schema").FieldType<boolean, boolean>;
392
+ isOptional: true;
393
+ };
394
+ }>, import("@contractspec/lib.schema").SchemaModel<{
395
+ id: {
396
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
464
397
  isOptional: false;
465
- };
466
- jobType: {
467
- type: _contractspec_lib_schema0.FieldType<string, string>;
398
+ };
399
+ name: {
400
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
468
401
  isOptional: false;
469
- };
470
- enabled: {
471
- type: _contractspec_lib_schema0.FieldType<boolean, boolean>;
402
+ };
403
+ description: {
404
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
405
+ isOptional: true;
406
+ };
407
+ cronExpression: {
408
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
472
409
  isOptional: false;
473
- };
474
- lastRunAt: {
475
- type: _contractspec_lib_schema0.FieldType<Date, string>;
410
+ };
411
+ timezone: {
412
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
413
+ isOptional: false;
414
+ };
415
+ jobType: {
416
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
417
+ isOptional: false;
418
+ };
419
+ enabled: {
420
+ type: import("@contractspec/lib.schema").FieldType<boolean, boolean>;
421
+ isOptional: false;
422
+ };
423
+ lastRunAt: {
424
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
476
425
  isOptional: true;
477
- };
478
- nextRunAt: {
479
- type: _contractspec_lib_schema0.FieldType<Date, string>;
426
+ };
427
+ nextRunAt: {
428
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
480
429
  isOptional: true;
481
- };
482
- createdAt: {
483
- type: _contractspec_lib_schema0.FieldType<Date, string>;
430
+ };
431
+ createdAt: {
432
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
484
433
  isOptional: false;
485
- };
486
- }>;
487
- isArray: true;
488
- isOptional: false;
489
- };
434
+ };
435
+ }>, undefined>;
436
+ /**
437
+ * List scheduled jobs.
438
+ */
439
+ export declare const ListScheduledJobsContract: import("@contractspec/lib.contracts").OperationSpec<import("@contractspec/lib.schema").AnySchemaModel, import("@contractspec/lib.schema").SchemaModel<{
440
+ schedules: {
441
+ type: import("@contractspec/lib.schema").SchemaModel<{
442
+ id: {
443
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
444
+ isOptional: false;
445
+ };
446
+ name: {
447
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
448
+ isOptional: false;
449
+ };
450
+ description: {
451
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
452
+ isOptional: true;
453
+ };
454
+ cronExpression: {
455
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
456
+ isOptional: false;
457
+ };
458
+ timezone: {
459
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
460
+ isOptional: false;
461
+ };
462
+ jobType: {
463
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
464
+ isOptional: false;
465
+ };
466
+ enabled: {
467
+ type: import("@contractspec/lib.schema").FieldType<boolean, boolean>;
468
+ isOptional: false;
469
+ };
470
+ lastRunAt: {
471
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
472
+ isOptional: true;
473
+ };
474
+ nextRunAt: {
475
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
476
+ isOptional: true;
477
+ };
478
+ createdAt: {
479
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
480
+ isOptional: false;
481
+ };
482
+ }>;
483
+ isArray: true;
484
+ isOptional: false;
485
+ };
490
486
  }>, undefined>;
491
487
  /**
492
488
  * Toggle scheduled job enabled state.
493
489
  */
494
- declare const ToggleScheduledJobContract: _contractspec_lib_contracts0.OperationSpec<_contractspec_lib_schema0.SchemaModel<{
495
- name: {
496
- type: _contractspec_lib_schema0.FieldType<string, string>;
497
- isOptional: false;
498
- };
499
- enabled: {
500
- type: _contractspec_lib_schema0.FieldType<boolean, boolean>;
501
- isOptional: false;
502
- };
503
- }>, _contractspec_lib_schema0.SchemaModel<{
504
- id: {
505
- type: _contractspec_lib_schema0.FieldType<string, string>;
506
- isOptional: false;
507
- };
508
- name: {
509
- type: _contractspec_lib_schema0.FieldType<string, string>;
510
- isOptional: false;
511
- };
512
- description: {
513
- type: _contractspec_lib_schema0.FieldType<string, string>;
514
- isOptional: true;
515
- };
516
- cronExpression: {
517
- type: _contractspec_lib_schema0.FieldType<string, string>;
518
- isOptional: false;
519
- };
520
- timezone: {
521
- type: _contractspec_lib_schema0.FieldType<string, string>;
522
- isOptional: false;
523
- };
524
- jobType: {
525
- type: _contractspec_lib_schema0.FieldType<string, string>;
526
- isOptional: false;
527
- };
528
- enabled: {
529
- type: _contractspec_lib_schema0.FieldType<boolean, boolean>;
530
- isOptional: false;
531
- };
532
- lastRunAt: {
533
- type: _contractspec_lib_schema0.FieldType<Date, string>;
534
- isOptional: true;
535
- };
536
- nextRunAt: {
537
- type: _contractspec_lib_schema0.FieldType<Date, string>;
538
- isOptional: true;
539
- };
540
- createdAt: {
541
- type: _contractspec_lib_schema0.FieldType<Date, string>;
542
- isOptional: false;
543
- };
490
+ export declare const ToggleScheduledJobContract: import("@contractspec/lib.contracts").OperationSpec<import("@contractspec/lib.schema").SchemaModel<{
491
+ name: {
492
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
493
+ isOptional: false;
494
+ };
495
+ enabled: {
496
+ type: import("@contractspec/lib.schema").FieldType<boolean, boolean>;
497
+ isOptional: false;
498
+ };
499
+ }>, import("@contractspec/lib.schema").SchemaModel<{
500
+ id: {
501
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
502
+ isOptional: false;
503
+ };
504
+ name: {
505
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
506
+ isOptional: false;
507
+ };
508
+ description: {
509
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
510
+ isOptional: true;
511
+ };
512
+ cronExpression: {
513
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
514
+ isOptional: false;
515
+ };
516
+ timezone: {
517
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
518
+ isOptional: false;
519
+ };
520
+ jobType: {
521
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
522
+ isOptional: false;
523
+ };
524
+ enabled: {
525
+ type: import("@contractspec/lib.schema").FieldType<boolean, boolean>;
526
+ isOptional: false;
527
+ };
528
+ lastRunAt: {
529
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
530
+ isOptional: true;
531
+ };
532
+ nextRunAt: {
533
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
534
+ isOptional: true;
535
+ };
536
+ createdAt: {
537
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
538
+ isOptional: false;
539
+ };
544
540
  }>, undefined>;
545
- //#endregion
546
- export { CancelJobContract, CreateScheduledJobContract, EnqueueJobContract, GetJobContract, GetQueueStatsContract, JobModel, ListScheduledJobsContract, QueueStatsModel, ScheduledJobModel, ToggleScheduledJobContract };
547
541
  //# sourceMappingURL=index.d.ts.map