@goweekdays/core 0.0.1

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.
@@ -0,0 +1,1366 @@
1
+ import { Request, Response, NextFunction } from 'express';
2
+ import * as winston from 'winston';
3
+ import jwt from 'jsonwebtoken';
4
+ import * as _redis_bloom_dist_commands_top_k_RESERVE from '@redis/bloom/dist/commands/top-k/RESERVE';
5
+ import * as _redis_bloom_dist_commands_top_k_QUERY from '@redis/bloom/dist/commands/top-k/QUERY';
6
+ import * as _redis_bloom_dist_commands_top_k_LIST from '@redis/bloom/dist/commands/top-k/LIST';
7
+ import * as _redis_bloom_dist_commands_top_k_LIST_WITHCOUNT from '@redis/bloom/dist/commands/top-k/LIST_WITHCOUNT';
8
+ import * as _redis_bloom_dist_commands_top_k_INFO from '@redis/bloom/dist/commands/top-k/INFO';
9
+ import * as _redis_bloom_dist_commands_top_k_INCRBY from '@redis/bloom/dist/commands/top-k/INCRBY';
10
+ import * as _redis_bloom_dist_commands_top_k_COUNT from '@redis/bloom/dist/commands/top-k/COUNT';
11
+ import * as _redis_bloom_dist_commands_top_k_ADD from '@redis/bloom/dist/commands/top-k/ADD';
12
+ import * as _redis_bloom_dist_commands_t_digest_TRIMMED_MEAN from '@redis/bloom/dist/commands/t-digest/TRIMMED_MEAN';
13
+ import * as _redis_bloom_dist_commands_t_digest_REVRANK from '@redis/bloom/dist/commands/t-digest/REVRANK';
14
+ import * as _redis_bloom_dist_commands_t_digest_RESET from '@redis/bloom/dist/commands/t-digest/RESET';
15
+ import * as _redis_bloom_dist_commands_t_digest_RANK from '@redis/bloom/dist/commands/t-digest/RANK';
16
+ import * as _redis_bloom_dist_commands_t_digest_QUANTILE from '@redis/bloom/dist/commands/t-digest/QUANTILE';
17
+ import * as _redis_bloom_dist_commands_t_digest_MIN from '@redis/bloom/dist/commands/t-digest/MIN';
18
+ import * as _redis_bloom_dist_commands_t_digest_MERGE from '@redis/bloom/dist/commands/t-digest/MERGE';
19
+ import * as _redis_bloom_dist_commands_t_digest_MAX from '@redis/bloom/dist/commands/t-digest/MAX';
20
+ import * as _redis_bloom_dist_commands_t_digest_INFO from '@redis/bloom/dist/commands/t-digest/INFO';
21
+ import * as _redis_bloom_dist_commands_t_digest_CREATE from '@redis/bloom/dist/commands/t-digest/CREATE';
22
+ import * as _redis_bloom_dist_commands_t_digest_CDF from '@redis/bloom/dist/commands/t-digest/CDF';
23
+ import * as _redis_bloom_dist_commands_t_digest_BYREVRANK from '@redis/bloom/dist/commands/t-digest/BYREVRANK';
24
+ import * as _redis_bloom_dist_commands_t_digest_BYRANK from '@redis/bloom/dist/commands/t-digest/BYRANK';
25
+ import * as _redis_bloom_dist_commands_t_digest_ADD from '@redis/bloom/dist/commands/t-digest/ADD';
26
+ import * as _redis_bloom_dist_commands_cuckoo_SCANDUMP from '@redis/bloom/dist/commands/cuckoo/SCANDUMP';
27
+ import * as _redis_bloom_dist_commands_cuckoo_RESERVE from '@redis/bloom/dist/commands/cuckoo/RESERVE';
28
+ import * as _redis_bloom_dist_commands_cuckoo_LOADCHUNK from '@redis/bloom/dist/commands/cuckoo/LOADCHUNK';
29
+ import * as _redis_bloom_dist_commands_cuckoo_INSERTNX from '@redis/bloom/dist/commands/cuckoo/INSERTNX';
30
+ import * as _redis_bloom_dist_commands_cuckoo_INSERT from '@redis/bloom/dist/commands/cuckoo/INSERT';
31
+ import * as _redis_bloom_dist_commands_cuckoo_INFO from '@redis/bloom/dist/commands/cuckoo/INFO';
32
+ import * as _redis_bloom_dist_commands_cuckoo_EXISTS from '@redis/bloom/dist/commands/cuckoo/EXISTS';
33
+ import * as _redis_bloom_dist_commands_cuckoo_DEL from '@redis/bloom/dist/commands/cuckoo/DEL';
34
+ import * as _redis_bloom_dist_commands_cuckoo_COUNT from '@redis/bloom/dist/commands/cuckoo/COUNT';
35
+ import * as _redis_bloom_dist_commands_cuckoo_ADDNX from '@redis/bloom/dist/commands/cuckoo/ADDNX';
36
+ import * as _redis_bloom_dist_commands_cuckoo_ADD from '@redis/bloom/dist/commands/cuckoo/ADD';
37
+ import * as _redis_bloom_dist_commands_count_min_sketch_QUERY from '@redis/bloom/dist/commands/count-min-sketch/QUERY';
38
+ import * as _redis_bloom_dist_commands_count_min_sketch_MERGE from '@redis/bloom/dist/commands/count-min-sketch/MERGE';
39
+ import * as _redis_bloom_dist_commands_count_min_sketch_INITBYPROB from '@redis/bloom/dist/commands/count-min-sketch/INITBYPROB';
40
+ import * as _redis_bloom_dist_commands_count_min_sketch_INITBYDIM from '@redis/bloom/dist/commands/count-min-sketch/INITBYDIM';
41
+ import * as _redis_bloom_dist_commands_count_min_sketch_INFO from '@redis/bloom/dist/commands/count-min-sketch/INFO';
42
+ import * as _redis_bloom_dist_commands_count_min_sketch_INCRBY from '@redis/bloom/dist/commands/count-min-sketch/INCRBY';
43
+ import * as _redis_bloom_dist_commands_bloom_SCANDUMP from '@redis/bloom/dist/commands/bloom/SCANDUMP';
44
+ import * as _redis_bloom_dist_commands_bloom_RESERVE from '@redis/bloom/dist/commands/bloom/RESERVE';
45
+ import * as _redis_bloom_dist_commands_bloom_MEXISTS from '@redis/bloom/dist/commands/bloom/MEXISTS';
46
+ import * as _redis_bloom_dist_commands_bloom_MADD from '@redis/bloom/dist/commands/bloom/MADD';
47
+ import * as _redis_bloom_dist_commands_bloom_LOADCHUNK from '@redis/bloom/dist/commands/bloom/LOADCHUNK';
48
+ import * as _redis_bloom_dist_commands_bloom_INSERT from '@redis/bloom/dist/commands/bloom/INSERT';
49
+ import * as _redis_bloom_dist_commands_bloom_INFO from '@redis/bloom/dist/commands/bloom/INFO';
50
+ import * as _redis_bloom_dist_commands_bloom_EXISTS from '@redis/bloom/dist/commands/bloom/EXISTS';
51
+ import * as _redis_bloom_dist_commands_bloom_CARD from '@redis/bloom/dist/commands/bloom/CARD';
52
+ import * as _redis_bloom_dist_commands_bloom_ADD from '@redis/bloom/dist/commands/bloom/ADD';
53
+ import * as _redis_time_series_dist_commands_MREVRANGE_WITHLABELS from '@redis/time-series/dist/commands/MREVRANGE_WITHLABELS';
54
+ import * as _redis_time_series_dist_commands_MREVRANGE from '@redis/time-series/dist/commands/MREVRANGE';
55
+ import * as _redis_time_series_dist_commands_MRANGE_WITHLABELS from '@redis/time-series/dist/commands/MRANGE_WITHLABELS';
56
+ import * as _redis_time_series_dist_commands_MRANGE from '@redis/time-series/dist/commands/MRANGE';
57
+ import * as _redis_time_series_dist_commands_REVRANGE from '@redis/time-series/dist/commands/REVRANGE';
58
+ import * as _redis_time_series_dist_commands_RANGE from '@redis/time-series/dist/commands/RANGE';
59
+ import * as _redis_time_series_dist_commands_QUERYINDEX from '@redis/time-series/dist/commands/QUERYINDEX';
60
+ import * as _redis_time_series_dist_commands_MGET_WITHLABELS from '@redis/time-series/dist/commands/MGET_WITHLABELS';
61
+ import * as _redis_time_series_dist_commands_MGET from '@redis/time-series/dist/commands/MGET';
62
+ import * as _redis_time_series_dist_commands_MADD from '@redis/time-series/dist/commands/MADD';
63
+ import * as _redis_time_series_dist_commands_INFO from '@redis/time-series/dist/commands/INFO';
64
+ import * as _redis_time_series_dist_commands_INFO_DEBUG from '@redis/time-series/dist/commands/INFO_DEBUG';
65
+ import * as _redis_time_series_dist_commands_INCRBY from '@redis/time-series/dist/commands/INCRBY';
66
+ import * as _redis_time_series_dist_commands_GET from '@redis/time-series/dist/commands/GET';
67
+ import * as _redis_time_series_dist_commands_DELETERULE from '@redis/time-series/dist/commands/DELETERULE';
68
+ import * as _redis_time_series_dist_commands_DEL from '@redis/time-series/dist/commands/DEL';
69
+ import * as _redis_time_series_dist_commands_DECRBY from '@redis/time-series/dist/commands/DECRBY';
70
+ import * as _redis_time_series_dist_commands_CREATERULE from '@redis/time-series/dist/commands/CREATERULE';
71
+ import * as _redis_time_series_dist_commands_CREATE from '@redis/time-series/dist/commands/CREATE';
72
+ import * as _redis_time_series_dist_commands_ALTER from '@redis/time-series/dist/commands/ALTER';
73
+ import * as _redis_time_series_dist_commands_ADD from '@redis/time-series/dist/commands/ADD';
74
+ import * as _redis_search_dist_commands_TAGVALS from '@redis/search/dist/commands/TAGVALS';
75
+ import * as _redis_search_dist_commands_SYNUPDATE from '@redis/search/dist/commands/SYNUPDATE';
76
+ import * as _redis_search_dist_commands_SYNDUMP from '@redis/search/dist/commands/SYNDUMP';
77
+ import * as _redis_search_dist_commands_SUGLEN from '@redis/search/dist/commands/SUGLEN';
78
+ import * as _redis_search_dist_commands_SUGGET from '@redis/search/dist/commands/SUGGET';
79
+ import * as _redis_search_dist_commands_SUGGET_WITHSCORES from '@redis/search/dist/commands/SUGGET_WITHSCORES';
80
+ import * as _redis_search_dist_commands_SUGGET_WITHSCORES_WITHPAYLOADS from '@redis/search/dist/commands/SUGGET_WITHSCORES_WITHPAYLOADS';
81
+ import * as _redis_search_dist_commands_SUGGET_WITHPAYLOADS from '@redis/search/dist/commands/SUGGET_WITHPAYLOADS';
82
+ import * as _redis_search_dist_commands_SUGDEL from '@redis/search/dist/commands/SUGDEL';
83
+ import * as _redis_search_dist_commands_SUGADD from '@redis/search/dist/commands/SUGADD';
84
+ import * as _redis_search_dist_commands_SPELLCHECK from '@redis/search/dist/commands/SPELLCHECK';
85
+ import * as _redis_search_dist_commands_SEARCH_NOCONTENT from '@redis/search/dist/commands/SEARCH_NOCONTENT';
86
+ import * as _redis_search_dist_commands_SEARCH from '@redis/search/dist/commands/SEARCH';
87
+ import * as _redis_search_dist_commands_PROFILE_AGGREGATE from '@redis/search/dist/commands/PROFILE_AGGREGATE';
88
+ import * as _redis_search_dist_commands_PROFILE_SEARCH from '@redis/search/dist/commands/PROFILE_SEARCH';
89
+ import * as _redis_search_dist_commands_INFO from '@redis/search/dist/commands/INFO';
90
+ import * as _redis_search_dist_commands_EXPLAINCLI from '@redis/search/dist/commands/EXPLAINCLI';
91
+ import * as _redis_search_dist_commands_EXPLAIN from '@redis/search/dist/commands/EXPLAIN';
92
+ import * as _redis_search_dist_commands_DROPINDEX from '@redis/search/dist/commands/DROPINDEX';
93
+ import * as _redis_search_dist_commands_DICTDUMP from '@redis/search/dist/commands/DICTDUMP';
94
+ import * as _redis_search_dist_commands_DICTDEL from '@redis/search/dist/commands/DICTDEL';
95
+ import * as _redis_search_dist_commands_DICTADD from '@redis/search/dist/commands/DICTADD';
96
+ import * as _redis_search_dist_commands_CURSOR_READ from '@redis/search/dist/commands/CURSOR_READ';
97
+ import * as _redis_search_dist_commands_CURSOR_DEL from '@redis/search/dist/commands/CURSOR_DEL';
98
+ import * as _redis_search_dist_commands_CREATE from '@redis/search/dist/commands/CREATE';
99
+ import * as _redis_search_dist_commands_CONFIG_SET from '@redis/search/dist/commands/CONFIG_SET';
100
+ import * as _redis_search_dist_commands_CONFIG_GET from '@redis/search/dist/commands/CONFIG_GET';
101
+ import * as _redis_search_dist_commands_ALIASUPDATE from '@redis/search/dist/commands/ALIASUPDATE';
102
+ import * as _redis_search_dist_commands_ALIASDEL from '@redis/search/dist/commands/ALIASDEL';
103
+ import * as _redis_search_dist_commands_ALIASADD from '@redis/search/dist/commands/ALIASADD';
104
+ import * as _redis_search_dist_commands_AGGREGATE from '@redis/search/dist/commands/AGGREGATE';
105
+ import * as _redis_search_dist_commands_AGGREGATE_WITHCURSOR from '@redis/search/dist/commands/AGGREGATE_WITHCURSOR';
106
+ import * as _redis_search_dist_commands_ALTER from '@redis/search/dist/commands/ALTER';
107
+ import * as _redis_search_dist_commands__LIST from '@redis/search/dist/commands/_LIST';
108
+ import * as _redis_json_dist_commands_TYPE from '@redis/json/dist/commands/TYPE';
109
+ import * as _redis_json_dist_commands_STRLEN from '@redis/json/dist/commands/STRLEN';
110
+ import * as _redis_json_dist_commands_STRAPPEND from '@redis/json/dist/commands/STRAPPEND';
111
+ import * as _redis_json_dist_commands_SET from '@redis/json/dist/commands/SET';
112
+ import * as _redis_json_dist_commands_RESP from '@redis/json/dist/commands/RESP';
113
+ import * as _redis_json_dist_commands_OBJLEN from '@redis/json/dist/commands/OBJLEN';
114
+ import * as _redis_json_dist_commands_OBJKEYS from '@redis/json/dist/commands/OBJKEYS';
115
+ import * as _redis_json_dist_commands_NUMMULTBY from '@redis/json/dist/commands/NUMMULTBY';
116
+ import * as _redis_json_dist_commands_NUMINCRBY from '@redis/json/dist/commands/NUMINCRBY';
117
+ import * as _redis_json_dist_commands_MSET from '@redis/json/dist/commands/MSET';
118
+ import * as _redis_json_dist_commands_MGET from '@redis/json/dist/commands/MGET';
119
+ import * as _redis_json_dist_commands_MERGE from '@redis/json/dist/commands/MERGE';
120
+ import * as _redis_json_dist_commands_GET from '@redis/json/dist/commands/GET';
121
+ import * as _redis_json_dist_commands_FORGET from '@redis/json/dist/commands/FORGET';
122
+ import * as _redis_json_dist_commands_DEL from '@redis/json/dist/commands/DEL';
123
+ import * as _redis_json_dist_commands_DEBUG_MEMORY from '@redis/json/dist/commands/DEBUG_MEMORY';
124
+ import * as _redis_json_dist_commands_ARRTRIM from '@redis/json/dist/commands/ARRTRIM';
125
+ import * as _redis_json_dist_commands_ARRPOP from '@redis/json/dist/commands/ARRPOP';
126
+ import * as _redis_json_dist_commands_ARRLEN from '@redis/json/dist/commands/ARRLEN';
127
+ import * as _redis_json_dist_commands_ARRINSERT from '@redis/json/dist/commands/ARRINSERT';
128
+ import * as _redis_json_dist_commands_ARRINDEX from '@redis/json/dist/commands/ARRINDEX';
129
+ import * as _redis_json_dist_commands_ARRAPPEND from '@redis/json/dist/commands/ARRAPPEND';
130
+ import * as _redis_graph_dist_commands_SLOWLOG from '@redis/graph/dist/commands/SLOWLOG';
131
+ import * as _redis_graph_dist_commands_RO_QUERY from '@redis/graph/dist/commands/RO_QUERY';
132
+ import * as _redis_graph_dist_commands_QUERY from '@redis/graph/dist/commands/QUERY';
133
+ import * as _redis_graph_dist_commands_PROFILE from '@redis/graph/dist/commands/PROFILE';
134
+ import * as _redis_graph_dist_commands_LIST from '@redis/graph/dist/commands/LIST';
135
+ import * as _redis_graph_dist_commands_EXPLAIN from '@redis/graph/dist/commands/EXPLAIN';
136
+ import * as _redis_graph_dist_commands_DELETE from '@redis/graph/dist/commands/DELETE';
137
+ import * as _redis_graph_dist_commands_CONFIG_SET from '@redis/graph/dist/commands/CONFIG_SET';
138
+ import * as _redis_graph_dist_commands_CONFIG_GET from '@redis/graph/dist/commands/CONFIG_GET';
139
+ import { RedisClientType } from 'redis';
140
+ import * as mongodb from 'mongodb';
141
+ import { MongoClient, Db, ObjectId, ClientSession } from 'mongodb';
142
+ import * as bson from 'bson';
143
+
144
+ declare class AppError extends Error {
145
+ readonly statusCode: number;
146
+ readonly isOperational: boolean;
147
+ constructor(message: string, statusCode: number, isOperational?: boolean);
148
+ }
149
+ declare class BadRequestError extends AppError {
150
+ constructor(message?: string);
151
+ }
152
+ declare class UnauthorizedError extends AppError {
153
+ constructor(message?: string);
154
+ }
155
+ declare class NotFoundError extends AppError {
156
+ constructor(message?: string);
157
+ }
158
+ declare class InternalServerError extends AppError {
159
+ constructor(message?: string);
160
+ }
161
+
162
+ declare const errorHandler: (err: AppError, req: Request, res: Response, next: NextFunction) => void;
163
+
164
+ declare function authMiddleware(access_token_secret?: string): (req: Request, res: Response, next: NextFunction) => void;
165
+
166
+ declare function hashPassword(password: string): Promise<string>;
167
+
168
+ declare function comparePassword(password: string, hashedPassword: string): Promise<boolean>;
169
+
170
+ declare const logger: winston.Logger;
171
+
172
+ interface MailerConfig {
173
+ email: string;
174
+ password: string;
175
+ host: string;
176
+ port: number;
177
+ secure: boolean;
178
+ }
179
+ declare class useMailer {
180
+ private config;
181
+ private transporter;
182
+ constructor(config: MailerConfig);
183
+ sendMail({ to, subject, text, html, sender, }: {
184
+ sender?: string;
185
+ to: string;
186
+ subject: string;
187
+ text?: string;
188
+ html?: string;
189
+ }): Promise<string>;
190
+ }
191
+
192
+ declare function generateToken({ metadata, secret, options }?: {
193
+ metadata?: Record<string, unknown> | undefined;
194
+ secret: string;
195
+ options?: jwt.SignOptions | undefined;
196
+ }): string;
197
+
198
+ declare function paginate(items: any[], page: number | undefined, limit: number | undefined, length: number): {
199
+ items: any[];
200
+ pages: number;
201
+ pageRange: string;
202
+ };
203
+
204
+ declare function initRedisClient(): Promise<void>;
205
+ declare function useRedisClient(): RedisClientType<{
206
+ graph: {
207
+ CONFIG_GET: typeof _redis_graph_dist_commands_CONFIG_GET;
208
+ configGet: typeof _redis_graph_dist_commands_CONFIG_GET;
209
+ CONFIG_SET: typeof _redis_graph_dist_commands_CONFIG_SET;
210
+ configSet: typeof _redis_graph_dist_commands_CONFIG_SET;
211
+ DELETE: typeof _redis_graph_dist_commands_DELETE;
212
+ delete: typeof _redis_graph_dist_commands_DELETE;
213
+ EXPLAIN: typeof _redis_graph_dist_commands_EXPLAIN;
214
+ explain: typeof _redis_graph_dist_commands_EXPLAIN;
215
+ LIST: typeof _redis_graph_dist_commands_LIST;
216
+ list: typeof _redis_graph_dist_commands_LIST;
217
+ PROFILE: typeof _redis_graph_dist_commands_PROFILE;
218
+ profile: typeof _redis_graph_dist_commands_PROFILE;
219
+ QUERY: typeof _redis_graph_dist_commands_QUERY;
220
+ query: typeof _redis_graph_dist_commands_QUERY;
221
+ RO_QUERY: typeof _redis_graph_dist_commands_RO_QUERY;
222
+ roQuery: typeof _redis_graph_dist_commands_RO_QUERY;
223
+ SLOWLOG: typeof _redis_graph_dist_commands_SLOWLOG;
224
+ slowLog: typeof _redis_graph_dist_commands_SLOWLOG;
225
+ };
226
+ json: {
227
+ ARRAPPEND: typeof _redis_json_dist_commands_ARRAPPEND;
228
+ arrAppend: typeof _redis_json_dist_commands_ARRAPPEND;
229
+ ARRINDEX: typeof _redis_json_dist_commands_ARRINDEX;
230
+ arrIndex: typeof _redis_json_dist_commands_ARRINDEX;
231
+ ARRINSERT: typeof _redis_json_dist_commands_ARRINSERT;
232
+ arrInsert: typeof _redis_json_dist_commands_ARRINSERT;
233
+ ARRLEN: typeof _redis_json_dist_commands_ARRLEN;
234
+ arrLen: typeof _redis_json_dist_commands_ARRLEN;
235
+ ARRPOP: typeof _redis_json_dist_commands_ARRPOP;
236
+ arrPop: typeof _redis_json_dist_commands_ARRPOP;
237
+ ARRTRIM: typeof _redis_json_dist_commands_ARRTRIM;
238
+ arrTrim: typeof _redis_json_dist_commands_ARRTRIM;
239
+ DEBUG_MEMORY: typeof _redis_json_dist_commands_DEBUG_MEMORY;
240
+ debugMemory: typeof _redis_json_dist_commands_DEBUG_MEMORY;
241
+ DEL: typeof _redis_json_dist_commands_DEL;
242
+ del: typeof _redis_json_dist_commands_DEL;
243
+ FORGET: typeof _redis_json_dist_commands_FORGET;
244
+ forget: typeof _redis_json_dist_commands_FORGET;
245
+ GET: typeof _redis_json_dist_commands_GET;
246
+ get: typeof _redis_json_dist_commands_GET;
247
+ MERGE: typeof _redis_json_dist_commands_MERGE;
248
+ merge: typeof _redis_json_dist_commands_MERGE;
249
+ MGET: typeof _redis_json_dist_commands_MGET;
250
+ mGet: typeof _redis_json_dist_commands_MGET;
251
+ MSET: typeof _redis_json_dist_commands_MSET;
252
+ mSet: typeof _redis_json_dist_commands_MSET;
253
+ NUMINCRBY: typeof _redis_json_dist_commands_NUMINCRBY;
254
+ numIncrBy: typeof _redis_json_dist_commands_NUMINCRBY;
255
+ NUMMULTBY: typeof _redis_json_dist_commands_NUMMULTBY;
256
+ numMultBy: typeof _redis_json_dist_commands_NUMMULTBY;
257
+ OBJKEYS: typeof _redis_json_dist_commands_OBJKEYS;
258
+ objKeys: typeof _redis_json_dist_commands_OBJKEYS;
259
+ OBJLEN: typeof _redis_json_dist_commands_OBJLEN;
260
+ objLen: typeof _redis_json_dist_commands_OBJLEN;
261
+ RESP: typeof _redis_json_dist_commands_RESP;
262
+ resp: typeof _redis_json_dist_commands_RESP;
263
+ SET: typeof _redis_json_dist_commands_SET;
264
+ set: typeof _redis_json_dist_commands_SET;
265
+ STRAPPEND: typeof _redis_json_dist_commands_STRAPPEND;
266
+ strAppend: typeof _redis_json_dist_commands_STRAPPEND;
267
+ STRLEN: typeof _redis_json_dist_commands_STRLEN;
268
+ strLen: typeof _redis_json_dist_commands_STRLEN;
269
+ TYPE: typeof _redis_json_dist_commands_TYPE;
270
+ type: typeof _redis_json_dist_commands_TYPE;
271
+ };
272
+ ft: {
273
+ _LIST: typeof _redis_search_dist_commands__LIST;
274
+ _list: typeof _redis_search_dist_commands__LIST;
275
+ ALTER: typeof _redis_search_dist_commands_ALTER;
276
+ alter: typeof _redis_search_dist_commands_ALTER;
277
+ AGGREGATE_WITHCURSOR: typeof _redis_search_dist_commands_AGGREGATE_WITHCURSOR;
278
+ aggregateWithCursor: typeof _redis_search_dist_commands_AGGREGATE_WITHCURSOR;
279
+ AGGREGATE: typeof _redis_search_dist_commands_AGGREGATE;
280
+ aggregate: typeof _redis_search_dist_commands_AGGREGATE;
281
+ ALIASADD: typeof _redis_search_dist_commands_ALIASADD;
282
+ aliasAdd: typeof _redis_search_dist_commands_ALIASADD;
283
+ ALIASDEL: typeof _redis_search_dist_commands_ALIASDEL;
284
+ aliasDel: typeof _redis_search_dist_commands_ALIASDEL;
285
+ ALIASUPDATE: typeof _redis_search_dist_commands_ALIASUPDATE;
286
+ aliasUpdate: typeof _redis_search_dist_commands_ALIASUPDATE;
287
+ CONFIG_GET: typeof _redis_search_dist_commands_CONFIG_GET;
288
+ configGet: typeof _redis_search_dist_commands_CONFIG_GET;
289
+ CONFIG_SET: typeof _redis_search_dist_commands_CONFIG_SET;
290
+ configSet: typeof _redis_search_dist_commands_CONFIG_SET;
291
+ CREATE: typeof _redis_search_dist_commands_CREATE;
292
+ create: typeof _redis_search_dist_commands_CREATE;
293
+ CURSOR_DEL: typeof _redis_search_dist_commands_CURSOR_DEL;
294
+ cursorDel: typeof _redis_search_dist_commands_CURSOR_DEL;
295
+ CURSOR_READ: typeof _redis_search_dist_commands_CURSOR_READ;
296
+ cursorRead: typeof _redis_search_dist_commands_CURSOR_READ;
297
+ DICTADD: typeof _redis_search_dist_commands_DICTADD;
298
+ dictAdd: typeof _redis_search_dist_commands_DICTADD;
299
+ DICTDEL: typeof _redis_search_dist_commands_DICTDEL;
300
+ dictDel: typeof _redis_search_dist_commands_DICTDEL;
301
+ DICTDUMP: typeof _redis_search_dist_commands_DICTDUMP;
302
+ dictDump: typeof _redis_search_dist_commands_DICTDUMP;
303
+ DROPINDEX: typeof _redis_search_dist_commands_DROPINDEX;
304
+ dropIndex: typeof _redis_search_dist_commands_DROPINDEX;
305
+ EXPLAIN: typeof _redis_search_dist_commands_EXPLAIN;
306
+ explain: typeof _redis_search_dist_commands_EXPLAIN;
307
+ EXPLAINCLI: typeof _redis_search_dist_commands_EXPLAINCLI;
308
+ explainCli: typeof _redis_search_dist_commands_EXPLAINCLI;
309
+ INFO: typeof _redis_search_dist_commands_INFO;
310
+ info: typeof _redis_search_dist_commands_INFO;
311
+ PROFILESEARCH: typeof _redis_search_dist_commands_PROFILE_SEARCH;
312
+ profileSearch: typeof _redis_search_dist_commands_PROFILE_SEARCH;
313
+ PROFILEAGGREGATE: typeof _redis_search_dist_commands_PROFILE_AGGREGATE;
314
+ profileAggregate: typeof _redis_search_dist_commands_PROFILE_AGGREGATE;
315
+ SEARCH: typeof _redis_search_dist_commands_SEARCH;
316
+ search: typeof _redis_search_dist_commands_SEARCH;
317
+ SEARCH_NOCONTENT: typeof _redis_search_dist_commands_SEARCH_NOCONTENT;
318
+ searchNoContent: typeof _redis_search_dist_commands_SEARCH_NOCONTENT;
319
+ SPELLCHECK: typeof _redis_search_dist_commands_SPELLCHECK;
320
+ spellCheck: typeof _redis_search_dist_commands_SPELLCHECK;
321
+ SUGADD: typeof _redis_search_dist_commands_SUGADD;
322
+ sugAdd: typeof _redis_search_dist_commands_SUGADD;
323
+ SUGDEL: typeof _redis_search_dist_commands_SUGDEL;
324
+ sugDel: typeof _redis_search_dist_commands_SUGDEL;
325
+ SUGGET_WITHPAYLOADS: typeof _redis_search_dist_commands_SUGGET_WITHPAYLOADS;
326
+ sugGetWithPayloads: typeof _redis_search_dist_commands_SUGGET_WITHPAYLOADS;
327
+ SUGGET_WITHSCORES_WITHPAYLOADS: typeof _redis_search_dist_commands_SUGGET_WITHSCORES_WITHPAYLOADS;
328
+ sugGetWithScoresWithPayloads: typeof _redis_search_dist_commands_SUGGET_WITHSCORES_WITHPAYLOADS;
329
+ SUGGET_WITHSCORES: typeof _redis_search_dist_commands_SUGGET_WITHSCORES;
330
+ sugGetWithScores: typeof _redis_search_dist_commands_SUGGET_WITHSCORES;
331
+ SUGGET: typeof _redis_search_dist_commands_SUGGET;
332
+ sugGet: typeof _redis_search_dist_commands_SUGGET;
333
+ SUGLEN: typeof _redis_search_dist_commands_SUGLEN;
334
+ sugLen: typeof _redis_search_dist_commands_SUGLEN;
335
+ SYNDUMP: typeof _redis_search_dist_commands_SYNDUMP;
336
+ synDump: typeof _redis_search_dist_commands_SYNDUMP;
337
+ SYNUPDATE: typeof _redis_search_dist_commands_SYNUPDATE;
338
+ synUpdate: typeof _redis_search_dist_commands_SYNUPDATE;
339
+ TAGVALS: typeof _redis_search_dist_commands_TAGVALS;
340
+ tagVals: typeof _redis_search_dist_commands_TAGVALS;
341
+ };
342
+ ts: {
343
+ ADD: typeof _redis_time_series_dist_commands_ADD;
344
+ add: typeof _redis_time_series_dist_commands_ADD;
345
+ ALTER: typeof _redis_time_series_dist_commands_ALTER;
346
+ alter: typeof _redis_time_series_dist_commands_ALTER;
347
+ CREATE: typeof _redis_time_series_dist_commands_CREATE;
348
+ create: typeof _redis_time_series_dist_commands_CREATE;
349
+ CREATERULE: typeof _redis_time_series_dist_commands_CREATERULE;
350
+ createRule: typeof _redis_time_series_dist_commands_CREATERULE;
351
+ DECRBY: typeof _redis_time_series_dist_commands_DECRBY;
352
+ decrBy: typeof _redis_time_series_dist_commands_DECRBY;
353
+ DEL: typeof _redis_time_series_dist_commands_DEL;
354
+ del: typeof _redis_time_series_dist_commands_DEL;
355
+ DELETERULE: typeof _redis_time_series_dist_commands_DELETERULE;
356
+ deleteRule: typeof _redis_time_series_dist_commands_DELETERULE;
357
+ GET: typeof _redis_time_series_dist_commands_GET;
358
+ get: typeof _redis_time_series_dist_commands_GET;
359
+ INCRBY: typeof _redis_time_series_dist_commands_INCRBY;
360
+ incrBy: typeof _redis_time_series_dist_commands_INCRBY;
361
+ INFO_DEBUG: typeof _redis_time_series_dist_commands_INFO_DEBUG;
362
+ infoDebug: typeof _redis_time_series_dist_commands_INFO_DEBUG;
363
+ INFO: typeof _redis_time_series_dist_commands_INFO;
364
+ info: typeof _redis_time_series_dist_commands_INFO;
365
+ MADD: typeof _redis_time_series_dist_commands_MADD;
366
+ mAdd: typeof _redis_time_series_dist_commands_MADD;
367
+ MGET: typeof _redis_time_series_dist_commands_MGET;
368
+ mGet: typeof _redis_time_series_dist_commands_MGET;
369
+ MGET_WITHLABELS: typeof _redis_time_series_dist_commands_MGET_WITHLABELS;
370
+ mGetWithLabels: typeof _redis_time_series_dist_commands_MGET_WITHLABELS;
371
+ QUERYINDEX: typeof _redis_time_series_dist_commands_QUERYINDEX;
372
+ queryIndex: typeof _redis_time_series_dist_commands_QUERYINDEX;
373
+ RANGE: typeof _redis_time_series_dist_commands_RANGE;
374
+ range: typeof _redis_time_series_dist_commands_RANGE;
375
+ REVRANGE: typeof _redis_time_series_dist_commands_REVRANGE;
376
+ revRange: typeof _redis_time_series_dist_commands_REVRANGE;
377
+ MRANGE: typeof _redis_time_series_dist_commands_MRANGE;
378
+ mRange: typeof _redis_time_series_dist_commands_MRANGE;
379
+ MRANGE_WITHLABELS: typeof _redis_time_series_dist_commands_MRANGE_WITHLABELS;
380
+ mRangeWithLabels: typeof _redis_time_series_dist_commands_MRANGE_WITHLABELS;
381
+ MREVRANGE: typeof _redis_time_series_dist_commands_MREVRANGE;
382
+ mRevRange: typeof _redis_time_series_dist_commands_MREVRANGE;
383
+ MREVRANGE_WITHLABELS: typeof _redis_time_series_dist_commands_MREVRANGE_WITHLABELS;
384
+ mRevRangeWithLabels: typeof _redis_time_series_dist_commands_MREVRANGE_WITHLABELS;
385
+ };
386
+ bf: {
387
+ ADD: typeof _redis_bloom_dist_commands_bloom_ADD;
388
+ add: typeof _redis_bloom_dist_commands_bloom_ADD;
389
+ CARD: typeof _redis_bloom_dist_commands_bloom_CARD;
390
+ card: typeof _redis_bloom_dist_commands_bloom_CARD;
391
+ EXISTS: typeof _redis_bloom_dist_commands_bloom_EXISTS;
392
+ exists: typeof _redis_bloom_dist_commands_bloom_EXISTS;
393
+ INFO: typeof _redis_bloom_dist_commands_bloom_INFO;
394
+ info: typeof _redis_bloom_dist_commands_bloom_INFO;
395
+ INSERT: typeof _redis_bloom_dist_commands_bloom_INSERT;
396
+ insert: typeof _redis_bloom_dist_commands_bloom_INSERT;
397
+ LOADCHUNK: typeof _redis_bloom_dist_commands_bloom_LOADCHUNK;
398
+ loadChunk: typeof _redis_bloom_dist_commands_bloom_LOADCHUNK;
399
+ MADD: typeof _redis_bloom_dist_commands_bloom_MADD;
400
+ mAdd: typeof _redis_bloom_dist_commands_bloom_MADD;
401
+ MEXISTS: typeof _redis_bloom_dist_commands_bloom_MEXISTS;
402
+ mExists: typeof _redis_bloom_dist_commands_bloom_MEXISTS;
403
+ RESERVE: typeof _redis_bloom_dist_commands_bloom_RESERVE;
404
+ reserve: typeof _redis_bloom_dist_commands_bloom_RESERVE;
405
+ SCANDUMP: typeof _redis_bloom_dist_commands_bloom_SCANDUMP;
406
+ scanDump: typeof _redis_bloom_dist_commands_bloom_SCANDUMP;
407
+ };
408
+ cms: {
409
+ INCRBY: typeof _redis_bloom_dist_commands_count_min_sketch_INCRBY;
410
+ incrBy: typeof _redis_bloom_dist_commands_count_min_sketch_INCRBY;
411
+ INFO: typeof _redis_bloom_dist_commands_count_min_sketch_INFO;
412
+ info: typeof _redis_bloom_dist_commands_count_min_sketch_INFO;
413
+ INITBYDIM: typeof _redis_bloom_dist_commands_count_min_sketch_INITBYDIM;
414
+ initByDim: typeof _redis_bloom_dist_commands_count_min_sketch_INITBYDIM;
415
+ INITBYPROB: typeof _redis_bloom_dist_commands_count_min_sketch_INITBYPROB;
416
+ initByProb: typeof _redis_bloom_dist_commands_count_min_sketch_INITBYPROB;
417
+ MERGE: typeof _redis_bloom_dist_commands_count_min_sketch_MERGE;
418
+ merge: typeof _redis_bloom_dist_commands_count_min_sketch_MERGE;
419
+ QUERY: typeof _redis_bloom_dist_commands_count_min_sketch_QUERY;
420
+ query: typeof _redis_bloom_dist_commands_count_min_sketch_QUERY;
421
+ };
422
+ cf: {
423
+ ADD: typeof _redis_bloom_dist_commands_cuckoo_ADD;
424
+ add: typeof _redis_bloom_dist_commands_cuckoo_ADD;
425
+ ADDNX: typeof _redis_bloom_dist_commands_cuckoo_ADDNX;
426
+ addNX: typeof _redis_bloom_dist_commands_cuckoo_ADDNX;
427
+ COUNT: typeof _redis_bloom_dist_commands_cuckoo_COUNT;
428
+ count: typeof _redis_bloom_dist_commands_cuckoo_COUNT;
429
+ DEL: typeof _redis_bloom_dist_commands_cuckoo_DEL;
430
+ del: typeof _redis_bloom_dist_commands_cuckoo_DEL;
431
+ EXISTS: typeof _redis_bloom_dist_commands_cuckoo_EXISTS;
432
+ exists: typeof _redis_bloom_dist_commands_cuckoo_EXISTS;
433
+ INFO: typeof _redis_bloom_dist_commands_cuckoo_INFO;
434
+ info: typeof _redis_bloom_dist_commands_cuckoo_INFO;
435
+ INSERT: typeof _redis_bloom_dist_commands_cuckoo_INSERT;
436
+ insert: typeof _redis_bloom_dist_commands_cuckoo_INSERT;
437
+ INSERTNX: typeof _redis_bloom_dist_commands_cuckoo_INSERTNX;
438
+ insertNX: typeof _redis_bloom_dist_commands_cuckoo_INSERTNX;
439
+ LOADCHUNK: typeof _redis_bloom_dist_commands_cuckoo_LOADCHUNK;
440
+ loadChunk: typeof _redis_bloom_dist_commands_cuckoo_LOADCHUNK;
441
+ RESERVE: typeof _redis_bloom_dist_commands_cuckoo_RESERVE;
442
+ reserve: typeof _redis_bloom_dist_commands_cuckoo_RESERVE;
443
+ SCANDUMP: typeof _redis_bloom_dist_commands_cuckoo_SCANDUMP;
444
+ scanDump: typeof _redis_bloom_dist_commands_cuckoo_SCANDUMP;
445
+ };
446
+ tDigest: {
447
+ ADD: typeof _redis_bloom_dist_commands_t_digest_ADD;
448
+ add: typeof _redis_bloom_dist_commands_t_digest_ADD;
449
+ BYRANK: typeof _redis_bloom_dist_commands_t_digest_BYRANK;
450
+ byRank: typeof _redis_bloom_dist_commands_t_digest_BYRANK;
451
+ BYREVRANK: typeof _redis_bloom_dist_commands_t_digest_BYREVRANK;
452
+ byRevRank: typeof _redis_bloom_dist_commands_t_digest_BYREVRANK;
453
+ CDF: typeof _redis_bloom_dist_commands_t_digest_CDF;
454
+ cdf: typeof _redis_bloom_dist_commands_t_digest_CDF;
455
+ CREATE: typeof _redis_bloom_dist_commands_t_digest_CREATE;
456
+ create: typeof _redis_bloom_dist_commands_t_digest_CREATE;
457
+ INFO: typeof _redis_bloom_dist_commands_t_digest_INFO;
458
+ info: typeof _redis_bloom_dist_commands_t_digest_INFO;
459
+ MAX: typeof _redis_bloom_dist_commands_t_digest_MAX;
460
+ max: typeof _redis_bloom_dist_commands_t_digest_MAX;
461
+ MERGE: typeof _redis_bloom_dist_commands_t_digest_MERGE;
462
+ merge: typeof _redis_bloom_dist_commands_t_digest_MERGE;
463
+ MIN: typeof _redis_bloom_dist_commands_t_digest_MIN;
464
+ min: typeof _redis_bloom_dist_commands_t_digest_MIN;
465
+ QUANTILE: typeof _redis_bloom_dist_commands_t_digest_QUANTILE;
466
+ quantile: typeof _redis_bloom_dist_commands_t_digest_QUANTILE;
467
+ RANK: typeof _redis_bloom_dist_commands_t_digest_RANK;
468
+ rank: typeof _redis_bloom_dist_commands_t_digest_RANK;
469
+ RESET: typeof _redis_bloom_dist_commands_t_digest_RESET;
470
+ reset: typeof _redis_bloom_dist_commands_t_digest_RESET;
471
+ REVRANK: typeof _redis_bloom_dist_commands_t_digest_REVRANK;
472
+ revRank: typeof _redis_bloom_dist_commands_t_digest_REVRANK;
473
+ TRIMMED_MEAN: typeof _redis_bloom_dist_commands_t_digest_TRIMMED_MEAN;
474
+ trimmedMean: typeof _redis_bloom_dist_commands_t_digest_TRIMMED_MEAN;
475
+ };
476
+ topK: {
477
+ ADD: typeof _redis_bloom_dist_commands_top_k_ADD;
478
+ add: typeof _redis_bloom_dist_commands_top_k_ADD;
479
+ COUNT: typeof _redis_bloom_dist_commands_top_k_COUNT;
480
+ count: typeof _redis_bloom_dist_commands_top_k_COUNT;
481
+ INCRBY: typeof _redis_bloom_dist_commands_top_k_INCRBY;
482
+ incrBy: typeof _redis_bloom_dist_commands_top_k_INCRBY;
483
+ INFO: typeof _redis_bloom_dist_commands_top_k_INFO;
484
+ info: typeof _redis_bloom_dist_commands_top_k_INFO;
485
+ LIST_WITHCOUNT: typeof _redis_bloom_dist_commands_top_k_LIST_WITHCOUNT;
486
+ listWithCount: typeof _redis_bloom_dist_commands_top_k_LIST_WITHCOUNT;
487
+ LIST: typeof _redis_bloom_dist_commands_top_k_LIST;
488
+ list: typeof _redis_bloom_dist_commands_top_k_LIST;
489
+ QUERY: typeof _redis_bloom_dist_commands_top_k_QUERY;
490
+ query: typeof _redis_bloom_dist_commands_top_k_QUERY;
491
+ RESERVE: typeof _redis_bloom_dist_commands_top_k_RESERVE;
492
+ reserve: typeof _redis_bloom_dist_commands_top_k_RESERVE;
493
+ };
494
+ }, Record<string, never>, Record<string, never>>;
495
+
496
+ declare function compileHandlebar({ context, filePath }?: {
497
+ context?: {} | undefined;
498
+ filePath?: string | undefined;
499
+ }): string;
500
+
501
+ declare function getDirectory(directory: string, filePath: string): string;
502
+
503
+ interface S3Config {
504
+ accessKeyId: string;
505
+ secretAccessKey: string;
506
+ endpoint: string;
507
+ region: string;
508
+ bucket: string;
509
+ }
510
+ declare class useS3 {
511
+ private config;
512
+ private client;
513
+ constructor(config: S3Config);
514
+ uploadObject({ key, body, metadata, contentType }: {
515
+ key: string;
516
+ body: string | Buffer;
517
+ metadata?: {
518
+ [key: string]: string;
519
+ };
520
+ contentType?: string;
521
+ }): Promise<string>;
522
+ deleteObject(key?: string): Promise<string>;
523
+ }
524
+
525
+ interface AtlasConfig {
526
+ name?: string;
527
+ uri: string;
528
+ db: string;
529
+ }
530
+ declare class useAtlas {
531
+ private static client;
532
+ private static database;
533
+ static initialize(config: AtlasConfig): Promise<void>;
534
+ static getClient(): MongoClient | null;
535
+ static getDb(): Db | null;
536
+ static close(): Promise<void>;
537
+ }
538
+
539
+ declare function prependZeros(value: number, length?: number): string;
540
+
541
+ declare function toObjectId(value: string | ObjectId): ObjectId;
542
+
543
+ type TVerificationMetadata = {
544
+ name?: string;
545
+ app?: string;
546
+ role?: string;
547
+ };
548
+ type TVerification = {
549
+ _id?: ObjectId;
550
+ type: string;
551
+ email: string;
552
+ metadata?: TVerificationMetadata;
553
+ status?: string;
554
+ createdAt: string;
555
+ updatedAt?: string | null;
556
+ expireAt: string;
557
+ };
558
+ declare class MVerification implements TVerification {
559
+ _id?: ObjectId;
560
+ type: string;
561
+ email: string;
562
+ metadata?: TVerificationMetadata;
563
+ status?: string;
564
+ createdAt: string;
565
+ updatedAt?: string | null;
566
+ expireAt: string;
567
+ constructor(value: TVerification);
568
+ }
569
+
570
+ declare function useVerificationRepo(): {
571
+ createTextIndex: () => Promise<void>;
572
+ add: (value: TVerification, session?: ClientSession) => Promise<ObjectId>;
573
+ getVerifications: ({ search, page, limit, sort, status, type, }?: {
574
+ search?: string | undefined;
575
+ page?: number | undefined;
576
+ limit?: number | undefined;
577
+ sort?: {} | undefined;
578
+ status?: string | undefined;
579
+ type?: string | undefined;
580
+ }) => Promise<{
581
+ items: any[];
582
+ pages: number;
583
+ pageRange: string;
584
+ }>;
585
+ getById: (_id: ObjectId | string) => Promise<TVerification | null>;
586
+ getByIdByType: (type: string) => Promise<TVerification[][]>;
587
+ updateStatusById: (_id: ObjectId | string, status: string, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
588
+ };
589
+
590
+ type TKeyValuePair<K extends string | number | symbol = string, V = any> = {
591
+ [key in K]: V;
592
+ };
593
+
594
+ declare function useVerificationService(): {
595
+ createForgetPassword: (email: string) => Promise<ObjectId>;
596
+ createUserInvite: ({ email, metadata, }: {
597
+ email: string;
598
+ metadata: TKeyValuePair;
599
+ }) => Promise<ObjectId>;
600
+ verify: (id: string) => Promise<TVerification | "Successfully added user role.">;
601
+ getById: (id: string) => Promise<TVerification>;
602
+ getVerifications: ({ search, page, status, type, limit, }?: {
603
+ search?: string | undefined;
604
+ page?: number | undefined;
605
+ status?: string | undefined;
606
+ type?: string | undefined;
607
+ limit?: number | undefined;
608
+ }) => Promise<{
609
+ items: any[];
610
+ pages: number;
611
+ pageRange: string;
612
+ }>;
613
+ cancelUserInvitation: (id: ObjectId) => Promise<void>;
614
+ updateStatusById: (_id: string | ObjectId, status: string) => Promise<string>;
615
+ };
616
+
617
+ declare function useVerificationController(): {
618
+ getVerifications: (req: Request, res: Response, next: NextFunction) => Promise<void>;
619
+ createUserInvite: (req: Request, res: Response, next: NextFunction) => Promise<void>;
620
+ createForgetPassword: (req: Request, res: Response, next: NextFunction) => Promise<void>;
621
+ verify: (req: Request, res: Response, next: NextFunction) => Promise<void>;
622
+ cancelUserInvitation: (req: Request, res: Response, next: NextFunction) => Promise<Response<any, Record<string, any>> | undefined>;
623
+ };
624
+
625
+ type TToken = {
626
+ token: string;
627
+ user: ObjectId;
628
+ createdAt?: string;
629
+ };
630
+ declare class MToken implements TToken {
631
+ token: string;
632
+ user: ObjectId;
633
+ createdAt?: string;
634
+ constructor(value: TToken);
635
+ }
636
+
637
+ declare function useTokenRepo(): {
638
+ createToken: ({ token, user }?: {
639
+ token: string;
640
+ user: string | ObjectId;
641
+ }) => Promise<string>;
642
+ getToken: (token: string) => Promise<mongodb.WithId<bson.Document> | null>;
643
+ deleteToken: (token: string) => Promise<mongodb.DeleteResult>;
644
+ };
645
+
646
+ type TUserRole = {
647
+ name: string;
648
+ app: string;
649
+ role: ObjectId | string;
650
+ status?: string;
651
+ };
652
+ declare class MUserRole implements TUserRole {
653
+ name: string;
654
+ app: string;
655
+ role: ObjectId | string;
656
+ status?: string;
657
+ constructor(value: TUserRole);
658
+ }
659
+ type TUser = {
660
+ _id?: ObjectId;
661
+ email: string;
662
+ password: string;
663
+ prefix?: string;
664
+ firstName: string;
665
+ middleName?: string;
666
+ lastName: string;
667
+ suffix?: string;
668
+ birthMonth?: string;
669
+ birthDay?: number;
670
+ birthYear?: number;
671
+ gender?: string;
672
+ type: string;
673
+ roles?: TUserRole[];
674
+ status?: string;
675
+ createdAt?: string;
676
+ updatedAt?: string;
677
+ deletedAt?: string;
678
+ };
679
+ declare class MUser implements TUser {
680
+ _id?: ObjectId;
681
+ email: string;
682
+ password: string;
683
+ prefix?: string;
684
+ firstName: string;
685
+ middleName?: string;
686
+ lastName: string;
687
+ suffix?: string;
688
+ birthMonth?: string;
689
+ birthDay?: number;
690
+ birthYear?: number;
691
+ gender?: string;
692
+ type: string;
693
+ roles?: TUserRole[];
694
+ status?: string;
695
+ createdAt?: string;
696
+ updatedAt?: string;
697
+ deletedAt?: string;
698
+ constructor(value: TUser);
699
+ }
700
+
701
+ declare function useUserRepo(): {
702
+ createTextIndex: () => Promise<void>;
703
+ createUniqueIndex: () => Promise<void>;
704
+ createUser: (value: TUser, session?: ClientSession) => Promise<ObjectId>;
705
+ getUserByEmail: (email: string) => Promise<TUser | null>;
706
+ getUserById: (_id: string | ObjectId) => Promise<TUser | null>;
707
+ getUsers: ({ search, page, limit, sort, status, type, }?: {
708
+ search?: string | undefined;
709
+ page?: number | undefined;
710
+ limit?: number | undefined;
711
+ sort?: {} | undefined;
712
+ status?: string | undefined;
713
+ type?: string | undefined;
714
+ }) => Promise<{
715
+ items: any[];
716
+ pages: number;
717
+ pageRange: string;
718
+ }>;
719
+ updatePassword: ({ _id, password }?: {
720
+ _id: string | ObjectId;
721
+ password: string;
722
+ }, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
723
+ updateName: ({ _id, firstName, lastName }?: {
724
+ _id: string | ObjectId;
725
+ firstName?: string | undefined;
726
+ lastName?: string | undefined;
727
+ }, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
728
+ updateBirthday: ({ _id, month, day, year }?: {
729
+ _id: string | ObjectId;
730
+ month: string;
731
+ day: number;
732
+ year: number;
733
+ }, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
734
+ updateUserFieldById: ({ _id, field, value }?: {
735
+ _id: string | ObjectId;
736
+ field: string;
737
+ value: string;
738
+ }, session?: ClientSession) => Promise<string>;
739
+ addUserRole: ({ _id, role }?: {
740
+ _id: string | ObjectId;
741
+ role: TUserRole;
742
+ }, session?: ClientSession) => Promise<void>;
743
+ getByEmailApp: (email: string, app: string) => Promise<TUser | null>;
744
+ };
745
+
746
+ declare function useUserService(): {
747
+ getUserById: (id: string) => Promise<TUser | null>;
748
+ getUsers: ({ search, page, status, type, limit, }?: {
749
+ search?: string | undefined;
750
+ page?: number | undefined;
751
+ status?: string | undefined;
752
+ type?: string | undefined;
753
+ limit?: number | undefined;
754
+ }) => Promise<{
755
+ items: any[];
756
+ pages: number;
757
+ pageRange: string;
758
+ }>;
759
+ createUser: (value: {
760
+ email: string;
761
+ password: string;
762
+ prefix?: string | undefined;
763
+ firstName: string;
764
+ middleName?: string | undefined;
765
+ lastName: string;
766
+ suffix?: string | undefined;
767
+ type: string;
768
+ roles: TUserRole[];
769
+ }) => Promise<bson.ObjectId>;
770
+ resetPassword: (id: string, newPassword: string, passwordConfirmation: string) => Promise<string>;
771
+ updateName: (_id: string, firstName?: string, lastName?: string) => Promise<string>;
772
+ updateBirthday: (_id: string, month: string, day: number, year: number) => Promise<string>;
773
+ updateUserFieldById: ({ _id, field, value }?: {
774
+ _id: string;
775
+ field: string;
776
+ value: string;
777
+ }) => Promise<string>;
778
+ updateUserProfile: ({ file, user, previousProfile }?: {
779
+ file: Express.Multer.File;
780
+ user: string;
781
+ previousProfile?: string | undefined;
782
+ }) => Promise<string>;
783
+ createUserByInvite: ({ id, firstName, lastName, password, }?: {
784
+ id?: string | undefined;
785
+ firstName?: string | undefined;
786
+ lastName?: string | undefined;
787
+ password?: string | undefined;
788
+ }) => Promise<bson.ObjectId>;
789
+ };
790
+
791
+ declare function useUserController(): {
792
+ getUsers: (req: Request, res: Response, next: NextFunction) => Promise<void>;
793
+ getUserById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
794
+ updateName: (req: Request, res: Response, next: NextFunction) => Promise<void>;
795
+ updateBirthday: (req: Request, res: Response, next: NextFunction) => Promise<void>;
796
+ updateUserFieldById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
797
+ updateUserProfile: (req: Request, res: Response, next: NextFunction) => Promise<void>;
798
+ createUserByInvite: (req: Request, res: Response, next: NextFunction) => Promise<void>;
799
+ };
800
+
801
+ declare function useAuthService(): {
802
+ login: ({ email, password }?: {
803
+ email: string;
804
+ password: string;
805
+ }) => Promise<{
806
+ accessToken: string;
807
+ refreshToken: string;
808
+ id: bson.ObjectId | undefined;
809
+ }>;
810
+ refreshToken: (token: string) => Promise<string>;
811
+ logout: (token: string) => Promise<string>;
812
+ };
813
+
814
+ declare function useAuthController(): {
815
+ login: (req: Request, res: Response, next: NextFunction) => Promise<void>;
816
+ refreshToken: (req: Request, res: Response, next: NextFunction) => Promise<void>;
817
+ logout: (req: Request, res: Response, next: NextFunction) => Promise<void>;
818
+ resetPassword: (req: Request, res: Response, next: NextFunction) => Promise<void>;
819
+ };
820
+
821
+ type TRole = {
822
+ _id?: ObjectId;
823
+ name?: string;
824
+ permissions?: Array<string>;
825
+ type?: string;
826
+ status?: string;
827
+ createdBy?: string | ObjectId;
828
+ createdAt?: string;
829
+ updatedAt?: string;
830
+ deletedAt?: string;
831
+ };
832
+ type TMiniRole = Pick<TRole, "name" | "permissions">;
833
+ declare class MRole implements TRole {
834
+ _id: ObjectId;
835
+ name?: string;
836
+ permissions?: Array<string>;
837
+ type?: string;
838
+ status?: string;
839
+ createdBy?: string | ObjectId;
840
+ createdAt?: string;
841
+ updatedAt?: string;
842
+ deletedAt?: string;
843
+ constructor(value: TRole);
844
+ }
845
+
846
+ declare function useRoleRepo(): {
847
+ createIndex: () => Promise<void>;
848
+ createTextIndex: () => Promise<void>;
849
+ createUniqueIndex: () => Promise<void>;
850
+ addRole: (value: TRole, session?: ClientSession) => Promise<ObjectId>;
851
+ getRoles: ({ search, page, limit, sort, type, }?: {
852
+ search?: string | undefined;
853
+ page?: number | undefined;
854
+ limit?: number | undefined;
855
+ sort?: {} | undefined;
856
+ type?: string | undefined;
857
+ }) => Promise<{
858
+ items: any[];
859
+ pages: number;
860
+ pageRange: string;
861
+ }>;
862
+ getRoleByUserId: (value: ObjectId | string) => Promise<TRole | null>;
863
+ getRoleById: (_id: ObjectId | string) => Promise<mongodb.WithId<bson.Document> | null>;
864
+ getRoleByName: (name: string) => Promise<mongodb.WithId<bson.Document> | null>;
865
+ updateRole: (_id: string | ObjectId, value: TMiniRole, session?: ClientSession) => Promise<string>;
866
+ deleteRole: (_id: ObjectId | string, session?: ClientSession) => Promise<string>;
867
+ };
868
+
869
+ type TFile = {
870
+ _id?: ObjectId;
871
+ name: string;
872
+ type?: string;
873
+ status?: string;
874
+ createdAt: string;
875
+ };
876
+ declare class MFile implements TFile {
877
+ _id?: ObjectId;
878
+ name: string;
879
+ type?: string;
880
+ status?: string;
881
+ createdAt: string;
882
+ constructor(value: TFile);
883
+ }
884
+
885
+ declare function useFileRepo(): {
886
+ createFile: (value: TFile, session?: ClientSession) => Promise<string>;
887
+ deleteFileById: (_id: string | ObjectId, session?: ClientSession) => Promise<string>;
888
+ getAllDraftedFiles: () => Promise<mongodb.WithId<bson.Document>[]>;
889
+ };
890
+
891
+ declare function useFileService(): {
892
+ createFile: (value: Express.Multer.File) => Promise<string>;
893
+ deleteFile: (id: string) => Promise<string>;
894
+ deleteDraft: () => void;
895
+ };
896
+
897
+ declare function useFileController(): {
898
+ upload: (req: Request, res: Response, next: NextFunction) => Promise<void>;
899
+ deleteFile: (req: Request, res: Response, next: NextFunction) => Promise<void>;
900
+ };
901
+
902
+ declare function useRoleService(): {
903
+ createRole: (value: Pick<TRole, "name" | "type" | "permissions">) => Promise<bson.ObjectId>;
904
+ getRoles: ({ search, page, limit, type, }?: {
905
+ search?: string | undefined;
906
+ page?: number | undefined;
907
+ limit?: number | undefined;
908
+ type?: string | undefined;
909
+ }) => Promise<{
910
+ items: any[];
911
+ pages: number;
912
+ pageRange: string;
913
+ }>;
914
+ getRoleByUserId: (value: string) => Promise<TRole | null>;
915
+ getRoleById: (_id: string) => Promise<mongodb.WithId<bson.Document> | null>;
916
+ getRoleByName: (name: string) => Promise<mongodb.WithId<bson.Document> | null>;
917
+ updateRole: (_id: string, value: TMiniRole) => Promise<string>;
918
+ deleteRole: (_id: string) => Promise<string>;
919
+ };
920
+
921
+ declare function useRoleController(): {
922
+ createRole: (req: Request, res: Response, next: NextFunction) => Promise<void>;
923
+ getRoles: (req: Request, res: Response, next: NextFunction) => Promise<void>;
924
+ getRoleByUserId: (req: Request, res: Response, next: NextFunction) => Promise<void>;
925
+ getRoleById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
926
+ updateRole: (req: Request, res: Response, next: NextFunction) => Promise<void>;
927
+ deleteRole: (req: Request, res: Response, next: NextFunction) => Promise<void>;
928
+ };
929
+
930
+ type TEntity = {
931
+ _id?: ObjectId;
932
+ name: string;
933
+ username: string;
934
+ type: "strand" | "office" | "bureau" | "service" | "person";
935
+ createdAt?: string;
936
+ updatedAt?: string;
937
+ deletedAt?: string;
938
+ status?: string;
939
+ };
940
+ declare class MEntity implements TEntity {
941
+ _id?: ObjectId;
942
+ name: string;
943
+ username: string;
944
+ type: "strand" | "office" | "bureau" | "service" | "person";
945
+ createdAt?: string;
946
+ updatedAt?: string;
947
+ deletedAt?: string;
948
+ status?: string;
949
+ constructor(value: TEntity);
950
+ }
951
+
952
+ declare function useEntityRepo(): {
953
+ createIndex: () => Promise<void>;
954
+ createUniqueIndex: () => Promise<void>;
955
+ createEntity: (value: TEntity, session?: ClientSession) => Promise<string>;
956
+ getEntities: ({ search, page, limit, sort, }?: {
957
+ search?: string | undefined;
958
+ page?: number | undefined;
959
+ limit?: number | undefined;
960
+ sort?: {} | undefined;
961
+ }) => Promise<{
962
+ items: any[];
963
+ pages: number;
964
+ pageRange: string;
965
+ }>;
966
+ updateEntityFieldById: ({ _id, field, value }?: {
967
+ _id: string | ObjectId;
968
+ field: string;
969
+ value: string;
970
+ }, session?: ClientSession) => Promise<string>;
971
+ deleteEntity: (_id: string | ObjectId) => Promise<mongodb.UpdateResult<bson.Document>>;
972
+ };
973
+
974
+ declare function useEntityService(): {
975
+ createEntity: (value: any) => Promise<string>;
976
+ getEntities: (value: any) => Promise<{
977
+ items: any[];
978
+ pages: number;
979
+ pageRange: string;
980
+ }>;
981
+ updateEntityFieldById: (_id: string, field: string, value: string) => Promise<string>;
982
+ deleteEntity: (_id: string) => Promise<mongodb.UpdateResult<bson.Document>>;
983
+ };
984
+
985
+ declare function useEntityController(): {
986
+ createEntity: (req: Request, res: Response, next: NextFunction) => Promise<void>;
987
+ getEntities: (req: Request, res: Response, next: NextFunction) => Promise<void>;
988
+ updateEntityFieldById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
989
+ deleteEntity: (req: Request, res: Response, next: NextFunction) => Promise<void>;
990
+ };
991
+
992
+ type TWorkflowStep = {
993
+ name: string;
994
+ assignedTo?: string;
995
+ nextStep?: string;
996
+ };
997
+ type TWorkflow = {
998
+ _id?: ObjectId;
999
+ name: string;
1000
+ steps: TWorkflowStep[];
1001
+ status?: string;
1002
+ createdAt?: string;
1003
+ updatedAt?: string;
1004
+ deletedAt?: string;
1005
+ };
1006
+ declare class MWorkflow implements TWorkflow {
1007
+ _id?: ObjectId;
1008
+ name: string;
1009
+ steps: TWorkflowStep[];
1010
+ status?: string;
1011
+ createdAt?: string;
1012
+ updatedAt?: string;
1013
+ deletedAt?: string;
1014
+ constructor(value: TWorkflow);
1015
+ }
1016
+
1017
+ declare function useWorkflowRepo(): {
1018
+ createIndex: () => Promise<void>;
1019
+ createUniqueIndex: () => Promise<void>;
1020
+ createWorkflow: (value: TWorkflow) => Promise<string>;
1021
+ getWorkflows: ({ search, page, limit, sort, }?: {
1022
+ search?: string | undefined;
1023
+ page?: number | undefined;
1024
+ limit?: number | undefined;
1025
+ sort?: {} | undefined;
1026
+ }) => Promise<{
1027
+ items: any[];
1028
+ pages: number;
1029
+ pageRange: string;
1030
+ }>;
1031
+ getWorkflowById: (_id: string | ObjectId) => Promise<mongodb.WithId<bson.Document> | null>;
1032
+ updateWorkflowFieldById: ({ _id, field, value }?: {
1033
+ _id: string | ObjectId;
1034
+ field: string;
1035
+ value: string;
1036
+ }, session?: ClientSession) => Promise<string>;
1037
+ deleteWorkflow: (_id: string | ObjectId) => Promise<mongodb.UpdateResult<bson.Document>>;
1038
+ };
1039
+
1040
+ declare function useWorkflowService(): {
1041
+ createWorkflow: (value: any) => Promise<string>;
1042
+ getWorkflows: ({ search, page, limit, sort, }?: {
1043
+ search?: string | undefined;
1044
+ page?: number | undefined;
1045
+ limit?: number | undefined;
1046
+ sort?: {} | undefined;
1047
+ }) => Promise<{
1048
+ items: any[];
1049
+ pages: number;
1050
+ pageRange: string;
1051
+ }>;
1052
+ getWorkflowById: (_id: string) => Promise<mongodb.WithId<bson.Document> | null>;
1053
+ updateWorkflowFieldById: (_id: string, field: string, value: string) => Promise<string>;
1054
+ deleteWorkflow: (_id: string) => Promise<mongodb.UpdateResult<bson.Document>>;
1055
+ };
1056
+
1057
+ declare function useWorkflowController(): {
1058
+ createWorkflow: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1059
+ getWorkflows: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1060
+ getWorkflowById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1061
+ updateWorkflowFieldById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1062
+ deleteWorkflow: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1063
+ };
1064
+
1065
+ type TTentative = {
1066
+ month: string;
1067
+ day: number;
1068
+ };
1069
+ type TCapBldgAct = {
1070
+ _id?: ObjectId;
1071
+ title: string;
1072
+ subject: string;
1073
+ PMISActivityCode: string;
1074
+ type: string;
1075
+ strandMandateAddressed: string;
1076
+ objectives: Array<string>;
1077
+ withCPDUnits: boolean;
1078
+ completeStaffWorkReport: string;
1079
+ withATC: null | boolean;
1080
+ ATC: string;
1081
+ conceptNote: string;
1082
+ certOfFundAvailability: string;
1083
+ budgetProposal: string;
1084
+ targets: Array<string>;
1085
+ PRCFormsTemplate: string;
1086
+ HGDGTool: string;
1087
+ EXECOMLeadEndorsement: string;
1088
+ individualResults: Array<string>;
1089
+ organizationalResults: Array<string>;
1090
+ indicative: string;
1091
+ tentative: TTentative;
1092
+ tentativeOption: TTentative;
1093
+ tentativeYear: number;
1094
+ GADAttrRate: number;
1095
+ GADAttrRateAmount: number;
1096
+ NTPCO: {
1097
+ teaching: number;
1098
+ nonteaching: number;
1099
+ teachingRelated: number;
1100
+ };
1101
+ NTPRO: {
1102
+ teaching: number;
1103
+ nonteaching: number;
1104
+ teachingRelated: number;
1105
+ };
1106
+ NTPSDO: {
1107
+ teaching: number;
1108
+ nonteaching: number;
1109
+ teachingRelated: number;
1110
+ };
1111
+ NTPSchool: {
1112
+ teaching: number;
1113
+ nonteaching: number;
1114
+ teachingRelated: number;
1115
+ };
1116
+ withSkeletonWorkforce: null | boolean;
1117
+ skeletonWorkforce: string;
1118
+ roles: Array<string>;
1119
+ rolesRate: Array<number>;
1120
+ skills: Array<string>;
1121
+ skillsRate: Array<number>;
1122
+ resourceEfficiencyRate: Array<number>;
1123
+ AOOR: Array<number>;
1124
+ AOOS: Array<string>;
1125
+ status?: string;
1126
+ createdBy: ObjectId | string;
1127
+ createdAt?: string;
1128
+ updatedAt?: string;
1129
+ deletedAt?: string;
1130
+ };
1131
+ type TCapBldgActBasicInfo = Pick<TCapBldgAct, "_id" | "title" | "subject" | "PMISActivityCode" | "type" | "strandMandateAddressed" | "objectives" | "withCPDUnits" | "createdBy">;
1132
+ type TCapBldgActInitRevEval = Pick<TCapBldgAct, "_id" | "completeStaffWorkReport" | "withATC" | "ATC" | "conceptNote" | "certOfFundAvailability" | "budgetProposal" | "targets" | "PRCFormsTemplate" | "HGDGTool" | "EXECOMLeadEndorsement" | "individualResults" | "organizationalResults" | "indicative" | "tentative" | "tentativeOption" | "tentativeYear" | "GADAttrRate" | "GADAttrRateAmount" | "NTPCO" | "NTPRO" | "NTPSDO" | "NTPSchool" | "withSkeletonWorkforce" | "skeletonWorkforce">;
1133
+ type TCapBldgActAssmtCriteria = Pick<TCapBldgAct, "_id" | "roles" | "rolesRate" | "skills" | "skillsRate" | "resourceEfficiencyRate" | "AOOR" | "AOOS">;
1134
+ declare class MCapBldgAct implements TCapBldgAct {
1135
+ _id?: ObjectId;
1136
+ title: string;
1137
+ subject: string;
1138
+ PMISActivityCode: string;
1139
+ type: string;
1140
+ strandMandateAddressed: string;
1141
+ objectives: Array<string>;
1142
+ withCPDUnits: boolean;
1143
+ completeStaffWorkReport: string;
1144
+ withATC: null | boolean;
1145
+ ATC: string;
1146
+ conceptNote: string;
1147
+ certOfFundAvailability: string;
1148
+ budgetProposal: string;
1149
+ targets: Array<string>;
1150
+ PRCFormsTemplate: string;
1151
+ HGDGTool: string;
1152
+ EXECOMLeadEndorsement: string;
1153
+ individualResults: Array<string>;
1154
+ organizationalResults: Array<string>;
1155
+ indicative: string;
1156
+ tentative: TTentative;
1157
+ tentativeOption: TTentative;
1158
+ tentativeYear: number;
1159
+ GADAttrRate: number;
1160
+ GADAttrRateAmount: number;
1161
+ NTPCO: {
1162
+ teaching: number;
1163
+ nonteaching: number;
1164
+ teachingRelated: number;
1165
+ };
1166
+ NTPRO: {
1167
+ teaching: number;
1168
+ nonteaching: number;
1169
+ teachingRelated: number;
1170
+ };
1171
+ NTPSDO: {
1172
+ teaching: number;
1173
+ nonteaching: number;
1174
+ teachingRelated: number;
1175
+ };
1176
+ NTPSchool: {
1177
+ teaching: number;
1178
+ nonteaching: number;
1179
+ teachingRelated: number;
1180
+ };
1181
+ withSkeletonWorkforce: null | boolean;
1182
+ skeletonWorkforce: string;
1183
+ roles: Array<string>;
1184
+ rolesRate: Array<number>;
1185
+ skills: Array<string>;
1186
+ skillsRate: Array<number>;
1187
+ resourceEfficiencyRate: Array<number>;
1188
+ AOOR: Array<number>;
1189
+ AOOS: Array<string>;
1190
+ status?: string;
1191
+ createdBy: ObjectId | string;
1192
+ createdAt?: string;
1193
+ updatedAt?: string;
1194
+ deletedAt?: string;
1195
+ constructor(value: TCapBldgAct);
1196
+ }
1197
+
1198
+ declare function useCapBldgActRepo(): {
1199
+ createIndex: () => Promise<void>;
1200
+ createTextIndex: () => Promise<void>;
1201
+ createCapBldgAct: (value: TCapBldgAct, session?: ClientSession) => Promise<string>;
1202
+ getById: (_id: string | ObjectId) => Promise<mongodb.WithId<bson.Document> | null>;
1203
+ getCapBldgActs: ({ search, page, limit, sort, status, }?: {
1204
+ search?: string | undefined;
1205
+ page?: number | undefined;
1206
+ limit?: number | undefined;
1207
+ sort?: {} | undefined;
1208
+ status?: string | undefined;
1209
+ }) => Promise<{
1210
+ items: any[];
1211
+ pages: number;
1212
+ pageRange: string;
1213
+ }>;
1214
+ updateCapBldgActFieldById: ({ _id, field, value }?: {
1215
+ _id: string | ObjectId;
1216
+ field: string;
1217
+ value: string;
1218
+ }, session?: ClientSession) => Promise<string>;
1219
+ deleteCapBldgAct: (_id: string | ObjectId) => Promise<mongodb.UpdateResult<bson.Document>>;
1220
+ updateCapBldgActBasicInfo: ({ _id, value }?: {
1221
+ _id: string | ObjectId;
1222
+ value: TCapBldgActBasicInfo;
1223
+ }, session?: ClientSession) => Promise<void>;
1224
+ updateCapBldgActInitRevEval: ({ _id, value }?: {
1225
+ _id: string | ObjectId;
1226
+ value: TCapBldgActInitRevEval;
1227
+ }, session?: ClientSession) => Promise<void>;
1228
+ updateCapBldgActAssmtCriteria: ({ _id, value }?: {
1229
+ _id: string | ObjectId;
1230
+ value: TCapBldgActAssmtCriteria;
1231
+ }, session?: ClientSession) => Promise<void>;
1232
+ };
1233
+
1234
+ declare function useCapBldgActService(): {
1235
+ createCapBldgAct: (value: TCapBldgAct) => Promise<string>;
1236
+ getCapBldgActs: ({ search, page, status, limit, }?: {
1237
+ search?: string | undefined;
1238
+ page?: number | undefined;
1239
+ status?: string | undefined;
1240
+ limit?: number | undefined;
1241
+ }) => Promise<{
1242
+ items: any[];
1243
+ pages: number;
1244
+ pageRange: string;
1245
+ }>;
1246
+ getById: (id: string) => Promise<mongodb.WithId<bson.Document> | null>;
1247
+ updateCapBldgActFieldById: ({ _id, field, value, }?: {
1248
+ _id?: string | undefined;
1249
+ field?: string | undefined;
1250
+ value?: string | undefined;
1251
+ }) => Promise<string>;
1252
+ deleteCapBldgAct: (id: string) => Promise<mongodb.UpdateResult<bson.Document>>;
1253
+ updateCapBldgActBasicInfo: (_id: string, value: TCapBldgActBasicInfo) => Promise<void>;
1254
+ updateCapBldgActInitRevEval: (_id: string, value: TCapBldgActInitRevEval) => Promise<void>;
1255
+ updateCapBldgActAssmtCriteria: (_id: string, value: TCapBldgActAssmtCriteria) => Promise<void>;
1256
+ uploadAttachment: (value: Express.Multer.File, id: string, field: string) => Promise<string>;
1257
+ deleteAttachment: (attachment: string, id: string, field: string) => Promise<string>;
1258
+ };
1259
+
1260
+ declare function useCapBldgActController(): {
1261
+ createCapBldgAct: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1262
+ getCapBldgActs: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1263
+ getById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1264
+ updateBasicInformation: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1265
+ updateInitRevEval: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1266
+ updateAssmtCriteria: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1267
+ updateFieldById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1268
+ uploadAttachment: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1269
+ deleteAttachment: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1270
+ };
1271
+
1272
+ type TAttachment = Pick<TFile, "_id" | "name">;
1273
+ type TComment = {
1274
+ _id?: ObjectId;
1275
+ comment: string;
1276
+ type?: string;
1277
+ user: ObjectId | string;
1278
+ collection: string;
1279
+ document: ObjectId | string;
1280
+ createdAt?: string;
1281
+ updatedAt?: string;
1282
+ deletedAt?: string;
1283
+ };
1284
+ declare class MComment implements TComment {
1285
+ _id?: ObjectId;
1286
+ comment: string;
1287
+ type?: string;
1288
+ user: ObjectId | string;
1289
+ collection: string;
1290
+ document: ObjectId | string;
1291
+ createdAt?: string;
1292
+ updatedAt?: string;
1293
+ deletedAt?: string;
1294
+ constructor(value: TComment);
1295
+ }
1296
+
1297
+ declare function useCommentRepo(): {
1298
+ createIndex: () => Promise<void>;
1299
+ addComment: (value: TComment) => Promise<string>;
1300
+ getComments: ({ search, page, limit, sort, document }?: {
1301
+ search?: string | undefined;
1302
+ page?: number | undefined;
1303
+ limit?: number | undefined;
1304
+ sort?: TKeyValuePair<string, any> | undefined;
1305
+ document?: string | ObjectId | undefined;
1306
+ }) => Promise<{
1307
+ items: any[];
1308
+ pages: number;
1309
+ pageRange: string;
1310
+ }>;
1311
+ };
1312
+
1313
+ declare function useCommentService(): {
1314
+ addComment: ({ comment, type, user, collection, document }?: {
1315
+ comment: string;
1316
+ type: string;
1317
+ user: string;
1318
+ collection: string;
1319
+ document: string;
1320
+ }) => Promise<string>;
1321
+ getComments: ({ page, document }?: {
1322
+ page?: number | undefined;
1323
+ document?: string | undefined;
1324
+ }) => Promise<{
1325
+ items: any[];
1326
+ pages: number;
1327
+ pageRange: string;
1328
+ }>;
1329
+ };
1330
+
1331
+ declare function useCommentController(): {
1332
+ addComment: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1333
+ getComments: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1334
+ };
1335
+
1336
+ declare const MONGO_URI: string;
1337
+ declare const MONGO_DB: string;
1338
+ declare const PORT: number;
1339
+ declare const SECRET_KEY: string;
1340
+ declare const isDev: boolean;
1341
+ declare const MAILER_TRANSPORT_HOST: string;
1342
+ declare const MAILER_TRANSPORT_PORT: number;
1343
+ declare const MAILER_TRANSPORT_SECURE: boolean;
1344
+ declare const MAILER_EMAIL: string;
1345
+ declare const MAILER_PASSWORD: string;
1346
+ declare const ACCESS_TOKEN_SECRET: string;
1347
+ declare const REFRESH_TOKEN_SECRET: string;
1348
+ declare const ACCESS_TOKEN_EXPIRY: string;
1349
+ declare const REFRESH_TOKEN_EXPIRY: string;
1350
+ declare const APP_ACCOUNT: string;
1351
+ declare const VERIFICATION_FORGET_PASSWORD_DURATION: string;
1352
+ declare const VERIFICATION_USER_INVITE_DURATION: string;
1353
+ declare const REDIS_HOST: string;
1354
+ declare const REDIS_PORT: number;
1355
+ declare const REDIS_PASSWORD: string;
1356
+ declare const DEFAULT_USER_EMAIL: string;
1357
+ declare const DEFAULT_USER_PASSWORD: string;
1358
+ declare const DEFAULT_USER_FIRST_NAME: string;
1359
+ declare const DEFAULT_USER_LAST_NAME: string;
1360
+ declare const SPACES_ACCESS_KEY: string;
1361
+ declare const SPACES_SECRET_KEY: string;
1362
+ declare const SPACES_ENDPOINT: string;
1363
+ declare const SPACES_REGION: string;
1364
+ declare const SPACES_BUCKET: string;
1365
+
1366
+ export { ACCESS_TOKEN_EXPIRY, ACCESS_TOKEN_SECRET, APP_ACCOUNT, AppError, BadRequestError, DEFAULT_USER_EMAIL, DEFAULT_USER_FIRST_NAME, DEFAULT_USER_LAST_NAME, DEFAULT_USER_PASSWORD, InternalServerError, MAILER_EMAIL, MAILER_PASSWORD, MAILER_TRANSPORT_HOST, MAILER_TRANSPORT_PORT, MAILER_TRANSPORT_SECURE, MCapBldgAct, MComment, MEntity, MFile, MONGO_DB, MONGO_URI, MRole, MToken, MUser, MUserRole, MVerification, MWorkflow, NotFoundError, PORT, REDIS_HOST, REDIS_PASSWORD, REDIS_PORT, REFRESH_TOKEN_EXPIRY, REFRESH_TOKEN_SECRET, SECRET_KEY, SPACES_ACCESS_KEY, SPACES_BUCKET, SPACES_ENDPOINT, SPACES_REGION, SPACES_SECRET_KEY, TAttachment, TCapBldgAct, TCapBldgActAssmtCriteria, TCapBldgActBasicInfo, TCapBldgActInitRevEval, TComment, TEntity, TFile, TMiniRole, TRole, TToken, TUser, TUserRole, TVerification, TVerificationMetadata, TWorkflow, TWorkflowStep, UnauthorizedError, VERIFICATION_FORGET_PASSWORD_DURATION, VERIFICATION_USER_INVITE_DURATION, authMiddleware, comparePassword, compileHandlebar, errorHandler, generateToken, getDirectory, hashPassword, initRedisClient, isDev, logger, paginate, prependZeros, toObjectId, useAtlas, useAuthController, useAuthService, useCapBldgActController, useCapBldgActRepo, useCapBldgActService, useCommentController, useCommentRepo, useCommentService, useEntityController, useEntityRepo, useEntityService, useFileController, useFileRepo, useFileService, useMailer, useRedisClient, useRoleController, useRoleRepo, useRoleService, useS3, useTokenRepo, useUserController, useUserRepo, useUserService, useVerificationController, useVerificationRepo, useVerificationService, useWorkflowController, useWorkflowRepo, useWorkflowService };