erpnext-queue-client 1.22.1 → 1.22.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.
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ServicecaseMethodResponse = exports.ServicecaseExtended = exports.ServicecaseInput = exports.Servicecase = exports.ServicecaseBase = exports.ReturnItemExtended = exports.ReturnItem = exports.ReturnItemInput = exports.ReturnItemBase = exports.UpdateInternalReasonCollectionInput = exports.InternalReasonCollection = exports.UpdateAttachmentCollectionInput = exports.AttachmentCollection = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
const Country_1 = require("./Country");
|
|
6
5
|
const Shop = zod_1.z.enum(["Shopify", "Amazon FBA", "Amazon FBM", "Otto"]);
|
|
7
6
|
const Status = zod_1.z.enum([
|
|
8
7
|
"EDITING",
|
|
@@ -84,16 +83,17 @@ exports.ReturnItemBase = zod_1.z
|
|
|
84
83
|
return_quantity: zod_1.z.number(),
|
|
85
84
|
total_price: zod_1.z.number().optional().nullable(),
|
|
86
85
|
return_fee: zod_1.z.number().optional().nullable(),
|
|
87
|
-
is_complaint: zod_1.z.
|
|
86
|
+
is_complaint: zod_1.z.number(),
|
|
88
87
|
servicecase_reason: zod_1.z.string().optional().nullable(),
|
|
89
88
|
servicecase_solution: zod_1.z.string().optional().nullable(),
|
|
90
89
|
batch_number: zod_1.z.string().optional().nullable(),
|
|
91
90
|
complaint_description: zod_1.z.string().optional().nullable(),
|
|
91
|
+
internal_reasons: zod_1.z.string().optional().nullable(),
|
|
92
|
+
attachments: zod_1.z.string().optional().nullable(),
|
|
92
93
|
})
|
|
93
94
|
.describe("ReturnItemBase");
|
|
94
95
|
exports.ReturnItemInput = exports.ReturnItemBase.extend({
|
|
95
|
-
|
|
96
|
-
attachments: zod_1.z.string().optional().nullable(),
|
|
96
|
+
is_complaint: zod_1.z.preprocess((i) => Number(i), zod_1.z.number()),
|
|
97
97
|
}).describe("ReturnItemInput");
|
|
98
98
|
exports.ReturnItem = exports.ReturnItemBase.extend({
|
|
99
99
|
name: zod_1.z.string(),
|
|
@@ -102,8 +102,6 @@ exports.ReturnItem = exports.ReturnItemBase.extend({
|
|
|
102
102
|
modified: zod_1.z.string(),
|
|
103
103
|
modified_by: zod_1.z.string(),
|
|
104
104
|
idx: zod_1.z.number(),
|
|
105
|
-
internal_reasons: zod_1.z.string().optional().nullable(),
|
|
106
|
-
attachments: zod_1.z.string().optional().nullable(),
|
|
107
105
|
}).describe("ReturnItem");
|
|
108
106
|
exports.ReturnItemExtended = exports.ReturnItemBase.extend({
|
|
109
107
|
name: zod_1.z.string(),
|
|
@@ -112,7 +110,8 @@ exports.ReturnItemExtended = exports.ReturnItemBase.extend({
|
|
|
112
110
|
modified: zod_1.z.string(),
|
|
113
111
|
modified_by: zod_1.z.string(),
|
|
114
112
|
idx: zod_1.z.number(),
|
|
115
|
-
attachments: zod_1.z.array(zod_1.z.string()),
|
|
113
|
+
attachments: zod_1.z.array(zod_1.z.object({ url: zod_1.z.string(), type: zod_1.z.enum(["image", "video"]) })),
|
|
114
|
+
is_complaint: zod_1.z.number().transform(Boolean),
|
|
116
115
|
attachments_collection_name: zod_1.z.string().optional().nullable(),
|
|
117
116
|
internal_reasons: zod_1.z.array(zod_1.z.string()),
|
|
118
117
|
internal_reasons_collection_name: zod_1.z.string().optional().nullable(),
|
|
@@ -127,18 +126,12 @@ exports.ServicecaseBase = zod_1.z
|
|
|
127
126
|
customer_email: zod_1.z.string().email().optional().nullable(),
|
|
128
127
|
status: Status.default("EDITING"),
|
|
129
128
|
complaint_date: zod_1.z.string().optional().nullable(),
|
|
130
|
-
is_sent_to_client: zod_1.z
|
|
131
|
-
|
|
132
|
-
.optional()
|
|
133
|
-
.nullable(),
|
|
134
|
-
is_sent_to_cc: zod_1.z
|
|
135
|
-
.preprocess((val) => Number(val), zod_1.z.number().transform(Boolean))
|
|
136
|
-
.optional()
|
|
137
|
-
.nullable(),
|
|
129
|
+
is_sent_to_client: zod_1.z.number().optional().nullable(),
|
|
130
|
+
is_sent_to_cc: zod_1.z.number().optional().nullable(),
|
|
138
131
|
customer_message: zod_1.z.string().optional().nullable(),
|
|
139
132
|
agreed_terms: zod_1.z.string().optional().nullable(),
|
|
140
133
|
created_with: CreatedWith.default("Serviceportal"),
|
|
141
|
-
country:
|
|
134
|
+
country: zod_1.z.string(),
|
|
142
135
|
})
|
|
143
136
|
.describe("Servicecase Base");
|
|
144
137
|
exports.Servicecase = exports.ServicecaseBase.extend({
|
|
@@ -148,12 +141,18 @@ exports.Servicecase = exports.ServicecaseBase.extend({
|
|
|
148
141
|
modified: zod_1.z.string(),
|
|
149
142
|
modified_by: zod_1.z.string(),
|
|
150
143
|
return_items: zod_1.z.array(exports.ReturnItem),
|
|
144
|
+
is_sent_to_client: zod_1.z.number().transform(Boolean),
|
|
145
|
+
is_sent_to_cc: zod_1.z.number().transform(Boolean),
|
|
151
146
|
}).describe("Servicecase");
|
|
152
147
|
exports.ServicecaseInput = exports.ServicecaseBase.extend({
|
|
153
148
|
return_items: zod_1.z.array(exports.ReturnItemInput),
|
|
149
|
+
is_sent_to_client: zod_1.z.preprocess((i) => Number(i), zod_1.z.number()),
|
|
150
|
+
is_sent_to_cc: zod_1.z.preprocess((i) => Number(i), zod_1.z.number()),
|
|
154
151
|
}).describe("ServicecaseInput");
|
|
155
152
|
exports.ServicecaseExtended = exports.Servicecase.extend({
|
|
156
153
|
return_items: zod_1.z.array(exports.ReturnItemExtended),
|
|
154
|
+
is_sent_to_client: zod_1.z.number().transform(Boolean),
|
|
155
|
+
is_sent_to_cc: zod_1.z.number().transform(Boolean),
|
|
157
156
|
}).describe("ServicecaseExtended");
|
|
158
157
|
exports.ServicecaseMethodResponse = zod_1.z
|
|
159
158
|
.array(exports.ServicecaseExtended)
|