@eeplatform/core 1.6.2 → 1.7.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.
- package/CHANGELOG.md +12 -0
- package/dist/index.d.ts +357 -2822
- package/dist/index.js +5494 -33249
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5453 -33350
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,123 +1,28 @@
|
|
|
1
|
+
import { Request, Response, NextFunction } from 'express';
|
|
1
2
|
import * as mongodb from 'mongodb';
|
|
2
3
|
import { ObjectId, ClientSession, Db, Collection } from 'mongodb';
|
|
3
4
|
import * as bson from 'bson';
|
|
4
|
-
import { Request, Response, NextFunction } from 'express';
|
|
5
|
-
import { z } from 'zod';
|
|
6
5
|
import Joi from 'joi';
|
|
6
|
+
import { z } from 'zod';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
app?: string;
|
|
11
|
-
role?: string;
|
|
12
|
-
roleName?: string;
|
|
13
|
-
referralCode?: string;
|
|
14
|
-
org?: string | ObjectId;
|
|
15
|
-
orgName?: string;
|
|
16
|
-
};
|
|
17
|
-
type TVerification = {
|
|
18
|
-
_id?: ObjectId;
|
|
19
|
-
type: string;
|
|
20
|
-
email: string;
|
|
21
|
-
metadata?: TVerificationMetadata;
|
|
22
|
-
status?: string;
|
|
23
|
-
createdAt: string | Date;
|
|
24
|
-
updatedAt?: string | Date | null;
|
|
25
|
-
expireAt: string | Date;
|
|
26
|
-
};
|
|
27
|
-
declare class MVerification implements TVerification {
|
|
28
|
-
_id?: ObjectId;
|
|
29
|
-
type: string;
|
|
30
|
-
email: string;
|
|
31
|
-
metadata?: TVerificationMetadata;
|
|
32
|
-
status?: string;
|
|
33
|
-
createdAt: string | Date;
|
|
34
|
-
updatedAt?: string | Date | null;
|
|
35
|
-
expireAt: string | Date;
|
|
36
|
-
constructor(value: TVerification);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
declare function useVerificationRepo(): {
|
|
40
|
-
createIndexes: () => Promise<void>;
|
|
41
|
-
add: (value: TVerification, session?: ClientSession) => Promise<ObjectId>;
|
|
42
|
-
getVerifications: ({ search, page, limit, sort, status, type, email, app, }?: {
|
|
43
|
-
search?: string | undefined;
|
|
44
|
-
page?: number | undefined;
|
|
45
|
-
limit?: number | undefined;
|
|
46
|
-
sort?: Record<string, number> | undefined;
|
|
47
|
-
status?: string | undefined;
|
|
48
|
-
type?: string | string[] | undefined;
|
|
49
|
-
email?: string | undefined;
|
|
50
|
-
app?: string | undefined;
|
|
51
|
-
}) => Promise<TVerification[] | {
|
|
52
|
-
items: any[];
|
|
53
|
-
pages: number;
|
|
54
|
-
pageRange: string;
|
|
55
|
-
}>;
|
|
56
|
-
getById: (_id: ObjectId | string) => Promise<TVerification | null>;
|
|
57
|
-
getByIdByType: (type: string) => Promise<TVerification[] | TVerification[][]>;
|
|
58
|
-
updateStatusById: (_id: ObjectId | string, status: string, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
type TKeyValuePair<K extends string | number | symbol = string, V = any> = {
|
|
62
|
-
[key in K]: V;
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
declare function useVerificationService(): {
|
|
66
|
-
createForgetPassword: (email: string) => Promise<string>;
|
|
67
|
-
createUserInvite: ({ email, metadata, }: {
|
|
8
|
+
declare function useAuthService(): {
|
|
9
|
+
login: ({ email, password }?: {
|
|
68
10
|
email: string;
|
|
69
|
-
|
|
70
|
-
}) => Promise<
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
getVerifications: ({ search, page, status, type, email, limit, app, }?: {
|
|
74
|
-
search?: string | undefined;
|
|
75
|
-
page?: number | undefined;
|
|
76
|
-
status?: string | undefined;
|
|
77
|
-
type?: string | undefined;
|
|
78
|
-
email?: string | undefined;
|
|
79
|
-
limit?: number | undefined;
|
|
80
|
-
app?: string | undefined;
|
|
81
|
-
}) => Promise<TVerification[] | {
|
|
82
|
-
items: any[];
|
|
83
|
-
pages: number;
|
|
84
|
-
pageRange: string;
|
|
11
|
+
password: string;
|
|
12
|
+
}) => Promise<{
|
|
13
|
+
sid: string;
|
|
14
|
+
user: string;
|
|
85
15
|
}>;
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
signUp: ({ email, metadata, }: {
|
|
89
|
-
email: string;
|
|
90
|
-
metadata: TKeyValuePair;
|
|
91
|
-
}) => Promise<bson.ObjectId>;
|
|
92
|
-
};
|
|
93
|
-
|
|
94
|
-
declare function useVerificationController(): {
|
|
95
|
-
getVerifications: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
96
|
-
createUserInvite: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
97
|
-
createForgetPassword: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
98
|
-
verify: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
99
|
-
cancelUserInvitation: (req: Request, res: Response, next: NextFunction) => Promise<Response<any, Record<string, any>> | undefined>;
|
|
100
|
-
};
|
|
101
|
-
|
|
102
|
-
type TToken = {
|
|
103
|
-
token: string;
|
|
104
|
-
user: ObjectId;
|
|
105
|
-
createdAt?: string;
|
|
16
|
+
refreshToken: (token: string) => Promise<string>;
|
|
17
|
+
logout: (sid: string) => Promise<string>;
|
|
106
18
|
};
|
|
107
|
-
declare class MToken implements TToken {
|
|
108
|
-
token: string;
|
|
109
|
-
user: ObjectId;
|
|
110
|
-
createdAt?: string;
|
|
111
|
-
constructor(value: TToken);
|
|
112
|
-
}
|
|
113
19
|
|
|
114
|
-
declare function
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
deleteToken: (token: string) => Promise<mongodb.DeleteResult>;
|
|
20
|
+
declare function useAuthController(): {
|
|
21
|
+
login: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
22
|
+
refreshToken: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
23
|
+
logout: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
24
|
+
resetPassword: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
25
|
+
signUp: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
121
26
|
};
|
|
122
27
|
|
|
123
28
|
type TUserRole = {
|
|
@@ -195,15 +100,19 @@ declare function useUserRepo(): {
|
|
|
195
100
|
sort?: {} | undefined;
|
|
196
101
|
status?: string | undefined;
|
|
197
102
|
type?: string | undefined;
|
|
198
|
-
}) => Promise<Record<string, any
|
|
103
|
+
}) => Promise<Record<string, any> | {
|
|
104
|
+
items: any[];
|
|
105
|
+
pages: number;
|
|
106
|
+
pageRange: string;
|
|
107
|
+
}>;
|
|
199
108
|
updatePassword: ({ _id, password }?: {
|
|
200
109
|
_id: string | ObjectId;
|
|
201
110
|
password: string;
|
|
202
111
|
}, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
|
|
203
112
|
updateName: ({ _id, firstName, lastName }?: {
|
|
204
113
|
_id: string | ObjectId;
|
|
205
|
-
firstName?: string
|
|
206
|
-
lastName?: string
|
|
114
|
+
firstName?: string;
|
|
115
|
+
lastName?: string;
|
|
207
116
|
}, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
|
|
208
117
|
updateBirthday: ({ _id, month, day, year }?: {
|
|
209
118
|
_id: string | ObjectId;
|
|
@@ -230,8 +139,12 @@ declare function useUserService(): {
|
|
|
230
139
|
status?: string | undefined;
|
|
231
140
|
type?: string | undefined;
|
|
232
141
|
limit?: number | undefined;
|
|
233
|
-
}) => Promise<Record<string, any
|
|
234
|
-
|
|
142
|
+
}) => Promise<Record<string, any> | {
|
|
143
|
+
items: any[];
|
|
144
|
+
pages: number;
|
|
145
|
+
pageRange: string;
|
|
146
|
+
}>;
|
|
147
|
+
createUser: (value: Pick<TUser, "firstName" | "middleName" | "lastName" | "email" | "password" | "prefix" | "suffix">) => Promise<ObjectId>;
|
|
235
148
|
resetPassword: (id: string, newPassword: string, passwordConfirmation: string) => Promise<string>;
|
|
236
149
|
updateName: (_id: string, firstName?: string, lastName?: string) => Promise<string>;
|
|
237
150
|
updateBirthday: (_id: string, month: string, day: number, year: number) => Promise<string>;
|
|
@@ -243,7 +156,7 @@ declare function useUserService(): {
|
|
|
243
156
|
updateUserProfile: ({ file, user, previousProfile }?: {
|
|
244
157
|
file: Express.Multer.File;
|
|
245
158
|
user: string;
|
|
246
|
-
previousProfile?: string
|
|
159
|
+
previousProfile?: string;
|
|
247
160
|
}) => Promise<string>;
|
|
248
161
|
createUserByInvite: ({ id, firstName, lastName, password, }?: {
|
|
249
162
|
id?: string | undefined;
|
|
@@ -270,24 +183,67 @@ declare function useUserController(): {
|
|
|
270
183
|
createUserByVerification: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
271
184
|
};
|
|
272
185
|
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
186
|
+
type TOrg = {
|
|
187
|
+
_id?: ObjectId;
|
|
188
|
+
name: string;
|
|
189
|
+
description: string;
|
|
190
|
+
type?: string;
|
|
191
|
+
sector: string;
|
|
192
|
+
sectorName?: string;
|
|
193
|
+
sectorType: string;
|
|
194
|
+
category: string;
|
|
195
|
+
email?: string;
|
|
196
|
+
contact?: string;
|
|
197
|
+
region?: string;
|
|
198
|
+
regionName?: string;
|
|
199
|
+
province?: string;
|
|
200
|
+
provinceName?: string;
|
|
201
|
+
cityMunicipality?: string;
|
|
202
|
+
cityMunicipalityName?: string;
|
|
203
|
+
barangay?: string;
|
|
204
|
+
barangayName?: string;
|
|
205
|
+
status?: string;
|
|
206
|
+
createdAt?: string;
|
|
207
|
+
updatedAt?: string;
|
|
208
|
+
deletedAt?: string;
|
|
209
|
+
};
|
|
210
|
+
declare const schemaOrg: Joi.ObjectSchema<any>;
|
|
211
|
+
declare function MOrg(value: TOrg): TOrg;
|
|
212
|
+
|
|
213
|
+
declare function useOrgRepo(): {
|
|
214
|
+
createIndexes: () => Promise<void>;
|
|
215
|
+
add: (value: TOrg, session?: ClientSession) => Promise<ObjectId>;
|
|
216
|
+
getAll: ({ search, page, limit, sort, status, }?: {
|
|
217
|
+
search?: string | undefined;
|
|
218
|
+
page?: number | undefined;
|
|
219
|
+
limit?: number | undefined;
|
|
220
|
+
sort?: {} | undefined;
|
|
221
|
+
status?: string | undefined;
|
|
222
|
+
}) => Promise<Record<string, any> | {
|
|
223
|
+
items: any[];
|
|
224
|
+
pages: number;
|
|
225
|
+
pageRange: string;
|
|
280
226
|
}>;
|
|
281
|
-
|
|
282
|
-
|
|
227
|
+
getById: (_id: string | ObjectId) => Promise<TOrg>;
|
|
228
|
+
updateFieldById: ({ _id, field, value }?: {
|
|
229
|
+
_id: string | ObjectId;
|
|
230
|
+
field: string;
|
|
231
|
+
value: string;
|
|
232
|
+
}, session?: ClientSession) => Promise<string>;
|
|
233
|
+
deleteById: (_id: string | ObjectId) => Promise<string>;
|
|
234
|
+
getByName: (name: string) => Promise<TOrg>;
|
|
283
235
|
};
|
|
284
236
|
|
|
285
|
-
declare function
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
237
|
+
declare function useOrgService(): {
|
|
238
|
+
add: (value: TOrg) => Promise<string>;
|
|
239
|
+
};
|
|
240
|
+
|
|
241
|
+
declare function useOrgController(): {
|
|
242
|
+
createOrg: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
243
|
+
getOrgsByUserId: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
244
|
+
getByName: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
245
|
+
getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
246
|
+
getById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
291
247
|
};
|
|
292
248
|
|
|
293
249
|
type TRole = {
|
|
@@ -327,12 +283,12 @@ declare function useRoleRepo(): {
|
|
|
327
283
|
createUniqueIndex: () => Promise<void>;
|
|
328
284
|
addRole: (value: TRole, session?: ClientSession) => Promise<ObjectId>;
|
|
329
285
|
getRoles: ({ search, page, limit, sort, type, id, }?: {
|
|
330
|
-
search?: string
|
|
331
|
-
page?: number
|
|
332
|
-
limit?: number
|
|
286
|
+
search?: string;
|
|
287
|
+
page?: number;
|
|
288
|
+
limit?: number;
|
|
333
289
|
sort?: any;
|
|
334
|
-
type?: string
|
|
335
|
-
id?: string | ObjectId
|
|
290
|
+
type?: string;
|
|
291
|
+
id?: string | ObjectId;
|
|
336
292
|
}) => Promise<{
|
|
337
293
|
items: any[];
|
|
338
294
|
pages: number;
|
|
@@ -346,6 +302,16 @@ declare function useRoleRepo(): {
|
|
|
346
302
|
updatePermissionsById: (_id: string | ObjectId, permissions: TRole["permissions"], session?: ClientSession) => Promise<string>;
|
|
347
303
|
};
|
|
348
304
|
|
|
305
|
+
declare function useRoleController(): {
|
|
306
|
+
createRole: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
307
|
+
getRoles: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
308
|
+
getRoleByUserId: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
309
|
+
getRoleById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
310
|
+
updateRole: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
311
|
+
deleteRole: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
312
|
+
updatePermissionsById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
313
|
+
};
|
|
314
|
+
|
|
349
315
|
type TFile = {
|
|
350
316
|
_id?: ObjectId;
|
|
351
317
|
name: string;
|
|
@@ -379,557 +345,98 @@ declare function useFileController(): {
|
|
|
379
345
|
deleteFile: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
380
346
|
};
|
|
381
347
|
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
348
|
+
type TVerificationMetadata = {
|
|
349
|
+
name?: string;
|
|
350
|
+
app?: string;
|
|
351
|
+
role?: string;
|
|
352
|
+
roleName?: string;
|
|
353
|
+
referralCode?: string;
|
|
354
|
+
org?: string | ObjectId;
|
|
355
|
+
orgName?: string;
|
|
390
356
|
};
|
|
391
|
-
|
|
392
|
-
type TEntity = {
|
|
357
|
+
type TVerification = {
|
|
393
358
|
_id?: ObjectId;
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
createdAt?: string;
|
|
398
|
-
updatedAt?: string;
|
|
399
|
-
deletedAt?: string;
|
|
359
|
+
type: string;
|
|
360
|
+
email: string;
|
|
361
|
+
metadata?: TVerificationMetadata;
|
|
400
362
|
status?: string;
|
|
363
|
+
createdAt: string | Date;
|
|
364
|
+
updatedAt?: string | Date | null;
|
|
365
|
+
expireAt: string | Date;
|
|
401
366
|
};
|
|
402
|
-
declare class
|
|
367
|
+
declare class MVerification implements TVerification {
|
|
403
368
|
_id?: ObjectId;
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
createdAt?: string;
|
|
408
|
-
updatedAt?: string;
|
|
409
|
-
deletedAt?: string;
|
|
369
|
+
type: string;
|
|
370
|
+
email: string;
|
|
371
|
+
metadata?: TVerificationMetadata;
|
|
410
372
|
status?: string;
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
createUniqueIndex: () => Promise<void>;
|
|
417
|
-
createEntity: (value: TEntity, session?: ClientSession) => Promise<string>;
|
|
418
|
-
getEntities: ({ search, page, limit, sort, }?: {
|
|
419
|
-
search?: string | undefined;
|
|
420
|
-
page?: number | undefined;
|
|
421
|
-
limit?: number | undefined;
|
|
422
|
-
sort?: {} | undefined;
|
|
423
|
-
}) => Promise<Record<string, any>>;
|
|
424
|
-
updateEntityFieldById: ({ _id, field, value }?: {
|
|
425
|
-
_id: string | ObjectId;
|
|
426
|
-
field: string;
|
|
427
|
-
value: string;
|
|
428
|
-
}, session?: ClientSession) => Promise<string>;
|
|
429
|
-
deleteEntity: (_id: string | ObjectId) => Promise<mongodb.UpdateResult<bson.Document>>;
|
|
430
|
-
};
|
|
431
|
-
|
|
432
|
-
declare function useEntityController(): {
|
|
433
|
-
createEntity: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
434
|
-
getEntities: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
435
|
-
updateEntityFieldById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
436
|
-
deleteEntity: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
437
|
-
};
|
|
438
|
-
|
|
439
|
-
declare const CustomerSchema: z.ZodEffects<z.ZodObject<{
|
|
440
|
-
reference_id: z.ZodString;
|
|
441
|
-
type: z.ZodEnum<["INDIVIDUAL", "BUSINESS"]>;
|
|
442
|
-
individual_detail: z.ZodOptional<z.ZodLazy<z.ZodObject<{
|
|
443
|
-
given_names: z.ZodString;
|
|
444
|
-
surname: z.ZodOptional<z.ZodString>;
|
|
445
|
-
nationality: z.ZodOptional<z.ZodString>;
|
|
446
|
-
place_of_birth: z.ZodOptional<z.ZodString>;
|
|
447
|
-
date_of_birth: z.ZodOptional<z.ZodString>;
|
|
448
|
-
gender: z.ZodOptional<z.ZodEnum<["MALE", "FEMALE", "OTHER"]>>;
|
|
449
|
-
employment: z.ZodOptional<z.ZodString>;
|
|
450
|
-
employer_name: z.ZodOptional<z.ZodString>;
|
|
451
|
-
nature_of_business: z.ZodOptional<z.ZodString>;
|
|
452
|
-
role_description: z.ZodOptional<z.ZodString>;
|
|
453
|
-
}, "strip", z.ZodTypeAny, {
|
|
454
|
-
given_names: string;
|
|
455
|
-
gender?: "MALE" | "FEMALE" | "OTHER" | undefined;
|
|
456
|
-
surname?: string | undefined;
|
|
457
|
-
nationality?: string | undefined;
|
|
458
|
-
place_of_birth?: string | undefined;
|
|
459
|
-
date_of_birth?: string | undefined;
|
|
460
|
-
employment?: string | undefined;
|
|
461
|
-
employer_name?: string | undefined;
|
|
462
|
-
nature_of_business?: string | undefined;
|
|
463
|
-
role_description?: string | undefined;
|
|
464
|
-
}, {
|
|
465
|
-
given_names: string;
|
|
466
|
-
gender?: "MALE" | "FEMALE" | "OTHER" | undefined;
|
|
467
|
-
surname?: string | undefined;
|
|
468
|
-
nationality?: string | undefined;
|
|
469
|
-
place_of_birth?: string | undefined;
|
|
470
|
-
date_of_birth?: string | undefined;
|
|
471
|
-
employment?: string | undefined;
|
|
472
|
-
employer_name?: string | undefined;
|
|
473
|
-
nature_of_business?: string | undefined;
|
|
474
|
-
role_description?: string | undefined;
|
|
475
|
-
}>>>;
|
|
476
|
-
business_detail: z.ZodOptional<z.ZodLazy<z.ZodObject<{
|
|
477
|
-
business_name: z.ZodString;
|
|
478
|
-
trading_name: z.ZodOptional<z.ZodString>;
|
|
479
|
-
business_type: z.ZodEnum<["CORPORATION", "SOLE_PROPRIETOR", "PARTNERSHIP", "COOPERATIVE", "TRUST", "NON_PROFIT", "GOVERNMENT"]>;
|
|
480
|
-
nature_of_business: z.ZodOptional<z.ZodString>;
|
|
481
|
-
business_domicile: z.ZodOptional<z.ZodString>;
|
|
482
|
-
date_of_registration: z.ZodOptional<z.ZodString>;
|
|
483
|
-
}, "strip", z.ZodTypeAny, {
|
|
484
|
-
business_name: string;
|
|
485
|
-
business_type: "CORPORATION" | "SOLE_PROPRIETOR" | "PARTNERSHIP" | "COOPERATIVE" | "TRUST" | "NON_PROFIT" | "GOVERNMENT";
|
|
486
|
-
nature_of_business?: string | undefined;
|
|
487
|
-
trading_name?: string | undefined;
|
|
488
|
-
business_domicile?: string | undefined;
|
|
489
|
-
date_of_registration?: string | undefined;
|
|
490
|
-
}, {
|
|
491
|
-
business_name: string;
|
|
492
|
-
business_type: "CORPORATION" | "SOLE_PROPRIETOR" | "PARTNERSHIP" | "COOPERATIVE" | "TRUST" | "NON_PROFIT" | "GOVERNMENT";
|
|
493
|
-
nature_of_business?: string | undefined;
|
|
494
|
-
trading_name?: string | undefined;
|
|
495
|
-
business_domicile?: string | undefined;
|
|
496
|
-
date_of_registration?: string | undefined;
|
|
497
|
-
}>>>;
|
|
498
|
-
mobile_number: z.ZodOptional<z.ZodString>;
|
|
499
|
-
phone_number: z.ZodOptional<z.ZodString>;
|
|
500
|
-
hashed_phone_number: z.ZodOptional<z.ZodString>;
|
|
501
|
-
email: z.ZodOptional<z.ZodString>;
|
|
502
|
-
addresses: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
503
|
-
country: z.ZodString;
|
|
504
|
-
street_line1: z.ZodOptional<z.ZodString>;
|
|
505
|
-
street_line2: z.ZodOptional<z.ZodString>;
|
|
506
|
-
city: z.ZodOptional<z.ZodString>;
|
|
507
|
-
province_state: z.ZodOptional<z.ZodString>;
|
|
508
|
-
postal_code: z.ZodOptional<z.ZodString>;
|
|
509
|
-
category: z.ZodOptional<z.ZodEnum<["HOME", "WORK", "PROVINCIAL"]>>;
|
|
510
|
-
is_primary: z.ZodOptional<z.ZodBoolean>;
|
|
511
|
-
}, "strip", z.ZodTypeAny, {
|
|
512
|
-
country: string;
|
|
513
|
-
street_line1?: string | undefined;
|
|
514
|
-
street_line2?: string | undefined;
|
|
515
|
-
city?: string | undefined;
|
|
516
|
-
province_state?: string | undefined;
|
|
517
|
-
postal_code?: string | undefined;
|
|
518
|
-
category?: "HOME" | "WORK" | "PROVINCIAL" | undefined;
|
|
519
|
-
is_primary?: boolean | undefined;
|
|
520
|
-
}, {
|
|
521
|
-
country: string;
|
|
522
|
-
street_line1?: string | undefined;
|
|
523
|
-
street_line2?: string | undefined;
|
|
524
|
-
city?: string | undefined;
|
|
525
|
-
province_state?: string | undefined;
|
|
526
|
-
postal_code?: string | undefined;
|
|
527
|
-
category?: "HOME" | "WORK" | "PROVINCIAL" | undefined;
|
|
528
|
-
is_primary?: boolean | undefined;
|
|
529
|
-
}>, "many">>;
|
|
530
|
-
identity_accounts: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
531
|
-
type: z.ZodEnum<["BANK_ACCOUNT", "EWALLET", "CREDIT_CARD", "PAY_LATER", "OTC", "QR_CODE", "SOCIAL_MEDIA"]>;
|
|
532
|
-
company: z.ZodOptional<z.ZodString>;
|
|
533
|
-
description: z.ZodOptional<z.ZodString>;
|
|
534
|
-
country: z.ZodOptional<z.ZodString>;
|
|
535
|
-
properties: z.ZodOptional<z.ZodAny>;
|
|
536
|
-
}, "strip", z.ZodTypeAny, {
|
|
537
|
-
type: "BANK_ACCOUNT" | "EWALLET" | "CREDIT_CARD" | "PAY_LATER" | "OTC" | "QR_CODE" | "SOCIAL_MEDIA";
|
|
538
|
-
country?: string | undefined;
|
|
539
|
-
company?: string | undefined;
|
|
540
|
-
description?: string | undefined;
|
|
541
|
-
properties?: any;
|
|
542
|
-
}, {
|
|
543
|
-
type: "BANK_ACCOUNT" | "EWALLET" | "CREDIT_CARD" | "PAY_LATER" | "OTC" | "QR_CODE" | "SOCIAL_MEDIA";
|
|
544
|
-
country?: string | undefined;
|
|
545
|
-
company?: string | undefined;
|
|
546
|
-
description?: string | undefined;
|
|
547
|
-
properties?: any;
|
|
548
|
-
}>, "many">>;
|
|
549
|
-
kyc_documents: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
550
|
-
country: z.ZodString;
|
|
551
|
-
type: z.ZodEnum<["BIRTH_CERTIFICATE", "BANK_STATEMENT", "DRIVING_LICENSE", "IDENTITY_CARD", "PASSPORT", "VISA", "BUSINESS_REGISTRATION", "BUSINESS_LICENSE"]>;
|
|
552
|
-
sub_type: z.ZodOptional<z.ZodEnum<["NATIONAL_ID", "CONSULAR_ID", "VOTER_ID", "POSTAL_ID", "RESIDENCE_PERMIT", "TAX_ID", "STUDENT_ID", "MILITARY_ID", "MEDICAL_ID"]>>;
|
|
553
|
-
document_name: z.ZodOptional<z.ZodString>;
|
|
554
|
-
document_number: z.ZodOptional<z.ZodString>;
|
|
555
|
-
expires_at: z.ZodOptional<z.ZodString>;
|
|
556
|
-
holder_name: z.ZodOptional<z.ZodString>;
|
|
557
|
-
document_images: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
558
|
-
}, "strip", z.ZodTypeAny, {
|
|
559
|
-
type: "BIRTH_CERTIFICATE" | "BANK_STATEMENT" | "DRIVING_LICENSE" | "IDENTITY_CARD" | "PASSPORT" | "VISA" | "BUSINESS_REGISTRATION" | "BUSINESS_LICENSE";
|
|
560
|
-
country: string;
|
|
561
|
-
sub_type?: "NATIONAL_ID" | "CONSULAR_ID" | "VOTER_ID" | "POSTAL_ID" | "RESIDENCE_PERMIT" | "TAX_ID" | "STUDENT_ID" | "MILITARY_ID" | "MEDICAL_ID" | undefined;
|
|
562
|
-
document_name?: string | undefined;
|
|
563
|
-
document_number?: string | undefined;
|
|
564
|
-
expires_at?: string | undefined;
|
|
565
|
-
holder_name?: string | undefined;
|
|
566
|
-
document_images?: string[] | undefined;
|
|
567
|
-
}, {
|
|
568
|
-
type: "BIRTH_CERTIFICATE" | "BANK_STATEMENT" | "DRIVING_LICENSE" | "IDENTITY_CARD" | "PASSPORT" | "VISA" | "BUSINESS_REGISTRATION" | "BUSINESS_LICENSE";
|
|
569
|
-
country: string;
|
|
570
|
-
sub_type?: "NATIONAL_ID" | "CONSULAR_ID" | "VOTER_ID" | "POSTAL_ID" | "RESIDENCE_PERMIT" | "TAX_ID" | "STUDENT_ID" | "MILITARY_ID" | "MEDICAL_ID" | undefined;
|
|
571
|
-
document_name?: string | undefined;
|
|
572
|
-
document_number?: string | undefined;
|
|
573
|
-
expires_at?: string | undefined;
|
|
574
|
-
holder_name?: string | undefined;
|
|
575
|
-
document_images?: string[] | undefined;
|
|
576
|
-
}>, "many">>;
|
|
577
|
-
description: z.ZodOptional<z.ZodString>;
|
|
578
|
-
date_of_registration: z.ZodOptional<z.ZodString>;
|
|
579
|
-
}, "strip", z.ZodTypeAny, {
|
|
580
|
-
type: "INDIVIDUAL" | "BUSINESS";
|
|
581
|
-
reference_id: string;
|
|
582
|
-
email?: string | undefined;
|
|
583
|
-
description?: string | undefined;
|
|
584
|
-
date_of_registration?: string | undefined;
|
|
585
|
-
individual_detail?: {
|
|
586
|
-
given_names: string;
|
|
587
|
-
gender?: "MALE" | "FEMALE" | "OTHER" | undefined;
|
|
588
|
-
surname?: string | undefined;
|
|
589
|
-
nationality?: string | undefined;
|
|
590
|
-
place_of_birth?: string | undefined;
|
|
591
|
-
date_of_birth?: string | undefined;
|
|
592
|
-
employment?: string | undefined;
|
|
593
|
-
employer_name?: string | undefined;
|
|
594
|
-
nature_of_business?: string | undefined;
|
|
595
|
-
role_description?: string | undefined;
|
|
596
|
-
} | undefined;
|
|
597
|
-
business_detail?: {
|
|
598
|
-
business_name: string;
|
|
599
|
-
business_type: "CORPORATION" | "SOLE_PROPRIETOR" | "PARTNERSHIP" | "COOPERATIVE" | "TRUST" | "NON_PROFIT" | "GOVERNMENT";
|
|
600
|
-
nature_of_business?: string | undefined;
|
|
601
|
-
trading_name?: string | undefined;
|
|
602
|
-
business_domicile?: string | undefined;
|
|
603
|
-
date_of_registration?: string | undefined;
|
|
604
|
-
} | undefined;
|
|
605
|
-
mobile_number?: string | undefined;
|
|
606
|
-
phone_number?: string | undefined;
|
|
607
|
-
hashed_phone_number?: string | undefined;
|
|
608
|
-
addresses?: {
|
|
609
|
-
country: string;
|
|
610
|
-
street_line1?: string | undefined;
|
|
611
|
-
street_line2?: string | undefined;
|
|
612
|
-
city?: string | undefined;
|
|
613
|
-
province_state?: string | undefined;
|
|
614
|
-
postal_code?: string | undefined;
|
|
615
|
-
category?: "HOME" | "WORK" | "PROVINCIAL" | undefined;
|
|
616
|
-
is_primary?: boolean | undefined;
|
|
617
|
-
}[] | undefined;
|
|
618
|
-
identity_accounts?: {
|
|
619
|
-
type: "BANK_ACCOUNT" | "EWALLET" | "CREDIT_CARD" | "PAY_LATER" | "OTC" | "QR_CODE" | "SOCIAL_MEDIA";
|
|
620
|
-
country?: string | undefined;
|
|
621
|
-
company?: string | undefined;
|
|
622
|
-
description?: string | undefined;
|
|
623
|
-
properties?: any;
|
|
624
|
-
}[] | undefined;
|
|
625
|
-
kyc_documents?: {
|
|
626
|
-
type: "BIRTH_CERTIFICATE" | "BANK_STATEMENT" | "DRIVING_LICENSE" | "IDENTITY_CARD" | "PASSPORT" | "VISA" | "BUSINESS_REGISTRATION" | "BUSINESS_LICENSE";
|
|
627
|
-
country: string;
|
|
628
|
-
sub_type?: "NATIONAL_ID" | "CONSULAR_ID" | "VOTER_ID" | "POSTAL_ID" | "RESIDENCE_PERMIT" | "TAX_ID" | "STUDENT_ID" | "MILITARY_ID" | "MEDICAL_ID" | undefined;
|
|
629
|
-
document_name?: string | undefined;
|
|
630
|
-
document_number?: string | undefined;
|
|
631
|
-
expires_at?: string | undefined;
|
|
632
|
-
holder_name?: string | undefined;
|
|
633
|
-
document_images?: string[] | undefined;
|
|
634
|
-
}[] | undefined;
|
|
635
|
-
}, {
|
|
636
|
-
type: "INDIVIDUAL" | "BUSINESS";
|
|
637
|
-
reference_id: string;
|
|
638
|
-
email?: string | undefined;
|
|
639
|
-
description?: string | undefined;
|
|
640
|
-
date_of_registration?: string | undefined;
|
|
641
|
-
individual_detail?: {
|
|
642
|
-
given_names: string;
|
|
643
|
-
gender?: "MALE" | "FEMALE" | "OTHER" | undefined;
|
|
644
|
-
surname?: string | undefined;
|
|
645
|
-
nationality?: string | undefined;
|
|
646
|
-
place_of_birth?: string | undefined;
|
|
647
|
-
date_of_birth?: string | undefined;
|
|
648
|
-
employment?: string | undefined;
|
|
649
|
-
employer_name?: string | undefined;
|
|
650
|
-
nature_of_business?: string | undefined;
|
|
651
|
-
role_description?: string | undefined;
|
|
652
|
-
} | undefined;
|
|
653
|
-
business_detail?: {
|
|
654
|
-
business_name: string;
|
|
655
|
-
business_type: "CORPORATION" | "SOLE_PROPRIETOR" | "PARTNERSHIP" | "COOPERATIVE" | "TRUST" | "NON_PROFIT" | "GOVERNMENT";
|
|
656
|
-
nature_of_business?: string | undefined;
|
|
657
|
-
trading_name?: string | undefined;
|
|
658
|
-
business_domicile?: string | undefined;
|
|
659
|
-
date_of_registration?: string | undefined;
|
|
660
|
-
} | undefined;
|
|
661
|
-
mobile_number?: string | undefined;
|
|
662
|
-
phone_number?: string | undefined;
|
|
663
|
-
hashed_phone_number?: string | undefined;
|
|
664
|
-
addresses?: {
|
|
665
|
-
country: string;
|
|
666
|
-
street_line1?: string | undefined;
|
|
667
|
-
street_line2?: string | undefined;
|
|
668
|
-
city?: string | undefined;
|
|
669
|
-
province_state?: string | undefined;
|
|
670
|
-
postal_code?: string | undefined;
|
|
671
|
-
category?: "HOME" | "WORK" | "PROVINCIAL" | undefined;
|
|
672
|
-
is_primary?: boolean | undefined;
|
|
673
|
-
}[] | undefined;
|
|
674
|
-
identity_accounts?: {
|
|
675
|
-
type: "BANK_ACCOUNT" | "EWALLET" | "CREDIT_CARD" | "PAY_LATER" | "OTC" | "QR_CODE" | "SOCIAL_MEDIA";
|
|
676
|
-
country?: string | undefined;
|
|
677
|
-
company?: string | undefined;
|
|
678
|
-
description?: string | undefined;
|
|
679
|
-
properties?: any;
|
|
680
|
-
}[] | undefined;
|
|
681
|
-
kyc_documents?: {
|
|
682
|
-
type: "BIRTH_CERTIFICATE" | "BANK_STATEMENT" | "DRIVING_LICENSE" | "IDENTITY_CARD" | "PASSPORT" | "VISA" | "BUSINESS_REGISTRATION" | "BUSINESS_LICENSE";
|
|
683
|
-
country: string;
|
|
684
|
-
sub_type?: "NATIONAL_ID" | "CONSULAR_ID" | "VOTER_ID" | "POSTAL_ID" | "RESIDENCE_PERMIT" | "TAX_ID" | "STUDENT_ID" | "MILITARY_ID" | "MEDICAL_ID" | undefined;
|
|
685
|
-
document_name?: string | undefined;
|
|
686
|
-
document_number?: string | undefined;
|
|
687
|
-
expires_at?: string | undefined;
|
|
688
|
-
holder_name?: string | undefined;
|
|
689
|
-
document_images?: string[] | undefined;
|
|
690
|
-
}[] | undefined;
|
|
691
|
-
}>, {
|
|
692
|
-
type: "INDIVIDUAL" | "BUSINESS";
|
|
693
|
-
reference_id: string;
|
|
694
|
-
email?: string | undefined;
|
|
695
|
-
description?: string | undefined;
|
|
696
|
-
date_of_registration?: string | undefined;
|
|
697
|
-
individual_detail?: {
|
|
698
|
-
given_names: string;
|
|
699
|
-
gender?: "MALE" | "FEMALE" | "OTHER" | undefined;
|
|
700
|
-
surname?: string | undefined;
|
|
701
|
-
nationality?: string | undefined;
|
|
702
|
-
place_of_birth?: string | undefined;
|
|
703
|
-
date_of_birth?: string | undefined;
|
|
704
|
-
employment?: string | undefined;
|
|
705
|
-
employer_name?: string | undefined;
|
|
706
|
-
nature_of_business?: string | undefined;
|
|
707
|
-
role_description?: string | undefined;
|
|
708
|
-
} | undefined;
|
|
709
|
-
business_detail?: {
|
|
710
|
-
business_name: string;
|
|
711
|
-
business_type: "CORPORATION" | "SOLE_PROPRIETOR" | "PARTNERSHIP" | "COOPERATIVE" | "TRUST" | "NON_PROFIT" | "GOVERNMENT";
|
|
712
|
-
nature_of_business?: string | undefined;
|
|
713
|
-
trading_name?: string | undefined;
|
|
714
|
-
business_domicile?: string | undefined;
|
|
715
|
-
date_of_registration?: string | undefined;
|
|
716
|
-
} | undefined;
|
|
717
|
-
mobile_number?: string | undefined;
|
|
718
|
-
phone_number?: string | undefined;
|
|
719
|
-
hashed_phone_number?: string | undefined;
|
|
720
|
-
addresses?: {
|
|
721
|
-
country: string;
|
|
722
|
-
street_line1?: string | undefined;
|
|
723
|
-
street_line2?: string | undefined;
|
|
724
|
-
city?: string | undefined;
|
|
725
|
-
province_state?: string | undefined;
|
|
726
|
-
postal_code?: string | undefined;
|
|
727
|
-
category?: "HOME" | "WORK" | "PROVINCIAL" | undefined;
|
|
728
|
-
is_primary?: boolean | undefined;
|
|
729
|
-
}[] | undefined;
|
|
730
|
-
identity_accounts?: {
|
|
731
|
-
type: "BANK_ACCOUNT" | "EWALLET" | "CREDIT_CARD" | "PAY_LATER" | "OTC" | "QR_CODE" | "SOCIAL_MEDIA";
|
|
732
|
-
country?: string | undefined;
|
|
733
|
-
company?: string | undefined;
|
|
734
|
-
description?: string | undefined;
|
|
735
|
-
properties?: any;
|
|
736
|
-
}[] | undefined;
|
|
737
|
-
kyc_documents?: {
|
|
738
|
-
type: "BIRTH_CERTIFICATE" | "BANK_STATEMENT" | "DRIVING_LICENSE" | "IDENTITY_CARD" | "PASSPORT" | "VISA" | "BUSINESS_REGISTRATION" | "BUSINESS_LICENSE";
|
|
739
|
-
country: string;
|
|
740
|
-
sub_type?: "NATIONAL_ID" | "CONSULAR_ID" | "VOTER_ID" | "POSTAL_ID" | "RESIDENCE_PERMIT" | "TAX_ID" | "STUDENT_ID" | "MILITARY_ID" | "MEDICAL_ID" | undefined;
|
|
741
|
-
document_name?: string | undefined;
|
|
742
|
-
document_number?: string | undefined;
|
|
743
|
-
expires_at?: string | undefined;
|
|
744
|
-
holder_name?: string | undefined;
|
|
745
|
-
document_images?: string[] | undefined;
|
|
746
|
-
}[] | undefined;
|
|
747
|
-
}, {
|
|
748
|
-
type: "INDIVIDUAL" | "BUSINESS";
|
|
749
|
-
reference_id: string;
|
|
750
|
-
email?: string | undefined;
|
|
751
|
-
description?: string | undefined;
|
|
752
|
-
date_of_registration?: string | undefined;
|
|
753
|
-
individual_detail?: {
|
|
754
|
-
given_names: string;
|
|
755
|
-
gender?: "MALE" | "FEMALE" | "OTHER" | undefined;
|
|
756
|
-
surname?: string | undefined;
|
|
757
|
-
nationality?: string | undefined;
|
|
758
|
-
place_of_birth?: string | undefined;
|
|
759
|
-
date_of_birth?: string | undefined;
|
|
760
|
-
employment?: string | undefined;
|
|
761
|
-
employer_name?: string | undefined;
|
|
762
|
-
nature_of_business?: string | undefined;
|
|
763
|
-
role_description?: string | undefined;
|
|
764
|
-
} | undefined;
|
|
765
|
-
business_detail?: {
|
|
766
|
-
business_name: string;
|
|
767
|
-
business_type: "CORPORATION" | "SOLE_PROPRIETOR" | "PARTNERSHIP" | "COOPERATIVE" | "TRUST" | "NON_PROFIT" | "GOVERNMENT";
|
|
768
|
-
nature_of_business?: string | undefined;
|
|
769
|
-
trading_name?: string | undefined;
|
|
770
|
-
business_domicile?: string | undefined;
|
|
771
|
-
date_of_registration?: string | undefined;
|
|
772
|
-
} | undefined;
|
|
773
|
-
mobile_number?: string | undefined;
|
|
774
|
-
phone_number?: string | undefined;
|
|
775
|
-
hashed_phone_number?: string | undefined;
|
|
776
|
-
addresses?: {
|
|
777
|
-
country: string;
|
|
778
|
-
street_line1?: string | undefined;
|
|
779
|
-
street_line2?: string | undefined;
|
|
780
|
-
city?: string | undefined;
|
|
781
|
-
province_state?: string | undefined;
|
|
782
|
-
postal_code?: string | undefined;
|
|
783
|
-
category?: "HOME" | "WORK" | "PROVINCIAL" | undefined;
|
|
784
|
-
is_primary?: boolean | undefined;
|
|
785
|
-
}[] | undefined;
|
|
786
|
-
identity_accounts?: {
|
|
787
|
-
type: "BANK_ACCOUNT" | "EWALLET" | "CREDIT_CARD" | "PAY_LATER" | "OTC" | "QR_CODE" | "SOCIAL_MEDIA";
|
|
788
|
-
country?: string | undefined;
|
|
789
|
-
company?: string | undefined;
|
|
790
|
-
description?: string | undefined;
|
|
791
|
-
properties?: any;
|
|
792
|
-
}[] | undefined;
|
|
793
|
-
kyc_documents?: {
|
|
794
|
-
type: "BIRTH_CERTIFICATE" | "BANK_STATEMENT" | "DRIVING_LICENSE" | "IDENTITY_CARD" | "PASSPORT" | "VISA" | "BUSINESS_REGISTRATION" | "BUSINESS_LICENSE";
|
|
795
|
-
country: string;
|
|
796
|
-
sub_type?: "NATIONAL_ID" | "CONSULAR_ID" | "VOTER_ID" | "POSTAL_ID" | "RESIDENCE_PERMIT" | "TAX_ID" | "STUDENT_ID" | "MILITARY_ID" | "MEDICAL_ID" | undefined;
|
|
797
|
-
document_name?: string | undefined;
|
|
798
|
-
document_number?: string | undefined;
|
|
799
|
-
expires_at?: string | undefined;
|
|
800
|
-
holder_name?: string | undefined;
|
|
801
|
-
document_images?: string[] | undefined;
|
|
802
|
-
}[] | undefined;
|
|
803
|
-
}>;
|
|
804
|
-
type TCustomer = z.infer<typeof CustomerSchema>;
|
|
805
|
-
|
|
806
|
-
declare function useXenditService(): {
|
|
807
|
-
createCustomer: (value: TCustomer) => Promise<any>;
|
|
808
|
-
linkPaymentMethodEWallet: ({ customerId, type, success_return_url, failure_return_url, cancel_return_url, }?: {
|
|
809
|
-
customerId?: string | undefined;
|
|
810
|
-
type?: string | undefined;
|
|
811
|
-
success_return_url?: string | undefined;
|
|
812
|
-
failure_return_url?: string | undefined;
|
|
813
|
-
cancel_return_url?: string | undefined;
|
|
814
|
-
}) => Promise<any>;
|
|
815
|
-
initGCashLinkingAndPaymentRequest: ({ amount, currency, countryCode, customerId, success_return_url, failure_return_url, }?: {
|
|
816
|
-
amount?: number | undefined;
|
|
817
|
-
currency?: string | undefined;
|
|
818
|
-
countryCode?: string | undefined;
|
|
819
|
-
customerId?: string | undefined;
|
|
820
|
-
success_return_url?: string | undefined;
|
|
821
|
-
failure_return_url?: string | undefined;
|
|
822
|
-
}) => Promise<any>;
|
|
823
|
-
initSubscription: ({ customer, currency, amount, paymentMethod, description, interval, seats, }?: {
|
|
824
|
-
customer?: string | undefined;
|
|
825
|
-
currency?: string | undefined;
|
|
826
|
-
amount?: number | undefined;
|
|
827
|
-
paymentMethod?: string | undefined;
|
|
828
|
-
description?: string | undefined;
|
|
829
|
-
interval?: string | undefined;
|
|
830
|
-
seats?: number | undefined;
|
|
831
|
-
}) => Promise<any>;
|
|
832
|
-
linkPaymentMethodCard: ({ success_return_url, failure_return_url, card_number, expiry_month, expiry_year, cvv, cardholder_name, currency, }?: {
|
|
833
|
-
success_return_url?: string | undefined;
|
|
834
|
-
failure_return_url?: string | undefined;
|
|
835
|
-
card_number?: string | undefined;
|
|
836
|
-
expiry_month?: string | undefined;
|
|
837
|
-
expiry_year?: string | undefined;
|
|
838
|
-
cvv?: string | undefined;
|
|
839
|
-
cardholder_name?: string | undefined;
|
|
840
|
-
currency?: string | undefined;
|
|
841
|
-
}) => Promise<any>;
|
|
842
|
-
eWalletSubsequentPayment: ({ amount, currency, payment_method_id, customer_id, description, }?: {
|
|
843
|
-
amount?: number | undefined;
|
|
844
|
-
currency?: string | undefined;
|
|
845
|
-
payment_method_id?: string | undefined;
|
|
846
|
-
customer_id?: string | undefined;
|
|
847
|
-
description?: string | undefined;
|
|
848
|
-
}) => Promise<any>;
|
|
849
|
-
checkSubscriptionStatus: (subscriptionId: string) => Promise<string>;
|
|
850
|
-
cancelSubscription: (subscriptionId: string) => Promise<string>;
|
|
851
|
-
getSubscription: (id: string) => Promise<any>;
|
|
852
|
-
getSubscriptionCycles: (id: string) => Promise<any>;
|
|
853
|
-
pay: (value: {
|
|
854
|
-
amount: number;
|
|
855
|
-
currency: string;
|
|
856
|
-
payment_method_id: string;
|
|
857
|
-
customer_id: string;
|
|
858
|
-
description?: string;
|
|
859
|
-
metadata?: Record<string, any>;
|
|
860
|
-
}) => Promise<any>;
|
|
861
|
-
getPaymentMethodById: (id: string) => Promise<any>;
|
|
862
|
-
getCustomerById: (id: string) => Promise<any>;
|
|
863
|
-
eWalletLinkOnly: (value: Record<string, any>) => Promise<any>;
|
|
864
|
-
directDebitLinkOnly: (value: Record<string, any>) => Promise<any>;
|
|
865
|
-
cardLinkOnly: (value: Record<string, any>) => Promise<any>;
|
|
866
|
-
getPaymentMethodsByCustomerId: (customerId: string) => Promise<any>;
|
|
867
|
-
updatePaymentMethodStatusById: (id: string, status: string) => Promise<any>;
|
|
868
|
-
};
|
|
373
|
+
createdAt: string | Date;
|
|
374
|
+
updatedAt?: string | Date | null;
|
|
375
|
+
expireAt: string | Date;
|
|
376
|
+
constructor(value: TVerification);
|
|
377
|
+
}
|
|
869
378
|
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
379
|
+
declare function useVerificationRepo(): {
|
|
380
|
+
createIndexes: () => Promise<void>;
|
|
381
|
+
add: (value: TVerification, session?: ClientSession) => Promise<ObjectId>;
|
|
382
|
+
getVerifications: ({ search, page, limit, sort, status, type, email, app, }?: {
|
|
383
|
+
search?: string;
|
|
384
|
+
page?: number;
|
|
385
|
+
limit?: number;
|
|
386
|
+
sort?: Record<string, number>;
|
|
387
|
+
status?: string;
|
|
388
|
+
type?: string | Array<string>;
|
|
389
|
+
email?: string;
|
|
390
|
+
app?: string;
|
|
391
|
+
}) => Promise<{
|
|
392
|
+
items: any[];
|
|
393
|
+
pages: number;
|
|
394
|
+
pageRange: string;
|
|
395
|
+
} | TVerification[]>;
|
|
396
|
+
getById: (_id: ObjectId | string) => Promise<TVerification | null>;
|
|
397
|
+
getByIdByType: (type: string) => Promise<TVerification[] | TVerification[][]>;
|
|
398
|
+
updateStatusById: (_id: ObjectId | string, status: string, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
|
|
886
399
|
};
|
|
887
|
-
declare function MPaymentMethod(value: TPaymentMethod$1): TPaymentMethod$1;
|
|
888
400
|
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
add: (value: TPaymentMethod$1, session?: ClientSession) => Promise<string>;
|
|
892
|
-
getByUser: (user: string | ObjectId) => Promise<bson.Document[]>;
|
|
893
|
-
getByOrg: (org: string | ObjectId) => Promise<bson.Document[]>;
|
|
894
|
-
deleteById: (_id: string | ObjectId) => Promise<string>;
|
|
895
|
-
createUniqueIndex: () => Promise<void>;
|
|
896
|
-
getByPaymentMethodId: (paymentMethodId: string | ObjectId) => Promise<TPaymentMethod$1 | null>;
|
|
401
|
+
type TKeyValuePair<K extends string | number | symbol = string, V = any> = {
|
|
402
|
+
[key in K]: V;
|
|
897
403
|
};
|
|
898
404
|
|
|
899
|
-
declare function
|
|
900
|
-
|
|
901
|
-
|
|
405
|
+
declare function useVerificationService(): {
|
|
406
|
+
createForgetPassword: (email: string) => Promise<string>;
|
|
407
|
+
createUserInvite: ({ email, metadata, }: {
|
|
408
|
+
email: string;
|
|
409
|
+
metadata: TVerificationMetadata;
|
|
410
|
+
}) => Promise<bson.ObjectId>;
|
|
411
|
+
verify: (id: string) => Promise<TVerification | "Member invitation verified successfully.">;
|
|
412
|
+
getById: (id: string) => Promise<TVerification>;
|
|
413
|
+
getVerifications: ({ search, page, status, type, email, limit, app, }?: {
|
|
414
|
+
search?: string | undefined;
|
|
415
|
+
page?: number | undefined;
|
|
416
|
+
status?: string | undefined;
|
|
902
417
|
type?: string | undefined;
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
418
|
+
email?: string | undefined;
|
|
419
|
+
limit?: number | undefined;
|
|
420
|
+
app?: string | undefined;
|
|
906
421
|
}) => Promise<{
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
expiry_year?: string | undefined;
|
|
918
|
-
cvv?: string | undefined;
|
|
919
|
-
cardholder_name?: string | undefined;
|
|
920
|
-
currency?: string | undefined;
|
|
921
|
-
}) => Promise<any>;
|
|
422
|
+
items: any[];
|
|
423
|
+
pages: number;
|
|
424
|
+
pageRange: string;
|
|
425
|
+
} | TVerification[]>;
|
|
426
|
+
cancelUserInvitation: (id: string) => Promise<void>;
|
|
427
|
+
updateStatusById: (_id: string, status: string) => Promise<string>;
|
|
428
|
+
signUp: ({ email, metadata, }: {
|
|
429
|
+
email: string;
|
|
430
|
+
metadata: TKeyValuePair;
|
|
431
|
+
}) => Promise<bson.ObjectId>;
|
|
922
432
|
};
|
|
923
433
|
|
|
924
|
-
declare function
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
getPaymentMethodById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
931
|
-
getPaymentMethodsByCustomerId: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
932
|
-
updatePaymentMethodStatusById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
434
|
+
declare function useVerificationController(): {
|
|
435
|
+
getVerifications: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
436
|
+
createUserInvite: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
437
|
+
createForgetPassword: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
438
|
+
verify: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
439
|
+
cancelUserInvitation: (req: Request, res: Response, next: NextFunction) => Promise<Response<any, Record<string, any>> | undefined>;
|
|
933
440
|
};
|
|
934
441
|
|
|
935
442
|
type TAddress = {
|
|
@@ -953,7 +460,7 @@ declare function useAddressRepo(): {
|
|
|
953
460
|
add: (value: TAddress, session?: ClientSession) => Promise<ObjectId>;
|
|
954
461
|
getByUserId: (user: string | ObjectId) => Promise<TAddress | null>;
|
|
955
462
|
getByOrgId: (org: string | ObjectId) => Promise<TAddress | null>;
|
|
956
|
-
updateById: (_id: string | ObjectId, value: Pick<TAddress, "org" | "
|
|
463
|
+
updateById: (_id: string | ObjectId, value: Pick<TAddress, "org" | "province" | "country" | "address" | "continuedAddress" | "city" | "postalCode" | "taxId">, session?: ClientSession) => Promise<string>;
|
|
957
464
|
};
|
|
958
465
|
|
|
959
466
|
declare function useAddressController(): {
|
|
@@ -963,106 +470,6 @@ declare function useAddressController(): {
|
|
|
963
470
|
updateById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
964
471
|
};
|
|
965
472
|
|
|
966
|
-
type TSector = {
|
|
967
|
-
_id?: ObjectId;
|
|
968
|
-
name: string;
|
|
969
|
-
code?: string;
|
|
970
|
-
type: string;
|
|
971
|
-
levels?: string[];
|
|
972
|
-
createdAt?: string;
|
|
973
|
-
updatedAt?: string;
|
|
974
|
-
deletedAt?: string;
|
|
975
|
-
};
|
|
976
|
-
declare const schemaSector: Joi.ObjectSchema<any>;
|
|
977
|
-
declare function modelSector(value: TSector): TSector;
|
|
978
|
-
|
|
979
|
-
declare function useSectorRepo(): {
|
|
980
|
-
createIndexes: () => Promise<void>;
|
|
981
|
-
add: (value: TSector, session?: ClientSession) => Promise<ObjectId>;
|
|
982
|
-
getAll: ({ search, page, limit, sort }?: {
|
|
983
|
-
search?: string | undefined;
|
|
984
|
-
page?: number | undefined;
|
|
985
|
-
limit?: number | undefined;
|
|
986
|
-
sort?: {} | undefined;
|
|
987
|
-
}) => Promise<Record<string, any>>;
|
|
988
|
-
getById: (_id: string | ObjectId) => Promise<TSector>;
|
|
989
|
-
updateFieldById: ({ _id, field, value }?: {
|
|
990
|
-
_id: string | ObjectId;
|
|
991
|
-
field: string;
|
|
992
|
-
value: string;
|
|
993
|
-
}, session?: ClientSession) => Promise<string>;
|
|
994
|
-
deleteById: (_id: string | ObjectId) => Promise<string>;
|
|
995
|
-
getByName: (name: string) => Promise<TSector>;
|
|
996
|
-
};
|
|
997
|
-
|
|
998
|
-
declare function useSectorController(): {
|
|
999
|
-
add: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1000
|
-
getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1001
|
-
getById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1002
|
-
getByName: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1003
|
-
updateField: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1004
|
-
deleteById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1005
|
-
};
|
|
1006
|
-
|
|
1007
|
-
type TOrg = {
|
|
1008
|
-
_id?: ObjectId;
|
|
1009
|
-
name: string;
|
|
1010
|
-
description: string;
|
|
1011
|
-
type?: string;
|
|
1012
|
-
sector: string;
|
|
1013
|
-
sectorName?: string;
|
|
1014
|
-
sectorType: string;
|
|
1015
|
-
category: string;
|
|
1016
|
-
email?: string;
|
|
1017
|
-
contact?: string;
|
|
1018
|
-
region?: string;
|
|
1019
|
-
regionName?: string;
|
|
1020
|
-
province?: string;
|
|
1021
|
-
provinceName?: string;
|
|
1022
|
-
cityMunicipality?: string;
|
|
1023
|
-
cityMunicipalityName?: string;
|
|
1024
|
-
barangay?: string;
|
|
1025
|
-
barangayName?: string;
|
|
1026
|
-
status?: string;
|
|
1027
|
-
createdAt?: string;
|
|
1028
|
-
updatedAt?: string;
|
|
1029
|
-
deletedAt?: string;
|
|
1030
|
-
};
|
|
1031
|
-
declare const schemaOrg: Joi.ObjectSchema<any>;
|
|
1032
|
-
declare function MOrg(value: TOrg): TOrg;
|
|
1033
|
-
|
|
1034
|
-
declare function useOrgRepo(): {
|
|
1035
|
-
createIndexes: () => Promise<void>;
|
|
1036
|
-
add: (value: TOrg, session?: ClientSession) => Promise<ObjectId>;
|
|
1037
|
-
getAll: ({ search, page, limit, sort, status, }?: {
|
|
1038
|
-
search?: string | undefined;
|
|
1039
|
-
page?: number | undefined;
|
|
1040
|
-
limit?: number | undefined;
|
|
1041
|
-
sort?: {} | undefined;
|
|
1042
|
-
status?: string | undefined;
|
|
1043
|
-
}) => Promise<Record<string, any>>;
|
|
1044
|
-
getById: (_id: string | ObjectId) => Promise<TOrg>;
|
|
1045
|
-
updateFieldById: ({ _id, field, value }?: {
|
|
1046
|
-
_id: string | ObjectId;
|
|
1047
|
-
field: string;
|
|
1048
|
-
value: string;
|
|
1049
|
-
}, session?: ClientSession) => Promise<string>;
|
|
1050
|
-
deleteById: (_id: string | ObjectId) => Promise<string>;
|
|
1051
|
-
getByName: (name: string) => Promise<TOrg>;
|
|
1052
|
-
};
|
|
1053
|
-
|
|
1054
|
-
declare function useOrgService(): {
|
|
1055
|
-
add: (value: TOrg) => Promise<string>;
|
|
1056
|
-
};
|
|
1057
|
-
|
|
1058
|
-
declare function useOrgController(): {
|
|
1059
|
-
createOrg: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1060
|
-
getOrgsByUserId: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1061
|
-
getByName: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1062
|
-
getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1063
|
-
getById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1064
|
-
};
|
|
1065
|
-
|
|
1066
473
|
type TMember = {
|
|
1067
474
|
_id?: ObjectId;
|
|
1068
475
|
org?: string | ObjectId;
|
|
@@ -1089,18 +496,22 @@ declare function useMemberRepo(): {
|
|
|
1089
496
|
search: string;
|
|
1090
497
|
limit: number;
|
|
1091
498
|
page: number;
|
|
1092
|
-
user?: string | ObjectId
|
|
1093
|
-
org?: string | ObjectId
|
|
499
|
+
user?: string | ObjectId;
|
|
500
|
+
org?: string | ObjectId;
|
|
1094
501
|
type: string;
|
|
1095
502
|
status: string;
|
|
1096
|
-
}) => Promise<Record<string, any
|
|
503
|
+
}) => Promise<Record<string, any> | {
|
|
504
|
+
items: any[];
|
|
505
|
+
pages: number;
|
|
506
|
+
pageRange: string;
|
|
507
|
+
}>;
|
|
1097
508
|
getOrgsByUserId: ({ search, page, limit, sort, user, status, }?: {
|
|
1098
509
|
user: string | ObjectId;
|
|
1099
510
|
page: number;
|
|
1100
|
-
limit?: number
|
|
1101
|
-
search?: string
|
|
1102
|
-
sort?: Record<string, number
|
|
1103
|
-
status?: string
|
|
511
|
+
limit?: number;
|
|
512
|
+
search?: string;
|
|
513
|
+
sort?: Record<string, number>;
|
|
514
|
+
status?: string;
|
|
1104
515
|
}) => Promise<{
|
|
1105
516
|
items: any[];
|
|
1106
517
|
pages: number;
|
|
@@ -1110,13 +521,13 @@ declare function useMemberRepo(): {
|
|
|
1110
521
|
name: string;
|
|
1111
522
|
}[]>;
|
|
1112
523
|
updateStatusByUserId: (user: string | ObjectId, status: string) => Promise<string>;
|
|
1113
|
-
updateName: (value: Pick<TMember, "
|
|
524
|
+
updateName: (value: Pick<TMember, "user" | "name">, session?: ClientSession) => Promise<string>;
|
|
1114
525
|
getByUserId: (user: string | ObjectId) => Promise<TMember | null>;
|
|
1115
526
|
getOrgsByMembership: ({ search, limit, page, user }?: {
|
|
1116
527
|
search: string;
|
|
1117
528
|
limit: number;
|
|
1118
529
|
page: number;
|
|
1119
|
-
user?: string | ObjectId
|
|
530
|
+
user?: string | ObjectId;
|
|
1120
531
|
}) => Promise<{
|
|
1121
532
|
items: any[];
|
|
1122
533
|
pages: number;
|
|
@@ -1138,894 +549,178 @@ declare function useMemberController(): {
|
|
|
1138
549
|
getByUserType: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1139
550
|
};
|
|
1140
551
|
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
552
|
+
type TBuilding = {
|
|
553
|
+
_id?: ObjectId;
|
|
554
|
+
school: ObjectId;
|
|
555
|
+
serial?: string;
|
|
556
|
+
name: string;
|
|
557
|
+
levels: number;
|
|
558
|
+
createdAt?: Date | string;
|
|
559
|
+
updatedAt?: Date | string;
|
|
560
|
+
deletedAt?: Date | string;
|
|
561
|
+
status?: string;
|
|
1148
562
|
};
|
|
1149
|
-
|
|
563
|
+
declare const schemaBuilding: Joi.ObjectSchema<any>;
|
|
564
|
+
type TBuildingUnit = {
|
|
1150
565
|
_id?: ObjectId;
|
|
1151
|
-
|
|
566
|
+
school: ObjectId | string;
|
|
567
|
+
name?: string;
|
|
568
|
+
building: ObjectId | string;
|
|
569
|
+
buildingName?: string;
|
|
570
|
+
level: number;
|
|
571
|
+
category: string;
|
|
572
|
+
type: string;
|
|
573
|
+
seating_capacity: number;
|
|
574
|
+
standing_capacity: number;
|
|
1152
575
|
description?: string;
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
576
|
+
unit_of_measurement: string;
|
|
577
|
+
area: number;
|
|
578
|
+
status: string;
|
|
579
|
+
createdAt?: Date | string;
|
|
580
|
+
updatedAt?: Date | string;
|
|
581
|
+
deletedAt?: Date | string;
|
|
582
|
+
};
|
|
583
|
+
declare const schemaBuildingUnit: Joi.ObjectSchema<any>;
|
|
584
|
+
declare const schemaUpdateOptions: Joi.ObjectSchema<any>;
|
|
585
|
+
declare function MBuilding(value: TBuilding): {
|
|
586
|
+
_id: ObjectId | undefined;
|
|
587
|
+
school: ObjectId;
|
|
588
|
+
serial: string;
|
|
589
|
+
name: string;
|
|
590
|
+
levels: number;
|
|
591
|
+
status: string;
|
|
592
|
+
createdAt: string | Date;
|
|
593
|
+
updatedAt: string | Date;
|
|
594
|
+
deletedAt: string | Date;
|
|
595
|
+
};
|
|
596
|
+
declare function MBuildingUnit(value: TBuildingUnit): {
|
|
597
|
+
_id: ObjectId | undefined;
|
|
598
|
+
school: ObjectId;
|
|
599
|
+
name: string;
|
|
600
|
+
building: ObjectId;
|
|
601
|
+
buildingName: string;
|
|
602
|
+
level: number;
|
|
603
|
+
category: string;
|
|
604
|
+
type: string;
|
|
605
|
+
seating_capacity: number;
|
|
606
|
+
standing_capacity: number;
|
|
607
|
+
description: string;
|
|
608
|
+
unit_of_measurement: string;
|
|
609
|
+
area: number;
|
|
610
|
+
status: string;
|
|
611
|
+
createdAt: string | Date;
|
|
612
|
+
updatedAt: string | Date;
|
|
613
|
+
deletedAt: string | Date;
|
|
1161
614
|
};
|
|
1162
|
-
declare function MPromoCode(data: TPromoCode): TPromoCode;
|
|
1163
615
|
|
|
1164
|
-
declare function
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
getByCode: (code: string, type?: string, assigned?: boolean | null) => Promise<TPromoCode | null>;
|
|
1169
|
-
getPromoCodes: ({ search, page, limit, sort, status, type, }?: {
|
|
616
|
+
declare function useBuildingRepo(): {
|
|
617
|
+
createIndexes: () => Promise<void>;
|
|
618
|
+
add: (value: TBuilding, session?: ClientSession) => Promise<ObjectId>;
|
|
619
|
+
getAll: ({ search, page, limit, sort, school, status, }?: {
|
|
1170
620
|
search?: string | undefined;
|
|
1171
621
|
page?: number | undefined;
|
|
1172
622
|
limit?: number | undefined;
|
|
1173
623
|
sort?: {} | undefined;
|
|
624
|
+
school?: string | undefined;
|
|
1174
625
|
status?: string | undefined;
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
getPromoCodes: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1188
|
-
getById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1189
|
-
};
|
|
1190
|
-
|
|
1191
|
-
type TOrderMetadata = {
|
|
1192
|
-
subscriptionId?: ObjectId | string;
|
|
1193
|
-
cycle?: number;
|
|
1194
|
-
seats?: number;
|
|
1195
|
-
promoCode?: string;
|
|
1196
|
-
};
|
|
1197
|
-
type TOrder = {
|
|
1198
|
-
_id?: ObjectId;
|
|
1199
|
-
payment?: string;
|
|
1200
|
-
user?: ObjectId | string;
|
|
1201
|
-
org?: ObjectId | string;
|
|
1202
|
-
type: string;
|
|
1203
|
-
amount: number;
|
|
1204
|
-
currency: string;
|
|
1205
|
-
description?: string;
|
|
1206
|
-
metadata?: TOrderMetadata;
|
|
1207
|
-
status?: string;
|
|
1208
|
-
createdAt?: string;
|
|
1209
|
-
updatedAt?: string;
|
|
1210
|
-
deletedAt?: string;
|
|
1211
|
-
};
|
|
1212
|
-
declare function MOrder(value: TOrder): TOrder;
|
|
1213
|
-
|
|
1214
|
-
declare function useOrderRepo(): {
|
|
1215
|
-
createIndex: () => void;
|
|
1216
|
-
add: (value: TOrder, session?: ClientSession) => void;
|
|
1217
|
-
getOrders: ({ search, page, limit, sort, status, type, id, }?: {
|
|
1218
|
-
search?: string | undefined;
|
|
1219
|
-
page?: number | undefined;
|
|
1220
|
-
limit?: number | undefined;
|
|
1221
|
-
sort?: {} | undefined;
|
|
1222
|
-
status?: string | undefined;
|
|
1223
|
-
type?: string | undefined;
|
|
1224
|
-
id?: string | undefined;
|
|
1225
|
-
}) => Promise<Record<string, any>>;
|
|
626
|
+
}) => Promise<Record<string, any> | {
|
|
627
|
+
items: any[];
|
|
628
|
+
pages: number;
|
|
629
|
+
pageRange: string;
|
|
630
|
+
}>;
|
|
631
|
+
getById: (_id: string | ObjectId) => Promise<TBuilding | null>;
|
|
632
|
+
updateById: (_id: ObjectId | string, value: {
|
|
633
|
+
name: string;
|
|
634
|
+
serial: string;
|
|
635
|
+
levels: number;
|
|
636
|
+
}, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
|
|
637
|
+
deleteById: (_id: string | ObjectId, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
|
|
1226
638
|
};
|
|
1227
639
|
|
|
1228
|
-
declare function
|
|
1229
|
-
|
|
640
|
+
declare function useBuildingService(): {
|
|
641
|
+
updateById: (id: string, data: {
|
|
642
|
+
name: string;
|
|
643
|
+
levels: number;
|
|
644
|
+
serial: string;
|
|
645
|
+
}) => Promise<mongodb.UpdateResult<bson.Document>>;
|
|
646
|
+
deleteById: (id: string) => Promise<string>;
|
|
1230
647
|
};
|
|
1231
648
|
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
user?: ObjectId | string;
|
|
1239
|
-
org?: ObjectId | string;
|
|
1240
|
-
customerId?: string;
|
|
1241
|
-
paymentMethodId?: string;
|
|
1242
|
-
amount: number;
|
|
1243
|
-
description?: string;
|
|
1244
|
-
currency: string;
|
|
1245
|
-
promoCode?: string;
|
|
1246
|
-
type: string;
|
|
1247
|
-
paidSeats?: number;
|
|
1248
|
-
currentSeats?: number;
|
|
1249
|
-
maxSeats?: number;
|
|
1250
|
-
status?: string;
|
|
1251
|
-
billingCycle: "monthly" | "yearly";
|
|
1252
|
-
billingContacts?: Array<TBillingRecipient>;
|
|
1253
|
-
nextBillingDate?: Date;
|
|
1254
|
-
lastPaymentStatus?: string;
|
|
1255
|
-
failedAttempts?: number;
|
|
1256
|
-
createdAt?: string | Date;
|
|
1257
|
-
updatedAt?: string | Date;
|
|
1258
|
-
deletedAt?: string | Date;
|
|
649
|
+
declare function useBuildingController(): {
|
|
650
|
+
createBuilding: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
651
|
+
getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
652
|
+
getById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
653
|
+
updateById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
654
|
+
deleteById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1259
655
|
};
|
|
1260
|
-
declare function MSubscription(value: TSubscription): TSubscription;
|
|
1261
656
|
|
|
1262
|
-
declare function
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
getById: (_id: string | ObjectId) => Promise<TSubscription | null>;
|
|
1267
|
-
getBySubscriptionId: (subscriptionId: string) => Promise<TSubscription | null>;
|
|
1268
|
-
getByUserId: (user: string | ObjectId) => Promise<TSubscription | null>;
|
|
1269
|
-
getSubscriptions: ({ search, page, limit, sort, status, }?: {
|
|
657
|
+
declare function useBuildingUnitRepo(): {
|
|
658
|
+
createIndexes: () => Promise<void>;
|
|
659
|
+
add: (value: TBuildingUnit, session?: ClientSession) => Promise<ObjectId>;
|
|
660
|
+
getAll: ({ search, page, limit, sort, school, building, status, }?: {
|
|
1270
661
|
search?: string | undefined;
|
|
1271
662
|
page?: number | undefined;
|
|
1272
663
|
limit?: number | undefined;
|
|
1273
664
|
sort?: {} | undefined;
|
|
665
|
+
school?: string | undefined;
|
|
666
|
+
building?: string | undefined;
|
|
1274
667
|
status?: string | undefined;
|
|
1275
|
-
}) => Promise<Record<string, any
|
|
1276
|
-
updateStatus: (_id: string | ObjectId, status: string) => Promise<string>;
|
|
1277
|
-
getByOrgId: (org: string | ObjectId) => Promise<TSubscription | null>;
|
|
1278
|
-
getByAffiliateUserId: (user: string | ObjectId) => Promise<TSubscription | null>;
|
|
1279
|
-
getDueSubscriptions: (BATCH_SIZE?: number) => Promise<TSubscription[]>;
|
|
1280
|
-
getFailedSubscriptions: (BATCH_SIZE?: number) => Promise<TSubscription[]>;
|
|
1281
|
-
processSuccessfulPayment: (value: Pick<TSubscription, "nextBillingDate"> & {
|
|
1282
|
-
_id: string | ObjectId;
|
|
1283
|
-
}, session?: ClientSession) => Promise<string>;
|
|
1284
|
-
markSubscriptionAsFailed: ({ _id, failed }?: {
|
|
1285
|
-
_id: string | ObjectId;
|
|
1286
|
-
failed?: boolean | undefined;
|
|
1287
|
-
}, session?: ClientSession) => Promise<mongodb.UpdateResult<TSubscription>>;
|
|
1288
|
-
markSubscriptionAsCanceled: (_id: string | ObjectId, session?: ClientSession) => Promise<mongodb.UpdateResult<TSubscription>>;
|
|
1289
|
-
updateSeatsById: ({ _id, currentSeats, maxSeats, paidSeats, amount, status, nextBillingDate, }?: {
|
|
1290
|
-
_id: string | ObjectId;
|
|
1291
|
-
currentSeats: number;
|
|
1292
|
-
maxSeats: number;
|
|
1293
|
-
paidSeats?: number | undefined;
|
|
1294
|
-
amount: number;
|
|
1295
|
-
status?: string | undefined;
|
|
1296
|
-
nextBillingDate?: string | undefined;
|
|
1297
|
-
}, session?: ClientSession) => Promise<mongodb.UpdateResult<TSubscription>>;
|
|
1298
|
-
updateMaxSeatsById: ({ _id, seats }?: {
|
|
1299
|
-
_id: string | ObjectId;
|
|
1300
|
-
seats: number;
|
|
1301
|
-
}, session?: ClientSession) => Promise<mongodb.UpdateResult<TSubscription>>;
|
|
1302
|
-
updateStatusById: (_id: string | ObjectId, status: string, session?: ClientSession) => Promise<mongodb.UpdateResult<TSubscription>>;
|
|
1303
|
-
updatePromoCodeById: (_id: string | ObjectId, promoCode: string, session?: ClientSession) => Promise<mongodb.UpdateResult<TSubscription>>;
|
|
1304
|
-
updatePaymentMethodById: (_id: string | ObjectId, paymentMethodId: string, session?: ClientSession) => Promise<mongodb.UpdateResult<TSubscription>>;
|
|
1305
|
-
addBillingContactById: (_id: string | ObjectId, email: string) => Promise<string>;
|
|
1306
|
-
updateBillingContactByAddedAt: (_id: string | ObjectId, addedAt: string | Date, email: string) => Promise<string>;
|
|
1307
|
-
deleteBillingContactByAddedAt: (_id: string | ObjectId, addedAt: string | Date) => Promise<string>;
|
|
1308
|
-
};
|
|
1309
|
-
|
|
1310
|
-
declare const TInvoice: z.ZodObject<{
|
|
1311
|
-
_id: z.ZodEffects<z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodType<ObjectId, z.ZodTypeDef, ObjectId>]>>, ObjectId | undefined, string | ObjectId | undefined>;
|
|
1312
|
-
invoiceNumber: z.ZodString;
|
|
1313
|
-
type: z.ZodDefault<z.ZodEnum<["organization-subscription", "affiliate-subscription", "one-time-payment", "other"]>>;
|
|
1314
|
-
amount: z.ZodNumber;
|
|
1315
|
-
dueDate: z.ZodDate;
|
|
1316
|
-
status: z.ZodDefault<z.ZodEnum<["pending", "paid", "overdue", "cancelled"]>>;
|
|
1317
|
-
items: z.ZodArray<z.ZodObject<{
|
|
1318
|
-
description: z.ZodString;
|
|
1319
|
-
unitPrice: z.ZodNumber;
|
|
1320
|
-
quantity: z.ZodNumber;
|
|
1321
|
-
seats: z.ZodOptional<z.ZodNumber>;
|
|
1322
|
-
total: z.ZodNumber;
|
|
1323
|
-
}, "strip", z.ZodTypeAny, {
|
|
1324
|
-
description: string;
|
|
1325
|
-
unitPrice: number;
|
|
1326
|
-
quantity: number;
|
|
1327
|
-
total: number;
|
|
1328
|
-
seats?: number | undefined;
|
|
1329
|
-
}, {
|
|
1330
|
-
description: string;
|
|
1331
|
-
unitPrice: number;
|
|
1332
|
-
quantity: number;
|
|
1333
|
-
total: number;
|
|
1334
|
-
seats?: number | undefined;
|
|
1335
|
-
}>, "many">;
|
|
1336
|
-
metadata: z.ZodEffects<z.ZodOptional<z.ZodDefault<z.ZodObject<{
|
|
1337
|
-
transactionId: z.ZodOptional<z.ZodString>;
|
|
1338
|
-
userId: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodType<ObjectId, z.ZodTypeDef, ObjectId>]>>;
|
|
1339
|
-
orgId: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodType<ObjectId, z.ZodTypeDef, ObjectId>]>>;
|
|
1340
|
-
billingCycle: z.ZodOptional<z.ZodEnum<["monthly", "yearly", "quarterly"]>>;
|
|
1341
|
-
subscriptionId: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodType<ObjectId, z.ZodTypeDef, ObjectId>]>>;
|
|
1342
|
-
currency: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
|
1343
|
-
description: z.ZodOptional<z.ZodString>;
|
|
1344
|
-
}, "strip", z.ZodTypeAny, {
|
|
1345
|
-
description?: string | undefined;
|
|
1346
|
-
userId?: string | ObjectId | undefined;
|
|
1347
|
-
orgId?: string | ObjectId | undefined;
|
|
1348
|
-
transactionId?: string | undefined;
|
|
1349
|
-
currency?: string | undefined;
|
|
1350
|
-
subscriptionId?: string | ObjectId | undefined;
|
|
1351
|
-
billingCycle?: "monthly" | "yearly" | "quarterly" | undefined;
|
|
1352
|
-
}, {
|
|
1353
|
-
description?: string | undefined;
|
|
1354
|
-
userId?: string | ObjectId | undefined;
|
|
1355
|
-
orgId?: string | ObjectId | undefined;
|
|
1356
|
-
transactionId?: string | undefined;
|
|
1357
|
-
currency?: string | undefined;
|
|
1358
|
-
subscriptionId?: string | ObjectId | undefined;
|
|
1359
|
-
billingCycle?: "monthly" | "yearly" | "quarterly" | undefined;
|
|
1360
|
-
}>>>, {
|
|
1361
|
-
description?: string | undefined;
|
|
1362
|
-
userId?: string | ObjectId | undefined;
|
|
1363
|
-
orgId?: string | ObjectId | undefined;
|
|
1364
|
-
transactionId?: string | undefined;
|
|
1365
|
-
currency?: string | undefined;
|
|
1366
|
-
subscriptionId?: string | ObjectId | undefined;
|
|
1367
|
-
billingCycle?: "monthly" | "yearly" | "quarterly" | undefined;
|
|
1368
|
-
} | undefined, {
|
|
1369
|
-
description?: string | undefined;
|
|
1370
|
-
userId?: string | ObjectId | undefined;
|
|
1371
|
-
orgId?: string | ObjectId | undefined;
|
|
1372
|
-
transactionId?: string | undefined;
|
|
1373
|
-
currency?: string | undefined;
|
|
1374
|
-
subscriptionId?: string | ObjectId | undefined;
|
|
1375
|
-
billingCycle?: "monthly" | "yearly" | "quarterly" | undefined;
|
|
1376
|
-
} | undefined>;
|
|
1377
|
-
createdAt: z.ZodOptional<z.ZodDefault<z.ZodDate>>;
|
|
1378
|
-
updatedAt: z.ZodOptional<z.ZodDate>;
|
|
1379
|
-
}, "strip", z.ZodTypeAny, {
|
|
1380
|
-
type: "organization-subscription" | "affiliate-subscription" | "one-time-payment" | "other";
|
|
1381
|
-
status: "pending" | "cancelled" | "paid" | "overdue";
|
|
1382
|
-
items: {
|
|
1383
|
-
description: string;
|
|
1384
|
-
unitPrice: number;
|
|
1385
|
-
quantity: number;
|
|
1386
|
-
total: number;
|
|
1387
|
-
seats?: number | undefined;
|
|
1388
|
-
}[];
|
|
1389
|
-
amount: number;
|
|
1390
|
-
invoiceNumber: string;
|
|
1391
|
-
dueDate: Date;
|
|
1392
|
-
_id?: ObjectId | undefined;
|
|
1393
|
-
updatedAt?: Date | undefined;
|
|
1394
|
-
createdAt?: Date | undefined;
|
|
1395
|
-
metadata?: {
|
|
1396
|
-
description?: string | undefined;
|
|
1397
|
-
userId?: string | ObjectId | undefined;
|
|
1398
|
-
orgId?: string | ObjectId | undefined;
|
|
1399
|
-
transactionId?: string | undefined;
|
|
1400
|
-
currency?: string | undefined;
|
|
1401
|
-
subscriptionId?: string | ObjectId | undefined;
|
|
1402
|
-
billingCycle?: "monthly" | "yearly" | "quarterly" | undefined;
|
|
1403
|
-
} | undefined;
|
|
1404
|
-
}, {
|
|
1405
|
-
items: {
|
|
1406
|
-
description: string;
|
|
1407
|
-
unitPrice: number;
|
|
1408
|
-
quantity: number;
|
|
1409
|
-
total: number;
|
|
1410
|
-
seats?: number | undefined;
|
|
1411
|
-
}[];
|
|
1412
|
-
amount: number;
|
|
1413
|
-
invoiceNumber: string;
|
|
1414
|
-
dueDate: Date;
|
|
1415
|
-
type?: "organization-subscription" | "affiliate-subscription" | "one-time-payment" | "other" | undefined;
|
|
1416
|
-
status?: "pending" | "cancelled" | "paid" | "overdue" | undefined;
|
|
1417
|
-
_id?: string | ObjectId | undefined;
|
|
1418
|
-
updatedAt?: Date | undefined;
|
|
1419
|
-
createdAt?: Date | undefined;
|
|
1420
|
-
metadata?: {
|
|
1421
|
-
description?: string | undefined;
|
|
1422
|
-
userId?: string | ObjectId | undefined;
|
|
1423
|
-
orgId?: string | ObjectId | undefined;
|
|
1424
|
-
transactionId?: string | undefined;
|
|
1425
|
-
currency?: string | undefined;
|
|
1426
|
-
subscriptionId?: string | ObjectId | undefined;
|
|
1427
|
-
billingCycle?: "monthly" | "yearly" | "quarterly" | undefined;
|
|
1428
|
-
} | undefined;
|
|
1429
|
-
}>;
|
|
1430
|
-
type TInvoice = z.infer<typeof TInvoice>;
|
|
1431
|
-
declare function useInvoiceModel(db: Db): {
|
|
1432
|
-
createInvoice: (data: TInvoice) => TInvoice;
|
|
1433
|
-
collection: Collection<{
|
|
1434
|
-
type: "organization-subscription" | "affiliate-subscription" | "one-time-payment" | "other";
|
|
1435
|
-
status: "pending" | "cancelled" | "paid" | "overdue";
|
|
1436
|
-
items: {
|
|
1437
|
-
description: string;
|
|
1438
|
-
unitPrice: number;
|
|
1439
|
-
quantity: number;
|
|
1440
|
-
total: number;
|
|
1441
|
-
seats?: number | undefined;
|
|
1442
|
-
}[];
|
|
1443
|
-
amount: number;
|
|
1444
|
-
invoiceNumber: string;
|
|
1445
|
-
dueDate: Date;
|
|
1446
|
-
_id?: ObjectId | undefined;
|
|
1447
|
-
updatedAt?: Date | undefined;
|
|
1448
|
-
createdAt?: Date | undefined;
|
|
1449
|
-
metadata?: {
|
|
1450
|
-
description?: string | undefined;
|
|
1451
|
-
userId?: string | ObjectId | undefined;
|
|
1452
|
-
orgId?: string | ObjectId | undefined;
|
|
1453
|
-
transactionId?: string | undefined;
|
|
1454
|
-
currency?: string | undefined;
|
|
1455
|
-
subscriptionId?: string | ObjectId | undefined;
|
|
1456
|
-
billingCycle?: "monthly" | "yearly" | "quarterly" | undefined;
|
|
1457
|
-
} | undefined;
|
|
1458
|
-
}>;
|
|
1459
|
-
};
|
|
1460
|
-
|
|
1461
|
-
declare function useInvoiceRepo(): {
|
|
1462
|
-
createIndex: () => Promise<void>;
|
|
1463
|
-
createUniqueIndex: () => Promise<void>;
|
|
1464
|
-
add: (value: TInvoice, session?: ClientSession) => Promise<void>;
|
|
1465
|
-
getByDueDate: (id: string | ObjectId, dueDate: Date, status?: TInvoice["status"]) => Promise<{
|
|
1466
|
-
type: "organization-subscription" | "affiliate-subscription" | "one-time-payment" | "other";
|
|
1467
|
-
status: "pending" | "cancelled" | "paid" | "overdue";
|
|
1468
|
-
items: {
|
|
1469
|
-
description: string;
|
|
1470
|
-
unitPrice: number;
|
|
1471
|
-
quantity: number;
|
|
1472
|
-
total: number;
|
|
1473
|
-
seats?: number | undefined;
|
|
1474
|
-
}[];
|
|
1475
|
-
amount: number;
|
|
1476
|
-
invoiceNumber: string;
|
|
1477
|
-
dueDate: Date;
|
|
1478
|
-
_id?: ObjectId | undefined;
|
|
1479
|
-
updatedAt?: Date | undefined;
|
|
1480
|
-
createdAt?: Date | undefined;
|
|
1481
|
-
metadata?: {
|
|
1482
|
-
description?: string | undefined;
|
|
1483
|
-
userId?: string | ObjectId | undefined;
|
|
1484
|
-
orgId?: string | ObjectId | undefined;
|
|
1485
|
-
transactionId?: string | undefined;
|
|
1486
|
-
currency?: string | undefined;
|
|
1487
|
-
subscriptionId?: string | ObjectId | undefined;
|
|
1488
|
-
billingCycle?: "monthly" | "yearly" | "quarterly" | undefined;
|
|
1489
|
-
} | undefined;
|
|
1490
|
-
} | null>;
|
|
1491
|
-
updateStatusByInvoiceNumber: (invoiceNumber: string, status: TInvoice["status"], session?: ClientSession) => Promise<void>;
|
|
1492
|
-
getOverdueInvoices: (BATCH_SIZE?: number) => Promise<{
|
|
1493
|
-
type: "organization-subscription" | "affiliate-subscription" | "one-time-payment" | "other";
|
|
1494
|
-
status: "pending" | "cancelled" | "paid" | "overdue";
|
|
1495
|
-
items: {
|
|
1496
|
-
description: string;
|
|
1497
|
-
unitPrice: number;
|
|
1498
|
-
quantity: number;
|
|
1499
|
-
total: number;
|
|
1500
|
-
seats?: number | undefined;
|
|
1501
|
-
}[];
|
|
1502
|
-
amount: number;
|
|
1503
|
-
invoiceNumber: string;
|
|
1504
|
-
dueDate: Date;
|
|
1505
|
-
_id?: ObjectId | undefined;
|
|
1506
|
-
updatedAt?: Date | undefined;
|
|
1507
|
-
createdAt?: Date | undefined;
|
|
1508
|
-
metadata?: {
|
|
1509
|
-
description?: string | undefined;
|
|
1510
|
-
userId?: string | ObjectId | undefined;
|
|
1511
|
-
orgId?: string | ObjectId | undefined;
|
|
1512
|
-
transactionId?: string | undefined;
|
|
1513
|
-
currency?: string | undefined;
|
|
1514
|
-
subscriptionId?: string | ObjectId | undefined;
|
|
1515
|
-
billingCycle?: "monthly" | "yearly" | "quarterly" | undefined;
|
|
1516
|
-
} | undefined;
|
|
1517
|
-
}[]>;
|
|
1518
|
-
getBySubscriptionId: ({ page, search, limit, sort, id }?: {
|
|
1519
|
-
page?: number | undefined;
|
|
1520
|
-
search?: string | undefined;
|
|
1521
|
-
limit?: number | undefined;
|
|
1522
|
-
sort?: Record<string, any> | undefined;
|
|
1523
|
-
id?: string | ObjectId | undefined;
|
|
1524
|
-
}) => Promise<{
|
|
668
|
+
}) => Promise<Record<string, any> | {
|
|
1525
669
|
items: any[];
|
|
1526
670
|
pages: number;
|
|
1527
671
|
pageRange: string;
|
|
1528
672
|
}>;
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
createdAt?: Date | undefined;
|
|
1545
|
-
metadata?: {
|
|
1546
|
-
description?: string | undefined;
|
|
1547
|
-
userId?: string | ObjectId | undefined;
|
|
1548
|
-
orgId?: string | ObjectId | undefined;
|
|
1549
|
-
transactionId?: string | undefined;
|
|
1550
|
-
currency?: string | undefined;
|
|
1551
|
-
subscriptionId?: string | ObjectId | undefined;
|
|
1552
|
-
billingCycle?: "monthly" | "yearly" | "quarterly" | undefined;
|
|
1553
|
-
} | undefined;
|
|
1554
|
-
} | null>;
|
|
1555
|
-
getByTransactionId: (id: string) => Promise<{
|
|
1556
|
-
type: "organization-subscription" | "affiliate-subscription" | "one-time-payment" | "other";
|
|
1557
|
-
status: "pending" | "cancelled" | "paid" | "overdue";
|
|
1558
|
-
items: {
|
|
1559
|
-
description: string;
|
|
1560
|
-
unitPrice: number;
|
|
1561
|
-
quantity: number;
|
|
1562
|
-
total: number;
|
|
1563
|
-
seats?: number | undefined;
|
|
1564
|
-
}[];
|
|
1565
|
-
amount: number;
|
|
1566
|
-
invoiceNumber: string;
|
|
1567
|
-
dueDate: Date;
|
|
1568
|
-
_id?: ObjectId | undefined;
|
|
1569
|
-
updatedAt?: Date | undefined;
|
|
1570
|
-
createdAt?: Date | undefined;
|
|
1571
|
-
metadata?: {
|
|
1572
|
-
description?: string | undefined;
|
|
1573
|
-
userId?: string | ObjectId | undefined;
|
|
1574
|
-
orgId?: string | ObjectId | undefined;
|
|
1575
|
-
transactionId?: string | undefined;
|
|
1576
|
-
currency?: string | undefined;
|
|
1577
|
-
subscriptionId?: string | ObjectId | undefined;
|
|
1578
|
-
billingCycle?: "monthly" | "yearly" | "quarterly" | undefined;
|
|
1579
|
-
} | undefined;
|
|
1580
|
-
} | null>;
|
|
673
|
+
getById: (_id: string | ObjectId) => Promise<TBuildingUnit>;
|
|
674
|
+
getByBuildingLevel: (building: string | ObjectId, level: number) => Promise<TBuildingUnit | null>;
|
|
675
|
+
updateById: (_id: string | ObjectId, value: {
|
|
676
|
+
name?: string;
|
|
677
|
+
building?: string;
|
|
678
|
+
level?: number;
|
|
679
|
+
category?: string;
|
|
680
|
+
type?: string;
|
|
681
|
+
seating_capacity?: number;
|
|
682
|
+
standing_capacity?: number;
|
|
683
|
+
area?: number;
|
|
684
|
+
}, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
|
|
685
|
+
getByBuilding: (building: string | ObjectId) => Promise<TBuildingUnit | null>;
|
|
686
|
+
deleteById: (_id: string | ObjectId, session?: ClientSession) => Promise<string>;
|
|
687
|
+
updateByBuildingId: (building: string | ObjectId, value: Partial<Pick<TBuildingUnit, "buildingName">>, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
|
|
1581
688
|
};
|
|
1582
689
|
|
|
1583
|
-
declare
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
amount: z.ZodNumber;
|
|
1589
|
-
paymentMethod: z.ZodEnum<["CARD", "DIRECT_DEBIT", "VIRTUAL_ACCOUNT", "EWALLET", "OVER_THE_COUNTER", "QR_CODE", "PAYPAL"]>;
|
|
1590
|
-
status: z.ZodEnum<["pending", "completed", "failed", "refunded"]>;
|
|
1591
|
-
metadata: z.ZodEffects<z.ZodObject<{
|
|
1592
|
-
userId: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodType<ObjectId, z.ZodTypeDef, ObjectId>]>>;
|
|
1593
|
-
orgId: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodType<ObjectId, z.ZodTypeDef, ObjectId>]>>;
|
|
1594
|
-
transactionId: z.ZodOptional<z.ZodString>;
|
|
1595
|
-
currency: z.ZodDefault<z.ZodString>;
|
|
1596
|
-
paymentMethod: z.ZodOptional<z.ZodString>;
|
|
1597
|
-
paymentMethodType: z.ZodOptional<z.ZodString>;
|
|
1598
|
-
paymentMethodId: z.ZodOptional<z.ZodString>;
|
|
1599
|
-
payment: z.ZodOptional<z.ZodString>;
|
|
1600
|
-
subscriptionId: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodType<ObjectId, z.ZodTypeDef, ObjectId>]>>;
|
|
1601
|
-
}, "strip", z.ZodTypeAny, {
|
|
1602
|
-
currency: string;
|
|
1603
|
-
userId?: string | ObjectId | undefined;
|
|
1604
|
-
orgId?: string | ObjectId | undefined;
|
|
1605
|
-
transactionId?: string | undefined;
|
|
1606
|
-
paymentMethod?: string | undefined;
|
|
1607
|
-
paymentMethodType?: string | undefined;
|
|
1608
|
-
paymentMethodId?: string | undefined;
|
|
1609
|
-
payment?: string | undefined;
|
|
1610
|
-
subscriptionId?: string | ObjectId | undefined;
|
|
1611
|
-
}, {
|
|
1612
|
-
userId?: string | ObjectId | undefined;
|
|
1613
|
-
orgId?: string | ObjectId | undefined;
|
|
1614
|
-
transactionId?: string | undefined;
|
|
1615
|
-
currency?: string | undefined;
|
|
1616
|
-
paymentMethod?: string | undefined;
|
|
1617
|
-
paymentMethodType?: string | undefined;
|
|
1618
|
-
paymentMethodId?: string | undefined;
|
|
1619
|
-
payment?: string | undefined;
|
|
1620
|
-
subscriptionId?: string | ObjectId | undefined;
|
|
1621
|
-
}>, {
|
|
1622
|
-
currency: string;
|
|
1623
|
-
userId?: string | ObjectId | undefined;
|
|
1624
|
-
orgId?: string | ObjectId | undefined;
|
|
1625
|
-
transactionId?: string | undefined;
|
|
1626
|
-
paymentMethod?: string | undefined;
|
|
1627
|
-
paymentMethodType?: string | undefined;
|
|
1628
|
-
paymentMethodId?: string | undefined;
|
|
1629
|
-
payment?: string | undefined;
|
|
1630
|
-
subscriptionId?: string | ObjectId | undefined;
|
|
1631
|
-
}, {
|
|
1632
|
-
userId?: string | ObjectId | undefined;
|
|
1633
|
-
orgId?: string | ObjectId | undefined;
|
|
1634
|
-
transactionId?: string | undefined;
|
|
1635
|
-
currency?: string | undefined;
|
|
1636
|
-
paymentMethod?: string | undefined;
|
|
1637
|
-
paymentMethodType?: string | undefined;
|
|
1638
|
-
paymentMethodId?: string | undefined;
|
|
1639
|
-
payment?: string | undefined;
|
|
1640
|
-
subscriptionId?: string | ObjectId | undefined;
|
|
1641
|
-
}>;
|
|
1642
|
-
createdAt: z.ZodOptional<z.ZodDefault<z.ZodDate>>;
|
|
1643
|
-
updatedAt: z.ZodOptional<z.ZodDate>;
|
|
1644
|
-
}, "strip", z.ZodTypeAny, {
|
|
1645
|
-
status: "pending" | "completed" | "failed" | "refunded";
|
|
1646
|
-
metadata: {
|
|
1647
|
-
currency: string;
|
|
1648
|
-
userId?: string | ObjectId | undefined;
|
|
1649
|
-
orgId?: string | ObjectId | undefined;
|
|
1650
|
-
transactionId?: string | undefined;
|
|
1651
|
-
paymentMethod?: string | undefined;
|
|
1652
|
-
paymentMethodType?: string | undefined;
|
|
1653
|
-
paymentMethodId?: string | undefined;
|
|
1654
|
-
payment?: string | undefined;
|
|
1655
|
-
subscriptionId?: string | ObjectId | undefined;
|
|
1656
|
-
};
|
|
1657
|
-
paymentMethod: "EWALLET" | "QR_CODE" | "CARD" | "DIRECT_DEBIT" | "VIRTUAL_ACCOUNT" | "OVER_THE_COUNTER" | "PAYPAL";
|
|
1658
|
-
invoiceId: string;
|
|
1659
|
-
amount: number;
|
|
1660
|
-
_id?: string | ObjectId | undefined;
|
|
1661
|
-
updatedAt?: Date | undefined;
|
|
1662
|
-
createdAt?: Date | undefined;
|
|
1663
|
-
}, {
|
|
1664
|
-
status: "pending" | "completed" | "failed" | "refunded";
|
|
1665
|
-
metadata: {
|
|
1666
|
-
userId?: string | ObjectId | undefined;
|
|
1667
|
-
orgId?: string | ObjectId | undefined;
|
|
1668
|
-
transactionId?: string | undefined;
|
|
1669
|
-
currency?: string | undefined;
|
|
1670
|
-
paymentMethod?: string | undefined;
|
|
1671
|
-
paymentMethodType?: string | undefined;
|
|
1672
|
-
paymentMethodId?: string | undefined;
|
|
1673
|
-
payment?: string | undefined;
|
|
1674
|
-
subscriptionId?: string | ObjectId | undefined;
|
|
1675
|
-
};
|
|
1676
|
-
paymentMethod: "EWALLET" | "QR_CODE" | "CARD" | "DIRECT_DEBIT" | "VIRTUAL_ACCOUNT" | "OVER_THE_COUNTER" | "PAYPAL";
|
|
1677
|
-
amount: number;
|
|
1678
|
-
_id?: string | ObjectId | undefined;
|
|
1679
|
-
updatedAt?: Date | undefined;
|
|
1680
|
-
createdAt?: Date | undefined;
|
|
1681
|
-
invoiceId?: string | undefined;
|
|
1682
|
-
}>;
|
|
1683
|
-
type TPayment = z.infer<typeof TPayment>;
|
|
1684
|
-
declare const DirectDebitSchema: z.ZodObject<{
|
|
1685
|
-
type: z.ZodLiteral<"DIRECT_DEBIT">;
|
|
1686
|
-
direct_debit: z.ZodObject<{
|
|
1687
|
-
channel_code: z.ZodString;
|
|
1688
|
-
channel_properties: z.ZodObject<{
|
|
1689
|
-
success_return_url: z.ZodString;
|
|
1690
|
-
failure_return_url: z.ZodString;
|
|
1691
|
-
}, "strip", z.ZodTypeAny, {
|
|
1692
|
-
success_return_url: string;
|
|
1693
|
-
failure_return_url: string;
|
|
1694
|
-
}, {
|
|
1695
|
-
success_return_url: string;
|
|
1696
|
-
failure_return_url: string;
|
|
1697
|
-
}>;
|
|
1698
|
-
}, "strip", z.ZodTypeAny, {
|
|
1699
|
-
channel_code: string;
|
|
1700
|
-
channel_properties: {
|
|
1701
|
-
success_return_url: string;
|
|
1702
|
-
failure_return_url: string;
|
|
1703
|
-
};
|
|
1704
|
-
}, {
|
|
1705
|
-
channel_code: string;
|
|
1706
|
-
channel_properties: {
|
|
1707
|
-
success_return_url: string;
|
|
1708
|
-
failure_return_url: string;
|
|
1709
|
-
};
|
|
1710
|
-
}>;
|
|
1711
|
-
reusability: z.ZodEnum<["MULTIPLE_USE", "SINGLE_USE"]>;
|
|
1712
|
-
description: z.ZodOptional<z.ZodString>;
|
|
1713
|
-
metadata: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
1714
|
-
customer_id: z.ZodString;
|
|
1715
|
-
}, "strip", z.ZodTypeAny, {
|
|
1716
|
-
type: "DIRECT_DEBIT";
|
|
1717
|
-
metadata: Record<string, string>;
|
|
1718
|
-
direct_debit: {
|
|
1719
|
-
channel_code: string;
|
|
1720
|
-
channel_properties: {
|
|
1721
|
-
success_return_url: string;
|
|
1722
|
-
failure_return_url: string;
|
|
1723
|
-
};
|
|
1724
|
-
};
|
|
1725
|
-
reusability: "MULTIPLE_USE" | "SINGLE_USE";
|
|
1726
|
-
customer_id: string;
|
|
1727
|
-
description?: string | undefined;
|
|
1728
|
-
}, {
|
|
1729
|
-
type: "DIRECT_DEBIT";
|
|
1730
|
-
direct_debit: {
|
|
1731
|
-
channel_code: string;
|
|
1732
|
-
channel_properties: {
|
|
1733
|
-
success_return_url: string;
|
|
1734
|
-
failure_return_url: string;
|
|
1735
|
-
};
|
|
1736
|
-
};
|
|
1737
|
-
reusability: "MULTIPLE_USE" | "SINGLE_USE";
|
|
1738
|
-
customer_id: string;
|
|
1739
|
-
metadata?: Record<string, string> | undefined;
|
|
1740
|
-
description?: string | undefined;
|
|
1741
|
-
}>;
|
|
1742
|
-
type DirectDebit = z.infer<typeof DirectDebitSchema>;
|
|
1743
|
-
declare function validateDirectDebit(data: Record<string, any>): DirectDebit;
|
|
1744
|
-
declare const CardPaymentSchema: z.ZodObject<{
|
|
1745
|
-
type: z.ZodLiteral<"CARD">;
|
|
1746
|
-
card: z.ZodObject<{
|
|
1747
|
-
currency: z.ZodLiteral<"PHP">;
|
|
1748
|
-
channel_properties: z.ZodObject<{
|
|
1749
|
-
skip_three_d_secure: z.ZodBoolean;
|
|
1750
|
-
success_return_url: z.ZodString;
|
|
1751
|
-
failure_return_url: z.ZodString;
|
|
1752
|
-
}, "strip", z.ZodTypeAny, {
|
|
1753
|
-
success_return_url: string;
|
|
1754
|
-
failure_return_url: string;
|
|
1755
|
-
skip_three_d_secure: boolean;
|
|
1756
|
-
}, {
|
|
1757
|
-
success_return_url: string;
|
|
1758
|
-
failure_return_url: string;
|
|
1759
|
-
skip_three_d_secure: boolean;
|
|
1760
|
-
}>;
|
|
1761
|
-
card_information: z.ZodObject<{
|
|
1762
|
-
card_number: z.ZodString;
|
|
1763
|
-
expiry_month: z.ZodString;
|
|
1764
|
-
expiry_year: z.ZodString;
|
|
1765
|
-
cvv: z.ZodString;
|
|
1766
|
-
cardholder_name: z.ZodString;
|
|
1767
|
-
}, "strip", z.ZodTypeAny, {
|
|
1768
|
-
card_number: string;
|
|
1769
|
-
expiry_month: string;
|
|
1770
|
-
expiry_year: string;
|
|
1771
|
-
cvv: string;
|
|
1772
|
-
cardholder_name: string;
|
|
1773
|
-
}, {
|
|
1774
|
-
card_number: string;
|
|
1775
|
-
expiry_month: string;
|
|
1776
|
-
expiry_year: string;
|
|
1777
|
-
cvv: string;
|
|
1778
|
-
cardholder_name: string;
|
|
1779
|
-
}>;
|
|
1780
|
-
}, "strip", z.ZodTypeAny, {
|
|
1781
|
-
currency: "PHP";
|
|
1782
|
-
channel_properties: {
|
|
1783
|
-
success_return_url: string;
|
|
1784
|
-
failure_return_url: string;
|
|
1785
|
-
skip_three_d_secure: boolean;
|
|
1786
|
-
};
|
|
1787
|
-
card_information: {
|
|
1788
|
-
card_number: string;
|
|
1789
|
-
expiry_month: string;
|
|
1790
|
-
expiry_year: string;
|
|
1791
|
-
cvv: string;
|
|
1792
|
-
cardholder_name: string;
|
|
1793
|
-
};
|
|
1794
|
-
}, {
|
|
1795
|
-
currency: "PHP";
|
|
1796
|
-
channel_properties: {
|
|
1797
|
-
success_return_url: string;
|
|
1798
|
-
failure_return_url: string;
|
|
1799
|
-
skip_three_d_secure: boolean;
|
|
1800
|
-
};
|
|
1801
|
-
card_information: {
|
|
1802
|
-
card_number: string;
|
|
1803
|
-
expiry_month: string;
|
|
1804
|
-
expiry_year: string;
|
|
1805
|
-
cvv: string;
|
|
1806
|
-
cardholder_name: string;
|
|
1807
|
-
};
|
|
1808
|
-
}>;
|
|
1809
|
-
reusability: z.ZodEnum<["MULTIPLE_USE", "SINGLE_USE"]>;
|
|
1810
|
-
description: z.ZodOptional<z.ZodString>;
|
|
1811
|
-
metadata: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
1812
|
-
}, "strip", z.ZodTypeAny, {
|
|
1813
|
-
type: "CARD";
|
|
1814
|
-
metadata: Record<string, string>;
|
|
1815
|
-
reusability: "MULTIPLE_USE" | "SINGLE_USE";
|
|
1816
|
-
card: {
|
|
1817
|
-
currency: "PHP";
|
|
1818
|
-
channel_properties: {
|
|
1819
|
-
success_return_url: string;
|
|
1820
|
-
failure_return_url: string;
|
|
1821
|
-
skip_three_d_secure: boolean;
|
|
1822
|
-
};
|
|
1823
|
-
card_information: {
|
|
1824
|
-
card_number: string;
|
|
1825
|
-
expiry_month: string;
|
|
1826
|
-
expiry_year: string;
|
|
1827
|
-
cvv: string;
|
|
1828
|
-
cardholder_name: string;
|
|
1829
|
-
};
|
|
1830
|
-
};
|
|
1831
|
-
description?: string | undefined;
|
|
1832
|
-
}, {
|
|
1833
|
-
type: "CARD";
|
|
1834
|
-
reusability: "MULTIPLE_USE" | "SINGLE_USE";
|
|
1835
|
-
card: {
|
|
1836
|
-
currency: "PHP";
|
|
1837
|
-
channel_properties: {
|
|
1838
|
-
success_return_url: string;
|
|
1839
|
-
failure_return_url: string;
|
|
1840
|
-
skip_three_d_secure: boolean;
|
|
1841
|
-
};
|
|
1842
|
-
card_information: {
|
|
1843
|
-
card_number: string;
|
|
1844
|
-
expiry_month: string;
|
|
1845
|
-
expiry_year: string;
|
|
1846
|
-
cvv: string;
|
|
1847
|
-
cardholder_name: string;
|
|
1848
|
-
};
|
|
1849
|
-
};
|
|
1850
|
-
metadata?: Record<string, string> | undefined;
|
|
1851
|
-
description?: string | undefined;
|
|
1852
|
-
}>;
|
|
1853
|
-
type CardPayment = z.infer<typeof CardPaymentSchema>;
|
|
1854
|
-
declare function validateCardPayment(data: Record<string, any>): CardPayment;
|
|
1855
|
-
declare const EWalletPaymentSchema: z.ZodObject<{
|
|
1856
|
-
type: z.ZodLiteral<"EWALLET">;
|
|
1857
|
-
reusability: z.ZodEnum<["MULTIPLE_USE", "SINGLE_USE"]>;
|
|
1858
|
-
customer_id: z.ZodString;
|
|
1859
|
-
country: z.ZodString;
|
|
1860
|
-
ewallet: z.ZodObject<{
|
|
1861
|
-
channel_code: z.ZodString;
|
|
1862
|
-
channel_properties: z.ZodObject<{
|
|
1863
|
-
success_return_url: z.ZodString;
|
|
1864
|
-
failure_return_url: z.ZodString;
|
|
1865
|
-
cancel_return_url: z.ZodString;
|
|
1866
|
-
}, "strip", z.ZodTypeAny, {
|
|
1867
|
-
success_return_url: string;
|
|
1868
|
-
failure_return_url: string;
|
|
1869
|
-
cancel_return_url: string;
|
|
1870
|
-
}, {
|
|
1871
|
-
success_return_url: string;
|
|
1872
|
-
failure_return_url: string;
|
|
1873
|
-
cancel_return_url: string;
|
|
1874
|
-
}>;
|
|
1875
|
-
}, "strip", z.ZodTypeAny, {
|
|
1876
|
-
channel_code: string;
|
|
1877
|
-
channel_properties: {
|
|
1878
|
-
success_return_url: string;
|
|
1879
|
-
failure_return_url: string;
|
|
1880
|
-
cancel_return_url: string;
|
|
1881
|
-
};
|
|
1882
|
-
}, {
|
|
1883
|
-
channel_code: string;
|
|
1884
|
-
channel_properties: {
|
|
1885
|
-
success_return_url: string;
|
|
1886
|
-
failure_return_url: string;
|
|
1887
|
-
cancel_return_url: string;
|
|
1888
|
-
};
|
|
1889
|
-
}>;
|
|
1890
|
-
description: z.ZodOptional<z.ZodString>;
|
|
1891
|
-
metadata: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
1892
|
-
}, "strip", z.ZodTypeAny, {
|
|
1893
|
-
type: "EWALLET";
|
|
1894
|
-
metadata: Record<string, string>;
|
|
1895
|
-
country: string;
|
|
1896
|
-
reusability: "MULTIPLE_USE" | "SINGLE_USE";
|
|
1897
|
-
customer_id: string;
|
|
1898
|
-
ewallet: {
|
|
1899
|
-
channel_code: string;
|
|
1900
|
-
channel_properties: {
|
|
1901
|
-
success_return_url: string;
|
|
1902
|
-
failure_return_url: string;
|
|
1903
|
-
cancel_return_url: string;
|
|
1904
|
-
};
|
|
1905
|
-
};
|
|
1906
|
-
description?: string | undefined;
|
|
1907
|
-
}, {
|
|
1908
|
-
type: "EWALLET";
|
|
1909
|
-
country: string;
|
|
1910
|
-
reusability: "MULTIPLE_USE" | "SINGLE_USE";
|
|
1911
|
-
customer_id: string;
|
|
1912
|
-
ewallet: {
|
|
1913
|
-
channel_code: string;
|
|
1914
|
-
channel_properties: {
|
|
1915
|
-
success_return_url: string;
|
|
1916
|
-
failure_return_url: string;
|
|
1917
|
-
cancel_return_url: string;
|
|
1918
|
-
};
|
|
1919
|
-
};
|
|
1920
|
-
metadata?: Record<string, string> | undefined;
|
|
1921
|
-
description?: string | undefined;
|
|
1922
|
-
}>;
|
|
1923
|
-
type EWalletPayment = z.infer<typeof EWalletPaymentSchema>;
|
|
1924
|
-
declare function validateEWalletPayment(data: Record<string, any>): EWalletPayment;
|
|
1925
|
-
declare function usePaymentModel(db: Db): {
|
|
1926
|
-
collection: Collection<{
|
|
1927
|
-
status: "pending" | "completed" | "failed" | "refunded";
|
|
1928
|
-
metadata: {
|
|
1929
|
-
currency: string;
|
|
1930
|
-
userId?: string | ObjectId | undefined;
|
|
1931
|
-
orgId?: string | ObjectId | undefined;
|
|
1932
|
-
transactionId?: string | undefined;
|
|
1933
|
-
paymentMethod?: string | undefined;
|
|
1934
|
-
paymentMethodType?: string | undefined;
|
|
1935
|
-
paymentMethodId?: string | undefined;
|
|
1936
|
-
payment?: string | undefined;
|
|
1937
|
-
subscriptionId?: string | ObjectId | undefined;
|
|
1938
|
-
};
|
|
1939
|
-
paymentMethod: "EWALLET" | "QR_CODE" | "CARD" | "DIRECT_DEBIT" | "VIRTUAL_ACCOUNT" | "OVER_THE_COUNTER" | "PAYPAL";
|
|
1940
|
-
invoiceId: string;
|
|
1941
|
-
amount: number;
|
|
1942
|
-
_id?: string | ObjectId | undefined;
|
|
1943
|
-
updatedAt?: Date | undefined;
|
|
1944
|
-
createdAt?: Date | undefined;
|
|
1945
|
-
}>;
|
|
1946
|
-
createPayment: (data: Partial<TPayment>) => {
|
|
1947
|
-
status: "pending" | "completed" | "failed" | "refunded";
|
|
1948
|
-
metadata: {
|
|
1949
|
-
currency: string;
|
|
1950
|
-
userId?: string | ObjectId | undefined;
|
|
1951
|
-
orgId?: string | ObjectId | undefined;
|
|
1952
|
-
transactionId?: string | undefined;
|
|
1953
|
-
paymentMethod?: string | undefined;
|
|
1954
|
-
paymentMethodType?: string | undefined;
|
|
1955
|
-
paymentMethodId?: string | undefined;
|
|
1956
|
-
payment?: string | undefined;
|
|
1957
|
-
subscriptionId?: string | ObjectId | undefined;
|
|
1958
|
-
};
|
|
1959
|
-
paymentMethod: "EWALLET" | "QR_CODE" | "CARD" | "DIRECT_DEBIT" | "VIRTUAL_ACCOUNT" | "OVER_THE_COUNTER" | "PAYPAL";
|
|
1960
|
-
invoiceId: string;
|
|
1961
|
-
amount: number;
|
|
1962
|
-
_id?: string | ObjectId | undefined;
|
|
1963
|
-
updatedAt?: Date | undefined;
|
|
1964
|
-
createdAt?: Date | undefined;
|
|
1965
|
-
};
|
|
1966
|
-
validatePayment: (data: unknown) => {
|
|
1967
|
-
status: "pending" | "completed" | "failed" | "refunded";
|
|
1968
|
-
metadata: {
|
|
1969
|
-
currency: string;
|
|
1970
|
-
userId?: string | ObjectId | undefined;
|
|
1971
|
-
orgId?: string | ObjectId | undefined;
|
|
1972
|
-
transactionId?: string | undefined;
|
|
1973
|
-
paymentMethod?: string | undefined;
|
|
1974
|
-
paymentMethodType?: string | undefined;
|
|
1975
|
-
paymentMethodId?: string | undefined;
|
|
1976
|
-
payment?: string | undefined;
|
|
1977
|
-
subscriptionId?: string | ObjectId | undefined;
|
|
1978
|
-
};
|
|
1979
|
-
paymentMethod: "EWALLET" | "QR_CODE" | "CARD" | "DIRECT_DEBIT" | "VIRTUAL_ACCOUNT" | "OVER_THE_COUNTER" | "PAYPAL";
|
|
1980
|
-
invoiceId: string;
|
|
1981
|
-
amount: number;
|
|
1982
|
-
_id?: string | ObjectId | undefined;
|
|
1983
|
-
updatedAt?: Date | undefined;
|
|
1984
|
-
createdAt?: Date | undefined;
|
|
1985
|
-
};
|
|
690
|
+
declare function useBuildingUnitService(): {
|
|
691
|
+
add: (value: {
|
|
692
|
+
building: TBuildingUnit;
|
|
693
|
+
qty: number;
|
|
694
|
+
}) => Promise<string>;
|
|
1986
695
|
};
|
|
1987
696
|
|
|
1988
|
-
declare function
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
page?: number | undefined;
|
|
1995
|
-
limit?: number | undefined;
|
|
1996
|
-
sort?: {} | undefined;
|
|
1997
|
-
status?: string | undefined;
|
|
1998
|
-
type?: string | undefined;
|
|
1999
|
-
id?: string | undefined;
|
|
2000
|
-
}) => Promise<{
|
|
2001
|
-
items: any[];
|
|
2002
|
-
pages: number;
|
|
2003
|
-
pageRange: string;
|
|
2004
|
-
}>;
|
|
2005
|
-
getByInvoiceId: (invoiceId: string) => Promise<mongodb.WithId<{
|
|
2006
|
-
status: "pending" | "completed" | "failed" | "refunded";
|
|
2007
|
-
metadata: {
|
|
2008
|
-
currency: string;
|
|
2009
|
-
userId?: string | ObjectId | undefined;
|
|
2010
|
-
orgId?: string | ObjectId | undefined;
|
|
2011
|
-
transactionId?: string | undefined;
|
|
2012
|
-
paymentMethod?: string | undefined;
|
|
2013
|
-
paymentMethodType?: string | undefined;
|
|
2014
|
-
paymentMethodId?: string | undefined;
|
|
2015
|
-
payment?: string | undefined;
|
|
2016
|
-
subscriptionId?: string | ObjectId | undefined;
|
|
2017
|
-
};
|
|
2018
|
-
paymentMethod: "EWALLET" | "QR_CODE" | "CARD" | "DIRECT_DEBIT" | "VIRTUAL_ACCOUNT" | "OVER_THE_COUNTER" | "PAYPAL";
|
|
2019
|
-
invoiceId: string;
|
|
2020
|
-
amount: number;
|
|
2021
|
-
_id?: string | ObjectId | undefined;
|
|
2022
|
-
updatedAt?: Date | undefined;
|
|
2023
|
-
createdAt?: Date | undefined;
|
|
2024
|
-
}> | null>;
|
|
697
|
+
declare function useBuildingUnitController(): {
|
|
698
|
+
add: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
699
|
+
getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
700
|
+
getById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
701
|
+
updateById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
702
|
+
deleteById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2025
703
|
};
|
|
2026
704
|
|
|
2027
|
-
|
|
2028
|
-
|
|
705
|
+
type TToken = {
|
|
706
|
+
token: string;
|
|
707
|
+
user: ObjectId;
|
|
708
|
+
createdAt?: string;
|
|
709
|
+
};
|
|
710
|
+
declare class MToken implements TToken {
|
|
711
|
+
token: string;
|
|
712
|
+
user: ObjectId;
|
|
713
|
+
createdAt?: string;
|
|
714
|
+
constructor(value: TToken);
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
declare function useTokenRepo(): {
|
|
718
|
+
createToken: ({ token, user }?: {
|
|
719
|
+
token: string;
|
|
720
|
+
user: string | ObjectId;
|
|
721
|
+
}) => Promise<string>;
|
|
722
|
+
getToken: (token: string) => Promise<any>;
|
|
723
|
+
deleteToken: (token: string) => Promise<mongodb.DeleteResult>;
|
|
2029
724
|
};
|
|
2030
725
|
|
|
2031
726
|
declare const TCounter: z.ZodObject<{
|
|
@@ -2039,14 +734,14 @@ declare const TCounter: z.ZodObject<{
|
|
|
2039
734
|
type: string;
|
|
2040
735
|
createdAt: Date;
|
|
2041
736
|
count: number;
|
|
737
|
+
deletedAt?: Date | undefined;
|
|
2042
738
|
_id?: ObjectId | undefined;
|
|
2043
739
|
updatedAt?: Date | undefined;
|
|
2044
|
-
deletedAt?: Date | undefined;
|
|
2045
740
|
}, {
|
|
2046
741
|
type: string;
|
|
742
|
+
deletedAt?: Date | undefined;
|
|
2047
743
|
_id?: string | ObjectId | undefined;
|
|
2048
744
|
updatedAt?: Date | undefined;
|
|
2049
|
-
deletedAt?: Date | undefined;
|
|
2050
745
|
createdAt?: Date | undefined;
|
|
2051
746
|
count?: number | undefined;
|
|
2052
747
|
}>;
|
|
@@ -2056,32 +751,32 @@ declare function useCounterModel(db: Db): {
|
|
|
2056
751
|
type: string;
|
|
2057
752
|
createdAt: Date;
|
|
2058
753
|
count: number;
|
|
754
|
+
deletedAt?: Date | undefined;
|
|
2059
755
|
_id?: ObjectId | undefined;
|
|
2060
756
|
updatedAt?: Date | undefined;
|
|
2061
|
-
deletedAt?: Date | undefined;
|
|
2062
757
|
};
|
|
2063
758
|
validateCounter: (data: unknown) => z.SafeParseReturnType<{
|
|
2064
759
|
type: string;
|
|
760
|
+
deletedAt?: Date | undefined;
|
|
2065
761
|
_id?: string | ObjectId | undefined;
|
|
2066
762
|
updatedAt?: Date | undefined;
|
|
2067
|
-
deletedAt?: Date | undefined;
|
|
2068
763
|
createdAt?: Date | undefined;
|
|
2069
764
|
count?: number | undefined;
|
|
2070
765
|
}, {
|
|
2071
766
|
type: string;
|
|
2072
767
|
createdAt: Date;
|
|
2073
768
|
count: number;
|
|
769
|
+
deletedAt?: Date | undefined;
|
|
2074
770
|
_id?: ObjectId | undefined;
|
|
2075
771
|
updatedAt?: Date | undefined;
|
|
2076
|
-
deletedAt?: Date | undefined;
|
|
2077
772
|
}>;
|
|
2078
773
|
collection: Collection<{
|
|
2079
774
|
type: string;
|
|
2080
775
|
createdAt: Date;
|
|
2081
776
|
count: number;
|
|
777
|
+
deletedAt?: Date | undefined;
|
|
2082
778
|
_id?: ObjectId | undefined;
|
|
2083
779
|
updatedAt?: Date | undefined;
|
|
2084
|
-
deletedAt?: Date | undefined;
|
|
2085
780
|
}>;
|
|
2086
781
|
};
|
|
2087
782
|
|
|
@@ -2093,744 +788,6 @@ declare function useCounterRepo(): {
|
|
|
2093
788
|
incrementByType: (type: string, session?: ClientSession) => Promise<void>;
|
|
2094
789
|
};
|
|
2095
790
|
|
|
2096
|
-
declare const TPriceType: z.ZodEnum<["monthly-subscription", "yearly-subscription", "one-time-payment", "other"]>;
|
|
2097
|
-
type TPriceType = z.infer<typeof TPriceType>;
|
|
2098
|
-
declare const TPrice: z.ZodObject<{
|
|
2099
|
-
_id: z.ZodEffects<z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodType<ObjectId, z.ZodTypeDef, ObjectId>]>>, ObjectId | undefined, string | ObjectId | undefined>;
|
|
2100
|
-
value: z.ZodDefault<z.ZodNumber>;
|
|
2101
|
-
saleValue: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
2102
|
-
saleExpiry: z.ZodOptional<z.ZodDate>;
|
|
2103
|
-
name: z.ZodString;
|
|
2104
|
-
type: z.ZodDefault<z.ZodOptional<z.ZodEnum<["monthly-subscription", "yearly-subscription", "one-time-payment", "other"]>>>;
|
|
2105
|
-
createdAt: z.ZodOptional<z.ZodDefault<z.ZodDate>>;
|
|
2106
|
-
updatedAt: z.ZodOptional<z.ZodDate>;
|
|
2107
|
-
deletedAt: z.ZodOptional<z.ZodDate>;
|
|
2108
|
-
}, "strip", z.ZodTypeAny, {
|
|
2109
|
-
type: "one-time-payment" | "other" | "monthly-subscription" | "yearly-subscription";
|
|
2110
|
-
value: number;
|
|
2111
|
-
name: string;
|
|
2112
|
-
_id?: ObjectId | undefined;
|
|
2113
|
-
updatedAt?: Date | undefined;
|
|
2114
|
-
deletedAt?: Date | undefined;
|
|
2115
|
-
createdAt?: Date | undefined;
|
|
2116
|
-
saleValue?: number | undefined;
|
|
2117
|
-
saleExpiry?: Date | undefined;
|
|
2118
|
-
}, {
|
|
2119
|
-
name: string;
|
|
2120
|
-
type?: "one-time-payment" | "other" | "monthly-subscription" | "yearly-subscription" | undefined;
|
|
2121
|
-
_id?: string | ObjectId | undefined;
|
|
2122
|
-
updatedAt?: Date | undefined;
|
|
2123
|
-
deletedAt?: Date | undefined;
|
|
2124
|
-
value?: number | undefined;
|
|
2125
|
-
createdAt?: Date | undefined;
|
|
2126
|
-
saleValue?: number | undefined;
|
|
2127
|
-
saleExpiry?: Date | undefined;
|
|
2128
|
-
}>;
|
|
2129
|
-
type TPrice = z.infer<typeof TPrice>;
|
|
2130
|
-
declare function usePriceModel(db: Db): {
|
|
2131
|
-
createPrice: (value: Pick<TPrice, "type" | "name" | "value">) => {
|
|
2132
|
-
type: "one-time-payment" | "other" | "monthly-subscription" | "yearly-subscription";
|
|
2133
|
-
value: number;
|
|
2134
|
-
name: string;
|
|
2135
|
-
_id?: ObjectId | undefined;
|
|
2136
|
-
updatedAt?: Date | undefined;
|
|
2137
|
-
deletedAt?: Date | undefined;
|
|
2138
|
-
createdAt?: Date | undefined;
|
|
2139
|
-
saleValue?: number | undefined;
|
|
2140
|
-
saleExpiry?: Date | undefined;
|
|
2141
|
-
};
|
|
2142
|
-
validatePrice: (data: unknown) => z.SafeParseReturnType<{
|
|
2143
|
-
name: string;
|
|
2144
|
-
type?: "one-time-payment" | "other" | "monthly-subscription" | "yearly-subscription" | undefined;
|
|
2145
|
-
_id?: string | ObjectId | undefined;
|
|
2146
|
-
updatedAt?: Date | undefined;
|
|
2147
|
-
deletedAt?: Date | undefined;
|
|
2148
|
-
value?: number | undefined;
|
|
2149
|
-
createdAt?: Date | undefined;
|
|
2150
|
-
saleValue?: number | undefined;
|
|
2151
|
-
saleExpiry?: Date | undefined;
|
|
2152
|
-
}, {
|
|
2153
|
-
type: "one-time-payment" | "other" | "monthly-subscription" | "yearly-subscription";
|
|
2154
|
-
value: number;
|
|
2155
|
-
name: string;
|
|
2156
|
-
_id?: ObjectId | undefined;
|
|
2157
|
-
updatedAt?: Date | undefined;
|
|
2158
|
-
deletedAt?: Date | undefined;
|
|
2159
|
-
createdAt?: Date | undefined;
|
|
2160
|
-
saleValue?: number | undefined;
|
|
2161
|
-
saleExpiry?: Date | undefined;
|
|
2162
|
-
}>;
|
|
2163
|
-
collection: Collection<{
|
|
2164
|
-
type: "one-time-payment" | "other" | "monthly-subscription" | "yearly-subscription";
|
|
2165
|
-
value: number;
|
|
2166
|
-
name: string;
|
|
2167
|
-
_id?: ObjectId | undefined;
|
|
2168
|
-
updatedAt?: Date | undefined;
|
|
2169
|
-
deletedAt?: Date | undefined;
|
|
2170
|
-
createdAt?: Date | undefined;
|
|
2171
|
-
saleValue?: number | undefined;
|
|
2172
|
-
saleExpiry?: Date | undefined;
|
|
2173
|
-
}>;
|
|
2174
|
-
};
|
|
2175
|
-
|
|
2176
|
-
declare function usePriceRepo(): {
|
|
2177
|
-
createIndex: () => Promise<void>;
|
|
2178
|
-
createUniqueIndex: () => Promise<void>;
|
|
2179
|
-
add: (value: Pick<TPrice, "type" | "name" | "value">) => Promise<void>;
|
|
2180
|
-
getByNameType: (name: string, type: TPriceType) => Promise<any>;
|
|
2181
|
-
setSaleValueByType: (value: Pick<TPrice, "type" | "saleValue" | "saleExpiry">, session?: ClientSession) => Promise<void>;
|
|
2182
|
-
};
|
|
2183
|
-
|
|
2184
|
-
declare function usePriceController(): {
|
|
2185
|
-
getByNameType: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2186
|
-
};
|
|
2187
|
-
|
|
2188
|
-
declare function usePaypalService(): {
|
|
2189
|
-
createInvoice: (data: {
|
|
2190
|
-
invoiceNumber?: string | undefined;
|
|
2191
|
-
invoiceDate?: string | undefined;
|
|
2192
|
-
invoiceDueDate?: string | undefined;
|
|
2193
|
-
customerEmail: string;
|
|
2194
|
-
customerName?: string | undefined;
|
|
2195
|
-
quantity: number;
|
|
2196
|
-
ratePerSeat: number;
|
|
2197
|
-
currency: string;
|
|
2198
|
-
items?: Record<string, any>[] | undefined;
|
|
2199
|
-
note?: string | undefined;
|
|
2200
|
-
}) => Promise<string>;
|
|
2201
|
-
getInvoiceById: (invoiceId: string) => Promise<any>;
|
|
2202
|
-
};
|
|
2203
|
-
|
|
2204
|
-
type TPSGC = {
|
|
2205
|
-
_id?: ObjectId;
|
|
2206
|
-
name?: string;
|
|
2207
|
-
code: string;
|
|
2208
|
-
type: string;
|
|
2209
|
-
createdAt?: string;
|
|
2210
|
-
updatedAt?: string;
|
|
2211
|
-
deletedAt?: string;
|
|
2212
|
-
};
|
|
2213
|
-
declare const schemaPSGC: Joi.ObjectSchema<any>;
|
|
2214
|
-
declare function modelPSGC(value: TPSGC): TPSGC;
|
|
2215
|
-
|
|
2216
|
-
declare function usePSGCRepo(): {
|
|
2217
|
-
createIndexes: () => Promise<void>;
|
|
2218
|
-
add: (value: TPSGC, session?: ClientSession) => Promise<ObjectId>;
|
|
2219
|
-
getAll: ({ search, page, limit, sort, type, }?: {
|
|
2220
|
-
search?: string | undefined;
|
|
2221
|
-
page?: number | undefined;
|
|
2222
|
-
limit?: number | undefined;
|
|
2223
|
-
sort?: {} | undefined;
|
|
2224
|
-
type?: string | undefined;
|
|
2225
|
-
}) => Promise<Record<string, any>>;
|
|
2226
|
-
getById: (_id: string | ObjectId) => Promise<TPSGC>;
|
|
2227
|
-
updateFieldById: ({ _id, field, value }?: {
|
|
2228
|
-
_id: string | ObjectId;
|
|
2229
|
-
field: string;
|
|
2230
|
-
value: string;
|
|
2231
|
-
}, session?: ClientSession) => Promise<string>;
|
|
2232
|
-
deleteById: (_id: string | ObjectId) => Promise<string>;
|
|
2233
|
-
getByName: (name: string) => Promise<TPSGC>;
|
|
2234
|
-
};
|
|
2235
|
-
|
|
2236
|
-
declare function usePSGCController(): {
|
|
2237
|
-
add: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2238
|
-
getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2239
|
-
getById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2240
|
-
getByName: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2241
|
-
updateField: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2242
|
-
deleteById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2243
|
-
};
|
|
2244
|
-
|
|
2245
|
-
type TPGO = {
|
|
2246
|
-
_id?: ObjectId;
|
|
2247
|
-
name?: string;
|
|
2248
|
-
acronym: string;
|
|
2249
|
-
type: string;
|
|
2250
|
-
mandate: string;
|
|
2251
|
-
levels: string[];
|
|
2252
|
-
createdAt?: string;
|
|
2253
|
-
updatedAt?: string;
|
|
2254
|
-
deletedAt?: string;
|
|
2255
|
-
};
|
|
2256
|
-
declare const PGOTypes: string[];
|
|
2257
|
-
declare const schemaPGO: Joi.ObjectSchema<any>;
|
|
2258
|
-
declare function modelPGO(value: TPGO): TPGO;
|
|
2259
|
-
|
|
2260
|
-
declare function usePGORepo(): {
|
|
2261
|
-
createIndexes: () => Promise<void>;
|
|
2262
|
-
add: (value: TPGO, session?: ClientSession) => Promise<ObjectId>;
|
|
2263
|
-
getAll: ({ search, page, limit, sort }?: {
|
|
2264
|
-
search?: string | undefined;
|
|
2265
|
-
page?: number | undefined;
|
|
2266
|
-
limit?: number | undefined;
|
|
2267
|
-
sort?: {} | undefined;
|
|
2268
|
-
}) => Promise<Record<string, any>>;
|
|
2269
|
-
getById: (_id: string | ObjectId) => Promise<TPGO>;
|
|
2270
|
-
updateFieldById: ({ _id, field, value }?: {
|
|
2271
|
-
_id: string | ObjectId;
|
|
2272
|
-
field: string;
|
|
2273
|
-
value: string;
|
|
2274
|
-
}, session?: ClientSession) => Promise<string>;
|
|
2275
|
-
deleteById: (_id: string | ObjectId) => Promise<string>;
|
|
2276
|
-
getByName: (name: string) => Promise<TPGO>;
|
|
2277
|
-
};
|
|
2278
|
-
|
|
2279
|
-
declare function usePGOController(): {
|
|
2280
|
-
add: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2281
|
-
getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2282
|
-
getById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2283
|
-
getByName: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2284
|
-
updateField: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2285
|
-
deleteById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2286
|
-
};
|
|
2287
|
-
|
|
2288
|
-
type TRegion = {
|
|
2289
|
-
_id?: ObjectId;
|
|
2290
|
-
name?: string;
|
|
2291
|
-
code: string;
|
|
2292
|
-
createdAt?: string;
|
|
2293
|
-
updatedAt?: string;
|
|
2294
|
-
deletedAt?: string;
|
|
2295
|
-
};
|
|
2296
|
-
declare const schemaRegion: Joi.ObjectSchema<any>;
|
|
2297
|
-
declare function MRegion(value: TRegion): TRegion;
|
|
2298
|
-
|
|
2299
|
-
declare function useRegionRepo(): {
|
|
2300
|
-
createIndexes: () => Promise<void>;
|
|
2301
|
-
add: (value: TRegion, session?: ClientSession) => Promise<ObjectId>;
|
|
2302
|
-
getAll: ({ search, page, limit, sort }?: {
|
|
2303
|
-
search?: string | undefined;
|
|
2304
|
-
page?: number | undefined;
|
|
2305
|
-
limit?: number | undefined;
|
|
2306
|
-
sort?: {} | undefined;
|
|
2307
|
-
}) => Promise<Record<string, any>>;
|
|
2308
|
-
getById: (_id: string | ObjectId) => Promise<TRegion>;
|
|
2309
|
-
updateFieldById: ({ _id, field, value }?: {
|
|
2310
|
-
_id: string | ObjectId;
|
|
2311
|
-
field: string;
|
|
2312
|
-
value: string;
|
|
2313
|
-
}, session?: ClientSession) => Promise<string>;
|
|
2314
|
-
deleteById: (_id: string | ObjectId) => Promise<string>;
|
|
2315
|
-
getByName: (name: string) => Promise<TRegion>;
|
|
2316
|
-
};
|
|
2317
|
-
|
|
2318
|
-
declare function useRegionController(): {
|
|
2319
|
-
add: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2320
|
-
getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2321
|
-
getById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2322
|
-
getByName: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2323
|
-
updateField: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2324
|
-
deleteById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2325
|
-
};
|
|
2326
|
-
|
|
2327
|
-
type TProvince = {
|
|
2328
|
-
_id?: ObjectId;
|
|
2329
|
-
name?: string;
|
|
2330
|
-
code: string;
|
|
2331
|
-
region: string;
|
|
2332
|
-
regionName?: string;
|
|
2333
|
-
createdAt?: string;
|
|
2334
|
-
updatedAt?: string;
|
|
2335
|
-
deletedAt?: string;
|
|
2336
|
-
};
|
|
2337
|
-
declare const schemaProvince: Joi.ObjectSchema<any>;
|
|
2338
|
-
declare function MProvince(value: TProvince): TProvince;
|
|
2339
|
-
|
|
2340
|
-
declare function useProvinceRepo(): {
|
|
2341
|
-
createIndexes: () => Promise<void>;
|
|
2342
|
-
add: (value: TProvince, session?: ClientSession) => Promise<ObjectId>;
|
|
2343
|
-
getAll: ({ search, page, limit, sort, region, }?: {
|
|
2344
|
-
search?: string | undefined;
|
|
2345
|
-
page?: number | undefined;
|
|
2346
|
-
limit?: number | undefined;
|
|
2347
|
-
sort?: {} | undefined;
|
|
2348
|
-
region?: string | undefined;
|
|
2349
|
-
}) => Promise<Record<string, any>>;
|
|
2350
|
-
getById: (_id: string | ObjectId) => Promise<TProvince>;
|
|
2351
|
-
updateFieldById: ({ _id, field, value }?: {
|
|
2352
|
-
_id: string | ObjectId;
|
|
2353
|
-
field: string;
|
|
2354
|
-
value: string;
|
|
2355
|
-
}, session?: ClientSession) => Promise<string>;
|
|
2356
|
-
deleteById: (_id: string | ObjectId) => Promise<string>;
|
|
2357
|
-
getByName: (name: string) => Promise<TProvince>;
|
|
2358
|
-
};
|
|
2359
|
-
|
|
2360
|
-
declare function useProvinceController(): {
|
|
2361
|
-
add: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2362
|
-
getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2363
|
-
getById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2364
|
-
getByName: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2365
|
-
updateField: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2366
|
-
deleteById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2367
|
-
};
|
|
2368
|
-
|
|
2369
|
-
type TCityMunicipality = {
|
|
2370
|
-
_id?: ObjectId;
|
|
2371
|
-
name?: string;
|
|
2372
|
-
code: string;
|
|
2373
|
-
region: string;
|
|
2374
|
-
regionName?: string;
|
|
2375
|
-
province: string;
|
|
2376
|
-
provinceName?: string;
|
|
2377
|
-
createdAt?: string;
|
|
2378
|
-
updatedAt?: string;
|
|
2379
|
-
deletedAt?: string;
|
|
2380
|
-
};
|
|
2381
|
-
declare const schemaCityMunicipality: Joi.ObjectSchema<any>;
|
|
2382
|
-
declare function MCityMunicipality(value: TCityMunicipality): TCityMunicipality;
|
|
2383
|
-
|
|
2384
|
-
declare function useCityMunicipalityRepo(): {
|
|
2385
|
-
createIndexes: () => Promise<void>;
|
|
2386
|
-
add: (value: TCityMunicipality, session?: ClientSession) => Promise<ObjectId>;
|
|
2387
|
-
getAll: ({ search, page, limit, sort, region, province, }?: {
|
|
2388
|
-
search?: string | undefined;
|
|
2389
|
-
page?: number | undefined;
|
|
2390
|
-
limit?: number | undefined;
|
|
2391
|
-
sort?: {} | undefined;
|
|
2392
|
-
region?: string | undefined;
|
|
2393
|
-
province?: string | undefined;
|
|
2394
|
-
}) => Promise<Record<string, any>>;
|
|
2395
|
-
getById: (_id: string | ObjectId) => Promise<TCityMunicipality>;
|
|
2396
|
-
updateFieldById: ({ _id, field, value }?: {
|
|
2397
|
-
_id: string | ObjectId;
|
|
2398
|
-
field: string;
|
|
2399
|
-
value: string;
|
|
2400
|
-
}, session?: ClientSession) => Promise<string>;
|
|
2401
|
-
deleteById: (_id: string | ObjectId) => Promise<string>;
|
|
2402
|
-
getByName: (name: string) => Promise<TCityMunicipality>;
|
|
2403
|
-
};
|
|
2404
|
-
|
|
2405
|
-
declare function useCityMunicipalityController(): {
|
|
2406
|
-
add: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2407
|
-
getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2408
|
-
getById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2409
|
-
getByName: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2410
|
-
updateField: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2411
|
-
deleteById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2412
|
-
};
|
|
2413
|
-
|
|
2414
|
-
type TBarangay = {
|
|
2415
|
-
_id?: ObjectId;
|
|
2416
|
-
name?: string;
|
|
2417
|
-
code: string;
|
|
2418
|
-
region: string;
|
|
2419
|
-
regionName?: string;
|
|
2420
|
-
province: string;
|
|
2421
|
-
provinceName?: string;
|
|
2422
|
-
cityMunicipality: string;
|
|
2423
|
-
cityMunicipalityName?: string;
|
|
2424
|
-
createdAt?: string;
|
|
2425
|
-
updatedAt?: string;
|
|
2426
|
-
deletedAt?: string;
|
|
2427
|
-
};
|
|
2428
|
-
declare const schemaBarangay: Joi.ObjectSchema<any>;
|
|
2429
|
-
declare function MBarangay(value: TBarangay): TBarangay;
|
|
2430
|
-
|
|
2431
|
-
declare function useBarangayRepo(): {
|
|
2432
|
-
createIndexes: () => Promise<void>;
|
|
2433
|
-
add: (value: TBarangay, session?: ClientSession) => Promise<ObjectId>;
|
|
2434
|
-
getAll: ({ search, page, limit, sort, region, province, cityMunicipality, }?: {
|
|
2435
|
-
search?: string | undefined;
|
|
2436
|
-
page?: number | undefined;
|
|
2437
|
-
limit?: number | undefined;
|
|
2438
|
-
sort?: {} | undefined;
|
|
2439
|
-
region?: string | undefined;
|
|
2440
|
-
province?: string | undefined;
|
|
2441
|
-
cityMunicipality?: string | undefined;
|
|
2442
|
-
}) => Promise<Record<string, any>>;
|
|
2443
|
-
getById: (_id: string | ObjectId) => Promise<TBarangay>;
|
|
2444
|
-
updateFieldById: ({ _id, field, value }?: {
|
|
2445
|
-
_id: string | ObjectId;
|
|
2446
|
-
field: string;
|
|
2447
|
-
value: string;
|
|
2448
|
-
}, session?: ClientSession) => Promise<string>;
|
|
2449
|
-
deleteById: (_id: string | ObjectId) => Promise<string>;
|
|
2450
|
-
getByName: (name: string) => Promise<TBarangay>;
|
|
2451
|
-
};
|
|
2452
|
-
|
|
2453
|
-
declare function useBarangayController(): {
|
|
2454
|
-
add: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2455
|
-
getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2456
|
-
getById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2457
|
-
getByName: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2458
|
-
updateField: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2459
|
-
deleteById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2460
|
-
};
|
|
2461
|
-
|
|
2462
|
-
type TDivision = {
|
|
2463
|
-
_id?: ObjectId;
|
|
2464
|
-
name?: string;
|
|
2465
|
-
region?: string | ObjectId;
|
|
2466
|
-
regionName?: string;
|
|
2467
|
-
superintendent?: string | ObjectId;
|
|
2468
|
-
superintendentName?: string;
|
|
2469
|
-
createdAt?: string;
|
|
2470
|
-
updatedAt?: string;
|
|
2471
|
-
deletedAt?: string;
|
|
2472
|
-
};
|
|
2473
|
-
declare const schemaDivision: Joi.ObjectSchema<any>;
|
|
2474
|
-
declare function MDivision(value: TDivision): TDivision;
|
|
2475
|
-
|
|
2476
|
-
declare function useDivisionRepo(): {
|
|
2477
|
-
createIndex: () => Promise<void>;
|
|
2478
|
-
createTextIndex: () => Promise<void>;
|
|
2479
|
-
createUniqueIndex: () => Promise<void>;
|
|
2480
|
-
add: (value: TDivision, session?: ClientSession) => Promise<ObjectId>;
|
|
2481
|
-
getAll: ({ search, page, limit, sort, region, }?: {
|
|
2482
|
-
search?: string | undefined;
|
|
2483
|
-
page?: number | undefined;
|
|
2484
|
-
limit?: number | undefined;
|
|
2485
|
-
sort?: {} | undefined;
|
|
2486
|
-
region?: string | undefined;
|
|
2487
|
-
}) => Promise<Record<string, any>>;
|
|
2488
|
-
getById: (_id: string | ObjectId) => Promise<TDivision>;
|
|
2489
|
-
updateFieldById: ({ _id, field, value }?: {
|
|
2490
|
-
_id: string | ObjectId;
|
|
2491
|
-
field: string;
|
|
2492
|
-
value: string;
|
|
2493
|
-
}, session?: ClientSession) => Promise<string>;
|
|
2494
|
-
deleteById: (_id: string | ObjectId) => Promise<string>;
|
|
2495
|
-
getByName: (name: string) => Promise<TDivision>;
|
|
2496
|
-
};
|
|
2497
|
-
|
|
2498
|
-
declare function useDivisionService(): {
|
|
2499
|
-
add: (value: TDivision) => Promise<string>;
|
|
2500
|
-
};
|
|
2501
|
-
|
|
2502
|
-
declare function useDivisionController(): {
|
|
2503
|
-
createDivision: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2504
|
-
getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2505
|
-
getById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2506
|
-
getByName: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2507
|
-
updateField: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2508
|
-
deleteDivision: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2509
|
-
};
|
|
2510
|
-
|
|
2511
|
-
type TSchool = {
|
|
2512
|
-
_id?: ObjectId;
|
|
2513
|
-
id: string;
|
|
2514
|
-
name: string;
|
|
2515
|
-
country?: string;
|
|
2516
|
-
address?: string;
|
|
2517
|
-
continuedAddress?: string;
|
|
2518
|
-
city?: string;
|
|
2519
|
-
province?: string;
|
|
2520
|
-
district?: string;
|
|
2521
|
-
postalCode?: string;
|
|
2522
|
-
courses?: Array<string>;
|
|
2523
|
-
principalName?: string;
|
|
2524
|
-
principalEmail?: string;
|
|
2525
|
-
principalNumber?: string;
|
|
2526
|
-
region: string | ObjectId;
|
|
2527
|
-
regionName?: string;
|
|
2528
|
-
division: string | ObjectId;
|
|
2529
|
-
divisionName?: string;
|
|
2530
|
-
status?: string;
|
|
2531
|
-
createdAt?: string;
|
|
2532
|
-
updatedAt?: string;
|
|
2533
|
-
createdBy?: string | ObjectId;
|
|
2534
|
-
};
|
|
2535
|
-
declare const schemaSchool: Joi.ObjectSchema<any>;
|
|
2536
|
-
declare function MSchool(value: TSchool): TSchool;
|
|
2537
|
-
|
|
2538
|
-
declare function useSchoolRepo(): {
|
|
2539
|
-
createIndex: () => Promise<void>;
|
|
2540
|
-
add: (value: TSchool, session?: ClientSession) => Promise<ObjectId>;
|
|
2541
|
-
getAll: ({ page, limit, sort, status, org, app, search, }?: {
|
|
2542
|
-
page?: number | undefined;
|
|
2543
|
-
limit?: number | undefined;
|
|
2544
|
-
sort?: Record<string, number> | undefined;
|
|
2545
|
-
status?: string | undefined;
|
|
2546
|
-
org?: string | undefined;
|
|
2547
|
-
app?: string | undefined;
|
|
2548
|
-
search?: string | undefined;
|
|
2549
|
-
}) => Promise<{}>;
|
|
2550
|
-
updateStatusById: (_id: string | ObjectId, status: string, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
|
|
2551
|
-
updateFieldById: ({ _id, field, value }?: {
|
|
2552
|
-
_id: string | ObjectId;
|
|
2553
|
-
field: string;
|
|
2554
|
-
value: string | ObjectId;
|
|
2555
|
-
}, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
|
|
2556
|
-
getPendingByCreatedBy: (createdBy: string | ObjectId) => Promise<{} | null>;
|
|
2557
|
-
getPendingById: (_id: string | ObjectId) => Promise<TSchool>;
|
|
2558
|
-
};
|
|
2559
|
-
|
|
2560
|
-
declare function useSchoolService(): {
|
|
2561
|
-
register: (value: TSchool) => Promise<string>;
|
|
2562
|
-
approve: (id: string) => Promise<string>;
|
|
2563
|
-
add: (value: TSchool) => Promise<string>;
|
|
2564
|
-
addBulk: (file: Express.Multer.File, region: string, division: string) => Promise<{
|
|
2565
|
-
message: string;
|
|
2566
|
-
details: {
|
|
2567
|
-
successful: number;
|
|
2568
|
-
failed: number;
|
|
2569
|
-
total: number;
|
|
2570
|
-
totalSizeMB: number;
|
|
2571
|
-
errors: string[];
|
|
2572
|
-
};
|
|
2573
|
-
}>;
|
|
2574
|
-
};
|
|
2575
|
-
|
|
2576
|
-
declare function useSchoolController(): {
|
|
2577
|
-
add: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2578
|
-
getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2579
|
-
getByCreatedBy: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2580
|
-
updateStatusById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2581
|
-
registerSchool: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2582
|
-
approveSchool: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2583
|
-
addBulk: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2584
|
-
};
|
|
2585
|
-
|
|
2586
|
-
type TBuilding = {
|
|
2587
|
-
_id?: ObjectId;
|
|
2588
|
-
school: ObjectId;
|
|
2589
|
-
serial?: string;
|
|
2590
|
-
name: string;
|
|
2591
|
-
levels: number;
|
|
2592
|
-
createdAt?: Date | string;
|
|
2593
|
-
updatedAt?: Date | string;
|
|
2594
|
-
deletedAt?: Date | string;
|
|
2595
|
-
status?: string;
|
|
2596
|
-
};
|
|
2597
|
-
declare const schemaBuilding: Joi.ObjectSchema<any>;
|
|
2598
|
-
type TBuildingUnit = {
|
|
2599
|
-
_id?: ObjectId;
|
|
2600
|
-
school: ObjectId | string;
|
|
2601
|
-
name?: string;
|
|
2602
|
-
building: ObjectId | string;
|
|
2603
|
-
buildingName?: string;
|
|
2604
|
-
level: number;
|
|
2605
|
-
category: string;
|
|
2606
|
-
type: string;
|
|
2607
|
-
seating_capacity: number;
|
|
2608
|
-
standing_capacity: number;
|
|
2609
|
-
description?: string;
|
|
2610
|
-
unit_of_measurement: string;
|
|
2611
|
-
area: number;
|
|
2612
|
-
status: string;
|
|
2613
|
-
createdAt?: Date | string;
|
|
2614
|
-
updatedAt?: Date | string;
|
|
2615
|
-
deletedAt?: Date | string;
|
|
2616
|
-
};
|
|
2617
|
-
declare const schemaBuildingUnit: Joi.ObjectSchema<any>;
|
|
2618
|
-
declare const schemaUpdateOptions: Joi.ObjectSchema<any>;
|
|
2619
|
-
declare function MBuilding(value: TBuilding): {
|
|
2620
|
-
_id: ObjectId | undefined;
|
|
2621
|
-
school: ObjectId;
|
|
2622
|
-
serial: string;
|
|
2623
|
-
name: string;
|
|
2624
|
-
levels: number;
|
|
2625
|
-
status: string;
|
|
2626
|
-
createdAt: string | Date;
|
|
2627
|
-
updatedAt: string | Date;
|
|
2628
|
-
deletedAt: string | Date;
|
|
2629
|
-
};
|
|
2630
|
-
declare function MBuildingUnit(value: TBuildingUnit): {
|
|
2631
|
-
_id: ObjectId | undefined;
|
|
2632
|
-
school: ObjectId;
|
|
2633
|
-
name: string;
|
|
2634
|
-
building: ObjectId;
|
|
2635
|
-
buildingName: string;
|
|
2636
|
-
level: number;
|
|
2637
|
-
category: string;
|
|
2638
|
-
type: string;
|
|
2639
|
-
seating_capacity: number;
|
|
2640
|
-
standing_capacity: number;
|
|
2641
|
-
description: string;
|
|
2642
|
-
unit_of_measurement: string;
|
|
2643
|
-
area: number;
|
|
2644
|
-
status: string;
|
|
2645
|
-
createdAt: string | Date;
|
|
2646
|
-
updatedAt: string | Date;
|
|
2647
|
-
deletedAt: string | Date;
|
|
2648
|
-
};
|
|
2649
|
-
|
|
2650
|
-
declare function useBuildingRepo(): {
|
|
2651
|
-
createIndexes: () => Promise<void>;
|
|
2652
|
-
add: (value: TBuilding, session?: ClientSession) => Promise<ObjectId>;
|
|
2653
|
-
getAll: ({ search, page, limit, sort, school, status, }?: {
|
|
2654
|
-
search?: string | undefined;
|
|
2655
|
-
page?: number | undefined;
|
|
2656
|
-
limit?: number | undefined;
|
|
2657
|
-
sort?: {} | undefined;
|
|
2658
|
-
school?: string | undefined;
|
|
2659
|
-
status?: string | undefined;
|
|
2660
|
-
}) => Promise<Record<string, any>>;
|
|
2661
|
-
getById: (_id: string | ObjectId) => Promise<TBuilding | null>;
|
|
2662
|
-
updateById: (_id: ObjectId | string, value: {
|
|
2663
|
-
name: string;
|
|
2664
|
-
serial: string;
|
|
2665
|
-
levels: number;
|
|
2666
|
-
}, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
|
|
2667
|
-
deleteById: (_id: string | ObjectId, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
|
|
2668
|
-
};
|
|
2669
|
-
|
|
2670
|
-
declare function useBuildingUnitRepo(): {
|
|
2671
|
-
createIndexes: () => Promise<void>;
|
|
2672
|
-
add: (value: TBuildingUnit, session?: ClientSession) => Promise<ObjectId>;
|
|
2673
|
-
getAll: ({ search, page, limit, sort, school, building, status, }?: {
|
|
2674
|
-
search?: string | undefined;
|
|
2675
|
-
page?: number | undefined;
|
|
2676
|
-
limit?: number | undefined;
|
|
2677
|
-
sort?: {} | undefined;
|
|
2678
|
-
school?: string | undefined;
|
|
2679
|
-
building?: string | undefined;
|
|
2680
|
-
status?: string | undefined;
|
|
2681
|
-
}) => Promise<Record<string, any>>;
|
|
2682
|
-
getById: (_id: string | ObjectId) => Promise<TBuildingUnit>;
|
|
2683
|
-
getByBuildingLevel: (building: string | ObjectId, level: number) => Promise<TBuildingUnit | null>;
|
|
2684
|
-
updateById: (_id: string | ObjectId, value: {
|
|
2685
|
-
name?: string | undefined;
|
|
2686
|
-
building?: string | undefined;
|
|
2687
|
-
level?: number | undefined;
|
|
2688
|
-
category?: string | undefined;
|
|
2689
|
-
type?: string | undefined;
|
|
2690
|
-
seating_capacity?: number | undefined;
|
|
2691
|
-
standing_capacity?: number | undefined;
|
|
2692
|
-
area?: number | undefined;
|
|
2693
|
-
}, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
|
|
2694
|
-
getByBuilding: (building: string | ObjectId) => Promise<TBuildingUnit | null>;
|
|
2695
|
-
deleteById: (_id: string | ObjectId, session?: ClientSession) => Promise<string>;
|
|
2696
|
-
updateByBuildingId: (building: string | ObjectId, value: Partial<Pick<TBuildingUnit, "buildingName">>, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
|
|
2697
|
-
};
|
|
2698
|
-
|
|
2699
|
-
declare function useBuildingController(): {
|
|
2700
|
-
createBuilding: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2701
|
-
getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2702
|
-
getById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2703
|
-
updateById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2704
|
-
deleteById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2705
|
-
};
|
|
2706
|
-
|
|
2707
|
-
declare function useBuildingUnitController(): {
|
|
2708
|
-
add: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2709
|
-
getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2710
|
-
getById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2711
|
-
updateById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2712
|
-
deleteById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2713
|
-
};
|
|
2714
|
-
|
|
2715
|
-
type TAsset = {
|
|
2716
|
-
_id?: ObjectId;
|
|
2717
|
-
school: ObjectId;
|
|
2718
|
-
asset_type: "supply" | "furniture-equipment" | "fixed-asset";
|
|
2719
|
-
name: string;
|
|
2720
|
-
category: string;
|
|
2721
|
-
type: string;
|
|
2722
|
-
unit: string;
|
|
2723
|
-
status?: string;
|
|
2724
|
-
qty?: number;
|
|
2725
|
-
brand?: string;
|
|
2726
|
-
createdAt?: string | Date;
|
|
2727
|
-
updatedAt?: string | Date;
|
|
2728
|
-
deletedAt?: string | Date;
|
|
2729
|
-
condition?: {
|
|
2730
|
-
good: number;
|
|
2731
|
-
disposal: number;
|
|
2732
|
-
lost: number;
|
|
2733
|
-
damaged: number;
|
|
2734
|
-
};
|
|
2735
|
-
metadata?: {
|
|
2736
|
-
title?: string;
|
|
2737
|
-
isbn?: string;
|
|
2738
|
-
author?: string;
|
|
2739
|
-
edition?: string;
|
|
2740
|
-
subject?: string;
|
|
2741
|
-
grade_level?: number;
|
|
2742
|
-
publisher?: string;
|
|
2743
|
-
language?: string;
|
|
2744
|
-
};
|
|
2745
|
-
};
|
|
2746
|
-
declare const schemaAsset: Joi.ObjectSchema<any>;
|
|
2747
|
-
declare const schemaAssetUpdateOption: Joi.ObjectSchema<any>;
|
|
2748
|
-
declare function MAsset(value: TAsset): TAsset;
|
|
2749
|
-
|
|
2750
|
-
declare function useAssetRepo(): {
|
|
2751
|
-
createIndex: () => Promise<void>;
|
|
2752
|
-
add: (value: TAsset) => Promise<ObjectId>;
|
|
2753
|
-
updateById: (_id: string | ObjectId, value: Partial<Pick<TAsset, "name" | "brand" | "category" | "type" | "unit" | "qty">>, session?: ClientSession) => Promise<string>;
|
|
2754
|
-
deleteById: (_id: string | ObjectId) => Promise<string>;
|
|
2755
|
-
getById: (_id: string | ObjectId) => Promise<TAsset>;
|
|
2756
|
-
getAll: ({ page, search, limit, status, school, sort, asset_type, }?: {
|
|
2757
|
-
page?: number | undefined;
|
|
2758
|
-
search?: string | undefined;
|
|
2759
|
-
limit?: number | undefined;
|
|
2760
|
-
status?: string | undefined;
|
|
2761
|
-
school?: string | ObjectId | undefined;
|
|
2762
|
-
sort?: Record<string, any> | undefined;
|
|
2763
|
-
asset_type: string;
|
|
2764
|
-
}) => Promise<{}>;
|
|
2765
|
-
getCategories: (school: string | ObjectId, asset_type: string) => Promise<{}>;
|
|
2766
|
-
getTypes: (school: string | ObjectId, asset_type: string) => Promise<{}>;
|
|
2767
|
-
getUnitsBySchool: (school: string | ObjectId) => Promise<{}>;
|
|
2768
|
-
};
|
|
2769
|
-
|
|
2770
|
-
declare function useAssetController(): {
|
|
2771
|
-
add: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2772
|
-
getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2773
|
-
deleteById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2774
|
-
updateById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2775
|
-
getById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2776
|
-
getCategories: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2777
|
-
getTypes: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2778
|
-
getUnitsBySchool: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2779
|
-
};
|
|
2780
|
-
|
|
2781
|
-
type TStockCard = {
|
|
2782
|
-
_id?: ObjectId;
|
|
2783
|
-
school: ObjectId;
|
|
2784
|
-
item: ObjectId;
|
|
2785
|
-
balance: number;
|
|
2786
|
-
qty: number;
|
|
2787
|
-
unitCost?: number;
|
|
2788
|
-
totalCost?: number;
|
|
2789
|
-
status: string;
|
|
2790
|
-
condition: string;
|
|
2791
|
-
supplier?: string;
|
|
2792
|
-
location?: ObjectId;
|
|
2793
|
-
locationName?: string;
|
|
2794
|
-
reason?: string;
|
|
2795
|
-
remarks?: string;
|
|
2796
|
-
createdAt?: Date | string;
|
|
2797
|
-
updatedAt?: Date | string;
|
|
2798
|
-
deletedAt?: Date | string;
|
|
2799
|
-
};
|
|
2800
|
-
declare const schemaStockCard: Joi.ObjectSchema<any>;
|
|
2801
|
-
declare function MStockCard(value: TStockCard): TStockCard;
|
|
2802
|
-
|
|
2803
|
-
declare function useStockCardRepository(): {
|
|
2804
|
-
createIndex: () => Promise<void>;
|
|
2805
|
-
add: (value: TStockCard, session?: ClientSession) => Promise<ObjectId>;
|
|
2806
|
-
getById: (_id: string | ObjectId) => Promise<{}>;
|
|
2807
|
-
getAll: ({ page, limit, school, sort, id }?: {
|
|
2808
|
-
page?: number | undefined;
|
|
2809
|
-
limit?: number | undefined;
|
|
2810
|
-
school?: string | ObjectId | undefined;
|
|
2811
|
-
sort?: Record<string, any> | undefined;
|
|
2812
|
-
id: string | ObjectId;
|
|
2813
|
-
}) => Promise<{}>;
|
|
2814
|
-
getSuppliers: (school: string | ObjectId) => Promise<{}>;
|
|
2815
|
-
};
|
|
2816
|
-
|
|
2817
|
-
declare function useStockCardController(): {
|
|
2818
|
-
add: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2819
|
-
getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2820
|
-
getById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2821
|
-
getSuppliers: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2822
|
-
};
|
|
2823
|
-
|
|
2824
|
-
declare function useGitHubService(): {
|
|
2825
|
-
setVariables: (params: {
|
|
2826
|
-
githubToken: string;
|
|
2827
|
-
repoUrl: string;
|
|
2828
|
-
environment: string;
|
|
2829
|
-
type: "env" | "secret";
|
|
2830
|
-
keyValues: string;
|
|
2831
|
-
}) => Promise<string>;
|
|
2832
|
-
};
|
|
2833
|
-
|
|
2834
791
|
interface AudioTranscriptionOptions {
|
|
2835
792
|
prompt?: string;
|
|
2836
793
|
language?: string;
|
|
@@ -2884,6 +841,20 @@ declare function useGeminiAiService(): {
|
|
|
2884
841
|
checkPhonemeMatchFromBuffer: (audioBuffer: Buffer, mimeType: string, targetPhoneme: string, options?: PhonemeMatchOptions) => Promise<PhonemeMatchResult>;
|
|
2885
842
|
};
|
|
2886
843
|
|
|
844
|
+
declare function useGitHubService(): {
|
|
845
|
+
setVariables: (params: {
|
|
846
|
+
githubToken: string;
|
|
847
|
+
repoUrl: string;
|
|
848
|
+
environment: string;
|
|
849
|
+
type: "env" | "secret";
|
|
850
|
+
keyValues: string;
|
|
851
|
+
}) => Promise<string>;
|
|
852
|
+
};
|
|
853
|
+
|
|
854
|
+
declare function useTranscribeService(): {
|
|
855
|
+
transcribeAudio: (file: Express.Multer.File) => Promise<void>;
|
|
856
|
+
};
|
|
857
|
+
|
|
2887
858
|
declare function useAudioTranscriptionController(): {
|
|
2888
859
|
transcribeFromFile: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2889
860
|
transcribeFromBase64: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
@@ -2900,443 +871,7 @@ declare function useUtilController(): {
|
|
|
2900
871
|
setGitHubVariables: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2901
872
|
};
|
|
2902
873
|
|
|
2903
|
-
|
|
2904
|
-
_id?: ObjectId;
|
|
2905
|
-
org: string;
|
|
2906
|
-
itemNumber: string;
|
|
2907
|
-
orgUnitCode?: string;
|
|
2908
|
-
positionTitle: string;
|
|
2909
|
-
positionCategory: string;
|
|
2910
|
-
salaryGrade: number;
|
|
2911
|
-
employmentType?: string;
|
|
2912
|
-
personnelType: string;
|
|
2913
|
-
region?: ObjectId | string;
|
|
2914
|
-
regionName?: string;
|
|
2915
|
-
division?: ObjectId | string;
|
|
2916
|
-
divisionName?: string;
|
|
2917
|
-
employee?: string | ObjectId;
|
|
2918
|
-
employeeName?: string;
|
|
2919
|
-
annualSalary?: number;
|
|
2920
|
-
monthlySalary?: number;
|
|
2921
|
-
status?: string;
|
|
2922
|
-
createdAt?: Date | string;
|
|
2923
|
-
updatedAt?: Date | string;
|
|
2924
|
-
deletedAt?: Date | string;
|
|
2925
|
-
};
|
|
2926
|
-
declare const schemaPlantilla: Joi.ObjectSchema<TPlantilla>;
|
|
2927
|
-
declare function MPlantilla(data: Partial<TPlantilla>): TPlantilla;
|
|
2928
|
-
|
|
2929
|
-
declare function usePlantillaRepo(): {
|
|
2930
|
-
createIndexes: () => Promise<void>;
|
|
2931
|
-
add: (value: TPlantilla, session?: ClientSession, clearCache?: boolean) => Promise<ObjectId>;
|
|
2932
|
-
getAll: ({ search, page, limit, sort, org, status, }?: {
|
|
2933
|
-
search?: string | undefined;
|
|
2934
|
-
page?: number | undefined;
|
|
2935
|
-
limit?: number | undefined;
|
|
2936
|
-
sort?: {} | undefined;
|
|
2937
|
-
org?: string | undefined;
|
|
2938
|
-
status?: string | undefined;
|
|
2939
|
-
}) => Promise<Record<string, any>>;
|
|
2940
|
-
getById: (_id: string | ObjectId) => Promise<TPlantilla | null>;
|
|
2941
|
-
updateById: (_id: ObjectId | string, value: Partial<Pick<TPlantilla, "status" | "positionTitle" | "updatedAt">>, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
|
|
2942
|
-
deleteById: (_id: string | ObjectId, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
|
|
2943
|
-
delCachedData: () => void;
|
|
2944
|
-
};
|
|
2945
|
-
|
|
2946
|
-
declare function usePlantillaController(): {
|
|
2947
|
-
createPlantilla: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2948
|
-
getAllPlantillas: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2949
|
-
getPlantillaById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2950
|
-
updatePlantilla: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2951
|
-
deletePlantilla: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2952
|
-
bulkAddPlantillas: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2953
|
-
};
|
|
2954
|
-
|
|
2955
|
-
type TOffice = {
|
|
2956
|
-
_id?: ObjectId;
|
|
2957
|
-
name: string;
|
|
2958
|
-
code: string;
|
|
2959
|
-
type: string;
|
|
2960
|
-
parent?: ObjectId | string;
|
|
2961
|
-
path: string;
|
|
2962
|
-
status: string;
|
|
2963
|
-
createdAt?: Date | string;
|
|
2964
|
-
updatedAt?: Date | string;
|
|
2965
|
-
deletedAt?: Date | string;
|
|
2966
|
-
};
|
|
2967
|
-
declare const schemaOffice: Joi.ObjectSchema<TOffice>;
|
|
2968
|
-
declare function MOffice(data: Partial<TOffice>): TOffice;
|
|
2969
|
-
|
|
2970
|
-
declare function useOfficeRepo(): {
|
|
2971
|
-
createIndexes: () => Promise<void>;
|
|
2972
|
-
add: (value: TOffice, session?: ClientSession, clearCache?: boolean) => Promise<ObjectId>;
|
|
2973
|
-
getAll: ({ search, page, limit, sort, type, parent, status, }?: {
|
|
2974
|
-
search?: string | undefined;
|
|
2975
|
-
page?: number | undefined;
|
|
2976
|
-
limit?: number | undefined;
|
|
2977
|
-
sort?: {} | undefined;
|
|
2978
|
-
type?: string | undefined;
|
|
2979
|
-
parent?: string | undefined;
|
|
2980
|
-
status?: string | undefined;
|
|
2981
|
-
}) => Promise<Record<string, any>>;
|
|
2982
|
-
getById: (_id: string | ObjectId) => Promise<TOffice | null>;
|
|
2983
|
-
updateById: (_id: ObjectId | string, value: Partial<Pick<TOffice, "status" | "name" | "code" | "type" | "parent" | "path" | "updatedAt">>, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
|
|
2984
|
-
deleteById: (_id: string | ObjectId, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
|
|
2985
|
-
delCachedData: () => void;
|
|
2986
|
-
};
|
|
2987
|
-
|
|
2988
|
-
declare function useOfficeService(): {
|
|
2989
|
-
addBulk: (file: Express.Multer.File) => Promise<{
|
|
2990
|
-
total: number;
|
|
2991
|
-
successful: number;
|
|
2992
|
-
failed: number;
|
|
2993
|
-
errors: string[];
|
|
2994
|
-
}>;
|
|
2995
|
-
};
|
|
2996
|
-
|
|
2997
|
-
declare function useOfficeController(): {
|
|
2998
|
-
add: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2999
|
-
getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
3000
|
-
getById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
3001
|
-
updateById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
3002
|
-
deleteById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
3003
|
-
bulkAddOffices: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
3004
|
-
};
|
|
3005
|
-
|
|
3006
|
-
type TCurriculumSubject = {
|
|
3007
|
-
educationLevel: string;
|
|
3008
|
-
gradeLevel: string;
|
|
3009
|
-
subjectCode: string;
|
|
3010
|
-
subjectName: string;
|
|
3011
|
-
subjectType: string;
|
|
3012
|
-
sessionFrequency: number;
|
|
3013
|
-
sessionDuration: number;
|
|
3014
|
-
totalMinutesPerWeek: number;
|
|
3015
|
-
};
|
|
3016
|
-
type TCurriculum = {
|
|
3017
|
-
_id?: ObjectId;
|
|
3018
|
-
school: ObjectId | string;
|
|
3019
|
-
code: string;
|
|
3020
|
-
effectiveSchoolYear: string;
|
|
3021
|
-
maxTeachingHoursPerDay: number;
|
|
3022
|
-
subjects?: TCurriculumSubject[];
|
|
3023
|
-
curriculumMemoRef?: string;
|
|
3024
|
-
status?: string;
|
|
3025
|
-
createdAt?: Date | string;
|
|
3026
|
-
updatedAt?: Date | string;
|
|
3027
|
-
deletedAt?: Date | string;
|
|
3028
|
-
createdBy?: string;
|
|
3029
|
-
updatedBy?: string;
|
|
3030
|
-
deletedBy?: string;
|
|
3031
|
-
};
|
|
3032
|
-
declare const schemaCurriculum: Joi.ObjectSchema<any>;
|
|
3033
|
-
declare function MCurriculum(value: TCurriculum): {
|
|
3034
|
-
_id: ObjectId | undefined;
|
|
3035
|
-
school: string | ObjectId;
|
|
3036
|
-
code: string;
|
|
3037
|
-
effectiveSchoolYear: string;
|
|
3038
|
-
maxTeachingHoursPerDay: number;
|
|
3039
|
-
subjects: TCurriculumSubject[];
|
|
3040
|
-
curriculumMemoRef: string;
|
|
3041
|
-
status: string;
|
|
3042
|
-
createdAt: string | Date;
|
|
3043
|
-
updatedAt: string | Date;
|
|
3044
|
-
deletedAt: string | Date;
|
|
3045
|
-
createdBy: string;
|
|
3046
|
-
updatedBy: string;
|
|
3047
|
-
deletedBy: string;
|
|
3048
|
-
};
|
|
3049
|
-
|
|
3050
|
-
declare function useCurriculumRepo(): {
|
|
3051
|
-
createIndexes: () => Promise<void>;
|
|
3052
|
-
add: (value: TCurriculum, session?: ClientSession) => Promise<ObjectId>;
|
|
3053
|
-
getAll: ({ search, page, limit, sort, status, }?: {
|
|
3054
|
-
search?: string | undefined;
|
|
3055
|
-
page?: number | undefined;
|
|
3056
|
-
limit?: number | undefined;
|
|
3057
|
-
sort?: {} | undefined;
|
|
3058
|
-
status?: string | undefined;
|
|
3059
|
-
}) => Promise<Record<string, any>>;
|
|
3060
|
-
getById: (_id: string | ObjectId) => Promise<TCurriculum | null>;
|
|
3061
|
-
updateById: (_id: ObjectId | string, value: {
|
|
3062
|
-
code?: string;
|
|
3063
|
-
maxTeachingHoursPerDay?: number;
|
|
3064
|
-
curriculumMemoRef?: string;
|
|
3065
|
-
}, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
|
|
3066
|
-
deleteById: (_id: string | ObjectId, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
|
|
3067
|
-
};
|
|
3068
|
-
|
|
3069
|
-
declare function useCurriculumController(): {
|
|
3070
|
-
add: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
3071
|
-
getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
3072
|
-
getById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
3073
|
-
updateById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
3074
|
-
deleteById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
3075
|
-
};
|
|
3076
|
-
|
|
3077
|
-
type TGradeLevel = {
|
|
3078
|
-
_id?: ObjectId;
|
|
3079
|
-
school?: ObjectId | string;
|
|
3080
|
-
educationLevel: string;
|
|
3081
|
-
gradeLevel: string;
|
|
3082
|
-
tracks?: string[];
|
|
3083
|
-
trackStrands?: string[];
|
|
3084
|
-
teachingStyle: string;
|
|
3085
|
-
maxNumberOfLearners: number;
|
|
3086
|
-
defaultStartTime?: string;
|
|
3087
|
-
defaultEndTime?: string;
|
|
3088
|
-
status?: string;
|
|
3089
|
-
createdAt?: Date | string;
|
|
3090
|
-
updatedAt?: Date | string;
|
|
3091
|
-
deletedAt?: Date | string;
|
|
3092
|
-
createdBy?: string;
|
|
3093
|
-
updatedBy?: string;
|
|
3094
|
-
deletedBy?: string;
|
|
3095
|
-
};
|
|
3096
|
-
declare const schemaGradeLevel: Joi.ObjectSchema<any>;
|
|
3097
|
-
declare function MGradeLevel(value: TGradeLevel): {
|
|
3098
|
-
_id: ObjectId | undefined;
|
|
3099
|
-
school: string | ObjectId | undefined;
|
|
3100
|
-
educationLevel: string;
|
|
3101
|
-
gradeLevel: string;
|
|
3102
|
-
tracks: string[];
|
|
3103
|
-
trackStrands: string[];
|
|
3104
|
-
teachingStyle: string;
|
|
3105
|
-
maxNumberOfLearners: number;
|
|
3106
|
-
defaultStartTime: string;
|
|
3107
|
-
defaultEndTime: string;
|
|
3108
|
-
status: string;
|
|
3109
|
-
createdAt: string | Date;
|
|
3110
|
-
updatedAt: string | Date;
|
|
3111
|
-
deletedAt: string | Date;
|
|
3112
|
-
createdBy: string;
|
|
3113
|
-
updatedBy: string;
|
|
3114
|
-
deletedBy: string;
|
|
3115
|
-
};
|
|
3116
|
-
|
|
3117
|
-
declare function useGradeLevelRepo(): {
|
|
3118
|
-
createIndexes: () => Promise<void>;
|
|
3119
|
-
add: (value: TGradeLevel, session?: ClientSession) => Promise<ObjectId>;
|
|
3120
|
-
getAll: ({ search, page, limit, sort, educationLevel, gradeLevel, teachingStyle, school, status, }?: {
|
|
3121
|
-
search?: string | undefined;
|
|
3122
|
-
page?: number | undefined;
|
|
3123
|
-
limit?: number | undefined;
|
|
3124
|
-
sort?: {} | undefined;
|
|
3125
|
-
educationLevel?: string | undefined;
|
|
3126
|
-
gradeLevel?: string | undefined;
|
|
3127
|
-
teachingStyle?: string | undefined;
|
|
3128
|
-
school?: string | undefined;
|
|
3129
|
-
status?: string | undefined;
|
|
3130
|
-
}) => Promise<Record<string, any>>;
|
|
3131
|
-
getById: (_id: string | ObjectId) => Promise<bson.Document>;
|
|
3132
|
-
updateById: (_id: ObjectId | string, value: {
|
|
3133
|
-
educationLevel?: string;
|
|
3134
|
-
gradeLevel?: string;
|
|
3135
|
-
teachingStyle?: string;
|
|
3136
|
-
maxTeachingHoursPerDay?: number;
|
|
3137
|
-
maxTeachingHoursPerWeek?: number;
|
|
3138
|
-
defaultStartTime?: string;
|
|
3139
|
-
defaultEndTime?: string;
|
|
3140
|
-
school?: ObjectId | string;
|
|
3141
|
-
}, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
|
|
3142
|
-
deleteById: (_id: string | ObjectId, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
|
|
3143
|
-
getByEducationLevel: (educationLevel: string, school?: string) => Promise<mongodb.WithId<bson.Document>[] | TGradeLevel[]>;
|
|
3144
|
-
};
|
|
3145
|
-
|
|
3146
|
-
declare function useGradeLevelController(): {
|
|
3147
|
-
add: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
3148
|
-
getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
3149
|
-
getById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
3150
|
-
updateById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
3151
|
-
deleteById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
3152
|
-
getByEducationLevel: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
3153
|
-
};
|
|
3154
|
-
|
|
3155
|
-
type BasicEducEnrForm = {
|
|
3156
|
-
_id?: ObjectId;
|
|
3157
|
-
region: ObjectId;
|
|
3158
|
-
sdo: ObjectId;
|
|
3159
|
-
school: ObjectId;
|
|
3160
|
-
schoolYear: string;
|
|
3161
|
-
gradeLevelToEnroll: string;
|
|
3162
|
-
learnerInfo: EnrLearnerInfo;
|
|
3163
|
-
parentGuardianInfo: EnrParentGuardianInfo;
|
|
3164
|
-
addressInfo: AddressInformation;
|
|
3165
|
-
returningLearnerInfo?: EnrReturningLearnerInfo;
|
|
3166
|
-
seniorHighInfo?: EnrSeniorHighInformation;
|
|
3167
|
-
preferredLearningModalities?: EnrLearningModality[];
|
|
3168
|
-
certification: EnrCert;
|
|
3169
|
-
status?: string;
|
|
3170
|
-
rejectionReason?: string;
|
|
3171
|
-
createdAt?: Date | string;
|
|
3172
|
-
updatedAt?: Date | string;
|
|
3173
|
-
deletedAt?: Date | string;
|
|
3174
|
-
createdBy?: string;
|
|
3175
|
-
updatedBy?: string;
|
|
3176
|
-
deletedBy?: string;
|
|
3177
|
-
};
|
|
3178
|
-
type EnrLearnerInfo = {
|
|
3179
|
-
lrn?: string;
|
|
3180
|
-
lastName: string;
|
|
3181
|
-
firstName: string;
|
|
3182
|
-
middleName?: string;
|
|
3183
|
-
extensionName?: string;
|
|
3184
|
-
birthDate: string;
|
|
3185
|
-
sex: "Male" | "Female";
|
|
3186
|
-
age: number;
|
|
3187
|
-
placeOfBirth?: {
|
|
3188
|
-
municipalityCity: string;
|
|
3189
|
-
province?: string;
|
|
3190
|
-
country?: string;
|
|
3191
|
-
};
|
|
3192
|
-
motherTongue?: string;
|
|
3193
|
-
hasDisability: boolean;
|
|
3194
|
-
disabilityTypes?: DisabilityType[];
|
|
3195
|
-
otherDisabilityDetails?: string;
|
|
3196
|
-
isIndigenous?: boolean;
|
|
3197
|
-
indigenousCommunity?: string;
|
|
3198
|
-
is4PsBeneficiary?: boolean;
|
|
3199
|
-
fourPsHouseholdId?: string;
|
|
3200
|
-
};
|
|
3201
|
-
type DisabilityType = "Visual Impairment (Blind)" | "Visual Impairment (Low Vision)" | "Hearing Impairment" | "Learning Disability" | "Intellectual Disability" | "Autism Spectrum Disorder" | "Emotional-Behavioral Disorder" | "Orthopedic/Physical Handicap" | "Speech/Language Disorder" | "Cerebral Palsy" | "Special Health Problem/Chronic Disease" | "Multiple Disorder" | "Cancer" | "Other";
|
|
3202
|
-
type EnrParentGuardianInfo = {
|
|
3203
|
-
father?: PersonContact;
|
|
3204
|
-
mother?: PersonContact;
|
|
3205
|
-
legalGuardian?: PersonContact;
|
|
3206
|
-
};
|
|
3207
|
-
type PersonContact = {
|
|
3208
|
-
lastName: string;
|
|
3209
|
-
firstName: string;
|
|
3210
|
-
middleName?: string;
|
|
3211
|
-
contactNumber?: string;
|
|
3212
|
-
};
|
|
3213
|
-
type AddressInformation = {
|
|
3214
|
-
currentAddress: EnrAddress;
|
|
3215
|
-
permanentAddress?: EnrAddress;
|
|
3216
|
-
sameAsCurrent?: boolean;
|
|
3217
|
-
};
|
|
3218
|
-
type EnrAddress = {
|
|
3219
|
-
houseNumber?: string;
|
|
3220
|
-
streetName?: string;
|
|
3221
|
-
sitio?: string;
|
|
3222
|
-
barangay: string;
|
|
3223
|
-
municipalityCity: string;
|
|
3224
|
-
province: string;
|
|
3225
|
-
country?: string;
|
|
3226
|
-
zipCode?: string;
|
|
3227
|
-
};
|
|
3228
|
-
type EnrReturningLearnerInfo = {
|
|
3229
|
-
lastGradeLevelCompleted: string;
|
|
3230
|
-
lastSchoolYearCompleted: string;
|
|
3231
|
-
lastSchoolAttended: string;
|
|
3232
|
-
lastSchoolId?: string;
|
|
3233
|
-
isReturningLearner: boolean;
|
|
3234
|
-
isTransferIn: boolean;
|
|
3235
|
-
};
|
|
3236
|
-
type EnrSeniorHighInformation = {
|
|
3237
|
-
semester: "1st" | "2nd";
|
|
3238
|
-
track: string;
|
|
3239
|
-
strand: string;
|
|
3240
|
-
};
|
|
3241
|
-
type EnrLearningModality = "Modular (Print)" | "Modular (Digital)" | "Online" | "Radio-Based Instruction" | "Educational Television" | "Blended" | "Homeschooling";
|
|
3242
|
-
type EnrCert = {
|
|
3243
|
-
certifiedBy: string;
|
|
3244
|
-
date: string;
|
|
3245
|
-
consentGiven: boolean;
|
|
3246
|
-
};
|
|
3247
|
-
declare const schemaEnrollment: Joi.ObjectSchema<any>;
|
|
3248
|
-
declare function MEnrollment(value: BasicEducEnrForm): {
|
|
3249
|
-
_id: ObjectId | undefined;
|
|
3250
|
-
region: ObjectId;
|
|
3251
|
-
sdo: ObjectId;
|
|
3252
|
-
school: ObjectId;
|
|
3253
|
-
schoolYear: string;
|
|
3254
|
-
gradeLevelToEnroll: string;
|
|
3255
|
-
learnerInfo: EnrLearnerInfo;
|
|
3256
|
-
parentGuardianInfo: EnrParentGuardianInfo;
|
|
3257
|
-
addressInfo: AddressInformation;
|
|
3258
|
-
returningLearnerInfo: EnrReturningLearnerInfo | undefined;
|
|
3259
|
-
seniorHighInfo: EnrSeniorHighInformation | undefined;
|
|
3260
|
-
preferredLearningModalities: EnrLearningModality[];
|
|
3261
|
-
certification: EnrCert;
|
|
3262
|
-
status: string;
|
|
3263
|
-
rejectionReason: string;
|
|
3264
|
-
createdAt: string | Date;
|
|
3265
|
-
updatedAt: string | Date;
|
|
3266
|
-
deletedAt: string | Date;
|
|
3267
|
-
createdBy: string;
|
|
3268
|
-
updatedBy: string;
|
|
3269
|
-
deletedBy: string;
|
|
3270
|
-
};
|
|
3271
|
-
|
|
3272
|
-
declare function useEnrollmentRepo(): {
|
|
3273
|
-
createIndexes: () => Promise<void>;
|
|
3274
|
-
add: (value: BasicEducEnrForm, session?: ClientSession) => Promise<ObjectId>;
|
|
3275
|
-
updateById: (_id: ObjectId | string, value: Partial<BasicEducEnrForm>, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
|
|
3276
|
-
getAll: ({ search, page, limit, sort, status, school, schoolYear, gradeLevelToEnroll, }?: {
|
|
3277
|
-
search?: string | undefined;
|
|
3278
|
-
page?: number | undefined;
|
|
3279
|
-
limit?: number | undefined;
|
|
3280
|
-
sort?: {} | undefined;
|
|
3281
|
-
status?: string | undefined;
|
|
3282
|
-
school?: string | undefined;
|
|
3283
|
-
schoolYear?: string | undefined;
|
|
3284
|
-
gradeLevelToEnroll?: string | undefined;
|
|
3285
|
-
}) => Promise<Record<string, any>>;
|
|
3286
|
-
getById: (_id: string | ObjectId) => Promise<BasicEducEnrForm>;
|
|
3287
|
-
getByLrn: (lrn: string, schoolYear?: string) => Promise<BasicEducEnrForm | null>;
|
|
3288
|
-
deleteById: (_id: string | ObjectId, deletedBy?: string, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
|
|
3289
|
-
getBySchoolAndYear: (school: string | ObjectId, schoolYear: string) => Promise<BasicEducEnrForm[]>;
|
|
3290
|
-
};
|
|
3291
|
-
|
|
3292
|
-
declare function useEnrollmentService(): {
|
|
3293
|
-
createEnrollment: (value: BasicEducEnrForm) => Promise<{
|
|
3294
|
-
message: string;
|
|
3295
|
-
id: ObjectId;
|
|
3296
|
-
}>;
|
|
3297
|
-
updateEnrollment: (_id: string | ObjectId, value: Partial<BasicEducEnrForm>) => Promise<{
|
|
3298
|
-
message: string;
|
|
3299
|
-
modifiedCount: number;
|
|
3300
|
-
}>;
|
|
3301
|
-
getEnrollments: ({ search, page, limit, sort, status, school, schoolYear, gradeLevelToEnroll, }?: {
|
|
3302
|
-
search?: string | undefined;
|
|
3303
|
-
page?: number | undefined;
|
|
3304
|
-
limit?: number | undefined;
|
|
3305
|
-
sort?: {} | undefined;
|
|
3306
|
-
status?: string | undefined;
|
|
3307
|
-
school?: string | undefined;
|
|
3308
|
-
schoolYear?: string | undefined;
|
|
3309
|
-
gradeLevelToEnroll?: string | undefined;
|
|
3310
|
-
}) => Promise<Record<string, any>>;
|
|
3311
|
-
getEnrollmentById: (_id: string | ObjectId) => Promise<BasicEducEnrForm>;
|
|
3312
|
-
getEnrollmentByLrn: (lrn: string, schoolYear?: string) => Promise<BasicEducEnrForm | null>;
|
|
3313
|
-
deleteEnrollment: (_id: string | ObjectId, deletedBy?: string) => Promise<{
|
|
3314
|
-
message: string;
|
|
3315
|
-
modifiedCount: number;
|
|
3316
|
-
}>;
|
|
3317
|
-
getEnrollmentsBySchoolAndYear: (school: string | ObjectId, schoolYear: string) => Promise<BasicEducEnrForm[]>;
|
|
3318
|
-
approveEnrollment: (_id: string | ObjectId, approvedBy: string) => Promise<{
|
|
3319
|
-
message: string;
|
|
3320
|
-
modifiedCount: number;
|
|
3321
|
-
}>;
|
|
3322
|
-
rejectEnrollment: (_id: string | ObjectId, rejectedBy: string, rejectionReason?: string) => Promise<{
|
|
3323
|
-
message: string;
|
|
3324
|
-
modifiedCount: number;
|
|
3325
|
-
}>;
|
|
3326
|
-
};
|
|
3327
|
-
|
|
3328
|
-
declare function useEnrollmentController(): {
|
|
3329
|
-
add: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
3330
|
-
updateById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
3331
|
-
getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
3332
|
-
getById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
3333
|
-
getByLrn: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
3334
|
-
deleteById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
3335
|
-
getBySchoolAndYear: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
3336
|
-
approve: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
3337
|
-
reject: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
3338
|
-
getStatsBySchool: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
3339
|
-
};
|
|
874
|
+
declare const transactionSchema: Joi.ObjectSchema<any>;
|
|
3340
875
|
|
|
3341
876
|
declare const MONGO_URI: string;
|
|
3342
877
|
declare const MONGO_DB: string;
|
|
@@ -3377,4 +912,4 @@ declare const GEMINI_API_KEY: string;
|
|
|
3377
912
|
declare const ASSEMBLY_AI_API_KEY: string;
|
|
3378
913
|
declare const DOMAIN: string;
|
|
3379
914
|
|
|
3380
|
-
export { ACCESS_TOKEN_EXPIRY, ACCESS_TOKEN_SECRET, APP_ACCOUNT, APP_MAIN, ASSEMBLY_AI_API_KEY,
|
|
915
|
+
export { ACCESS_TOKEN_EXPIRY, ACCESS_TOKEN_SECRET, APP_ACCOUNT, APP_MAIN, ASSEMBLY_AI_API_KEY, AudioFileData, AudioTranscriptionOptions, AudioTranscriptionResult, DEFAULT_USER_EMAIL, DEFAULT_USER_FIRST_NAME, DEFAULT_USER_LAST_NAME, DEFAULT_USER_PASSWORD, DOMAIN, GEMINI_API_KEY, MAILER_EMAIL, MAILER_PASSWORD, MAILER_TRANSPORT_HOST, MAILER_TRANSPORT_PORT, MAILER_TRANSPORT_SECURE, MAddress, MBuilding, MBuildingUnit, MFile, MMember, MONGO_DB, MONGO_URI, MOrg, MRole, MToken, MUser, MUserRole, MVerification, PAYPAL_API_URL, PAYPAL_CLIENT_ID, PAYPAL_CLIENT_SECRET, PORT, PhonemeMatchOptions, PhonemeMatchResult, 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, TAddress, TBuilding, TBuildingUnit, TCounter, TFile, TMember, TMiniRole, TOrg, TRole, TToken, TUser, TUserRole, TVerification, TVerificationMetadata, VERIFICATION_FORGET_PASSWORD_DURATION, VERIFICATION_USER_INVITE_DURATION, XENDIT_BASE_URL, XENDIT_SECRET_KEY, addressSchema, isDev, schemaBuilding, schemaBuildingUnit, schemaOrg, schemaUpdateOptions, transactionSchema, useAddressController, useAddressRepo, useAudioTranscriptionController, useAuthController, useAuthService, useBuildingController, useBuildingRepo, useBuildingService, useBuildingUnitController, useBuildingUnitRepo, useBuildingUnitService, useCounterModel, useCounterRepo, useFileController, useFileRepo, useFileService, useGeminiAiService, useGitHubService, useMemberController, useMemberRepo, useOrgController, useOrgRepo, useOrgService, useRoleController, useRoleRepo, useTokenRepo, useTranscribeService, useUserController, useUserRepo, useUserService, useUtilController, useVerificationController, useVerificationRepo, useVerificationService };
|