erpnext-queue-client 1.25.3 → 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
|
}
|