@amohamud23/notihub 1.0.153 → 1.0.155
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.cts +8 -2
- package/dist/index.d.ts +8 -2
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -32,7 +32,10 @@ type ICreateNotiRequestBody = {};
|
|
|
32
32
|
type Response = {
|
|
33
33
|
data?: any;
|
|
34
34
|
message?: string;
|
|
35
|
-
error?:
|
|
35
|
+
error?: {
|
|
36
|
+
errorCode: string;
|
|
37
|
+
error: string;
|
|
38
|
+
};
|
|
36
39
|
statusCode?: number;
|
|
37
40
|
timestamp?: string;
|
|
38
41
|
};
|
|
@@ -229,7 +232,10 @@ declare const handleError: (error: any, res: Response$1, req?: any) => void;
|
|
|
229
232
|
*/
|
|
230
233
|
declare const handleSuccess: <T>(data: T, res: Response$1, statusCode?: number) => void;
|
|
231
234
|
|
|
232
|
-
declare const formatResponse: (data: any, message
|
|
235
|
+
declare const formatResponse: (data: any, message?: string, error?: {
|
|
236
|
+
errorCode: string;
|
|
237
|
+
error: string;
|
|
238
|
+
}, statusCode?: number) => Response;
|
|
233
239
|
|
|
234
240
|
declare const UserModel: mongoose.Model<INotiHubUser, {}, {}, {}, mongoose.Document<unknown, {}, INotiHubUser> & INotiHubUser & {
|
|
235
241
|
_id: mongoose.Types.ObjectId;
|
package/dist/index.d.ts
CHANGED
|
@@ -32,7 +32,10 @@ type ICreateNotiRequestBody = {};
|
|
|
32
32
|
type Response = {
|
|
33
33
|
data?: any;
|
|
34
34
|
message?: string;
|
|
35
|
-
error?:
|
|
35
|
+
error?: {
|
|
36
|
+
errorCode: string;
|
|
37
|
+
error: string;
|
|
38
|
+
};
|
|
36
39
|
statusCode?: number;
|
|
37
40
|
timestamp?: string;
|
|
38
41
|
};
|
|
@@ -229,7 +232,10 @@ declare const handleError: (error: any, res: Response$1, req?: any) => void;
|
|
|
229
232
|
*/
|
|
230
233
|
declare const handleSuccess: <T>(data: T, res: Response$1, statusCode?: number) => void;
|
|
231
234
|
|
|
232
|
-
declare const formatResponse: (data: any, message
|
|
235
|
+
declare const formatResponse: (data: any, message?: string, error?: {
|
|
236
|
+
errorCode: string;
|
|
237
|
+
error: string;
|
|
238
|
+
}, statusCode?: number) => Response;
|
|
233
239
|
|
|
234
240
|
declare const UserModel: mongoose.Model<INotiHubUser, {}, {}, {}, mongoose.Document<unknown, {}, INotiHubUser> & INotiHubUser & {
|
|
235
241
|
_id: mongoose.Types.ObjectId;
|