alepha 0.13.3 → 0.13.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 +7 -7
- package/dist/api-files/index.browser.js +5 -5
- package/dist/api-files/index.d.ts +16 -16
- package/dist/api-files/index.js +9 -9
- package/dist/api-jobs/index.browser.js +5 -5
- package/dist/api-jobs/index.d.ts +17 -17
- package/dist/api-jobs/index.js +9 -9
- package/dist/api-notifications/index.browser.js +11 -11
- package/dist/api-notifications/index.d.ts +158 -158
- 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 +55 -55
- package/dist/api-users/index.js +36 -36
- package/dist/api-verifications/index.browser.js +5 -5
- package/dist/api-verifications/index.d.ts +9 -9
- 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 +40 -36
- package/dist/core/index.browser.js.map +1 -1
- package/dist/core/index.d.ts +255 -253
- package/dist/core/index.js +40 -36
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.native.js +40 -36
- package/dist/core/index.native.js.map +1 -1
- package/dist/datetime/index.d.ts +3 -3
- package/dist/datetime/index.js +3 -3
- package/dist/email/index.d.ts +7 -7
- 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 +33 -33
- 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 +13 -13
- 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 +4 -4
- package/dist/scheduler/index.js +7 -7
- package/dist/security/index.browser.js +7 -7
- package/dist/security/index.d.ts +15 -15
- 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 +11 -11
- 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 +4 -4
- 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 +17 -17
- 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/core/Alepha.ts +14 -0
- package/src/core/primitives/$module.ts +1 -1
- package/src/cli/services/ProcessRunner.ts +0 -89
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as alepha45 from "alepha";
|
|
2
2
|
import { Alepha, KIND, Primitive, Static, StaticEncode, TObject } from "alepha";
|
|
3
|
-
import * as
|
|
3
|
+
import * as alepha_orm15 from "alepha/orm";
|
|
4
4
|
import { Page } from "alepha/orm";
|
|
5
5
|
import * as alepha_server0 from "alepha/server";
|
|
6
6
|
import * as alepha_batch0 from "alepha/batch";
|
|
@@ -10,52 +10,52 @@ 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
|
|
14
|
-
declare const notifications:
|
|
15
|
-
id:
|
|
16
|
-
version:
|
|
17
|
-
createdAt:
|
|
18
|
-
updatedAt:
|
|
19
|
-
type:
|
|
20
|
-
template:
|
|
21
|
-
category:
|
|
22
|
-
critical:
|
|
23
|
-
sensitive:
|
|
24
|
-
contact:
|
|
25
|
-
variables:
|
|
26
|
-
scheduledAt:
|
|
27
|
-
sentAt:
|
|
28
|
-
error:
|
|
29
|
-
at:
|
|
30
|
-
name:
|
|
31
|
-
message:
|
|
13
|
+
//#region ../../src/api-notifications/entities/notifications.d.ts
|
|
14
|
+
declare const notifications: alepha_orm15.EntityPrimitive<alepha45.TObject<{
|
|
15
|
+
id: alepha_orm15.PgAttr<alepha_orm15.PgAttr<alepha45.TString, typeof alepha_orm15.PG_PRIMARY_KEY>, typeof alepha_orm15.PG_DEFAULT>;
|
|
16
|
+
version: alepha_orm15.PgAttr<alepha_orm15.PgAttr<alepha45.TInteger, typeof alepha_orm15.PG_VERSION>, typeof alepha_orm15.PG_DEFAULT>;
|
|
17
|
+
createdAt: alepha_orm15.PgAttr<alepha_orm15.PgAttr<alepha45.TString, typeof alepha_orm15.PG_CREATED_AT>, typeof alepha_orm15.PG_DEFAULT>;
|
|
18
|
+
updatedAt: alepha_orm15.PgAttr<alepha_orm15.PgAttr<alepha45.TString, typeof alepha_orm15.PG_UPDATED_AT>, typeof alepha_orm15.PG_DEFAULT>;
|
|
19
|
+
type: alepha45.TUnsafe<"email" | "sms">;
|
|
20
|
+
template: alepha45.TString;
|
|
21
|
+
category: alepha45.TOptional<alepha45.TString>;
|
|
22
|
+
critical: alepha45.TOptional<alepha45.TBoolean>;
|
|
23
|
+
sensitive: alepha45.TOptional<alepha45.TBoolean>;
|
|
24
|
+
contact: alepha45.TString;
|
|
25
|
+
variables: alepha45.TOptional<alepha45.TRecord<"^.*$", alepha45.TAny>>;
|
|
26
|
+
scheduledAt: alepha45.TOptional<alepha45.TString>;
|
|
27
|
+
sentAt: alepha45.TOptional<alepha45.TString>;
|
|
28
|
+
error: alepha45.TOptional<alepha45.TObject<{
|
|
29
|
+
at: alepha45.TString;
|
|
30
|
+
name: alepha45.TString;
|
|
31
|
+
message: alepha45.TString;
|
|
32
32
|
}>>;
|
|
33
33
|
}>>;
|
|
34
34
|
type NotificationEntity = Static<typeof notifications.schema>;
|
|
35
35
|
//#endregion
|
|
36
|
-
//#region src/api-notifications/schemas/notificationCreateSchema.d.ts
|
|
37
|
-
declare const notificationCreateSchema:
|
|
38
|
-
type:
|
|
39
|
-
template:
|
|
40
|
-
contact:
|
|
41
|
-
variables:
|
|
36
|
+
//#region ../../src/api-notifications/schemas/notificationCreateSchema.d.ts
|
|
37
|
+
declare const notificationCreateSchema: alepha45.TObject<{
|
|
38
|
+
type: alepha45.TUnsafe<"email" | "sms">;
|
|
39
|
+
template: alepha45.TString;
|
|
40
|
+
contact: alepha45.TString;
|
|
41
|
+
variables: alepha45.TOptional<alepha45.TRecord<"^.*$", alepha45.TAny>>;
|
|
42
42
|
}>;
|
|
43
43
|
type NotificationCreate = Static<typeof notificationCreateSchema>;
|
|
44
44
|
//#endregion
|
|
45
|
-
//#region src/api-notifications/schemas/notificationQuerySchema.d.ts
|
|
46
|
-
declare const notificationQuerySchema:
|
|
47
|
-
page:
|
|
48
|
-
size:
|
|
49
|
-
sort:
|
|
50
|
-
type:
|
|
51
|
-
template:
|
|
52
|
-
contact:
|
|
53
|
-
category:
|
|
54
|
-
status:
|
|
45
|
+
//#region ../../src/api-notifications/schemas/notificationQuerySchema.d.ts
|
|
46
|
+
declare const notificationQuerySchema: alepha45.TObject<{
|
|
47
|
+
page: alepha45.TOptional<alepha45.TInteger>;
|
|
48
|
+
size: alepha45.TOptional<alepha45.TInteger>;
|
|
49
|
+
sort: alepha45.TOptional<alepha45.TString>;
|
|
50
|
+
type: alepha45.TOptional<alepha45.TUnsafe<"email" | "sms">>;
|
|
51
|
+
template: alepha45.TOptional<alepha45.TString>;
|
|
52
|
+
contact: alepha45.TOptional<alepha45.TString>;
|
|
53
|
+
category: alepha45.TOptional<alepha45.TString>;
|
|
54
|
+
status: alepha45.TOptional<alepha45.TUnsafe<"pending" | "sent" | "failed">>;
|
|
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,28 +119,28 @@ 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;
|
|
126
|
-
protected readonly notificationRepository:
|
|
127
|
-
id:
|
|
128
|
-
version:
|
|
129
|
-
createdAt:
|
|
130
|
-
updatedAt:
|
|
131
|
-
type:
|
|
132
|
-
template:
|
|
133
|
-
category:
|
|
134
|
-
critical:
|
|
135
|
-
sensitive:
|
|
136
|
-
contact:
|
|
137
|
-
variables:
|
|
138
|
-
scheduledAt:
|
|
139
|
-
sentAt:
|
|
140
|
-
error:
|
|
141
|
-
at:
|
|
142
|
-
name:
|
|
143
|
-
message:
|
|
126
|
+
protected readonly notificationRepository: alepha_orm15.Repository<alepha45.TObject<{
|
|
127
|
+
id: alepha_orm15.PgAttr<alepha_orm15.PgAttr<alepha45.TString, typeof alepha_orm15.PG_PRIMARY_KEY>, typeof alepha_orm15.PG_DEFAULT>;
|
|
128
|
+
version: alepha_orm15.PgAttr<alepha_orm15.PgAttr<alepha45.TInteger, typeof alepha_orm15.PG_VERSION>, typeof alepha_orm15.PG_DEFAULT>;
|
|
129
|
+
createdAt: alepha_orm15.PgAttr<alepha_orm15.PgAttr<alepha45.TString, typeof alepha_orm15.PG_CREATED_AT>, typeof alepha_orm15.PG_DEFAULT>;
|
|
130
|
+
updatedAt: alepha_orm15.PgAttr<alepha_orm15.PgAttr<alepha45.TString, typeof alepha_orm15.PG_UPDATED_AT>, typeof alepha_orm15.PG_DEFAULT>;
|
|
131
|
+
type: alepha45.TUnsafe<"email" | "sms">;
|
|
132
|
+
template: alepha45.TString;
|
|
133
|
+
category: alepha45.TOptional<alepha45.TString>;
|
|
134
|
+
critical: alepha45.TOptional<alepha45.TBoolean>;
|
|
135
|
+
sensitive: alepha45.TOptional<alepha45.TBoolean>;
|
|
136
|
+
contact: alepha45.TString;
|
|
137
|
+
variables: alepha45.TOptional<alepha45.TRecord<"^.*$", alepha45.TAny>>;
|
|
138
|
+
scheduledAt: alepha45.TOptional<alepha45.TString>;
|
|
139
|
+
sentAt: alepha45.TOptional<alepha45.TString>;
|
|
140
|
+
error: alepha45.TOptional<alepha45.TObject<{
|
|
141
|
+
at: alepha45.TString;
|
|
142
|
+
name: alepha45.TString;
|
|
143
|
+
message: alepha45.TString;
|
|
144
144
|
}>>;
|
|
145
145
|
}>>;
|
|
146
146
|
protected readonly dateTimeProvider: DateTimeProvider;
|
|
@@ -157,15 +157,15 @@ declare class NotificationSenderService {
|
|
|
157
157
|
body: string;
|
|
158
158
|
};
|
|
159
159
|
protected load(notification: NotificationEntity): {
|
|
160
|
-
template: NotificationPrimitive<
|
|
160
|
+
template: NotificationPrimitive<alepha45.TObject<alepha45.TProperties>>;
|
|
161
161
|
variables: Record<string, any>;
|
|
162
162
|
contact: string;
|
|
163
163
|
};
|
|
164
164
|
}
|
|
165
165
|
//#endregion
|
|
166
|
-
//#region src/api-notifications/services/NotificationService.d.ts
|
|
167
|
-
declare const notificationServiceEnvSchema:
|
|
168
|
-
NOTIFICATION_QUEUE:
|
|
166
|
+
//#region ../../src/api-notifications/services/NotificationService.d.ts
|
|
167
|
+
declare const notificationServiceEnvSchema: alepha45.TObject<{
|
|
168
|
+
NOTIFICATION_QUEUE: alepha45.TOptional<alepha45.TBoolean>;
|
|
169
169
|
}>;
|
|
170
170
|
declare module "alepha" {
|
|
171
171
|
interface Env extends Partial<Static<typeof notificationServiceEnvSchema>> {}
|
|
@@ -176,71 +176,71 @@ declare class NotificationService {
|
|
|
176
176
|
protected readonly env: {
|
|
177
177
|
NOTIFICATION_QUEUE?: boolean | undefined;
|
|
178
178
|
};
|
|
179
|
-
protected readonly notificationRepository:
|
|
180
|
-
id:
|
|
181
|
-
version:
|
|
182
|
-
createdAt:
|
|
183
|
-
updatedAt:
|
|
184
|
-
type:
|
|
185
|
-
template:
|
|
186
|
-
category:
|
|
187
|
-
critical:
|
|
188
|
-
sensitive:
|
|
189
|
-
contact:
|
|
190
|
-
variables:
|
|
191
|
-
scheduledAt:
|
|
192
|
-
sentAt:
|
|
193
|
-
error:
|
|
194
|
-
at:
|
|
195
|
-
name:
|
|
196
|
-
message:
|
|
179
|
+
protected readonly notificationRepository: alepha_orm15.Repository<alepha45.TObject<{
|
|
180
|
+
id: alepha_orm15.PgAttr<alepha_orm15.PgAttr<alepha45.TString, typeof alepha_orm15.PG_PRIMARY_KEY>, typeof alepha_orm15.PG_DEFAULT>;
|
|
181
|
+
version: alepha_orm15.PgAttr<alepha_orm15.PgAttr<alepha45.TInteger, typeof alepha_orm15.PG_VERSION>, typeof alepha_orm15.PG_DEFAULT>;
|
|
182
|
+
createdAt: alepha_orm15.PgAttr<alepha_orm15.PgAttr<alepha45.TString, typeof alepha_orm15.PG_CREATED_AT>, typeof alepha_orm15.PG_DEFAULT>;
|
|
183
|
+
updatedAt: alepha_orm15.PgAttr<alepha_orm15.PgAttr<alepha45.TString, typeof alepha_orm15.PG_UPDATED_AT>, typeof alepha_orm15.PG_DEFAULT>;
|
|
184
|
+
type: alepha45.TUnsafe<"email" | "sms">;
|
|
185
|
+
template: alepha45.TString;
|
|
186
|
+
category: alepha45.TOptional<alepha45.TString>;
|
|
187
|
+
critical: alepha45.TOptional<alepha45.TBoolean>;
|
|
188
|
+
sensitive: alepha45.TOptional<alepha45.TBoolean>;
|
|
189
|
+
contact: alepha45.TString;
|
|
190
|
+
variables: alepha45.TOptional<alepha45.TRecord<"^.*$", alepha45.TAny>>;
|
|
191
|
+
scheduledAt: alepha45.TOptional<alepha45.TString>;
|
|
192
|
+
sentAt: alepha45.TOptional<alepha45.TString>;
|
|
193
|
+
error: alepha45.TOptional<alepha45.TObject<{
|
|
194
|
+
at: alepha45.TString;
|
|
195
|
+
name: alepha45.TString;
|
|
196
|
+
message: alepha45.TString;
|
|
197
197
|
}>>;
|
|
198
198
|
}>>;
|
|
199
199
|
protected readonly dateTimeProvider: DateTimeProvider;
|
|
200
200
|
protected readonly notificationSenderService: NotificationSenderService;
|
|
201
|
-
readonly notificationBatch: alepha_batch0.BatchPrimitive<
|
|
202
|
-
type:
|
|
203
|
-
template:
|
|
204
|
-
contact:
|
|
205
|
-
variables:
|
|
201
|
+
readonly notificationBatch: alepha_batch0.BatchPrimitive<alepha45.TObject<{
|
|
202
|
+
type: alepha45.TUnsafe<"email" | "sms">;
|
|
203
|
+
template: alepha45.TString;
|
|
204
|
+
contact: alepha45.TString;
|
|
205
|
+
variables: alepha45.TOptional<alepha45.TRecord<"^.*$", alepha45.TAny>>;
|
|
206
206
|
}>, Promise<void>>;
|
|
207
|
-
findNotificationById(id: string): Promise<
|
|
208
|
-
id:
|
|
209
|
-
version:
|
|
210
|
-
createdAt:
|
|
211
|
-
updatedAt:
|
|
212
|
-
type:
|
|
213
|
-
template:
|
|
214
|
-
category:
|
|
215
|
-
critical:
|
|
216
|
-
sensitive:
|
|
217
|
-
contact:
|
|
218
|
-
variables:
|
|
219
|
-
scheduledAt:
|
|
220
|
-
sentAt:
|
|
221
|
-
error:
|
|
222
|
-
at:
|
|
223
|
-
name:
|
|
224
|
-
message:
|
|
207
|
+
findNotificationById(id: string): Promise<alepha_orm15.PgStatic<alepha45.TObject<{
|
|
208
|
+
id: alepha_orm15.PgAttr<alepha_orm15.PgAttr<alepha45.TString, typeof alepha_orm15.PG_PRIMARY_KEY>, typeof alepha_orm15.PG_DEFAULT>;
|
|
209
|
+
version: alepha_orm15.PgAttr<alepha_orm15.PgAttr<alepha45.TInteger, typeof alepha_orm15.PG_VERSION>, typeof alepha_orm15.PG_DEFAULT>;
|
|
210
|
+
createdAt: alepha_orm15.PgAttr<alepha_orm15.PgAttr<alepha45.TString, typeof alepha_orm15.PG_CREATED_AT>, typeof alepha_orm15.PG_DEFAULT>;
|
|
211
|
+
updatedAt: alepha_orm15.PgAttr<alepha_orm15.PgAttr<alepha45.TString, typeof alepha_orm15.PG_UPDATED_AT>, typeof alepha_orm15.PG_DEFAULT>;
|
|
212
|
+
type: alepha45.TUnsafe<"email" | "sms">;
|
|
213
|
+
template: alepha45.TString;
|
|
214
|
+
category: alepha45.TOptional<alepha45.TString>;
|
|
215
|
+
critical: alepha45.TOptional<alepha45.TBoolean>;
|
|
216
|
+
sensitive: alepha45.TOptional<alepha45.TBoolean>;
|
|
217
|
+
contact: alepha45.TString;
|
|
218
|
+
variables: alepha45.TOptional<alepha45.TRecord<"^.*$", alepha45.TAny>>;
|
|
219
|
+
scheduledAt: alepha45.TOptional<alepha45.TString>;
|
|
220
|
+
sentAt: alepha45.TOptional<alepha45.TString>;
|
|
221
|
+
error: alepha45.TOptional<alepha45.TObject<{
|
|
222
|
+
at: alepha45.TString;
|
|
223
|
+
name: alepha45.TString;
|
|
224
|
+
message: alepha45.TString;
|
|
225
225
|
}>>;
|
|
226
|
-
}>,
|
|
227
|
-
id:
|
|
228
|
-
version:
|
|
229
|
-
createdAt:
|
|
230
|
-
updatedAt:
|
|
231
|
-
type:
|
|
232
|
-
template:
|
|
233
|
-
category:
|
|
234
|
-
critical:
|
|
235
|
-
sensitive:
|
|
236
|
-
contact:
|
|
237
|
-
variables:
|
|
238
|
-
scheduledAt:
|
|
239
|
-
sentAt:
|
|
240
|
-
error:
|
|
241
|
-
at:
|
|
242
|
-
name:
|
|
243
|
-
message:
|
|
226
|
+
}>, alepha_orm15.PgRelationMap<alepha45.TObject<{
|
|
227
|
+
id: alepha_orm15.PgAttr<alepha_orm15.PgAttr<alepha45.TString, typeof alepha_orm15.PG_PRIMARY_KEY>, typeof alepha_orm15.PG_DEFAULT>;
|
|
228
|
+
version: alepha_orm15.PgAttr<alepha_orm15.PgAttr<alepha45.TInteger, typeof alepha_orm15.PG_VERSION>, typeof alepha_orm15.PG_DEFAULT>;
|
|
229
|
+
createdAt: alepha_orm15.PgAttr<alepha_orm15.PgAttr<alepha45.TString, typeof alepha_orm15.PG_CREATED_AT>, typeof alepha_orm15.PG_DEFAULT>;
|
|
230
|
+
updatedAt: alepha_orm15.PgAttr<alepha_orm15.PgAttr<alepha45.TString, typeof alepha_orm15.PG_UPDATED_AT>, typeof alepha_orm15.PG_DEFAULT>;
|
|
231
|
+
type: alepha45.TUnsafe<"email" | "sms">;
|
|
232
|
+
template: alepha45.TString;
|
|
233
|
+
category: alepha45.TOptional<alepha45.TString>;
|
|
234
|
+
critical: alepha45.TOptional<alepha45.TBoolean>;
|
|
235
|
+
sensitive: alepha45.TOptional<alepha45.TBoolean>;
|
|
236
|
+
contact: alepha45.TString;
|
|
237
|
+
variables: alepha45.TOptional<alepha45.TRecord<"^.*$", alepha45.TAny>>;
|
|
238
|
+
scheduledAt: alepha45.TOptional<alepha45.TString>;
|
|
239
|
+
sentAt: alepha45.TOptional<alepha45.TString>;
|
|
240
|
+
error: alepha45.TOptional<alepha45.TObject<{
|
|
241
|
+
at: alepha45.TString;
|
|
242
|
+
name: alepha45.TString;
|
|
243
|
+
message: alepha45.TString;
|
|
244
244
|
}>>;
|
|
245
245
|
}>>>>;
|
|
246
246
|
findNotifications(q?: NotificationQuery): Promise<Page<NotificationEntity>>;
|
|
@@ -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";
|
|
@@ -259,58 +259,58 @@ declare class NotificationController {
|
|
|
259
259
|
* Find notifications with pagination and filtering.
|
|
260
260
|
*/
|
|
261
261
|
readonly findNotifications: alepha_server0.ActionPrimitiveFn<{
|
|
262
|
-
query:
|
|
263
|
-
page:
|
|
264
|
-
size:
|
|
265
|
-
sort:
|
|
266
|
-
type:
|
|
267
|
-
template:
|
|
268
|
-
contact:
|
|
269
|
-
category:
|
|
270
|
-
status:
|
|
262
|
+
query: alepha45.TObject<{
|
|
263
|
+
page: alepha45.TOptional<alepha45.TInteger>;
|
|
264
|
+
size: alepha45.TOptional<alepha45.TInteger>;
|
|
265
|
+
sort: alepha45.TOptional<alepha45.TString>;
|
|
266
|
+
type: alepha45.TOptional<alepha45.TUnsafe<"email" | "sms">>;
|
|
267
|
+
template: alepha45.TOptional<alepha45.TString>;
|
|
268
|
+
contact: alepha45.TOptional<alepha45.TString>;
|
|
269
|
+
category: alepha45.TOptional<alepha45.TString>;
|
|
270
|
+
status: alepha45.TOptional<alepha45.TUnsafe<"pending" | "sent" | "failed">>;
|
|
271
271
|
}>;
|
|
272
|
-
response:
|
|
273
|
-
id:
|
|
274
|
-
version:
|
|
275
|
-
createdAt:
|
|
276
|
-
updatedAt:
|
|
277
|
-
type:
|
|
278
|
-
template:
|
|
279
|
-
category:
|
|
280
|
-
critical:
|
|
281
|
-
sensitive:
|
|
282
|
-
contact:
|
|
283
|
-
variables:
|
|
284
|
-
scheduledAt:
|
|
285
|
-
sentAt:
|
|
286
|
-
error:
|
|
287
|
-
at:
|
|
288
|
-
name:
|
|
289
|
-
message:
|
|
272
|
+
response: alepha45.TPage<alepha45.TObject<{
|
|
273
|
+
id: alepha_orm15.PgAttr<alepha_orm15.PgAttr<alepha45.TString, typeof alepha_orm15.PG_PRIMARY_KEY>, typeof alepha_orm15.PG_DEFAULT>;
|
|
274
|
+
version: alepha_orm15.PgAttr<alepha_orm15.PgAttr<alepha45.TInteger, typeof alepha_orm15.PG_VERSION>, typeof alepha_orm15.PG_DEFAULT>;
|
|
275
|
+
createdAt: alepha_orm15.PgAttr<alepha_orm15.PgAttr<alepha45.TString, typeof alepha_orm15.PG_CREATED_AT>, typeof alepha_orm15.PG_DEFAULT>;
|
|
276
|
+
updatedAt: alepha_orm15.PgAttr<alepha_orm15.PgAttr<alepha45.TString, typeof alepha_orm15.PG_UPDATED_AT>, typeof alepha_orm15.PG_DEFAULT>;
|
|
277
|
+
type: alepha45.TUnsafe<"email" | "sms">;
|
|
278
|
+
template: alepha45.TString;
|
|
279
|
+
category: alepha45.TOptional<alepha45.TString>;
|
|
280
|
+
critical: alepha45.TOptional<alepha45.TBoolean>;
|
|
281
|
+
sensitive: alepha45.TOptional<alepha45.TBoolean>;
|
|
282
|
+
contact: alepha45.TString;
|
|
283
|
+
variables: alepha45.TOptional<alepha45.TRecord<"^.*$", alepha45.TAny>>;
|
|
284
|
+
scheduledAt: alepha45.TOptional<alepha45.TString>;
|
|
285
|
+
sentAt: alepha45.TOptional<alepha45.TString>;
|
|
286
|
+
error: alepha45.TOptional<alepha45.TObject<{
|
|
287
|
+
at: alepha45.TString;
|
|
288
|
+
name: alepha45.TString;
|
|
289
|
+
message: alepha45.TString;
|
|
290
290
|
}>>;
|
|
291
291
|
}>>;
|
|
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
|
-
readonly processNotification: alepha_queue0.QueuePrimitive<
|
|
302
|
-
notificationId:
|
|
301
|
+
readonly processNotification: alepha_queue0.QueuePrimitive<alepha45.TObject<{
|
|
302
|
+
notificationId: alepha45.TString;
|
|
303
303
|
}>>;
|
|
304
304
|
}
|
|
305
305
|
//#endregion
|
|
306
|
-
//#region src/api-notifications/schemas/notificationContactPreferencesSchema.d.ts
|
|
307
|
-
declare const notificationContactPreferencesSchema:
|
|
308
|
-
language:
|
|
309
|
-
exclude:
|
|
306
|
+
//#region ../../src/api-notifications/schemas/notificationContactPreferencesSchema.d.ts
|
|
307
|
+
declare const notificationContactPreferencesSchema: alepha45.TObject<{
|
|
308
|
+
language: alepha45.TOptional<alepha45.TString>;
|
|
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
|
*
|
|
@@ -321,7 +321,7 @@ type NotificationContactPreferences = Static<typeof notificationContactPreferenc
|
|
|
321
321
|
*
|
|
322
322
|
* @module alepha.api.notifications
|
|
323
323
|
*/
|
|
324
|
-
declare const AlephaApiNotifications:
|
|
324
|
+
declare const AlephaApiNotifications: alepha45.Service<alepha45.Module>;
|
|
325
325
|
//#endregion
|
|
326
326
|
export { $notification, AlephaApiNotifications, NotificationContactPreferences, NotificationController, NotificationCreate, NotificationEntity, NotificationJobs, NotificationMessage, NotificationPrimitive, NotificationPrimitiveOptions, NotificationPushOptions, NotificationQuery, NotificationQueues, NotificationSenderService, NotificationService, notificationContactPreferencesSchema, notificationCreateSchema, notificationQuerySchema, notificationServiceEnvSchema, notifications };
|
|
327
327
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -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: []
|