@kipicore/dbcore 1.1.331 → 1.1.332
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/helpers/utils.d.ts +2 -2
- package/dist/helpers/utils.js +1 -1
- package/package.json +1 -1
package/dist/helpers/utils.d.ts
CHANGED
|
@@ -157,7 +157,7 @@ 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: <T>(data: T[], page: number, limit: number, totalRecords: number) => {
|
|
160
|
+
export declare const customPagination: <T>(data: T[], page: number, limit: number, totalRecords: number) => Promise<{
|
|
161
161
|
limit: number;
|
|
162
162
|
totalRecords: number;
|
|
163
163
|
totalPages: number;
|
|
@@ -165,7 +165,7 @@ export declare const customPagination: <T>(data: T[], page: number, limit: numbe
|
|
|
165
165
|
currentPage: number;
|
|
166
166
|
hasNextPage: boolean;
|
|
167
167
|
recordList: T[];
|
|
168
|
-
}
|
|
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;
|
package/dist/helpers/utils.js
CHANGED
|
@@ -641,7 +641,7 @@ const uuidIdAlternatives = (isRequired = false, allowArray = true) => {
|
|
|
641
641
|
}
|
|
642
642
|
};
|
|
643
643
|
exports.uuidIdAlternatives = uuidIdAlternatives;
|
|
644
|
-
const customPagination = (data, page, limit, totalRecords) => {
|
|
644
|
+
const customPagination = async (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