erpnext-queue-client 2.5.0 → 2.5.2

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.
Files changed (34) hide show
  1. package/dist/client.js +1 -1
  2. package/dist/erpnext/doctypeResourceRequest.d.ts +12 -1
  3. package/dist/erpnext/doctypeResourceRequest.js +3 -3
  4. package/dist/erpnext/doctypes/address.d.ts +3 -233
  5. package/dist/erpnext/doctypes/address.js +5 -16
  6. package/dist/erpnext/doctypes/consolidatedCustomsInvoice.d.ts +3 -486
  7. package/dist/erpnext/doctypes/consolidatedCustomsInvoice.js +4 -18
  8. package/dist/erpnext/doctypes/contact.d.ts +3 -358
  9. package/dist/erpnext/doctypes/contact.js +6 -17
  10. package/dist/erpnext/doctypes/deliveryNote.d.ts +1 -1575
  11. package/dist/erpnext/doctypes/deliveryNote.js +2 -19
  12. package/dist/erpnext/doctypes/item.d.ts +1 -1019
  13. package/dist/erpnext/doctypes/item.js +3 -16
  14. package/dist/erpnext/doctypes/paymentEntry.d.ts +1 -728
  15. package/dist/erpnext/doctypes/paymentEntry.js +4 -21
  16. package/dist/erpnext/doctypes/productBundle.d.ts +1 -143
  17. package/dist/erpnext/doctypes/productBundle.js +2 -13
  18. package/dist/erpnext/doctypes/purchaseInvoice.d.ts +1 -1395
  19. package/dist/erpnext/doctypes/purchaseInvoice.js +4 -19
  20. package/dist/erpnext/doctypes/purchaseReceipt.d.ts +1 -1204
  21. package/dist/erpnext/doctypes/purchaseReceipt.js +4 -19
  22. package/dist/erpnext/doctypes/salesInvoice.d.ts +1 -2517
  23. package/dist/erpnext/doctypes/salesInvoice.js +4 -21
  24. package/dist/erpnext/doctypes/servicecase.d.ts +24 -425
  25. package/dist/erpnext/doctypes/servicecase.js +14 -15
  26. package/dist/erpnext/doctypes/shipment.d.ts +3 -760
  27. package/dist/erpnext/doctypes/shipment.js +3 -20
  28. package/dist/erpnext/item.getList.alias-parsing.test.d.ts +1 -0
  29. package/dist/erpnext/item.getList.alias-parsing.test.js +66 -0
  30. package/dist/erpnext/model/Shipment.d.ts +4 -4
  31. package/dist/erpnext/model/Shipment.js +1 -1
  32. package/dist/index.test.js +3 -2
  33. package/dist/utils/zodUtils.js +14 -6
  34. package/package.json +1 -1
@@ -4,28 +4,11 @@ exports.ERPNextPaymentEntry = void 0;
4
4
  const doctypeSubmittableResourceRequest_1 = require("../doctypeSubmittableResourceRequest");
5
5
  const methodRequest_1 = require("../methodRequest");
6
6
  const PaymentEntry_1 = require("../model/PaymentEntry");
7
- class ERPNextPaymentEntry {
8
- temporalClient;
9
- baseRequest;
7
+ class ERPNextPaymentEntry extends doctypeSubmittableResourceRequest_1.ERPNextDoctypeSubmittableResourceRequest {
10
8
  methodRequest;
11
- getList;
12
- getById;
13
- create;
14
- updateById;
15
- deleteById;
16
- cancel;
17
- submit;
18
9
  constructor(temporalClient) {
19
- this.temporalClient = temporalClient;
20
- this.baseRequest = new doctypeSubmittableResourceRequest_1.ERPNextDoctypeSubmittableResourceRequest(temporalClient, "Payment Entry", PaymentEntry_1.PaymentEntry);
10
+ super(temporalClient, "Payment Entry", PaymentEntry_1.PaymentEntry);
21
11
  this.methodRequest = new methodRequest_1.ERPNextMethodRequest(temporalClient);
22
- this.getList = this.baseRequest.getList;
23
- this.getById = this.baseRequest.getById;
24
- this.create = this.baseRequest.create;
25
- this.updateById = this.baseRequest.updateById;
26
- this.deleteById = this.baseRequest.deleteById;
27
- this.cancel = this.baseRequest.cancel;
28
- this.submit = this.baseRequest.submit;
29
12
  }
30
13
  async createPaymentEntryDraftFromSalesOrder(salesOrderName) {
31
14
  const draft = await this.methodRequest.request({
@@ -51,7 +34,7 @@ class ERPNextPaymentEntry {
51
34
  ...paymentEntryDraft,
52
35
  ...(submit === true ? { docstatus: 1 } : {}),
53
36
  };
54
- return await this.baseRequest.create({
37
+ return await this.create({
55
38
  inputValidationModel: PaymentEntry_1.PaymentEntryDraft,
56
39
  body,
57
40
  });
@@ -62,7 +45,7 @@ class ERPNextPaymentEntry {
62
45
  ...paymentEntryDraft,
63
46
  ...(submit === true ? { docstatus: 1 } : {}),
64
47
  };
65
- return await this.baseRequest.create({
48
+ return await this.create({
66
49
  inputValidationModel: PaymentEntry_1.PaymentEntryDraft,
67
50
  body,
68
51
  });
@@ -1,149 +1,7 @@
1
1
  import { TemporalClient } from "../../client";
2
2
  import { ERPNextDoctypeResourceRequest } from "../doctypeResourceRequest";
3
3
  import { ProductBundle } from "../model/ProductBundle";
4
- export declare class ERPNextProductBundle {
5
- protected temporalClient: TemporalClient;
6
- protected baseRequest: ERPNextDoctypeResourceRequest<typeof ProductBundle>;
7
- getList: <TFieldOptions extends ("docstatus" | "name" | "owner" | "creation" | "modified" | "modified_by" | "idx" | "disabled" | "new_item_code") | ("description" | "_user_tags" | "custom_image" | "custom_parent_item_name" | "about"), TSelectedFields extends readonly ["*"] | readonly TFieldOptions[] | undefined = undefined, TAsDict extends boolean | undefined = undefined>({ fields, filters, skip, limit, priority, asDict, params, }?: {
8
- fields?: TSelectedFields;
9
- filters?: (string | string[])[][];
10
- skip?: number;
11
- limit?: number;
12
- priority?: number;
13
- asDict?: TAsDict;
14
- params?: Record<string, string>;
15
- }) => Promise<(TAsDict extends false ? string[][] : TSelectedFields extends undefined ? {
16
- name: string;
17
- }[] : TSelectedFields extends readonly ["*"] ? {
18
- docstatus: number;
19
- name: string;
20
- owner: string;
21
- creation: string;
22
- modified: string;
23
- modified_by: string;
24
- idx: number;
25
- disabled: number;
26
- new_item_code: string;
27
- description?: string | null | undefined;
28
- _user_tags?: string | null | undefined;
29
- custom_image?: string | null | undefined;
30
- custom_parent_item_name?: string | null | undefined;
31
- about?: string | null | undefined;
32
- }[] : TSelectedFields extends readonly TFieldOptions[] ? { [K_1 in TSelectedFields[number] as K_1 extends `${infer _Before} as ${infer Alias}` ? Alias : K_1]: (K_1 extends `${infer _Before} as ${infer Alias}` ? Alias : K_1) extends ("docstatus" | "name" | "owner" | "creation" | "modified" | "modified_by" | "idx" | "disabled" | "new_item_code") | ("description" | "_user_tags" | "custom_image" | "custom_parent_item_name" | "about") ? {
33
- docstatus: number;
34
- name: string;
35
- owner: string;
36
- creation: string;
37
- modified: string;
38
- modified_by: string;
39
- idx: number;
40
- disabled: number;
41
- new_item_code: string;
42
- description?: string | null | undefined;
43
- _user_tags?: string | null | undefined;
44
- custom_image?: string | null | undefined;
45
- custom_parent_item_name?: string | null | undefined;
46
- about?: string | null | undefined;
47
- }[(("docstatus" | "name" | "owner" | "creation" | "modified" | "modified_by" | "idx" | "disabled" | "new_item_code") | ("description" | "_user_tags" | "custom_image" | "custom_parent_item_name" | "about")) & (K_1 extends `${infer _Before} as ${infer Alias}` ? Alias : K_1)] : never; }[] : any) extends infer T ? { [K in keyof T]: T[K]; } : never>;
48
- getById: ({ resourceId, priority, }: {
49
- resourceId: string;
50
- priority?: number;
51
- }) => Promise<{
52
- docstatus: number;
53
- name: string;
54
- owner: string;
55
- creation: string;
56
- modified: string;
57
- modified_by: string;
58
- idx: number;
59
- doctype: string;
60
- disabled: number;
61
- items: {
62
- docstatus: number;
63
- name: string;
64
- owner: string;
65
- creation: string;
66
- modified: string;
67
- modified_by: string;
68
- idx: number;
69
- doctype: string;
70
- parent: string;
71
- parenttype: string;
72
- parentfield: string;
73
- item_code: string;
74
- qty: number;
75
- description?: string | null | undefined;
76
- _user_tags?: string | null | undefined;
77
- rate?: number | null | undefined;
78
- uom?: string | null | undefined;
79
- }[];
80
- new_item_code: string;
81
- description?: string | null | undefined;
82
- _user_tags?: string | null | undefined;
83
- custom_image?: string | null | undefined;
84
- custom_parent_item_name?: string | null | undefined;
85
- about?: string | null | undefined;
86
- } | undefined>;
87
- updateById: <TInput extends TInputModel extends undefined ? Partial<{
88
- disabled: number;
89
- items: {
90
- item_code: string;
91
- qty: number;
92
- description?: string | null | undefined;
93
- rate?: number | null | undefined;
94
- uom?: string | null | undefined;
95
- }[];
96
- new_item_code: string;
97
- description?: string | null | undefined;
98
- docstatus?: number | undefined;
99
- custom_image?: string | null | undefined;
100
- custom_parent_item_name?: string | null | undefined;
101
- about?: string | null | undefined;
102
- }> : TInputModel extends import("zod").ZodTypeAny ? import("zod").TypeOf<TInputModel> : any, TInputModel extends import("zod").ZodTypeAny | undefined = undefined>({ resourceId, inputValidationModel, body, priority, }: {
103
- resourceId: string;
104
- inputValidationModel?: TInputModel;
105
- priority?: number;
106
- body: TInput;
107
- }) => Promise<{
108
- docstatus: number;
109
- name: string;
110
- owner: string;
111
- creation: string;
112
- modified: string;
113
- modified_by: string;
114
- idx: number;
115
- doctype: string;
116
- disabled: number;
117
- items: {
118
- docstatus: number;
119
- name: string;
120
- owner: string;
121
- creation: string;
122
- modified: string;
123
- modified_by: string;
124
- idx: number;
125
- doctype: string;
126
- parent: string;
127
- parenttype: string;
128
- parentfield: string;
129
- item_code: string;
130
- qty: number;
131
- description?: string | null | undefined;
132
- _user_tags?: string | null | undefined;
133
- rate?: number | null | undefined;
134
- uom?: string | null | undefined;
135
- }[];
136
- new_item_code: string;
137
- description?: string | null | undefined;
138
- _user_tags?: string | null | undefined;
139
- custom_image?: string | null | undefined;
140
- custom_parent_item_name?: string | null | undefined;
141
- about?: string | null | undefined;
142
- }>;
143
- deleteById: ({ resourceId, priority, }: {
144
- resourceId: string;
145
- priority?: number;
146
- }) => Promise<import("zod").TypeOf<typeof import("../model/ERPNextResponse").DeleteResponseModel>>;
4
+ export declare class ERPNextProductBundle extends ERPNextDoctypeResourceRequest<typeof ProductBundle> {
147
5
  private methodRequest;
148
6
  constructor(temporalClient: TemporalClient);
149
7
  getBundleInfos: (priority?: number) => Promise<{
@@ -4,22 +4,11 @@ exports.ERPNextProductBundle = void 0;
4
4
  const doctypeResourceRequest_1 = require("../doctypeResourceRequest");
5
5
  const methodRequest_1 = require("../methodRequest");
6
6
  const ProductBundle_1 = require("../model/ProductBundle");
7
- class ERPNextProductBundle {
8
- temporalClient;
9
- baseRequest;
10
- getList;
11
- getById;
12
- updateById;
13
- deleteById;
7
+ class ERPNextProductBundle extends doctypeResourceRequest_1.ERPNextDoctypeResourceRequest {
14
8
  methodRequest;
15
9
  constructor(temporalClient) {
16
- this.temporalClient = temporalClient;
17
- this.baseRequest = new doctypeResourceRequest_1.ERPNextDoctypeResourceRequest(temporalClient, "ProductBundle", ProductBundle_1.ProductBundle);
10
+ super(temporalClient, "ProductBundle", ProductBundle_1.ProductBundle);
18
11
  this.methodRequest = new methodRequest_1.ERPNextMethodRequest(temporalClient);
19
- this.getList = this.baseRequest.getList;
20
- this.getById = this.baseRequest.getById;
21
- this.updateById = this.baseRequest.updateById;
22
- this.deleteById = this.baseRequest.deleteById;
23
12
  }
24
13
  getBundleInfos = async (priority = 5) => {
25
14
  return await this.methodRequest.request({