alepha 0.11.4 → 0.11.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/api/files.d.ts +439 -1
- package/api/jobs.d.ts +290 -1
- package/api/notifications.d.ts +264 -1
- package/api/users.d.ts +924 -1
- package/batch.d.ts +154 -1
- package/bucket.d.ts +520 -1
- package/cache/redis.d.ts +40 -1
- package/cache.d.ts +288 -1
- package/command.d.ts +269 -1
- package/core.d.ts +1877 -1
- package/datetime.d.ts +1 -1
- package/devtools.d.ts +408 -1
- package/email.d.ts +187 -1
- package/fake.d.ts +73 -1
- package/file.d.ts +528 -1
- package/lock/redis.d.ts +24 -1
- package/lock.d.ts +552 -1
- package/logger.d.ts +288 -1
- package/package.json +51 -51
- package/postgres.d.ts +2146 -1
- package/queue/redis.d.ts +29 -1
- package/queue.d.ts +760 -1
- package/react/auth.d.ts +504 -1
- package/react/form.d.ts +208 -1
- package/react/head.d.ts +120 -1
- package/react/i18n.d.ts +168 -1
- package/react.d.ts +1261 -1
- package/redis.d.ts +82 -1
- package/retry.d.ts +84 -21
- package/scheduler.d.ts +145 -1
- package/security.d.ts +586 -1
- package/server/cache.d.ts +163 -1
- package/server/compress.d.ts +38 -1
- package/server/cookies.d.ts +144 -1
- package/server/cors.d.ts +45 -1
- package/server/health.d.ts +59 -1
- package/server/helmet.d.ts +98 -1
- package/server/links.d.ts +322 -1
- package/server/metrics.d.ts +35 -1
- package/server/multipart.d.ts +42 -1
- package/server/proxy.d.ts +234 -1
- package/server/security.d.ts +92 -1
- package/server/static.d.ts +119 -1
- package/server/swagger.d.ts +161 -1
- package/server.d.ts +849 -1
- package/topic/redis.d.ts +42 -1
- package/topic.d.ts +819 -1
- package/ui.d.ts +786 -1
- package/vite.d.ts +186 -1
package/api/jobs.d.ts
CHANGED
|
@@ -1 +1,290 @@
|
|
|
1
|
-
|
|
1
|
+
import * as _alepha_core1 from "alepha";
|
|
2
|
+
import { Alepha, Async, Descriptor, KIND, Static } from "alepha";
|
|
3
|
+
import "alepha/server/security";
|
|
4
|
+
import * as _alepha_postgres0 from "alepha/postgres";
|
|
5
|
+
import * as _alepha_server0 from "alepha/server";
|
|
6
|
+
import * as _alepha_logger0 from "alepha/logger";
|
|
7
|
+
import { DateTime, DateTimeProvider } from "alepha/datetime";
|
|
8
|
+
import * as _alepha_lock0 from "alepha/lock";
|
|
9
|
+
import { CronProvider } from "alepha/scheduler";
|
|
10
|
+
import * as typebox176 from "typebox";
|
|
11
|
+
import * as dayjs0 from "dayjs";
|
|
12
|
+
|
|
13
|
+
//#region src/schemas/jobExecutionQuerySchema.d.ts
|
|
14
|
+
declare const jobExecutionQuerySchema: typebox176.TObject<{
|
|
15
|
+
page: typebox176.TOptional<typebox176.TInteger>;
|
|
16
|
+
size: typebox176.TOptional<typebox176.TInteger>;
|
|
17
|
+
sort: typebox176.TOptional<typebox176.TString>;
|
|
18
|
+
status: typebox176.TOptional<typebox176.TUnsafe<"STARTED" | "FAILED" | "COMPLETED">>;
|
|
19
|
+
job: typebox176.TOptional<typebox176.TString>;
|
|
20
|
+
}>;
|
|
21
|
+
type JobExecutionQuery = Static<typeof jobExecutionQuerySchema>;
|
|
22
|
+
//#endregion
|
|
23
|
+
//#region src/services/JobService.d.ts
|
|
24
|
+
declare class JobService {
|
|
25
|
+
protected readonly alepha: Alepha;
|
|
26
|
+
protected readonly executionRepository: _alepha_postgres0.Repository<typebox176.TObject<{
|
|
27
|
+
id: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox176.TString, typeof _alepha_postgres0.PG_PRIMARY_KEY>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
28
|
+
version: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox176.TInteger, typeof _alepha_postgres0.PG_VERSION>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
29
|
+
createdAt: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox176.TCodec<typebox176.TString, dayjs0.Dayjs>, typeof _alepha_postgres0.PG_CREATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
30
|
+
updatedAt: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox176.TCodec<typebox176.TString, dayjs0.Dayjs>, typeof _alepha_postgres0.PG_UPDATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
31
|
+
finishedAt: typebox176.TOptional<typebox176.TCodec<typebox176.TString, dayjs0.Dayjs>>;
|
|
32
|
+
job: typebox176.TString;
|
|
33
|
+
status: typebox176.TUnsafe<"STARTED" | "FAILED" | "COMPLETED">;
|
|
34
|
+
error: typebox176.TOptional<typebox176.TString>;
|
|
35
|
+
logs: typebox176.TOptional<typebox176.TArray<typebox176.TObject<{
|
|
36
|
+
level: typebox176.TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
|
|
37
|
+
message: typebox176.TString;
|
|
38
|
+
service: typebox176.TString;
|
|
39
|
+
module: typebox176.TString;
|
|
40
|
+
context: typebox176.TOptional<typebox176.TString>;
|
|
41
|
+
app: typebox176.TOptional<typebox176.TString>;
|
|
42
|
+
data: typebox176.TOptional<typebox176.TAny>;
|
|
43
|
+
timestamp: typebox176.TCodec<typebox176.TString, dayjs0.Dayjs>;
|
|
44
|
+
}>>>;
|
|
45
|
+
}>>;
|
|
46
|
+
getJobs(): Promise<string[]>;
|
|
47
|
+
getJobExecutions(query?: JobExecutionQuery): Promise<_alepha_core1.Page<_alepha_postgres0.PgStatic<typebox176.TObject<{
|
|
48
|
+
id: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox176.TString, typeof _alepha_postgres0.PG_PRIMARY_KEY>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
49
|
+
version: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox176.TInteger, typeof _alepha_postgres0.PG_VERSION>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
50
|
+
createdAt: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox176.TCodec<typebox176.TString, dayjs0.Dayjs>, typeof _alepha_postgres0.PG_CREATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
51
|
+
updatedAt: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox176.TCodec<typebox176.TString, dayjs0.Dayjs>, typeof _alepha_postgres0.PG_UPDATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
52
|
+
finishedAt: typebox176.TOptional<typebox176.TCodec<typebox176.TString, dayjs0.Dayjs>>;
|
|
53
|
+
job: typebox176.TString;
|
|
54
|
+
status: typebox176.TUnsafe<"STARTED" | "FAILED" | "COMPLETED">;
|
|
55
|
+
error: typebox176.TOptional<typebox176.TString>;
|
|
56
|
+
logs: typebox176.TOptional<typebox176.TArray<typebox176.TObject<{
|
|
57
|
+
level: typebox176.TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
|
|
58
|
+
message: typebox176.TString;
|
|
59
|
+
service: typebox176.TString;
|
|
60
|
+
module: typebox176.TString;
|
|
61
|
+
context: typebox176.TOptional<typebox176.TString>;
|
|
62
|
+
app: typebox176.TOptional<typebox176.TString>;
|
|
63
|
+
data: typebox176.TOptional<typebox176.TAny>;
|
|
64
|
+
timestamp: typebox176.TCodec<typebox176.TString, dayjs0.Dayjs>;
|
|
65
|
+
}>>>;
|
|
66
|
+
}>, _alepha_postgres0.PgRelationMap<typebox176.TObject<{
|
|
67
|
+
id: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox176.TString, typeof _alepha_postgres0.PG_PRIMARY_KEY>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
68
|
+
version: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox176.TInteger, typeof _alepha_postgres0.PG_VERSION>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
69
|
+
createdAt: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox176.TCodec<typebox176.TString, dayjs0.Dayjs>, typeof _alepha_postgres0.PG_CREATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
70
|
+
updatedAt: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox176.TCodec<typebox176.TString, dayjs0.Dayjs>, typeof _alepha_postgres0.PG_UPDATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
71
|
+
finishedAt: typebox176.TOptional<typebox176.TCodec<typebox176.TString, dayjs0.Dayjs>>;
|
|
72
|
+
job: typebox176.TString;
|
|
73
|
+
status: typebox176.TUnsafe<"STARTED" | "FAILED" | "COMPLETED">;
|
|
74
|
+
error: typebox176.TOptional<typebox176.TString>;
|
|
75
|
+
logs: typebox176.TOptional<typebox176.TArray<typebox176.TObject<{
|
|
76
|
+
level: typebox176.TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
|
|
77
|
+
message: typebox176.TString;
|
|
78
|
+
service: typebox176.TString;
|
|
79
|
+
module: typebox176.TString;
|
|
80
|
+
context: typebox176.TOptional<typebox176.TString>;
|
|
81
|
+
app: typebox176.TOptional<typebox176.TString>;
|
|
82
|
+
data: typebox176.TOptional<typebox176.TAny>;
|
|
83
|
+
timestamp: typebox176.TCodec<typebox176.TString, dayjs0.Dayjs>;
|
|
84
|
+
}>>>;
|
|
85
|
+
}>>>>>;
|
|
86
|
+
triggerJob(name: string): Promise<{
|
|
87
|
+
ok: boolean;
|
|
88
|
+
}>;
|
|
89
|
+
}
|
|
90
|
+
//#endregion
|
|
91
|
+
//#region src/controllers/JobController.d.ts
|
|
92
|
+
declare class JobController {
|
|
93
|
+
protected readonly url: string;
|
|
94
|
+
protected readonly group: string;
|
|
95
|
+
protected readonly jobService: JobService;
|
|
96
|
+
readonly getJobs: _alepha_server0.ActionDescriptorFn<{
|
|
97
|
+
response: typebox176.TArray<typebox176.TString>;
|
|
98
|
+
}>;
|
|
99
|
+
readonly getJobExecutions: _alepha_server0.ActionDescriptorFn<{
|
|
100
|
+
query: typebox176.TObject<{
|
|
101
|
+
page: typebox176.TOptional<typebox176.TInteger>;
|
|
102
|
+
size: typebox176.TOptional<typebox176.TInteger>;
|
|
103
|
+
sort: typebox176.TOptional<typebox176.TString>;
|
|
104
|
+
status: typebox176.TOptional<typebox176.TUnsafe<"STARTED" | "FAILED" | "COMPLETED">>;
|
|
105
|
+
job: typebox176.TOptional<typebox176.TString>;
|
|
106
|
+
}>;
|
|
107
|
+
response: _alepha_core1.TPage<typebox176.TObject<{
|
|
108
|
+
id: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox176.TString, typeof _alepha_postgres0.PG_PRIMARY_KEY>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
109
|
+
version: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox176.TInteger, typeof _alepha_postgres0.PG_VERSION>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
110
|
+
createdAt: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox176.TCodec<typebox176.TString, dayjs0.Dayjs>, typeof _alepha_postgres0.PG_CREATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
111
|
+
updatedAt: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox176.TCodec<typebox176.TString, dayjs0.Dayjs>, typeof _alepha_postgres0.PG_UPDATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
112
|
+
finishedAt: typebox176.TOptional<typebox176.TCodec<typebox176.TString, dayjs0.Dayjs>>;
|
|
113
|
+
job: typebox176.TString;
|
|
114
|
+
status: typebox176.TUnsafe<"STARTED" | "FAILED" | "COMPLETED">;
|
|
115
|
+
error: typebox176.TOptional<typebox176.TString>;
|
|
116
|
+
logs: typebox176.TOptional<typebox176.TArray<typebox176.TObject<{
|
|
117
|
+
level: typebox176.TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
|
|
118
|
+
message: typebox176.TString;
|
|
119
|
+
service: typebox176.TString;
|
|
120
|
+
module: typebox176.TString;
|
|
121
|
+
context: typebox176.TOptional<typebox176.TString>;
|
|
122
|
+
app: typebox176.TOptional<typebox176.TString>;
|
|
123
|
+
data: typebox176.TOptional<typebox176.TAny>;
|
|
124
|
+
timestamp: typebox176.TCodec<typebox176.TString, dayjs0.Dayjs>;
|
|
125
|
+
}>>>;
|
|
126
|
+
}>>;
|
|
127
|
+
}>;
|
|
128
|
+
readonly triggerJob: _alepha_server0.ActionDescriptorFn<{
|
|
129
|
+
body: typebox176.TObject<{
|
|
130
|
+
name: typebox176.TString;
|
|
131
|
+
}>;
|
|
132
|
+
response: typebox176.TObject<{
|
|
133
|
+
ok: typebox176.TBoolean;
|
|
134
|
+
id: typebox176.TOptional<typebox176.TUnion<[typebox176.TString, typebox176.TInteger]>>;
|
|
135
|
+
count: typebox176.TOptional<typebox176.TNumber>;
|
|
136
|
+
}>;
|
|
137
|
+
}>;
|
|
138
|
+
}
|
|
139
|
+
//#endregion
|
|
140
|
+
//#region src/descriptors/$job.d.ts
|
|
141
|
+
/**
|
|
142
|
+
* Job descriptor - a drop-in replacement for $scheduler with built-in execution tracking.
|
|
143
|
+
*/
|
|
144
|
+
declare const $job: {
|
|
145
|
+
(options: JobDescriptorOptions): JobDescriptor;
|
|
146
|
+
[KIND]: typeof JobDescriptor;
|
|
147
|
+
};
|
|
148
|
+
type JobDescriptorOptions = {
|
|
149
|
+
/**
|
|
150
|
+
* Function to run on schedule.
|
|
151
|
+
*/
|
|
152
|
+
handler: (args: JobHandlerArguments) => Async<void>;
|
|
153
|
+
/**
|
|
154
|
+
* Name of the job. Defaults to the function name.
|
|
155
|
+
*/
|
|
156
|
+
name?: string;
|
|
157
|
+
/**
|
|
158
|
+
* Optional description of the job.
|
|
159
|
+
*/
|
|
160
|
+
description?: string;
|
|
161
|
+
/**
|
|
162
|
+
* Cron expression to run the job.
|
|
163
|
+
*/
|
|
164
|
+
cron?: string;
|
|
165
|
+
/**
|
|
166
|
+
* If true, the job will be locked and only one instance will run at a time.
|
|
167
|
+
* You probably need to import {@link AlephaLockRedis} for distributed locking.
|
|
168
|
+
*
|
|
169
|
+
* @default true
|
|
170
|
+
*/
|
|
171
|
+
lock?: boolean;
|
|
172
|
+
};
|
|
173
|
+
declare const envSchema: _alepha_core1.TObject<{
|
|
174
|
+
JOB_PREFIX: _alepha_core1.TOptional<_alepha_core1.TString>;
|
|
175
|
+
}>;
|
|
176
|
+
declare module "alepha" {
|
|
177
|
+
interface Env extends Partial<Static<typeof envSchema>> {}
|
|
178
|
+
}
|
|
179
|
+
declare class JobDescriptor extends Descriptor<JobDescriptorOptions> {
|
|
180
|
+
protected readonly log: _alepha_logger0.Logger;
|
|
181
|
+
protected readonly env: {
|
|
182
|
+
JOB_PREFIX?: string | undefined;
|
|
183
|
+
};
|
|
184
|
+
protected readonly alepha: Alepha;
|
|
185
|
+
protected readonly dateTimeProvider: DateTimeProvider;
|
|
186
|
+
protected readonly cronProvider: CronProvider;
|
|
187
|
+
protected readonly executionRepository: _alepha_postgres0.Repository<_alepha_core1.TObject<{
|
|
188
|
+
id: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<_alepha_core1.TString, typeof _alepha_postgres0.PG_PRIMARY_KEY>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
189
|
+
version: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox176.TInteger, typeof _alepha_postgres0.PG_VERSION>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
190
|
+
createdAt: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox176.TCodec<_alepha_core1.TString, dayjs0.Dayjs>, typeof _alepha_postgres0.PG_CREATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
191
|
+
updatedAt: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox176.TCodec<_alepha_core1.TString, dayjs0.Dayjs>, typeof _alepha_postgres0.PG_UPDATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
192
|
+
finishedAt: _alepha_core1.TOptional<typebox176.TCodec<_alepha_core1.TString, dayjs0.Dayjs>>;
|
|
193
|
+
job: _alepha_core1.TString;
|
|
194
|
+
status: typebox176.TUnsafe<"STARTED" | "FAILED" | "COMPLETED">;
|
|
195
|
+
error: _alepha_core1.TOptional<_alepha_core1.TString>;
|
|
196
|
+
logs: _alepha_core1.TOptional<typebox176.TArray<_alepha_core1.TObject<{
|
|
197
|
+
level: typebox176.TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
|
|
198
|
+
message: _alepha_core1.TString;
|
|
199
|
+
service: _alepha_core1.TString;
|
|
200
|
+
module: _alepha_core1.TString;
|
|
201
|
+
context: _alepha_core1.TOptional<_alepha_core1.TString>;
|
|
202
|
+
app: _alepha_core1.TOptional<_alepha_core1.TString>;
|
|
203
|
+
data: _alepha_core1.TOptional<typebox176.TAny>;
|
|
204
|
+
timestamp: typebox176.TCodec<_alepha_core1.TString, dayjs0.Dayjs>;
|
|
205
|
+
}>>>;
|
|
206
|
+
}>>;
|
|
207
|
+
protected readonly logs: Map<string, {
|
|
208
|
+
context?: string | undefined;
|
|
209
|
+
app?: string | undefined;
|
|
210
|
+
data?: any;
|
|
211
|
+
level: "SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR";
|
|
212
|
+
message: string;
|
|
213
|
+
service: string;
|
|
214
|
+
module: string;
|
|
215
|
+
timestamp: dayjs0.Dayjs;
|
|
216
|
+
}[]>;
|
|
217
|
+
get name(): string;
|
|
218
|
+
protected onInit(): void;
|
|
219
|
+
trigger(): Promise<void>;
|
|
220
|
+
protected jobLock: _alepha_lock0.LockDescriptor<(args: JobHandlerArguments) => Promise<void>>;
|
|
221
|
+
}
|
|
222
|
+
interface JobHandlerArguments {
|
|
223
|
+
now: DateTime;
|
|
224
|
+
}
|
|
225
|
+
//#endregion
|
|
226
|
+
//#region src/entities/jobExecutions.d.ts
|
|
227
|
+
declare const jobExecutions: _alepha_postgres0.EntityDescriptor<typebox176.TObject<{
|
|
228
|
+
id: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox176.TString, typeof _alepha_postgres0.PG_PRIMARY_KEY>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
229
|
+
version: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox176.TInteger, typeof _alepha_postgres0.PG_VERSION>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
230
|
+
createdAt: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox176.TCodec<typebox176.TString, dayjs0.Dayjs>, typeof _alepha_postgres0.PG_CREATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
231
|
+
updatedAt: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox176.TCodec<typebox176.TString, dayjs0.Dayjs>, typeof _alepha_postgres0.PG_UPDATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
232
|
+
finishedAt: typebox176.TOptional<typebox176.TCodec<typebox176.TString, dayjs0.Dayjs>>;
|
|
233
|
+
job: typebox176.TString;
|
|
234
|
+
status: typebox176.TUnsafe<"STARTED" | "FAILED" | "COMPLETED">;
|
|
235
|
+
error: typebox176.TOptional<typebox176.TString>;
|
|
236
|
+
logs: typebox176.TOptional<typebox176.TArray<typebox176.TObject<{
|
|
237
|
+
level: typebox176.TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
|
|
238
|
+
message: typebox176.TString;
|
|
239
|
+
service: typebox176.TString;
|
|
240
|
+
module: typebox176.TString;
|
|
241
|
+
context: typebox176.TOptional<typebox176.TString>;
|
|
242
|
+
app: typebox176.TOptional<typebox176.TString>;
|
|
243
|
+
data: typebox176.TOptional<typebox176.TAny>;
|
|
244
|
+
timestamp: typebox176.TCodec<typebox176.TString, dayjs0.Dayjs>;
|
|
245
|
+
}>>>;
|
|
246
|
+
}>>;
|
|
247
|
+
type JobExecutionEntity = Static<typeof jobExecutions.schema>;
|
|
248
|
+
//#endregion
|
|
249
|
+
//#region src/schemas/jobExecutionResourceSchema.d.ts
|
|
250
|
+
declare const jobExecutionResourceSchema: typebox176.TObject<{
|
|
251
|
+
id: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox176.TString, typeof _alepha_postgres0.PG_PRIMARY_KEY>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
252
|
+
version: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox176.TInteger, typeof _alepha_postgres0.PG_VERSION>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
253
|
+
createdAt: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox176.TCodec<typebox176.TString, dayjs0.Dayjs>, typeof _alepha_postgres0.PG_CREATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
254
|
+
updatedAt: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox176.TCodec<typebox176.TString, dayjs0.Dayjs>, typeof _alepha_postgres0.PG_UPDATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
|
|
255
|
+
finishedAt: typebox176.TOptional<typebox176.TCodec<typebox176.TString, dayjs0.Dayjs>>;
|
|
256
|
+
job: typebox176.TString;
|
|
257
|
+
status: typebox176.TUnsafe<"STARTED" | "FAILED" | "COMPLETED">;
|
|
258
|
+
error: typebox176.TOptional<typebox176.TString>;
|
|
259
|
+
logs: typebox176.TOptional<typebox176.TArray<typebox176.TObject<{
|
|
260
|
+
level: typebox176.TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
|
|
261
|
+
message: typebox176.TString;
|
|
262
|
+
service: typebox176.TString;
|
|
263
|
+
module: typebox176.TString;
|
|
264
|
+
context: typebox176.TOptional<typebox176.TString>;
|
|
265
|
+
app: typebox176.TOptional<typebox176.TString>;
|
|
266
|
+
data: typebox176.TOptional<typebox176.TAny>;
|
|
267
|
+
timestamp: typebox176.TCodec<typebox176.TString, dayjs0.Dayjs>;
|
|
268
|
+
}>>>;
|
|
269
|
+
}>;
|
|
270
|
+
type JobExecutionResource = Static<typeof jobExecutionResourceSchema>;
|
|
271
|
+
//#endregion
|
|
272
|
+
//#region src/schemas/triggerJobSchema.d.ts
|
|
273
|
+
declare const triggerJobSchema: typebox176.TObject<{
|
|
274
|
+
name: typebox176.TString;
|
|
275
|
+
}>;
|
|
276
|
+
type TriggerJob = Static<typeof triggerJobSchema>;
|
|
277
|
+
//#endregion
|
|
278
|
+
//#region src/index.d.ts
|
|
279
|
+
/**
|
|
280
|
+
* Provides job management API endpoints for Alepha applications.
|
|
281
|
+
*
|
|
282
|
+
* This module includes job queue operations, job status monitoring,
|
|
283
|
+
* and background task management capabilities.
|
|
284
|
+
*
|
|
285
|
+
* @module alepha.api.jobs
|
|
286
|
+
*/
|
|
287
|
+
declare const AlephaApiJobs: _alepha_core1.Service<_alepha_core1.Module>;
|
|
288
|
+
//#endregion
|
|
289
|
+
export { $job, AlephaApiJobs, JobController, JobDescriptor, JobDescriptorOptions, JobExecutionEntity, JobExecutionQuery, JobExecutionResource, JobHandlerArguments, JobService, TriggerJob, jobExecutionQuerySchema, jobExecutionResourceSchema, jobExecutions, triggerJobSchema };
|
|
290
|
+
//# sourceMappingURL=index.d.ts.map
|
package/api/notifications.d.ts
CHANGED
|
@@ -1 +1,264 @@
|
|
|
1
|
-
|
|
1
|
+
import * as _alepha_core1 from "alepha";
|
|
2
|
+
import { Alepha, Descriptor, KIND, Static, StaticEncode, TObject } from "alepha";
|
|
3
|
+
import * as _alepha_batch0 from "alepha/batch";
|
|
4
|
+
import { DateTimeProvider } from "alepha/datetime";
|
|
5
|
+
import * as _alepha_logger0 from "alepha/logger";
|
|
6
|
+
import * as _alepha_postgres50 from "alepha/postgres";
|
|
7
|
+
import * as _alepha_queue0 from "alepha/queue";
|
|
8
|
+
import { EmailProvider } from "alepha/email";
|
|
9
|
+
import * as typebox64 from "typebox";
|
|
10
|
+
import * as dayjs14 from "dayjs";
|
|
11
|
+
|
|
12
|
+
//#region src/controllers/NotificationController.d.ts
|
|
13
|
+
declare class NotificationController {}
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region src/entities/notifications.d.ts
|
|
16
|
+
declare const notifications: _alepha_postgres50.EntityDescriptor<typebox64.TObject<{
|
|
17
|
+
id: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox64.TString, typeof _alepha_postgres50.PG_PRIMARY_KEY>, typeof _alepha_postgres50.PG_DEFAULT>;
|
|
18
|
+
version: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox64.TInteger, typeof _alepha_postgres50.PG_VERSION>, typeof _alepha_postgres50.PG_DEFAULT>;
|
|
19
|
+
createdAt: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox64.TCodec<typebox64.TString, dayjs14.Dayjs>, typeof _alepha_postgres50.PG_CREATED_AT>, typeof _alepha_postgres50.PG_DEFAULT>;
|
|
20
|
+
updatedAt: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox64.TCodec<typebox64.TString, dayjs14.Dayjs>, typeof _alepha_postgres50.PG_UPDATED_AT>, typeof _alepha_postgres50.PG_DEFAULT>;
|
|
21
|
+
type: typebox64.TUnsafe<"email" | "sms">;
|
|
22
|
+
template: typebox64.TString;
|
|
23
|
+
category: typebox64.TOptional<typebox64.TString>;
|
|
24
|
+
critical: typebox64.TOptional<typebox64.TBoolean>;
|
|
25
|
+
sensitive: typebox64.TOptional<typebox64.TBoolean>;
|
|
26
|
+
contact: typebox64.TString;
|
|
27
|
+
variables: typebox64.TOptional<typebox64.TRecord<"^.*$", typebox64.TAny>>;
|
|
28
|
+
scheduledAt: typebox64.TOptional<typebox64.TCodec<typebox64.TString, dayjs14.Dayjs>>;
|
|
29
|
+
sentAt: typebox64.TOptional<typebox64.TCodec<typebox64.TString, dayjs14.Dayjs>>;
|
|
30
|
+
error: typebox64.TOptional<typebox64.TObject<{
|
|
31
|
+
at: typebox64.TCodec<typebox64.TString, dayjs14.Dayjs>;
|
|
32
|
+
name: typebox64.TString;
|
|
33
|
+
message: typebox64.TString;
|
|
34
|
+
}>>;
|
|
35
|
+
}>>;
|
|
36
|
+
type NotificationEntity = Static<typeof notifications.schema>;
|
|
37
|
+
//#endregion
|
|
38
|
+
//#region src/providers/SmsProvider.d.ts
|
|
39
|
+
declare abstract class SmsProvider {
|
|
40
|
+
abstract send(options: SmsSendOptions): Promise<void>;
|
|
41
|
+
}
|
|
42
|
+
interface SmsSendOptions {
|
|
43
|
+
to: string;
|
|
44
|
+
message: string;
|
|
45
|
+
}
|
|
46
|
+
//#endregion
|
|
47
|
+
//#region src/services/NotificationSenderService.d.ts
|
|
48
|
+
declare class NotificationSenderService {
|
|
49
|
+
protected readonly alepha: Alepha;
|
|
50
|
+
protected readonly log: _alepha_logger0.Logger;
|
|
51
|
+
protected readonly notificationRepository: _alepha_postgres50.Repository<typebox64.TObject<{
|
|
52
|
+
id: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox64.TString, typeof _alepha_postgres50.PG_PRIMARY_KEY>, typeof _alepha_postgres50.PG_DEFAULT>;
|
|
53
|
+
version: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox64.TInteger, typeof _alepha_postgres50.PG_VERSION>, typeof _alepha_postgres50.PG_DEFAULT>;
|
|
54
|
+
createdAt: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox64.TCodec<typebox64.TString, dayjs14.Dayjs>, typeof _alepha_postgres50.PG_CREATED_AT>, typeof _alepha_postgres50.PG_DEFAULT>;
|
|
55
|
+
updatedAt: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox64.TCodec<typebox64.TString, dayjs14.Dayjs>, typeof _alepha_postgres50.PG_UPDATED_AT>, typeof _alepha_postgres50.PG_DEFAULT>;
|
|
56
|
+
type: typebox64.TUnsafe<"email" | "sms">;
|
|
57
|
+
template: typebox64.TString;
|
|
58
|
+
category: typebox64.TOptional<typebox64.TString>;
|
|
59
|
+
critical: typebox64.TOptional<typebox64.TBoolean>;
|
|
60
|
+
sensitive: typebox64.TOptional<typebox64.TBoolean>;
|
|
61
|
+
contact: typebox64.TString;
|
|
62
|
+
variables: typebox64.TOptional<typebox64.TRecord<"^.*$", typebox64.TAny>>;
|
|
63
|
+
scheduledAt: typebox64.TOptional<typebox64.TCodec<typebox64.TString, dayjs14.Dayjs>>;
|
|
64
|
+
sentAt: typebox64.TOptional<typebox64.TCodec<typebox64.TString, dayjs14.Dayjs>>;
|
|
65
|
+
error: typebox64.TOptional<typebox64.TObject<{
|
|
66
|
+
at: typebox64.TCodec<typebox64.TString, dayjs14.Dayjs>;
|
|
67
|
+
name: typebox64.TString;
|
|
68
|
+
message: typebox64.TString;
|
|
69
|
+
}>>;
|
|
70
|
+
}>>;
|
|
71
|
+
protected readonly dateTimeProvider: DateTimeProvider;
|
|
72
|
+
protected readonly emailProvider: EmailProvider;
|
|
73
|
+
protected readonly smsProvider: SmsProvider;
|
|
74
|
+
send(notificationId: string | NotificationEntity): Promise<void>;
|
|
75
|
+
renderSms(notification: NotificationEntity): {
|
|
76
|
+
to: string;
|
|
77
|
+
message: string;
|
|
78
|
+
};
|
|
79
|
+
renderEmail(notification: NotificationEntity): {
|
|
80
|
+
to: string;
|
|
81
|
+
subject: string;
|
|
82
|
+
body: string;
|
|
83
|
+
};
|
|
84
|
+
protected load(notification: NotificationEntity): {
|
|
85
|
+
template: NotificationDescriptor<typebox64.TObject<typebox64.TProperties>>;
|
|
86
|
+
variables: Record<string, any>;
|
|
87
|
+
contact: string;
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
//#endregion
|
|
91
|
+
//#region src/queues/NotificationQueues.d.ts
|
|
92
|
+
declare class NotificationQueues {
|
|
93
|
+
protected readonly notificationSenderService: NotificationSenderService;
|
|
94
|
+
readonly processNotification: _alepha_queue0.QueueDescriptor<typebox64.TObject<{
|
|
95
|
+
notificationId: typebox64.TString;
|
|
96
|
+
}>>;
|
|
97
|
+
}
|
|
98
|
+
//#endregion
|
|
99
|
+
//#region src/schemas/notificationCreateSchema.d.ts
|
|
100
|
+
declare const notificationCreateSchema: typebox64.TObject<{
|
|
101
|
+
type: typebox64.TUnsafe<"email" | "sms">;
|
|
102
|
+
template: typebox64.TString;
|
|
103
|
+
contact: typebox64.TString;
|
|
104
|
+
variables: typebox64.TOptional<typebox64.TRecord<"^.*$", typebox64.TAny>>;
|
|
105
|
+
}>;
|
|
106
|
+
type NotificationCreate = Static<typeof notificationCreateSchema>;
|
|
107
|
+
//#endregion
|
|
108
|
+
//#region src/services/NotificationService.d.ts
|
|
109
|
+
declare const envSchema: _alepha_core1.TObject<{
|
|
110
|
+
NOTIFICATION_IMMEDIATE: _alepha_core1.TOptional<_alepha_core1.TBoolean>;
|
|
111
|
+
}>;
|
|
112
|
+
declare module "alepha" {
|
|
113
|
+
interface Env extends Partial<Static<typeof envSchema>> {}
|
|
114
|
+
}
|
|
115
|
+
declare class NotificationService {
|
|
116
|
+
protected readonly alepha: Alepha;
|
|
117
|
+
protected readonly log: _alepha_logger0.Logger;
|
|
118
|
+
protected readonly env: {
|
|
119
|
+
NOTIFICATION_IMMEDIATE?: boolean | undefined;
|
|
120
|
+
};
|
|
121
|
+
protected readonly notificationRepository: _alepha_postgres50.Repository<_alepha_core1.TObject<{
|
|
122
|
+
id: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox64.TString, typeof _alepha_postgres50.PG_PRIMARY_KEY>, typeof _alepha_postgres50.PG_DEFAULT>;
|
|
123
|
+
version: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox64.TInteger, typeof _alepha_postgres50.PG_VERSION>, typeof _alepha_postgres50.PG_DEFAULT>;
|
|
124
|
+
createdAt: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox64.TCodec<typebox64.TString, dayjs14.Dayjs>, typeof _alepha_postgres50.PG_CREATED_AT>, typeof _alepha_postgres50.PG_DEFAULT>;
|
|
125
|
+
updatedAt: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox64.TCodec<typebox64.TString, dayjs14.Dayjs>, typeof _alepha_postgres50.PG_UPDATED_AT>, typeof _alepha_postgres50.PG_DEFAULT>;
|
|
126
|
+
type: typebox64.TUnsafe<"email" | "sms">;
|
|
127
|
+
template: typebox64.TString;
|
|
128
|
+
category: _alepha_core1.TOptional<typebox64.TString>;
|
|
129
|
+
critical: _alepha_core1.TOptional<_alepha_core1.TBoolean>;
|
|
130
|
+
sensitive: _alepha_core1.TOptional<_alepha_core1.TBoolean>;
|
|
131
|
+
contact: typebox64.TString;
|
|
132
|
+
variables: _alepha_core1.TOptional<typebox64.TRecord<"^.*$", typebox64.TAny>>;
|
|
133
|
+
scheduledAt: _alepha_core1.TOptional<typebox64.TCodec<typebox64.TString, dayjs14.Dayjs>>;
|
|
134
|
+
sentAt: _alepha_core1.TOptional<typebox64.TCodec<typebox64.TString, dayjs14.Dayjs>>;
|
|
135
|
+
error: _alepha_core1.TOptional<_alepha_core1.TObject<{
|
|
136
|
+
at: typebox64.TCodec<typebox64.TString, dayjs14.Dayjs>;
|
|
137
|
+
name: typebox64.TString;
|
|
138
|
+
message: typebox64.TString;
|
|
139
|
+
}>>;
|
|
140
|
+
}>>;
|
|
141
|
+
protected readonly dateTimeProvider: DateTimeProvider;
|
|
142
|
+
protected readonly notificationQueues: NotificationQueues;
|
|
143
|
+
protected readonly notificationSenderService: NotificationSenderService;
|
|
144
|
+
readonly notificationBatch: _alepha_batch0.BatchDescriptor<_alepha_core1.TObject<{
|
|
145
|
+
type: typebox64.TUnsafe<"email" | "sms">;
|
|
146
|
+
template: typebox64.TString;
|
|
147
|
+
contact: typebox64.TString;
|
|
148
|
+
variables: _alepha_core1.TOptional<typebox64.TRecord<"^.*$", typebox64.TAny>>;
|
|
149
|
+
}>, Promise<void>>;
|
|
150
|
+
findNotificationById(id: string): Promise<_alepha_postgres50.PgStatic<_alepha_core1.TObject<{
|
|
151
|
+
id: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox64.TString, typeof _alepha_postgres50.PG_PRIMARY_KEY>, typeof _alepha_postgres50.PG_DEFAULT>;
|
|
152
|
+
version: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox64.TInteger, typeof _alepha_postgres50.PG_VERSION>, typeof _alepha_postgres50.PG_DEFAULT>;
|
|
153
|
+
createdAt: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox64.TCodec<typebox64.TString, dayjs14.Dayjs>, typeof _alepha_postgres50.PG_CREATED_AT>, typeof _alepha_postgres50.PG_DEFAULT>;
|
|
154
|
+
updatedAt: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox64.TCodec<typebox64.TString, dayjs14.Dayjs>, typeof _alepha_postgres50.PG_UPDATED_AT>, typeof _alepha_postgres50.PG_DEFAULT>;
|
|
155
|
+
type: typebox64.TUnsafe<"email" | "sms">;
|
|
156
|
+
template: typebox64.TString;
|
|
157
|
+
category: _alepha_core1.TOptional<typebox64.TString>;
|
|
158
|
+
critical: _alepha_core1.TOptional<_alepha_core1.TBoolean>;
|
|
159
|
+
sensitive: _alepha_core1.TOptional<_alepha_core1.TBoolean>;
|
|
160
|
+
contact: typebox64.TString;
|
|
161
|
+
variables: _alepha_core1.TOptional<typebox64.TRecord<"^.*$", typebox64.TAny>>;
|
|
162
|
+
scheduledAt: _alepha_core1.TOptional<typebox64.TCodec<typebox64.TString, dayjs14.Dayjs>>;
|
|
163
|
+
sentAt: _alepha_core1.TOptional<typebox64.TCodec<typebox64.TString, dayjs14.Dayjs>>;
|
|
164
|
+
error: _alepha_core1.TOptional<_alepha_core1.TObject<{
|
|
165
|
+
at: typebox64.TCodec<typebox64.TString, dayjs14.Dayjs>;
|
|
166
|
+
name: typebox64.TString;
|
|
167
|
+
message: typebox64.TString;
|
|
168
|
+
}>>;
|
|
169
|
+
}>, _alepha_postgres50.PgRelationMap<_alepha_core1.TObject<{
|
|
170
|
+
id: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox64.TString, typeof _alepha_postgres50.PG_PRIMARY_KEY>, typeof _alepha_postgres50.PG_DEFAULT>;
|
|
171
|
+
version: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox64.TInteger, typeof _alepha_postgres50.PG_VERSION>, typeof _alepha_postgres50.PG_DEFAULT>;
|
|
172
|
+
createdAt: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox64.TCodec<typebox64.TString, dayjs14.Dayjs>, typeof _alepha_postgres50.PG_CREATED_AT>, typeof _alepha_postgres50.PG_DEFAULT>;
|
|
173
|
+
updatedAt: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox64.TCodec<typebox64.TString, dayjs14.Dayjs>, typeof _alepha_postgres50.PG_UPDATED_AT>, typeof _alepha_postgres50.PG_DEFAULT>;
|
|
174
|
+
type: typebox64.TUnsafe<"email" | "sms">;
|
|
175
|
+
template: typebox64.TString;
|
|
176
|
+
category: _alepha_core1.TOptional<typebox64.TString>;
|
|
177
|
+
critical: _alepha_core1.TOptional<_alepha_core1.TBoolean>;
|
|
178
|
+
sensitive: _alepha_core1.TOptional<_alepha_core1.TBoolean>;
|
|
179
|
+
contact: typebox64.TString;
|
|
180
|
+
variables: _alepha_core1.TOptional<typebox64.TRecord<"^.*$", typebox64.TAny>>;
|
|
181
|
+
scheduledAt: _alepha_core1.TOptional<typebox64.TCodec<typebox64.TString, dayjs14.Dayjs>>;
|
|
182
|
+
sentAt: _alepha_core1.TOptional<typebox64.TCodec<typebox64.TString, dayjs14.Dayjs>>;
|
|
183
|
+
error: _alepha_core1.TOptional<_alepha_core1.TObject<{
|
|
184
|
+
at: typebox64.TCodec<typebox64.TString, dayjs14.Dayjs>;
|
|
185
|
+
name: typebox64.TString;
|
|
186
|
+
message: typebox64.TString;
|
|
187
|
+
}>>;
|
|
188
|
+
}>>>>;
|
|
189
|
+
/**
|
|
190
|
+
* Create a new notification.
|
|
191
|
+
*/
|
|
192
|
+
createNotification(entry: NotificationCreate, now?: boolean): Promise<void>;
|
|
193
|
+
}
|
|
194
|
+
//#endregion
|
|
195
|
+
//#region src/descriptors/$notification.d.ts
|
|
196
|
+
declare const $notification: {
|
|
197
|
+
<T extends TObject>(options: NotificationDescriptorOptions<T>): NotificationDescriptor<T>;
|
|
198
|
+
[KIND]: typeof NotificationDescriptor;
|
|
199
|
+
};
|
|
200
|
+
interface NotificationDescriptorOptions<T extends TObject> extends NotificationMessage<T> {
|
|
201
|
+
name?: string;
|
|
202
|
+
description?: string;
|
|
203
|
+
category?: string;
|
|
204
|
+
critical?: boolean;
|
|
205
|
+
sensitive?: boolean;
|
|
206
|
+
translations?: {
|
|
207
|
+
[lang: string]: NotificationMessage<T>;
|
|
208
|
+
};
|
|
209
|
+
schema: T;
|
|
210
|
+
}
|
|
211
|
+
declare class NotificationDescriptor<T extends TObject> extends Descriptor<NotificationDescriptorOptions<T>> {
|
|
212
|
+
protected readonly notificationService: NotificationService;
|
|
213
|
+
get name(): string;
|
|
214
|
+
push(options: NotificationPushOptions<T>): Promise<void>;
|
|
215
|
+
configure(options: Partial<NotificationDescriptorOptions<T>>): void;
|
|
216
|
+
}
|
|
217
|
+
interface NotificationPushOptions<T extends TObject> {
|
|
218
|
+
variables: StaticEncode<T>;
|
|
219
|
+
contact: string;
|
|
220
|
+
}
|
|
221
|
+
interface NotificationMessage<T extends TObject> {
|
|
222
|
+
email?: {
|
|
223
|
+
subject: string;
|
|
224
|
+
body: string | ((variables: Static<T>) => string);
|
|
225
|
+
};
|
|
226
|
+
sms?: {
|
|
227
|
+
message: string | ((variables: Static<T>) => string);
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
//#endregion
|
|
231
|
+
//#region src/jobs/NotificationJobs.d.ts
|
|
232
|
+
declare class NotificationJobs {}
|
|
233
|
+
//#endregion
|
|
234
|
+
//#region src/providers/MemorySmsProvider.d.ts
|
|
235
|
+
interface SmsRecord {
|
|
236
|
+
to: string;
|
|
237
|
+
message: string;
|
|
238
|
+
sentAt: Date;
|
|
239
|
+
}
|
|
240
|
+
declare class MemorySmsProvider extends SmsProvider {
|
|
241
|
+
protected records: SmsRecord[];
|
|
242
|
+
send(options: SmsSendOptions): Promise<void>;
|
|
243
|
+
}
|
|
244
|
+
//#endregion
|
|
245
|
+
//#region src/schemas/notificationContactPreferencesSchema.d.ts
|
|
246
|
+
declare const notificationContactPreferencesSchema: typebox64.TObject<{
|
|
247
|
+
language: typebox64.TOptional<typebox64.TString>;
|
|
248
|
+
exclude: typebox64.TArray<typebox64.TString>;
|
|
249
|
+
}>;
|
|
250
|
+
type NotificationContactPreferences = Static<typeof notificationContactPreferencesSchema>;
|
|
251
|
+
//#endregion
|
|
252
|
+
//#region src/index.d.ts
|
|
253
|
+
/**
|
|
254
|
+
* Provides notification management API endpoints for Alepha applications.
|
|
255
|
+
*
|
|
256
|
+
* This module includes notification sending, retrieval, status tracking,
|
|
257
|
+
* and user notification preferences management.
|
|
258
|
+
*
|
|
259
|
+
* @module alepha.api.notifications
|
|
260
|
+
*/
|
|
261
|
+
declare const AlephaApiNotifications: _alepha_core1.Service<_alepha_core1.Module>;
|
|
262
|
+
//#endregion
|
|
263
|
+
export { $notification, AlephaApiNotifications, MemorySmsProvider, NotificationContactPreferences, NotificationController, NotificationCreate, NotificationDescriptor, NotificationDescriptorOptions, NotificationEntity, NotificationJobs, NotificationMessage, NotificationPushOptions, NotificationQueues, NotificationSenderService, NotificationService, SmsProvider, SmsRecord, SmsSendOptions, notificationContactPreferencesSchema, notificationCreateSchema, notifications };
|
|
264
|
+
//# sourceMappingURL=index.d.ts.map
|