erpnext-queue-client 2.5.7 → 2.5.8
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.
|
@@ -16,9 +16,12 @@ export declare const ERPNextMethodResponse: z.ZodObject<{
|
|
|
16
16
|
}>;
|
|
17
17
|
export type ERPNextMethodResponseType = z.infer<typeof ERPNextMethodResponse>;
|
|
18
18
|
export declare const DeleteResponseModel: z.ZodObject<{
|
|
19
|
-
message: z.ZodString
|
|
19
|
+
message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
20
|
+
data: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
20
21
|
}, "strip", z.ZodTypeAny, {
|
|
21
|
-
message
|
|
22
|
+
message?: string | null | undefined;
|
|
23
|
+
data?: string | null | undefined;
|
|
22
24
|
}, {
|
|
23
|
-
message
|
|
25
|
+
message?: string | null | undefined;
|
|
26
|
+
data?: string | null | undefined;
|
|
24
27
|
}>;
|
|
@@ -18,6 +18,7 @@ exports.ERPNextMethodResponse = zod_1.z
|
|
|
18
18
|
.describe("ERPNextMethodResponse");
|
|
19
19
|
exports.DeleteResponseModel = zod_1.z
|
|
20
20
|
.object({
|
|
21
|
-
message: zod_1.z.string(),
|
|
21
|
+
message: zod_1.z.string().nullish(),
|
|
22
|
+
data: zod_1.z.string().nullish(),
|
|
22
23
|
})
|
|
23
24
|
.describe("Delete response");
|
|
@@ -154,6 +154,14 @@ class ERPNextResourceRequest {
|
|
|
154
154
|
resourceId,
|
|
155
155
|
responseValidationModel: ERPNextResponse_1.DeleteResponseModel,
|
|
156
156
|
}, "erpnext", priority);
|
|
157
|
+
// current behaviour is to throw an error if the resource is not found because this is a delete request. It should not silently fail.
|
|
158
|
+
// .catch((err) => {
|
|
159
|
+
// if (err.message.includes("Error 404")) {
|
|
160
|
+
// lg.error(`Resource ${resourceName} with id ${resourceId} not found`);
|
|
161
|
+
// return;
|
|
162
|
+
// }
|
|
163
|
+
// throw err;
|
|
164
|
+
// });
|
|
157
165
|
}
|
|
158
166
|
}
|
|
159
167
|
exports.ERPNextResourceRequest = ERPNextResourceRequest;
|