erpnext-queue-client 1.34.1 → 1.34.2
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.
|
@@ -72,22 +72,44 @@ class ERPNextServicecase {
|
|
|
72
72
|
}
|
|
73
73
|
getServicecasesExtended(_a) {
|
|
74
74
|
return __awaiter(this, arguments, void 0, function* ({ email, id, priority = 5, }) {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
75
|
+
let servicecases = [];
|
|
76
|
+
if (email) {
|
|
77
|
+
servicecases = yield this.methodRequest.request({
|
|
78
|
+
requestMethod: "GET",
|
|
79
|
+
methodName: "servicecases-extended",
|
|
80
|
+
params: {
|
|
81
|
+
email: email !== null && email !== void 0 ? email : "",
|
|
82
|
+
id: id !== null && id !== void 0 ? id : "",
|
|
83
|
+
},
|
|
84
|
+
inputValidationModel: zod_1.z
|
|
85
|
+
.object({
|
|
86
|
+
email: zod_1.z.string().email(),
|
|
87
|
+
id: zod_1.z.string().optional(),
|
|
88
|
+
})
|
|
89
|
+
.describe("ServicecaseExtendedInput"),
|
|
90
|
+
responseValidationModel: Servicecase_1.ServicecaseMethodResponse,
|
|
91
|
+
priority,
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
else if (id) {
|
|
95
|
+
servicecases = yield this.methodRequest.request({
|
|
96
|
+
requestMethod: "GET",
|
|
97
|
+
methodName: "servicecases-extended-name",
|
|
98
|
+
params: {
|
|
99
|
+
id: id,
|
|
100
|
+
},
|
|
101
|
+
inputValidationModel: zod_1.z
|
|
102
|
+
.object({
|
|
103
|
+
id: zod_1.z.string(),
|
|
104
|
+
})
|
|
105
|
+
.describe("ServicecaseExtendedInput"),
|
|
106
|
+
responseValidationModel: Servicecase_1.ServicecaseMethodResponse,
|
|
107
|
+
priority,
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
else {
|
|
111
|
+
throw new Error("Either email or id must be provided");
|
|
112
|
+
}
|
|
91
113
|
return servicecases;
|
|
92
114
|
});
|
|
93
115
|
}
|
|
@@ -81,7 +81,7 @@ exports.ReturnItemBase = zod_1.z
|
|
|
81
81
|
bundle_parent_item: zod_1.z.string().optional().nullable(),
|
|
82
82
|
return_quantity: zod_1.z.number(),
|
|
83
83
|
total_price: zod_1.z.number().optional().nullable(),
|
|
84
|
-
return_fee: zod_1.z.number().optional().nullable(),
|
|
84
|
+
return_fee: zod_1.z.number().optional().nullable(), // TODO: Remove when return shipping items is implemented
|
|
85
85
|
is_complaint: zod_1.z.number(),
|
|
86
86
|
intent: zod_1.z.enum(["return", "solve"]).optional().nullable(),
|
|
87
87
|
servicecase_reason: zod_1.z.string().optional().nullable(),
|
|
@@ -90,7 +90,7 @@ exports.ReturnItemBase = zod_1.z
|
|
|
90
90
|
complaint_description: zod_1.z.string().optional().nullable(),
|
|
91
91
|
internal_reasons: zod_1.z.string().optional().nullable(),
|
|
92
92
|
attachments: zod_1.z.string().optional().nullable(),
|
|
93
|
-
return_label: zod_1.z.string().optional().nullable(),
|
|
93
|
+
return_label: zod_1.z.string().optional().nullable(), // TODO: Remove when return shipping items is implemented
|
|
94
94
|
})
|
|
95
95
|
.describe("ReturnItemBase");
|
|
96
96
|
exports.ReturnItemInput = exports.ReturnItemBase.extend({
|