@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/entities/index.d.ts
CHANGED
|
@@ -1,145 +1,140 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { ModuleSchemaContribution } from "@contractspec/lib.schema";
|
|
3
|
-
|
|
4
|
-
//#region src/entities/index.d.ts
|
|
1
|
+
import type { ModuleSchemaContribution } from '@contractspec/lib.schema';
|
|
5
2
|
/**
|
|
6
3
|
* Job status enum.
|
|
7
4
|
*/
|
|
8
|
-
declare const JobStatusEnum:
|
|
5
|
+
export declare const JobStatusEnum: import("@contractspec/lib.schema").EntityEnumDef;
|
|
9
6
|
/**
|
|
10
7
|
* Job entity - represents a single job execution.
|
|
11
8
|
*/
|
|
12
|
-
declare const JobEntity:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
9
|
+
export declare const JobEntity: import("@contractspec/lib.schema").EntitySpec<{
|
|
10
|
+
id: import("@contractspec/lib.schema").EntityScalarField;
|
|
11
|
+
type: import("@contractspec/lib.schema").EntityScalarField;
|
|
12
|
+
version: import("@contractspec/lib.schema").EntityScalarField;
|
|
13
|
+
payload: import("@contractspec/lib.schema").EntityScalarField;
|
|
14
|
+
status: import("@contractspec/lib.schema").EntityEnumField;
|
|
15
|
+
priority: import("@contractspec/lib.schema").EntityScalarField;
|
|
16
|
+
attempts: import("@contractspec/lib.schema").EntityScalarField;
|
|
17
|
+
maxRetries: import("@contractspec/lib.schema").EntityScalarField;
|
|
18
|
+
lastError: import("@contractspec/lib.schema").EntityScalarField;
|
|
19
|
+
lastErrorStack: import("@contractspec/lib.schema").EntityScalarField;
|
|
20
|
+
scheduledAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
21
|
+
startedAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
22
|
+
completedAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
23
|
+
timeoutAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
24
|
+
dedupeKey: import("@contractspec/lib.schema").EntityScalarField;
|
|
25
|
+
tenantId: import("@contractspec/lib.schema").EntityScalarField;
|
|
26
|
+
userId: import("@contractspec/lib.schema").EntityScalarField;
|
|
27
|
+
traceId: import("@contractspec/lib.schema").EntityScalarField;
|
|
28
|
+
metadata: import("@contractspec/lib.schema").EntityScalarField;
|
|
29
|
+
result: import("@contractspec/lib.schema").EntityScalarField;
|
|
30
|
+
createdAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
31
|
+
updatedAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
32
|
+
scheduledJob: import("@contractspec/lib.schema").EntityRelationField;
|
|
33
|
+
scheduledJobId: import("@contractspec/lib.schema").EntityScalarField;
|
|
34
|
+
executions: import("@contractspec/lib.schema").EntityRelationField;
|
|
38
35
|
}>;
|
|
39
36
|
/**
|
|
40
37
|
* ScheduledJob entity - recurring job definitions.
|
|
41
38
|
*/
|
|
42
|
-
declare const ScheduledJobEntity:
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
39
|
+
export declare const ScheduledJobEntity: import("@contractspec/lib.schema").EntitySpec<{
|
|
40
|
+
id: import("@contractspec/lib.schema").EntityScalarField;
|
|
41
|
+
name: import("@contractspec/lib.schema").EntityScalarField;
|
|
42
|
+
description: import("@contractspec/lib.schema").EntityScalarField;
|
|
43
|
+
cronExpression: import("@contractspec/lib.schema").EntityScalarField;
|
|
44
|
+
timezone: import("@contractspec/lib.schema").EntityScalarField;
|
|
45
|
+
jobType: import("@contractspec/lib.schema").EntityScalarField;
|
|
46
|
+
jobVersion: import("@contractspec/lib.schema").EntityScalarField;
|
|
47
|
+
payload: import("@contractspec/lib.schema").EntityScalarField;
|
|
48
|
+
maxRetries: import("@contractspec/lib.schema").EntityScalarField;
|
|
49
|
+
timeoutMs: import("@contractspec/lib.schema").EntityScalarField;
|
|
50
|
+
enabled: import("@contractspec/lib.schema").EntityScalarField;
|
|
51
|
+
lastRunAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
52
|
+
nextRunAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
53
|
+
tenantId: import("@contractspec/lib.schema").EntityScalarField;
|
|
54
|
+
createdAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
55
|
+
updatedAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
56
|
+
jobs: import("@contractspec/lib.schema").EntityRelationField;
|
|
60
57
|
}>;
|
|
61
58
|
/**
|
|
62
59
|
* JobExecution entity - individual execution attempts.
|
|
63
60
|
*/
|
|
64
|
-
declare const JobExecutionEntity:
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
61
|
+
export declare const JobExecutionEntity: import("@contractspec/lib.schema").EntitySpec<{
|
|
62
|
+
id: import("@contractspec/lib.schema").EntityScalarField;
|
|
63
|
+
jobId: import("@contractspec/lib.schema").EntityScalarField;
|
|
64
|
+
attemptNumber: import("@contractspec/lib.schema").EntityScalarField;
|
|
65
|
+
startedAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
66
|
+
completedAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
67
|
+
durationMs: import("@contractspec/lib.schema").EntityScalarField;
|
|
68
|
+
success: import("@contractspec/lib.schema").EntityScalarField;
|
|
69
|
+
error: import("@contractspec/lib.schema").EntityScalarField;
|
|
70
|
+
errorStack: import("@contractspec/lib.schema").EntityScalarField;
|
|
71
|
+
result: import("@contractspec/lib.schema").EntityScalarField;
|
|
72
|
+
workerId: import("@contractspec/lib.schema").EntityScalarField;
|
|
73
|
+
job: import("@contractspec/lib.schema").EntityRelationField;
|
|
77
74
|
}>;
|
|
78
75
|
/**
|
|
79
76
|
* All job entities for schema composition.
|
|
80
77
|
*/
|
|
81
|
-
declare const jobEntities: (
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
}> |
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
}> |
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
78
|
+
export declare const jobEntities: (import("@contractspec/lib.schema").EntitySpec<{
|
|
79
|
+
id: import("@contractspec/lib.schema").EntityScalarField;
|
|
80
|
+
type: import("@contractspec/lib.schema").EntityScalarField;
|
|
81
|
+
version: import("@contractspec/lib.schema").EntityScalarField;
|
|
82
|
+
payload: import("@contractspec/lib.schema").EntityScalarField;
|
|
83
|
+
status: import("@contractspec/lib.schema").EntityEnumField;
|
|
84
|
+
priority: import("@contractspec/lib.schema").EntityScalarField;
|
|
85
|
+
attempts: import("@contractspec/lib.schema").EntityScalarField;
|
|
86
|
+
maxRetries: import("@contractspec/lib.schema").EntityScalarField;
|
|
87
|
+
lastError: import("@contractspec/lib.schema").EntityScalarField;
|
|
88
|
+
lastErrorStack: import("@contractspec/lib.schema").EntityScalarField;
|
|
89
|
+
scheduledAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
90
|
+
startedAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
91
|
+
completedAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
92
|
+
timeoutAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
93
|
+
dedupeKey: import("@contractspec/lib.schema").EntityScalarField;
|
|
94
|
+
tenantId: import("@contractspec/lib.schema").EntityScalarField;
|
|
95
|
+
userId: import("@contractspec/lib.schema").EntityScalarField;
|
|
96
|
+
traceId: import("@contractspec/lib.schema").EntityScalarField;
|
|
97
|
+
metadata: import("@contractspec/lib.schema").EntityScalarField;
|
|
98
|
+
result: import("@contractspec/lib.schema").EntityScalarField;
|
|
99
|
+
createdAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
100
|
+
updatedAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
101
|
+
scheduledJob: import("@contractspec/lib.schema").EntityRelationField;
|
|
102
|
+
scheduledJobId: import("@contractspec/lib.schema").EntityScalarField;
|
|
103
|
+
executions: import("@contractspec/lib.schema").EntityRelationField;
|
|
104
|
+
}> | import("@contractspec/lib.schema").EntitySpec<{
|
|
105
|
+
id: import("@contractspec/lib.schema").EntityScalarField;
|
|
106
|
+
name: import("@contractspec/lib.schema").EntityScalarField;
|
|
107
|
+
description: import("@contractspec/lib.schema").EntityScalarField;
|
|
108
|
+
cronExpression: import("@contractspec/lib.schema").EntityScalarField;
|
|
109
|
+
timezone: import("@contractspec/lib.schema").EntityScalarField;
|
|
110
|
+
jobType: import("@contractspec/lib.schema").EntityScalarField;
|
|
111
|
+
jobVersion: import("@contractspec/lib.schema").EntityScalarField;
|
|
112
|
+
payload: import("@contractspec/lib.schema").EntityScalarField;
|
|
113
|
+
maxRetries: import("@contractspec/lib.schema").EntityScalarField;
|
|
114
|
+
timeoutMs: import("@contractspec/lib.schema").EntityScalarField;
|
|
115
|
+
enabled: import("@contractspec/lib.schema").EntityScalarField;
|
|
116
|
+
lastRunAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
117
|
+
nextRunAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
118
|
+
tenantId: import("@contractspec/lib.schema").EntityScalarField;
|
|
119
|
+
createdAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
120
|
+
updatedAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
121
|
+
jobs: import("@contractspec/lib.schema").EntityRelationField;
|
|
122
|
+
}> | import("@contractspec/lib.schema").EntitySpec<{
|
|
123
|
+
id: import("@contractspec/lib.schema").EntityScalarField;
|
|
124
|
+
jobId: import("@contractspec/lib.schema").EntityScalarField;
|
|
125
|
+
attemptNumber: import("@contractspec/lib.schema").EntityScalarField;
|
|
126
|
+
startedAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
127
|
+
completedAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
128
|
+
durationMs: import("@contractspec/lib.schema").EntityScalarField;
|
|
129
|
+
success: import("@contractspec/lib.schema").EntityScalarField;
|
|
130
|
+
error: import("@contractspec/lib.schema").EntityScalarField;
|
|
131
|
+
errorStack: import("@contractspec/lib.schema").EntityScalarField;
|
|
132
|
+
result: import("@contractspec/lib.schema").EntityScalarField;
|
|
133
|
+
workerId: import("@contractspec/lib.schema").EntityScalarField;
|
|
134
|
+
job: import("@contractspec/lib.schema").EntityRelationField;
|
|
138
135
|
}>)[];
|
|
139
136
|
/**
|
|
140
137
|
* Module schema contribution for jobs.
|
|
141
138
|
*/
|
|
142
|
-
declare const jobsSchemaContribution: ModuleSchemaContribution;
|
|
143
|
-
//#endregion
|
|
144
|
-
export { JobEntity, JobExecutionEntity, JobStatusEnum, ScheduledJobEntity, jobEntities, jobsSchemaContribution };
|
|
139
|
+
export declare const jobsSchemaContribution: ModuleSchemaContribution;
|
|
145
140
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/entities/index.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AAEzE;;GAEG;AACH,eAAO,MAAM,aAAa,kDAYxB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;EA4FpB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;EAkD7B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;EA+B7B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAAsD,CAAC;AAE/E;;GAEG;AACH,eAAO,MAAM,sBAAsB,EAAE,wBAIpC,CAAC"}
|