alepha 0.13.4 → 0.13.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/dist/api-files/index.browser.js +5 -5
- package/dist/api-files/index.d.ts +191 -191
- package/dist/api-files/index.js +9 -9
- package/dist/api-jobs/index.browser.js +5 -5
- package/dist/api-jobs/index.d.ts +173 -173
- package/dist/api-jobs/index.js +9 -9
- package/dist/api-notifications/index.browser.js +11 -11
- package/dist/api-notifications/index.d.ts +11 -11
- package/dist/api-notifications/index.js +11 -11
- package/dist/api-parameters/index.browser.js +2 -2
- package/dist/api-parameters/index.d.ts +3 -3
- package/dist/api-parameters/index.js +3 -3
- package/dist/api-users/index.browser.js +6 -6
- package/dist/api-users/index.d.ts +832 -832
- package/dist/api-users/index.js +36 -36
- package/dist/api-verifications/index.browser.js +5 -5
- package/dist/api-verifications/index.d.ts +21 -21
- package/dist/api-verifications/index.js +10 -10
- package/dist/batch/index.d.ts +3 -3
- package/dist/batch/index.js +3 -3
- package/dist/bin/index.js +1 -1
- package/dist/bucket/index.d.ts +6 -6
- package/dist/bucket/index.js +7 -7
- package/dist/cache/index.d.ts +4 -4
- package/dist/cache/index.js +5 -5
- package/dist/cache-redis/index.d.ts +2 -2
- package/dist/cache-redis/index.js +2 -2
- package/dist/cli/{dist-lGnqsKpu.js → dist-BlfFtOk2.js} +16 -16
- package/dist/cli/{dist-lGnqsKpu.js.map → dist-BlfFtOk2.js.map} +1 -1
- package/dist/cli/index.d.ts +31 -75
- package/dist/cli/index.js +94 -171
- package/dist/cli/index.js.map +1 -1
- package/dist/command/index.d.ts +8 -8
- package/dist/command/index.js +11 -10
- package/dist/command/index.js.map +1 -1
- package/dist/core/index.browser.js +35 -35
- package/dist/core/index.d.ts +39 -39
- package/dist/core/index.js +35 -35
- package/dist/core/index.native.js +35 -35
- package/dist/datetime/index.d.ts +3 -3
- package/dist/datetime/index.js +3 -3
- package/dist/email/index.d.ts +11 -11
- package/dist/email/index.js +42 -42
- package/dist/fake/index.d.ts +2 -2
- package/dist/fake/index.js +5 -5
- package/dist/file/index.d.ts +4 -4
- package/dist/file/index.js +4 -4
- package/dist/lock/index.d.ts +5 -5
- package/dist/lock/index.js +5 -5
- package/dist/lock-redis/index.d.ts +2 -2
- package/dist/lock-redis/index.js +2 -2
- package/dist/logger/index.d.ts +11 -11
- package/dist/logger/index.js +12 -12
- package/dist/orm/index.browser.js +12 -12
- package/dist/orm/index.d.ts +52 -52
- package/dist/orm/index.js +32 -32
- package/dist/queue/index.d.ts +7 -7
- package/dist/queue/index.js +6 -6
- package/dist/queue-redis/index.d.ts +2 -2
- package/dist/queue-redis/index.js +2 -2
- package/dist/redis/index.d.ts +3 -3
- package/dist/redis/index.js +3 -3
- package/dist/retry/index.d.ts +5 -5
- package/dist/retry/index.js +5 -5
- package/dist/router/index.d.ts +1 -1
- package/dist/router/index.js +1 -1
- package/dist/scheduler/index.d.ts +10 -10
- package/dist/scheduler/index.js +7 -7
- package/dist/security/index.browser.js +7 -7
- package/dist/security/index.d.ts +43 -43
- package/dist/security/index.js +46 -46
- package/dist/server/index.browser.js +14 -14
- package/dist/server/index.d.ts +26 -26
- package/dist/server/index.js +26 -26
- package/dist/server-auth/index.browser.js +6 -6
- package/dist/server-auth/index.d.ts +163 -163
- package/dist/server-auth/index.js +13 -13
- package/dist/server-cache/index.d.ts +2 -2
- package/dist/server-cache/index.js +2 -2
- package/dist/server-compress/index.d.ts +2 -2
- package/dist/server-compress/index.js +2 -2
- package/dist/server-cookies/index.browser.js +3 -3
- package/dist/server-cookies/index.d.ts +4 -4
- package/dist/server-cookies/index.js +4 -4
- package/dist/server-cors/index.d.ts +3 -3
- package/dist/server-cors/index.js +3 -3
- package/dist/server-health/index.d.ts +3 -3
- package/dist/server-health/index.js +3 -3
- package/dist/server-helmet/index.d.ts +2 -2
- package/dist/server-helmet/index.js +2 -2
- package/dist/server-links/index.browser.js +5 -5
- package/dist/server-links/index.d.ts +40 -40
- package/dist/server-links/index.js +7 -7
- package/dist/server-metrics/index.d.ts +2 -2
- package/dist/server-metrics/index.js +86 -86
- package/dist/server-multipart/index.d.ts +2 -2
- package/dist/server-multipart/index.js +2 -2
- package/dist/server-proxy/index.d.ts +3 -3
- package/dist/server-proxy/index.js +3 -3
- package/dist/server-rate-limit/index.d.ts +3 -3
- package/dist/server-rate-limit/index.js +3 -3
- package/dist/server-security/index.browser.js +1 -1
- package/dist/server-security/index.d.ts +13 -13
- package/dist/server-security/index.js +4 -4
- package/dist/server-static/index.d.ts +3 -3
- package/dist/server-static/index.js +3 -3
- package/dist/server-swagger/index.d.ts +3 -3
- package/dist/server-swagger/index.js +3 -3
- package/dist/sms/index.d.ts +6 -6
- package/dist/sms/index.js +6 -6
- package/dist/thread/index.d.ts +3 -3
- package/dist/thread/index.js +3 -3
- package/dist/topic/index.d.ts +6 -6
- package/dist/topic/index.js +6 -6
- package/dist/topic-redis/index.d.ts +2 -2
- package/dist/topic-redis/index.js +2 -2
- package/dist/vite/index.d.ts +17 -17
- package/dist/vite/index.js +20 -20
- package/dist/websocket/index.browser.js +9 -9
- package/dist/websocket/index.d.ts +10 -10
- package/dist/websocket/index.js +10 -10
- package/package.json +5 -4
- package/src/cli/apps/AlephaCli.ts +1 -2
- package/src/cli/commands/BiomeCommands.ts +4 -6
- package/src/cli/commands/CoreCommands.ts +2 -2
- package/src/cli/commands/DrizzleCommands.ts +76 -78
- package/src/cli/commands/VerifyCommands.ts +3 -5
- package/src/cli/commands/ViteCommands.ts +6 -8
- package/src/cli/index.ts +1 -1
- package/src/cli/services/{ProjectUtils.ts → AlephaCliUtils.ts} +101 -16
- package/src/command/providers/CliProvider.ts +12 -4
- package/src/cli/services/ProcessRunner.ts +0 -89
package/dist/api-jobs/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import { DateTimeProvider } from "alepha/datetime";
|
|
|
6
6
|
import { $lock } from "alepha/lock";
|
|
7
7
|
import { CronProvider } from "alepha/scheduler";
|
|
8
8
|
|
|
9
|
-
//#region src/api-jobs/schemas/jobExecutionQuerySchema.ts
|
|
9
|
+
//#region ../../src/api-jobs/schemas/jobExecutionQuerySchema.ts
|
|
10
10
|
const jobExecutionQuerySchema = t.extend(pageQuerySchema, {
|
|
11
11
|
status: t.optional(t.enum([
|
|
12
12
|
"STARTED",
|
|
@@ -17,7 +17,7 @@ const jobExecutionQuerySchema = t.extend(pageQuerySchema, {
|
|
|
17
17
|
});
|
|
18
18
|
|
|
19
19
|
//#endregion
|
|
20
|
-
//#region src/api-jobs/entities/jobExecutions.ts
|
|
20
|
+
//#region ../../src/api-jobs/entities/jobExecutions.ts
|
|
21
21
|
const jobExecutions = $entity({
|
|
22
22
|
name: "job_executions",
|
|
23
23
|
schema: t.object({
|
|
@@ -38,18 +38,18 @@ const jobExecutions = $entity({
|
|
|
38
38
|
});
|
|
39
39
|
|
|
40
40
|
//#endregion
|
|
41
|
-
//#region src/api-jobs/schemas/jobExecutionResourceSchema.ts
|
|
41
|
+
//#region ../../src/api-jobs/schemas/jobExecutionResourceSchema.ts
|
|
42
42
|
const jobExecutionResourceSchema = t.extend(jobExecutions.schema, {}, {
|
|
43
43
|
title: "JobExecutionResource",
|
|
44
44
|
description: "A job execution resource representing the execution details of a job."
|
|
45
45
|
});
|
|
46
46
|
|
|
47
47
|
//#endregion
|
|
48
|
-
//#region src/api-jobs/schemas/triggerJobSchema.ts
|
|
48
|
+
//#region ../../src/api-jobs/schemas/triggerJobSchema.ts
|
|
49
49
|
const triggerJobSchema = t.object({ name: t.string() });
|
|
50
50
|
|
|
51
51
|
//#endregion
|
|
52
|
-
//#region src/api-jobs/providers/JobProvider.ts
|
|
52
|
+
//#region ../../src/api-jobs/providers/JobProvider.ts
|
|
53
53
|
const envSchema = t.object({ JOB_PREFIX: t.optional(t.text({ description: "Prefix for job lock keys" })) });
|
|
54
54
|
/**
|
|
55
55
|
* Provider for job management and execution.
|
|
@@ -161,7 +161,7 @@ var JobProvider = class {
|
|
|
161
161
|
};
|
|
162
162
|
|
|
163
163
|
//#endregion
|
|
164
|
-
//#region src/api-jobs/primitives/$job.ts
|
|
164
|
+
//#region ../../src/api-jobs/primitives/$job.ts
|
|
165
165
|
/**
|
|
166
166
|
* Job primitive - a drop-in replacement for $scheduler with built-in execution tracking.
|
|
167
167
|
*/
|
|
@@ -186,7 +186,7 @@ var JobPrimitive = class extends Primitive {
|
|
|
186
186
|
$job[KIND] = JobPrimitive;
|
|
187
187
|
|
|
188
188
|
//#endregion
|
|
189
|
-
//#region src/api-jobs/services/JobService.ts
|
|
189
|
+
//#region ../../src/api-jobs/services/JobService.ts
|
|
190
190
|
var JobService = class {
|
|
191
191
|
alepha = $inject(Alepha);
|
|
192
192
|
executionRepository = $repository(jobExecutions);
|
|
@@ -209,7 +209,7 @@ var JobService = class {
|
|
|
209
209
|
};
|
|
210
210
|
|
|
211
211
|
//#endregion
|
|
212
|
-
//#region src/api-jobs/controllers/JobController.ts
|
|
212
|
+
//#region ../../src/api-jobs/controllers/JobController.ts
|
|
213
213
|
var JobController = class {
|
|
214
214
|
url = "/jobs";
|
|
215
215
|
group = "jobs";
|
|
@@ -242,7 +242,7 @@ var JobController = class {
|
|
|
242
242
|
};
|
|
243
243
|
|
|
244
244
|
//#endregion
|
|
245
|
-
//#region src/api-jobs/index.ts
|
|
245
|
+
//#region ../../src/api-jobs/index.ts
|
|
246
246
|
/**
|
|
247
247
|
* Provides job management API endpoints for Alepha applications.
|
|
248
248
|
*
|
|
@@ -8,7 +8,7 @@ import { $queue } from "alepha/queue";
|
|
|
8
8
|
import { EmailProvider } from "alepha/email";
|
|
9
9
|
import { SmsProvider } from "alepha/sms";
|
|
10
10
|
|
|
11
|
-
//#region src/api-notifications/entities/notifications.ts
|
|
11
|
+
//#region ../../src/api-notifications/entities/notifications.ts
|
|
12
12
|
const notifications = $entity({
|
|
13
13
|
name: "notifications",
|
|
14
14
|
schema: t.object({
|
|
@@ -34,7 +34,7 @@ const notifications = $entity({
|
|
|
34
34
|
});
|
|
35
35
|
|
|
36
36
|
//#endregion
|
|
37
|
-
//#region src/api-notifications/schemas/notificationQuerySchema.ts
|
|
37
|
+
//#region ../../src/api-notifications/schemas/notificationQuerySchema.ts
|
|
38
38
|
const notificationQuerySchema = t.extend(pageQuerySchema, {
|
|
39
39
|
type: t.optional(t.enum(["email", "sms"])),
|
|
40
40
|
template: t.optional(t.string()),
|
|
@@ -48,7 +48,7 @@ const notificationQuerySchema = t.extend(pageQuerySchema, {
|
|
|
48
48
|
});
|
|
49
49
|
|
|
50
50
|
//#endregion
|
|
51
|
-
//#region src/api-notifications/primitives/$notification.ts
|
|
51
|
+
//#region ../../src/api-notifications/primitives/$notification.ts
|
|
52
52
|
/**
|
|
53
53
|
* Creates a notification primitive for managing email/SMS notification templates.
|
|
54
54
|
*
|
|
@@ -97,7 +97,7 @@ var NotificationPrimitive = class extends Primitive {
|
|
|
97
97
|
$notification[KIND] = NotificationPrimitive;
|
|
98
98
|
|
|
99
99
|
//#endregion
|
|
100
|
-
//#region src/api-notifications/services/NotificationSenderService.ts
|
|
100
|
+
//#region ../../src/api-notifications/services/NotificationSenderService.ts
|
|
101
101
|
var NotificationSenderService = class {
|
|
102
102
|
alepha = $inject(Alepha);
|
|
103
103
|
log = $logger();
|
|
@@ -225,7 +225,7 @@ var NotificationSenderService = class {
|
|
|
225
225
|
};
|
|
226
226
|
|
|
227
227
|
//#endregion
|
|
228
|
-
//#region src/api-notifications/queues/NotificationQueues.ts
|
|
228
|
+
//#region ../../src/api-notifications/queues/NotificationQueues.ts
|
|
229
229
|
var NotificationQueues = class {
|
|
230
230
|
notificationSenderService = $inject(NotificationSenderService);
|
|
231
231
|
processNotification = $queue({
|
|
@@ -238,7 +238,7 @@ var NotificationQueues = class {
|
|
|
238
238
|
};
|
|
239
239
|
|
|
240
240
|
//#endregion
|
|
241
|
-
//#region src/api-notifications/schemas/notificationCreateSchema.ts
|
|
241
|
+
//#region ../../src/api-notifications/schemas/notificationCreateSchema.ts
|
|
242
242
|
const notificationCreateSchema = t.pick(notifications.schema, [
|
|
243
243
|
"type",
|
|
244
244
|
"contact",
|
|
@@ -247,7 +247,7 @@ const notificationCreateSchema = t.pick(notifications.schema, [
|
|
|
247
247
|
]);
|
|
248
248
|
|
|
249
249
|
//#endregion
|
|
250
|
-
//#region src/api-notifications/services/NotificationService.ts
|
|
250
|
+
//#region ../../src/api-notifications/services/NotificationService.ts
|
|
251
251
|
const notificationServiceEnvSchema = t.object({ NOTIFICATION_QUEUE: t.optional(t.boolean({ description: "If true, notifications will be queued instead of sent immediately" })) });
|
|
252
252
|
var NotificationService = class {
|
|
253
253
|
alepha = $inject(Alepha);
|
|
@@ -333,7 +333,7 @@ var NotificationService = class {
|
|
|
333
333
|
};
|
|
334
334
|
|
|
335
335
|
//#endregion
|
|
336
|
-
//#region src/api-notifications/controllers/NotificationController.ts
|
|
336
|
+
//#region ../../src/api-notifications/controllers/NotificationController.ts
|
|
337
337
|
var NotificationController = class {
|
|
338
338
|
url = "/notifications";
|
|
339
339
|
group = "notifications";
|
|
@@ -354,14 +354,14 @@ var NotificationController = class {
|
|
|
354
354
|
};
|
|
355
355
|
|
|
356
356
|
//#endregion
|
|
357
|
-
//#region src/api-notifications/schemas/notificationContactPreferencesSchema.ts
|
|
357
|
+
//#region ../../src/api-notifications/schemas/notificationContactPreferencesSchema.ts
|
|
358
358
|
const notificationContactPreferencesSchema = t.object({
|
|
359
359
|
language: t.optional(t.text()),
|
|
360
360
|
exclude: t.array(t.text())
|
|
361
361
|
});
|
|
362
362
|
|
|
363
363
|
//#endregion
|
|
364
|
-
//#region src/api-notifications/schemas/notificationContactSchema.ts
|
|
364
|
+
//#region ../../src/api-notifications/schemas/notificationContactSchema.ts
|
|
365
365
|
const notificationContactSchema = t.object({
|
|
366
366
|
email: t.optional(t.email()),
|
|
367
367
|
phoneNumber: t.optional(t.e164()),
|
|
@@ -371,7 +371,7 @@ const notificationContactSchema = t.object({
|
|
|
371
371
|
});
|
|
372
372
|
|
|
373
373
|
//#endregion
|
|
374
|
-
//#region src/api-notifications/index.browser.ts
|
|
374
|
+
//#region ../../src/api-notifications/index.browser.ts
|
|
375
375
|
const AlephaApiNotifications = $module({
|
|
376
376
|
name: "alepha.api.notifications",
|
|
377
377
|
services: []
|
|
@@ -10,7 +10,7 @@ import * as alepha_queue0 from "alepha/queue";
|
|
|
10
10
|
import { EmailProvider } from "alepha/email";
|
|
11
11
|
import { SmsProvider } from "alepha/sms";
|
|
12
12
|
|
|
13
|
-
//#region src/api-notifications/entities/notifications.d.ts
|
|
13
|
+
//#region ../../src/api-notifications/entities/notifications.d.ts
|
|
14
14
|
declare const notifications: alepha_orm15.EntityPrimitive<alepha45.TObject<{
|
|
15
15
|
id: alepha_orm15.PgAttr<alepha_orm15.PgAttr<alepha45.TString, typeof alepha_orm15.PG_PRIMARY_KEY>, typeof alepha_orm15.PG_DEFAULT>;
|
|
16
16
|
version: alepha_orm15.PgAttr<alepha_orm15.PgAttr<alepha45.TInteger, typeof alepha_orm15.PG_VERSION>, typeof alepha_orm15.PG_DEFAULT>;
|
|
@@ -33,7 +33,7 @@ declare const notifications: alepha_orm15.EntityPrimitive<alepha45.TObject<{
|
|
|
33
33
|
}>>;
|
|
34
34
|
type NotificationEntity = Static<typeof notifications.schema>;
|
|
35
35
|
//#endregion
|
|
36
|
-
//#region src/api-notifications/schemas/notificationCreateSchema.d.ts
|
|
36
|
+
//#region ../../src/api-notifications/schemas/notificationCreateSchema.d.ts
|
|
37
37
|
declare const notificationCreateSchema: alepha45.TObject<{
|
|
38
38
|
type: alepha45.TUnsafe<"email" | "sms">;
|
|
39
39
|
template: alepha45.TString;
|
|
@@ -42,7 +42,7 @@ declare const notificationCreateSchema: alepha45.TObject<{
|
|
|
42
42
|
}>;
|
|
43
43
|
type NotificationCreate = Static<typeof notificationCreateSchema>;
|
|
44
44
|
//#endregion
|
|
45
|
-
//#region src/api-notifications/schemas/notificationQuerySchema.d.ts
|
|
45
|
+
//#region ../../src/api-notifications/schemas/notificationQuerySchema.d.ts
|
|
46
46
|
declare const notificationQuerySchema: alepha45.TObject<{
|
|
47
47
|
page: alepha45.TOptional<alepha45.TInteger>;
|
|
48
48
|
size: alepha45.TOptional<alepha45.TInteger>;
|
|
@@ -55,7 +55,7 @@ declare const notificationQuerySchema: alepha45.TObject<{
|
|
|
55
55
|
}>;
|
|
56
56
|
type NotificationQuery = Static<typeof notificationQuerySchema>;
|
|
57
57
|
//#endregion
|
|
58
|
-
//#region src/api-notifications/primitives/$notification.d.ts
|
|
58
|
+
//#region ../../src/api-notifications/primitives/$notification.d.ts
|
|
59
59
|
/**
|
|
60
60
|
* Creates a notification primitive for managing email/SMS notification templates.
|
|
61
61
|
*
|
|
@@ -119,7 +119,7 @@ interface NotificationMessage<T extends TObject> {
|
|
|
119
119
|
};
|
|
120
120
|
}
|
|
121
121
|
//#endregion
|
|
122
|
-
//#region src/api-notifications/services/NotificationSenderService.d.ts
|
|
122
|
+
//#region ../../src/api-notifications/services/NotificationSenderService.d.ts
|
|
123
123
|
declare class NotificationSenderService {
|
|
124
124
|
protected readonly alepha: Alepha;
|
|
125
125
|
protected readonly log: alepha_logger0.Logger;
|
|
@@ -163,7 +163,7 @@ declare class NotificationSenderService {
|
|
|
163
163
|
};
|
|
164
164
|
}
|
|
165
165
|
//#endregion
|
|
166
|
-
//#region src/api-notifications/services/NotificationService.d.ts
|
|
166
|
+
//#region ../../src/api-notifications/services/NotificationService.d.ts
|
|
167
167
|
declare const notificationServiceEnvSchema: alepha45.TObject<{
|
|
168
168
|
NOTIFICATION_QUEUE: alepha45.TOptional<alepha45.TBoolean>;
|
|
169
169
|
}>;
|
|
@@ -250,7 +250,7 @@ declare class NotificationService {
|
|
|
250
250
|
createNotification(entry: NotificationCreate): Promise<void>;
|
|
251
251
|
}
|
|
252
252
|
//#endregion
|
|
253
|
-
//#region src/api-notifications/controllers/NotificationController.d.ts
|
|
253
|
+
//#region ../../src/api-notifications/controllers/NotificationController.d.ts
|
|
254
254
|
declare class NotificationController {
|
|
255
255
|
protected readonly url = "/notifications";
|
|
256
256
|
protected readonly group = "notifications";
|
|
@@ -292,10 +292,10 @@ declare class NotificationController {
|
|
|
292
292
|
}>;
|
|
293
293
|
}
|
|
294
294
|
//#endregion
|
|
295
|
-
//#region src/api-notifications/jobs/NotificationJobs.d.ts
|
|
295
|
+
//#region ../../src/api-notifications/jobs/NotificationJobs.d.ts
|
|
296
296
|
declare class NotificationJobs {}
|
|
297
297
|
//#endregion
|
|
298
|
-
//#region src/api-notifications/queues/NotificationQueues.d.ts
|
|
298
|
+
//#region ../../src/api-notifications/queues/NotificationQueues.d.ts
|
|
299
299
|
declare class NotificationQueues {
|
|
300
300
|
protected readonly notificationSenderService: NotificationSenderService;
|
|
301
301
|
readonly processNotification: alepha_queue0.QueuePrimitive<alepha45.TObject<{
|
|
@@ -303,14 +303,14 @@ declare class NotificationQueues {
|
|
|
303
303
|
}>>;
|
|
304
304
|
}
|
|
305
305
|
//#endregion
|
|
306
|
-
//#region src/api-notifications/schemas/notificationContactPreferencesSchema.d.ts
|
|
306
|
+
//#region ../../src/api-notifications/schemas/notificationContactPreferencesSchema.d.ts
|
|
307
307
|
declare const notificationContactPreferencesSchema: alepha45.TObject<{
|
|
308
308
|
language: alepha45.TOptional<alepha45.TString>;
|
|
309
309
|
exclude: alepha45.TArray<alepha45.TString>;
|
|
310
310
|
}>;
|
|
311
311
|
type NotificationContactPreferences = Static<typeof notificationContactPreferencesSchema>;
|
|
312
312
|
//#endregion
|
|
313
|
-
//#region src/api-notifications/index.d.ts
|
|
313
|
+
//#region ../../src/api-notifications/index.d.ts
|
|
314
314
|
/**
|
|
315
315
|
* Provides notification management API endpoints for Alepha applications.
|
|
316
316
|
*
|
|
@@ -8,7 +8,7 @@ import { $queue } from "alepha/queue";
|
|
|
8
8
|
import { EmailProvider } from "alepha/email";
|
|
9
9
|
import { SmsProvider } from "alepha/sms";
|
|
10
10
|
|
|
11
|
-
//#region src/api-notifications/entities/notifications.ts
|
|
11
|
+
//#region ../../src/api-notifications/entities/notifications.ts
|
|
12
12
|
const notifications = $entity({
|
|
13
13
|
name: "notifications",
|
|
14
14
|
schema: t.object({
|
|
@@ -34,7 +34,7 @@ const notifications = $entity({
|
|
|
34
34
|
});
|
|
35
35
|
|
|
36
36
|
//#endregion
|
|
37
|
-
//#region src/api-notifications/schemas/notificationQuerySchema.ts
|
|
37
|
+
//#region ../../src/api-notifications/schemas/notificationQuerySchema.ts
|
|
38
38
|
const notificationQuerySchema = t.extend(pageQuerySchema, {
|
|
39
39
|
type: t.optional(t.enum(["email", "sms"])),
|
|
40
40
|
template: t.optional(t.string()),
|
|
@@ -48,7 +48,7 @@ const notificationQuerySchema = t.extend(pageQuerySchema, {
|
|
|
48
48
|
});
|
|
49
49
|
|
|
50
50
|
//#endregion
|
|
51
|
-
//#region src/api-notifications/primitives/$notification.ts
|
|
51
|
+
//#region ../../src/api-notifications/primitives/$notification.ts
|
|
52
52
|
/**
|
|
53
53
|
* Creates a notification primitive for managing email/SMS notification templates.
|
|
54
54
|
*
|
|
@@ -97,7 +97,7 @@ var NotificationPrimitive = class extends Primitive {
|
|
|
97
97
|
$notification[KIND] = NotificationPrimitive;
|
|
98
98
|
|
|
99
99
|
//#endregion
|
|
100
|
-
//#region src/api-notifications/services/NotificationSenderService.ts
|
|
100
|
+
//#region ../../src/api-notifications/services/NotificationSenderService.ts
|
|
101
101
|
var NotificationSenderService = class {
|
|
102
102
|
alepha = $inject(Alepha);
|
|
103
103
|
log = $logger();
|
|
@@ -225,7 +225,7 @@ var NotificationSenderService = class {
|
|
|
225
225
|
};
|
|
226
226
|
|
|
227
227
|
//#endregion
|
|
228
|
-
//#region src/api-notifications/queues/NotificationQueues.ts
|
|
228
|
+
//#region ../../src/api-notifications/queues/NotificationQueues.ts
|
|
229
229
|
var NotificationQueues = class {
|
|
230
230
|
notificationSenderService = $inject(NotificationSenderService);
|
|
231
231
|
processNotification = $queue({
|
|
@@ -238,7 +238,7 @@ var NotificationQueues = class {
|
|
|
238
238
|
};
|
|
239
239
|
|
|
240
240
|
//#endregion
|
|
241
|
-
//#region src/api-notifications/schemas/notificationCreateSchema.ts
|
|
241
|
+
//#region ../../src/api-notifications/schemas/notificationCreateSchema.ts
|
|
242
242
|
const notificationCreateSchema = t.pick(notifications.schema, [
|
|
243
243
|
"type",
|
|
244
244
|
"contact",
|
|
@@ -247,7 +247,7 @@ const notificationCreateSchema = t.pick(notifications.schema, [
|
|
|
247
247
|
]);
|
|
248
248
|
|
|
249
249
|
//#endregion
|
|
250
|
-
//#region src/api-notifications/services/NotificationService.ts
|
|
250
|
+
//#region ../../src/api-notifications/services/NotificationService.ts
|
|
251
251
|
const notificationServiceEnvSchema = t.object({ NOTIFICATION_QUEUE: t.optional(t.boolean({ description: "If true, notifications will be queued instead of sent immediately" })) });
|
|
252
252
|
var NotificationService = class {
|
|
253
253
|
alepha = $inject(Alepha);
|
|
@@ -333,7 +333,7 @@ var NotificationService = class {
|
|
|
333
333
|
};
|
|
334
334
|
|
|
335
335
|
//#endregion
|
|
336
|
-
//#region src/api-notifications/controllers/NotificationController.ts
|
|
336
|
+
//#region ../../src/api-notifications/controllers/NotificationController.ts
|
|
337
337
|
var NotificationController = class {
|
|
338
338
|
url = "/notifications";
|
|
339
339
|
group = "notifications";
|
|
@@ -354,18 +354,18 @@ var NotificationController = class {
|
|
|
354
354
|
};
|
|
355
355
|
|
|
356
356
|
//#endregion
|
|
357
|
-
//#region src/api-notifications/jobs/NotificationJobs.ts
|
|
357
|
+
//#region ../../src/api-notifications/jobs/NotificationJobs.ts
|
|
358
358
|
var NotificationJobs = class {};
|
|
359
359
|
|
|
360
360
|
//#endregion
|
|
361
|
-
//#region src/api-notifications/schemas/notificationContactPreferencesSchema.ts
|
|
361
|
+
//#region ../../src/api-notifications/schemas/notificationContactPreferencesSchema.ts
|
|
362
362
|
const notificationContactPreferencesSchema = t.object({
|
|
363
363
|
language: t.optional(t.text()),
|
|
364
364
|
exclude: t.array(t.text())
|
|
365
365
|
});
|
|
366
366
|
|
|
367
367
|
//#endregion
|
|
368
|
-
//#region src/api-notifications/index.ts
|
|
368
|
+
//#region ../../src/api-notifications/index.ts
|
|
369
369
|
/**
|
|
370
370
|
* Provides notification management API endpoints for Alepha applications.
|
|
371
371
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { $module, t } from "alepha";
|
|
2
2
|
import { $entity, pg } from "alepha/orm";
|
|
3
3
|
|
|
4
|
-
//#region src/api-parameters/entities/parameters.ts
|
|
4
|
+
//#region ../../src/api-parameters/entities/parameters.ts
|
|
5
5
|
const parameters = $entity({
|
|
6
6
|
name: "parameters",
|
|
7
7
|
schema: t.object({
|
|
@@ -18,7 +18,7 @@ const parameters = $entity({
|
|
|
18
18
|
});
|
|
19
19
|
|
|
20
20
|
//#endregion
|
|
21
|
-
//#region src/api-parameters/index.browser.ts
|
|
21
|
+
//#region ../../src/api-parameters/index.browser.ts
|
|
22
22
|
const AlephaApiParameters = $module({
|
|
23
23
|
name: "alepha.api.parameters",
|
|
24
24
|
services: []
|
|
@@ -3,7 +3,7 @@ import { Primitive, Static, TObject } from "alepha";
|
|
|
3
3
|
import * as alepha_orm0 from "alepha/orm";
|
|
4
4
|
import { UserAccount } from "alepha/security";
|
|
5
5
|
|
|
6
|
-
//#region src/api-parameters/entities/parameters.d.ts
|
|
6
|
+
//#region ../../src/api-parameters/entities/parameters.d.ts
|
|
7
7
|
declare const parameters: alepha_orm0.EntityPrimitive<alepha1.TObject<{
|
|
8
8
|
id: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_PRIMARY_KEY>, typeof alepha_orm0.PG_DEFAULT>;
|
|
9
9
|
createdAt: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_CREATED_AT>, typeof alepha_orm0.PG_DEFAULT>;
|
|
@@ -17,7 +17,7 @@ declare const parameters: alepha_orm0.EntityPrimitive<alepha1.TObject<{
|
|
|
17
17
|
}>>;
|
|
18
18
|
type ParameterEntity = Static<typeof parameters.schema>;
|
|
19
19
|
//#endregion
|
|
20
|
-
//#region src/api-parameters/primitives/$config.d.ts
|
|
20
|
+
//#region ../../src/api-parameters/primitives/$config.d.ts
|
|
21
21
|
/**
|
|
22
22
|
* Creates a configuration parameter primitive for managing application settings.
|
|
23
23
|
*
|
|
@@ -68,7 +68,7 @@ declare class ConfigPrimitive<T extends TObject> extends Primitive<ConfigPrimiti
|
|
|
68
68
|
}
|
|
69
69
|
declare const $config: <T extends TObject>(options: ConfigPrimitiveOptions<T>) => ConfigPrimitive<T>;
|
|
70
70
|
//#endregion
|
|
71
|
-
//#region src/api-parameters/index.d.ts
|
|
71
|
+
//#region ../../src/api-parameters/index.d.ts
|
|
72
72
|
/**
|
|
73
73
|
* Provides parameter management API endpoints for Alepha applications.
|
|
74
74
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { $module, Primitive, createPrimitive, t } from "alepha";
|
|
2
2
|
import { $entity, pg } from "alepha/orm";
|
|
3
3
|
|
|
4
|
-
//#region src/api-parameters/entities/parameters.ts
|
|
4
|
+
//#region ../../src/api-parameters/entities/parameters.ts
|
|
5
5
|
const parameters = $entity({
|
|
6
6
|
name: "parameters",
|
|
7
7
|
schema: t.object({
|
|
@@ -18,7 +18,7 @@ const parameters = $entity({
|
|
|
18
18
|
});
|
|
19
19
|
|
|
20
20
|
//#endregion
|
|
21
|
-
//#region src/api-parameters/primitives/$config.ts
|
|
21
|
+
//#region ../../src/api-parameters/primitives/$config.ts
|
|
22
22
|
var ConfigPrimitive = class extends Primitive {
|
|
23
23
|
get name() {
|
|
24
24
|
return this.options.name || this.config.propertyKey;
|
|
@@ -44,7 +44,7 @@ const $config = (options) => {
|
|
|
44
44
|
};
|
|
45
45
|
|
|
46
46
|
//#endregion
|
|
47
|
-
//#region src/api-parameters/index.ts
|
|
47
|
+
//#region ../../src/api-parameters/index.ts
|
|
48
48
|
/**
|
|
49
49
|
* Provides parameter management API endpoints for Alepha applications.
|
|
50
50
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { $module, t } from "alepha";
|
|
2
2
|
import { $entity, pg } from "alepha/orm";
|
|
3
3
|
|
|
4
|
-
//#region src/api-users/entities/users.ts
|
|
4
|
+
//#region ../../src/api-users/entities/users.ts
|
|
5
5
|
const DEFAULT_USER_REALM_NAME = "default";
|
|
6
6
|
const users = $entity({
|
|
7
7
|
name: "users",
|
|
@@ -42,7 +42,7 @@ const users = $entity({
|
|
|
42
42
|
});
|
|
43
43
|
|
|
44
44
|
//#endregion
|
|
45
|
-
//#region src/api-users/entities/identities.ts
|
|
45
|
+
//#region ../../src/api-users/entities/identities.ts
|
|
46
46
|
const identities = $entity({
|
|
47
47
|
name: "identities",
|
|
48
48
|
schema: t.object({
|
|
@@ -59,7 +59,7 @@ const identities = $entity({
|
|
|
59
59
|
});
|
|
60
60
|
|
|
61
61
|
//#endregion
|
|
62
|
-
//#region src/api-users/entities/sessions.ts
|
|
62
|
+
//#region ../../src/api-users/entities/sessions.ts
|
|
63
63
|
const sessions = $entity({
|
|
64
64
|
name: "sessions",
|
|
65
65
|
schema: t.object({
|
|
@@ -84,7 +84,7 @@ const sessions = $entity({
|
|
|
84
84
|
});
|
|
85
85
|
|
|
86
86
|
//#endregion
|
|
87
|
-
//#region src/api-users/schemas/registerSchema.ts
|
|
87
|
+
//#region ../../src/api-users/schemas/registerSchema.ts
|
|
88
88
|
const registerSchema = t.object({
|
|
89
89
|
username: t.string({
|
|
90
90
|
minLength: 3,
|
|
@@ -112,7 +112,7 @@ const registerSchema = t.object({
|
|
|
112
112
|
});
|
|
113
113
|
|
|
114
114
|
//#endregion
|
|
115
|
-
//#region src/api-users/schemas/resetPasswordSchema.ts
|
|
115
|
+
//#region ../../src/api-users/schemas/resetPasswordSchema.ts
|
|
116
116
|
const resetPasswordRequestSchema = t.object({ email: t.email({ description: "Email address to send password reset link" }) });
|
|
117
117
|
const resetPasswordSchema = t.object({
|
|
118
118
|
token: t.string({ description: "Password reset token from email" }),
|
|
@@ -127,7 +127,7 @@ const resetPasswordSchema = t.object({
|
|
|
127
127
|
});
|
|
128
128
|
|
|
129
129
|
//#endregion
|
|
130
|
-
//#region src/api-users/index.browser.ts
|
|
130
|
+
//#region ../../src/api-users/index.browser.ts
|
|
131
131
|
const AlephaApiUsers = $module({
|
|
132
132
|
name: "alepha.api.users",
|
|
133
133
|
services: []
|