alepha 0.10.3 → 0.10.4

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 CHANGED
@@ -75,10 +75,10 @@ class Api {
75
75
  path: "/hello/:name",
76
76
  schema: {
77
77
  params: t.object({
78
- name: t.string()
78
+ name: t.text()
79
79
  }),
80
80
  response: t.object({
81
- message: t.string(),
81
+ message: t.text(),
82
82
  })
83
83
  },
84
84
  handler: async ({ params }) => {
@@ -114,7 +114,7 @@ export const users = $entity({
114
114
  name: "users",
115
115
  schema: t.object({
116
116
  id: pg.primaryKey(),
117
- name: t.string(),
117
+ name: t.text(),
118
118
  }),
119
119
  });
120
120
 
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,203 @@
1
+ import { BucketDescriptor } from "alepha/bucket";
2
+ import * as _alepha_core1 from "alepha";
3
+ import { Alepha, FileLike, Static } from "alepha";
4
+ import * as _alepha_postgres26 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
+ import * as _alepha_postgres_src_helpers_pgAttr0 from "alepha/postgres/src/helpers/pgAttr";
12
+ import * as _alepha_postgres_src_helpers_pgAttr_ts23 from "alepha/postgres/src/helpers/pgAttr.ts";
13
+
14
+ //#region src/entities/files.d.ts
15
+ declare const files: _alepha_postgres26.PgTableWithColumnsAndSchema<_alepha_postgres26.PgTableConfig<"files", typebox68.TObject<{
16
+ id: _alepha_postgres_src_helpers_pgAttr0.PgAttr<_alepha_postgres_src_helpers_pgAttr0.PgAttr<typebox68.TString, typeof _alepha_postgres26.PG_PRIMARY_KEY>, typeof _alepha_postgres26.PG_DEFAULT>;
17
+ version: _alepha_postgres_src_helpers_pgAttr0.PgAttr<_alepha_postgres_src_helpers_pgAttr0.PgAttr<typebox68.TInteger, typeof _alepha_postgres26.PG_VERSION>, typeof _alepha_postgres26.PG_DEFAULT>;
18
+ createdAt: _alepha_postgres_src_helpers_pgAttr0.PgAttr<_alepha_postgres_src_helpers_pgAttr0.PgAttr<typebox68.TString, typeof _alepha_postgres26.PG_CREATED_AT>, typeof _alepha_postgres26.PG_DEFAULT>;
19
+ updatedAt: _alepha_postgres_src_helpers_pgAttr0.PgAttr<_alepha_postgres_src_helpers_pgAttr0.PgAttr<typebox68.TString, typeof _alepha_postgres26.PG_UPDATED_AT>, typeof _alepha_postgres26.PG_DEFAULT>;
20
+ blobId: typebox68.TString;
21
+ creator: typebox68.TOptional<typebox68.TString>;
22
+ creatorRealm: typebox68.TOptional<typebox68.TString>;
23
+ creatorName: typebox68.TOptional<typebox68.TString>;
24
+ container: typebox68.TString;
25
+ expirationDate: typebox68.TOptional<typebox68.TString>;
26
+ name: typebox68.TString;
27
+ size: typebox68.TNumber;
28
+ mimeType: typebox68.TString;
29
+ tags: typebox68.TOptional<typebox68.TArray<typebox68.TString>>;
30
+ checksum: typebox68.TOptional<typebox68.TString>;
31
+ }>, _alepha_postgres26.FromSchema<typebox68.TObject<{
32
+ id: _alepha_postgres_src_helpers_pgAttr0.PgAttr<_alepha_postgres_src_helpers_pgAttr0.PgAttr<typebox68.TString, typeof _alepha_postgres26.PG_PRIMARY_KEY>, typeof _alepha_postgres26.PG_DEFAULT>;
33
+ version: _alepha_postgres_src_helpers_pgAttr0.PgAttr<_alepha_postgres_src_helpers_pgAttr0.PgAttr<typebox68.TInteger, typeof _alepha_postgres26.PG_VERSION>, typeof _alepha_postgres26.PG_DEFAULT>;
34
+ createdAt: _alepha_postgres_src_helpers_pgAttr0.PgAttr<_alepha_postgres_src_helpers_pgAttr0.PgAttr<typebox68.TString, typeof _alepha_postgres26.PG_CREATED_AT>, typeof _alepha_postgres26.PG_DEFAULT>;
35
+ updatedAt: _alepha_postgres_src_helpers_pgAttr0.PgAttr<_alepha_postgres_src_helpers_pgAttr0.PgAttr<typebox68.TString, typeof _alepha_postgres26.PG_UPDATED_AT>, typeof _alepha_postgres26.PG_DEFAULT>;
36
+ blobId: typebox68.TString;
37
+ creator: typebox68.TOptional<typebox68.TString>;
38
+ creatorRealm: typebox68.TOptional<typebox68.TString>;
39
+ creatorName: typebox68.TOptional<typebox68.TString>;
40
+ container: typebox68.TString;
41
+ expirationDate: typebox68.TOptional<typebox68.TString>;
42
+ name: typebox68.TString;
43
+ size: typebox68.TNumber;
44
+ mimeType: typebox68.TString;
45
+ tags: typebox68.TOptional<typebox68.TArray<typebox68.TString>>;
46
+ checksum: typebox68.TOptional<typebox68.TString>;
47
+ }>>>, typebox68.TObject<{
48
+ id: _alepha_postgres_src_helpers_pgAttr0.PgAttr<_alepha_postgres_src_helpers_pgAttr0.PgAttr<typebox68.TString, typeof _alepha_postgres26.PG_PRIMARY_KEY>, typeof _alepha_postgres26.PG_DEFAULT>;
49
+ version: _alepha_postgres_src_helpers_pgAttr0.PgAttr<_alepha_postgres_src_helpers_pgAttr0.PgAttr<typebox68.TInteger, typeof _alepha_postgres26.PG_VERSION>, typeof _alepha_postgres26.PG_DEFAULT>;
50
+ createdAt: _alepha_postgres_src_helpers_pgAttr0.PgAttr<_alepha_postgres_src_helpers_pgAttr0.PgAttr<typebox68.TString, typeof _alepha_postgres26.PG_CREATED_AT>, typeof _alepha_postgres26.PG_DEFAULT>;
51
+ updatedAt: _alepha_postgres_src_helpers_pgAttr0.PgAttr<_alepha_postgres_src_helpers_pgAttr0.PgAttr<typebox68.TString, typeof _alepha_postgres26.PG_UPDATED_AT>, typeof _alepha_postgres26.PG_DEFAULT>;
52
+ blobId: typebox68.TString;
53
+ creator: typebox68.TOptional<typebox68.TString>;
54
+ creatorRealm: typebox68.TOptional<typebox68.TString>;
55
+ creatorName: typebox68.TOptional<typebox68.TString>;
56
+ container: typebox68.TString;
57
+ expirationDate: typebox68.TOptional<typebox68.TString>;
58
+ name: typebox68.TString;
59
+ size: typebox68.TNumber;
60
+ mimeType: typebox68.TString;
61
+ tags: typebox68.TOptional<typebox68.TArray<typebox68.TString>>;
62
+ checksum: typebox68.TOptional<typebox68.TString>;
63
+ }>>;
64
+ type FileEntity = Static<typeof files.$schema>;
65
+ //#endregion
66
+ //#region src/schemas/fileQuerySchema.d.ts
67
+ declare const fileQuerySchema: typebox68.TObject<{
68
+ page: typebox68.TOptional<typebox68.TInteger>;
69
+ size: typebox68.TOptional<typebox68.TInteger>;
70
+ sort: typebox68.TOptional<typebox68.TString>;
71
+ container: typebox68.TOptional<typebox68.TString>;
72
+ tags: typebox68.TOptional<typebox68.TArray<typebox68.TString>>;
73
+ }>;
74
+ type FileQuery = Static<typeof fileQuerySchema>;
75
+ //#endregion
76
+ //#region src/schemas/fileResourceSchema.d.ts
77
+ declare const fileResourceSchema: typebox68.TObject<{
78
+ id: _alepha_postgres_src_helpers_pgAttr_ts23.PgAttr<_alepha_postgres_src_helpers_pgAttr_ts23.PgAttr<typebox68.TString, typeof _alepha_postgres26.PG_PRIMARY_KEY>, typeof _alepha_postgres26.PG_DEFAULT>;
79
+ version: _alepha_postgres_src_helpers_pgAttr_ts23.PgAttr<_alepha_postgres_src_helpers_pgAttr_ts23.PgAttr<typebox68.TInteger, typeof _alepha_postgres26.PG_VERSION>, typeof _alepha_postgres26.PG_DEFAULT>;
80
+ createdAt: _alepha_postgres_src_helpers_pgAttr_ts23.PgAttr<_alepha_postgres_src_helpers_pgAttr_ts23.PgAttr<typebox68.TString, typeof _alepha_postgres26.PG_CREATED_AT>, typeof _alepha_postgres26.PG_DEFAULT>;
81
+ updatedAt: _alepha_postgres_src_helpers_pgAttr_ts23.PgAttr<_alepha_postgres_src_helpers_pgAttr_ts23.PgAttr<typebox68.TString, typeof _alepha_postgres26.PG_UPDATED_AT>, typeof _alepha_postgres26.PG_DEFAULT>;
82
+ blobId: typebox68.TString;
83
+ creator: typebox68.TOptional<typebox68.TString>;
84
+ creatorRealm: typebox68.TOptional<typebox68.TString>;
85
+ creatorName: typebox68.TOptional<typebox68.TString>;
86
+ container: typebox68.TString;
87
+ expirationDate: typebox68.TOptional<typebox68.TString>;
88
+ name: typebox68.TString;
89
+ size: typebox68.TNumber;
90
+ mimeType: typebox68.TString;
91
+ tags: typebox68.TOptional<typebox68.TArray<typebox68.TString>>;
92
+ checksum: typebox68.TOptional<typebox68.TString>;
93
+ }>;
94
+ type FileResource = Static<typeof fileResourceSchema>;
95
+ //#endregion
96
+ //#region src/services/FileService.d.ts
97
+ declare class FileService {
98
+ protected readonly alepha: Alepha;
99
+ protected readonly log: _alepha_logger0.Logger;
100
+ protected readonly fileRepository: _alepha_postgres26.RepositoryDescriptor<_alepha_postgres26.PgTableConfig<"files", typebox68.TObject<{
101
+ id: _alepha_postgres_src_helpers_pgAttr_ts23.PgAttr<_alepha_postgres_src_helpers_pgAttr_ts23.PgAttr<typebox68.TString, typeof _alepha_postgres26.PG_PRIMARY_KEY>, typeof _alepha_postgres26.PG_DEFAULT>;
102
+ version: _alepha_postgres_src_helpers_pgAttr_ts23.PgAttr<_alepha_postgres_src_helpers_pgAttr_ts23.PgAttr<typebox68.TInteger, typeof _alepha_postgres26.PG_VERSION>, typeof _alepha_postgres26.PG_DEFAULT>;
103
+ createdAt: _alepha_postgres_src_helpers_pgAttr_ts23.PgAttr<_alepha_postgres_src_helpers_pgAttr_ts23.PgAttr<typebox68.TString, typeof _alepha_postgres26.PG_CREATED_AT>, typeof _alepha_postgres26.PG_DEFAULT>;
104
+ updatedAt: _alepha_postgres_src_helpers_pgAttr_ts23.PgAttr<_alepha_postgres_src_helpers_pgAttr_ts23.PgAttr<typebox68.TString, typeof _alepha_postgres26.PG_UPDATED_AT>, typeof _alepha_postgres26.PG_DEFAULT>;
105
+ blobId: typebox68.TString;
106
+ creator: typebox68.TOptional<typebox68.TString>;
107
+ creatorRealm: typebox68.TOptional<typebox68.TString>;
108
+ creatorName: typebox68.TOptional<typebox68.TString>;
109
+ container: typebox68.TString;
110
+ expirationDate: typebox68.TOptional<typebox68.TString>;
111
+ name: typebox68.TString;
112
+ size: typebox68.TNumber;
113
+ mimeType: typebox68.TString;
114
+ tags: typebox68.TOptional<typebox68.TArray<typebox68.TString>>;
115
+ checksum: typebox68.TOptional<typebox68.TString>;
116
+ }>, _alepha_postgres26.FromSchema<typebox68.TObject<{
117
+ id: _alepha_postgres_src_helpers_pgAttr_ts23.PgAttr<_alepha_postgres_src_helpers_pgAttr_ts23.PgAttr<typebox68.TString, typeof _alepha_postgres26.PG_PRIMARY_KEY>, typeof _alepha_postgres26.PG_DEFAULT>;
118
+ version: _alepha_postgres_src_helpers_pgAttr_ts23.PgAttr<_alepha_postgres_src_helpers_pgAttr_ts23.PgAttr<typebox68.TInteger, typeof _alepha_postgres26.PG_VERSION>, typeof _alepha_postgres26.PG_DEFAULT>;
119
+ createdAt: _alepha_postgres_src_helpers_pgAttr_ts23.PgAttr<_alepha_postgres_src_helpers_pgAttr_ts23.PgAttr<typebox68.TString, typeof _alepha_postgres26.PG_CREATED_AT>, typeof _alepha_postgres26.PG_DEFAULT>;
120
+ updatedAt: _alepha_postgres_src_helpers_pgAttr_ts23.PgAttr<_alepha_postgres_src_helpers_pgAttr_ts23.PgAttr<typebox68.TString, typeof _alepha_postgres26.PG_UPDATED_AT>, typeof _alepha_postgres26.PG_DEFAULT>;
121
+ blobId: typebox68.TString;
122
+ creator: typebox68.TOptional<typebox68.TString>;
123
+ creatorRealm: typebox68.TOptional<typebox68.TString>;
124
+ creatorName: typebox68.TOptional<typebox68.TString>;
125
+ container: typebox68.TString;
126
+ expirationDate: typebox68.TOptional<typebox68.TString>;
127
+ name: typebox68.TString;
128
+ size: typebox68.TNumber;
129
+ mimeType: typebox68.TString;
130
+ tags: typebox68.TOptional<typebox68.TArray<typebox68.TString>>;
131
+ checksum: typebox68.TOptional<typebox68.TString>;
132
+ }>>>, typebox68.TObject<{
133
+ id: _alepha_postgres_src_helpers_pgAttr_ts23.PgAttr<_alepha_postgres_src_helpers_pgAttr_ts23.PgAttr<typebox68.TString, typeof _alepha_postgres26.PG_PRIMARY_KEY>, typeof _alepha_postgres26.PG_DEFAULT>;
134
+ version: _alepha_postgres_src_helpers_pgAttr_ts23.PgAttr<_alepha_postgres_src_helpers_pgAttr_ts23.PgAttr<typebox68.TInteger, typeof _alepha_postgres26.PG_VERSION>, typeof _alepha_postgres26.PG_DEFAULT>;
135
+ createdAt: _alepha_postgres_src_helpers_pgAttr_ts23.PgAttr<_alepha_postgres_src_helpers_pgAttr_ts23.PgAttr<typebox68.TString, typeof _alepha_postgres26.PG_CREATED_AT>, typeof _alepha_postgres26.PG_DEFAULT>;
136
+ updatedAt: _alepha_postgres_src_helpers_pgAttr_ts23.PgAttr<_alepha_postgres_src_helpers_pgAttr_ts23.PgAttr<typebox68.TString, typeof _alepha_postgres26.PG_UPDATED_AT>, typeof _alepha_postgres26.PG_DEFAULT>;
137
+ blobId: typebox68.TString;
138
+ creator: typebox68.TOptional<typebox68.TString>;
139
+ creatorRealm: typebox68.TOptional<typebox68.TString>;
140
+ creatorName: typebox68.TOptional<typebox68.TString>;
141
+ container: typebox68.TString;
142
+ expirationDate: typebox68.TOptional<typebox68.TString>;
143
+ name: typebox68.TString;
144
+ size: typebox68.TNumber;
145
+ mimeType: typebox68.TString;
146
+ tags: typebox68.TOptional<typebox68.TArray<typebox68.TString>>;
147
+ checksum: typebox68.TOptional<typebox68.TString>;
148
+ }>>;
149
+ protected readonly dateTimeProvider: DateTimeProvider;
150
+ protected readonly defaultBucket: BucketDescriptor;
151
+ protected onUploadFile: _alepha_core1.HookDescriptor<"bucket:file:uploaded">;
152
+ protected onDeleteBucketFile: _alepha_core1.HookDescriptor<"bucket:file:deleted">;
153
+ storage(storageName?: string): BucketDescriptor;
154
+ findFiles(q?: FileQuery): Promise<Page<FileEntity>>;
155
+ findExpiredFiles(): Promise<FileEntity[]>;
156
+ protected getExpirationDate(ttl?: DurationLike): string | undefined;
157
+ uploadFile(file: FileLike, options?: {
158
+ expirationDate?: string | Date;
159
+ container?: string;
160
+ user?: UserAccountToken;
161
+ tags?: string[];
162
+ }): Promise<FileEntity>;
163
+ streamFile(id: string): Promise<FileLike>;
164
+ deleteFile(id: string): Promise<Ok>;
165
+ getFileById(id: string | FileEntity): Promise<FileEntity>;
166
+ entityToResource(entity: FileEntity): FileResource;
167
+ }
168
+ //#endregion
169
+ //#region src/index.d.ts
170
+ declare module "alepha/bucket" {
171
+ interface BucketFileOptions {
172
+ /**
173
+ * Time to live for the files in the bucket.
174
+ */
175
+ ttl?: DurationLike;
176
+ /**
177
+ * Tags for the bucket.
178
+ */
179
+ tags?: string[];
180
+ /**
181
+ * User performing the operation.
182
+ */
183
+ user?: UserAccountToken;
184
+ /**
185
+ * Whether to persist the file metadata in the database.
186
+ *
187
+ * @default true
188
+ */
189
+ persist?: boolean;
190
+ }
191
+ }
192
+ /**
193
+ * Provides file management API endpoints for Alepha applications.
194
+ *
195
+ * This module includes file upload, download, storage management,
196
+ * and file metadata operations.
197
+ *
198
+ * @module alepha.api.files
199
+ */
200
+ declare const AlephaApiFiles: _alepha_core1.Service<_alepha_core1.Module<{}>>;
201
+ //#endregion
202
+ export { AlephaApiFiles, FileEntity, FileService, files };
203
+ //# 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,276 @@
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 typebox76 from "typebox";
9
+ import * as _alepha_postgres_src_helpers_pgAttr_ts0 from "alepha/postgres/src/helpers/pgAttr.ts";
10
+ import * as _alepha_postgres_src_helpers_pgAttr0 from "alepha/postgres/src/helpers/pgAttr";
11
+
12
+ //#region src/schemas/jobExecutionQuerySchema.d.ts
13
+ declare const jobExecutionQuerySchema: typebox76.TObject<{
14
+ page: typebox76.TOptional<typebox76.TInteger>;
15
+ size: typebox76.TOptional<typebox76.TInteger>;
16
+ sort: typebox76.TOptional<typebox76.TString>;
17
+ status: typebox76.TOptional<typebox76.TUnsafe<"STARTED" | "FAILED" | "COMPLETED">>;
18
+ job: typebox76.TOptional<typebox76.TString>;
19
+ }>;
20
+ type JobExecutionQuery = Static<typeof jobExecutionQuerySchema>;
21
+ //#endregion
22
+ //#region src/services/JobService.d.ts
23
+ declare class JobService {
24
+ protected readonly alepha: Alepha;
25
+ protected readonly executionRepository: _alepha_postgres0.RepositoryDescriptor<_alepha_postgres0.PgTableConfig<"job_executions", typebox76.TObject<{
26
+ id: _alepha_postgres_src_helpers_pgAttr_ts0.PgAttr<_alepha_postgres_src_helpers_pgAttr_ts0.PgAttr<typebox76.TString, typeof _alepha_postgres0.PG_PRIMARY_KEY>, typeof _alepha_postgres0.PG_DEFAULT>;
27
+ version: _alepha_postgres_src_helpers_pgAttr_ts0.PgAttr<_alepha_postgres_src_helpers_pgAttr_ts0.PgAttr<typebox76.TInteger, typeof _alepha_postgres0.PG_VERSION>, typeof _alepha_postgres0.PG_DEFAULT>;
28
+ createdAt: _alepha_postgres_src_helpers_pgAttr_ts0.PgAttr<_alepha_postgres_src_helpers_pgAttr_ts0.PgAttr<typebox76.TString, typeof _alepha_postgres0.PG_CREATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
29
+ updatedAt: _alepha_postgres_src_helpers_pgAttr_ts0.PgAttr<_alepha_postgres_src_helpers_pgAttr_ts0.PgAttr<typebox76.TString, typeof _alepha_postgres0.PG_UPDATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
30
+ finishedAt: typebox76.TOptional<typebox76.TString>;
31
+ job: typebox76.TString;
32
+ status: typebox76.TUnsafe<"STARTED" | "FAILED" | "COMPLETED">;
33
+ error: typebox76.TOptional<typebox76.TString>;
34
+ logs: typebox76.TOptional<typebox76.TArray<typebox76.TObject<{
35
+ level: typebox76.TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
36
+ message: typebox76.TString;
37
+ service: typebox76.TString;
38
+ module: typebox76.TString;
39
+ context: typebox76.TOptional<typebox76.TString>;
40
+ app: typebox76.TOptional<typebox76.TString>;
41
+ data: typebox76.TOptional<typebox76.TAny>;
42
+ timestamp: typebox76.TString;
43
+ }>>>;
44
+ }>, _alepha_postgres0.FromSchema<typebox76.TObject<{
45
+ id: _alepha_postgres_src_helpers_pgAttr_ts0.PgAttr<_alepha_postgres_src_helpers_pgAttr_ts0.PgAttr<typebox76.TString, typeof _alepha_postgres0.PG_PRIMARY_KEY>, typeof _alepha_postgres0.PG_DEFAULT>;
46
+ version: _alepha_postgres_src_helpers_pgAttr_ts0.PgAttr<_alepha_postgres_src_helpers_pgAttr_ts0.PgAttr<typebox76.TInteger, typeof _alepha_postgres0.PG_VERSION>, typeof _alepha_postgres0.PG_DEFAULT>;
47
+ createdAt: _alepha_postgres_src_helpers_pgAttr_ts0.PgAttr<_alepha_postgres_src_helpers_pgAttr_ts0.PgAttr<typebox76.TString, typeof _alepha_postgres0.PG_CREATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
48
+ updatedAt: _alepha_postgres_src_helpers_pgAttr_ts0.PgAttr<_alepha_postgres_src_helpers_pgAttr_ts0.PgAttr<typebox76.TString, typeof _alepha_postgres0.PG_UPDATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
49
+ finishedAt: typebox76.TOptional<typebox76.TString>;
50
+ job: typebox76.TString;
51
+ status: typebox76.TUnsafe<"STARTED" | "FAILED" | "COMPLETED">;
52
+ error: typebox76.TOptional<typebox76.TString>;
53
+ logs: typebox76.TOptional<typebox76.TArray<typebox76.TObject<{
54
+ level: typebox76.TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
55
+ message: typebox76.TString;
56
+ service: typebox76.TString;
57
+ module: typebox76.TString;
58
+ context: typebox76.TOptional<typebox76.TString>;
59
+ app: typebox76.TOptional<typebox76.TString>;
60
+ data: typebox76.TOptional<typebox76.TAny>;
61
+ timestamp: typebox76.TString;
62
+ }>>>;
63
+ }>>>, typebox76.TObject<{
64
+ id: _alepha_postgres_src_helpers_pgAttr_ts0.PgAttr<_alepha_postgres_src_helpers_pgAttr_ts0.PgAttr<typebox76.TString, typeof _alepha_postgres0.PG_PRIMARY_KEY>, typeof _alepha_postgres0.PG_DEFAULT>;
65
+ version: _alepha_postgres_src_helpers_pgAttr_ts0.PgAttr<_alepha_postgres_src_helpers_pgAttr_ts0.PgAttr<typebox76.TInteger, typeof _alepha_postgres0.PG_VERSION>, typeof _alepha_postgres0.PG_DEFAULT>;
66
+ createdAt: _alepha_postgres_src_helpers_pgAttr_ts0.PgAttr<_alepha_postgres_src_helpers_pgAttr_ts0.PgAttr<typebox76.TString, typeof _alepha_postgres0.PG_CREATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
67
+ updatedAt: _alepha_postgres_src_helpers_pgAttr_ts0.PgAttr<_alepha_postgres_src_helpers_pgAttr_ts0.PgAttr<typebox76.TString, typeof _alepha_postgres0.PG_UPDATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
68
+ finishedAt: typebox76.TOptional<typebox76.TString>;
69
+ job: typebox76.TString;
70
+ status: typebox76.TUnsafe<"STARTED" | "FAILED" | "COMPLETED">;
71
+ error: typebox76.TOptional<typebox76.TString>;
72
+ logs: typebox76.TOptional<typebox76.TArray<typebox76.TObject<{
73
+ level: typebox76.TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
74
+ message: typebox76.TString;
75
+ service: typebox76.TString;
76
+ module: typebox76.TString;
77
+ context: typebox76.TOptional<typebox76.TString>;
78
+ app: typebox76.TOptional<typebox76.TString>;
79
+ data: typebox76.TOptional<typebox76.TAny>;
80
+ timestamp: typebox76.TString;
81
+ }>>>;
82
+ }>>;
83
+ protected readonly dtp: DateTimeProvider;
84
+ protected readonly logs: Map<string, {
85
+ context?: string | undefined;
86
+ app?: string | undefined;
87
+ data?: any;
88
+ level: "SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR";
89
+ message: string;
90
+ service: string;
91
+ module: string;
92
+ timestamp: string;
93
+ }[]>;
94
+ protected readonly onLogs: _alepha_core1.HookDescriptor<"log">;
95
+ protected readonly onSchedulerBegin: _alepha_core1.HookDescriptor<"scheduler:begin">;
96
+ protected readonly onSchedulerError: _alepha_core1.HookDescriptor<"scheduler:error">;
97
+ readonly onSchedulerSuccess: _alepha_core1.HookDescriptor<"scheduler:success">;
98
+ readonly onSchedulerEnd: _alepha_core1.HookDescriptor<"scheduler:end">;
99
+ getJobs(): Promise<string[]>;
100
+ getJobExecutions(query?: JobExecutionQuery): Promise<_alepha_postgres0.Page<{
101
+ finishedAt?: string | undefined;
102
+ error?: string | undefined;
103
+ logs?: {
104
+ context?: string | undefined;
105
+ app?: string | undefined;
106
+ data?: any;
107
+ level: "SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR";
108
+ message: string;
109
+ service: string;
110
+ module: string;
111
+ timestamp: string;
112
+ }[] | undefined;
113
+ id: string;
114
+ version: number;
115
+ createdAt: string;
116
+ updatedAt: string;
117
+ job: string;
118
+ status: "STARTED" | "FAILED" | "COMPLETED";
119
+ }>>;
120
+ triggerJob(name: string): Promise<{
121
+ ok: boolean;
122
+ }>;
123
+ }
124
+ //#endregion
125
+ //#region src/controllers/JobController.d.ts
126
+ declare class JobController {
127
+ protected readonly url = "/jobs";
128
+ protected readonly group = "jobs";
129
+ protected readonly jobService: JobService;
130
+ readonly getJobs: _alepha_server0.ActionDescriptorFn<{
131
+ response: typebox76.TArray<typebox76.TString>;
132
+ }>;
133
+ readonly getJobExecutions: _alepha_server0.ActionDescriptorFn<{
134
+ query: typebox76.TObject<{
135
+ page: typebox76.TOptional<typebox76.TInteger>;
136
+ size: typebox76.TOptional<typebox76.TInteger>;
137
+ sort: typebox76.TOptional<typebox76.TString>;
138
+ status: typebox76.TOptional<typebox76.TUnsafe<"STARTED" | "FAILED" | "COMPLETED">>;
139
+ job: typebox76.TOptional<typebox76.TString>;
140
+ }>;
141
+ response: _alepha_postgres0.TPage<typebox76.TObject<{
142
+ id: _alepha_postgres_src_helpers_pgAttr_ts0.PgAttr<_alepha_postgres_src_helpers_pgAttr_ts0.PgAttr<typebox76.TString, typeof _alepha_postgres0.PG_PRIMARY_KEY>, typeof _alepha_postgres0.PG_DEFAULT>;
143
+ version: _alepha_postgres_src_helpers_pgAttr_ts0.PgAttr<_alepha_postgres_src_helpers_pgAttr_ts0.PgAttr<typebox76.TInteger, typeof _alepha_postgres0.PG_VERSION>, typeof _alepha_postgres0.PG_DEFAULT>;
144
+ createdAt: _alepha_postgres_src_helpers_pgAttr_ts0.PgAttr<_alepha_postgres_src_helpers_pgAttr_ts0.PgAttr<typebox76.TString, typeof _alepha_postgres0.PG_CREATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
145
+ updatedAt: _alepha_postgres_src_helpers_pgAttr_ts0.PgAttr<_alepha_postgres_src_helpers_pgAttr_ts0.PgAttr<typebox76.TString, typeof _alepha_postgres0.PG_UPDATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
146
+ finishedAt: typebox76.TOptional<typebox76.TString>;
147
+ job: typebox76.TString;
148
+ status: typebox76.TUnsafe<"STARTED" | "FAILED" | "COMPLETED">;
149
+ error: typebox76.TOptional<typebox76.TString>;
150
+ logs: typebox76.TOptional<typebox76.TArray<typebox76.TObject<{
151
+ level: typebox76.TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
152
+ message: typebox76.TString;
153
+ service: typebox76.TString;
154
+ module: typebox76.TString;
155
+ context: typebox76.TOptional<typebox76.TString>;
156
+ app: typebox76.TOptional<typebox76.TString>;
157
+ data: typebox76.TOptional<typebox76.TAny>;
158
+ timestamp: typebox76.TString;
159
+ }>>>;
160
+ }>>;
161
+ }>;
162
+ readonly triggerJob: _alepha_server0.ActionDescriptorFn<{
163
+ body: typebox76.TObject<{
164
+ name: typebox76.TString;
165
+ }>;
166
+ response: typebox76.TObject<{
167
+ ok: typebox76.TBoolean;
168
+ id: typebox76.TOptional<typebox76.TUnion<[typebox76.TString, typebox76.TInteger]>>;
169
+ count: typebox76.TOptional<typebox76.TNumber>;
170
+ }>;
171
+ }>;
172
+ }
173
+ //#endregion
174
+ //#region src/entities/jobExecutions.d.ts
175
+ declare const jobExecutions: _alepha_postgres0.PgTableWithColumnsAndSchema<_alepha_postgres0.PgTableConfig<"job_executions", typebox76.TObject<{
176
+ id: _alepha_postgres_src_helpers_pgAttr0.PgAttr<_alepha_postgres_src_helpers_pgAttr0.PgAttr<typebox76.TString, typeof _alepha_postgres0.PG_PRIMARY_KEY>, typeof _alepha_postgres0.PG_DEFAULT>;
177
+ version: _alepha_postgres_src_helpers_pgAttr0.PgAttr<_alepha_postgres_src_helpers_pgAttr0.PgAttr<typebox76.TInteger, typeof _alepha_postgres0.PG_VERSION>, typeof _alepha_postgres0.PG_DEFAULT>;
178
+ createdAt: _alepha_postgres_src_helpers_pgAttr0.PgAttr<_alepha_postgres_src_helpers_pgAttr0.PgAttr<typebox76.TString, typeof _alepha_postgres0.PG_CREATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
179
+ updatedAt: _alepha_postgres_src_helpers_pgAttr0.PgAttr<_alepha_postgres_src_helpers_pgAttr0.PgAttr<typebox76.TString, typeof _alepha_postgres0.PG_UPDATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
180
+ finishedAt: typebox76.TOptional<typebox76.TString>;
181
+ job: typebox76.TString;
182
+ status: typebox76.TUnsafe<"STARTED" | "FAILED" | "COMPLETED">;
183
+ error: typebox76.TOptional<typebox76.TString>;
184
+ logs: typebox76.TOptional<typebox76.TArray<typebox76.TObject<{
185
+ level: typebox76.TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
186
+ message: typebox76.TString;
187
+ service: typebox76.TString;
188
+ module: typebox76.TString;
189
+ context: typebox76.TOptional<typebox76.TString>;
190
+ app: typebox76.TOptional<typebox76.TString>;
191
+ data: typebox76.TOptional<typebox76.TAny>;
192
+ timestamp: typebox76.TString;
193
+ }>>>;
194
+ }>, _alepha_postgres0.FromSchema<typebox76.TObject<{
195
+ id: _alepha_postgres_src_helpers_pgAttr0.PgAttr<_alepha_postgres_src_helpers_pgAttr0.PgAttr<typebox76.TString, typeof _alepha_postgres0.PG_PRIMARY_KEY>, typeof _alepha_postgres0.PG_DEFAULT>;
196
+ version: _alepha_postgres_src_helpers_pgAttr0.PgAttr<_alepha_postgres_src_helpers_pgAttr0.PgAttr<typebox76.TInteger, typeof _alepha_postgres0.PG_VERSION>, typeof _alepha_postgres0.PG_DEFAULT>;
197
+ createdAt: _alepha_postgres_src_helpers_pgAttr0.PgAttr<_alepha_postgres_src_helpers_pgAttr0.PgAttr<typebox76.TString, typeof _alepha_postgres0.PG_CREATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
198
+ updatedAt: _alepha_postgres_src_helpers_pgAttr0.PgAttr<_alepha_postgres_src_helpers_pgAttr0.PgAttr<typebox76.TString, typeof _alepha_postgres0.PG_UPDATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
199
+ finishedAt: typebox76.TOptional<typebox76.TString>;
200
+ job: typebox76.TString;
201
+ status: typebox76.TUnsafe<"STARTED" | "FAILED" | "COMPLETED">;
202
+ error: typebox76.TOptional<typebox76.TString>;
203
+ logs: typebox76.TOptional<typebox76.TArray<typebox76.TObject<{
204
+ level: typebox76.TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
205
+ message: typebox76.TString;
206
+ service: typebox76.TString;
207
+ module: typebox76.TString;
208
+ context: typebox76.TOptional<typebox76.TString>;
209
+ app: typebox76.TOptional<typebox76.TString>;
210
+ data: typebox76.TOptional<typebox76.TAny>;
211
+ timestamp: typebox76.TString;
212
+ }>>>;
213
+ }>>>, typebox76.TObject<{
214
+ id: _alepha_postgres_src_helpers_pgAttr0.PgAttr<_alepha_postgres_src_helpers_pgAttr0.PgAttr<typebox76.TString, typeof _alepha_postgres0.PG_PRIMARY_KEY>, typeof _alepha_postgres0.PG_DEFAULT>;
215
+ version: _alepha_postgres_src_helpers_pgAttr0.PgAttr<_alepha_postgres_src_helpers_pgAttr0.PgAttr<typebox76.TInteger, typeof _alepha_postgres0.PG_VERSION>, typeof _alepha_postgres0.PG_DEFAULT>;
216
+ createdAt: _alepha_postgres_src_helpers_pgAttr0.PgAttr<_alepha_postgres_src_helpers_pgAttr0.PgAttr<typebox76.TString, typeof _alepha_postgres0.PG_CREATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
217
+ updatedAt: _alepha_postgres_src_helpers_pgAttr0.PgAttr<_alepha_postgres_src_helpers_pgAttr0.PgAttr<typebox76.TString, typeof _alepha_postgres0.PG_UPDATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
218
+ finishedAt: typebox76.TOptional<typebox76.TString>;
219
+ job: typebox76.TString;
220
+ status: typebox76.TUnsafe<"STARTED" | "FAILED" | "COMPLETED">;
221
+ error: typebox76.TOptional<typebox76.TString>;
222
+ logs: typebox76.TOptional<typebox76.TArray<typebox76.TObject<{
223
+ level: typebox76.TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
224
+ message: typebox76.TString;
225
+ service: typebox76.TString;
226
+ module: typebox76.TString;
227
+ context: typebox76.TOptional<typebox76.TString>;
228
+ app: typebox76.TOptional<typebox76.TString>;
229
+ data: typebox76.TOptional<typebox76.TAny>;
230
+ timestamp: typebox76.TString;
231
+ }>>>;
232
+ }>>;
233
+ type JobExecutionEntity = Static<typeof jobExecutions.$schema>;
234
+ //#endregion
235
+ //#region src/schemas/jobExecutionResourceSchema.d.ts
236
+ declare const jobExecutionResourceSchema: typebox76.TObject<{
237
+ id: _alepha_postgres_src_helpers_pgAttr_ts0.PgAttr<_alepha_postgres_src_helpers_pgAttr_ts0.PgAttr<typebox76.TString, typeof _alepha_postgres0.PG_PRIMARY_KEY>, typeof _alepha_postgres0.PG_DEFAULT>;
238
+ version: _alepha_postgres_src_helpers_pgAttr_ts0.PgAttr<_alepha_postgres_src_helpers_pgAttr_ts0.PgAttr<typebox76.TInteger, typeof _alepha_postgres0.PG_VERSION>, typeof _alepha_postgres0.PG_DEFAULT>;
239
+ createdAt: _alepha_postgres_src_helpers_pgAttr_ts0.PgAttr<_alepha_postgres_src_helpers_pgAttr_ts0.PgAttr<typebox76.TString, typeof _alepha_postgres0.PG_CREATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
240
+ updatedAt: _alepha_postgres_src_helpers_pgAttr_ts0.PgAttr<_alepha_postgres_src_helpers_pgAttr_ts0.PgAttr<typebox76.TString, typeof _alepha_postgres0.PG_UPDATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
241
+ finishedAt: typebox76.TOptional<typebox76.TString>;
242
+ job: typebox76.TString;
243
+ status: typebox76.TUnsafe<"STARTED" | "FAILED" | "COMPLETED">;
244
+ error: typebox76.TOptional<typebox76.TString>;
245
+ logs: typebox76.TOptional<typebox76.TArray<typebox76.TObject<{
246
+ level: typebox76.TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
247
+ message: typebox76.TString;
248
+ service: typebox76.TString;
249
+ module: typebox76.TString;
250
+ context: typebox76.TOptional<typebox76.TString>;
251
+ app: typebox76.TOptional<typebox76.TString>;
252
+ data: typebox76.TOptional<typebox76.TAny>;
253
+ timestamp: typebox76.TString;
254
+ }>>>;
255
+ }>;
256
+ type JobExecutionResource = Static<typeof jobExecutionResourceSchema>;
257
+ //#endregion
258
+ //#region src/schemas/triggerJobSchema.d.ts
259
+ declare const triggerJobSchema: typebox76.TObject<{
260
+ name: typebox76.TString;
261
+ }>;
262
+ type TriggerJob = Static<typeof triggerJobSchema>;
263
+ //#endregion
264
+ //#region src/index.d.ts
265
+ /**
266
+ * Provides job management API endpoints for Alepha applications.
267
+ *
268
+ * This module includes job queue operations, job status monitoring,
269
+ * and background task management capabilities.
270
+ *
271
+ * @module alepha.api.jobs
272
+ */
273
+ declare const AlephaApiJobs: _alepha_core1.Service<_alepha_core1.Module<{}>>;
274
+ //#endregion
275
+ export { AlephaApiJobs, JobController, JobExecutionEntity, JobExecutionQuery, JobExecutionResource, JobService, TriggerJob, jobExecutionQuerySchema, jobExecutionResourceSchema, jobExecutions, triggerJobSchema };
276
+ //# 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
+ });