erpnext-queue-client 1.38.0 → 2.0.0-beta.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.
Files changed (133) hide show
  1. package/dist/client.js +2 -2
  2. package/dist/constants.d.ts +1 -1
  3. package/dist/constants.js +16 -2
  4. package/dist/erpnext/doctypeResourceRequest.d.ts +12 -11
  5. package/dist/erpnext/doctypeResourceRequest.js +3 -2
  6. package/dist/erpnext/doctypeSubmittableResourceRequest.d.ts +121 -4
  7. package/dist/erpnext/doctypeSubmittableResourceRequest.js +14 -1
  8. package/dist/erpnext/doctypes/address.d.ts +154 -219
  9. package/dist/erpnext/doctypes/address.js +0 -2
  10. package/dist/erpnext/doctypes/contact.d.ts +151 -308
  11. package/dist/erpnext/doctypes/contact.js +1 -1
  12. package/dist/erpnext/doctypes/deliveryNote.d.ts +644 -455
  13. package/dist/erpnext/doctypes/deliveryNote.js +4 -10
  14. package/dist/erpnext/doctypes/item.d.ts +215 -308
  15. package/dist/erpnext/doctypes/productBundle.d.ts +43 -53
  16. package/dist/erpnext/doctypes/purchaseInvoice.d.ts +669 -697
  17. package/dist/erpnext/doctypes/purchaseReceipt.d.ts +265 -314
  18. package/dist/erpnext/doctypes/salesInvoice.d.ts +3332 -0
  19. package/dist/erpnext/doctypes/salesInvoice.js +72 -0
  20. package/dist/erpnext/doctypes/servicecase.d.ts +197 -140
  21. package/dist/erpnext/doctypes/servicecase.js +4 -6
  22. package/dist/erpnext/doctypes/shipment.d.ts +168 -258
  23. package/dist/erpnext/doctypes/tags.d.ts +10 -0
  24. package/dist/erpnext/doctypes/tags.js +102 -0
  25. package/dist/erpnext/model/Account.d.ts +0 -33
  26. package/dist/erpnext/model/Account.js +0 -11
  27. package/dist/erpnext/model/Address.d.ts +112 -233
  28. package/dist/erpnext/model/Address.js +11 -49
  29. package/dist/erpnext/model/Attachment.d.ts +0 -3
  30. package/dist/erpnext/model/Attachment.js +0 -1
  31. package/dist/erpnext/model/Boolean.d.ts +4 -0
  32. package/dist/erpnext/model/Boolean.js +9 -0
  33. package/dist/erpnext/model/Compliance.d.ts +0 -112
  34. package/dist/erpnext/model/Compliance.js +0 -19
  35. package/dist/erpnext/model/Contact.d.ts +166 -416
  36. package/dist/erpnext/model/Contact.js +16 -69
  37. package/dist/erpnext/model/Country.d.ts +0 -64
  38. package/dist/erpnext/model/Country.js +0 -10
  39. package/dist/erpnext/model/Customer.d.ts +39 -64
  40. package/dist/erpnext/model/Customer.js +11 -25
  41. package/dist/erpnext/model/DeliveryNote.d.ts +124 -1170
  42. package/dist/erpnext/model/DeliveryNote.js +5 -52
  43. package/dist/erpnext/model/DispatchRun.d.ts +7 -113
  44. package/dist/erpnext/model/DispatchRun.js +2 -31
  45. package/dist/erpnext/model/DispatcherPreset.d.ts +0 -119
  46. package/dist/erpnext/model/DispatcherPreset.js +1 -27
  47. package/dist/erpnext/model/DocInfo.d.ts +41 -339
  48. package/dist/erpnext/model/DocInfo.js +5 -6
  49. package/dist/erpnext/model/DocTypeHelpers.d.ts +141 -2
  50. package/dist/erpnext/model/DocTypeHelpers.js +132 -1
  51. package/dist/erpnext/model/ERPNextDocTypeMeta.d.ts +124 -0
  52. package/dist/erpnext/model/ERPNextDocTypeMeta.js +37 -0
  53. package/dist/erpnext/model/ERPNextRequest.d.ts +5 -5
  54. package/dist/erpnext/model/File.d.ts +0 -48
  55. package/dist/erpnext/model/File.js +0 -8
  56. package/dist/erpnext/model/Fulfiller.d.ts +0 -121
  57. package/dist/erpnext/model/Fulfiller.js +1 -56
  58. package/dist/erpnext/model/FulfillerSettings.d.ts +0 -39
  59. package/dist/erpnext/model/FulfillerSettings.js +0 -6
  60. package/dist/erpnext/model/InternalReasons.d.ts +0 -3
  61. package/dist/erpnext/model/InternalReasons.js +0 -1
  62. package/dist/erpnext/model/Item.d.ts +478 -1847
  63. package/dist/erpnext/model/Item.js +18 -142
  64. package/dist/erpnext/model/Logs.d.ts +0 -9
  65. package/dist/erpnext/model/Logs.js +0 -3
  66. package/dist/erpnext/model/PartList.d.ts +0 -15
  67. package/dist/erpnext/model/PartList.js +0 -5
  68. package/dist/erpnext/model/PaymentEntry.d.ts +141 -128
  69. package/dist/erpnext/model/PaymentEntry.js +46 -47
  70. package/dist/erpnext/model/Permissions.d.ts +3 -3
  71. package/dist/erpnext/model/Permissions.js +1 -1
  72. package/dist/erpnext/model/ProductBundle.d.ts +6 -107
  73. package/dist/erpnext/model/ProductBundle.js +0 -17
  74. package/dist/erpnext/model/PurchaseInvoice.d.ts +290 -362
  75. package/dist/erpnext/model/PurchaseInvoice.js +5 -23
  76. package/dist/erpnext/model/PurchaseOrder.d.ts +34 -180
  77. package/dist/erpnext/model/PurchaseOrder.js +0 -34
  78. package/dist/erpnext/model/Receipt.d.ts +30 -121
  79. package/dist/erpnext/model/Receipt.js +2 -25
  80. package/dist/erpnext/model/ReceiptDraft.d.ts +28 -67
  81. package/dist/erpnext/model/ReceiptDraft.js +2 -11
  82. package/dist/erpnext/model/Report.d.ts +0 -40
  83. package/dist/erpnext/model/Report.js +0 -8
  84. package/dist/erpnext/model/SalesInvoice.d.ts +2441 -0
  85. package/dist/erpnext/model/SalesInvoice.js +326 -0
  86. package/dist/erpnext/model/SalesOrder.d.ts +1043 -0
  87. package/dist/erpnext/model/SalesOrder.js +271 -0
  88. package/dist/erpnext/model/SalesTaxesAndCharges.d.ts +47 -0
  89. package/dist/erpnext/model/SalesTaxesAndCharges.js +30 -0
  90. package/dist/erpnext/model/Servicecase.d.ts +295 -740
  91. package/dist/erpnext/model/Servicecase.js +31 -116
  92. package/dist/erpnext/model/ServicecaseReason.d.ts +0 -8
  93. package/dist/erpnext/model/ServicecaseReason.js +0 -2
  94. package/dist/erpnext/model/ServicecaseSolution.d.ts +0 -3
  95. package/dist/erpnext/model/ServicecaseSolution.js +0 -1
  96. package/dist/erpnext/model/ServiceportalProductConfiguration.d.ts +0 -575
  97. package/dist/erpnext/model/ServiceportalProductConfiguration.js +5 -50
  98. package/dist/erpnext/model/Shipment.d.ts +18 -729
  99. package/dist/erpnext/model/Shipment.js +1 -82
  100. package/dist/erpnext/model/ShippingLabel.d.ts +0 -32
  101. package/dist/erpnext/model/ShippingLabel.js +0 -8
  102. package/dist/erpnext/model/ShippingProvider.d.ts +6 -87
  103. package/dist/erpnext/model/ShippingProvider.js +3 -6
  104. package/dist/erpnext/model/Stock.d.ts +6 -46
  105. package/dist/erpnext/model/Stock.js +0 -8
  106. package/dist/erpnext/model/StockEntry.d.ts +12 -45
  107. package/dist/erpnext/model/StockEntry.js +0 -11
  108. package/dist/erpnext/model/StockReconciliation.d.ts +5 -32
  109. package/dist/erpnext/model/StockReconciliation.js +0 -10
  110. package/dist/erpnext/model/Supplier.d.ts +0 -79
  111. package/dist/erpnext/model/Supplier.js +0 -8
  112. package/dist/erpnext/model/Version.d.ts +0 -9
  113. package/dist/erpnext/model/Version.js +0 -3
  114. package/dist/erpnext/model/Waitlist.d.ts +0 -3
  115. package/dist/erpnext/model/Waitlist.js +0 -1
  116. package/dist/erpnext/model/WarehouseCategory.d.ts +0 -11
  117. package/dist/erpnext/model/WarehouseCategory.js +1 -7
  118. package/dist/erpnext/reports.js +3 -7
  119. package/dist/erpnext/resourceRequest.d.ts +13 -11
  120. package/dist/erpnext/resourceRequest.js +23 -18
  121. package/dist/index.d.ts +16 -10
  122. package/dist/index.js +24 -12
  123. package/dist/index.test.d.ts +1 -0
  124. package/dist/index.test.js +227 -0
  125. package/dist/utils/utils.d.ts +3 -0
  126. package/dist/utils/zodContextOptionals.d.ts +14 -0
  127. package/dist/utils/zodContextOptionals.js +42 -0
  128. package/dist/utils/zodUtils.js +2 -1
  129. package/package.json +2 -2
  130. package/dist/erpnext/model/ConsolidatedCustomsInvoice.d.ts +0 -433
  131. package/dist/erpnext/model/ConsolidatedCustomsInvoice.js +0 -102
  132. package/dist/erpnext/model/ShippingFees.d.ts +0 -36
  133. package/dist/erpnext/model/ShippingFees.js +0 -18
@@ -2,341 +2,276 @@ import { z } from "zod";
2
2
  import { TemporalClient } from "../../client";
3
3
  import { ERPNextDoctypeResourceRequest } from "../doctypeResourceRequest";
4
4
  import { ERPNextMethodRequest } from "../methodRequest";
5
- import { Address, AddressPostBodyType } from "../model/Address";
5
+ import { Address, AddressInputType } from "../model/Address";
6
6
  export declare class ERPNextAddress {
7
7
  protected temporalClient: TemporalClient;
8
8
  protected baseRequest: ERPNextDoctypeResourceRequest<typeof Address>;
9
9
  protected methodRequest: ERPNextMethodRequest;
10
- getList: <TField extends ("name" | "doctype" | "address_title" | "address_line1" | "address_type" | "city" | "pincode" | "country" | "is_shipping_address" | "links" | "owner" | "creation" | "modified" | "modified_by" | "idx" | "docstatus" | "is_primary_address" | "is_your_company_address" | "disabled") | ("address_line2" | "email_id" | "parent" | "parentfield" | "parenttype" | "import_reference" | "state" | "phone" | "fax" | "tax_category" | "county"), TAsDict extends boolean | undefined = undefined>({ fields, filters, skip, limit, priority, asDict, params, }?: {
11
- fields?: TField[] | undefined;
10
+ getList: <TFieldOptions extends ("name" | "owner" | "creation" | "modified" | "modified_by" | "idx" | "docstatus" | "address_type" | "address_line1" | "pincode" | "city" | "country" | "is_primary_address" | "is_shipping_address" | "is_your_company_address" | "disabled") | ("_user_tags" | "import_reference" | "address_title" | "address_line2" | "state" | "phone" | "fax" | "tax_category" | "county" | "email_id" | "links"), TSelectedFields extends readonly ["*"] | TFieldOptions[] | undefined = undefined, TAsDict extends boolean | undefined = undefined>({ fields, filters, skip, limit, priority, asDict, params, }?: {
11
+ fields?: TSelectedFields;
12
12
  filters?: (string | string[])[][];
13
13
  skip?: number;
14
14
  limit?: number;
15
15
  priority?: number;
16
16
  asDict?: TAsDict;
17
17
  params?: Record<string, string>;
18
- }) => Promise<TAsDict extends false ? string[][] : Pick<{
18
+ }) => Promise<(TAsDict extends false ? string[][] : TSelectedFields extends undefined ? {
19
19
  name: string;
20
- doctype: string;
21
- address_title: string;
22
- address_line1: string;
20
+ }[] : TSelectedFields extends readonly ["*"] ? {
21
+ name: string;
22
+ owner: string;
23
+ creation: string;
24
+ modified: string;
25
+ modified_by: string;
26
+ idx: number;
27
+ docstatus: number;
23
28
  address_type: string;
24
- city: string;
29
+ address_line1: string;
25
30
  pincode: string;
31
+ city: string;
26
32
  country: string;
27
- is_shipping_address: boolean;
28
- links: {
29
- name: string;
30
- doctype: string;
33
+ is_primary_address: 0 | 1;
34
+ is_shipping_address: 0 | 1;
35
+ is_your_company_address: 0 | 1;
36
+ disabled: 0 | 1;
37
+ _user_tags?: string | undefined;
38
+ import_reference?: string | null | undefined;
39
+ address_title?: string | null | undefined;
40
+ address_line2?: string | null | undefined;
41
+ state?: string | null | undefined;
42
+ phone?: string | null | undefined;
43
+ fax?: string | null | undefined;
44
+ tax_category?: string | null | undefined;
45
+ county?: string | null | undefined;
46
+ email_id?: string | null | undefined;
47
+ links?: {
31
48
  link_doctype: string;
32
49
  link_name: string;
33
- owner: string;
34
- creation: string;
35
- modified: string;
36
- modified_by: string;
37
- parent: string;
38
- parentfield: string;
39
- parenttype: string;
40
- idx: number;
41
- docstatus: number;
42
- link_title: string;
43
- }[];
50
+ link_title?: string | null | undefined;
51
+ }[] | undefined;
52
+ }[] : TSelectedFields extends TFieldOptions[] ? Pick<{
53
+ name: string;
44
54
  owner: string;
45
55
  creation: string;
46
56
  modified: string;
47
57
  modified_by: string;
48
58
  idx: number;
49
59
  docstatus: number;
50
- is_primary_address: boolean;
51
- is_your_company_address: boolean;
52
- disabled: boolean;
53
- address_line2?: string | null | undefined;
54
- email_id?: string | null | undefined;
55
- parent?: string | null | undefined;
56
- parentfield?: string | null | undefined;
57
- parenttype?: string | null | undefined;
60
+ address_type: string;
61
+ address_line1: string;
62
+ pincode: string;
63
+ city: string;
64
+ country: string;
65
+ is_primary_address: 0 | 1;
66
+ is_shipping_address: 0 | 1;
67
+ is_your_company_address: 0 | 1;
68
+ disabled: 0 | 1;
69
+ _user_tags?: string | undefined;
58
70
  import_reference?: string | null | undefined;
71
+ address_title?: string | null | undefined;
72
+ address_line2?: string | null | undefined;
59
73
  state?: string | null | undefined;
60
74
  phone?: string | null | undefined;
61
75
  fax?: string | null | undefined;
62
76
  tax_category?: string | null | undefined;
63
77
  county?: string | null | undefined;
64
- }, TField>[]>;
78
+ email_id?: string | null | undefined;
79
+ links?: {
80
+ link_doctype: string;
81
+ link_name: string;
82
+ link_title?: string | null | undefined;
83
+ }[] | undefined;
84
+ }, TSelectedFields[number]>[] : any) extends infer T ? { [K in keyof T]: T[K]; } : never>;
65
85
  getById: ({ resourceId, priority, }: {
66
86
  resourceId: string;
67
87
  priority?: number;
68
88
  }) => Promise<{
69
89
  name: string;
70
- doctype: string;
71
- address_title: string;
72
- address_line1: string;
73
- address_type: string;
74
- city: string;
75
- pincode: string;
76
- country: string;
77
- is_shipping_address: boolean;
78
- links: {
79
- name: string;
80
- doctype: string;
81
- link_doctype: string;
82
- link_name: string;
83
- owner: string;
84
- creation: string;
85
- modified: string;
86
- modified_by: string;
87
- parent: string;
88
- parentfield: string;
89
- parenttype: string;
90
- idx: number;
91
- docstatus: number;
92
- link_title: string;
93
- }[];
94
90
  owner: string;
95
91
  creation: string;
96
92
  modified: string;
97
93
  modified_by: string;
98
94
  idx: number;
99
95
  docstatus: number;
100
- is_primary_address: boolean;
101
- is_your_company_address: boolean;
102
- disabled: boolean;
103
- address_line2?: string | null | undefined;
104
- email_id?: string | null | undefined;
105
- parent?: string | null | undefined;
106
- parentfield?: string | null | undefined;
107
- parenttype?: string | null | undefined;
96
+ doctype: string;
97
+ address_type: string;
98
+ address_line1: string;
99
+ pincode: string;
100
+ city: string;
101
+ country: string;
102
+ is_primary_address: 0 | 1;
103
+ is_shipping_address: 0 | 1;
104
+ is_your_company_address: 0 | 1;
105
+ disabled: 0 | 1;
106
+ _user_tags?: string | undefined;
108
107
  import_reference?: string | null | undefined;
108
+ address_title?: string | null | undefined;
109
+ address_line2?: string | null | undefined;
109
110
  state?: string | null | undefined;
110
111
  phone?: string | null | undefined;
111
112
  fax?: string | null | undefined;
112
113
  tax_category?: string | null | undefined;
113
114
  county?: string | null | undefined;
115
+ email_id?: string | null | undefined;
116
+ links?: {
117
+ link_doctype: string;
118
+ link_name: string;
119
+ link_title?: string | null | undefined;
120
+ }[] | undefined;
114
121
  }>;
115
122
  updateById: <TInput extends TInputModel extends undefined ? Partial<{
116
- name: string;
117
- doctype: string;
118
- address_title: string;
119
- address_line1: string;
120
123
  address_type: string;
121
- city: string;
124
+ address_line1: string;
122
125
  pincode: string;
126
+ city: string;
123
127
  country: string;
124
- is_shipping_address: boolean;
125
- links: {
126
- name: string;
127
- doctype: string;
128
- link_doctype: string;
129
- link_name: string;
130
- owner: string;
131
- creation: string;
132
- modified: string;
133
- modified_by: string;
134
- parent: string;
135
- parentfield: string;
136
- parenttype: string;
137
- idx: number;
138
- docstatus: number;
139
- link_title: string;
140
- }[];
141
- owner: string;
142
- creation: string;
143
- modified: string;
144
- modified_by: string;
145
- idx: number;
146
- docstatus: number;
147
- is_primary_address: boolean;
148
- is_your_company_address: boolean;
149
- disabled: boolean;
150
- address_line2?: string | null | undefined;
151
- email_id?: string | null | undefined;
152
- parent?: string | null | undefined;
153
- parentfield?: string | null | undefined;
154
- parenttype?: string | null | undefined;
155
128
  import_reference?: string | null | undefined;
129
+ address_title?: string | null | undefined;
130
+ address_line2?: string | null | undefined;
156
131
  state?: string | null | undefined;
157
132
  phone?: string | null | undefined;
158
133
  fax?: string | null | undefined;
159
134
  tax_category?: string | null | undefined;
160
135
  county?: string | null | undefined;
161
- }> : TInputModel extends z.ZodTypeAny ? Partial<z.TypeOf<TInputModel>> : any, TInputModel extends z.ZodTypeAny | undefined = undefined>({ resourceId, inputValidationModel, body, priority, }: {
136
+ email_id?: string | null | undefined;
137
+ is_primary_address?: 0 | 1 | undefined;
138
+ is_shipping_address?: 0 | 1 | undefined;
139
+ is_your_company_address?: 0 | 1 | undefined;
140
+ disabled?: 0 | 1 | undefined;
141
+ links?: {
142
+ link_doctype: string;
143
+ link_name: string;
144
+ link_title?: string | null | undefined;
145
+ }[] | undefined;
146
+ }> : TInputModel extends z.ZodTypeAny ? z.TypeOf<TInputModel> : any, TInputModel extends z.ZodTypeAny | undefined = undefined>({ resourceId, inputValidationModel, body, priority, }: {
162
147
  resourceId: string;
163
148
  inputValidationModel?: TInputModel;
164
149
  priority?: number;
165
150
  body: TInput;
166
151
  }) => Promise<{
167
152
  name: string;
168
- doctype: string;
169
- address_title: string;
170
- address_line1: string;
171
- address_type: string;
172
- city: string;
173
- pincode: string;
174
- country: string;
175
- is_shipping_address: boolean;
176
- links: {
177
- name: string;
178
- doctype: string;
179
- link_doctype: string;
180
- link_name: string;
181
- owner: string;
182
- creation: string;
183
- modified: string;
184
- modified_by: string;
185
- parent: string;
186
- parentfield: string;
187
- parenttype: string;
188
- idx: number;
189
- docstatus: number;
190
- link_title: string;
191
- }[];
192
153
  owner: string;
193
154
  creation: string;
194
155
  modified: string;
195
156
  modified_by: string;
196
157
  idx: number;
197
158
  docstatus: number;
198
- is_primary_address: boolean;
199
- is_your_company_address: boolean;
200
- disabled: boolean;
201
- address_line2?: string | null | undefined;
202
- email_id?: string | null | undefined;
203
- parent?: string | null | undefined;
204
- parentfield?: string | null | undefined;
205
- parenttype?: string | null | undefined;
159
+ doctype: string;
160
+ address_type: string;
161
+ address_line1: string;
162
+ pincode: string;
163
+ city: string;
164
+ country: string;
165
+ is_primary_address: 0 | 1;
166
+ is_shipping_address: 0 | 1;
167
+ is_your_company_address: 0 | 1;
168
+ disabled: 0 | 1;
169
+ _user_tags?: string | undefined;
206
170
  import_reference?: string | null | undefined;
171
+ address_title?: string | null | undefined;
172
+ address_line2?: string | null | undefined;
207
173
  state?: string | null | undefined;
208
174
  phone?: string | null | undefined;
209
175
  fax?: string | null | undefined;
210
176
  tax_category?: string | null | undefined;
211
177
  county?: string | null | undefined;
178
+ email_id?: string | null | undefined;
179
+ links?: {
180
+ link_doctype: string;
181
+ link_name: string;
182
+ link_title?: string | null | undefined;
183
+ }[] | undefined;
212
184
  }>;
213
185
  deleteById: ({ resourceId, priority, }: {
214
186
  resourceId: string;
215
187
  priority?: number;
216
188
  }) => Promise<z.TypeOf<typeof import("../model/ERPNextResponse").DeleteResponseModel>>;
217
189
  constructor(temporalClient: TemporalClient);
218
- create(address: Omit<AddressPostBodyType, "links">, customerName: string): Promise<{
190
+ create(address: AddressInputType, customerName: string): Promise<{
219
191
  name: string;
220
- doctype: string;
221
- address_title: string;
222
- address_line1: string;
223
- address_type: string;
224
- city: string;
225
- pincode: string;
226
- country: string;
227
- is_shipping_address: boolean;
228
- links: {
229
- name: string;
230
- doctype: string;
231
- link_doctype: string;
232
- link_name: string;
233
- owner: string;
234
- creation: string;
235
- modified: string;
236
- modified_by: string;
237
- parent: string;
238
- parentfield: string;
239
- parenttype: string;
240
- idx: number;
241
- docstatus: number;
242
- link_title: string;
243
- }[];
244
192
  owner: string;
245
193
  creation: string;
246
194
  modified: string;
247
195
  modified_by: string;
248
196
  idx: number;
249
197
  docstatus: number;
250
- is_primary_address: boolean;
251
- is_your_company_address: boolean;
252
- disabled: boolean;
253
- address_line2?: string | null | undefined;
254
- email_id?: string | null | undefined;
255
- parent?: string | null | undefined;
256
- parentfield?: string | null | undefined;
257
- parenttype?: string | null | undefined;
198
+ doctype: string;
199
+ address_type: string;
200
+ address_line1: string;
201
+ pincode: string;
202
+ city: string;
203
+ country: string;
204
+ is_primary_address: 0 | 1;
205
+ is_shipping_address: 0 | 1;
206
+ is_your_company_address: 0 | 1;
207
+ disabled: 0 | 1;
208
+ _user_tags?: string | undefined;
258
209
  import_reference?: string | null | undefined;
210
+ address_title?: string | null | undefined;
211
+ address_line2?: string | null | undefined;
259
212
  state?: string | null | undefined;
260
213
  phone?: string | null | undefined;
261
214
  fax?: string | null | undefined;
262
215
  tax_category?: string | null | undefined;
263
216
  county?: string | null | undefined;
264
- }>;
265
- getAddressesByEmail: <K extends keyof (typeof Address)["_type"]>(email: string, fields?: K[]) => Promise<Pick<{
266
- name: string;
267
- doctype: string;
268
- address_title: string;
269
- address_line1: string;
270
- address_type: string;
271
- city: string;
272
- pincode: string;
273
- country: string;
274
- is_shipping_address: boolean;
275
- links: {
276
- name: string;
277
- doctype: string;
217
+ email_id?: string | null | undefined;
218
+ links?: {
278
219
  link_doctype: string;
279
220
  link_name: string;
280
- owner: string;
281
- creation: string;
282
- modified: string;
283
- modified_by: string;
284
- parent: string;
285
- parentfield: string;
286
- parenttype: string;
287
- idx: number;
288
- docstatus: number;
289
- link_title: string;
290
- }[];
221
+ link_title?: string | null | undefined;
222
+ }[] | undefined;
223
+ }>;
224
+ getAddressesByEmail: <K extends keyof (typeof Address)["_type"]>(email: string, fields?: K[]) => Promise<(K[] extends infer T_1 ? T_1 extends K[] ? T_1 extends (("name" | "owner" | "creation" | "modified" | "modified_by" | "idx" | "docstatus" | "address_type" | "address_line1" | "pincode" | "city" | "country" | "is_primary_address" | "is_shipping_address" | "is_your_company_address" | "disabled") | ("_user_tags" | "import_reference" | "address_title" | "address_line2" | "state" | "phone" | "fax" | "tax_category" | "county" | "email_id" | "links"))[] ? Pick<{
225
+ name: string;
291
226
  owner: string;
292
227
  creation: string;
293
228
  modified: string;
294
229
  modified_by: string;
295
230
  idx: number;
296
231
  docstatus: number;
297
- is_primary_address: boolean;
298
- is_your_company_address: boolean;
299
- disabled: boolean;
300
- address_line2?: string | null | undefined;
301
- email_id?: string | null | undefined;
302
- parent?: string | null | undefined;
303
- parentfield?: string | null | undefined;
304
- parenttype?: string | null | undefined;
232
+ address_type: string;
233
+ address_line1: string;
234
+ pincode: string;
235
+ city: string;
236
+ country: string;
237
+ is_primary_address: 0 | 1;
238
+ is_shipping_address: 0 | 1;
239
+ is_your_company_address: 0 | 1;
240
+ disabled: 0 | 1;
241
+ _user_tags?: string | undefined;
305
242
  import_reference?: string | null | undefined;
243
+ address_title?: string | null | undefined;
244
+ address_line2?: string | null | undefined;
306
245
  state?: string | null | undefined;
307
246
  phone?: string | null | undefined;
308
247
  fax?: string | null | undefined;
309
248
  tax_category?: string | null | undefined;
310
249
  county?: string | null | undefined;
311
- }, K>[]>;
250
+ email_id?: string | null | undefined;
251
+ links?: {
252
+ link_doctype: string;
253
+ link_name: string;
254
+ link_title?: string | null | undefined;
255
+ }[] | undefined;
256
+ }, T_1[number]>[] : any : never : never) extends infer T ? { [K_1 in keyof T]: T[K_1]; } : never>;
312
257
  getAddressesBySupplier: (supplierName: string) => Promise<{
313
- name: string;
314
- address_title: string;
315
- address_line1: string;
316
258
  address_type: string;
317
- city: string;
259
+ address_line1: string;
318
260
  pincode: string;
261
+ city: string;
319
262
  country: string;
320
- is_shipping_address: boolean;
321
- owner: string;
322
- creation: string;
323
- modified: string;
324
- modified_by: string;
325
- idx: number;
326
- docstatus: number;
327
- is_primary_address: boolean;
328
- is_your_company_address: boolean;
329
- disabled: boolean;
330
- address_line2?: string | null | undefined;
331
- email_id?: string | null | undefined;
332
- parent?: string | null | undefined;
333
- parentfield?: string | null | undefined;
334
- parenttype?: string | null | undefined;
263
+ is_primary_address: 0 | 1;
264
+ is_shipping_address: 0 | 1;
265
+ is_your_company_address: 0 | 1;
266
+ disabled: 0 | 1;
335
267
  import_reference?: string | null | undefined;
268
+ address_title?: string | null | undefined;
269
+ address_line2?: string | null | undefined;
336
270
  state?: string | null | undefined;
337
271
  phone?: string | null | undefined;
338
272
  fax?: string | null | undefined;
339
273
  tax_category?: string | null | undefined;
340
274
  county?: string | null | undefined;
275
+ email_id?: string | null | undefined;
341
276
  }[]>;
342
277
  }
@@ -37,7 +37,6 @@ class ERPNextAddress {
37
37
  const validatedAddressList = (0, zodUtils_1.validateData)(response.docs[0].__onload.addr_list, zod_1.z
38
38
  .array(Address_1.Address.omit({
39
39
  links: true,
40
- doctype: true,
41
40
  }))
42
41
  .describe("Linked Address List"));
43
42
  return validatedAddressList;
@@ -53,7 +52,6 @@ class ERPNextAddress {
53
52
  create(address, customerName) {
54
53
  return __awaiter(this, void 0, void 0, function* () {
55
54
  const result = yield this.baseRequest.create({
56
- inputValidationModel: Address_1.AddressPostBody,
57
55
  body: Object.assign(Object.assign({}, address), { links: [
58
56
  {
59
57
  link_doctype: "Customer",