@kipicore/dbcore 1.1.329 → 1.1.331

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.
@@ -664,6 +664,7 @@ export declare enum EMAIL_TEMPLATES {
664
664
  STUDENT_VERIFICATION = "studentVerification",
665
665
  PARENTS_CREDENTIALS_TEMPLATE = "parentCredentialsTemplate",
666
666
  STUDENT_CREDENTIALS_TEMPLATE = "studentCredentialsTemplate",
667
+ ADMIN_CREDENTIALS_TEMPLATE = "adminCredentialsTemplate",
667
668
  COMMON_TEMPLATE = "commonTemplate",
668
669
  CONTACT_FEEDBACK_TEMPLATE = "contactFeedbackTemplate",
669
670
  ADMIN_STAFF_VERIFICATION = "adminStaffVerification"
@@ -809,6 +809,7 @@ var EMAIL_TEMPLATES;
809
809
  EMAIL_TEMPLATES["STUDENT_VERIFICATION"] = "studentVerification";
810
810
  EMAIL_TEMPLATES["PARENTS_CREDENTIALS_TEMPLATE"] = "parentCredentialsTemplate";
811
811
  EMAIL_TEMPLATES["STUDENT_CREDENTIALS_TEMPLATE"] = "studentCredentialsTemplate";
812
+ EMAIL_TEMPLATES["ADMIN_CREDENTIALS_TEMPLATE"] = "adminCredentialsTemplate";
812
813
  EMAIL_TEMPLATES["COMMON_TEMPLATE"] = "commonTemplate";
813
814
  EMAIL_TEMPLATES["CONTACT_FEEDBACK_TEMPLATE"] = "contactFeedbackTemplate";
814
815
  EMAIL_TEMPLATES["ADMIN_STAFF_VERIFICATION"] = "adminStaffVerification";
@@ -157,15 +157,15 @@ export declare function extractFromObject(data: any[], config: {
157
157
  export declare const enumAlternatives: (enumObj: Record<string, string>, isRequired?: boolean, allowArray?: boolean) => Joi.StringSchema<string> | Joi.AlternativesSchema<any>;
158
158
  export declare const objectIdAlternatives: (isRequired?: boolean, allowArray?: boolean) => Joi.AlternativesSchema<any> | undefined;
159
159
  export declare const uuidIdAlternatives: (isRequired?: boolean, allowArray?: boolean) => Joi.AlternativesSchema<any> | undefined;
160
- export declare const customPagination: (data: any[], page: number, limit: number, totalRecords: number) => Promise<{
160
+ export declare const customPagination: <T>(data: T[], page: number, limit: number, totalRecords: number) => {
161
161
  limit: number;
162
162
  totalRecords: number;
163
163
  totalPages: number;
164
164
  hasPreviousPage: boolean;
165
165
  currentPage: number;
166
166
  hasNextPage: boolean;
167
- recordList: any[];
168
- }>;
167
+ recordList: T[];
168
+ };
169
169
  export declare const generateHmacSHA256: (data: string, secret: string) => string;
170
170
  export declare const verifyHmacSHA256: (data: string, secret: string, signature: string) => boolean;
171
171
  export declare const generateVoucherCode: (format?: string) => string;
@@ -641,7 +641,7 @@ const uuidIdAlternatives = (isRequired = false, allowArray = true) => {
641
641
  }
642
642
  };
643
643
  exports.uuidIdAlternatives = uuidIdAlternatives;
644
- const customPagination = async (data, page, limit, totalRecords) => {
644
+ const customPagination = (data, page, limit, totalRecords) => {
645
645
  page = Math.max(1, page || app_1.PAGINATION.PAGE);
646
646
  limit = Math.max(1, limit || app_1.PAGINATION.LIMIT);
647
647
  const startIndex = (page - 1) * limit;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kipicore/dbcore",
3
- "version": "1.1.329",
3
+ "version": "1.1.331",
4
4
  "description": "Reusable DB core package with Postgres, MongoDB, models, services, interfaces, and types",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",