alepha 0.10.3 → 0.10.5
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/README.md +10 -22
- package/api/files.cjs +8 -0
- package/api/files.d.ts +201 -0
- package/api/files.js +1 -0
- package/api/jobs.cjs +8 -0
- package/api/jobs.d.ts +274 -0
- package/api/jobs.js +1 -0
- package/api/users.cjs +8 -0
- package/api/users.d.ts +395 -0
- package/api/users.js +1 -0
- package/batch.d.ts +14 -14
- package/bucket.d.ts +81 -4
- package/cache/redis.d.ts +1 -0
- package/cache.d.ts +5 -0
- package/command.d.ts +6 -6
- package/core.d.ts +58 -10
- package/datetime.d.ts +0 -2
- package/devtools.cjs +8 -0
- package/devtools.d.ts +368 -0
- package/devtools.js +1 -0
- package/email.d.ts +15 -15
- package/logger.d.ts +44 -29
- package/package.json +71 -43
- package/postgres.d.ts +134 -320
- package/queue.d.ts +21 -21
- package/react/auth.d.ts +5 -0
- package/react/form.d.ts +2 -2
- package/react.d.ts +27 -27
- package/scheduler.d.ts +22 -2
- package/security.d.ts +12 -4
- package/server/links.d.ts +6 -6
- package/server.d.ts +30 -30
- package/topic.d.ts +26 -161
package/README.md
CHANGED
|
@@ -38,25 +38,15 @@ Alepha is an opinionated framework that handles everything from database to fron
|
|
|
38
38
|
|
|
39
39
|
It uses a descriptor-based architecture (`$action`, `$page`, `$repository`, etc.) and enforces type safety across the entire stack.
|
|
40
40
|
|
|
41
|
-
|
|
42
|
-
import { run } from "alepha";
|
|
43
|
-
import { $action } from "alepha/server";
|
|
44
|
-
|
|
45
|
-
class App {
|
|
46
|
-
hello = $action({
|
|
47
|
-
handler: () => "Hello world!",
|
|
48
|
-
})
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
run(App);
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
👉 For more information, please visit the [documentation](https://feunard.github.io/alepha/).
|
|
41
|
+
For more information, please visit the [documentation](https://feunard.github.io/alepha/).
|
|
55
42
|
|
|
56
43
|
## Examples
|
|
57
44
|
|
|
58
45
|
### Type-safe API endpoint
|
|
59
46
|
|
|
47
|
+
Write type-safe API endpoints with automatic OpenAPI documentation and more.
|
|
48
|
+
|
|
49
|
+
|
|
60
50
|
```ts
|
|
61
51
|
// app.ts
|
|
62
52
|
import { run, t } from "alepha";
|
|
@@ -75,10 +65,10 @@ class Api {
|
|
|
75
65
|
path: "/hello/:name",
|
|
76
66
|
schema: {
|
|
77
67
|
params: t.object({
|
|
78
|
-
name: t.
|
|
68
|
+
name: t.text()
|
|
79
69
|
}),
|
|
80
70
|
response: t.object({
|
|
81
|
-
message: t.
|
|
71
|
+
message: t.text(),
|
|
82
72
|
})
|
|
83
73
|
},
|
|
84
74
|
handler: async ({ params }) => {
|
|
@@ -96,9 +86,9 @@ node app.ts
|
|
|
96
86
|
|
|
97
87
|
### Database with Drizzle ORM
|
|
98
88
|
|
|
99
|
-
Drizzle ORM is a type-safe ORM for TypeScript, bundled inside Alepha.
|
|
89
|
+
[Drizzle ORM](https://orm.drizzle.team/) is a type-safe ORM for TypeScript, bundled inside Alepha.
|
|
100
90
|
|
|
101
|
-
|
|
91
|
+
You need `drizzle-kit` CLI as dev dependencies:
|
|
102
92
|
|
|
103
93
|
```bash
|
|
104
94
|
npm install -D drizzle-kit
|
|
@@ -114,7 +104,7 @@ export const users = $entity({
|
|
|
114
104
|
name: "users",
|
|
115
105
|
schema: t.object({
|
|
116
106
|
id: pg.primaryKey(),
|
|
117
|
-
name: t.
|
|
107
|
+
name: t.text(),
|
|
118
108
|
}),
|
|
119
109
|
});
|
|
120
110
|
|
|
@@ -143,7 +133,7 @@ node app.ts
|
|
|
143
133
|
|
|
144
134
|
### React Application
|
|
145
135
|
|
|
146
|
-
|
|
136
|
+
Build full-stack React applications, with server-side rendering (SSR) and client-side rendering (CSR).
|
|
147
137
|
|
|
148
138
|
[React](https://react.dev) is required as a `dependency`:
|
|
149
139
|
|
|
@@ -222,8 +212,6 @@ Then run Vite:
|
|
|
222
212
|
npx vite
|
|
223
213
|
```
|
|
224
214
|
|
|
225
|
-
Plenty of other features are available, please check the [documentation](https://feunard.github.io/alepha/).
|
|
226
|
-
|
|
227
215
|
## License
|
|
228
216
|
|
|
229
217
|
MIT
|
package/api/files.cjs
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
var m = require('@alepha/api-files');
|
|
3
|
+
Object.keys(m).forEach(function (k) {
|
|
4
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
5
|
+
enumerable: true,
|
|
6
|
+
get: function () { return m[k]; }
|
|
7
|
+
});
|
|
8
|
+
});
|
package/api/files.d.ts
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
import { BucketDescriptor } from "alepha/bucket";
|
|
2
|
+
import * as _alepha_core1 from "alepha";
|
|
3
|
+
import { Alepha, FileLike, Static } from "alepha";
|
|
4
|
+
import * as _alepha_postgres50 from "alepha/postgres";
|
|
5
|
+
import { Page } from "alepha/postgres";
|
|
6
|
+
import { Ok } from "alepha/server";
|
|
7
|
+
import { DateTimeProvider, DurationLike } from "alepha/datetime";
|
|
8
|
+
import * as _alepha_logger0 from "alepha/logger";
|
|
9
|
+
import { UserAccountToken } from "alepha/security";
|
|
10
|
+
import * as typebox68 from "typebox";
|
|
11
|
+
|
|
12
|
+
//#region src/entities/files.d.ts
|
|
13
|
+
declare const files: _alepha_postgres50.PgTableWithColumnsAndSchema<_alepha_postgres50.PgTableConfig<"files", typebox68.TObject<{
|
|
14
|
+
id: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox68.TString, typeof _alepha_postgres50.PG_PRIMARY_KEY>, typeof _alepha_postgres50.PG_DEFAULT>;
|
|
15
|
+
version: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox68.TInteger, typeof _alepha_postgres50.PG_VERSION>, typeof _alepha_postgres50.PG_DEFAULT>;
|
|
16
|
+
createdAt: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox68.TString, typeof _alepha_postgres50.PG_CREATED_AT>, typeof _alepha_postgres50.PG_DEFAULT>;
|
|
17
|
+
updatedAt: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox68.TString, typeof _alepha_postgres50.PG_UPDATED_AT>, typeof _alepha_postgres50.PG_DEFAULT>;
|
|
18
|
+
blobId: typebox68.TString;
|
|
19
|
+
creator: typebox68.TOptional<typebox68.TString>;
|
|
20
|
+
creatorRealm: typebox68.TOptional<typebox68.TString>;
|
|
21
|
+
creatorName: typebox68.TOptional<typebox68.TString>;
|
|
22
|
+
bucket: typebox68.TString;
|
|
23
|
+
expirationDate: typebox68.TOptional<typebox68.TString>;
|
|
24
|
+
name: typebox68.TString;
|
|
25
|
+
size: typebox68.TNumber;
|
|
26
|
+
mimeType: typebox68.TString;
|
|
27
|
+
tags: typebox68.TOptional<typebox68.TArray<typebox68.TString>>;
|
|
28
|
+
checksum: typebox68.TOptional<typebox68.TString>;
|
|
29
|
+
}>, _alepha_postgres50.FromSchema<typebox68.TObject<{
|
|
30
|
+
id: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox68.TString, typeof _alepha_postgres50.PG_PRIMARY_KEY>, typeof _alepha_postgres50.PG_DEFAULT>;
|
|
31
|
+
version: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox68.TInteger, typeof _alepha_postgres50.PG_VERSION>, typeof _alepha_postgres50.PG_DEFAULT>;
|
|
32
|
+
createdAt: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox68.TString, typeof _alepha_postgres50.PG_CREATED_AT>, typeof _alepha_postgres50.PG_DEFAULT>;
|
|
33
|
+
updatedAt: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox68.TString, typeof _alepha_postgres50.PG_UPDATED_AT>, typeof _alepha_postgres50.PG_DEFAULT>;
|
|
34
|
+
blobId: typebox68.TString;
|
|
35
|
+
creator: typebox68.TOptional<typebox68.TString>;
|
|
36
|
+
creatorRealm: typebox68.TOptional<typebox68.TString>;
|
|
37
|
+
creatorName: typebox68.TOptional<typebox68.TString>;
|
|
38
|
+
bucket: typebox68.TString;
|
|
39
|
+
expirationDate: typebox68.TOptional<typebox68.TString>;
|
|
40
|
+
name: typebox68.TString;
|
|
41
|
+
size: typebox68.TNumber;
|
|
42
|
+
mimeType: typebox68.TString;
|
|
43
|
+
tags: typebox68.TOptional<typebox68.TArray<typebox68.TString>>;
|
|
44
|
+
checksum: typebox68.TOptional<typebox68.TString>;
|
|
45
|
+
}>>>, typebox68.TObject<{
|
|
46
|
+
id: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox68.TString, typeof _alepha_postgres50.PG_PRIMARY_KEY>, typeof _alepha_postgres50.PG_DEFAULT>;
|
|
47
|
+
version: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox68.TInteger, typeof _alepha_postgres50.PG_VERSION>, typeof _alepha_postgres50.PG_DEFAULT>;
|
|
48
|
+
createdAt: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox68.TString, typeof _alepha_postgres50.PG_CREATED_AT>, typeof _alepha_postgres50.PG_DEFAULT>;
|
|
49
|
+
updatedAt: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox68.TString, typeof _alepha_postgres50.PG_UPDATED_AT>, typeof _alepha_postgres50.PG_DEFAULT>;
|
|
50
|
+
blobId: typebox68.TString;
|
|
51
|
+
creator: typebox68.TOptional<typebox68.TString>;
|
|
52
|
+
creatorRealm: typebox68.TOptional<typebox68.TString>;
|
|
53
|
+
creatorName: typebox68.TOptional<typebox68.TString>;
|
|
54
|
+
bucket: typebox68.TString;
|
|
55
|
+
expirationDate: typebox68.TOptional<typebox68.TString>;
|
|
56
|
+
name: typebox68.TString;
|
|
57
|
+
size: typebox68.TNumber;
|
|
58
|
+
mimeType: typebox68.TString;
|
|
59
|
+
tags: typebox68.TOptional<typebox68.TArray<typebox68.TString>>;
|
|
60
|
+
checksum: typebox68.TOptional<typebox68.TString>;
|
|
61
|
+
}>>;
|
|
62
|
+
type FileEntity = Static<typeof files.$schema>;
|
|
63
|
+
//#endregion
|
|
64
|
+
//#region src/schemas/fileQuerySchema.d.ts
|
|
65
|
+
declare const fileQuerySchema: typebox68.TObject<{
|
|
66
|
+
page: typebox68.TOptional<typebox68.TInteger>;
|
|
67
|
+
size: typebox68.TOptional<typebox68.TInteger>;
|
|
68
|
+
sort: typebox68.TOptional<typebox68.TString>;
|
|
69
|
+
bucket: typebox68.TOptional<typebox68.TString>;
|
|
70
|
+
tags: typebox68.TOptional<typebox68.TArray<typebox68.TString>>;
|
|
71
|
+
}>;
|
|
72
|
+
type FileQuery = Static<typeof fileQuerySchema>;
|
|
73
|
+
//#endregion
|
|
74
|
+
//#region src/schemas/fileResourceSchema.d.ts
|
|
75
|
+
declare const fileResourceSchema: typebox68.TObject<{
|
|
76
|
+
id: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox68.TString, typeof _alepha_postgres50.PG_PRIMARY_KEY>, typeof _alepha_postgres50.PG_DEFAULT>;
|
|
77
|
+
version: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox68.TInteger, typeof _alepha_postgres50.PG_VERSION>, typeof _alepha_postgres50.PG_DEFAULT>;
|
|
78
|
+
createdAt: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox68.TString, typeof _alepha_postgres50.PG_CREATED_AT>, typeof _alepha_postgres50.PG_DEFAULT>;
|
|
79
|
+
updatedAt: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox68.TString, typeof _alepha_postgres50.PG_UPDATED_AT>, typeof _alepha_postgres50.PG_DEFAULT>;
|
|
80
|
+
blobId: typebox68.TString;
|
|
81
|
+
creator: typebox68.TOptional<typebox68.TString>;
|
|
82
|
+
creatorRealm: typebox68.TOptional<typebox68.TString>;
|
|
83
|
+
creatorName: typebox68.TOptional<typebox68.TString>;
|
|
84
|
+
bucket: typebox68.TString;
|
|
85
|
+
expirationDate: typebox68.TOptional<typebox68.TString>;
|
|
86
|
+
name: typebox68.TString;
|
|
87
|
+
size: typebox68.TNumber;
|
|
88
|
+
mimeType: typebox68.TString;
|
|
89
|
+
tags: typebox68.TOptional<typebox68.TArray<typebox68.TString>>;
|
|
90
|
+
checksum: typebox68.TOptional<typebox68.TString>;
|
|
91
|
+
}>;
|
|
92
|
+
type FileResource = Static<typeof fileResourceSchema>;
|
|
93
|
+
//#endregion
|
|
94
|
+
//#region src/services/FileService.d.ts
|
|
95
|
+
declare class FileService {
|
|
96
|
+
protected readonly alepha: Alepha;
|
|
97
|
+
protected readonly log: _alepha_logger0.Logger;
|
|
98
|
+
protected readonly fileRepository: _alepha_postgres50.RepositoryDescriptor<_alepha_postgres50.PgTableConfig<"files", typebox68.TObject<{
|
|
99
|
+
id: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox68.TString, typeof _alepha_postgres50.PG_PRIMARY_KEY>, typeof _alepha_postgres50.PG_DEFAULT>;
|
|
100
|
+
version: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox68.TInteger, typeof _alepha_postgres50.PG_VERSION>, typeof _alepha_postgres50.PG_DEFAULT>;
|
|
101
|
+
createdAt: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox68.TString, typeof _alepha_postgres50.PG_CREATED_AT>, typeof _alepha_postgres50.PG_DEFAULT>;
|
|
102
|
+
updatedAt: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox68.TString, typeof _alepha_postgres50.PG_UPDATED_AT>, typeof _alepha_postgres50.PG_DEFAULT>;
|
|
103
|
+
blobId: typebox68.TString;
|
|
104
|
+
creator: typebox68.TOptional<typebox68.TString>;
|
|
105
|
+
creatorRealm: typebox68.TOptional<typebox68.TString>;
|
|
106
|
+
creatorName: typebox68.TOptional<typebox68.TString>;
|
|
107
|
+
bucket: typebox68.TString;
|
|
108
|
+
expirationDate: typebox68.TOptional<typebox68.TString>;
|
|
109
|
+
name: typebox68.TString;
|
|
110
|
+
size: typebox68.TNumber;
|
|
111
|
+
mimeType: typebox68.TString;
|
|
112
|
+
tags: typebox68.TOptional<typebox68.TArray<typebox68.TString>>;
|
|
113
|
+
checksum: typebox68.TOptional<typebox68.TString>;
|
|
114
|
+
}>, _alepha_postgres50.FromSchema<typebox68.TObject<{
|
|
115
|
+
id: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox68.TString, typeof _alepha_postgres50.PG_PRIMARY_KEY>, typeof _alepha_postgres50.PG_DEFAULT>;
|
|
116
|
+
version: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox68.TInteger, typeof _alepha_postgres50.PG_VERSION>, typeof _alepha_postgres50.PG_DEFAULT>;
|
|
117
|
+
createdAt: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox68.TString, typeof _alepha_postgres50.PG_CREATED_AT>, typeof _alepha_postgres50.PG_DEFAULT>;
|
|
118
|
+
updatedAt: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox68.TString, typeof _alepha_postgres50.PG_UPDATED_AT>, typeof _alepha_postgres50.PG_DEFAULT>;
|
|
119
|
+
blobId: typebox68.TString;
|
|
120
|
+
creator: typebox68.TOptional<typebox68.TString>;
|
|
121
|
+
creatorRealm: typebox68.TOptional<typebox68.TString>;
|
|
122
|
+
creatorName: typebox68.TOptional<typebox68.TString>;
|
|
123
|
+
bucket: typebox68.TString;
|
|
124
|
+
expirationDate: typebox68.TOptional<typebox68.TString>;
|
|
125
|
+
name: typebox68.TString;
|
|
126
|
+
size: typebox68.TNumber;
|
|
127
|
+
mimeType: typebox68.TString;
|
|
128
|
+
tags: typebox68.TOptional<typebox68.TArray<typebox68.TString>>;
|
|
129
|
+
checksum: typebox68.TOptional<typebox68.TString>;
|
|
130
|
+
}>>>, typebox68.TObject<{
|
|
131
|
+
id: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox68.TString, typeof _alepha_postgres50.PG_PRIMARY_KEY>, typeof _alepha_postgres50.PG_DEFAULT>;
|
|
132
|
+
version: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox68.TInteger, typeof _alepha_postgres50.PG_VERSION>, typeof _alepha_postgres50.PG_DEFAULT>;
|
|
133
|
+
createdAt: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox68.TString, typeof _alepha_postgres50.PG_CREATED_AT>, typeof _alepha_postgres50.PG_DEFAULT>;
|
|
134
|
+
updatedAt: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox68.TString, typeof _alepha_postgres50.PG_UPDATED_AT>, typeof _alepha_postgres50.PG_DEFAULT>;
|
|
135
|
+
blobId: typebox68.TString;
|
|
136
|
+
creator: typebox68.TOptional<typebox68.TString>;
|
|
137
|
+
creatorRealm: typebox68.TOptional<typebox68.TString>;
|
|
138
|
+
creatorName: typebox68.TOptional<typebox68.TString>;
|
|
139
|
+
bucket: typebox68.TString;
|
|
140
|
+
expirationDate: typebox68.TOptional<typebox68.TString>;
|
|
141
|
+
name: typebox68.TString;
|
|
142
|
+
size: typebox68.TNumber;
|
|
143
|
+
mimeType: typebox68.TString;
|
|
144
|
+
tags: typebox68.TOptional<typebox68.TArray<typebox68.TString>>;
|
|
145
|
+
checksum: typebox68.TOptional<typebox68.TString>;
|
|
146
|
+
}>>;
|
|
147
|
+
protected readonly dateTimeProvider: DateTimeProvider;
|
|
148
|
+
protected readonly defaultBucket: BucketDescriptor;
|
|
149
|
+
protected onUploadFile: _alepha_core1.HookDescriptor<"bucket:file:uploaded">;
|
|
150
|
+
protected onDeleteBucketFile: _alepha_core1.HookDescriptor<"bucket:file:deleted">;
|
|
151
|
+
bucket(bucketName?: string): BucketDescriptor;
|
|
152
|
+
findFiles(q?: FileQuery): Promise<Page<FileEntity>>;
|
|
153
|
+
findExpiredFiles(): Promise<FileEntity[]>;
|
|
154
|
+
protected getExpirationDate(ttl?: DurationLike): string | undefined;
|
|
155
|
+
uploadFile(file: FileLike, options?: {
|
|
156
|
+
expirationDate?: string | Date;
|
|
157
|
+
bucket?: string;
|
|
158
|
+
user?: UserAccountToken;
|
|
159
|
+
tags?: string[];
|
|
160
|
+
}): Promise<FileEntity>;
|
|
161
|
+
streamFile(id: string): Promise<FileLike>;
|
|
162
|
+
deleteFile(id: string): Promise<Ok>;
|
|
163
|
+
getFileById(id: string | FileEntity): Promise<FileEntity>;
|
|
164
|
+
entityToResource(entity: FileEntity): FileResource;
|
|
165
|
+
}
|
|
166
|
+
//#endregion
|
|
167
|
+
//#region src/index.d.ts
|
|
168
|
+
declare module "alepha/bucket" {
|
|
169
|
+
interface BucketFileOptions {
|
|
170
|
+
/**
|
|
171
|
+
* Time to live for the files in the bucket.
|
|
172
|
+
*/
|
|
173
|
+
ttl?: DurationLike;
|
|
174
|
+
/**
|
|
175
|
+
* Tags for the bucket.
|
|
176
|
+
*/
|
|
177
|
+
tags?: string[];
|
|
178
|
+
/**
|
|
179
|
+
* User performing the operation.
|
|
180
|
+
*/
|
|
181
|
+
user?: UserAccountToken;
|
|
182
|
+
/**
|
|
183
|
+
* Whether to persist the file metadata in the database.
|
|
184
|
+
*
|
|
185
|
+
* @default true
|
|
186
|
+
*/
|
|
187
|
+
persist?: boolean;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Provides file management API endpoints for Alepha applications.
|
|
192
|
+
*
|
|
193
|
+
* This module includes file upload, download, storage management,
|
|
194
|
+
* and file metadata operations.
|
|
195
|
+
*
|
|
196
|
+
* @module alepha.api.files
|
|
197
|
+
*/
|
|
198
|
+
declare const AlephaApiFiles: _alepha_core1.Service<_alepha_core1.Module<{}>>;
|
|
199
|
+
//#endregion
|
|
200
|
+
export { AlephaApiFiles, FileEntity, FileService, files };
|
|
201
|
+
//# sourceMappingURL=index.d.ts.map
|
package/api/files.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@alepha/api-files'
|
package/api/jobs.cjs
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
var m = require('@alepha/api-jobs');
|
|
3
|
+
Object.keys(m).forEach(function (k) {
|
|
4
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
5
|
+
enumerable: true,
|
|
6
|
+
get: function () { return m[k]; }
|
|
7
|
+
});
|
|
8
|
+
});
|
package/api/jobs.d.ts
ADDED
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
import * as _alepha_core1 from "alepha";
|
|
2
|
+
import { Alepha, Static } from "alepha";
|
|
3
|
+
import "alepha/scheduler";
|
|
4
|
+
import "alepha/server/security";
|
|
5
|
+
import * as _alepha_postgres0 from "alepha/postgres";
|
|
6
|
+
import * as _alepha_server0 from "alepha/server";
|
|
7
|
+
import { DateTimeProvider } from "alepha/datetime";
|
|
8
|
+
import * as typebox197 from "typebox";
|
|
9
|
+
|
|
10
|
+
//#region src/schemas/jobExecutionQuerySchema.d.ts
|
|
11
|
+
declare const jobExecutionQuerySchema: typebox197.TObject<{
|
|
12
|
+
page: typebox197.TOptional<typebox197.TInteger>;
|
|
13
|
+
size: typebox197.TOptional<typebox197.TInteger>;
|
|
14
|
+
sort: typebox197.TOptional<typebox197.TString>;
|
|
15
|
+
status: typebox197.TOptional<typebox197.TUnsafe<"STARTED" | "FAILED" | "COMPLETED">>;
|
|
16
|
+
job: typebox197.TOptional<typebox197.TString>;
|
|
17
|
+
}>;
|
|
18
|
+
type JobExecutionQuery = Static<typeof jobExecutionQuerySchema>;
|
|
19
|
+
//#endregion
|
|
20
|
+
//#region src/services/JobService.d.ts
|
|
21
|
+
declare class JobService {
|
|
22
|
+
protected readonly alepha: Alepha;
|
|
23
|
+
protected readonly executionRepository: _alepha_postgres0.RepositoryDescriptor<_alepha_postgres0.PgTableConfig<"job_executions", typebox197.TObject<{
|
|
24
|
+
id: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox197.TString, typeof _alepha_postgres0.PG_PRIMARY_KEY>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
25
|
+
version: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox197.TInteger, typeof _alepha_postgres0.PG_VERSION>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
26
|
+
createdAt: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox197.TString, typeof _alepha_postgres0.PG_CREATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
27
|
+
updatedAt: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox197.TString, typeof _alepha_postgres0.PG_UPDATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
28
|
+
finishedAt: typebox197.TOptional<typebox197.TString>;
|
|
29
|
+
job: typebox197.TString;
|
|
30
|
+
status: typebox197.TUnsafe<"STARTED" | "FAILED" | "COMPLETED">;
|
|
31
|
+
error: typebox197.TOptional<typebox197.TString>;
|
|
32
|
+
logs: typebox197.TOptional<typebox197.TArray<typebox197.TObject<{
|
|
33
|
+
level: typebox197.TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
|
|
34
|
+
message: typebox197.TString;
|
|
35
|
+
service: typebox197.TString;
|
|
36
|
+
module: typebox197.TString;
|
|
37
|
+
context: typebox197.TOptional<typebox197.TString>;
|
|
38
|
+
app: typebox197.TOptional<typebox197.TString>;
|
|
39
|
+
data: typebox197.TOptional<typebox197.TAny>;
|
|
40
|
+
timestamp: typebox197.TString;
|
|
41
|
+
}>>>;
|
|
42
|
+
}>, _alepha_postgres0.FromSchema<typebox197.TObject<{
|
|
43
|
+
id: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox197.TString, typeof _alepha_postgres0.PG_PRIMARY_KEY>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
44
|
+
version: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox197.TInteger, typeof _alepha_postgres0.PG_VERSION>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
45
|
+
createdAt: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox197.TString, typeof _alepha_postgres0.PG_CREATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
46
|
+
updatedAt: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox197.TString, typeof _alepha_postgres0.PG_UPDATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
47
|
+
finishedAt: typebox197.TOptional<typebox197.TString>;
|
|
48
|
+
job: typebox197.TString;
|
|
49
|
+
status: typebox197.TUnsafe<"STARTED" | "FAILED" | "COMPLETED">;
|
|
50
|
+
error: typebox197.TOptional<typebox197.TString>;
|
|
51
|
+
logs: typebox197.TOptional<typebox197.TArray<typebox197.TObject<{
|
|
52
|
+
level: typebox197.TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
|
|
53
|
+
message: typebox197.TString;
|
|
54
|
+
service: typebox197.TString;
|
|
55
|
+
module: typebox197.TString;
|
|
56
|
+
context: typebox197.TOptional<typebox197.TString>;
|
|
57
|
+
app: typebox197.TOptional<typebox197.TString>;
|
|
58
|
+
data: typebox197.TOptional<typebox197.TAny>;
|
|
59
|
+
timestamp: typebox197.TString;
|
|
60
|
+
}>>>;
|
|
61
|
+
}>>>, typebox197.TObject<{
|
|
62
|
+
id: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox197.TString, typeof _alepha_postgres0.PG_PRIMARY_KEY>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
63
|
+
version: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox197.TInteger, typeof _alepha_postgres0.PG_VERSION>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
64
|
+
createdAt: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox197.TString, typeof _alepha_postgres0.PG_CREATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
65
|
+
updatedAt: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox197.TString, typeof _alepha_postgres0.PG_UPDATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
66
|
+
finishedAt: typebox197.TOptional<typebox197.TString>;
|
|
67
|
+
job: typebox197.TString;
|
|
68
|
+
status: typebox197.TUnsafe<"STARTED" | "FAILED" | "COMPLETED">;
|
|
69
|
+
error: typebox197.TOptional<typebox197.TString>;
|
|
70
|
+
logs: typebox197.TOptional<typebox197.TArray<typebox197.TObject<{
|
|
71
|
+
level: typebox197.TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
|
|
72
|
+
message: typebox197.TString;
|
|
73
|
+
service: typebox197.TString;
|
|
74
|
+
module: typebox197.TString;
|
|
75
|
+
context: typebox197.TOptional<typebox197.TString>;
|
|
76
|
+
app: typebox197.TOptional<typebox197.TString>;
|
|
77
|
+
data: typebox197.TOptional<typebox197.TAny>;
|
|
78
|
+
timestamp: typebox197.TString;
|
|
79
|
+
}>>>;
|
|
80
|
+
}>>;
|
|
81
|
+
protected readonly dtp: DateTimeProvider;
|
|
82
|
+
protected readonly logs: Map<string, {
|
|
83
|
+
context?: string | undefined;
|
|
84
|
+
app?: string | undefined;
|
|
85
|
+
data?: any;
|
|
86
|
+
level: "SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR";
|
|
87
|
+
message: string;
|
|
88
|
+
service: string;
|
|
89
|
+
module: string;
|
|
90
|
+
timestamp: string;
|
|
91
|
+
}[]>;
|
|
92
|
+
protected readonly onLogs: _alepha_core1.HookDescriptor<"log">;
|
|
93
|
+
protected readonly onSchedulerBegin: _alepha_core1.HookDescriptor<"scheduler:begin">;
|
|
94
|
+
protected readonly onSchedulerError: _alepha_core1.HookDescriptor<"scheduler:error">;
|
|
95
|
+
readonly onSchedulerSuccess: _alepha_core1.HookDescriptor<"scheduler:success">;
|
|
96
|
+
readonly onSchedulerEnd: _alepha_core1.HookDescriptor<"scheduler:end">;
|
|
97
|
+
getJobs(): Promise<string[]>;
|
|
98
|
+
getJobExecutions(query?: JobExecutionQuery): Promise<_alepha_postgres0.Page<{
|
|
99
|
+
finishedAt?: string | undefined;
|
|
100
|
+
error?: string | undefined;
|
|
101
|
+
logs?: {
|
|
102
|
+
context?: string | undefined;
|
|
103
|
+
app?: string | undefined;
|
|
104
|
+
data?: any;
|
|
105
|
+
level: "SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR";
|
|
106
|
+
message: string;
|
|
107
|
+
service: string;
|
|
108
|
+
module: string;
|
|
109
|
+
timestamp: string;
|
|
110
|
+
}[] | undefined;
|
|
111
|
+
id: string;
|
|
112
|
+
version: number;
|
|
113
|
+
createdAt: string;
|
|
114
|
+
updatedAt: string;
|
|
115
|
+
job: string;
|
|
116
|
+
status: "STARTED" | "FAILED" | "COMPLETED";
|
|
117
|
+
}>>;
|
|
118
|
+
triggerJob(name: string): Promise<{
|
|
119
|
+
ok: boolean;
|
|
120
|
+
}>;
|
|
121
|
+
}
|
|
122
|
+
//#endregion
|
|
123
|
+
//#region src/controllers/JobController.d.ts
|
|
124
|
+
declare class JobController {
|
|
125
|
+
protected readonly url = "/jobs";
|
|
126
|
+
protected readonly group = "jobs";
|
|
127
|
+
protected readonly jobService: JobService;
|
|
128
|
+
readonly getJobs: _alepha_server0.ActionDescriptorFn<{
|
|
129
|
+
response: typebox197.TArray<typebox197.TString>;
|
|
130
|
+
}>;
|
|
131
|
+
readonly getJobExecutions: _alepha_server0.ActionDescriptorFn<{
|
|
132
|
+
query: typebox197.TObject<{
|
|
133
|
+
page: typebox197.TOptional<typebox197.TInteger>;
|
|
134
|
+
size: typebox197.TOptional<typebox197.TInteger>;
|
|
135
|
+
sort: typebox197.TOptional<typebox197.TString>;
|
|
136
|
+
status: typebox197.TOptional<typebox197.TUnsafe<"STARTED" | "FAILED" | "COMPLETED">>;
|
|
137
|
+
job: typebox197.TOptional<typebox197.TString>;
|
|
138
|
+
}>;
|
|
139
|
+
response: _alepha_postgres0.TPage<typebox197.TObject<{
|
|
140
|
+
id: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox197.TString, typeof _alepha_postgres0.PG_PRIMARY_KEY>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
141
|
+
version: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox197.TInteger, typeof _alepha_postgres0.PG_VERSION>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
142
|
+
createdAt: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox197.TString, typeof _alepha_postgres0.PG_CREATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
143
|
+
updatedAt: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox197.TString, typeof _alepha_postgres0.PG_UPDATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
144
|
+
finishedAt: typebox197.TOptional<typebox197.TString>;
|
|
145
|
+
job: typebox197.TString;
|
|
146
|
+
status: typebox197.TUnsafe<"STARTED" | "FAILED" | "COMPLETED">;
|
|
147
|
+
error: typebox197.TOptional<typebox197.TString>;
|
|
148
|
+
logs: typebox197.TOptional<typebox197.TArray<typebox197.TObject<{
|
|
149
|
+
level: typebox197.TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
|
|
150
|
+
message: typebox197.TString;
|
|
151
|
+
service: typebox197.TString;
|
|
152
|
+
module: typebox197.TString;
|
|
153
|
+
context: typebox197.TOptional<typebox197.TString>;
|
|
154
|
+
app: typebox197.TOptional<typebox197.TString>;
|
|
155
|
+
data: typebox197.TOptional<typebox197.TAny>;
|
|
156
|
+
timestamp: typebox197.TString;
|
|
157
|
+
}>>>;
|
|
158
|
+
}>>;
|
|
159
|
+
}>;
|
|
160
|
+
readonly triggerJob: _alepha_server0.ActionDescriptorFn<{
|
|
161
|
+
body: typebox197.TObject<{
|
|
162
|
+
name: typebox197.TString;
|
|
163
|
+
}>;
|
|
164
|
+
response: typebox197.TObject<{
|
|
165
|
+
ok: typebox197.TBoolean;
|
|
166
|
+
id: typebox197.TOptional<typebox197.TUnion<[typebox197.TString, typebox197.TInteger]>>;
|
|
167
|
+
count: typebox197.TOptional<typebox197.TNumber>;
|
|
168
|
+
}>;
|
|
169
|
+
}>;
|
|
170
|
+
}
|
|
171
|
+
//#endregion
|
|
172
|
+
//#region src/entities/jobExecutions.d.ts
|
|
173
|
+
declare const jobExecutions: _alepha_postgres0.PgTableWithColumnsAndSchema<_alepha_postgres0.PgTableConfig<"job_executions", typebox197.TObject<{
|
|
174
|
+
id: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox197.TString, typeof _alepha_postgres0.PG_PRIMARY_KEY>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
175
|
+
version: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox197.TInteger, typeof _alepha_postgres0.PG_VERSION>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
176
|
+
createdAt: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox197.TString, typeof _alepha_postgres0.PG_CREATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
177
|
+
updatedAt: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox197.TString, typeof _alepha_postgres0.PG_UPDATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
178
|
+
finishedAt: typebox197.TOptional<typebox197.TString>;
|
|
179
|
+
job: typebox197.TString;
|
|
180
|
+
status: typebox197.TUnsafe<"STARTED" | "FAILED" | "COMPLETED">;
|
|
181
|
+
error: typebox197.TOptional<typebox197.TString>;
|
|
182
|
+
logs: typebox197.TOptional<typebox197.TArray<typebox197.TObject<{
|
|
183
|
+
level: typebox197.TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
|
|
184
|
+
message: typebox197.TString;
|
|
185
|
+
service: typebox197.TString;
|
|
186
|
+
module: typebox197.TString;
|
|
187
|
+
context: typebox197.TOptional<typebox197.TString>;
|
|
188
|
+
app: typebox197.TOptional<typebox197.TString>;
|
|
189
|
+
data: typebox197.TOptional<typebox197.TAny>;
|
|
190
|
+
timestamp: typebox197.TString;
|
|
191
|
+
}>>>;
|
|
192
|
+
}>, _alepha_postgres0.FromSchema<typebox197.TObject<{
|
|
193
|
+
id: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox197.TString, typeof _alepha_postgres0.PG_PRIMARY_KEY>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
194
|
+
version: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox197.TInteger, typeof _alepha_postgres0.PG_VERSION>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
195
|
+
createdAt: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox197.TString, typeof _alepha_postgres0.PG_CREATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
196
|
+
updatedAt: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox197.TString, typeof _alepha_postgres0.PG_UPDATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
197
|
+
finishedAt: typebox197.TOptional<typebox197.TString>;
|
|
198
|
+
job: typebox197.TString;
|
|
199
|
+
status: typebox197.TUnsafe<"STARTED" | "FAILED" | "COMPLETED">;
|
|
200
|
+
error: typebox197.TOptional<typebox197.TString>;
|
|
201
|
+
logs: typebox197.TOptional<typebox197.TArray<typebox197.TObject<{
|
|
202
|
+
level: typebox197.TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
|
|
203
|
+
message: typebox197.TString;
|
|
204
|
+
service: typebox197.TString;
|
|
205
|
+
module: typebox197.TString;
|
|
206
|
+
context: typebox197.TOptional<typebox197.TString>;
|
|
207
|
+
app: typebox197.TOptional<typebox197.TString>;
|
|
208
|
+
data: typebox197.TOptional<typebox197.TAny>;
|
|
209
|
+
timestamp: typebox197.TString;
|
|
210
|
+
}>>>;
|
|
211
|
+
}>>>, typebox197.TObject<{
|
|
212
|
+
id: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox197.TString, typeof _alepha_postgres0.PG_PRIMARY_KEY>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
213
|
+
version: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox197.TInteger, typeof _alepha_postgres0.PG_VERSION>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
214
|
+
createdAt: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox197.TString, typeof _alepha_postgres0.PG_CREATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
215
|
+
updatedAt: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox197.TString, typeof _alepha_postgres0.PG_UPDATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
216
|
+
finishedAt: typebox197.TOptional<typebox197.TString>;
|
|
217
|
+
job: typebox197.TString;
|
|
218
|
+
status: typebox197.TUnsafe<"STARTED" | "FAILED" | "COMPLETED">;
|
|
219
|
+
error: typebox197.TOptional<typebox197.TString>;
|
|
220
|
+
logs: typebox197.TOptional<typebox197.TArray<typebox197.TObject<{
|
|
221
|
+
level: typebox197.TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
|
|
222
|
+
message: typebox197.TString;
|
|
223
|
+
service: typebox197.TString;
|
|
224
|
+
module: typebox197.TString;
|
|
225
|
+
context: typebox197.TOptional<typebox197.TString>;
|
|
226
|
+
app: typebox197.TOptional<typebox197.TString>;
|
|
227
|
+
data: typebox197.TOptional<typebox197.TAny>;
|
|
228
|
+
timestamp: typebox197.TString;
|
|
229
|
+
}>>>;
|
|
230
|
+
}>>;
|
|
231
|
+
type JobExecutionEntity = Static<typeof jobExecutions.$schema>;
|
|
232
|
+
//#endregion
|
|
233
|
+
//#region src/schemas/jobExecutionResourceSchema.d.ts
|
|
234
|
+
declare const jobExecutionResourceSchema: typebox197.TObject<{
|
|
235
|
+
id: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox197.TString, typeof _alepha_postgres0.PG_PRIMARY_KEY>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
236
|
+
version: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox197.TInteger, typeof _alepha_postgres0.PG_VERSION>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
237
|
+
createdAt: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox197.TString, typeof _alepha_postgres0.PG_CREATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
238
|
+
updatedAt: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox197.TString, typeof _alepha_postgres0.PG_UPDATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
239
|
+
finishedAt: typebox197.TOptional<typebox197.TString>;
|
|
240
|
+
job: typebox197.TString;
|
|
241
|
+
status: typebox197.TUnsafe<"STARTED" | "FAILED" | "COMPLETED">;
|
|
242
|
+
error: typebox197.TOptional<typebox197.TString>;
|
|
243
|
+
logs: typebox197.TOptional<typebox197.TArray<typebox197.TObject<{
|
|
244
|
+
level: typebox197.TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
|
|
245
|
+
message: typebox197.TString;
|
|
246
|
+
service: typebox197.TString;
|
|
247
|
+
module: typebox197.TString;
|
|
248
|
+
context: typebox197.TOptional<typebox197.TString>;
|
|
249
|
+
app: typebox197.TOptional<typebox197.TString>;
|
|
250
|
+
data: typebox197.TOptional<typebox197.TAny>;
|
|
251
|
+
timestamp: typebox197.TString;
|
|
252
|
+
}>>>;
|
|
253
|
+
}>;
|
|
254
|
+
type JobExecutionResource = Static<typeof jobExecutionResourceSchema>;
|
|
255
|
+
//#endregion
|
|
256
|
+
//#region src/schemas/triggerJobSchema.d.ts
|
|
257
|
+
declare const triggerJobSchema: typebox197.TObject<{
|
|
258
|
+
name: typebox197.TString;
|
|
259
|
+
}>;
|
|
260
|
+
type TriggerJob = Static<typeof triggerJobSchema>;
|
|
261
|
+
//#endregion
|
|
262
|
+
//#region src/index.d.ts
|
|
263
|
+
/**
|
|
264
|
+
* Provides job management API endpoints for Alepha applications.
|
|
265
|
+
*
|
|
266
|
+
* This module includes job queue operations, job status monitoring,
|
|
267
|
+
* and background task management capabilities.
|
|
268
|
+
*
|
|
269
|
+
* @module alepha.api.jobs
|
|
270
|
+
*/
|
|
271
|
+
declare const AlephaApiJobs: _alepha_core1.Service<_alepha_core1.Module<{}>>;
|
|
272
|
+
//#endregion
|
|
273
|
+
export { AlephaApiJobs, JobController, JobExecutionEntity, JobExecutionQuery, JobExecutionResource, JobService, TriggerJob, jobExecutionQuerySchema, jobExecutionResourceSchema, jobExecutions, triggerJobSchema };
|
|
274
|
+
//# sourceMappingURL=index.d.ts.map
|
package/api/jobs.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@alepha/api-jobs'
|
package/api/users.cjs
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
var m = require('@alepha/api-users');
|
|
3
|
+
Object.keys(m).forEach(function (k) {
|
|
4
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
5
|
+
enumerable: true,
|
|
6
|
+
get: function () { return m[k]; }
|
|
7
|
+
});
|
|
8
|
+
});
|