@goweekdays/core 0.0.21 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,2621 +1,134 @@
1
- import * as mongodb from 'mongodb';
2
- import { ObjectId, ClientSession, Db, Collection } from 'mongodb';
3
- import * as bson from 'bson';
4
- import { Request, Response, NextFunction } from 'express';
5
- import { paginate } from '@goweekdays/utils';
6
1
  import Joi from 'joi';
7
- import { z } from 'zod';
8
-
9
- type TVerificationMetadata = {
10
- name?: string;
11
- app?: string;
12
- role?: string;
13
- referralCode?: string;
14
- org?: string | ObjectId;
15
- };
16
- type TVerification = {
17
- _id?: ObjectId;
18
- type: string;
19
- email: string;
20
- metadata?: TVerificationMetadata;
21
- status?: string;
22
- createdAt: string;
23
- updatedAt?: string | null;
24
- expireAt: string;
25
- };
26
- declare class MVerification implements TVerification {
27
- _id?: ObjectId;
28
- type: string;
29
- email: string;
30
- metadata?: TVerificationMetadata;
31
- status?: string;
32
- createdAt: string;
33
- updatedAt?: string | null;
34
- expireAt: string;
35
- constructor(value: TVerification);
36
- }
37
-
38
- declare function useVerificationRepo(): {
39
- createIndex: () => Promise<void>;
40
- createTextIndex: () => Promise<void>;
41
- add: (value: TVerification, session?: ClientSession) => Promise<ObjectId>;
42
- getVerifications: ({ search, page, limit, sort, status, type, email, }?: {
43
- search?: string | undefined;
44
- page?: number | undefined;
45
- limit?: number | undefined;
46
- sort?: {} | undefined;
47
- status?: string | undefined;
48
- type?: string | undefined;
49
- email?: string | undefined;
50
- }) => Promise<{
51
- items: any[];
52
- pages: number;
53
- pageRange: string;
54
- }>;
55
- getById: (_id: ObjectId | string) => Promise<TVerification | null>;
56
- getByIdByType: (type: string) => Promise<TVerification[][]>;
57
- updateStatusById: (_id: ObjectId | string, status: string, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
58
- };
59
-
60
- type TKeyValuePair<K extends string | number | symbol = string, V = any> = {
61
- [key in K]: V;
62
- };
63
-
64
- declare function useVerificationService(): {
65
- createForgetPassword: (email: string) => Promise<string>;
66
- createUserInvite: ({ email, metadata, }: {
67
- email: string;
68
- metadata: TKeyValuePair;
69
- }) => Promise<bson.ObjectId>;
70
- verify: (id: string) => Promise<TVerification>;
71
- getById: (id: string) => Promise<TVerification>;
72
- getVerifications: ({ search, page, status, type, email, limit, }?: {
73
- search?: string | undefined;
74
- page?: number | undefined;
75
- status?: string | undefined;
76
- type?: string | undefined;
77
- email?: string | undefined;
78
- limit?: number | undefined;
79
- }) => Promise<{
80
- items: any[];
81
- pages: number;
82
- pageRange: string;
83
- }>;
84
- cancelUserInvitation: (id: string) => Promise<void>;
85
- updateStatusById: (_id: string, status: string) => Promise<string>;
86
- signUp: ({ email, metadata, }: {
87
- email: string;
88
- metadata: TKeyValuePair;
89
- }) => Promise<bson.ObjectId>;
90
- };
91
-
92
- declare function useVerificationController(): {
93
- getVerifications: (req: Request, res: Response, next: NextFunction) => Promise<void>;
94
- createUserInvite: (req: Request, res: Response, next: NextFunction) => Promise<void>;
95
- createForgetPassword: (req: Request, res: Response, next: NextFunction) => Promise<void>;
96
- verify: (req: Request, res: Response, next: NextFunction) => Promise<void>;
97
- cancelUserInvitation: (req: Request, res: Response, next: NextFunction) => Promise<Response<any, Record<string, any>> | undefined>;
98
- };
99
-
100
- type TToken = {
101
- token: string;
102
- user: ObjectId;
103
- createdAt?: string;
104
- };
105
- declare class MToken implements TToken {
106
- token: string;
107
- user: ObjectId;
108
- createdAt?: string;
109
- constructor(value: TToken);
110
- }
111
-
112
- declare function useTokenRepo(): {
113
- createToken: ({ token, user }?: {
114
- token: string;
115
- user: string | ObjectId;
116
- }) => Promise<string>;
117
- getToken: (token: string) => Promise<mongodb.WithId<bson.Document> | null>;
118
- deleteToken: (token: string) => Promise<mongodb.DeleteResult>;
119
- };
120
-
121
- type TUserRole = {
122
- name: string;
123
- app: string;
124
- role: ObjectId | string;
125
- status?: string;
126
- };
127
- declare class MUserRole implements TUserRole {
128
- name: string;
129
- app: string;
130
- role: ObjectId | string;
131
- status?: string;
132
- constructor(value: TUserRole);
133
- }
134
- type TUser = {
135
- _id?: ObjectId;
136
- email: string;
137
- password: string;
138
- prefix?: string;
139
- firstName: string;
140
- middleName?: string;
141
- lastName: string;
142
- suffix?: string;
143
- birthMonth?: string;
144
- birthDay?: number;
145
- birthYear?: number;
146
- gender?: string;
147
- defaultOrg?: ObjectId;
148
- xenditCustomerId?: string;
149
- type?: string;
150
- status?: string;
151
- referralCode?: string;
152
- referredBy?: string;
153
- createdAt?: string;
154
- updatedAt?: string;
155
- deletedAt?: string;
156
- };
157
- declare class MUser implements TUser {
158
- _id?: ObjectId;
159
- email: string;
160
- password: string;
161
- prefix?: string;
162
- firstName: string;
163
- middleName?: string;
164
- lastName: string;
165
- suffix?: string;
166
- birthMonth?: string;
167
- birthDay?: number;
168
- birthYear?: number;
169
- gender?: string;
170
- roles?: TUserRole[];
171
- status?: string;
172
- type?: string;
173
- xenditCustomerId?: string | undefined;
174
- referralCode?: string;
175
- referredBy?: string;
176
- createdAt?: string;
177
- updatedAt?: string;
178
- deletedAt?: string;
179
- constructor(value: TUser);
180
- }
181
-
182
- declare function useUserRepo(): {
183
- createTextIndex: () => Promise<void>;
184
- createUniqueIndex: () => Promise<void>;
185
- createUser: (value: TUser, session?: ClientSession) => Promise<ObjectId>;
186
- getUserByEmail: (email: string) => Promise<TUser | null>;
187
- getUserById: (_id: string | ObjectId) => Promise<TUser | null>;
188
- getUsers: ({ search, page, limit, sort, status, type, }?: {
189
- search?: string | undefined;
190
- page?: number | undefined;
191
- limit?: number | undefined;
192
- sort?: {} | undefined;
193
- status?: string | undefined;
194
- type?: string | undefined;
195
- }) => Promise<{
196
- items: any[];
197
- pages: number;
198
- pageRange: string;
199
- }>;
200
- updatePassword: ({ _id, password }?: {
201
- _id: string | ObjectId;
202
- password: string;
203
- }, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
204
- updateName: ({ _id, firstName, lastName }?: {
205
- _id: string | ObjectId;
206
- firstName?: string | undefined;
207
- lastName?: string | undefined;
208
- }, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
209
- updateBirthday: ({ _id, month, day, year }?: {
210
- _id: string | ObjectId;
211
- month: string;
212
- day: number;
213
- year: number;
214
- }, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
215
- updateUserFieldById: ({ _id, field, value }?: {
216
- _id: string | ObjectId;
217
- field: string;
218
- value: string | ObjectId;
219
- }, session?: ClientSession) => Promise<string>;
220
- addUserRole: ({ _id, role }?: {
221
- _id: string | ObjectId;
222
- role: TUserRole;
223
- }, session?: ClientSession) => Promise<void>;
224
- getByEmailApp: (email: string, app: string) => Promise<TUser | null>;
225
- getUserByReferralCode: (referralCode: string) => Promise<TUser | null>;
226
- };
227
-
228
- declare function useUserService(): {
229
- getUserById: (id: string) => Promise<TUser | null>;
230
- getUsers: ({ search, page, status, type, limit, }?: {
231
- search?: string | undefined;
232
- page?: number | undefined;
233
- status?: string | undefined;
234
- type?: string | undefined;
235
- limit?: number | undefined;
236
- }) => Promise<{
237
- items: any[];
238
- pages: number;
239
- pageRange: string;
240
- }>;
241
- createUser: (value: Pick<TUser, "email" | "firstName" | "middleName" | "lastName" | "password" | "prefix" | "suffix">) => Promise<ObjectId>;
242
- resetPassword: (id: string, newPassword: string, passwordConfirmation: string) => Promise<string>;
243
- updateName: (_id: string, firstName?: string, lastName?: string) => Promise<string>;
244
- updateBirthday: (_id: string, month: string, day: number, year: number) => Promise<string>;
245
- updateUserFieldById: ({ _id, field, value }?: {
246
- _id: string;
247
- field: string;
248
- value: string;
249
- }) => Promise<string>;
250
- updateUserProfile: ({ file, user, previousProfile }?: {
251
- file: Express.Multer.File;
252
- user: string;
253
- previousProfile?: string | undefined;
254
- }) => Promise<string>;
255
- createUserByInvite: ({ id, firstName, lastName, password, }?: {
256
- id?: string | undefined;
257
- firstName?: string | undefined;
258
- lastName?: string | undefined;
259
- password?: string | undefined;
260
- }) => Promise<ObjectId>;
261
- createUserBySignUp: ({ id, firstName, lastName, password, }?: {
262
- id?: string | undefined;
263
- firstName?: string | undefined;
264
- lastName?: string | undefined;
265
- password?: string | undefined;
266
- }) => Promise<ObjectId>;
267
- createDefaultUser: () => Promise<string>;
268
- };
269
-
270
- declare function useUserController(): {
271
- getUsers: (req: Request, res: Response, next: NextFunction) => Promise<void>;
272
- getUserById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
273
- updateName: (req: Request, res: Response, next: NextFunction) => Promise<void>;
274
- updateBirthday: (req: Request, res: Response, next: NextFunction) => Promise<void>;
275
- updateUserFieldById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
276
- updateUserProfile: (req: Request, res: Response, next: NextFunction) => Promise<void>;
277
- createUserByVerification: (req: Request, res: Response, next: NextFunction) => Promise<void>;
278
- };
279
-
280
- declare function useAuthService(): {
281
- login: ({ email, password }?: {
282
- email: string;
283
- password: string;
284
- }) => Promise<{
285
- accessToken: string;
286
- refreshToken: string;
287
- id: bson.ObjectId | undefined;
288
- }>;
289
- refreshToken: (token: string) => Promise<string>;
290
- logout: (token: string) => Promise<string>;
291
- };
292
-
293
- declare function useAuthController(): {
294
- login: (req: Request, res: Response, next: NextFunction) => Promise<void>;
295
- refreshToken: (req: Request, res: Response, next: NextFunction) => Promise<void>;
296
- logout: (req: Request, res: Response, next: NextFunction) => Promise<void>;
297
- resetPassword: (req: Request, res: Response, next: NextFunction) => Promise<void>;
298
- signUp: (req: Request, res: Response, next: NextFunction) => Promise<void>;
299
- };
2
+ import { ObjectId, ClientSession } from 'mongodb';
3
+ import { Request, Response, NextFunction } from 'express';
300
4
 
301
- type TRole = {
5
+ type TRegion = {
302
6
  _id?: ObjectId;
303
- org?: string | ObjectId;
304
7
  name?: string;
305
- description?: string;
306
- permissions?: Array<string>;
307
- type?: string;
308
- status?: string;
309
- default?: boolean;
310
- createdBy?: string | ObjectId;
311
- createdAt?: string;
312
- updatedAt?: string;
313
- deletedAt?: string;
314
- };
315
- type TMiniRole = Pick<TRole, "name" | "permissions">;
316
- declare class MRole implements TRole {
317
- _id: ObjectId;
318
- org: string | ObjectId;
319
- name?: string;
320
- description?: string;
321
- permissions?: Array<string>;
322
- type?: string;
323
- status?: string;
324
- default?: boolean;
325
- createdBy?: string | ObjectId;
326
- createdAt?: string;
327
- updatedAt?: string;
328
- deletedAt?: string;
329
- constructor(value: TRole);
330
- }
331
-
332
- declare function useRoleRepo(): {
333
- createIndex: () => Promise<void>;
334
- createTextIndex: () => Promise<void>;
335
- createUniqueIndex: () => Promise<void>;
336
- addRole: (value: TRole, session?: ClientSession) => Promise<ObjectId>;
337
- getRoles: ({ search, page, limit, sort, type, org, }?: {
338
- search?: string | undefined;
339
- page?: number | undefined;
340
- limit?: number | undefined;
341
- sort?: any;
342
- type?: string | undefined;
343
- org?: string | ObjectId | undefined;
344
- }) => Promise<{
345
- items: any[];
346
- pages: number;
347
- pageRange: string;
348
- }>;
349
- getRoleByUserId: (value: ObjectId | string) => Promise<TRole | null>;
350
- getRoleById: (_id: ObjectId | string) => Promise<mongodb.WithId<bson.Document> | null>;
351
- getRoleByName: (name: string) => Promise<mongodb.WithId<bson.Document> | null>;
352
- updateRole: (_id: string | ObjectId, value: TMiniRole, session?: ClientSession) => Promise<string>;
353
- deleteRole: (_id: ObjectId | string, session?: ClientSession) => Promise<string>;
354
- updatePermissionsById: (_id: string | ObjectId, permissions: TRole["permissions"], session?: ClientSession) => Promise<string>;
355
- };
356
-
357
- type TFile = {
358
- _id?: ObjectId;
359
- name: string;
360
- type?: string;
361
- status?: string;
362
- createdAt: string;
363
- };
364
- declare class MFile implements TFile {
365
- _id?: ObjectId;
366
- name: string;
367
- type?: string;
368
- status?: string;
369
- createdAt: string;
370
- constructor(value: TFile);
371
- }
372
-
373
- declare function useFileRepo(): {
374
- createFile: (value: TFile, session?: ClientSession) => Promise<string>;
375
- deleteFileById: (_id: string | ObjectId, session?: ClientSession) => Promise<string>;
376
- getAllDraftedFiles: () => Promise<mongodb.WithId<bson.Document>[]>;
377
- };
378
-
379
- declare function useFileService(): {
380
- createFile: (value: Express.Multer.File) => Promise<string>;
381
- deleteFile: (id: string) => Promise<string>;
382
- deleteDraft: () => void;
383
- };
384
-
385
- declare function useFileController(): {
386
- upload: (req: Request, res: Response, next: NextFunction) => Promise<void>;
387
- deleteFile: (req: Request, res: Response, next: NextFunction) => Promise<void>;
388
- };
389
-
390
- declare function useRoleService(): {
391
- createRole: (value: Pick<TRole, "type" | "name" | "permissions">) => Promise<bson.ObjectId>;
392
- getRoles: ({ search, page, limit, type, org, }?: {
393
- search?: string | undefined;
394
- page?: number | undefined;
395
- limit?: number | undefined;
396
- type?: string | undefined;
397
- org?: string | undefined;
398
- }) => Promise<{
399
- items: any[];
400
- pages: number;
401
- pageRange: string;
402
- }>;
403
- getRoleByUserId: (value: string) => Promise<TRole | null>;
404
- getRoleById: (_id: string) => Promise<mongodb.WithId<bson.Document> | null>;
405
- getRoleByName: (name: string) => Promise<mongodb.WithId<bson.Document> | null>;
406
- updateRole: (_id: string, value: TMiniRole) => Promise<string>;
407
- deleteRole: (_id: string) => Promise<string>;
408
- };
409
-
410
- declare function useRoleController(): {
411
- createRole: (req: Request, res: Response, next: NextFunction) => Promise<void>;
412
- getRoles: (req: Request, res: Response, next: NextFunction) => Promise<void>;
413
- getRoleByUserId: (req: Request, res: Response, next: NextFunction) => Promise<void>;
414
- getRoleById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
415
- updateRole: (req: Request, res: Response, next: NextFunction) => Promise<void>;
416
- deleteRole: (req: Request, res: Response, next: NextFunction) => Promise<void>;
417
- updatePermissionsById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
418
- };
419
-
420
- type TEntity = {
421
- _id?: ObjectId;
422
- name: string;
423
- username: string;
424
- type: "strand" | "office" | "bureau" | "service" | "person";
425
- createdAt?: string;
426
- updatedAt?: string;
427
- deletedAt?: string;
428
- status?: string;
429
- };
430
- declare class MEntity implements TEntity {
431
- _id?: ObjectId;
432
- name: string;
433
- username: string;
434
- type: "strand" | "office" | "bureau" | "service" | "person";
435
- createdAt?: string;
436
- updatedAt?: string;
437
- deletedAt?: string;
438
- status?: string;
439
- constructor(value: TEntity);
440
- }
441
-
442
- declare function useEntityRepo(): {
443
- createIndex: () => Promise<void>;
444
- createUniqueIndex: () => Promise<void>;
445
- createEntity: (value: TEntity, session?: ClientSession) => Promise<string>;
446
- getEntities: ({ search, page, limit, sort, }?: {
447
- search?: string | undefined;
448
- page?: number | undefined;
449
- limit?: number | undefined;
450
- sort?: {} | undefined;
451
- }) => Promise<{
452
- items: any[];
453
- pages: number;
454
- pageRange: string;
455
- }>;
456
- updateEntityFieldById: ({ _id, field, value }?: {
457
- _id: string | ObjectId;
458
- field: string;
459
- value: string;
460
- }, session?: ClientSession) => Promise<string>;
461
- deleteEntity: (_id: string | ObjectId) => Promise<mongodb.UpdateResult<bson.Document>>;
462
- };
463
-
464
- declare function useEntityService(): {
465
- createEntity: (value: any) => Promise<string>;
466
- getEntities: (value: any) => Promise<{
467
- items: any[];
468
- pages: number;
469
- pageRange: string;
470
- }>;
471
- updateEntityFieldById: (_id: string, field: string, value: string) => Promise<string>;
472
- deleteEntity: (_id: string) => Promise<mongodb.UpdateResult<bson.Document>>;
473
- };
474
-
475
- declare function useEntityController(): {
476
- createEntity: (req: Request, res: Response, next: NextFunction) => Promise<void>;
477
- getEntities: (req: Request, res: Response, next: NextFunction) => Promise<void>;
478
- updateEntityFieldById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
479
- deleteEntity: (req: Request, res: Response, next: NextFunction) => Promise<void>;
480
- };
481
-
482
- type TWorkflowStep = {
483
- name: string;
484
- assignedTo?: string;
485
- nextStep?: string;
486
- };
487
- type TWorkflow = {
488
- _id?: ObjectId;
489
- name: string;
490
- steps: TWorkflowStep[];
491
- status?: string;
8
+ director?: ObjectId;
9
+ directorName?: string;
492
10
  createdAt?: string;
493
11
  updatedAt?: string;
494
12
  deletedAt?: string;
495
13
  };
496
- declare class MWorkflow implements TWorkflow {
497
- _id?: ObjectId;
498
- name: string;
499
- steps: TWorkflowStep[];
500
- status?: string;
501
- createdAt?: string;
502
- updatedAt?: string;
503
- deletedAt?: string;
504
- constructor(value: TWorkflow);
505
- }
14
+ declare const schemaRegion: Joi.ObjectSchema<any>;
15
+ declare function modelRegion(value: TRegion): TRegion;
506
16
 
507
- declare function useWorkflowRepo(): {
508
- createIndex: () => Promise<void>;
509
- createUniqueIndex: () => Promise<void>;
510
- createWorkflow: (value: TWorkflow) => Promise<string>;
511
- getWorkflows: ({ search, page, limit, sort, }?: {
17
+ declare function useRegionRepo(): {
18
+ createIndexes: () => Promise<void>;
19
+ add: (value: TRegion, session?: ClientSession) => Promise<ObjectId>;
20
+ getAll: ({ search, page, limit, sort, status, }?: {
512
21
  search?: string | undefined;
513
22
  page?: number | undefined;
514
23
  limit?: number | undefined;
515
24
  sort?: {} | undefined;
516
- }) => Promise<{
517
- items: any[];
518
- pages: number;
519
- pageRange: string;
520
- }>;
521
- getWorkflowById: (_id: string | ObjectId) => Promise<mongodb.WithId<bson.Document> | null>;
522
- updateWorkflowFieldById: ({ _id, field, value }?: {
523
- _id: string | ObjectId;
524
- field: string;
525
- value: string;
526
- }, session?: ClientSession) => Promise<string>;
527
- deleteWorkflow: (_id: string | ObjectId) => Promise<mongodb.UpdateResult<bson.Document>>;
528
- };
529
-
530
- declare function useWorkflowService(): {
531
- createWorkflow: (value: any) => Promise<string>;
532
- getWorkflows: ({ search, page, limit, sort, }?: {
533
- search?: string | undefined;
534
- page?: number | undefined;
535
- limit?: number | undefined;
536
- sort?: {} | undefined;
537
- }) => Promise<{
538
- items: any[];
539
- pages: number;
540
- pageRange: string;
541
- }>;
542
- getWorkflowById: (_id: string) => Promise<mongodb.WithId<bson.Document> | null>;
543
- updateWorkflowFieldById: (_id: string, field: string, value: string) => Promise<string>;
544
- deleteWorkflow: (_id: string) => Promise<mongodb.UpdateResult<bson.Document>>;
545
- };
546
-
547
- declare function useWorkflowController(): {
548
- createWorkflow: (req: Request, res: Response, next: NextFunction) => Promise<void>;
549
- getWorkflows: (req: Request, res: Response, next: NextFunction) => Promise<void>;
550
- getWorkflowById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
551
- updateWorkflowFieldById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
552
- deleteWorkflow: (req: Request, res: Response, next: NextFunction) => Promise<void>;
553
- };
554
-
555
- type TTentative = {
556
- month: string;
557
- day: number;
558
- };
559
- type TCapBldgAct = {
560
- _id?: ObjectId;
561
- title: string;
562
- subject: string;
563
- PMISActivityCode: string;
564
- type: string;
565
- strandMandateAddressed: string;
566
- objectives: Array<string>;
567
- withCPDUnits: boolean;
568
- completeStaffWorkReport: string;
569
- withATC: null | boolean;
570
- ATC: string;
571
- conceptNote: string;
572
- certOfFundAvailability: string;
573
- budgetProposal: string;
574
- targets: Array<string>;
575
- PRCFormsTemplate: string;
576
- HGDGTool: string;
577
- EXECOMLeadEndorsement: string;
578
- individualResults: Array<string>;
579
- organizationalResults: Array<string>;
580
- indicative: string;
581
- tentative: TTentative;
582
- tentativeOption: TTentative;
583
- tentativeYear: number;
584
- GADAttrRate: number;
585
- GADAttrRateAmount: number;
586
- NTPCO: {
587
- teaching: number;
588
- nonteaching: number;
589
- teachingRelated: number;
590
- };
591
- NTPRO: {
592
- teaching: number;
593
- nonteaching: number;
594
- teachingRelated: number;
595
- };
596
- NTPSDO: {
597
- teaching: number;
598
- nonteaching: number;
599
- teachingRelated: number;
600
- };
601
- NTPSchool: {
602
- teaching: number;
603
- nonteaching: number;
604
- teachingRelated: number;
605
- };
606
- withSkeletonWorkforce: null | boolean;
607
- skeletonWorkforce: string;
608
- roles: Array<string>;
609
- rolesRate: Array<number>;
610
- skills: Array<string>;
611
- skillsRate: Array<number>;
612
- resourceEfficiencyRate: Array<number>;
613
- AOOR: Array<number>;
614
- AOOS: Array<string>;
615
- status?: string;
616
- createdBy: ObjectId | string;
617
- createdAt?: string;
618
- updatedAt?: string;
619
- deletedAt?: string;
620
- };
621
- type TCapBldgActBasicInfo = Pick<TCapBldgAct, "_id" | "title" | "subject" | "PMISActivityCode" | "type" | "strandMandateAddressed" | "objectives" | "withCPDUnits" | "createdBy">;
622
- type TCapBldgActInitRevEval = Pick<TCapBldgAct, "_id" | "completeStaffWorkReport" | "withATC" | "ATC" | "conceptNote" | "certOfFundAvailability" | "budgetProposal" | "targets" | "PRCFormsTemplate" | "HGDGTool" | "EXECOMLeadEndorsement" | "individualResults" | "organizationalResults" | "indicative" | "tentative" | "tentativeOption" | "tentativeYear" | "GADAttrRate" | "GADAttrRateAmount" | "NTPCO" | "NTPRO" | "NTPSDO" | "NTPSchool" | "withSkeletonWorkforce" | "skeletonWorkforce">;
623
- type TCapBldgActAssmtCriteria = Pick<TCapBldgAct, "_id" | "roles" | "rolesRate" | "skills" | "skillsRate" | "resourceEfficiencyRate" | "AOOR" | "AOOS">;
624
- declare class MCapBldgAct implements TCapBldgAct {
625
- _id?: ObjectId;
626
- title: string;
627
- subject: string;
628
- PMISActivityCode: string;
629
- type: string;
630
- strandMandateAddressed: string;
631
- objectives: Array<string>;
632
- withCPDUnits: boolean;
633
- completeStaffWorkReport: string;
634
- withATC: null | boolean;
635
- ATC: string;
636
- conceptNote: string;
637
- certOfFundAvailability: string;
638
- budgetProposal: string;
639
- targets: Array<string>;
640
- PRCFormsTemplate: string;
641
- HGDGTool: string;
642
- EXECOMLeadEndorsement: string;
643
- individualResults: Array<string>;
644
- organizationalResults: Array<string>;
645
- indicative: string;
646
- tentative: TTentative;
647
- tentativeOption: TTentative;
648
- tentativeYear: number;
649
- GADAttrRate: number;
650
- GADAttrRateAmount: number;
651
- NTPCO: {
652
- teaching: number;
653
- nonteaching: number;
654
- teachingRelated: number;
655
- };
656
- NTPRO: {
657
- teaching: number;
658
- nonteaching: number;
659
- teachingRelated: number;
660
- };
661
- NTPSDO: {
662
- teaching: number;
663
- nonteaching: number;
664
- teachingRelated: number;
665
- };
666
- NTPSchool: {
667
- teaching: number;
668
- nonteaching: number;
669
- teachingRelated: number;
670
- };
671
- withSkeletonWorkforce: null | boolean;
672
- skeletonWorkforce: string;
673
- roles: Array<string>;
674
- rolesRate: Array<number>;
675
- skills: Array<string>;
676
- skillsRate: Array<number>;
677
- resourceEfficiencyRate: Array<number>;
678
- AOOR: Array<number>;
679
- AOOS: Array<string>;
680
- status?: string;
681
- createdBy: ObjectId | string;
682
- createdAt?: string;
683
- updatedAt?: string;
684
- deletedAt?: string;
685
- constructor(value: TCapBldgAct);
686
- }
687
-
688
- declare function useCapBldgActRepo(): {
689
- createIndex: () => Promise<void>;
690
- createTextIndex: () => Promise<void>;
691
- createCapBldgAct: (value: TCapBldgAct, session?: ClientSession) => Promise<string>;
692
- getById: (_id: string | ObjectId) => Promise<TCapBldgAct | null>;
693
- getCapBldgActs: (params?: {
694
- search?: string;
695
- page?: number;
696
- limit?: number;
697
- sort?: TKeyValuePair;
698
- status?: string;
699
- }) => Promise<ReturnType<typeof paginate>>;
700
- updateCapBldgActFieldById: (params: {
25
+ status?: string | undefined;
26
+ }) => Promise<Record<string, any>>;
27
+ getById: (_id: string | ObjectId) => Promise<TRegion>;
28
+ updateFieldById: ({ _id, field, value }?: {
701
29
  _id: string | ObjectId;
702
30
  field: string;
703
31
  value: string;
704
32
  }, session?: ClientSession) => Promise<string>;
705
- deleteCapBldgAct: (_id: string | ObjectId) => Promise<any>;
706
- updateCapBldgActBasicInfo: (params: {
707
- _id: string | ObjectId;
708
- value: TCapBldgActBasicInfo;
709
- }, session?: ClientSession) => Promise<void>;
710
- updateCapBldgActInitRevEval: (params: {
711
- _id: string | ObjectId;
712
- value: TCapBldgActInitRevEval;
713
- }, session?: ClientSession) => Promise<void>;
714
- updateCapBldgActAssmtCriteria: (params: {
715
- _id: string | ObjectId;
716
- value: TCapBldgActAssmtCriteria;
717
- }, session?: ClientSession) => Promise<void>;
718
- };
719
-
720
- declare function useCapBldgActService(): {
721
- createCapBldgAct: (value: TCapBldgAct) => Promise<string>;
722
- getCapBldgActs: ({ search, page, status, limit, }?: {
723
- search?: string | undefined;
724
- page?: number | undefined;
725
- status?: string | undefined;
726
- limit?: number | undefined;
727
- }) => Promise<{
728
- items: any[];
729
- pages: number;
730
- pageRange: string;
731
- }>;
732
- getById: (id: string) => Promise<TCapBldgAct | null>;
733
- updateCapBldgActFieldById: ({ _id, field, value, }?: {
734
- _id?: string | undefined;
735
- field?: string | undefined;
736
- value?: string | undefined;
737
- }) => Promise<string>;
738
- deleteCapBldgAct: (id: string) => Promise<any>;
739
- updateCapBldgActBasicInfo: (_id: string, value: TCapBldgActBasicInfo) => Promise<void>;
740
- updateCapBldgActInitRevEval: (_id: string, value: TCapBldgActInitRevEval) => Promise<void>;
741
- updateCapBldgActAssmtCriteria: (_id: string, value: TCapBldgActAssmtCriteria) => Promise<void>;
742
- uploadAttachment: (value: Express.Multer.File, id: string, field: string) => Promise<string>;
743
- deleteAttachment: (attachment: string, id: string, field: string) => Promise<string>;
33
+ deleteById: (_id: string | ObjectId) => Promise<string>;
34
+ getByName: (name: string) => Promise<TRegion>;
744
35
  };
745
36
 
746
- declare function useCapBldgActController(): {
747
- createCapBldgAct: (req: Request, res: Response, next: NextFunction) => Promise<void>;
748
- getCapBldgActs: (req: Request, res: Response, next: NextFunction) => Promise<void>;
37
+ declare function useRegionController(): {
38
+ add: (req: Request, res: Response, next: NextFunction) => Promise<void>;
39
+ getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
749
40
  getById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
750
- updateBasicInformation: (req: Request, res: Response, next: NextFunction) => Promise<void>;
751
- updateInitRevEval: (req: Request, res: Response, next: NextFunction) => Promise<void>;
752
- updateAssmtCriteria: (req: Request, res: Response, next: NextFunction) => Promise<void>;
753
- updateFieldById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
754
- uploadAttachment: (req: Request, res: Response, next: NextFunction) => Promise<void>;
755
- deleteAttachment: (req: Request, res: Response, next: NextFunction) => Promise<void>;
41
+ getByName: (req: Request, res: Response, next: NextFunction) => Promise<void>;
42
+ updateField: (req: Request, res: Response, next: NextFunction) => Promise<void>;
43
+ deleteById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
756
44
  };
757
45
 
758
- type TAttachment = Pick<TFile, "_id" | "name">;
759
- type TComment = {
760
- _id?: ObjectId;
761
- comment: string;
762
- type?: string;
763
- user: ObjectId | string;
764
- collection: string;
765
- document: ObjectId | string;
766
- createdAt?: string;
767
- updatedAt?: string;
768
- deletedAt?: string;
769
- };
770
- declare class MComment implements TComment {
46
+ type TDivision = {
771
47
  _id?: ObjectId;
772
- comment: string;
773
- type?: string;
774
- user: ObjectId | string;
775
- collection: string;
776
- document: ObjectId | string;
48
+ name?: string;
49
+ region?: ObjectId;
50
+ regionName?: string;
51
+ superintendent?: ObjectId;
52
+ superintendentName?: string;
777
53
  createdAt?: string;
778
54
  updatedAt?: string;
779
55
  deletedAt?: string;
780
- constructor(value: TComment);
781
- }
782
-
783
- declare function useCommentRepo(): {
784
- createIndex: () => Promise<void>;
785
- addComment: (value: TComment) => Promise<string>;
786
- getComments: ({ search, page, limit, sort, document }?: {
787
- search?: string | undefined;
788
- page?: number | undefined;
789
- limit?: number | undefined;
790
- sort?: TKeyValuePair<string, any> | undefined;
791
- document?: string | ObjectId | undefined;
792
- }) => Promise<{
793
- items: any[];
794
- pages: number;
795
- pageRange: string;
796
- }>;
797
- };
798
-
799
- declare function useCommentService(): {
800
- addComment: ({ comment, type, user, collection, document }?: {
801
- comment: string;
802
- type: string;
803
- user: string;
804
- collection: string;
805
- document: string;
806
- }) => Promise<string>;
807
- getComments: ({ page, document }?: {
808
- page?: number | undefined;
809
- document?: string | undefined;
810
- }) => Promise<{
811
- items: any[];
812
- pages: number;
813
- pageRange: string;
814
- }>;
815
- };
816
-
817
- declare function useCommentController(): {
818
- addComment: (req: Request, res: Response, next: NextFunction) => Promise<void>;
819
- getComments: (req: Request, res: Response, next: NextFunction) => Promise<void>;
820
56
  };
57
+ declare const schemaDivision: Joi.ObjectSchema<any>;
58
+ declare function modelDivision(value: TDivision): TDivision;
821
59
 
822
- type TBillingRecipient = {
823
- addedAt?: Date | string;
824
- email: string;
825
- };
826
- type TSubscription = {
827
- _id?: ObjectId;
828
- user?: ObjectId | string;
829
- org?: ObjectId | string;
830
- customerId: string;
831
- paymentMethodId: string;
832
- amount: number;
833
- description?: string;
834
- currency: string;
835
- promoCode?: string;
836
- type: string;
837
- paidSeats?: number;
838
- currentSeats?: number;
839
- maxSeats?: number;
840
- status?: string;
841
- billingCycle: "monthly" | "yearly";
842
- billingContacts?: Array<TBillingRecipient>;
843
- nextBillingDate?: Date;
844
- lastPaymentStatus?: string;
845
- failedAttempts?: number;
846
- createdAt?: string | Date;
847
- updatedAt?: string | Date;
848
- deletedAt?: string | Date;
849
- };
850
- declare function MSubscription(value: TSubscription): TSubscription;
851
-
852
- declare function useSubscriptionRepo(): {
853
- createIndex: () => Promise<void>;
854
- createUniqueIndex: () => Promise<void>;
855
- add: (value: TSubscription, session?: ClientSession) => Promise<ObjectId>;
856
- getById: (_id: string | ObjectId) => Promise<TSubscription | null>;
857
- getBySubscriptionId: (subscriptionId: string) => Promise<TSubscription | null>;
858
- getByUserId: (user: string | ObjectId) => Promise<TSubscription | null>;
859
- getSubscriptions: ({ search, page, limit, sort, status, }?: {
60
+ declare function useDivisionRepo(): {
61
+ createIndexes: () => Promise<void>;
62
+ add: (value: TDivision, session?: ClientSession) => Promise<ObjectId>;
63
+ getAll: ({ search, page, limit, sort, status, }?: {
860
64
  search?: string | undefined;
861
65
  page?: number | undefined;
862
66
  limit?: number | undefined;
863
67
  sort?: {} | undefined;
864
68
  status?: string | undefined;
865
- }) => Promise<{
866
- items: any[];
867
- pages: number;
868
- pageRange: string;
869
- }>;
870
- updateStatus: (_id: string | ObjectId, status: string) => Promise<string>;
871
- getByOrgId: (org: string | ObjectId) => Promise<TSubscription | null>;
872
- getByAffiliateUserId: (user: string | ObjectId) => Promise<TSubscription | null>;
873
- getDueSubscriptions: (BATCH_SIZE?: number) => Promise<TSubscription[]>;
874
- getFailedSubscriptions: (BATCH_SIZE?: number) => Promise<TSubscription[]>;
875
- processSuccessfulPayment: (value: Pick<TSubscription, "nextBillingDate"> & {
69
+ }) => Promise<Record<string, any>>;
70
+ getById: (_id: string | ObjectId) => Promise<TDivision>;
71
+ updateFieldById: ({ _id, field, value }?: {
876
72
  _id: string | ObjectId;
73
+ field: string;
74
+ value: string;
877
75
  }, session?: ClientSession) => Promise<string>;
878
- markSubscriptionAsFailed: ({ _id, failed }?: {
879
- _id: string | ObjectId;
880
- failed?: boolean | undefined;
881
- }, session?: ClientSession) => Promise<mongodb.UpdateResult<TSubscription>>;
882
- markSubscriptionAsCanceled: (_id: string | ObjectId, session?: ClientSession) => Promise<mongodb.UpdateResult<TSubscription>>;
883
- updateSeatsById: ({ _id, currentSeats, maxSeats, paidSeats, amount, status, nextBillingDate, }?: {
884
- _id: string | ObjectId;
885
- currentSeats: number;
886
- maxSeats: number;
887
- paidSeats?: number | undefined;
888
- amount: number;
889
- status?: string | undefined;
890
- nextBillingDate?: string | undefined;
891
- }, session?: ClientSession) => Promise<mongodb.UpdateResult<TSubscription>>;
892
- updateMaxSeatsById: ({ _id, seats }?: {
893
- _id: string | ObjectId;
894
- seats: number;
895
- }, session?: ClientSession) => Promise<mongodb.UpdateResult<TSubscription>>;
896
- updateStatusById: (_id: string | ObjectId, status: string, session?: ClientSession) => Promise<mongodb.UpdateResult<TSubscription>>;
897
- updatePromoCodeById: (_id: string | ObjectId, promoCode: string, session?: ClientSession) => Promise<mongodb.UpdateResult<TSubscription>>;
898
- updatePaymentMethodById: (_id: string | ObjectId, paymentMethodId: string, session?: ClientSession) => Promise<mongodb.UpdateResult<TSubscription>>;
899
- addBillingContactById: (_id: string | ObjectId, email: string) => Promise<string>;
900
- updateBillingContactByAddedAt: (_id: string | ObjectId, addedAt: string | Date, email: string) => Promise<string>;
901
- deleteBillingContactByAddedAt: (_id: string | ObjectId, addedAt: string | Date) => Promise<string>;
902
- };
903
-
904
- type TOrg = {
905
- _id?: ObjectId;
906
- name: string;
907
- description: string;
908
- type?: string;
909
- email?: string;
910
- contact?: string;
911
- busInst?: string;
912
- status?: string;
913
- xenditCustomerId?: string;
914
- createdAt?: string;
915
- updatedAt?: string;
916
- deletedAt?: string;
917
- };
918
- declare function MOrg(value: TOrg): TOrg;
919
-
920
- type TAddress = {
921
- _id?: ObjectId;
922
- type: string;
923
- user: ObjectId | string;
924
- org?: ObjectId | string;
925
- country: string;
926
- address: string;
927
- continuedAddress?: string;
928
- city: string;
929
- province: string;
930
- postalCode: string;
931
- taxId: string;
932
- };
933
- declare const addressSchema: Joi.ObjectSchema<any>;
934
- declare function MAddress(value: any): TAddress;
935
-
936
- declare function useSubscriptionService(): {
937
- getByUserId: (id: string) => Promise<any>;
938
- getStatusByUser: (user: string) => Promise<string>;
939
- createAffiliateSubscription: (value: {
940
- user: string;
941
- amount: number;
942
- currency: string;
943
- promoCode?: string | undefined;
944
- payment_method_id: string;
945
- payment_method_expiry_month?: string | undefined;
946
- payment_method_expiry_year?: string | undefined;
947
- payment_method_cvv?: string | undefined;
948
- payment_method_cardholder_name?: string | undefined;
949
- payment_method_channel: string;
950
- payment_method_type: string;
951
- customer_id: string;
952
- billingAddress: TAddress;
953
- }) => Promise<string>;
954
- createOrgSubscription: (value: {
955
- user: string;
956
- amount: number;
957
- currency: string;
958
- promoCode?: string | undefined;
959
- payment_method_id: string;
960
- payment_method_expiry_month?: string | undefined;
961
- payment_method_expiry_year?: string | undefined;
962
- payment_method_cvv?: string | undefined;
963
- payment_method_cardholder_name?: string | undefined;
964
- payment_method_channel: string;
965
- payment_method_type: string;
966
- customer_id: string;
967
- organization: TOrg;
968
- billingAddress: TAddress;
969
- seats: number;
970
- }) => Promise<{
971
- message: string;
972
- data: {
973
- org: string;
974
- };
975
- }>;
976
- processSubscriptions: (batchSize?: number, maxRetries?: number) => Promise<void>;
977
- updateSeatsById: (value: {
978
- subscriptionId: string;
979
- seats: number;
980
- amount: number;
981
- }) => Promise<void>;
76
+ deleteById: (_id: string | ObjectId) => Promise<string>;
77
+ getByName: (name: string) => Promise<TDivision>;
982
78
  };
983
79
 
984
- declare function useSubscriptionController(): {
80
+ declare function useDivisionController(): {
985
81
  add: (req: Request, res: Response, next: NextFunction) => Promise<void>;
986
- getByUserId: (req: Request, res: Response, next: NextFunction) => Promise<void>;
987
- getByOrgId: (req: Request, res: Response, next: NextFunction) => Promise<void>;
82
+ getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
988
83
  getById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
989
- getByAffiliateUserId: (req: Request, res: Response, next: NextFunction) => Promise<void>;
990
- getSubscriptions: (req: Request, res: Response, next: NextFunction) => Promise<void>;
991
- getSubscriptionStatus: (req: Request, res: Response, next: NextFunction) => Promise<void>;
992
- createAffiliateSubscription: (req: Request, res: Response, next: NextFunction) => Promise<void>;
993
- createOrgSubscription: (req: Request, res: Response, next: NextFunction) => Promise<void>;
994
- updateSubscriptionSeats: (req: Request, res: Response, next: NextFunction) => Promise<void>;
995
- updatePromoCodeById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
996
- updateStatusById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
997
- updatePaymentMethodById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
998
- addBillingContactById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
999
- updateBillingContactByAddedAt: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1000
- deleteBillingContactByAddedAt: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1001
- };
1002
-
1003
- declare const CustomerSchema: z.ZodEffects<z.ZodObject<{
1004
- reference_id: z.ZodString;
1005
- type: z.ZodEnum<["INDIVIDUAL", "BUSINESS"]>;
1006
- individual_detail: z.ZodOptional<z.ZodLazy<z.ZodObject<{
1007
- given_names: z.ZodString;
1008
- surname: z.ZodOptional<z.ZodString>;
1009
- nationality: z.ZodOptional<z.ZodString>;
1010
- place_of_birth: z.ZodOptional<z.ZodString>;
1011
- date_of_birth: z.ZodOptional<z.ZodString>;
1012
- gender: z.ZodOptional<z.ZodEnum<["MALE", "FEMALE", "OTHER"]>>;
1013
- employment: z.ZodOptional<z.ZodString>;
1014
- employer_name: z.ZodOptional<z.ZodString>;
1015
- nature_of_business: z.ZodOptional<z.ZodString>;
1016
- role_description: z.ZodOptional<z.ZodString>;
1017
- }, "strip", z.ZodTypeAny, {
1018
- given_names: string;
1019
- gender?: "MALE" | "FEMALE" | "OTHER" | undefined;
1020
- surname?: string | undefined;
1021
- nationality?: string | undefined;
1022
- place_of_birth?: string | undefined;
1023
- date_of_birth?: string | undefined;
1024
- employment?: string | undefined;
1025
- employer_name?: string | undefined;
1026
- nature_of_business?: string | undefined;
1027
- role_description?: string | undefined;
1028
- }, {
1029
- given_names: string;
1030
- gender?: "MALE" | "FEMALE" | "OTHER" | undefined;
1031
- surname?: string | undefined;
1032
- nationality?: string | undefined;
1033
- place_of_birth?: string | undefined;
1034
- date_of_birth?: string | undefined;
1035
- employment?: string | undefined;
1036
- employer_name?: string | undefined;
1037
- nature_of_business?: string | undefined;
1038
- role_description?: string | undefined;
1039
- }>>>;
1040
- business_detail: z.ZodOptional<z.ZodLazy<z.ZodObject<{
1041
- business_name: z.ZodString;
1042
- trading_name: z.ZodOptional<z.ZodString>;
1043
- business_type: z.ZodEnum<["CORPORATION", "SOLE_PROPRIETOR", "PARTNERSHIP", "COOPERATIVE", "TRUST", "NON_PROFIT", "GOVERNMENT"]>;
1044
- nature_of_business: z.ZodOptional<z.ZodString>;
1045
- business_domicile: z.ZodOptional<z.ZodString>;
1046
- date_of_registration: z.ZodOptional<z.ZodString>;
1047
- }, "strip", z.ZodTypeAny, {
1048
- business_name: string;
1049
- business_type: "CORPORATION" | "SOLE_PROPRIETOR" | "PARTNERSHIP" | "COOPERATIVE" | "TRUST" | "NON_PROFIT" | "GOVERNMENT";
1050
- nature_of_business?: string | undefined;
1051
- trading_name?: string | undefined;
1052
- business_domicile?: string | undefined;
1053
- date_of_registration?: string | undefined;
1054
- }, {
1055
- business_name: string;
1056
- business_type: "CORPORATION" | "SOLE_PROPRIETOR" | "PARTNERSHIP" | "COOPERATIVE" | "TRUST" | "NON_PROFIT" | "GOVERNMENT";
1057
- nature_of_business?: string | undefined;
1058
- trading_name?: string | undefined;
1059
- business_domicile?: string | undefined;
1060
- date_of_registration?: string | undefined;
1061
- }>>>;
1062
- mobile_number: z.ZodOptional<z.ZodString>;
1063
- phone_number: z.ZodOptional<z.ZodString>;
1064
- hashed_phone_number: z.ZodOptional<z.ZodString>;
1065
- email: z.ZodOptional<z.ZodString>;
1066
- addresses: z.ZodOptional<z.ZodArray<z.ZodObject<{
1067
- country: z.ZodString;
1068
- street_line1: z.ZodOptional<z.ZodString>;
1069
- street_line2: z.ZodOptional<z.ZodString>;
1070
- city: z.ZodOptional<z.ZodString>;
1071
- province_state: z.ZodOptional<z.ZodString>;
1072
- postal_code: z.ZodOptional<z.ZodString>;
1073
- category: z.ZodOptional<z.ZodEnum<["HOME", "WORK", "PROVINCIAL"]>>;
1074
- is_primary: z.ZodOptional<z.ZodBoolean>;
1075
- }, "strip", z.ZodTypeAny, {
1076
- country: string;
1077
- street_line1?: string | undefined;
1078
- street_line2?: string | undefined;
1079
- city?: string | undefined;
1080
- province_state?: string | undefined;
1081
- postal_code?: string | undefined;
1082
- category?: "HOME" | "WORK" | "PROVINCIAL" | undefined;
1083
- is_primary?: boolean | undefined;
1084
- }, {
1085
- country: string;
1086
- street_line1?: string | undefined;
1087
- street_line2?: string | undefined;
1088
- city?: string | undefined;
1089
- province_state?: string | undefined;
1090
- postal_code?: string | undefined;
1091
- category?: "HOME" | "WORK" | "PROVINCIAL" | undefined;
1092
- is_primary?: boolean | undefined;
1093
- }>, "many">>;
1094
- identity_accounts: z.ZodOptional<z.ZodArray<z.ZodObject<{
1095
- type: z.ZodEnum<["BANK_ACCOUNT", "EWALLET", "CREDIT_CARD", "PAY_LATER", "OTC", "QR_CODE", "SOCIAL_MEDIA"]>;
1096
- company: z.ZodOptional<z.ZodString>;
1097
- description: z.ZodOptional<z.ZodString>;
1098
- country: z.ZodOptional<z.ZodString>;
1099
- properties: z.ZodOptional<z.ZodAny>;
1100
- }, "strip", z.ZodTypeAny, {
1101
- type: "BANK_ACCOUNT" | "EWALLET" | "CREDIT_CARD" | "PAY_LATER" | "OTC" | "QR_CODE" | "SOCIAL_MEDIA";
1102
- country?: string | undefined;
1103
- company?: string | undefined;
1104
- description?: string | undefined;
1105
- properties?: any;
1106
- }, {
1107
- type: "BANK_ACCOUNT" | "EWALLET" | "CREDIT_CARD" | "PAY_LATER" | "OTC" | "QR_CODE" | "SOCIAL_MEDIA";
1108
- country?: string | undefined;
1109
- company?: string | undefined;
1110
- description?: string | undefined;
1111
- properties?: any;
1112
- }>, "many">>;
1113
- kyc_documents: z.ZodOptional<z.ZodArray<z.ZodObject<{
1114
- country: z.ZodString;
1115
- type: z.ZodEnum<["BIRTH_CERTIFICATE", "BANK_STATEMENT", "DRIVING_LICENSE", "IDENTITY_CARD", "PASSPORT", "VISA", "BUSINESS_REGISTRATION", "BUSINESS_LICENSE"]>;
1116
- sub_type: z.ZodOptional<z.ZodEnum<["NATIONAL_ID", "CONSULAR_ID", "VOTER_ID", "POSTAL_ID", "RESIDENCE_PERMIT", "TAX_ID", "STUDENT_ID", "MILITARY_ID", "MEDICAL_ID"]>>;
1117
- document_name: z.ZodOptional<z.ZodString>;
1118
- document_number: z.ZodOptional<z.ZodString>;
1119
- expires_at: z.ZodOptional<z.ZodString>;
1120
- holder_name: z.ZodOptional<z.ZodString>;
1121
- document_images: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1122
- }, "strip", z.ZodTypeAny, {
1123
- type: "BIRTH_CERTIFICATE" | "BANK_STATEMENT" | "DRIVING_LICENSE" | "IDENTITY_CARD" | "PASSPORT" | "VISA" | "BUSINESS_REGISTRATION" | "BUSINESS_LICENSE";
1124
- country: string;
1125
- sub_type?: "NATIONAL_ID" | "CONSULAR_ID" | "VOTER_ID" | "POSTAL_ID" | "RESIDENCE_PERMIT" | "TAX_ID" | "STUDENT_ID" | "MILITARY_ID" | "MEDICAL_ID" | undefined;
1126
- document_name?: string | undefined;
1127
- document_number?: string | undefined;
1128
- expires_at?: string | undefined;
1129
- holder_name?: string | undefined;
1130
- document_images?: string[] | undefined;
1131
- }, {
1132
- type: "BIRTH_CERTIFICATE" | "BANK_STATEMENT" | "DRIVING_LICENSE" | "IDENTITY_CARD" | "PASSPORT" | "VISA" | "BUSINESS_REGISTRATION" | "BUSINESS_LICENSE";
1133
- country: string;
1134
- sub_type?: "NATIONAL_ID" | "CONSULAR_ID" | "VOTER_ID" | "POSTAL_ID" | "RESIDENCE_PERMIT" | "TAX_ID" | "STUDENT_ID" | "MILITARY_ID" | "MEDICAL_ID" | undefined;
1135
- document_name?: string | undefined;
1136
- document_number?: string | undefined;
1137
- expires_at?: string | undefined;
1138
- holder_name?: string | undefined;
1139
- document_images?: string[] | undefined;
1140
- }>, "many">>;
1141
- description: z.ZodOptional<z.ZodString>;
1142
- date_of_registration: z.ZodOptional<z.ZodString>;
1143
- }, "strip", z.ZodTypeAny, {
1144
- type: "INDIVIDUAL" | "BUSINESS";
1145
- reference_id: string;
1146
- email?: string | undefined;
1147
- description?: string | undefined;
1148
- date_of_registration?: string | undefined;
1149
- individual_detail?: {
1150
- given_names: string;
1151
- gender?: "MALE" | "FEMALE" | "OTHER" | undefined;
1152
- surname?: string | undefined;
1153
- nationality?: string | undefined;
1154
- place_of_birth?: string | undefined;
1155
- date_of_birth?: string | undefined;
1156
- employment?: string | undefined;
1157
- employer_name?: string | undefined;
1158
- nature_of_business?: string | undefined;
1159
- role_description?: string | undefined;
1160
- } | undefined;
1161
- business_detail?: {
1162
- business_name: string;
1163
- business_type: "CORPORATION" | "SOLE_PROPRIETOR" | "PARTNERSHIP" | "COOPERATIVE" | "TRUST" | "NON_PROFIT" | "GOVERNMENT";
1164
- nature_of_business?: string | undefined;
1165
- trading_name?: string | undefined;
1166
- business_domicile?: string | undefined;
1167
- date_of_registration?: string | undefined;
1168
- } | undefined;
1169
- mobile_number?: string | undefined;
1170
- phone_number?: string | undefined;
1171
- hashed_phone_number?: string | undefined;
1172
- addresses?: {
1173
- country: string;
1174
- street_line1?: string | undefined;
1175
- street_line2?: string | undefined;
1176
- city?: string | undefined;
1177
- province_state?: string | undefined;
1178
- postal_code?: string | undefined;
1179
- category?: "HOME" | "WORK" | "PROVINCIAL" | undefined;
1180
- is_primary?: boolean | undefined;
1181
- }[] | undefined;
1182
- identity_accounts?: {
1183
- type: "BANK_ACCOUNT" | "EWALLET" | "CREDIT_CARD" | "PAY_LATER" | "OTC" | "QR_CODE" | "SOCIAL_MEDIA";
1184
- country?: string | undefined;
1185
- company?: string | undefined;
1186
- description?: string | undefined;
1187
- properties?: any;
1188
- }[] | undefined;
1189
- kyc_documents?: {
1190
- type: "BIRTH_CERTIFICATE" | "BANK_STATEMENT" | "DRIVING_LICENSE" | "IDENTITY_CARD" | "PASSPORT" | "VISA" | "BUSINESS_REGISTRATION" | "BUSINESS_LICENSE";
1191
- country: string;
1192
- sub_type?: "NATIONAL_ID" | "CONSULAR_ID" | "VOTER_ID" | "POSTAL_ID" | "RESIDENCE_PERMIT" | "TAX_ID" | "STUDENT_ID" | "MILITARY_ID" | "MEDICAL_ID" | undefined;
1193
- document_name?: string | undefined;
1194
- document_number?: string | undefined;
1195
- expires_at?: string | undefined;
1196
- holder_name?: string | undefined;
1197
- document_images?: string[] | undefined;
1198
- }[] | undefined;
1199
- }, {
1200
- type: "INDIVIDUAL" | "BUSINESS";
1201
- reference_id: string;
1202
- email?: string | undefined;
1203
- description?: string | undefined;
1204
- date_of_registration?: string | undefined;
1205
- individual_detail?: {
1206
- given_names: string;
1207
- gender?: "MALE" | "FEMALE" | "OTHER" | undefined;
1208
- surname?: string | undefined;
1209
- nationality?: string | undefined;
1210
- place_of_birth?: string | undefined;
1211
- date_of_birth?: string | undefined;
1212
- employment?: string | undefined;
1213
- employer_name?: string | undefined;
1214
- nature_of_business?: string | undefined;
1215
- role_description?: string | undefined;
1216
- } | undefined;
1217
- business_detail?: {
1218
- business_name: string;
1219
- business_type: "CORPORATION" | "SOLE_PROPRIETOR" | "PARTNERSHIP" | "COOPERATIVE" | "TRUST" | "NON_PROFIT" | "GOVERNMENT";
1220
- nature_of_business?: string | undefined;
1221
- trading_name?: string | undefined;
1222
- business_domicile?: string | undefined;
1223
- date_of_registration?: string | undefined;
1224
- } | undefined;
1225
- mobile_number?: string | undefined;
1226
- phone_number?: string | undefined;
1227
- hashed_phone_number?: string | undefined;
1228
- addresses?: {
1229
- country: string;
1230
- street_line1?: string | undefined;
1231
- street_line2?: string | undefined;
1232
- city?: string | undefined;
1233
- province_state?: string | undefined;
1234
- postal_code?: string | undefined;
1235
- category?: "HOME" | "WORK" | "PROVINCIAL" | undefined;
1236
- is_primary?: boolean | undefined;
1237
- }[] | undefined;
1238
- identity_accounts?: {
1239
- type: "BANK_ACCOUNT" | "EWALLET" | "CREDIT_CARD" | "PAY_LATER" | "OTC" | "QR_CODE" | "SOCIAL_MEDIA";
1240
- country?: string | undefined;
1241
- company?: string | undefined;
1242
- description?: string | undefined;
1243
- properties?: any;
1244
- }[] | undefined;
1245
- kyc_documents?: {
1246
- type: "BIRTH_CERTIFICATE" | "BANK_STATEMENT" | "DRIVING_LICENSE" | "IDENTITY_CARD" | "PASSPORT" | "VISA" | "BUSINESS_REGISTRATION" | "BUSINESS_LICENSE";
1247
- country: string;
1248
- sub_type?: "NATIONAL_ID" | "CONSULAR_ID" | "VOTER_ID" | "POSTAL_ID" | "RESIDENCE_PERMIT" | "TAX_ID" | "STUDENT_ID" | "MILITARY_ID" | "MEDICAL_ID" | undefined;
1249
- document_name?: string | undefined;
1250
- document_number?: string | undefined;
1251
- expires_at?: string | undefined;
1252
- holder_name?: string | undefined;
1253
- document_images?: string[] | undefined;
1254
- }[] | undefined;
1255
- }>, {
1256
- type: "INDIVIDUAL" | "BUSINESS";
1257
- reference_id: string;
1258
- email?: string | undefined;
1259
- description?: string | undefined;
1260
- date_of_registration?: string | undefined;
1261
- individual_detail?: {
1262
- given_names: string;
1263
- gender?: "MALE" | "FEMALE" | "OTHER" | undefined;
1264
- surname?: string | undefined;
1265
- nationality?: string | undefined;
1266
- place_of_birth?: string | undefined;
1267
- date_of_birth?: string | undefined;
1268
- employment?: string | undefined;
1269
- employer_name?: string | undefined;
1270
- nature_of_business?: string | undefined;
1271
- role_description?: string | undefined;
1272
- } | undefined;
1273
- business_detail?: {
1274
- business_name: string;
1275
- business_type: "CORPORATION" | "SOLE_PROPRIETOR" | "PARTNERSHIP" | "COOPERATIVE" | "TRUST" | "NON_PROFIT" | "GOVERNMENT";
1276
- nature_of_business?: string | undefined;
1277
- trading_name?: string | undefined;
1278
- business_domicile?: string | undefined;
1279
- date_of_registration?: string | undefined;
1280
- } | undefined;
1281
- mobile_number?: string | undefined;
1282
- phone_number?: string | undefined;
1283
- hashed_phone_number?: string | undefined;
1284
- addresses?: {
1285
- country: string;
1286
- street_line1?: string | undefined;
1287
- street_line2?: string | undefined;
1288
- city?: string | undefined;
1289
- province_state?: string | undefined;
1290
- postal_code?: string | undefined;
1291
- category?: "HOME" | "WORK" | "PROVINCIAL" | undefined;
1292
- is_primary?: boolean | undefined;
1293
- }[] | undefined;
1294
- identity_accounts?: {
1295
- type: "BANK_ACCOUNT" | "EWALLET" | "CREDIT_CARD" | "PAY_LATER" | "OTC" | "QR_CODE" | "SOCIAL_MEDIA";
1296
- country?: string | undefined;
1297
- company?: string | undefined;
1298
- description?: string | undefined;
1299
- properties?: any;
1300
- }[] | undefined;
1301
- kyc_documents?: {
1302
- type: "BIRTH_CERTIFICATE" | "BANK_STATEMENT" | "DRIVING_LICENSE" | "IDENTITY_CARD" | "PASSPORT" | "VISA" | "BUSINESS_REGISTRATION" | "BUSINESS_LICENSE";
1303
- country: string;
1304
- sub_type?: "NATIONAL_ID" | "CONSULAR_ID" | "VOTER_ID" | "POSTAL_ID" | "RESIDENCE_PERMIT" | "TAX_ID" | "STUDENT_ID" | "MILITARY_ID" | "MEDICAL_ID" | undefined;
1305
- document_name?: string | undefined;
1306
- document_number?: string | undefined;
1307
- expires_at?: string | undefined;
1308
- holder_name?: string | undefined;
1309
- document_images?: string[] | undefined;
1310
- }[] | undefined;
1311
- }, {
1312
- type: "INDIVIDUAL" | "BUSINESS";
1313
- reference_id: string;
1314
- email?: string | undefined;
1315
- description?: string | undefined;
1316
- date_of_registration?: string | undefined;
1317
- individual_detail?: {
1318
- given_names: string;
1319
- gender?: "MALE" | "FEMALE" | "OTHER" | undefined;
1320
- surname?: string | undefined;
1321
- nationality?: string | undefined;
1322
- place_of_birth?: string | undefined;
1323
- date_of_birth?: string | undefined;
1324
- employment?: string | undefined;
1325
- employer_name?: string | undefined;
1326
- nature_of_business?: string | undefined;
1327
- role_description?: string | undefined;
1328
- } | undefined;
1329
- business_detail?: {
1330
- business_name: string;
1331
- business_type: "CORPORATION" | "SOLE_PROPRIETOR" | "PARTNERSHIP" | "COOPERATIVE" | "TRUST" | "NON_PROFIT" | "GOVERNMENT";
1332
- nature_of_business?: string | undefined;
1333
- trading_name?: string | undefined;
1334
- business_domicile?: string | undefined;
1335
- date_of_registration?: string | undefined;
1336
- } | undefined;
1337
- mobile_number?: string | undefined;
1338
- phone_number?: string | undefined;
1339
- hashed_phone_number?: string | undefined;
1340
- addresses?: {
1341
- country: string;
1342
- street_line1?: string | undefined;
1343
- street_line2?: string | undefined;
1344
- city?: string | undefined;
1345
- province_state?: string | undefined;
1346
- postal_code?: string | undefined;
1347
- category?: "HOME" | "WORK" | "PROVINCIAL" | undefined;
1348
- is_primary?: boolean | undefined;
1349
- }[] | undefined;
1350
- identity_accounts?: {
1351
- type: "BANK_ACCOUNT" | "EWALLET" | "CREDIT_CARD" | "PAY_LATER" | "OTC" | "QR_CODE" | "SOCIAL_MEDIA";
1352
- country?: string | undefined;
1353
- company?: string | undefined;
1354
- description?: string | undefined;
1355
- properties?: any;
1356
- }[] | undefined;
1357
- kyc_documents?: {
1358
- type: "BIRTH_CERTIFICATE" | "BANK_STATEMENT" | "DRIVING_LICENSE" | "IDENTITY_CARD" | "PASSPORT" | "VISA" | "BUSINESS_REGISTRATION" | "BUSINESS_LICENSE";
1359
- country: string;
1360
- sub_type?: "NATIONAL_ID" | "CONSULAR_ID" | "VOTER_ID" | "POSTAL_ID" | "RESIDENCE_PERMIT" | "TAX_ID" | "STUDENT_ID" | "MILITARY_ID" | "MEDICAL_ID" | undefined;
1361
- document_name?: string | undefined;
1362
- document_number?: string | undefined;
1363
- expires_at?: string | undefined;
1364
- holder_name?: string | undefined;
1365
- document_images?: string[] | undefined;
1366
- }[] | undefined;
1367
- }>;
1368
- type TCustomer = z.infer<typeof CustomerSchema>;
1369
-
1370
- declare function useXenditService(): {
1371
- createCustomer: (value: TCustomer) => Promise<any>;
1372
- linkPaymentMethodEWallet: ({ customerId, type, success_return_url, failure_return_url, cancel_return_url, }?: {
1373
- customerId?: string | undefined;
1374
- type?: string | undefined;
1375
- success_return_url?: string | undefined;
1376
- failure_return_url?: string | undefined;
1377
- cancel_return_url?: string | undefined;
1378
- }) => Promise<any>;
1379
- initGCashLinkingAndPaymentRequest: ({ amount, currency, countryCode, customerId, success_return_url, failure_return_url, }?: {
1380
- amount?: number | undefined;
1381
- currency?: string | undefined;
1382
- countryCode?: string | undefined;
1383
- customerId?: string | undefined;
1384
- success_return_url?: string | undefined;
1385
- failure_return_url?: string | undefined;
1386
- }) => Promise<any>;
1387
- initSubscription: ({ customer, currency, amount, paymentMethod, description, interval, seats, }?: {
1388
- customer?: string | undefined;
1389
- currency?: string | undefined;
1390
- amount?: number | undefined;
1391
- paymentMethod?: string | undefined;
1392
- description?: string | undefined;
1393
- interval?: string | undefined;
1394
- seats?: number | undefined;
1395
- }) => Promise<any>;
1396
- linkPaymentMethodCard: ({ success_return_url, failure_return_url, card_number, expiry_month, expiry_year, cvv, cardholder_name, currency, }?: {
1397
- success_return_url?: string | undefined;
1398
- failure_return_url?: string | undefined;
1399
- card_number?: string | undefined;
1400
- expiry_month?: string | undefined;
1401
- expiry_year?: string | undefined;
1402
- cvv?: string | undefined;
1403
- cardholder_name?: string | undefined;
1404
- currency?: string | undefined;
1405
- }) => Promise<any>;
1406
- eWalletSubsequentPayment: ({ amount, currency, payment_method_id, customer_id, description, }?: {
1407
- amount?: number | undefined;
1408
- currency?: string | undefined;
1409
- payment_method_id?: string | undefined;
1410
- customer_id?: string | undefined;
1411
- description?: string | undefined;
1412
- }) => Promise<any>;
1413
- checkSubscriptionStatus: (subscriptionId: string) => Promise<string>;
1414
- cancelSubscription: (subscriptionId: string) => Promise<string>;
1415
- getSubscription: (id: string) => Promise<any>;
1416
- getSubscriptionCycles: (id: string) => Promise<any>;
1417
- pay: (value: {
1418
- amount: number;
1419
- currency: string;
1420
- payment_method_id: string;
1421
- customer_id: string;
1422
- description?: string;
1423
- metadata?: Record<string, any>;
1424
- }) => Promise<any>;
1425
- getPaymentMethodById: (id: string) => Promise<any>;
1426
- getCustomerById: (id: string) => Promise<any>;
1427
- eWalletLinkOnly: (value: Record<string, any>) => Promise<any>;
1428
- directDebitLinkOnly: (value: Record<string, any>) => Promise<any>;
1429
- cardLinkOnly: (value: Record<string, any>) => Promise<any>;
84
+ getByName: (req: Request, res: Response, next: NextFunction) => Promise<void>;
85
+ updateField: (req: Request, res: Response, next: NextFunction) => Promise<void>;
86
+ deleteById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1430
87
  };
1431
88
 
1432
- type TPaymentMethod$1 = {
89
+ type TSchool = {
1433
90
  _id?: ObjectId;
1434
- user?: ObjectId | string;
1435
- org?: ObjectId | string;
1436
- name: string;
1437
- description?: string;
1438
- type: string;
1439
- number: string;
1440
- month_expiry?: string;
1441
- year_expiry?: string;
1442
- cvv?: string;
1443
- paymentId: string;
1444
- customerId?: string;
1445
- status?: string;
91
+ name?: string;
92
+ region?: ObjectId;
93
+ regionName?: string;
94
+ division?: ObjectId;
95
+ divisionName?: string;
96
+ principal?: ObjectId;
97
+ principalName?: string;
1446
98
  createdAt?: string;
99
+ updatedAt?: string;
1447
100
  deletedAt?: string;
1448
101
  };
1449
- declare function MPaymentMethod(value: TPaymentMethod$1): TPaymentMethod$1;
1450
-
1451
- declare function usePaymentMethodRepo(): {
1452
- createIndex: () => Promise<void>;
1453
- add: (value: TPaymentMethod$1, session?: ClientSession) => Promise<string>;
1454
- getByUser: (user: string | ObjectId) => Promise<bson.Document[]>;
1455
- getByOrg: (org: string | ObjectId) => Promise<bson.Document[]>;
1456
- deleteById: (_id: string | ObjectId) => Promise<string>;
1457
- createUniqueIndex: () => Promise<void>;
1458
- getByPaymentMethodId: (paymentMethodId: string | ObjectId) => Promise<TPaymentMethod$1 | null>;
1459
- };
1460
-
1461
- declare function usePaymentMethodService(): {
1462
- linkEWallet: ({ customer_id, type, success_return_url, failure_return_url, cancel_return_url, }?: {
1463
- customer_id?: string | undefined;
1464
- type?: string | undefined;
1465
- success_return_url?: string | undefined;
1466
- failure_return_url?: string | undefined;
1467
- cancel_return_url?: string | undefined;
1468
- }) => Promise<{
1469
- paymentMethod: any;
1470
- actions: any;
1471
- }>;
1472
- linkCard: ({ user, type, success_return_url, failure_return_url, card_number, expiry_month, expiry_year, cvv, cardholder_name, currency, }?: {
1473
- user?: string | undefined;
1474
- type?: string | undefined;
1475
- success_return_url?: string | undefined;
1476
- failure_return_url?: string | undefined;
1477
- card_number?: string | undefined;
1478
- expiry_month?: string | undefined;
1479
- expiry_year?: string | undefined;
1480
- cvv?: string | undefined;
1481
- cardholder_name?: string | undefined;
1482
- currency?: string | undefined;
1483
- }) => Promise<any>;
1484
- };
1485
-
1486
- declare function usePaymentMethodController(): {
1487
- linkEWallet: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1488
- linkCard: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1489
- getByUser: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1490
- getByOrg: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1491
- linkOnly: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1492
- getPaymentMethodById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1493
- };
1494
-
1495
- declare function useAddressRepo(): {
1496
- createIndex: () => Promise<void>;
1497
- add: (value: TAddress, session?: ClientSession) => Promise<ObjectId>;
1498
- getByUserId: (user: string | ObjectId) => Promise<TAddress | null>;
1499
- getByOrgId: (org: string | ObjectId) => Promise<TAddress | null>;
1500
- updateById: (_id: string | ObjectId, value: Pick<TAddress, "country" | "city" | "address" | "continuedAddress" | "province" | "postalCode" | "taxId">, session?: ClientSession) => Promise<string>;
1501
- };
102
+ declare const schemaSchool: Joi.ObjectSchema<any>;
103
+ declare function modelSchool(value: TSchool): TSchool;
1502
104
 
1503
- declare function useAddressController(): {
1504
- add: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1505
- getByUserId: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1506
- getByOrgId: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1507
- updateById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1508
- };
1509
-
1510
- declare function useOrgRepo(): {
1511
- createIndex: () => Promise<void>;
1512
- createTextIndex: () => Promise<void>;
1513
- createUniqueIndex: () => Promise<void>;
1514
- add: (value: TOrg, session?: ClientSession) => Promise<ObjectId>;
1515
- getOrgs: ({ search, page, limit, sort, status, }?: {
105
+ declare function useSchoolRepo(): {
106
+ createIndexes: () => Promise<void>;
107
+ add: (value: TSchool, session?: ClientSession) => Promise<ObjectId>;
108
+ getAll: ({ search, page, limit, sort, status, }?: {
1516
109
  search?: string | undefined;
1517
110
  page?: number | undefined;
1518
111
  limit?: number | undefined;
1519
112
  sort?: {} | undefined;
1520
113
  status?: string | undefined;
1521
- }) => Promise<{
1522
- items: any[];
1523
- pages: number;
1524
- pageRange: string;
1525
- }>;
1526
- getById: (_id: string | ObjectId) => Promise<TOrg>;
114
+ }) => Promise<Record<string, any>>;
115
+ getById: (_id: string | ObjectId) => Promise<TSchool>;
1527
116
  updateFieldById: ({ _id, field, value }?: {
1528
117
  _id: string | ObjectId;
1529
118
  field: string;
1530
119
  value: string;
1531
120
  }, session?: ClientSession) => Promise<string>;
1532
121
  deleteById: (_id: string | ObjectId) => Promise<string>;
1533
- getByName: (name: string) => Promise<TOrg>;
1534
- };
1535
-
1536
- declare function useOrgService(): {
1537
- createOrg: ({ user, name, description }?: {
1538
- user?: string | undefined;
1539
- name?: string | undefined;
1540
- description?: string | undefined;
1541
- }) => Promise<string>;
122
+ getByName: (name: string) => Promise<TSchool>;
1542
123
  };
1543
124
 
1544
- declare function useOrgController(): {
1545
- createOrg: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1546
- getOrgsByUserId: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1547
- getByName: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1548
- };
1549
-
1550
- type TMember = {
1551
- _id?: ObjectId;
1552
- org?: string | ObjectId;
1553
- orgName?: string;
1554
- name: string;
1555
- user: string | ObjectId;
1556
- role: string | ObjectId;
1557
- type: string;
1558
- status?: string;
1559
- createdAt?: string;
1560
- updatedAt?: string;
1561
- deletedAt?: string;
1562
- };
1563
- declare function MMember(value: TMember): TMember;
1564
-
1565
- declare function useMemberRepo(): {
1566
- createIndex: () => Promise<void>;
1567
- createUniqueIndex: () => Promise<void>;
1568
- createTextIndex: () => Promise<void>;
1569
- add: (value: TMember, session?: ClientSession) => Promise<string>;
1570
- getById: (_id: string | ObjectId) => Promise<TMember | null>;
1571
- getAll: ({ search, limit, page, user, org, type, status }?: {
1572
- search: string;
1573
- limit: number;
1574
- page: number;
1575
- user?: string | ObjectId | undefined;
1576
- org?: string | ObjectId | undefined;
1577
- type: string;
1578
- status: string;
1579
- }) => Promise<{
1580
- items: any[];
1581
- pages: number;
1582
- pageRange: string;
1583
- }>;
1584
- getOrgsByUserId: ({ search, page, limit, sort, user, status, }?: {
1585
- user: string | ObjectId;
1586
- page: number;
1587
- limit?: number | undefined;
1588
- search?: string | undefined;
1589
- sort?: Record<string, number> | undefined;
1590
- status?: string | undefined;
1591
- }) => Promise<{
1592
- items: any[];
1593
- pages: number;
1594
- pageRange: string;
1595
- }>;
1596
- updateStatusByUserId: (user: string | ObjectId, status: string) => Promise<string>;
1597
- updateName: (value: Pick<TMember, "name" | "user">, session?: ClientSession) => Promise<string>;
1598
- getByUserId: (user: string | ObjectId) => Promise<TMember | null>;
1599
- getOrgsByMembership: ({ search, limit, page, user }?: {
1600
- search: string;
1601
- limit: number;
1602
- page: number;
1603
- user?: string | ObjectId | undefined;
1604
- }) => Promise<{
1605
- items: any[];
1606
- pages: number;
1607
- pageRange: string;
1608
- }>;
1609
- countByOrg: (org: string | ObjectId) => Promise<number>;
1610
- };
1611
-
1612
- declare function useMemberController(): {
1613
- getByUserId: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1614
- getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1615
- getOrgsByMembership: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1616
- };
1617
-
1618
- declare const schema: Joi.ObjectSchema<any>;
1619
-
1620
- type TPromoType = "tiered" | "fixed";
1621
- type TPromoTier = {
1622
- min: number;
1623
- max: number;
1624
- price: number;
1625
- };
1626
- type TPromoCode = {
1627
- _id?: ObjectId;
1628
- code: string;
1629
- description?: string;
1630
- type: TPromoType;
1631
- tiers?: TPromoTier[];
1632
- fixed_rate?: number;
1633
- appliesTo?: string;
1634
- createdAt?: string;
1635
- expiresAt?: string;
1636
- assignedTo?: string | ObjectId;
1637
- status?: "active" | "expired" | "disabled";
1638
- };
1639
- declare function MPromoCode(data: TPromoCode): TPromoCode;
1640
-
1641
- declare function usePromoCodeRepo(): {
1642
- createIndex: () => Promise<void>;
1643
- createUniqueIndex: () => Promise<void>;
1644
- add: (value: TPromoCode) => Promise<void>;
1645
- getByCode: (code: string, type?: string, assigned?: boolean | null) => Promise<TPromoCode | null>;
1646
- getPromoCodes: ({ search, page, limit, sort, status, type, }?: {
1647
- search?: string | undefined;
1648
- page?: number | undefined;
1649
- limit?: number | undefined;
1650
- sort?: {} | undefined;
1651
- status?: string | undefined;
1652
- type?: string | undefined;
1653
- }) => Promise<{
1654
- items: any[];
1655
- pages: number;
1656
- pageRange: string;
1657
- }>;
1658
- assignByUserId: ({ user, code }?: {
1659
- user: string | ObjectId;
1660
- code: string;
1661
- }, session?: ClientSession) => Promise<void>;
1662
- getById: (_id: string | ObjectId) => Promise<TPromoCode | null>;
1663
- };
1664
-
1665
- declare function usePromoCodeController(): {
125
+ declare function useSchoolController(): {
1666
126
  add: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1667
- getByCode: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1668
- getPromoCodes: (req: Request, res: Response, next: NextFunction) => Promise<void>;
127
+ getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1669
128
  getById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
129
+ getByName: (req: Request, res: Response, next: NextFunction) => Promise<void>;
130
+ updateField: (req: Request, res: Response, next: NextFunction) => Promise<void>;
131
+ deleteById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1670
132
  };
1671
133
 
1672
- type TOrderMetadata = {
1673
- subscriptionId?: ObjectId | string;
1674
- cycle?: number;
1675
- seats?: number;
1676
- promoCode?: string;
1677
- };
1678
- type TOrder = {
1679
- _id?: ObjectId;
1680
- payment?: string;
1681
- user?: ObjectId | string;
1682
- org?: ObjectId | string;
1683
- type: string;
1684
- amount: number;
1685
- currency: string;
1686
- description?: string;
1687
- metadata?: TOrderMetadata;
1688
- status?: string;
1689
- createdAt?: string;
1690
- updatedAt?: string;
1691
- deletedAt?: string;
1692
- };
1693
- declare function MOrder(value: TOrder): TOrder;
1694
-
1695
- declare function useOrderRepo(): {
1696
- createIndex: () => void;
1697
- add: (value: TOrder, session?: ClientSession) => void;
1698
- getOrders: ({ search, page, limit, sort, status, type, id, }?: {
1699
- search?: string | undefined;
1700
- page?: number | undefined;
1701
- limit?: number | undefined;
1702
- sort?: {} | undefined;
1703
- status?: string | undefined;
1704
- type?: string | undefined;
1705
- id?: string | undefined;
1706
- }) => Promise<{
1707
- items: any[];
1708
- pages: number;
1709
- pageRange: string;
1710
- }>;
1711
- };
1712
-
1713
- declare function useOrderController(): {
1714
- getOrders: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1715
- };
1716
-
1717
- declare const TInvoice: z.ZodObject<{
1718
- _id: z.ZodEffects<z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodType<ObjectId, z.ZodTypeDef, ObjectId>]>>, ObjectId | undefined, string | ObjectId | undefined>;
1719
- invoiceNumber: z.ZodString;
1720
- type: z.ZodDefault<z.ZodEnum<["organization-subscription", "affiliate-subscription", "one-time-payment", "other"]>>;
1721
- amount: z.ZodNumber;
1722
- dueDate: z.ZodDate;
1723
- status: z.ZodDefault<z.ZodEnum<["pending", "paid", "overdue", "cancelled"]>>;
1724
- items: z.ZodArray<z.ZodObject<{
1725
- description: z.ZodString;
1726
- unitPrice: z.ZodNumber;
1727
- quantity: z.ZodNumber;
1728
- seats: z.ZodOptional<z.ZodNumber>;
1729
- total: z.ZodNumber;
1730
- }, "strip", z.ZodTypeAny, {
1731
- description: string;
1732
- unitPrice: number;
1733
- quantity: number;
1734
- total: number;
1735
- seats?: number | undefined;
1736
- }, {
1737
- description: string;
1738
- unitPrice: number;
1739
- quantity: number;
1740
- total: number;
1741
- seats?: number | undefined;
1742
- }>, "many">;
1743
- metadata: z.ZodEffects<z.ZodOptional<z.ZodDefault<z.ZodObject<{
1744
- userId: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodType<ObjectId, z.ZodTypeDef, ObjectId>]>>;
1745
- orgId: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodType<ObjectId, z.ZodTypeDef, ObjectId>]>>;
1746
- billingCycle: z.ZodOptional<z.ZodEnum<["monthly", "yearly", "quarterly"]>>;
1747
- subscriptionId: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodType<ObjectId, z.ZodTypeDef, ObjectId>]>>;
1748
- currency: z.ZodOptional<z.ZodDefault<z.ZodString>>;
1749
- description: z.ZodOptional<z.ZodString>;
1750
- }, "strip", z.ZodTypeAny, {
1751
- description?: string | undefined;
1752
- userId?: string | ObjectId | undefined;
1753
- orgId?: string | ObjectId | undefined;
1754
- currency?: string | undefined;
1755
- subscriptionId?: string | ObjectId | undefined;
1756
- billingCycle?: "monthly" | "yearly" | "quarterly" | undefined;
1757
- }, {
1758
- description?: string | undefined;
1759
- userId?: string | ObjectId | undefined;
1760
- orgId?: string | ObjectId | undefined;
1761
- currency?: string | undefined;
1762
- subscriptionId?: string | ObjectId | undefined;
1763
- billingCycle?: "monthly" | "yearly" | "quarterly" | undefined;
1764
- }>>>, {
1765
- description?: string | undefined;
1766
- userId?: string | ObjectId | undefined;
1767
- orgId?: string | ObjectId | undefined;
1768
- currency?: string | undefined;
1769
- subscriptionId?: string | ObjectId | undefined;
1770
- billingCycle?: "monthly" | "yearly" | "quarterly" | undefined;
1771
- } | undefined, {
1772
- description?: string | undefined;
1773
- userId?: string | ObjectId | undefined;
1774
- orgId?: string | ObjectId | undefined;
1775
- currency?: string | undefined;
1776
- subscriptionId?: string | ObjectId | undefined;
1777
- billingCycle?: "monthly" | "yearly" | "quarterly" | undefined;
1778
- } | undefined>;
1779
- createdAt: z.ZodOptional<z.ZodDefault<z.ZodDate>>;
1780
- updatedAt: z.ZodOptional<z.ZodDate>;
1781
- }, "strip", z.ZodTypeAny, {
1782
- type: "organization-subscription" | "affiliate-subscription" | "one-time-payment" | "other";
1783
- status: "pending" | "cancelled" | "paid" | "overdue";
1784
- amount: number;
1785
- invoiceNumber: string;
1786
- dueDate: Date;
1787
- items: {
1788
- description: string;
1789
- unitPrice: number;
1790
- quantity: number;
1791
- total: number;
1792
- seats?: number | undefined;
1793
- }[];
1794
- _id?: ObjectId | undefined;
1795
- updatedAt?: Date | undefined;
1796
- metadata?: {
1797
- description?: string | undefined;
1798
- userId?: string | ObjectId | undefined;
1799
- orgId?: string | ObjectId | undefined;
1800
- currency?: string | undefined;
1801
- subscriptionId?: string | ObjectId | undefined;
1802
- billingCycle?: "monthly" | "yearly" | "quarterly" | undefined;
1803
- } | undefined;
1804
- createdAt?: Date | undefined;
1805
- }, {
1806
- amount: number;
1807
- invoiceNumber: string;
1808
- dueDate: Date;
1809
- items: {
1810
- description: string;
1811
- unitPrice: number;
1812
- quantity: number;
1813
- total: number;
1814
- seats?: number | undefined;
1815
- }[];
1816
- type?: "organization-subscription" | "affiliate-subscription" | "one-time-payment" | "other" | undefined;
1817
- status?: "pending" | "cancelled" | "paid" | "overdue" | undefined;
1818
- _id?: string | ObjectId | undefined;
1819
- updatedAt?: Date | undefined;
1820
- metadata?: {
1821
- description?: string | undefined;
1822
- userId?: string | ObjectId | undefined;
1823
- orgId?: string | ObjectId | undefined;
1824
- currency?: string | undefined;
1825
- subscriptionId?: string | ObjectId | undefined;
1826
- billingCycle?: "monthly" | "yearly" | "quarterly" | undefined;
1827
- } | undefined;
1828
- createdAt?: Date | undefined;
1829
- }>;
1830
- type TInvoice = z.infer<typeof TInvoice>;
1831
- declare function useInvoiceModel(db: Db): {
1832
- createInvoice: (data: TInvoice) => TInvoice;
1833
- collection: Collection<{
1834
- type: "organization-subscription" | "affiliate-subscription" | "one-time-payment" | "other";
1835
- status: "pending" | "cancelled" | "paid" | "overdue";
1836
- amount: number;
1837
- invoiceNumber: string;
1838
- dueDate: Date;
1839
- items: {
1840
- description: string;
1841
- unitPrice: number;
1842
- quantity: number;
1843
- total: number;
1844
- seats?: number | undefined;
1845
- }[];
1846
- _id?: ObjectId | undefined;
1847
- updatedAt?: Date | undefined;
1848
- metadata?: {
1849
- description?: string | undefined;
1850
- userId?: string | ObjectId | undefined;
1851
- orgId?: string | ObjectId | undefined;
1852
- currency?: string | undefined;
1853
- subscriptionId?: string | ObjectId | undefined;
1854
- billingCycle?: "monthly" | "yearly" | "quarterly" | undefined;
1855
- } | undefined;
1856
- createdAt?: Date | undefined;
1857
- }>;
1858
- };
1859
-
1860
- declare function useInvoiceRepo(): {
1861
- createIndex: () => Promise<void>;
1862
- createUniqueIndex: () => Promise<void>;
1863
- add: (value: TInvoice, session?: ClientSession) => Promise<void>;
1864
- getByDueDate: (dueDate: Date, status?: TInvoice["status"]) => Promise<{
1865
- type: "organization-subscription" | "affiliate-subscription" | "one-time-payment" | "other";
1866
- status: "pending" | "cancelled" | "paid" | "overdue";
1867
- amount: number;
1868
- invoiceNumber: string;
1869
- dueDate: Date;
1870
- items: {
1871
- description: string;
1872
- unitPrice: number;
1873
- quantity: number;
1874
- total: number;
1875
- seats?: number | undefined;
1876
- }[];
1877
- _id?: ObjectId | undefined;
1878
- updatedAt?: Date | undefined;
1879
- metadata?: {
1880
- description?: string | undefined;
1881
- userId?: string | ObjectId | undefined;
1882
- orgId?: string | ObjectId | undefined;
1883
- currency?: string | undefined;
1884
- subscriptionId?: string | ObjectId | undefined;
1885
- billingCycle?: "monthly" | "yearly" | "quarterly" | undefined;
1886
- } | undefined;
1887
- createdAt?: Date | undefined;
1888
- } | null>;
1889
- updateStatusByInvoiceNumber: (invoiceNumber: string, status: TInvoice["status"], session?: ClientSession) => Promise<void>;
1890
- getOverdueInvoices: (BATCH_SIZE?: number) => Promise<{
1891
- type: "organization-subscription" | "affiliate-subscription" | "one-time-payment" | "other";
1892
- status: "pending" | "cancelled" | "paid" | "overdue";
1893
- amount: number;
1894
- invoiceNumber: string;
1895
- dueDate: Date;
1896
- items: {
1897
- description: string;
1898
- unitPrice: number;
1899
- quantity: number;
1900
- total: number;
1901
- seats?: number | undefined;
1902
- }[];
1903
- _id?: ObjectId | undefined;
1904
- updatedAt?: Date | undefined;
1905
- metadata?: {
1906
- description?: string | undefined;
1907
- userId?: string | ObjectId | undefined;
1908
- orgId?: string | ObjectId | undefined;
1909
- currency?: string | undefined;
1910
- subscriptionId?: string | ObjectId | undefined;
1911
- billingCycle?: "monthly" | "yearly" | "quarterly" | undefined;
1912
- } | undefined;
1913
- createdAt?: Date | undefined;
1914
- }[]>;
1915
- getBySubscriptionId: ({ page, search, limit, sort, id }?: {
1916
- page?: number | undefined;
1917
- search?: string | undefined;
1918
- limit?: number | undefined;
1919
- sort?: Record<string, any> | undefined;
1920
- id?: string | ObjectId | undefined;
1921
- }) => Promise<{
1922
- items: any[];
1923
- pages: number;
1924
- pageRange: string;
1925
- }>;
1926
- getByNumber: (number: string) => Promise<{
1927
- type: "organization-subscription" | "affiliate-subscription" | "one-time-payment" | "other";
1928
- status: "pending" | "cancelled" | "paid" | "overdue";
1929
- amount: number;
1930
- invoiceNumber: string;
1931
- dueDate: Date;
1932
- items: {
1933
- description: string;
1934
- unitPrice: number;
1935
- quantity: number;
1936
- total: number;
1937
- seats?: number | undefined;
1938
- }[];
1939
- _id?: ObjectId | undefined;
1940
- updatedAt?: Date | undefined;
1941
- metadata?: {
1942
- description?: string | undefined;
1943
- userId?: string | ObjectId | undefined;
1944
- orgId?: string | ObjectId | undefined;
1945
- currency?: string | undefined;
1946
- subscriptionId?: string | ObjectId | undefined;
1947
- billingCycle?: "monthly" | "yearly" | "quarterly" | undefined;
1948
- } | undefined;
1949
- createdAt?: Date | undefined;
1950
- } | null>;
1951
- };
1952
-
1953
- declare function useInvoiceService(): {
1954
- processOverDueInvoices: (BATCH_SIZE?: number, MAX_RETRIES?: number) => Promise<void>;
1955
- };
1956
-
1957
- declare function useInvoiceController(): {
1958
- getBySubscriptionId: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1959
- getByNumber: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1960
- getByDueDateStatus: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1961
- };
1962
-
1963
- declare const TPaymentMethod: z.ZodEnum<["CARD", "DIRECT_DEBIT", "VIRTUAL_ACCOUNT", "EWALLET", "OVER_THE_COUNTER", "QR_CODE"]>;
1964
- type TPaymentMethodType = z.infer<typeof TPaymentMethod>;
1965
- declare const TPayment: z.ZodObject<{
1966
- _id: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodType<ObjectId, z.ZodTypeDef, ObjectId>]>>;
1967
- invoiceId: z.ZodDefault<z.ZodOptional<z.ZodString>>;
1968
- amount: z.ZodNumber;
1969
- paymentMethod: z.ZodEnum<["CARD", "DIRECT_DEBIT", "VIRTUAL_ACCOUNT", "EWALLET", "OVER_THE_COUNTER", "QR_CODE"]>;
1970
- status: z.ZodEnum<["pending", "completed", "failed", "refunded"]>;
1971
- metadata: z.ZodEffects<z.ZodObject<{
1972
- userId: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodType<ObjectId, z.ZodTypeDef, ObjectId>]>>;
1973
- orgId: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodType<ObjectId, z.ZodTypeDef, ObjectId>]>>;
1974
- transactionId: z.ZodOptional<z.ZodString>;
1975
- currency: z.ZodDefault<z.ZodString>;
1976
- paymentMethod: z.ZodOptional<z.ZodString>;
1977
- paymentMethodType: z.ZodOptional<z.ZodString>;
1978
- paymentMethodId: z.ZodOptional<z.ZodString>;
1979
- payment: z.ZodOptional<z.ZodString>;
1980
- subscriptionId: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodType<ObjectId, z.ZodTypeDef, ObjectId>]>>;
1981
- }, "strip", z.ZodTypeAny, {
1982
- currency: string;
1983
- userId?: string | ObjectId | undefined;
1984
- orgId?: string | ObjectId | undefined;
1985
- transactionId?: string | undefined;
1986
- paymentMethod?: string | undefined;
1987
- paymentMethodType?: string | undefined;
1988
- paymentMethodId?: string | undefined;
1989
- payment?: string | undefined;
1990
- subscriptionId?: string | ObjectId | undefined;
1991
- }, {
1992
- userId?: string | ObjectId | undefined;
1993
- orgId?: string | ObjectId | undefined;
1994
- transactionId?: string | undefined;
1995
- currency?: string | undefined;
1996
- paymentMethod?: string | undefined;
1997
- paymentMethodType?: string | undefined;
1998
- paymentMethodId?: string | undefined;
1999
- payment?: string | undefined;
2000
- subscriptionId?: string | ObjectId | undefined;
2001
- }>, {
2002
- currency: string;
2003
- userId?: string | ObjectId | undefined;
2004
- orgId?: string | ObjectId | undefined;
2005
- transactionId?: string | undefined;
2006
- paymentMethod?: string | undefined;
2007
- paymentMethodType?: string | undefined;
2008
- paymentMethodId?: string | undefined;
2009
- payment?: string | undefined;
2010
- subscriptionId?: string | ObjectId | undefined;
2011
- }, {
2012
- userId?: string | ObjectId | undefined;
2013
- orgId?: string | ObjectId | undefined;
2014
- transactionId?: string | undefined;
2015
- currency?: string | undefined;
2016
- paymentMethod?: string | undefined;
2017
- paymentMethodType?: string | undefined;
2018
- paymentMethodId?: string | undefined;
2019
- payment?: string | undefined;
2020
- subscriptionId?: string | ObjectId | undefined;
2021
- }>;
2022
- createdAt: z.ZodOptional<z.ZodDefault<z.ZodDate>>;
2023
- updatedAt: z.ZodOptional<z.ZodDate>;
2024
- }, "strip", z.ZodTypeAny, {
2025
- status: "pending" | "completed" | "failed" | "refunded";
2026
- metadata: {
2027
- currency: string;
2028
- userId?: string | ObjectId | undefined;
2029
- orgId?: string | ObjectId | undefined;
2030
- transactionId?: string | undefined;
2031
- paymentMethod?: string | undefined;
2032
- paymentMethodType?: string | undefined;
2033
- paymentMethodId?: string | undefined;
2034
- payment?: string | undefined;
2035
- subscriptionId?: string | ObjectId | undefined;
2036
- };
2037
- paymentMethod: "EWALLET" | "QR_CODE" | "CARD" | "DIRECT_DEBIT" | "VIRTUAL_ACCOUNT" | "OVER_THE_COUNTER";
2038
- invoiceId: string;
2039
- amount: number;
2040
- _id?: string | ObjectId | undefined;
2041
- updatedAt?: Date | undefined;
2042
- createdAt?: Date | undefined;
2043
- }, {
2044
- status: "pending" | "completed" | "failed" | "refunded";
2045
- metadata: {
2046
- userId?: string | ObjectId | undefined;
2047
- orgId?: string | ObjectId | undefined;
2048
- transactionId?: string | undefined;
2049
- currency?: string | undefined;
2050
- paymentMethod?: string | undefined;
2051
- paymentMethodType?: string | undefined;
2052
- paymentMethodId?: string | undefined;
2053
- payment?: string | undefined;
2054
- subscriptionId?: string | ObjectId | undefined;
2055
- };
2056
- paymentMethod: "EWALLET" | "QR_CODE" | "CARD" | "DIRECT_DEBIT" | "VIRTUAL_ACCOUNT" | "OVER_THE_COUNTER";
2057
- amount: number;
2058
- _id?: string | ObjectId | undefined;
2059
- updatedAt?: Date | undefined;
2060
- createdAt?: Date | undefined;
2061
- invoiceId?: string | undefined;
2062
- }>;
2063
- type TPayment = z.infer<typeof TPayment>;
2064
- declare const DirectDebitSchema: z.ZodObject<{
2065
- type: z.ZodLiteral<"DIRECT_DEBIT">;
2066
- direct_debit: z.ZodObject<{
2067
- channel_code: z.ZodString;
2068
- channel_properties: z.ZodObject<{
2069
- success_return_url: z.ZodString;
2070
- failure_return_url: z.ZodString;
2071
- }, "strip", z.ZodTypeAny, {
2072
- success_return_url: string;
2073
- failure_return_url: string;
2074
- }, {
2075
- success_return_url: string;
2076
- failure_return_url: string;
2077
- }>;
2078
- }, "strip", z.ZodTypeAny, {
2079
- channel_code: string;
2080
- channel_properties: {
2081
- success_return_url: string;
2082
- failure_return_url: string;
2083
- };
2084
- }, {
2085
- channel_code: string;
2086
- channel_properties: {
2087
- success_return_url: string;
2088
- failure_return_url: string;
2089
- };
2090
- }>;
2091
- reusability: z.ZodEnum<["MULTIPLE_USE", "SINGLE_USE"]>;
2092
- description: z.ZodOptional<z.ZodString>;
2093
- metadata: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>;
2094
- customer_id: z.ZodString;
2095
- }, "strip", z.ZodTypeAny, {
2096
- type: "DIRECT_DEBIT";
2097
- metadata: Record<string, string>;
2098
- direct_debit: {
2099
- channel_code: string;
2100
- channel_properties: {
2101
- success_return_url: string;
2102
- failure_return_url: string;
2103
- };
2104
- };
2105
- reusability: "MULTIPLE_USE" | "SINGLE_USE";
2106
- customer_id: string;
2107
- description?: string | undefined;
2108
- }, {
2109
- type: "DIRECT_DEBIT";
2110
- direct_debit: {
2111
- channel_code: string;
2112
- channel_properties: {
2113
- success_return_url: string;
2114
- failure_return_url: string;
2115
- };
2116
- };
2117
- reusability: "MULTIPLE_USE" | "SINGLE_USE";
2118
- customer_id: string;
2119
- metadata?: Record<string, string> | undefined;
2120
- description?: string | undefined;
2121
- }>;
2122
- type DirectDebit = z.infer<typeof DirectDebitSchema>;
2123
- declare function validateDirectDebit(data: Record<string, any>): DirectDebit;
2124
- declare const CardPaymentSchema: z.ZodObject<{
2125
- type: z.ZodLiteral<"CARD">;
2126
- card: z.ZodObject<{
2127
- currency: z.ZodLiteral<"PHP">;
2128
- channel_properties: z.ZodObject<{
2129
- skip_three_d_secure: z.ZodBoolean;
2130
- success_return_url: z.ZodString;
2131
- failure_return_url: z.ZodString;
2132
- }, "strip", z.ZodTypeAny, {
2133
- success_return_url: string;
2134
- failure_return_url: string;
2135
- skip_three_d_secure: boolean;
2136
- }, {
2137
- success_return_url: string;
2138
- failure_return_url: string;
2139
- skip_three_d_secure: boolean;
2140
- }>;
2141
- card_information: z.ZodObject<{
2142
- card_number: z.ZodString;
2143
- expiry_month: z.ZodString;
2144
- expiry_year: z.ZodString;
2145
- cvv: z.ZodString;
2146
- cardholder_name: z.ZodString;
2147
- }, "strip", z.ZodTypeAny, {
2148
- card_number: string;
2149
- expiry_month: string;
2150
- expiry_year: string;
2151
- cvv: string;
2152
- cardholder_name: string;
2153
- }, {
2154
- card_number: string;
2155
- expiry_month: string;
2156
- expiry_year: string;
2157
- cvv: string;
2158
- cardholder_name: string;
2159
- }>;
2160
- }, "strip", z.ZodTypeAny, {
2161
- currency: "PHP";
2162
- channel_properties: {
2163
- success_return_url: string;
2164
- failure_return_url: string;
2165
- skip_three_d_secure: boolean;
2166
- };
2167
- card_information: {
2168
- card_number: string;
2169
- expiry_month: string;
2170
- expiry_year: string;
2171
- cvv: string;
2172
- cardholder_name: string;
2173
- };
2174
- }, {
2175
- currency: "PHP";
2176
- channel_properties: {
2177
- success_return_url: string;
2178
- failure_return_url: string;
2179
- skip_three_d_secure: boolean;
2180
- };
2181
- card_information: {
2182
- card_number: string;
2183
- expiry_month: string;
2184
- expiry_year: string;
2185
- cvv: string;
2186
- cardholder_name: string;
2187
- };
2188
- }>;
2189
- reusability: z.ZodEnum<["MULTIPLE_USE", "SINGLE_USE"]>;
2190
- description: z.ZodOptional<z.ZodString>;
2191
- metadata: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>;
2192
- }, "strip", z.ZodTypeAny, {
2193
- type: "CARD";
2194
- metadata: Record<string, string>;
2195
- reusability: "MULTIPLE_USE" | "SINGLE_USE";
2196
- card: {
2197
- currency: "PHP";
2198
- channel_properties: {
2199
- success_return_url: string;
2200
- failure_return_url: string;
2201
- skip_three_d_secure: boolean;
2202
- };
2203
- card_information: {
2204
- card_number: string;
2205
- expiry_month: string;
2206
- expiry_year: string;
2207
- cvv: string;
2208
- cardholder_name: string;
2209
- };
2210
- };
2211
- description?: string | undefined;
2212
- }, {
2213
- type: "CARD";
2214
- reusability: "MULTIPLE_USE" | "SINGLE_USE";
2215
- card: {
2216
- currency: "PHP";
2217
- channel_properties: {
2218
- success_return_url: string;
2219
- failure_return_url: string;
2220
- skip_three_d_secure: boolean;
2221
- };
2222
- card_information: {
2223
- card_number: string;
2224
- expiry_month: string;
2225
- expiry_year: string;
2226
- cvv: string;
2227
- cardholder_name: string;
2228
- };
2229
- };
2230
- metadata?: Record<string, string> | undefined;
2231
- description?: string | undefined;
2232
- }>;
2233
- type CardPayment = z.infer<typeof CardPaymentSchema>;
2234
- declare function validateCardPayment(data: Record<string, any>): CardPayment;
2235
- declare const EWalletPaymentSchema: z.ZodObject<{
2236
- type: z.ZodLiteral<"EWALLET">;
2237
- reusability: z.ZodEnum<["MULTIPLE_USE", "SINGLE_USE"]>;
2238
- customer_id: z.ZodString;
2239
- country: z.ZodString;
2240
- ewallet: z.ZodObject<{
2241
- channel_code: z.ZodString;
2242
- channel_properties: z.ZodObject<{
2243
- success_return_url: z.ZodString;
2244
- failure_return_url: z.ZodString;
2245
- cancel_return_url: z.ZodString;
2246
- }, "strip", z.ZodTypeAny, {
2247
- success_return_url: string;
2248
- failure_return_url: string;
2249
- cancel_return_url: string;
2250
- }, {
2251
- success_return_url: string;
2252
- failure_return_url: string;
2253
- cancel_return_url: string;
2254
- }>;
2255
- }, "strip", z.ZodTypeAny, {
2256
- channel_code: string;
2257
- channel_properties: {
2258
- success_return_url: string;
2259
- failure_return_url: string;
2260
- cancel_return_url: string;
2261
- };
2262
- }, {
2263
- channel_code: string;
2264
- channel_properties: {
2265
- success_return_url: string;
2266
- failure_return_url: string;
2267
- cancel_return_url: string;
2268
- };
2269
- }>;
2270
- description: z.ZodOptional<z.ZodString>;
2271
- metadata: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>;
2272
- }, "strip", z.ZodTypeAny, {
2273
- type: "EWALLET";
2274
- metadata: Record<string, string>;
2275
- country: string;
2276
- reusability: "MULTIPLE_USE" | "SINGLE_USE";
2277
- customer_id: string;
2278
- ewallet: {
2279
- channel_code: string;
2280
- channel_properties: {
2281
- success_return_url: string;
2282
- failure_return_url: string;
2283
- cancel_return_url: string;
2284
- };
2285
- };
2286
- description?: string | undefined;
2287
- }, {
2288
- type: "EWALLET";
2289
- country: string;
2290
- reusability: "MULTIPLE_USE" | "SINGLE_USE";
2291
- customer_id: string;
2292
- ewallet: {
2293
- channel_code: string;
2294
- channel_properties: {
2295
- success_return_url: string;
2296
- failure_return_url: string;
2297
- cancel_return_url: string;
2298
- };
2299
- };
2300
- metadata?: Record<string, string> | undefined;
2301
- description?: string | undefined;
2302
- }>;
2303
- type EWalletPayment = z.infer<typeof EWalletPaymentSchema>;
2304
- declare function validateEWalletPayment(data: Record<string, any>): EWalletPayment;
2305
- declare function usePaymentModel(db: Db): {
2306
- collection: Collection<{
2307
- status: "pending" | "completed" | "failed" | "refunded";
2308
- metadata: {
2309
- currency: string;
2310
- userId?: string | ObjectId | undefined;
2311
- orgId?: string | ObjectId | undefined;
2312
- transactionId?: string | undefined;
2313
- paymentMethod?: string | undefined;
2314
- paymentMethodType?: string | undefined;
2315
- paymentMethodId?: string | undefined;
2316
- payment?: string | undefined;
2317
- subscriptionId?: string | ObjectId | undefined;
2318
- };
2319
- paymentMethod: "EWALLET" | "QR_CODE" | "CARD" | "DIRECT_DEBIT" | "VIRTUAL_ACCOUNT" | "OVER_THE_COUNTER";
2320
- invoiceId: string;
2321
- amount: number;
2322
- _id?: string | ObjectId | undefined;
2323
- updatedAt?: Date | undefined;
2324
- createdAt?: Date | undefined;
2325
- }>;
2326
- createPayment: (data: Partial<TPayment>) => {
2327
- status: "pending" | "completed" | "failed" | "refunded";
2328
- metadata: {
2329
- currency: string;
2330
- userId?: string | ObjectId | undefined;
2331
- orgId?: string | ObjectId | undefined;
2332
- transactionId?: string | undefined;
2333
- paymentMethod?: string | undefined;
2334
- paymentMethodType?: string | undefined;
2335
- paymentMethodId?: string | undefined;
2336
- payment?: string | undefined;
2337
- subscriptionId?: string | ObjectId | undefined;
2338
- };
2339
- paymentMethod: "EWALLET" | "QR_CODE" | "CARD" | "DIRECT_DEBIT" | "VIRTUAL_ACCOUNT" | "OVER_THE_COUNTER";
2340
- invoiceId: string;
2341
- amount: number;
2342
- _id?: string | ObjectId | undefined;
2343
- updatedAt?: Date | undefined;
2344
- createdAt?: Date | undefined;
2345
- };
2346
- validatePayment: (data: unknown) => {
2347
- status: "pending" | "completed" | "failed" | "refunded";
2348
- metadata: {
2349
- currency: string;
2350
- userId?: string | ObjectId | undefined;
2351
- orgId?: string | ObjectId | undefined;
2352
- transactionId?: string | undefined;
2353
- paymentMethod?: string | undefined;
2354
- paymentMethodType?: string | undefined;
2355
- paymentMethodId?: string | undefined;
2356
- payment?: string | undefined;
2357
- subscriptionId?: string | ObjectId | undefined;
2358
- };
2359
- paymentMethod: "EWALLET" | "QR_CODE" | "CARD" | "DIRECT_DEBIT" | "VIRTUAL_ACCOUNT" | "OVER_THE_COUNTER";
2360
- invoiceId: string;
2361
- amount: number;
2362
- _id?: string | ObjectId | undefined;
2363
- updatedAt?: Date | undefined;
2364
- createdAt?: Date | undefined;
2365
- };
2366
- };
2367
-
2368
- declare function usePaymentRepo(): {
2369
- createIndex: () => Promise<void>;
2370
- createUniqueIndex: () => Promise<void>;
2371
- add: (value: TPayment, session?: ClientSession) => Promise<void>;
2372
- getPayments: ({ search, page, limit, sort, status, type, id, }?: {
2373
- search?: string | undefined;
2374
- page?: number | undefined;
2375
- limit?: number | undefined;
2376
- sort?: {} | undefined;
2377
- status?: string | undefined;
2378
- type?: string | undefined;
2379
- id?: string | undefined;
2380
- }) => Promise<{
2381
- items: any[];
2382
- pages: number;
2383
- pageRange: string;
2384
- }>;
2385
- getByInvoiceId: (invoiceId: string) => Promise<mongodb.WithId<{
2386
- status: "pending" | "completed" | "failed" | "refunded";
2387
- metadata: {
2388
- currency: string;
2389
- userId?: string | ObjectId | undefined;
2390
- orgId?: string | ObjectId | undefined;
2391
- transactionId?: string | undefined;
2392
- paymentMethod?: string | undefined;
2393
- paymentMethodType?: string | undefined;
2394
- paymentMethodId?: string | undefined;
2395
- payment?: string | undefined;
2396
- subscriptionId?: string | ObjectId | undefined;
2397
- };
2398
- paymentMethod: "EWALLET" | "QR_CODE" | "CARD" | "DIRECT_DEBIT" | "VIRTUAL_ACCOUNT" | "OVER_THE_COUNTER";
2399
- invoiceId: string;
2400
- amount: number;
2401
- _id?: string | ObjectId | undefined;
2402
- updatedAt?: Date | undefined;
2403
- createdAt?: Date | undefined;
2404
- }> | null>;
2405
- };
2406
-
2407
- declare function usePaymentController(): {
2408
- getPayments: (req: Request, res: Response, next: NextFunction) => Promise<void>;
2409
- };
2410
-
2411
- declare const TCounter: z.ZodObject<{
2412
- _id: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodType<ObjectId, z.ZodTypeDef, ObjectId>]>, ObjectId, string | ObjectId>>;
2413
- count: z.ZodDefault<z.ZodNumber>;
2414
- type: z.ZodString;
2415
- createdAt: z.ZodDefault<z.ZodOptional<z.ZodDate>>;
2416
- updatedAt: z.ZodOptional<z.ZodDate>;
2417
- deletedAt: z.ZodOptional<z.ZodDate>;
2418
- }, "strip", z.ZodTypeAny, {
2419
- type: string;
2420
- createdAt: Date;
2421
- count: number;
2422
- _id?: ObjectId | undefined;
2423
- updatedAt?: Date | undefined;
2424
- deletedAt?: Date | undefined;
2425
- }, {
2426
- type: string;
2427
- _id?: string | ObjectId | undefined;
2428
- updatedAt?: Date | undefined;
2429
- deletedAt?: Date | undefined;
2430
- createdAt?: Date | undefined;
2431
- count?: number | undefined;
2432
- }>;
2433
- type TCounter = z.infer<typeof TCounter>;
2434
- declare function useCounterModel(db: Db): {
2435
- createCounter: (value: Pick<TCounter, "type">) => {
2436
- type: string;
2437
- createdAt: Date;
2438
- count: number;
2439
- _id?: ObjectId | undefined;
2440
- updatedAt?: Date | undefined;
2441
- deletedAt?: Date | undefined;
2442
- };
2443
- validateCounter: (data: unknown) => z.SafeParseReturnType<{
2444
- type: string;
2445
- _id?: string | ObjectId | undefined;
2446
- updatedAt?: Date | undefined;
2447
- deletedAt?: Date | undefined;
2448
- createdAt?: Date | undefined;
2449
- count?: number | undefined;
2450
- }, {
2451
- type: string;
2452
- createdAt: Date;
2453
- count: number;
2454
- _id?: ObjectId | undefined;
2455
- updatedAt?: Date | undefined;
2456
- deletedAt?: Date | undefined;
2457
- }>;
2458
- collection: Collection<{
2459
- type: string;
2460
- createdAt: Date;
2461
- count: number;
2462
- _id?: ObjectId | undefined;
2463
- updatedAt?: Date | undefined;
2464
- deletedAt?: Date | undefined;
2465
- }>;
2466
- };
2467
-
2468
- declare function useCounterRepo(): {
2469
- createIndex: () => Promise<void>;
2470
- createUniqueIndex: () => Promise<void>;
2471
- add: (type: string) => Promise<void>;
2472
- getByType: (type: string) => Promise<mongodb.WithId<{
2473
- type: string;
2474
- createdAt: Date;
2475
- count: number;
2476
- _id?: bson.ObjectId | undefined;
2477
- updatedAt?: Date | undefined;
2478
- deletedAt?: Date | undefined;
2479
- }> | null>;
2480
- incrementByType: (type: string, session?: ClientSession) => Promise<void>;
2481
- };
2482
-
2483
- declare const TPriceType: z.ZodEnum<["monthly-subscription", "yearly-subscription", "one-time-payment", "other"]>;
2484
- type TPriceType = z.infer<typeof TPriceType>;
2485
- declare const TPrice: z.ZodObject<{
2486
- _id: z.ZodEffects<z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodType<ObjectId, z.ZodTypeDef, ObjectId>]>>, ObjectId | undefined, string | ObjectId | undefined>;
2487
- value: z.ZodDefault<z.ZodNumber>;
2488
- saleValue: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
2489
- saleExpiry: z.ZodOptional<z.ZodDate>;
2490
- name: z.ZodString;
2491
- type: z.ZodDefault<z.ZodOptional<z.ZodEnum<["monthly-subscription", "yearly-subscription", "one-time-payment", "other"]>>>;
2492
- createdAt: z.ZodOptional<z.ZodDefault<z.ZodDate>>;
2493
- updatedAt: z.ZodOptional<z.ZodDate>;
2494
- deletedAt: z.ZodOptional<z.ZodDate>;
2495
- }, "strip", z.ZodTypeAny, {
2496
- type: "one-time-payment" | "other" | "monthly-subscription" | "yearly-subscription";
2497
- value: number;
2498
- name: string;
2499
- _id?: ObjectId | undefined;
2500
- updatedAt?: Date | undefined;
2501
- deletedAt?: Date | undefined;
2502
- createdAt?: Date | undefined;
2503
- saleValue?: number | undefined;
2504
- saleExpiry?: Date | undefined;
2505
- }, {
2506
- name: string;
2507
- type?: "one-time-payment" | "other" | "monthly-subscription" | "yearly-subscription" | undefined;
2508
- _id?: string | ObjectId | undefined;
2509
- updatedAt?: Date | undefined;
2510
- deletedAt?: Date | undefined;
2511
- value?: number | undefined;
2512
- createdAt?: Date | undefined;
2513
- saleValue?: number | undefined;
2514
- saleExpiry?: Date | undefined;
2515
- }>;
2516
- type TPrice = z.infer<typeof TPrice>;
2517
- declare function usePriceModel(db: Db): {
2518
- createPrice: (value: Pick<TPrice, "type" | "name" | "value">) => {
2519
- type: "one-time-payment" | "other" | "monthly-subscription" | "yearly-subscription";
2520
- value: number;
2521
- name: string;
2522
- _id?: ObjectId | undefined;
2523
- updatedAt?: Date | undefined;
2524
- deletedAt?: Date | undefined;
2525
- createdAt?: Date | undefined;
2526
- saleValue?: number | undefined;
2527
- saleExpiry?: Date | undefined;
2528
- };
2529
- validatePrice: (data: unknown) => z.SafeParseReturnType<{
2530
- name: string;
2531
- type?: "one-time-payment" | "other" | "monthly-subscription" | "yearly-subscription" | undefined;
2532
- _id?: string | ObjectId | undefined;
2533
- updatedAt?: Date | undefined;
2534
- deletedAt?: Date | undefined;
2535
- value?: number | undefined;
2536
- createdAt?: Date | undefined;
2537
- saleValue?: number | undefined;
2538
- saleExpiry?: Date | undefined;
2539
- }, {
2540
- type: "one-time-payment" | "other" | "monthly-subscription" | "yearly-subscription";
2541
- value: number;
2542
- name: string;
2543
- _id?: ObjectId | undefined;
2544
- updatedAt?: Date | undefined;
2545
- deletedAt?: Date | undefined;
2546
- createdAt?: Date | undefined;
2547
- saleValue?: number | undefined;
2548
- saleExpiry?: Date | undefined;
2549
- }>;
2550
- collection: Collection<{
2551
- type: "one-time-payment" | "other" | "monthly-subscription" | "yearly-subscription";
2552
- value: number;
2553
- name: string;
2554
- _id?: ObjectId | undefined;
2555
- updatedAt?: Date | undefined;
2556
- deletedAt?: Date | undefined;
2557
- createdAt?: Date | undefined;
2558
- saleValue?: number | undefined;
2559
- saleExpiry?: Date | undefined;
2560
- }>;
2561
- };
2562
-
2563
- declare function usePriceRepo(): {
2564
- createIndex: () => Promise<void>;
2565
- createUniqueIndex: () => Promise<void>;
2566
- add: (value: Pick<TPrice, "type" | "name" | "value">) => Promise<void>;
2567
- getByNameType: (name: string, type: TPriceType) => Promise<mongodb.WithId<{
2568
- type: "one-time-payment" | "other" | "monthly-subscription" | "yearly-subscription";
2569
- value: number;
2570
- name: string;
2571
- _id?: bson.ObjectId | undefined;
2572
- updatedAt?: Date | undefined;
2573
- deletedAt?: Date | undefined;
2574
- createdAt?: Date | undefined;
2575
- saleValue?: number | undefined;
2576
- saleExpiry?: Date | undefined;
2577
- }> | null>;
2578
- setSaleValueByType: (value: Pick<TPrice, "type" | "saleValue" | "saleExpiry">, session?: ClientSession) => Promise<void>;
2579
- };
2580
-
2581
- declare function usePriceController(): {
2582
- getByNameType: (req: Request, res: Response, next: NextFunction) => Promise<void>;
2583
- };
2584
-
2585
- declare const MONGO_URI: string;
2586
- declare const MONGO_DB: string;
2587
- declare const PORT: number;
2588
- declare const SECRET_KEY: string;
2589
- declare const isDev: boolean;
2590
- declare const MAILER_TRANSPORT_HOST: string;
2591
- declare const MAILER_TRANSPORT_PORT: number;
2592
- declare const MAILER_TRANSPORT_SECURE: boolean;
2593
- declare const MAILER_EMAIL: string;
2594
- declare const MAILER_PASSWORD: string;
2595
- declare const ACCESS_TOKEN_SECRET: string;
2596
- declare const REFRESH_TOKEN_SECRET: string;
2597
- declare const ACCESS_TOKEN_EXPIRY: string;
2598
- declare const REFRESH_TOKEN_EXPIRY: string;
2599
- declare const APP_ACCOUNT: string;
2600
- declare const APP_MAIN: string;
2601
- declare const VERIFICATION_FORGET_PASSWORD_DURATION: string;
2602
- declare const VERIFICATION_USER_INVITE_DURATION: string;
2603
- declare const REDIS_HOST: string;
2604
- declare const REDIS_PORT: number;
2605
- declare const REDIS_PASSWORD: string;
2606
- declare const DEFAULT_USER_EMAIL: string;
2607
- declare const DEFAULT_USER_PASSWORD: string;
2608
- declare const DEFAULT_USER_FIRST_NAME: string;
2609
- declare const DEFAULT_USER_LAST_NAME: string;
2610
- declare const SPACES_ACCESS_KEY: string;
2611
- declare const SPACES_SECRET_KEY: string;
2612
- declare const SPACES_ENDPOINT: string;
2613
- declare const SPACES_REGION: string;
2614
- declare const SPACES_BUCKET: string;
2615
- declare const PAYPAL_CLIENT_ID: string;
2616
- declare const PAYPAL_CLIENT_SECRET: string;
2617
- declare const PAYPAL_API_URL: string;
2618
- declare const XENDIT_SECRET_KEY: string;
2619
- declare const XENDIT_BASE_URL: string;
2620
-
2621
- export { ACCESS_TOKEN_EXPIRY, ACCESS_TOKEN_SECRET, APP_ACCOUNT, APP_MAIN, CardPayment, CardPaymentSchema, DEFAULT_USER_EMAIL, DEFAULT_USER_FIRST_NAME, DEFAULT_USER_LAST_NAME, DEFAULT_USER_PASSWORD, DirectDebit, DirectDebitSchema, EWalletPayment, EWalletPaymentSchema, MAILER_EMAIL, MAILER_PASSWORD, MAILER_TRANSPORT_HOST, MAILER_TRANSPORT_PORT, MAILER_TRANSPORT_SECURE, MAddress, MCapBldgAct, MComment, MEntity, MFile, MMember, MONGO_DB, MONGO_URI, MOrder, MOrg, MPaymentMethod, MPromoCode, MRole, MSubscription, MToken, MUser, MUserRole, MVerification, MWorkflow, PAYPAL_API_URL, PAYPAL_CLIENT_ID, PAYPAL_CLIENT_SECRET, PORT, REDIS_HOST, REDIS_PASSWORD, REDIS_PORT, REFRESH_TOKEN_EXPIRY, REFRESH_TOKEN_SECRET, SECRET_KEY, SPACES_ACCESS_KEY, SPACES_BUCKET, SPACES_ENDPOINT, SPACES_REGION, SPACES_SECRET_KEY, TAddress, TAttachment, TBillingRecipient, TCapBldgAct, TCapBldgActAssmtCriteria, TCapBldgActBasicInfo, TCapBldgActInitRevEval, TComment, TCounter, TEntity, TFile, TInvoice, TMember, TMiniRole, TOrder, TOrderMetadata, TOrg, TPayment, TPaymentMethod$1 as TPaymentMethod, TPaymentMethodType, TPrice, TPriceType, TPromoCode, TPromoTier, TRole, TSubscription, TToken, TUser, TUserRole, TVerification, TVerificationMetadata, TWorkflow, TWorkflowStep, VERIFICATION_FORGET_PASSWORD_DURATION, VERIFICATION_USER_INVITE_DURATION, XENDIT_BASE_URL, XENDIT_SECRET_KEY, addressSchema, isDev, schema, useAddressController, useAddressRepo, useAuthController, useAuthService, useCapBldgActController, useCapBldgActRepo, useCapBldgActService, useCommentController, useCommentRepo, useCommentService, useCounterModel, useCounterRepo, useEntityController, useEntityRepo, useEntityService, useFileController, useFileRepo, useFileService, useInvoiceController, useInvoiceModel, useInvoiceRepo, useInvoiceService, useMemberController, useMemberRepo, useOrderController, useOrderRepo, useOrgController, useOrgRepo, useOrgService, usePaymentController, usePaymentMethodController, usePaymentMethodRepo, usePaymentMethodService, usePaymentModel, usePaymentRepo, usePriceController, usePriceModel, usePriceRepo, usePromoCodeController, usePromoCodeRepo, useRoleController, useRoleRepo, useRoleService, useSubscriptionController, useSubscriptionRepo, useSubscriptionService, useTokenRepo, useUserController, useUserRepo, useUserService, useVerificationController, useVerificationRepo, useVerificationService, useWorkflowController, useWorkflowRepo, useWorkflowService, useXenditService, validateCardPayment, validateDirectDebit, validateEWalletPayment };
134
+ export { TDivision, TRegion, TSchool, modelDivision, modelRegion, modelSchool, schemaDivision, schemaRegion, schemaSchool, useDivisionController, useDivisionRepo, useRegionController, useRegionRepo, useSchoolController, useSchoolRepo };