alepha 0.11.5 → 0.11.6
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/api/files.d.ts +167 -167
- package/api/jobs.d.ts +226 -154
- package/api/notifications.d.ts +100 -100
- package/api/users.d.ts +477 -477
- package/batch.d.ts +59 -493
- package/bucket.d.ts +20 -11
- package/cache/redis.d.ts +1 -1
- package/cache.d.ts +1 -1
- package/command.d.ts +24 -7
- package/core.d.ts +219 -169
- package/datetime.d.ts +1 -1
- package/devtools.d.ts +292 -254
- package/email.d.ts +45 -2
- package/fake.d.ts +1 -1
- package/file.d.ts +1 -1
- package/lock/redis.d.ts +1 -1
- package/lock.d.ts +1 -1
- package/logger.d.ts +6 -3
- package/package.json +51 -51
- package/postgres.d.ts +473 -188
- package/queue/redis.d.ts +1 -1
- package/queue.d.ts +1 -1
- package/react/auth.d.ts +7 -2
- package/react/form.d.ts +35 -15
- package/react/head.d.ts +1 -1
- package/react/i18n.d.ts +2 -2
- package/react.d.ts +58 -35
- package/redis.d.ts +10 -10
- package/retry.d.ts +84 -21
- package/scheduler.d.ts +1 -1
- package/security.d.ts +29 -29
- package/server/cache.d.ts +1 -1
- package/server/compress.d.ts +9 -3
- package/server/cookies.d.ts +1 -1
- package/server/cors.d.ts +28 -10
- package/server/health.d.ts +1 -1
- package/server/helmet.d.ts +44 -15
- package/server/links.d.ts +8 -2
- package/server/metrics.d.ts +1 -1
- package/server/multipart.d.ts +1 -1
- package/server/proxy.d.ts +1 -1
- package/server/security.d.ts +8 -3
- package/server/static.d.ts +1 -1
- package/server/swagger.d.ts +19 -6
- package/server.d.ts +20 -20
- package/topic/redis.d.ts +1 -1
- package/topic.d.ts +1 -1
- package/ui.d.ts +127 -24
package/api/jobs.d.ts
CHANGED
|
@@ -1,100 +1,86 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { Alepha, Static } from "alepha";
|
|
3
|
-
import "alepha/scheduler";
|
|
1
|
+
import * as _alepha_core1 from "alepha";
|
|
2
|
+
import { Alepha, Async, Descriptor, KIND, Static } from "alepha";
|
|
4
3
|
import "alepha/server/security";
|
|
5
|
-
import * as
|
|
4
|
+
import * as _alepha_postgres0 from "alepha/postgres";
|
|
6
5
|
import * as _alepha_server0 from "alepha/server";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import * as
|
|
6
|
+
import * as _alepha_logger0 from "alepha/logger";
|
|
7
|
+
import { DateTime, DateTimeProvider } from "alepha/datetime";
|
|
8
|
+
import * as _alepha_lock0 from "alepha/lock";
|
|
9
|
+
import { CronProvider } from "alepha/scheduler";
|
|
10
|
+
import * as typebox176 from "typebox";
|
|
11
|
+
import * as dayjs0 from "dayjs";
|
|
10
12
|
|
|
11
13
|
//#region src/schemas/jobExecutionQuerySchema.d.ts
|
|
12
|
-
declare const jobExecutionQuerySchema:
|
|
13
|
-
page:
|
|
14
|
-
size:
|
|
15
|
-
sort:
|
|
16
|
-
status:
|
|
17
|
-
job:
|
|
14
|
+
declare const jobExecutionQuerySchema: typebox176.TObject<{
|
|
15
|
+
page: typebox176.TOptional<typebox176.TInteger>;
|
|
16
|
+
size: typebox176.TOptional<typebox176.TInteger>;
|
|
17
|
+
sort: typebox176.TOptional<typebox176.TString>;
|
|
18
|
+
status: typebox176.TOptional<typebox176.TUnsafe<"STARTED" | "FAILED" | "COMPLETED">>;
|
|
19
|
+
job: typebox176.TOptional<typebox176.TString>;
|
|
18
20
|
}>;
|
|
19
21
|
type JobExecutionQuery = Static<typeof jobExecutionQuerySchema>;
|
|
20
22
|
//#endregion
|
|
21
23
|
//#region src/services/JobService.d.ts
|
|
22
24
|
declare class JobService {
|
|
23
25
|
protected readonly alepha: Alepha;
|
|
24
|
-
protected readonly executionRepository:
|
|
25
|
-
id:
|
|
26
|
-
version:
|
|
27
|
-
createdAt:
|
|
28
|
-
updatedAt:
|
|
29
|
-
finishedAt:
|
|
30
|
-
job:
|
|
31
|
-
status:
|
|
32
|
-
error:
|
|
33
|
-
logs:
|
|
34
|
-
level:
|
|
35
|
-
message:
|
|
36
|
-
service:
|
|
37
|
-
module:
|
|
38
|
-
context:
|
|
39
|
-
app:
|
|
40
|
-
data:
|
|
41
|
-
timestamp:
|
|
26
|
+
protected readonly executionRepository: _alepha_postgres0.Repository<typebox176.TObject<{
|
|
27
|
+
id: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox176.TString, typeof _alepha_postgres0.PG_PRIMARY_KEY>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
28
|
+
version: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox176.TInteger, typeof _alepha_postgres0.PG_VERSION>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
29
|
+
createdAt: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox176.TCodec<typebox176.TString, dayjs0.Dayjs>, typeof _alepha_postgres0.PG_CREATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
30
|
+
updatedAt: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox176.TCodec<typebox176.TString, dayjs0.Dayjs>, typeof _alepha_postgres0.PG_UPDATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
31
|
+
finishedAt: typebox176.TOptional<typebox176.TCodec<typebox176.TString, dayjs0.Dayjs>>;
|
|
32
|
+
job: typebox176.TString;
|
|
33
|
+
status: typebox176.TUnsafe<"STARTED" | "FAILED" | "COMPLETED">;
|
|
34
|
+
error: typebox176.TOptional<typebox176.TString>;
|
|
35
|
+
logs: typebox176.TOptional<typebox176.TArray<typebox176.TObject<{
|
|
36
|
+
level: typebox176.TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
|
|
37
|
+
message: typebox176.TString;
|
|
38
|
+
service: typebox176.TString;
|
|
39
|
+
module: typebox176.TString;
|
|
40
|
+
context: typebox176.TOptional<typebox176.TString>;
|
|
41
|
+
app: typebox176.TOptional<typebox176.TString>;
|
|
42
|
+
data: typebox176.TOptional<typebox176.TAny>;
|
|
43
|
+
timestamp: typebox176.TCodec<typebox176.TString, dayjs0.Dayjs>;
|
|
42
44
|
}>>>;
|
|
43
45
|
}>>;
|
|
44
|
-
protected readonly dtp: DateTimeProvider;
|
|
45
|
-
protected readonly logs: Map<string, {
|
|
46
|
-
context?: string | undefined;
|
|
47
|
-
app?: string | undefined;
|
|
48
|
-
data?: any;
|
|
49
|
-
level: "SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR";
|
|
50
|
-
message: string;
|
|
51
|
-
service: string;
|
|
52
|
-
module: string;
|
|
53
|
-
timestamp: dayjs11.Dayjs;
|
|
54
|
-
}[]>;
|
|
55
|
-
protected readonly onLogs: _alepha_core2.HookDescriptor<"log">;
|
|
56
|
-
protected readonly onSchedulerBegin: _alepha_core2.HookDescriptor<"scheduler:begin">;
|
|
57
|
-
protected readonly onSchedulerError: _alepha_core2.HookDescriptor<"scheduler:error">;
|
|
58
|
-
readonly onSchedulerSuccess: _alepha_core2.HookDescriptor<"scheduler:success">;
|
|
59
|
-
readonly onSchedulerEnd: _alepha_core2.HookDescriptor<"scheduler:end">;
|
|
60
46
|
getJobs(): Promise<string[]>;
|
|
61
|
-
getJobExecutions(query?: JobExecutionQuery): Promise<
|
|
62
|
-
id:
|
|
63
|
-
version:
|
|
64
|
-
createdAt:
|
|
65
|
-
updatedAt:
|
|
66
|
-
finishedAt:
|
|
67
|
-
job:
|
|
68
|
-
status:
|
|
69
|
-
error:
|
|
70
|
-
logs:
|
|
71
|
-
level:
|
|
72
|
-
message:
|
|
73
|
-
service:
|
|
74
|
-
module:
|
|
75
|
-
context:
|
|
76
|
-
app:
|
|
77
|
-
data:
|
|
78
|
-
timestamp:
|
|
47
|
+
getJobExecutions(query?: JobExecutionQuery): Promise<_alepha_core1.Page<_alepha_postgres0.PgStatic<typebox176.TObject<{
|
|
48
|
+
id: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox176.TString, typeof _alepha_postgres0.PG_PRIMARY_KEY>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
49
|
+
version: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox176.TInteger, typeof _alepha_postgres0.PG_VERSION>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
50
|
+
createdAt: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox176.TCodec<typebox176.TString, dayjs0.Dayjs>, typeof _alepha_postgres0.PG_CREATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
51
|
+
updatedAt: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox176.TCodec<typebox176.TString, dayjs0.Dayjs>, typeof _alepha_postgres0.PG_UPDATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
52
|
+
finishedAt: typebox176.TOptional<typebox176.TCodec<typebox176.TString, dayjs0.Dayjs>>;
|
|
53
|
+
job: typebox176.TString;
|
|
54
|
+
status: typebox176.TUnsafe<"STARTED" | "FAILED" | "COMPLETED">;
|
|
55
|
+
error: typebox176.TOptional<typebox176.TString>;
|
|
56
|
+
logs: typebox176.TOptional<typebox176.TArray<typebox176.TObject<{
|
|
57
|
+
level: typebox176.TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
|
|
58
|
+
message: typebox176.TString;
|
|
59
|
+
service: typebox176.TString;
|
|
60
|
+
module: typebox176.TString;
|
|
61
|
+
context: typebox176.TOptional<typebox176.TString>;
|
|
62
|
+
app: typebox176.TOptional<typebox176.TString>;
|
|
63
|
+
data: typebox176.TOptional<typebox176.TAny>;
|
|
64
|
+
timestamp: typebox176.TCodec<typebox176.TString, dayjs0.Dayjs>;
|
|
79
65
|
}>>>;
|
|
80
|
-
}>,
|
|
81
|
-
id:
|
|
82
|
-
version:
|
|
83
|
-
createdAt:
|
|
84
|
-
updatedAt:
|
|
85
|
-
finishedAt:
|
|
86
|
-
job:
|
|
87
|
-
status:
|
|
88
|
-
error:
|
|
89
|
-
logs:
|
|
90
|
-
level:
|
|
91
|
-
message:
|
|
92
|
-
service:
|
|
93
|
-
module:
|
|
94
|
-
context:
|
|
95
|
-
app:
|
|
96
|
-
data:
|
|
97
|
-
timestamp:
|
|
66
|
+
}>, _alepha_postgres0.PgRelationMap<typebox176.TObject<{
|
|
67
|
+
id: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox176.TString, typeof _alepha_postgres0.PG_PRIMARY_KEY>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
68
|
+
version: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox176.TInteger, typeof _alepha_postgres0.PG_VERSION>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
69
|
+
createdAt: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox176.TCodec<typebox176.TString, dayjs0.Dayjs>, typeof _alepha_postgres0.PG_CREATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
70
|
+
updatedAt: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox176.TCodec<typebox176.TString, dayjs0.Dayjs>, typeof _alepha_postgres0.PG_UPDATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
71
|
+
finishedAt: typebox176.TOptional<typebox176.TCodec<typebox176.TString, dayjs0.Dayjs>>;
|
|
72
|
+
job: typebox176.TString;
|
|
73
|
+
status: typebox176.TUnsafe<"STARTED" | "FAILED" | "COMPLETED">;
|
|
74
|
+
error: typebox176.TOptional<typebox176.TString>;
|
|
75
|
+
logs: typebox176.TOptional<typebox176.TArray<typebox176.TObject<{
|
|
76
|
+
level: typebox176.TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
|
|
77
|
+
message: typebox176.TString;
|
|
78
|
+
service: typebox176.TString;
|
|
79
|
+
module: typebox176.TString;
|
|
80
|
+
context: typebox176.TOptional<typebox176.TString>;
|
|
81
|
+
app: typebox176.TOptional<typebox176.TString>;
|
|
82
|
+
data: typebox176.TOptional<typebox176.TAny>;
|
|
83
|
+
timestamp: typebox176.TCodec<typebox176.TString, dayjs0.Dayjs>;
|
|
98
84
|
}>>>;
|
|
99
85
|
}>>>>>;
|
|
100
86
|
triggerJob(name: string): Promise<{
|
|
@@ -108,98 +94,184 @@ declare class JobController {
|
|
|
108
94
|
protected readonly group: string;
|
|
109
95
|
protected readonly jobService: JobService;
|
|
110
96
|
readonly getJobs: _alepha_server0.ActionDescriptorFn<{
|
|
111
|
-
response:
|
|
97
|
+
response: typebox176.TArray<typebox176.TString>;
|
|
112
98
|
}>;
|
|
113
99
|
readonly getJobExecutions: _alepha_server0.ActionDescriptorFn<{
|
|
114
|
-
query:
|
|
115
|
-
page:
|
|
116
|
-
size:
|
|
117
|
-
sort:
|
|
118
|
-
status:
|
|
119
|
-
job:
|
|
100
|
+
query: typebox176.TObject<{
|
|
101
|
+
page: typebox176.TOptional<typebox176.TInteger>;
|
|
102
|
+
size: typebox176.TOptional<typebox176.TInteger>;
|
|
103
|
+
sort: typebox176.TOptional<typebox176.TString>;
|
|
104
|
+
status: typebox176.TOptional<typebox176.TUnsafe<"STARTED" | "FAILED" | "COMPLETED">>;
|
|
105
|
+
job: typebox176.TOptional<typebox176.TString>;
|
|
120
106
|
}>;
|
|
121
|
-
response:
|
|
122
|
-
id:
|
|
123
|
-
version:
|
|
124
|
-
createdAt:
|
|
125
|
-
updatedAt:
|
|
126
|
-
finishedAt:
|
|
127
|
-
job:
|
|
128
|
-
status:
|
|
129
|
-
error:
|
|
130
|
-
logs:
|
|
131
|
-
level:
|
|
132
|
-
message:
|
|
133
|
-
service:
|
|
134
|
-
module:
|
|
135
|
-
context:
|
|
136
|
-
app:
|
|
137
|
-
data:
|
|
138
|
-
timestamp:
|
|
107
|
+
response: _alepha_core1.TPage<typebox176.TObject<{
|
|
108
|
+
id: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox176.TString, typeof _alepha_postgres0.PG_PRIMARY_KEY>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
109
|
+
version: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox176.TInteger, typeof _alepha_postgres0.PG_VERSION>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
110
|
+
createdAt: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox176.TCodec<typebox176.TString, dayjs0.Dayjs>, typeof _alepha_postgres0.PG_CREATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
111
|
+
updatedAt: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox176.TCodec<typebox176.TString, dayjs0.Dayjs>, typeof _alepha_postgres0.PG_UPDATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
112
|
+
finishedAt: typebox176.TOptional<typebox176.TCodec<typebox176.TString, dayjs0.Dayjs>>;
|
|
113
|
+
job: typebox176.TString;
|
|
114
|
+
status: typebox176.TUnsafe<"STARTED" | "FAILED" | "COMPLETED">;
|
|
115
|
+
error: typebox176.TOptional<typebox176.TString>;
|
|
116
|
+
logs: typebox176.TOptional<typebox176.TArray<typebox176.TObject<{
|
|
117
|
+
level: typebox176.TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
|
|
118
|
+
message: typebox176.TString;
|
|
119
|
+
service: typebox176.TString;
|
|
120
|
+
module: typebox176.TString;
|
|
121
|
+
context: typebox176.TOptional<typebox176.TString>;
|
|
122
|
+
app: typebox176.TOptional<typebox176.TString>;
|
|
123
|
+
data: typebox176.TOptional<typebox176.TAny>;
|
|
124
|
+
timestamp: typebox176.TCodec<typebox176.TString, dayjs0.Dayjs>;
|
|
139
125
|
}>>>;
|
|
140
126
|
}>>;
|
|
141
127
|
}>;
|
|
142
128
|
readonly triggerJob: _alepha_server0.ActionDescriptorFn<{
|
|
143
|
-
body:
|
|
144
|
-
name:
|
|
129
|
+
body: typebox176.TObject<{
|
|
130
|
+
name: typebox176.TString;
|
|
145
131
|
}>;
|
|
146
|
-
response:
|
|
147
|
-
ok:
|
|
148
|
-
id:
|
|
149
|
-
count:
|
|
132
|
+
response: typebox176.TObject<{
|
|
133
|
+
ok: typebox176.TBoolean;
|
|
134
|
+
id: typebox176.TOptional<typebox176.TUnion<[typebox176.TString, typebox176.TInteger]>>;
|
|
135
|
+
count: typebox176.TOptional<typebox176.TNumber>;
|
|
150
136
|
}>;
|
|
151
137
|
}>;
|
|
152
138
|
}
|
|
153
139
|
//#endregion
|
|
140
|
+
//#region src/descriptors/$job.d.ts
|
|
141
|
+
/**
|
|
142
|
+
* Job descriptor - a drop-in replacement for $scheduler with built-in execution tracking.
|
|
143
|
+
*/
|
|
144
|
+
declare const $job: {
|
|
145
|
+
(options: JobDescriptorOptions): JobDescriptor;
|
|
146
|
+
[KIND]: typeof JobDescriptor;
|
|
147
|
+
};
|
|
148
|
+
type JobDescriptorOptions = {
|
|
149
|
+
/**
|
|
150
|
+
* Function to run on schedule.
|
|
151
|
+
*/
|
|
152
|
+
handler: (args: JobHandlerArguments) => Async<void>;
|
|
153
|
+
/**
|
|
154
|
+
* Name of the job. Defaults to the function name.
|
|
155
|
+
*/
|
|
156
|
+
name?: string;
|
|
157
|
+
/**
|
|
158
|
+
* Optional description of the job.
|
|
159
|
+
*/
|
|
160
|
+
description?: string;
|
|
161
|
+
/**
|
|
162
|
+
* Cron expression to run the job.
|
|
163
|
+
*/
|
|
164
|
+
cron?: string;
|
|
165
|
+
/**
|
|
166
|
+
* If true, the job will be locked and only one instance will run at a time.
|
|
167
|
+
* You probably need to import {@link AlephaLockRedis} for distributed locking.
|
|
168
|
+
*
|
|
169
|
+
* @default true
|
|
170
|
+
*/
|
|
171
|
+
lock?: boolean;
|
|
172
|
+
};
|
|
173
|
+
declare const envSchema: _alepha_core1.TObject<{
|
|
174
|
+
JOB_PREFIX: _alepha_core1.TOptional<_alepha_core1.TString>;
|
|
175
|
+
}>;
|
|
176
|
+
declare module "alepha" {
|
|
177
|
+
interface Env extends Partial<Static<typeof envSchema>> {}
|
|
178
|
+
}
|
|
179
|
+
declare class JobDescriptor extends Descriptor<JobDescriptorOptions> {
|
|
180
|
+
protected readonly log: _alepha_logger0.Logger;
|
|
181
|
+
protected readonly env: {
|
|
182
|
+
JOB_PREFIX?: string | undefined;
|
|
183
|
+
};
|
|
184
|
+
protected readonly alepha: Alepha;
|
|
185
|
+
protected readonly dateTimeProvider: DateTimeProvider;
|
|
186
|
+
protected readonly cronProvider: CronProvider;
|
|
187
|
+
protected readonly executionRepository: _alepha_postgres0.Repository<_alepha_core1.TObject<{
|
|
188
|
+
id: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<_alepha_core1.TString, typeof _alepha_postgres0.PG_PRIMARY_KEY>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
189
|
+
version: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox176.TInteger, typeof _alepha_postgres0.PG_VERSION>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
190
|
+
createdAt: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox176.TCodec<_alepha_core1.TString, dayjs0.Dayjs>, typeof _alepha_postgres0.PG_CREATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
191
|
+
updatedAt: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox176.TCodec<_alepha_core1.TString, dayjs0.Dayjs>, typeof _alepha_postgres0.PG_UPDATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
192
|
+
finishedAt: _alepha_core1.TOptional<typebox176.TCodec<_alepha_core1.TString, dayjs0.Dayjs>>;
|
|
193
|
+
job: _alepha_core1.TString;
|
|
194
|
+
status: typebox176.TUnsafe<"STARTED" | "FAILED" | "COMPLETED">;
|
|
195
|
+
error: _alepha_core1.TOptional<_alepha_core1.TString>;
|
|
196
|
+
logs: _alepha_core1.TOptional<typebox176.TArray<_alepha_core1.TObject<{
|
|
197
|
+
level: typebox176.TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
|
|
198
|
+
message: _alepha_core1.TString;
|
|
199
|
+
service: _alepha_core1.TString;
|
|
200
|
+
module: _alepha_core1.TString;
|
|
201
|
+
context: _alepha_core1.TOptional<_alepha_core1.TString>;
|
|
202
|
+
app: _alepha_core1.TOptional<_alepha_core1.TString>;
|
|
203
|
+
data: _alepha_core1.TOptional<typebox176.TAny>;
|
|
204
|
+
timestamp: typebox176.TCodec<_alepha_core1.TString, dayjs0.Dayjs>;
|
|
205
|
+
}>>>;
|
|
206
|
+
}>>;
|
|
207
|
+
protected readonly logs: Map<string, {
|
|
208
|
+
context?: string | undefined;
|
|
209
|
+
app?: string | undefined;
|
|
210
|
+
data?: any;
|
|
211
|
+
level: "SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR";
|
|
212
|
+
message: string;
|
|
213
|
+
service: string;
|
|
214
|
+
module: string;
|
|
215
|
+
timestamp: dayjs0.Dayjs;
|
|
216
|
+
}[]>;
|
|
217
|
+
get name(): string;
|
|
218
|
+
protected onInit(): void;
|
|
219
|
+
trigger(): Promise<void>;
|
|
220
|
+
protected jobLock: _alepha_lock0.LockDescriptor<(args: JobHandlerArguments) => Promise<void>>;
|
|
221
|
+
}
|
|
222
|
+
interface JobHandlerArguments {
|
|
223
|
+
now: DateTime;
|
|
224
|
+
}
|
|
225
|
+
//#endregion
|
|
154
226
|
//#region src/entities/jobExecutions.d.ts
|
|
155
|
-
declare const jobExecutions:
|
|
156
|
-
id:
|
|
157
|
-
version:
|
|
158
|
-
createdAt:
|
|
159
|
-
updatedAt:
|
|
160
|
-
finishedAt:
|
|
161
|
-
job:
|
|
162
|
-
status:
|
|
163
|
-
error:
|
|
164
|
-
logs:
|
|
165
|
-
level:
|
|
166
|
-
message:
|
|
167
|
-
service:
|
|
168
|
-
module:
|
|
169
|
-
context:
|
|
170
|
-
app:
|
|
171
|
-
data:
|
|
172
|
-
timestamp:
|
|
227
|
+
declare const jobExecutions: _alepha_postgres0.EntityDescriptor<typebox176.TObject<{
|
|
228
|
+
id: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox176.TString, typeof _alepha_postgres0.PG_PRIMARY_KEY>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
229
|
+
version: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox176.TInteger, typeof _alepha_postgres0.PG_VERSION>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
230
|
+
createdAt: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox176.TCodec<typebox176.TString, dayjs0.Dayjs>, typeof _alepha_postgres0.PG_CREATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
231
|
+
updatedAt: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox176.TCodec<typebox176.TString, dayjs0.Dayjs>, typeof _alepha_postgres0.PG_UPDATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
232
|
+
finishedAt: typebox176.TOptional<typebox176.TCodec<typebox176.TString, dayjs0.Dayjs>>;
|
|
233
|
+
job: typebox176.TString;
|
|
234
|
+
status: typebox176.TUnsafe<"STARTED" | "FAILED" | "COMPLETED">;
|
|
235
|
+
error: typebox176.TOptional<typebox176.TString>;
|
|
236
|
+
logs: typebox176.TOptional<typebox176.TArray<typebox176.TObject<{
|
|
237
|
+
level: typebox176.TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
|
|
238
|
+
message: typebox176.TString;
|
|
239
|
+
service: typebox176.TString;
|
|
240
|
+
module: typebox176.TString;
|
|
241
|
+
context: typebox176.TOptional<typebox176.TString>;
|
|
242
|
+
app: typebox176.TOptional<typebox176.TString>;
|
|
243
|
+
data: typebox176.TOptional<typebox176.TAny>;
|
|
244
|
+
timestamp: typebox176.TCodec<typebox176.TString, dayjs0.Dayjs>;
|
|
173
245
|
}>>>;
|
|
174
246
|
}>>;
|
|
175
247
|
type JobExecutionEntity = Static<typeof jobExecutions.schema>;
|
|
176
248
|
//#endregion
|
|
177
249
|
//#region src/schemas/jobExecutionResourceSchema.d.ts
|
|
178
|
-
declare const jobExecutionResourceSchema:
|
|
179
|
-
id:
|
|
180
|
-
version:
|
|
181
|
-
createdAt:
|
|
182
|
-
updatedAt:
|
|
183
|
-
finishedAt:
|
|
184
|
-
job:
|
|
185
|
-
status:
|
|
186
|
-
error:
|
|
187
|
-
logs:
|
|
188
|
-
level:
|
|
189
|
-
message:
|
|
190
|
-
service:
|
|
191
|
-
module:
|
|
192
|
-
context:
|
|
193
|
-
app:
|
|
194
|
-
data:
|
|
195
|
-
timestamp:
|
|
250
|
+
declare const jobExecutionResourceSchema: typebox176.TObject<{
|
|
251
|
+
id: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox176.TString, typeof _alepha_postgres0.PG_PRIMARY_KEY>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
252
|
+
version: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox176.TInteger, typeof _alepha_postgres0.PG_VERSION>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
253
|
+
createdAt: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox176.TCodec<typebox176.TString, dayjs0.Dayjs>, typeof _alepha_postgres0.PG_CREATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
254
|
+
updatedAt: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox176.TCodec<typebox176.TString, dayjs0.Dayjs>, typeof _alepha_postgres0.PG_UPDATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
255
|
+
finishedAt: typebox176.TOptional<typebox176.TCodec<typebox176.TString, dayjs0.Dayjs>>;
|
|
256
|
+
job: typebox176.TString;
|
|
257
|
+
status: typebox176.TUnsafe<"STARTED" | "FAILED" | "COMPLETED">;
|
|
258
|
+
error: typebox176.TOptional<typebox176.TString>;
|
|
259
|
+
logs: typebox176.TOptional<typebox176.TArray<typebox176.TObject<{
|
|
260
|
+
level: typebox176.TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
|
|
261
|
+
message: typebox176.TString;
|
|
262
|
+
service: typebox176.TString;
|
|
263
|
+
module: typebox176.TString;
|
|
264
|
+
context: typebox176.TOptional<typebox176.TString>;
|
|
265
|
+
app: typebox176.TOptional<typebox176.TString>;
|
|
266
|
+
data: typebox176.TOptional<typebox176.TAny>;
|
|
267
|
+
timestamp: typebox176.TCodec<typebox176.TString, dayjs0.Dayjs>;
|
|
196
268
|
}>>>;
|
|
197
269
|
}>;
|
|
198
270
|
type JobExecutionResource = Static<typeof jobExecutionResourceSchema>;
|
|
199
271
|
//#endregion
|
|
200
272
|
//#region src/schemas/triggerJobSchema.d.ts
|
|
201
|
-
declare const triggerJobSchema:
|
|
202
|
-
name:
|
|
273
|
+
declare const triggerJobSchema: typebox176.TObject<{
|
|
274
|
+
name: typebox176.TString;
|
|
203
275
|
}>;
|
|
204
276
|
type TriggerJob = Static<typeof triggerJobSchema>;
|
|
205
277
|
//#endregion
|
|
@@ -212,7 +284,7 @@ type TriggerJob = Static<typeof triggerJobSchema>;
|
|
|
212
284
|
*
|
|
213
285
|
* @module alepha.api.jobs
|
|
214
286
|
*/
|
|
215
|
-
declare const AlephaApiJobs:
|
|
287
|
+
declare const AlephaApiJobs: _alepha_core1.Service<_alepha_core1.Module>;
|
|
216
288
|
//#endregion
|
|
217
|
-
export { AlephaApiJobs, JobController, JobExecutionEntity, JobExecutionQuery, JobExecutionResource, JobService, TriggerJob, jobExecutionQuerySchema, jobExecutionResourceSchema, jobExecutions, triggerJobSchema };
|
|
289
|
+
export { $job, AlephaApiJobs, JobController, JobDescriptor, JobDescriptorOptions, JobExecutionEntity, JobExecutionQuery, JobExecutionResource, JobHandlerArguments, JobService, TriggerJob, jobExecutionQuerySchema, jobExecutionResourceSchema, jobExecutions, triggerJobSchema };
|
|
218
290
|
//# sourceMappingURL=index.d.ts.map
|