erpnext-queue-client 1.25.2 → 1.26.0
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.
|
@@ -8,7 +8,9 @@ export declare class ERPNextServicecase {
|
|
|
8
8
|
protected baseRequest: ERPNextDoctypeResourceRequest<typeof Servicecase>;
|
|
9
9
|
protected attachmentCollectionRequest: ERPNextDoctypeResourceRequest<typeof AttachmentCollection>;
|
|
10
10
|
protected internalReasonCollectionRequest: ERPNextDoctypeResourceRequest<typeof InternalReasonCollection>;
|
|
11
|
-
create: (servicecase: ServicecaseInputType
|
|
11
|
+
create: (servicecase: ServicecaseInputType, options?: {
|
|
12
|
+
priority: number;
|
|
13
|
+
}) => Promise<{
|
|
12
14
|
status: "EDITING" | "SUBMITTED" | "COMPLETED";
|
|
13
15
|
name: string;
|
|
14
16
|
country: string;
|
|
@@ -142,7 +144,9 @@ export declare class ERPNextServicecase {
|
|
|
142
144
|
customer_message?: string | null | undefined;
|
|
143
145
|
agreed_terms?: string | null | undefined;
|
|
144
146
|
}>;
|
|
145
|
-
updateById: (resourceId: string, servicecase: ServicecaseInputType
|
|
147
|
+
updateById: (resourceId: string, servicecase: ServicecaseInputType, options?: {
|
|
148
|
+
priority: number;
|
|
149
|
+
}) => Promise<{
|
|
146
150
|
status: "EDITING" | "SUBMITTED" | "COMPLETED";
|
|
147
151
|
name: string;
|
|
148
152
|
country: string;
|
|
@@ -188,7 +192,9 @@ export declare class ERPNextServicecase {
|
|
|
188
192
|
priority?: number;
|
|
189
193
|
}) => Promise<z.TypeOf<typeof import("../model/ERPNextResponse").DeleteResponseModel>>;
|
|
190
194
|
constructor(temporalClient: TemporalClient);
|
|
191
|
-
createServicecase(servicecase: ServicecaseInputType
|
|
195
|
+
createServicecase(servicecase: ServicecaseInputType, options?: {
|
|
196
|
+
priority: number;
|
|
197
|
+
}): Promise<{
|
|
192
198
|
status: "EDITING" | "SUBMITTED" | "COMPLETED";
|
|
193
199
|
name: string;
|
|
194
200
|
country: string;
|
|
@@ -229,7 +235,9 @@ export declare class ERPNextServicecase {
|
|
|
229
235
|
customer_message?: string | null | undefined;
|
|
230
236
|
agreed_terms?: string | null | undefined;
|
|
231
237
|
}>;
|
|
232
|
-
updateServicecase(resourceId: string, servicecase: ServicecaseInputType
|
|
238
|
+
updateServicecase(resourceId: string, servicecase: ServicecaseInputType, options?: {
|
|
239
|
+
priority: number;
|
|
240
|
+
}): Promise<{
|
|
233
241
|
status: "EDITING" | "SUBMITTED" | "COMPLETED";
|
|
234
242
|
name: string;
|
|
235
243
|
country: string;
|
|
@@ -270,9 +278,12 @@ export declare class ERPNextServicecase {
|
|
|
270
278
|
customer_message?: string | null | undefined;
|
|
271
279
|
agreed_terms?: string | null | undefined;
|
|
272
280
|
}>;
|
|
273
|
-
getServicecasesExtended({ email, id, }: {
|
|
281
|
+
getServicecasesExtended({ email, id, options, }: {
|
|
274
282
|
email: string;
|
|
275
283
|
id?: string;
|
|
284
|
+
options: {
|
|
285
|
+
priority: number;
|
|
286
|
+
};
|
|
276
287
|
}): Promise<{
|
|
277
288
|
status: "EDITING" | "SUBMITTED" | "COMPLETED";
|
|
278
289
|
name: string;
|
|
@@ -319,7 +330,9 @@ export declare class ERPNextServicecase {
|
|
|
319
330
|
customer_message?: string | null | undefined;
|
|
320
331
|
agreed_terms?: string | null | undefined;
|
|
321
332
|
}[]>;
|
|
322
|
-
attachmentUpdate(resourceId: string, body: AttachmentCollectionInputType
|
|
333
|
+
attachmentUpdate(resourceId: string, body: AttachmentCollectionInputType, options?: {
|
|
334
|
+
priority: number;
|
|
335
|
+
}): Promise<{
|
|
323
336
|
name: string;
|
|
324
337
|
owner: string;
|
|
325
338
|
creation: string;
|
|
@@ -336,7 +349,9 @@ export declare class ERPNextServicecase {
|
|
|
336
349
|
idx: number;
|
|
337
350
|
}[];
|
|
338
351
|
}>;
|
|
339
|
-
internalReasonUpdate(resourceId: string, body: InternalReasonCollectionInputType
|
|
352
|
+
internalReasonUpdate(resourceId: string, body: InternalReasonCollectionInputType, options?: {
|
|
353
|
+
priority: number;
|
|
354
|
+
}): Promise<{
|
|
340
355
|
name: string;
|
|
341
356
|
owner: string;
|
|
342
357
|
creation: string;
|
|
@@ -27,8 +27,8 @@ class ERPNextServicecase {
|
|
|
27
27
|
this.updateById = this.updateServicecase;
|
|
28
28
|
this.deleteById = this.baseRequest.deleteById;
|
|
29
29
|
}
|
|
30
|
-
createServicecase(
|
|
31
|
-
return __awaiter(this,
|
|
30
|
+
createServicecase(servicecase_1) {
|
|
31
|
+
return __awaiter(this, arguments, void 0, function* (servicecase, options = { priority: 5 }) {
|
|
32
32
|
var _a;
|
|
33
33
|
for (const returnItem of (_a = servicecase.return_items) !== null && _a !== void 0 ? _a : []) {
|
|
34
34
|
const attachmentCollection = yield this.attachmentCollectionRequest.create({
|
|
@@ -41,12 +41,13 @@ class ERPNextServicecase {
|
|
|
41
41
|
const newServicecase = yield this.baseRequest.create({
|
|
42
42
|
body: servicecase,
|
|
43
43
|
inputValidationModel: Servicecase_1.ServicecaseInput,
|
|
44
|
+
priority: options.priority,
|
|
44
45
|
});
|
|
45
46
|
return newServicecase;
|
|
46
47
|
});
|
|
47
48
|
}
|
|
48
|
-
updateServicecase(
|
|
49
|
-
return __awaiter(this,
|
|
49
|
+
updateServicecase(resourceId_1, servicecase_1) {
|
|
50
|
+
return __awaiter(this, arguments, void 0, function* (resourceId, servicecase, options = { priority: 5 }) {
|
|
50
51
|
var _a;
|
|
51
52
|
for (const returnItem of (_a = servicecase.return_items) !== null && _a !== void 0 ? _a : []) {
|
|
52
53
|
if (!returnItem.attachments) {
|
|
@@ -64,12 +65,13 @@ class ERPNextServicecase {
|
|
|
64
65
|
resourceId,
|
|
65
66
|
body: servicecase,
|
|
66
67
|
inputValidationModel: Servicecase_1.ServicecaseInput,
|
|
68
|
+
priority: options.priority,
|
|
67
69
|
});
|
|
68
70
|
return updatedServicecase;
|
|
69
71
|
});
|
|
70
72
|
}
|
|
71
73
|
getServicecasesExtended(_a) {
|
|
72
|
-
return __awaiter(this, arguments, void 0, function* ({ email, id, }) {
|
|
74
|
+
return __awaiter(this, arguments, void 0, function* ({ email, id, options = { priority: 5 }, }) {
|
|
73
75
|
const servicecases = yield this.methodRequest.request({
|
|
74
76
|
requestMethod: "GET",
|
|
75
77
|
methodName: "servicecases-extended",
|
|
@@ -84,25 +86,28 @@ class ERPNextServicecase {
|
|
|
84
86
|
})
|
|
85
87
|
.describe("ServicecaseExtendedInput"),
|
|
86
88
|
responseValidationModel: Servicecase_1.ServicecaseMethodResponse,
|
|
89
|
+
priority: options.priority,
|
|
87
90
|
});
|
|
88
91
|
return servicecases;
|
|
89
92
|
});
|
|
90
93
|
}
|
|
91
|
-
attachmentUpdate(
|
|
92
|
-
return __awaiter(this,
|
|
94
|
+
attachmentUpdate(resourceId_1, body_1) {
|
|
95
|
+
return __awaiter(this, arguments, void 0, function* (resourceId, body, options = { priority: 5 }) {
|
|
93
96
|
return yield this.attachmentCollectionRequest.updateById({
|
|
94
97
|
resourceId,
|
|
95
98
|
body,
|
|
96
99
|
inputValidationModel: Servicecase_1.UpdateAttachmentCollectionInput,
|
|
100
|
+
priority: options.priority,
|
|
97
101
|
});
|
|
98
102
|
});
|
|
99
103
|
}
|
|
100
|
-
internalReasonUpdate(
|
|
101
|
-
return __awaiter(this,
|
|
104
|
+
internalReasonUpdate(resourceId_1, body_1) {
|
|
105
|
+
return __awaiter(this, arguments, void 0, function* (resourceId, body, options = { priority: 5 }) {
|
|
102
106
|
return yield this.internalReasonCollectionRequest.updateById({
|
|
103
107
|
resourceId,
|
|
104
108
|
body,
|
|
105
109
|
inputValidationModel: Servicecase_1.UpdateInternalReasonCollectionInput,
|
|
110
|
+
priority: options.priority,
|
|
106
111
|
});
|
|
107
112
|
});
|
|
108
113
|
}
|
|
@@ -47,10 +47,10 @@ export declare const ServiceportalProductConfiguration: z.ZodObject<{
|
|
|
47
47
|
modified_by: z.ZodString;
|
|
48
48
|
title: z.ZodString;
|
|
49
49
|
return_fee: z.ZodNumber;
|
|
50
|
-
return_fee_explanation: z.ZodString
|
|
50
|
+
return_fee_explanation: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
51
51
|
is_ask_for_batch_number: z.ZodNumber;
|
|
52
52
|
batch_number_location_description: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
53
|
-
return_conditions: z.ZodString
|
|
53
|
+
return_conditions: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
54
54
|
doctype: z.ZodLiteral<"Serviceportal Product Configuration">;
|
|
55
55
|
batch_numbers: z.ZodArray<z.ZodObject<{
|
|
56
56
|
name: z.ZodString;
|
|
@@ -158,9 +158,7 @@ export declare const ServiceportalProductConfiguration: z.ZodObject<{
|
|
|
158
158
|
internal_reason: string;
|
|
159
159
|
}[];
|
|
160
160
|
return_fee: number;
|
|
161
|
-
return_fee_explanation: string;
|
|
162
161
|
is_ask_for_batch_number: number;
|
|
163
|
-
return_conditions: string;
|
|
164
162
|
batch_numbers: {
|
|
165
163
|
name: string;
|
|
166
164
|
doctype: "Batch Number List";
|
|
@@ -175,7 +173,9 @@ export declare const ServiceportalProductConfiguration: z.ZodObject<{
|
|
|
175
173
|
docstatus: number;
|
|
176
174
|
batch_number: string;
|
|
177
175
|
}[];
|
|
176
|
+
return_fee_explanation?: string | null | undefined;
|
|
178
177
|
batch_number_location_description?: string | null | undefined;
|
|
178
|
+
return_conditions?: string | null | undefined;
|
|
179
179
|
return_shipping_provider?: string | null | undefined;
|
|
180
180
|
return_instructions?: string | null | undefined;
|
|
181
181
|
internal_reasons_section?: string | null | undefined;
|
|
@@ -202,9 +202,7 @@ export declare const ServiceportalProductConfiguration: z.ZodObject<{
|
|
|
202
202
|
internal_reason: string;
|
|
203
203
|
}[];
|
|
204
204
|
return_fee: number;
|
|
205
|
-
return_fee_explanation: string;
|
|
206
205
|
is_ask_for_batch_number: number;
|
|
207
|
-
return_conditions: string;
|
|
208
206
|
batch_numbers: {
|
|
209
207
|
name: string;
|
|
210
208
|
doctype: "Batch Number List";
|
|
@@ -219,7 +217,9 @@ export declare const ServiceportalProductConfiguration: z.ZodObject<{
|
|
|
219
217
|
docstatus: number;
|
|
220
218
|
batch_number: string;
|
|
221
219
|
}[];
|
|
220
|
+
return_fee_explanation?: string | null | undefined;
|
|
222
221
|
batch_number_location_description?: string | null | undefined;
|
|
222
|
+
return_conditions?: string | null | undefined;
|
|
223
223
|
return_shipping_provider?: string | null | undefined;
|
|
224
224
|
return_instructions?: string | null | undefined;
|
|
225
225
|
internal_reasons_section?: string | null | undefined;
|
|
@@ -233,10 +233,10 @@ export declare const ServiceportalProductConfigurationInput: z.ZodObject<Omit<{
|
|
|
233
233
|
modified_by: z.ZodString;
|
|
234
234
|
title: z.ZodString;
|
|
235
235
|
return_fee: z.ZodNumber;
|
|
236
|
-
return_fee_explanation: z.ZodString
|
|
236
|
+
return_fee_explanation: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
237
237
|
is_ask_for_batch_number: z.ZodNumber;
|
|
238
238
|
batch_number_location_description: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
239
|
-
return_conditions: z.ZodString
|
|
239
|
+
return_conditions: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
240
240
|
doctype: z.ZodLiteral<"Serviceportal Product Configuration">;
|
|
241
241
|
batch_numbers: z.ZodArray<z.ZodObject<{
|
|
242
242
|
name: z.ZodString;
|
|
@@ -365,13 +365,13 @@ export declare const ServiceportalProductConfigurationInput: z.ZodObject<Omit<{
|
|
|
365
365
|
internal_reason: string;
|
|
366
366
|
}[];
|
|
367
367
|
return_fee: number;
|
|
368
|
-
return_fee_explanation: string;
|
|
369
368
|
is_ask_for_batch_number: number;
|
|
370
|
-
return_conditions: string;
|
|
371
369
|
batch_numbers: {
|
|
372
370
|
batch_number: string;
|
|
373
371
|
}[];
|
|
372
|
+
return_fee_explanation?: string | null | undefined;
|
|
374
373
|
batch_number_location_description?: string | null | undefined;
|
|
374
|
+
return_conditions?: string | null | undefined;
|
|
375
375
|
return_shipping_provider?: string | null | undefined;
|
|
376
376
|
return_instructions?: string | null | undefined;
|
|
377
377
|
internal_reasons_section?: string | null | undefined;
|
|
@@ -382,13 +382,13 @@ export declare const ServiceportalProductConfigurationInput: z.ZodObject<Omit<{
|
|
|
382
382
|
internal_reason: string;
|
|
383
383
|
}[];
|
|
384
384
|
return_fee: number;
|
|
385
|
-
return_fee_explanation: string;
|
|
386
385
|
is_ask_for_batch_number: number;
|
|
387
|
-
return_conditions: string;
|
|
388
386
|
batch_numbers: {
|
|
389
387
|
batch_number: string;
|
|
390
388
|
}[];
|
|
389
|
+
return_fee_explanation?: string | null | undefined;
|
|
391
390
|
batch_number_location_description?: string | null | undefined;
|
|
391
|
+
return_conditions?: string | null | undefined;
|
|
392
392
|
return_shipping_provider?: string | null | undefined;
|
|
393
393
|
return_instructions?: string | null | undefined;
|
|
394
394
|
internal_reasons_section?: string | null | undefined;
|
|
@@ -41,10 +41,10 @@ exports.ServiceportalProductConfiguration = zod_1.z
|
|
|
41
41
|
modified_by: zod_1.z.string(),
|
|
42
42
|
title: zod_1.z.string(),
|
|
43
43
|
return_fee: zod_1.z.number(),
|
|
44
|
-
return_fee_explanation: zod_1.z.string(),
|
|
44
|
+
return_fee_explanation: zod_1.z.string().optional().nullable(),
|
|
45
45
|
is_ask_for_batch_number: zod_1.z.number(),
|
|
46
46
|
batch_number_location_description: zod_1.z.string().optional().nullable(),
|
|
47
|
-
return_conditions: zod_1.z.string(),
|
|
47
|
+
return_conditions: zod_1.z.string().optional().nullable(),
|
|
48
48
|
doctype: zod_1.z.literal("Serviceportal Product Configuration"),
|
|
49
49
|
batch_numbers: zod_1.z.array(BatchNumberList),
|
|
50
50
|
internal_reasons: zod_1.z.array(exports.InternalReasonList),
|