erpnext-queue-client 1.34.1 → 1.34.3
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({
|
|
@@ -17,6 +17,7 @@ export declare const ShippingLabel: z.ZodObject<{
|
|
|
17
17
|
doctype: z.ZodString;
|
|
18
18
|
document_name: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
19
19
|
document_url: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
20
|
+
order_number: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
20
21
|
}, "strip", z.ZodTypeAny, {
|
|
21
22
|
name: string;
|
|
22
23
|
doctype: string;
|
|
@@ -29,6 +30,7 @@ export declare const ShippingLabel: z.ZodObject<{
|
|
|
29
30
|
shipping_provider: string;
|
|
30
31
|
label_id: string;
|
|
31
32
|
address?: string | null | undefined;
|
|
33
|
+
order_number?: string | null | undefined;
|
|
32
34
|
customer?: string | null | undefined;
|
|
33
35
|
tracking_code?: string | null | undefined;
|
|
34
36
|
label_type?: "Shipping Label" | "Return Label" | null | undefined;
|
|
@@ -47,6 +49,7 @@ export declare const ShippingLabel: z.ZodObject<{
|
|
|
47
49
|
shipping_provider: string;
|
|
48
50
|
label_id: string;
|
|
49
51
|
address?: string | null | undefined;
|
|
52
|
+
order_number?: string | null | undefined;
|
|
50
53
|
customer?: string | null | undefined;
|
|
51
54
|
tracking_code?: string | null | undefined;
|
|
52
55
|
label_type?: "Shipping Label" | "Return Label" | null | undefined;
|
|
@@ -72,10 +75,12 @@ export declare const ShippingLabelPostBody: z.ZodObject<Pick<{
|
|
|
72
75
|
doctype: z.ZodString;
|
|
73
76
|
document_name: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
74
77
|
document_url: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
75
|
-
|
|
78
|
+
order_number: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
79
|
+
}, "address" | "order_number" | "customer" | "shipping_provider" | "label_id" | "tracking_code" | "label_type" | "contact" | "document_name" | "document_url">, "strip", z.ZodTypeAny, {
|
|
76
80
|
shipping_provider: string;
|
|
77
81
|
label_id: string;
|
|
78
82
|
address?: string | null | undefined;
|
|
83
|
+
order_number?: string | null | undefined;
|
|
79
84
|
customer?: string | null | undefined;
|
|
80
85
|
tracking_code?: string | null | undefined;
|
|
81
86
|
label_type?: "Shipping Label" | "Return Label" | null | undefined;
|
|
@@ -86,6 +91,7 @@ export declare const ShippingLabelPostBody: z.ZodObject<Pick<{
|
|
|
86
91
|
shipping_provider: string;
|
|
87
92
|
label_id: string;
|
|
88
93
|
address?: string | null | undefined;
|
|
94
|
+
order_number?: string | null | undefined;
|
|
89
95
|
customer?: string | null | undefined;
|
|
90
96
|
tracking_code?: string | null | undefined;
|
|
91
97
|
label_type?: "Shipping Label" | "Return Label" | null | undefined;
|
|
@@ -25,6 +25,7 @@ exports.ShippingLabel = zod_1.z
|
|
|
25
25
|
doctype: zod_1.z.string(),
|
|
26
26
|
document_name: zod_1.z.string().optional().nullable(),
|
|
27
27
|
document_url: zod_1.z.string().optional().nullable(),
|
|
28
|
+
order_number: zod_1.z.string().optional().nullable(),
|
|
28
29
|
})
|
|
29
30
|
.describe("Shipping Label");
|
|
30
31
|
exports.ShippingLabelPostBody = exports.ShippingLabel.pick({
|
|
@@ -37,6 +38,7 @@ exports.ShippingLabelPostBody = exports.ShippingLabel.pick({
|
|
|
37
38
|
label_type: true,
|
|
38
39
|
document_url: true,
|
|
39
40
|
document_name: true,
|
|
41
|
+
order_number: true,
|
|
40
42
|
}).describe("Shipping Label Post Body");
|
|
41
43
|
exports.UploadedLabelInfo = zod_1.z
|
|
42
44
|
.object({
|