erpnext-queue-client 1.29.2 → 1.29.4
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.
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import z from "zod";
|
|
1
2
|
import { TemporalClient } from "../../client";
|
|
2
3
|
import { ERPNextDoctypeSubmittableResourceRequest } from "../doctypeSubmittableResourceRequest";
|
|
3
4
|
import { ERPNextMethodRequest } from "../methodRequest";
|
|
@@ -304,7 +305,7 @@ export declare class ERPNextShipment {
|
|
|
304
305
|
custom_return_shipping_provider?: string | null | undefined;
|
|
305
306
|
tracking_status_info?: string | null | undefined;
|
|
306
307
|
tracking_url?: string | null | undefined;
|
|
307
|
-
}> : TInputModel extends
|
|
308
|
+
}> : TInputModel extends z.ZodTypeAny ? Partial<z.TypeOf<TInputModel>> : any, TInputModel extends z.ZodTypeAny | undefined = undefined>({ resourceId, inputValidationModel, body, priority, }: {
|
|
308
309
|
resourceId: string;
|
|
309
310
|
inputValidationModel?: TInputModel;
|
|
310
311
|
priority?: number;
|
|
@@ -408,7 +409,7 @@ export declare class ERPNextShipment {
|
|
|
408
409
|
deleteById: ({ resourceId, priority, }: {
|
|
409
410
|
resourceId: string;
|
|
410
411
|
priority?: number;
|
|
411
|
-
}) => Promise<
|
|
412
|
+
}) => Promise<z.TypeOf<typeof import("../model/ERPNextResponse").DeleteResponseModel>>;
|
|
412
413
|
create: <TInput extends TInputModel extends undefined ? Partial<{
|
|
413
414
|
status: string;
|
|
414
415
|
name: string;
|
|
@@ -504,7 +505,7 @@ export declare class ERPNextShipment {
|
|
|
504
505
|
custom_return_shipping_provider?: string | null | undefined;
|
|
505
506
|
tracking_status_info?: string | null | undefined;
|
|
506
507
|
tracking_url?: string | null | undefined;
|
|
507
|
-
}> : TInputModel extends
|
|
508
|
+
}> : TInputModel extends z.ZodTypeAny ? z.TypeOf<TInputModel> : any, TInputModel extends z.ZodTypeAny | undefined = undefined>({ inputValidationModel, body, params, priority, }: {
|
|
508
509
|
inputValidationModel?: TInputModel;
|
|
509
510
|
body: TInput;
|
|
510
511
|
params?: Record<string, string>;
|
|
@@ -848,6 +849,21 @@ export declare class ERPNextShipment {
|
|
|
848
849
|
delivery_contact?: string | undefined;
|
|
849
850
|
incoterm?: string | null | undefined;
|
|
850
851
|
}>;
|
|
852
|
+
getShipmentInfoByOrderNumber(orderNumber: string): Promise<{
|
|
853
|
+
name: string;
|
|
854
|
+
address_title: string;
|
|
855
|
+
creation: string;
|
|
856
|
+
item_code: string;
|
|
857
|
+
qty: number;
|
|
858
|
+
item_name: string;
|
|
859
|
+
address_line1?: string | null | undefined;
|
|
860
|
+
address_line2?: string | null | undefined;
|
|
861
|
+
city?: string | null | undefined;
|
|
862
|
+
pincode?: string | null | undefined;
|
|
863
|
+
country?: string | null | undefined;
|
|
864
|
+
image?: string | null | undefined;
|
|
865
|
+
shipping_label?: string | null | undefined;
|
|
866
|
+
}[]>;
|
|
851
867
|
addShippingLabelAndSubmit(shipmentErpNextName: string, body: ShipmentAddShippingLabelAndSubmitBodyType): Promise<{
|
|
852
868
|
status: string;
|
|
853
869
|
name: string;
|
|
@@ -37,6 +37,17 @@ class ERPNextShipment {
|
|
|
37
37
|
return draft;
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
|
+
getShipmentInfoByOrderNumber(orderNumber) {
|
|
41
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
42
|
+
const shipmentInfo = yield this.methodRequest.request({
|
|
43
|
+
methodName: "shipment-by-order-number",
|
|
44
|
+
requestMethod: "GET",
|
|
45
|
+
params: { order_number: orderNumber },
|
|
46
|
+
responseValidationModel: Shipment_1.ShipmentInfoByOrderNumberMethodResponseData,
|
|
47
|
+
});
|
|
48
|
+
return shipmentInfo;
|
|
49
|
+
});
|
|
50
|
+
}
|
|
40
51
|
addShippingLabelAndSubmit(shipmentErpNextName, body) {
|
|
41
52
|
return __awaiter(this, void 0, void 0, function* () {
|
|
42
53
|
const shipment = yield this.baseRequest.updateById({
|
|
@@ -1137,3 +1137,47 @@ export declare const ShipmentAddShippingLabelAndSubmitBody: z.ZodObject<Pick<{
|
|
|
1137
1137
|
custom_return_shipping_provider?: string | null | undefined;
|
|
1138
1138
|
}>;
|
|
1139
1139
|
export type ShipmentAddShippingLabelAndSubmitBodyType = z.infer<typeof ShipmentAddShippingLabelAndSubmitBody>;
|
|
1140
|
+
export declare const ShipmentInfoByOrderNumberMethodResponseData: z.ZodArray<z.ZodObject<{
|
|
1141
|
+
name: z.ZodString;
|
|
1142
|
+
creation: z.ZodString;
|
|
1143
|
+
item_code: z.ZodString;
|
|
1144
|
+
item_name: z.ZodString;
|
|
1145
|
+
qty: z.ZodNumber;
|
|
1146
|
+
address_title: z.ZodString;
|
|
1147
|
+
shipping_label: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
1148
|
+
address_line1: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
1149
|
+
address_line2: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
1150
|
+
city: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
1151
|
+
country: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
1152
|
+
pincode: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
1153
|
+
image: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
1154
|
+
}, "strip", z.ZodTypeAny, {
|
|
1155
|
+
name: string;
|
|
1156
|
+
address_title: string;
|
|
1157
|
+
creation: string;
|
|
1158
|
+
item_code: string;
|
|
1159
|
+
qty: number;
|
|
1160
|
+
item_name: string;
|
|
1161
|
+
address_line1?: string | null | undefined;
|
|
1162
|
+
address_line2?: string | null | undefined;
|
|
1163
|
+
city?: string | null | undefined;
|
|
1164
|
+
pincode?: string | null | undefined;
|
|
1165
|
+
country?: string | null | undefined;
|
|
1166
|
+
image?: string | null | undefined;
|
|
1167
|
+
shipping_label?: string | null | undefined;
|
|
1168
|
+
}, {
|
|
1169
|
+
name: string;
|
|
1170
|
+
address_title: string;
|
|
1171
|
+
creation: string;
|
|
1172
|
+
item_code: string;
|
|
1173
|
+
qty: number;
|
|
1174
|
+
item_name: string;
|
|
1175
|
+
address_line1?: string | null | undefined;
|
|
1176
|
+
address_line2?: string | null | undefined;
|
|
1177
|
+
city?: string | null | undefined;
|
|
1178
|
+
pincode?: string | null | undefined;
|
|
1179
|
+
country?: string | null | undefined;
|
|
1180
|
+
image?: string | null | undefined;
|
|
1181
|
+
shipping_label?: string | null | undefined;
|
|
1182
|
+
}>, "many">;
|
|
1183
|
+
export type ShipmentInfoByOrderNumberMethodResponseDataType = z.infer<typeof ShipmentInfoByOrderNumberMethodResponseData>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ShipmentAddShippingLabelAndSubmitBody = exports.ShipmentDraftPostBody = exports.Shipment = exports.ShipmentParcelPostBody = exports.ShipmentParcel = exports.ShipmentDraftFromDeliveryNote = void 0;
|
|
3
|
+
exports.ShipmentInfoByOrderNumberMethodResponseData = exports.ShipmentAddShippingLabelAndSubmitBody = exports.ShipmentDraftPostBody = exports.Shipment = exports.ShipmentParcelPostBody = exports.ShipmentParcel = exports.ShipmentDraftFromDeliveryNote = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const Onload = zod_1.z
|
|
6
6
|
.object({
|
|
@@ -189,3 +189,20 @@ exports.ShipmentAddShippingLabelAndSubmitBody = exports.Shipment.pick({
|
|
|
189
189
|
custom_return_shipping_provider: true,
|
|
190
190
|
docstatus: true,
|
|
191
191
|
});
|
|
192
|
+
exports.ShipmentInfoByOrderNumberMethodResponseData = zod_1.z
|
|
193
|
+
.array(zod_1.z.object({
|
|
194
|
+
name: zod_1.z.string(),
|
|
195
|
+
creation: zod_1.z.string(),
|
|
196
|
+
item_code: zod_1.z.string(),
|
|
197
|
+
item_name: zod_1.z.string(),
|
|
198
|
+
qty: zod_1.z.number(),
|
|
199
|
+
address_title: zod_1.z.string(),
|
|
200
|
+
shipping_label: zod_1.z.string().optional().nullable(),
|
|
201
|
+
address_line1: zod_1.z.string().optional().nullable(),
|
|
202
|
+
address_line2: zod_1.z.string().optional().nullable(),
|
|
203
|
+
city: zod_1.z.string().optional().nullable(),
|
|
204
|
+
country: zod_1.z.string().optional().nullable(),
|
|
205
|
+
pincode: zod_1.z.string().optional().nullable(),
|
|
206
|
+
image: zod_1.z.string().optional().nullable(),
|
|
207
|
+
}))
|
|
208
|
+
.describe("Array of shipment info objects");
|