erpnext-queue-client 1.29.1 → 1.29.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.
@@ -99,6 +99,7 @@ export declare class ERPNextDeliveryNote {
99
99
  discount_amount: number;
100
100
  pricing_rules: string[];
101
101
  title: string;
102
+ order_number: string;
102
103
  customer_name: string;
103
104
  posting_date: string;
104
105
  posting_time: string;
@@ -293,6 +294,7 @@ export declare class ERPNextDeliveryNote {
293
294
  discount_amount: number;
294
295
  pricing_rules: string[];
295
296
  title: string;
297
+ order_number: string;
296
298
  customer_name: string;
297
299
  posting_date: string;
298
300
  posting_time: string;
@@ -390,7 +392,7 @@ export declare class ERPNextDeliveryNote {
390
392
  sales_partner?: string | null | undefined;
391
393
  dispatch_run?: string | null | undefined;
392
394
  }>;
393
- getList: <TField extends ("status" | "name" | "doctype" | "owner" | "creation" | "modified" | "modified_by" | "idx" | "docstatus" | "tax_category" | "company" | "naming_series" | "language" | "customer" | "items" | "discount_amount" | "pricing_rules" | "title" | "customer_name" | "posting_date" | "posting_time" | "set_posting_time" | "is_return" | "issue_credit_note" | "po_no" | "currency" | "conversion_rate" | "selling_price_list" | "price_list_currency" | "plc_conversion_rate" | "ignore_pricing_rule" | "total_qty" | "base_total" | "base_net_total" | "total_net_weight" | "total" | "net_total" | "base_total_taxes_and_charges" | "total_taxes_and_charges" | "apply_discount_on" | "base_discount_amount" | "additional_discount_percentage" | "base_grand_total" | "base_rounding_adjustment" | "base_rounded_total" | "base_in_words" | "grand_total" | "rounding_adjustment" | "rounded_total" | "in_words" | "disable_rounded_total" | "is_internal_customer" | "per_billed" | "customer_group" | "territory" | "print_without_amount" | "group_same_items" | "per_installed" | "installation_status" | "per_returned" | "amount_eligible_for_commission" | "commission_rate" | "total_commission" | "packed_items" | "taxes" | "sales_team") | ("parent" | "parentfield" | "parenttype" | "cost_center" | "project" | "amended_from" | "return_against" | "po_date" | "pick_list" | "shipping_address_name" | "shipping_address" | "dispatch_address_name" | "dispatch_address" | "contact_person" | "contact_display" | "contact_mobile" | "contact_email" | "customer_address" | "tax_id" | "address_display" | "company_address" | "company_address_display" | "set_warehouse" | "set_target_warehouse" | "scan_barcode" | "shipping_rule" | "taxes_and_charges" | "other_charges_calculation" | "tc_name" | "terms" | "transporter" | "driver" | "lr_no" | "vehicle_no" | "transporter_name" | "driver_name" | "lr_date" | "campaign" | "source" | "represents_company" | "inter_company_reference" | "letter_head" | "select_print_heading" | "excise_page" | "instructions" | "auto_repeat" | "sales_partner" | "dispatch_run"), TAsDict extends boolean | undefined = undefined>({ fields, filters, skip, limit, priority, asDict, params, }?: {
395
+ getList: <TField extends ("status" | "name" | "doctype" | "owner" | "creation" | "modified" | "modified_by" | "idx" | "docstatus" | "tax_category" | "company" | "naming_series" | "language" | "customer" | "items" | "discount_amount" | "pricing_rules" | "title" | "order_number" | "customer_name" | "posting_date" | "posting_time" | "set_posting_time" | "is_return" | "issue_credit_note" | "po_no" | "currency" | "conversion_rate" | "selling_price_list" | "price_list_currency" | "plc_conversion_rate" | "ignore_pricing_rule" | "total_qty" | "base_total" | "base_net_total" | "total_net_weight" | "total" | "net_total" | "base_total_taxes_and_charges" | "total_taxes_and_charges" | "apply_discount_on" | "base_discount_amount" | "additional_discount_percentage" | "base_grand_total" | "base_rounding_adjustment" | "base_rounded_total" | "base_in_words" | "grand_total" | "rounding_adjustment" | "rounded_total" | "in_words" | "disable_rounded_total" | "is_internal_customer" | "per_billed" | "customer_group" | "territory" | "print_without_amount" | "group_same_items" | "per_installed" | "installation_status" | "per_returned" | "amount_eligible_for_commission" | "commission_rate" | "total_commission" | "packed_items" | "taxes" | "sales_team") | ("parent" | "parentfield" | "parenttype" | "cost_center" | "project" | "amended_from" | "return_against" | "po_date" | "pick_list" | "shipping_address_name" | "shipping_address" | "dispatch_address_name" | "dispatch_address" | "contact_person" | "contact_display" | "contact_mobile" | "contact_email" | "customer_address" | "tax_id" | "address_display" | "company_address" | "company_address_display" | "set_warehouse" | "set_target_warehouse" | "scan_barcode" | "shipping_rule" | "taxes_and_charges" | "other_charges_calculation" | "tc_name" | "terms" | "transporter" | "driver" | "lr_no" | "vehicle_no" | "transporter_name" | "driver_name" | "lr_date" | "campaign" | "source" | "represents_company" | "inter_company_reference" | "letter_head" | "select_print_heading" | "excise_page" | "instructions" | "auto_repeat" | "sales_partner" | "dispatch_run"), TAsDict extends boolean | undefined = undefined>({ fields, filters, skip, limit, priority, asDict, params, }?: {
394
396
  fields?: TField[] | undefined;
395
397
  filters?: (string | string[])[][];
396
398
  skip?: number;
@@ -491,6 +493,7 @@ export declare class ERPNextDeliveryNote {
491
493
  discount_amount: number;
492
494
  pricing_rules: string[];
493
495
  title: string;
496
+ order_number: string;
494
497
  customer_name: string;
495
498
  posting_date: string;
496
499
  posting_time: string;
@@ -684,6 +687,7 @@ export declare class ERPNextDeliveryNote {
684
687
  discount_amount: number;
685
688
  pricing_rules: string[];
686
689
  title: string;
690
+ order_number: string;
687
691
  customer_name: string;
688
692
  posting_date: string;
689
693
  posting_time: string;
@@ -874,6 +878,7 @@ export declare class ERPNextDeliveryNote {
874
878
  discount_amount: number;
875
879
  pricing_rules: string[];
876
880
  title: string;
881
+ order_number: string;
877
882
  customer_name: string;
878
883
  posting_date: string;
879
884
  posting_time: string;
@@ -1068,6 +1073,7 @@ export declare class ERPNextDeliveryNote {
1068
1073
  discount_amount: number;
1069
1074
  pricing_rules: string[];
1070
1075
  title: string;
1076
+ order_number: string;
1071
1077
  customer_name: string;
1072
1078
  posting_date: string;
1073
1079
  posting_time: string;
@@ -1264,6 +1270,7 @@ export declare class ERPNextDeliveryNote {
1264
1270
  discount_amount: number;
1265
1271
  pricing_rules: string[];
1266
1272
  title: string;
1273
+ order_number: string;
1267
1274
  customer_name: string;
1268
1275
  posting_date: string;
1269
1276
  posting_time: string;
@@ -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 import("zod").ZodTypeAny ? Partial<import("zod").TypeOf<TInputModel>> : any, TInputModel extends import("zod").ZodTypeAny | undefined = undefined>({ resourceId, inputValidationModel, body, priority, }: {
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<import("zod").TypeOf<typeof import("../model/ERPNextResponse").DeleteResponseModel>>;
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 import("zod").ZodTypeAny ? import("zod").TypeOf<TInputModel> : any, TInputModel extends import("zod").ZodTypeAny | undefined = undefined>({ inputValidationModel, body, params, priority, }: {
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;
@@ -8,8 +8,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
11
14
  Object.defineProperty(exports, "__esModule", { value: true });
12
15
  exports.ERPNextShipment = void 0;
16
+ const zod_1 = __importDefault(require("zod"));
13
17
  const doctypeSubmittableResourceRequest_1 = require("../doctypeSubmittableResourceRequest");
14
18
  const methodRequest_1 = require("../methodRequest");
15
19
  const Shipment_1 = require("../model/Shipment");
@@ -37,6 +41,33 @@ class ERPNextShipment {
37
41
  return draft;
38
42
  });
39
43
  }
44
+ getShipmentInfoByOrderNumber(orderNumber) {
45
+ return __awaiter(this, void 0, void 0, function* () {
46
+ const shipmentInfo = yield this.methodRequest.request({
47
+ methodName: "shipment-by-order-number",
48
+ requestMethod: "GET",
49
+ params: { order_number: orderNumber },
50
+ responseValidationModel: zod_1.default
51
+ .array(zod_1.default.object({
52
+ name: zod_1.default.string(),
53
+ creation: zod_1.default.string(),
54
+ item_code: zod_1.default.string(),
55
+ item_name: zod_1.default.string(),
56
+ qty: zod_1.default.number(),
57
+ address_title: zod_1.default.string(),
58
+ shipping_label: zod_1.default.string().optional().nullable(),
59
+ address_line1: zod_1.default.string().optional().nullable(),
60
+ address_line2: zod_1.default.string().optional().nullable(),
61
+ city: zod_1.default.string().optional().nullable(),
62
+ country: zod_1.default.string().optional().nullable(),
63
+ pincode: zod_1.default.string().optional().nullable(),
64
+ image: zod_1.default.string().optional().nullable(),
65
+ }))
66
+ .describe("Array of shipment info objects"),
67
+ });
68
+ return shipmentInfo;
69
+ });
70
+ }
40
71
  addShippingLabelAndSubmit(shipmentErpNextName, body) {
41
72
  return __awaiter(this, void 0, void 0, function* () {
42
73
  const shipment = yield this.baseRequest.updateById({
@@ -41,6 +41,7 @@ export declare const DeliveryNote: z.ZodObject<{
41
41
  docstatus: z.ZodNumber;
42
42
  title: z.ZodString;
43
43
  naming_series: z.ZodString;
44
+ order_number: z.ZodString;
44
45
  customer: z.ZodString;
45
46
  customer_name: z.ZodString;
46
47
  amended_from: z.ZodNullable<z.ZodOptional<z.ZodString>>;
@@ -458,6 +459,7 @@ export declare const DeliveryNote: z.ZodObject<{
458
459
  discount_amount: number;
459
460
  pricing_rules: string[];
460
461
  title: string;
462
+ order_number: string;
461
463
  customer_name: string;
462
464
  posting_date: string;
463
465
  posting_time: string;
@@ -647,6 +649,7 @@ export declare const DeliveryNote: z.ZodObject<{
647
649
  discount_amount: number;
648
650
  pricing_rules: string[];
649
651
  title: string;
652
+ order_number: string;
650
653
  customer_name: string;
651
654
  posting_date: string;
652
655
  posting_time: string;
@@ -757,6 +760,7 @@ export declare const DeliveryNoteListItem: z.ZodObject<Omit<{
757
760
  docstatus: z.ZodNumber;
758
761
  title: z.ZodString;
759
762
  naming_series: z.ZodString;
763
+ order_number: z.ZodString;
760
764
  customer: z.ZodString;
761
765
  customer_name: z.ZodString;
762
766
  amended_from: z.ZodNullable<z.ZodOptional<z.ZodString>>;
@@ -1098,6 +1102,7 @@ export declare const DeliveryNoteListItem: z.ZodObject<Omit<{
1098
1102
  customer: string;
1099
1103
  discount_amount: number;
1100
1104
  title: string;
1105
+ order_number: string;
1101
1106
  customer_name: string;
1102
1107
  posting_date: string;
1103
1108
  posting_time: string;
@@ -1208,6 +1213,7 @@ export declare const DeliveryNoteListItem: z.ZodObject<Omit<{
1208
1213
  customer: string;
1209
1214
  discount_amount: number;
1210
1215
  title: string;
1216
+ order_number: string;
1211
1217
  customer_name: string;
1212
1218
  posting_date: string;
1213
1219
  posting_time: string;
@@ -1316,6 +1322,7 @@ export declare const DeliveryNoteNameList: z.ZodArray<z.ZodObject<Pick<Omit<{
1316
1322
  docstatus: z.ZodNumber;
1317
1323
  title: z.ZodString;
1318
1324
  naming_series: z.ZodString;
1325
+ order_number: z.ZodString;
1319
1326
  customer: z.ZodString;
1320
1327
  customer_name: z.ZodString;
1321
1328
  amended_from: z.ZodNullable<z.ZodOptional<z.ZodString>>;
@@ -103,6 +103,7 @@ exports.DeliveryNote = zod_1.z
103
103
  docstatus: zod_1.z.number(),
104
104
  title: zod_1.z.string(),
105
105
  naming_series: zod_1.z.string(),
106
+ order_number: zod_1.z.string(),
106
107
  customer: zod_1.z.string(),
107
108
  customer_name: zod_1.z.string(),
108
109
  amended_from: zod_1.z.string().optional().nullable(),
@@ -201,14 +201,14 @@ export declare const DispatchRunMatchesByOrderNumber: z.ZodArray<z.ZodObject<{
201
201
  }, "strip", z.ZodTypeAny, {
202
202
  status: "Processing" | "Failed" | "Completed";
203
203
  name: string;
204
- customer_name: string;
205
204
  order_number: string;
205
+ customer_name: string;
206
206
  picking_strategy: string;
207
207
  }, {
208
208
  status: "Processing" | "Failed" | "Completed";
209
209
  name: string;
210
- customer_name: string;
211
210
  order_number: string;
211
+ customer_name: string;
212
212
  picking_strategy: string;
213
213
  }>, "many">;
214
214
  export type DispatchRunMatchesByOrderNumberType = z.infer<typeof DispatchRunMatchesByOrderNumber>;
package/package.json CHANGED
@@ -25,7 +25,7 @@
25
25
  "winston": "^3.15.0",
26
26
  "zod": "3.25.76"
27
27
  },
28
- "version": "1.29.1",
28
+ "version": "1.29.3",
29
29
  "devDependencies": {
30
30
  "@types/crypto-js": "^4.2.2",
31
31
  "@types/lodash": "^4.17.13",