alepha 0.10.7 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/files.d.ts +172 -235
- package/api/jobs.d.ts +133 -208
- package/api/notifications.d.ts +112 -225
- package/api/users.d.ts +499 -786
- package/batch.d.ts +8 -8
- package/bucket.d.ts +1 -1
- package/cache.d.ts +12 -12
- package/command.d.ts +11 -11
- package/core.d.ts +312 -221
- package/datetime.d.ts +41 -10
- package/lock.d.ts +8 -8
- package/logger.d.ts +19 -9
- package/package.json +52 -65
- package/postgres.d.ts +488 -1172
- package/queue.d.ts +14 -14
- package/react/auth.d.ts +1 -1
- package/react/form.d.ts +33 -22
- package/react/i18n.d.ts +8 -8
- package/react.d.ts +76 -56
- package/retry.d.ts +8 -8
- package/scheduler.d.ts +1 -1
- package/security.d.ts +4 -4
- package/server/cookies.d.ts +10 -10
- package/server/health.d.ts +31 -8
- package/server/links.d.ts +3 -3
- package/server/multipart.d.ts +2 -2
- package/server/swagger.d.ts +4 -0
- package/server.d.ts +43 -42
- package/topic.d.ts +17 -17
- package/ui.d.ts +365 -46
- package/vite.d.ts +7 -2
package/api/notifications.d.ts
CHANGED
|
@@ -1,76 +1,39 @@
|
|
|
1
1
|
import * as _alepha_core1 from "alepha";
|
|
2
|
-
import { Alepha, Descriptor, KIND, Static, TObject } from "alepha";
|
|
2
|
+
import { Alepha, Descriptor, KIND, Static, StaticEncode, TObject } from "alepha";
|
|
3
3
|
import * as _alepha_batch0 from "alepha/batch";
|
|
4
4
|
import { DateTimeProvider } from "alepha/datetime";
|
|
5
5
|
import * as _alepha_logger0 from "alepha/logger";
|
|
6
|
-
import * as
|
|
6
|
+
import * as _alepha_postgres0 from "alepha/postgres";
|
|
7
7
|
import * as _alepha_queue0 from "alepha/queue";
|
|
8
8
|
import { EmailProvider } from "alepha/email";
|
|
9
|
-
import * as
|
|
9
|
+
import * as typebox6 from "typebox";
|
|
10
|
+
import * as dayjs0 from "dayjs";
|
|
10
11
|
|
|
11
12
|
//#region src/controllers/NotificationController.d.ts
|
|
12
13
|
declare class NotificationController {}
|
|
13
14
|
//#endregion
|
|
14
15
|
//#region src/entities/notifications.d.ts
|
|
15
|
-
declare const notifications:
|
|
16
|
-
id:
|
|
17
|
-
version:
|
|
18
|
-
createdAt:
|
|
19
|
-
updatedAt:
|
|
20
|
-
type:
|
|
21
|
-
template:
|
|
22
|
-
category:
|
|
23
|
-
critical:
|
|
24
|
-
sensitive:
|
|
25
|
-
contact:
|
|
26
|
-
variables:
|
|
27
|
-
scheduledAt:
|
|
28
|
-
sentAt:
|
|
29
|
-
error:
|
|
30
|
-
at:
|
|
31
|
-
name:
|
|
32
|
-
message:
|
|
33
|
-
}>>;
|
|
34
|
-
}>, _alepha_postgres84.FromSchema<typebox93.TObject<{
|
|
35
|
-
id: _alepha_postgres84.PgAttr<_alepha_postgres84.PgAttr<typebox93.TString, typeof _alepha_postgres84.PG_PRIMARY_KEY>, typeof _alepha_postgres84.PG_DEFAULT>;
|
|
36
|
-
version: _alepha_postgres84.PgAttr<_alepha_postgres84.PgAttr<typebox93.TInteger, typeof _alepha_postgres84.PG_VERSION>, typeof _alepha_postgres84.PG_DEFAULT>;
|
|
37
|
-
createdAt: _alepha_postgres84.PgAttr<_alepha_postgres84.PgAttr<typebox93.TString, typeof _alepha_postgres84.PG_CREATED_AT>, typeof _alepha_postgres84.PG_DEFAULT>;
|
|
38
|
-
updatedAt: _alepha_postgres84.PgAttr<_alepha_postgres84.PgAttr<typebox93.TString, typeof _alepha_postgres84.PG_UPDATED_AT>, typeof _alepha_postgres84.PG_DEFAULT>;
|
|
39
|
-
type: typebox93.TUnsafe<"email" | "sms">;
|
|
40
|
-
template: typebox93.TString;
|
|
41
|
-
category: typebox93.TOptional<typebox93.TString>;
|
|
42
|
-
critical: typebox93.TOptional<typebox93.TBoolean>;
|
|
43
|
-
sensitive: typebox93.TOptional<typebox93.TBoolean>;
|
|
44
|
-
contact: typebox93.TString;
|
|
45
|
-
variables: typebox93.TOptional<typebox93.TRecord<"^.*$", typebox93.TAny>>;
|
|
46
|
-
scheduledAt: typebox93.TOptional<typebox93.TString>;
|
|
47
|
-
sentAt: typebox93.TOptional<typebox93.TString>;
|
|
48
|
-
error: typebox93.TOptional<typebox93.TObject<{
|
|
49
|
-
at: typebox93.TString;
|
|
50
|
-
name: typebox93.TString;
|
|
51
|
-
message: typebox93.TString;
|
|
52
|
-
}>>;
|
|
53
|
-
}>>>, typebox93.TObject<{
|
|
54
|
-
id: _alepha_postgres84.PgAttr<_alepha_postgres84.PgAttr<typebox93.TString, typeof _alepha_postgres84.PG_PRIMARY_KEY>, typeof _alepha_postgres84.PG_DEFAULT>;
|
|
55
|
-
version: _alepha_postgres84.PgAttr<_alepha_postgres84.PgAttr<typebox93.TInteger, typeof _alepha_postgres84.PG_VERSION>, typeof _alepha_postgres84.PG_DEFAULT>;
|
|
56
|
-
createdAt: _alepha_postgres84.PgAttr<_alepha_postgres84.PgAttr<typebox93.TString, typeof _alepha_postgres84.PG_CREATED_AT>, typeof _alepha_postgres84.PG_DEFAULT>;
|
|
57
|
-
updatedAt: _alepha_postgres84.PgAttr<_alepha_postgres84.PgAttr<typebox93.TString, typeof _alepha_postgres84.PG_UPDATED_AT>, typeof _alepha_postgres84.PG_DEFAULT>;
|
|
58
|
-
type: typebox93.TUnsafe<"email" | "sms">;
|
|
59
|
-
template: typebox93.TString;
|
|
60
|
-
category: typebox93.TOptional<typebox93.TString>;
|
|
61
|
-
critical: typebox93.TOptional<typebox93.TBoolean>;
|
|
62
|
-
sensitive: typebox93.TOptional<typebox93.TBoolean>;
|
|
63
|
-
contact: typebox93.TString;
|
|
64
|
-
variables: typebox93.TOptional<typebox93.TRecord<"^.*$", typebox93.TAny>>;
|
|
65
|
-
scheduledAt: typebox93.TOptional<typebox93.TString>;
|
|
66
|
-
sentAt: typebox93.TOptional<typebox93.TString>;
|
|
67
|
-
error: typebox93.TOptional<typebox93.TObject<{
|
|
68
|
-
at: typebox93.TString;
|
|
69
|
-
name: typebox93.TString;
|
|
70
|
-
message: typebox93.TString;
|
|
16
|
+
declare const notifications: _alepha_postgres0.EntityDescriptor<typebox6.TObject<{
|
|
17
|
+
id: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox6.TString, typeof _alepha_postgres0.PG_PRIMARY_KEY>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
18
|
+
version: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox6.TInteger, typeof _alepha_postgres0.PG_VERSION>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
19
|
+
createdAt: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox6.TCodec<typebox6.TString, dayjs0.Dayjs>, typeof _alepha_postgres0.PG_CREATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
20
|
+
updatedAt: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox6.TCodec<typebox6.TString, dayjs0.Dayjs>, typeof _alepha_postgres0.PG_UPDATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
21
|
+
type: typebox6.TUnsafe<"email" | "sms">;
|
|
22
|
+
template: typebox6.TString;
|
|
23
|
+
category: typebox6.TOptional<typebox6.TString>;
|
|
24
|
+
critical: typebox6.TOptional<typebox6.TBoolean>;
|
|
25
|
+
sensitive: typebox6.TOptional<typebox6.TBoolean>;
|
|
26
|
+
contact: typebox6.TString;
|
|
27
|
+
variables: typebox6.TOptional<typebox6.TRecord<"^.*$", typebox6.TAny>>;
|
|
28
|
+
scheduledAt: typebox6.TOptional<typebox6.TCodec<typebox6.TString, dayjs0.Dayjs>>;
|
|
29
|
+
sentAt: typebox6.TOptional<typebox6.TCodec<typebox6.TString, dayjs0.Dayjs>>;
|
|
30
|
+
error: typebox6.TOptional<typebox6.TObject<{
|
|
31
|
+
at: typebox6.TCodec<typebox6.TString, dayjs0.Dayjs>;
|
|
32
|
+
name: typebox6.TString;
|
|
33
|
+
message: typebox6.TString;
|
|
71
34
|
}>>;
|
|
72
35
|
}>>;
|
|
73
|
-
type NotificationEntity = Static<typeof notifications
|
|
36
|
+
type NotificationEntity = Static<typeof notifications.schema>;
|
|
74
37
|
//#endregion
|
|
75
38
|
//#region src/providers/SmsProvider.d.ts
|
|
76
39
|
declare abstract class SmsProvider {
|
|
@@ -85,62 +48,24 @@ interface SmsSendOptions {
|
|
|
85
48
|
declare class NotificationSenderService {
|
|
86
49
|
protected readonly alepha: Alepha;
|
|
87
50
|
protected readonly log: _alepha_logger0.Logger;
|
|
88
|
-
protected readonly notificationRepository:
|
|
89
|
-
id:
|
|
90
|
-
version:
|
|
91
|
-
createdAt:
|
|
92
|
-
updatedAt:
|
|
93
|
-
type:
|
|
94
|
-
template:
|
|
95
|
-
category:
|
|
96
|
-
critical:
|
|
97
|
-
sensitive:
|
|
98
|
-
contact:
|
|
99
|
-
variables:
|
|
100
|
-
scheduledAt:
|
|
101
|
-
sentAt:
|
|
102
|
-
error:
|
|
103
|
-
at:
|
|
104
|
-
name:
|
|
105
|
-
message:
|
|
106
|
-
}>>;
|
|
107
|
-
}>, _alepha_postgres84.FromSchema<typebox93.TObject<{
|
|
108
|
-
id: _alepha_postgres84.PgAttr<_alepha_postgres84.PgAttr<typebox93.TString, typeof _alepha_postgres84.PG_PRIMARY_KEY>, typeof _alepha_postgres84.PG_DEFAULT>;
|
|
109
|
-
version: _alepha_postgres84.PgAttr<_alepha_postgres84.PgAttr<typebox93.TInteger, typeof _alepha_postgres84.PG_VERSION>, typeof _alepha_postgres84.PG_DEFAULT>;
|
|
110
|
-
createdAt: _alepha_postgres84.PgAttr<_alepha_postgres84.PgAttr<typebox93.TString, typeof _alepha_postgres84.PG_CREATED_AT>, typeof _alepha_postgres84.PG_DEFAULT>;
|
|
111
|
-
updatedAt: _alepha_postgres84.PgAttr<_alepha_postgres84.PgAttr<typebox93.TString, typeof _alepha_postgres84.PG_UPDATED_AT>, typeof _alepha_postgres84.PG_DEFAULT>;
|
|
112
|
-
type: typebox93.TUnsafe<"email" | "sms">;
|
|
113
|
-
template: typebox93.TString;
|
|
114
|
-
category: typebox93.TOptional<typebox93.TString>;
|
|
115
|
-
critical: typebox93.TOptional<typebox93.TBoolean>;
|
|
116
|
-
sensitive: typebox93.TOptional<typebox93.TBoolean>;
|
|
117
|
-
contact: typebox93.TString;
|
|
118
|
-
variables: typebox93.TOptional<typebox93.TRecord<"^.*$", typebox93.TAny>>;
|
|
119
|
-
scheduledAt: typebox93.TOptional<typebox93.TString>;
|
|
120
|
-
sentAt: typebox93.TOptional<typebox93.TString>;
|
|
121
|
-
error: typebox93.TOptional<typebox93.TObject<{
|
|
122
|
-
at: typebox93.TString;
|
|
123
|
-
name: typebox93.TString;
|
|
124
|
-
message: typebox93.TString;
|
|
125
|
-
}>>;
|
|
126
|
-
}>>>, typebox93.TObject<{
|
|
127
|
-
id: _alepha_postgres84.PgAttr<_alepha_postgres84.PgAttr<typebox93.TString, typeof _alepha_postgres84.PG_PRIMARY_KEY>, typeof _alepha_postgres84.PG_DEFAULT>;
|
|
128
|
-
version: _alepha_postgres84.PgAttr<_alepha_postgres84.PgAttr<typebox93.TInteger, typeof _alepha_postgres84.PG_VERSION>, typeof _alepha_postgres84.PG_DEFAULT>;
|
|
129
|
-
createdAt: _alepha_postgres84.PgAttr<_alepha_postgres84.PgAttr<typebox93.TString, typeof _alepha_postgres84.PG_CREATED_AT>, typeof _alepha_postgres84.PG_DEFAULT>;
|
|
130
|
-
updatedAt: _alepha_postgres84.PgAttr<_alepha_postgres84.PgAttr<typebox93.TString, typeof _alepha_postgres84.PG_UPDATED_AT>, typeof _alepha_postgres84.PG_DEFAULT>;
|
|
131
|
-
type: typebox93.TUnsafe<"email" | "sms">;
|
|
132
|
-
template: typebox93.TString;
|
|
133
|
-
category: typebox93.TOptional<typebox93.TString>;
|
|
134
|
-
critical: typebox93.TOptional<typebox93.TBoolean>;
|
|
135
|
-
sensitive: typebox93.TOptional<typebox93.TBoolean>;
|
|
136
|
-
contact: typebox93.TString;
|
|
137
|
-
variables: typebox93.TOptional<typebox93.TRecord<"^.*$", typebox93.TAny>>;
|
|
138
|
-
scheduledAt: typebox93.TOptional<typebox93.TString>;
|
|
139
|
-
sentAt: typebox93.TOptional<typebox93.TString>;
|
|
140
|
-
error: typebox93.TOptional<typebox93.TObject<{
|
|
141
|
-
at: typebox93.TString;
|
|
142
|
-
name: typebox93.TString;
|
|
143
|
-
message: typebox93.TString;
|
|
51
|
+
protected readonly notificationRepository: _alepha_postgres0.RepositoryDescriptor<typebox6.TObject<{
|
|
52
|
+
id: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox6.TString, typeof _alepha_postgres0.PG_PRIMARY_KEY>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
53
|
+
version: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox6.TInteger, typeof _alepha_postgres0.PG_VERSION>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
54
|
+
createdAt: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox6.TCodec<typebox6.TString, dayjs0.Dayjs>, typeof _alepha_postgres0.PG_CREATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
55
|
+
updatedAt: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox6.TCodec<typebox6.TString, dayjs0.Dayjs>, typeof _alepha_postgres0.PG_UPDATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
56
|
+
type: typebox6.TUnsafe<"email" | "sms">;
|
|
57
|
+
template: typebox6.TString;
|
|
58
|
+
category: typebox6.TOptional<typebox6.TString>;
|
|
59
|
+
critical: typebox6.TOptional<typebox6.TBoolean>;
|
|
60
|
+
sensitive: typebox6.TOptional<typebox6.TBoolean>;
|
|
61
|
+
contact: typebox6.TString;
|
|
62
|
+
variables: typebox6.TOptional<typebox6.TRecord<"^.*$", typebox6.TAny>>;
|
|
63
|
+
scheduledAt: typebox6.TOptional<typebox6.TCodec<typebox6.TString, dayjs0.Dayjs>>;
|
|
64
|
+
sentAt: typebox6.TOptional<typebox6.TCodec<typebox6.TString, dayjs0.Dayjs>>;
|
|
65
|
+
error: typebox6.TOptional<typebox6.TObject<{
|
|
66
|
+
at: typebox6.TCodec<typebox6.TString, dayjs0.Dayjs>;
|
|
67
|
+
name: typebox6.TString;
|
|
68
|
+
message: typebox6.TString;
|
|
144
69
|
}>>;
|
|
145
70
|
}>>;
|
|
146
71
|
protected readonly dateTimeProvider: DateTimeProvider;
|
|
@@ -157,7 +82,7 @@ declare class NotificationSenderService {
|
|
|
157
82
|
body: string;
|
|
158
83
|
};
|
|
159
84
|
protected load(notification: NotificationEntity): {
|
|
160
|
-
template: NotificationDescriptor<
|
|
85
|
+
template: NotificationDescriptor<typebox6.TObject<typebox6.TProperties>>;
|
|
161
86
|
variables: Record<string, any>;
|
|
162
87
|
contact: string;
|
|
163
88
|
};
|
|
@@ -166,17 +91,17 @@ declare class NotificationSenderService {
|
|
|
166
91
|
//#region src/queues/NotificationQueues.d.ts
|
|
167
92
|
declare class NotificationQueues {
|
|
168
93
|
protected readonly notificationSenderService: NotificationSenderService;
|
|
169
|
-
readonly processNotification: _alepha_queue0.QueueDescriptor<
|
|
170
|
-
notificationId:
|
|
94
|
+
readonly processNotification: _alepha_queue0.QueueDescriptor<typebox6.TObject<{
|
|
95
|
+
notificationId: typebox6.TString;
|
|
171
96
|
}>>;
|
|
172
97
|
}
|
|
173
98
|
//#endregion
|
|
174
99
|
//#region src/schemas/notificationCreateSchema.d.ts
|
|
175
|
-
declare const notificationCreateSchema:
|
|
176
|
-
type:
|
|
177
|
-
template:
|
|
178
|
-
contact:
|
|
179
|
-
variables:
|
|
100
|
+
declare const notificationCreateSchema: typebox6.TObject<{
|
|
101
|
+
type: typebox6.TUnsafe<"email" | "sms">;
|
|
102
|
+
template: typebox6.TString;
|
|
103
|
+
contact: typebox6.TString;
|
|
104
|
+
variables: typebox6.TOptional<typebox6.TRecord<"^.*$", typebox6.TAny>>;
|
|
180
105
|
}>;
|
|
181
106
|
type NotificationCreate = Static<typeof notificationCreateSchema>;
|
|
182
107
|
//#endregion
|
|
@@ -193,110 +118,72 @@ declare class NotificationService {
|
|
|
193
118
|
protected readonly env: {
|
|
194
119
|
NOTIFICATION_IMMEDIATE?: boolean | undefined;
|
|
195
120
|
};
|
|
196
|
-
protected readonly notificationRepository:
|
|
197
|
-
id:
|
|
198
|
-
version:
|
|
199
|
-
createdAt:
|
|
200
|
-
updatedAt:
|
|
201
|
-
type:
|
|
202
|
-
template:
|
|
203
|
-
category: _alepha_core1.TOptional<
|
|
204
|
-
critical: _alepha_core1.TOptional<_alepha_core1.TBoolean>;
|
|
205
|
-
sensitive: _alepha_core1.TOptional<_alepha_core1.TBoolean>;
|
|
206
|
-
contact: typebox93.TString;
|
|
207
|
-
variables: _alepha_core1.TOptional<typebox93.TRecord<"^.*$", typebox93.TAny>>;
|
|
208
|
-
scheduledAt: _alepha_core1.TOptional<typebox93.TString>;
|
|
209
|
-
sentAt: _alepha_core1.TOptional<typebox93.TString>;
|
|
210
|
-
error: _alepha_core1.TOptional<_alepha_core1.TObject<{
|
|
211
|
-
at: typebox93.TString;
|
|
212
|
-
name: typebox93.TString;
|
|
213
|
-
message: typebox93.TString;
|
|
214
|
-
}>>;
|
|
215
|
-
}>, _alepha_postgres84.FromSchema<_alepha_core1.TObject<{
|
|
216
|
-
id: _alepha_postgres84.PgAttr<_alepha_postgres84.PgAttr<typebox93.TString, typeof _alepha_postgres84.PG_PRIMARY_KEY>, typeof _alepha_postgres84.PG_DEFAULT>;
|
|
217
|
-
version: _alepha_postgres84.PgAttr<_alepha_postgres84.PgAttr<typebox93.TInteger, typeof _alepha_postgres84.PG_VERSION>, typeof _alepha_postgres84.PG_DEFAULT>;
|
|
218
|
-
createdAt: _alepha_postgres84.PgAttr<_alepha_postgres84.PgAttr<typebox93.TString, typeof _alepha_postgres84.PG_CREATED_AT>, typeof _alepha_postgres84.PG_DEFAULT>;
|
|
219
|
-
updatedAt: _alepha_postgres84.PgAttr<_alepha_postgres84.PgAttr<typebox93.TString, typeof _alepha_postgres84.PG_UPDATED_AT>, typeof _alepha_postgres84.PG_DEFAULT>;
|
|
220
|
-
type: typebox93.TUnsafe<"email" | "sms">;
|
|
221
|
-
template: typebox93.TString;
|
|
222
|
-
category: _alepha_core1.TOptional<typebox93.TString>;
|
|
223
|
-
critical: _alepha_core1.TOptional<_alepha_core1.TBoolean>;
|
|
224
|
-
sensitive: _alepha_core1.TOptional<_alepha_core1.TBoolean>;
|
|
225
|
-
contact: typebox93.TString;
|
|
226
|
-
variables: _alepha_core1.TOptional<typebox93.TRecord<"^.*$", typebox93.TAny>>;
|
|
227
|
-
scheduledAt: _alepha_core1.TOptional<typebox93.TString>;
|
|
228
|
-
sentAt: _alepha_core1.TOptional<typebox93.TString>;
|
|
229
|
-
error: _alepha_core1.TOptional<_alepha_core1.TObject<{
|
|
230
|
-
at: typebox93.TString;
|
|
231
|
-
name: typebox93.TString;
|
|
232
|
-
message: typebox93.TString;
|
|
233
|
-
}>>;
|
|
234
|
-
}>>>, _alepha_core1.TObject<{
|
|
235
|
-
id: _alepha_postgres84.PgAttr<_alepha_postgres84.PgAttr<typebox93.TString, typeof _alepha_postgres84.PG_PRIMARY_KEY>, typeof _alepha_postgres84.PG_DEFAULT>;
|
|
236
|
-
version: _alepha_postgres84.PgAttr<_alepha_postgres84.PgAttr<typebox93.TInteger, typeof _alepha_postgres84.PG_VERSION>, typeof _alepha_postgres84.PG_DEFAULT>;
|
|
237
|
-
createdAt: _alepha_postgres84.PgAttr<_alepha_postgres84.PgAttr<typebox93.TString, typeof _alepha_postgres84.PG_CREATED_AT>, typeof _alepha_postgres84.PG_DEFAULT>;
|
|
238
|
-
updatedAt: _alepha_postgres84.PgAttr<_alepha_postgres84.PgAttr<typebox93.TString, typeof _alepha_postgres84.PG_UPDATED_AT>, typeof _alepha_postgres84.PG_DEFAULT>;
|
|
239
|
-
type: typebox93.TUnsafe<"email" | "sms">;
|
|
240
|
-
template: typebox93.TString;
|
|
241
|
-
category: _alepha_core1.TOptional<typebox93.TString>;
|
|
121
|
+
protected readonly notificationRepository: _alepha_postgres0.RepositoryDescriptor<_alepha_core1.TObject<{
|
|
122
|
+
id: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox6.TString, typeof _alepha_postgres0.PG_PRIMARY_KEY>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
123
|
+
version: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox6.TInteger, typeof _alepha_postgres0.PG_VERSION>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
124
|
+
createdAt: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox6.TCodec<typebox6.TString, dayjs0.Dayjs>, typeof _alepha_postgres0.PG_CREATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
125
|
+
updatedAt: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox6.TCodec<typebox6.TString, dayjs0.Dayjs>, typeof _alepha_postgres0.PG_UPDATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
126
|
+
type: typebox6.TUnsafe<"email" | "sms">;
|
|
127
|
+
template: typebox6.TString;
|
|
128
|
+
category: _alepha_core1.TOptional<typebox6.TString>;
|
|
242
129
|
critical: _alepha_core1.TOptional<_alepha_core1.TBoolean>;
|
|
243
130
|
sensitive: _alepha_core1.TOptional<_alepha_core1.TBoolean>;
|
|
244
|
-
contact:
|
|
245
|
-
variables: _alepha_core1.TOptional<
|
|
246
|
-
scheduledAt: _alepha_core1.TOptional<
|
|
247
|
-
sentAt: _alepha_core1.TOptional<
|
|
131
|
+
contact: typebox6.TString;
|
|
132
|
+
variables: _alepha_core1.TOptional<typebox6.TRecord<"^.*$", typebox6.TAny>>;
|
|
133
|
+
scheduledAt: _alepha_core1.TOptional<typebox6.TCodec<typebox6.TString, dayjs0.Dayjs>>;
|
|
134
|
+
sentAt: _alepha_core1.TOptional<typebox6.TCodec<typebox6.TString, dayjs0.Dayjs>>;
|
|
248
135
|
error: _alepha_core1.TOptional<_alepha_core1.TObject<{
|
|
249
|
-
at:
|
|
250
|
-
name:
|
|
251
|
-
message:
|
|
136
|
+
at: typebox6.TCodec<typebox6.TString, dayjs0.Dayjs>;
|
|
137
|
+
name: typebox6.TString;
|
|
138
|
+
message: typebox6.TString;
|
|
252
139
|
}>>;
|
|
253
140
|
}>>;
|
|
254
141
|
protected readonly dateTimeProvider: DateTimeProvider;
|
|
255
142
|
protected readonly notificationQueues: NotificationQueues;
|
|
256
143
|
protected readonly notificationSenderService: NotificationSenderService;
|
|
257
144
|
readonly notificationBatch: _alepha_batch0.BatchDescriptor<_alepha_core1.TObject<{
|
|
258
|
-
type:
|
|
259
|
-
template:
|
|
260
|
-
contact:
|
|
261
|
-
variables: _alepha_core1.TOptional<
|
|
145
|
+
type: typebox6.TUnsafe<"email" | "sms">;
|
|
146
|
+
template: typebox6.TString;
|
|
147
|
+
contact: typebox6.TString;
|
|
148
|
+
variables: _alepha_core1.TOptional<typebox6.TRecord<"^.*$", typebox6.TAny>>;
|
|
262
149
|
}>, Promise<void>>;
|
|
263
|
-
findNotificationById(id: string): Promise<
|
|
264
|
-
id:
|
|
265
|
-
version:
|
|
266
|
-
createdAt:
|
|
267
|
-
updatedAt:
|
|
268
|
-
type:
|
|
269
|
-
template:
|
|
270
|
-
category: _alepha_core1.TOptional<
|
|
150
|
+
findNotificationById(id: string): Promise<_alepha_postgres0.PgStatic<_alepha_core1.TObject<{
|
|
151
|
+
id: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox6.TString, typeof _alepha_postgres0.PG_PRIMARY_KEY>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
152
|
+
version: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox6.TInteger, typeof _alepha_postgres0.PG_VERSION>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
153
|
+
createdAt: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox6.TCodec<typebox6.TString, dayjs0.Dayjs>, typeof _alepha_postgres0.PG_CREATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
154
|
+
updatedAt: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox6.TCodec<typebox6.TString, dayjs0.Dayjs>, typeof _alepha_postgres0.PG_UPDATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
155
|
+
type: typebox6.TUnsafe<"email" | "sms">;
|
|
156
|
+
template: typebox6.TString;
|
|
157
|
+
category: _alepha_core1.TOptional<typebox6.TString>;
|
|
271
158
|
critical: _alepha_core1.TOptional<_alepha_core1.TBoolean>;
|
|
272
159
|
sensitive: _alepha_core1.TOptional<_alepha_core1.TBoolean>;
|
|
273
|
-
contact:
|
|
274
|
-
variables: _alepha_core1.TOptional<
|
|
275
|
-
scheduledAt: _alepha_core1.TOptional<
|
|
276
|
-
sentAt: _alepha_core1.TOptional<
|
|
160
|
+
contact: typebox6.TString;
|
|
161
|
+
variables: _alepha_core1.TOptional<typebox6.TRecord<"^.*$", typebox6.TAny>>;
|
|
162
|
+
scheduledAt: _alepha_core1.TOptional<typebox6.TCodec<typebox6.TString, dayjs0.Dayjs>>;
|
|
163
|
+
sentAt: _alepha_core1.TOptional<typebox6.TCodec<typebox6.TString, dayjs0.Dayjs>>;
|
|
277
164
|
error: _alepha_core1.TOptional<_alepha_core1.TObject<{
|
|
278
|
-
at:
|
|
279
|
-
name:
|
|
280
|
-
message:
|
|
165
|
+
at: typebox6.TCodec<typebox6.TString, dayjs0.Dayjs>;
|
|
166
|
+
name: typebox6.TString;
|
|
167
|
+
message: typebox6.TString;
|
|
281
168
|
}>>;
|
|
282
|
-
}>,
|
|
283
|
-
id:
|
|
284
|
-
version:
|
|
285
|
-
createdAt:
|
|
286
|
-
updatedAt:
|
|
287
|
-
type:
|
|
288
|
-
template:
|
|
289
|
-
category: _alepha_core1.TOptional<
|
|
169
|
+
}>, _alepha_postgres0.PgRelationMap<_alepha_core1.TObject<{
|
|
170
|
+
id: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox6.TString, typeof _alepha_postgres0.PG_PRIMARY_KEY>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
171
|
+
version: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox6.TInteger, typeof _alepha_postgres0.PG_VERSION>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
172
|
+
createdAt: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox6.TCodec<typebox6.TString, dayjs0.Dayjs>, typeof _alepha_postgres0.PG_CREATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
173
|
+
updatedAt: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox6.TCodec<typebox6.TString, dayjs0.Dayjs>, typeof _alepha_postgres0.PG_UPDATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
174
|
+
type: typebox6.TUnsafe<"email" | "sms">;
|
|
175
|
+
template: typebox6.TString;
|
|
176
|
+
category: _alepha_core1.TOptional<typebox6.TString>;
|
|
290
177
|
critical: _alepha_core1.TOptional<_alepha_core1.TBoolean>;
|
|
291
178
|
sensitive: _alepha_core1.TOptional<_alepha_core1.TBoolean>;
|
|
292
|
-
contact:
|
|
293
|
-
variables: _alepha_core1.TOptional<
|
|
294
|
-
scheduledAt: _alepha_core1.TOptional<
|
|
295
|
-
sentAt: _alepha_core1.TOptional<
|
|
179
|
+
contact: typebox6.TString;
|
|
180
|
+
variables: _alepha_core1.TOptional<typebox6.TRecord<"^.*$", typebox6.TAny>>;
|
|
181
|
+
scheduledAt: _alepha_core1.TOptional<typebox6.TCodec<typebox6.TString, dayjs0.Dayjs>>;
|
|
182
|
+
sentAt: _alepha_core1.TOptional<typebox6.TCodec<typebox6.TString, dayjs0.Dayjs>>;
|
|
296
183
|
error: _alepha_core1.TOptional<_alepha_core1.TObject<{
|
|
297
|
-
at:
|
|
298
|
-
name:
|
|
299
|
-
message:
|
|
184
|
+
at: typebox6.TCodec<typebox6.TString, dayjs0.Dayjs>;
|
|
185
|
+
name: typebox6.TString;
|
|
186
|
+
message: typebox6.TString;
|
|
300
187
|
}>>;
|
|
301
188
|
}>>>>;
|
|
302
189
|
/**
|
|
@@ -310,34 +197,34 @@ declare const $notification: {
|
|
|
310
197
|
<T extends TObject>(options: NotificationDescriptorOptions<T>): NotificationDescriptor<T>;
|
|
311
198
|
[KIND]: typeof NotificationDescriptor;
|
|
312
199
|
};
|
|
313
|
-
interface NotificationDescriptorOptions<T
|
|
200
|
+
interface NotificationDescriptorOptions<T extends TObject> extends NotificationMessage<T> {
|
|
314
201
|
name?: string;
|
|
315
202
|
description?: string;
|
|
316
203
|
category?: string;
|
|
317
204
|
critical?: boolean;
|
|
318
205
|
sensitive?: boolean;
|
|
319
206
|
translations?: {
|
|
320
|
-
[lang: string]: NotificationMessage<T
|
|
207
|
+
[lang: string]: NotificationMessage<T>;
|
|
321
208
|
};
|
|
322
|
-
schema: T
|
|
209
|
+
schema: T;
|
|
323
210
|
}
|
|
324
|
-
declare class NotificationDescriptor<T
|
|
211
|
+
declare class NotificationDescriptor<T extends TObject> extends Descriptor<NotificationDescriptorOptions<T>> {
|
|
325
212
|
protected readonly notificationService: NotificationService;
|
|
326
213
|
get name(): string;
|
|
327
|
-
push(options: NotificationPushOptions<T
|
|
328
|
-
configure(options: Partial<NotificationDescriptorOptions<T
|
|
214
|
+
push(options: NotificationPushOptions<T>): Promise<void>;
|
|
215
|
+
configure(options: Partial<NotificationDescriptorOptions<T>>): void;
|
|
329
216
|
}
|
|
330
|
-
interface NotificationPushOptions<T
|
|
331
|
-
variables:
|
|
217
|
+
interface NotificationPushOptions<T extends TObject> {
|
|
218
|
+
variables: StaticEncode<T>;
|
|
332
219
|
contact: string;
|
|
333
220
|
}
|
|
334
|
-
interface NotificationMessage<T
|
|
221
|
+
interface NotificationMessage<T extends TObject> {
|
|
335
222
|
email?: {
|
|
336
223
|
subject: string;
|
|
337
|
-
body: string | ((variables: Static<T
|
|
224
|
+
body: string | ((variables: Static<T>) => string);
|
|
338
225
|
};
|
|
339
226
|
sms?: {
|
|
340
|
-
message: string | ((variables: Static<T
|
|
227
|
+
message: string | ((variables: Static<T>) => string);
|
|
341
228
|
};
|
|
342
229
|
}
|
|
343
230
|
//#endregion
|
|
@@ -356,9 +243,9 @@ declare class MemorySmsProvider extends SmsProvider {
|
|
|
356
243
|
}
|
|
357
244
|
//#endregion
|
|
358
245
|
//#region src/schemas/notificationContactPreferencesSchema.d.ts
|
|
359
|
-
declare const notificationContactPreferencesSchema:
|
|
360
|
-
language:
|
|
361
|
-
exclude:
|
|
246
|
+
declare const notificationContactPreferencesSchema: typebox6.TObject<{
|
|
247
|
+
language: typebox6.TOptional<typebox6.TString>;
|
|
248
|
+
exclude: typebox6.TArray<typebox6.TString>;
|
|
362
249
|
}>;
|
|
363
250
|
type NotificationContactPreferences = Static<typeof notificationContactPreferencesSchema>;
|
|
364
251
|
//#endregion
|