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.
- package/dist/client.js +2 -2
- package/dist/constants.d.ts +1 -1
- package/dist/constants.js +16 -2
- package/dist/erpnext/doctypeResourceRequest.d.ts +12 -11
- package/dist/erpnext/doctypeResourceRequest.js +3 -2
- package/dist/erpnext/doctypeSubmittableResourceRequest.d.ts +121 -4
- package/dist/erpnext/doctypeSubmittableResourceRequest.js +14 -1
- package/dist/erpnext/doctypes/address.d.ts +154 -219
- package/dist/erpnext/doctypes/address.js +0 -2
- package/dist/erpnext/doctypes/contact.d.ts +151 -308
- package/dist/erpnext/doctypes/contact.js +1 -1
- package/dist/erpnext/doctypes/deliveryNote.d.ts +644 -455
- package/dist/erpnext/doctypes/deliveryNote.js +4 -10
- package/dist/erpnext/doctypes/item.d.ts +215 -308
- package/dist/erpnext/doctypes/productBundle.d.ts +43 -53
- package/dist/erpnext/doctypes/purchaseInvoice.d.ts +669 -697
- package/dist/erpnext/doctypes/purchaseReceipt.d.ts +265 -314
- package/dist/erpnext/doctypes/salesInvoice.d.ts +3332 -0
- package/dist/erpnext/doctypes/salesInvoice.js +72 -0
- package/dist/erpnext/doctypes/servicecase.d.ts +197 -140
- package/dist/erpnext/doctypes/servicecase.js +4 -6
- package/dist/erpnext/doctypes/shipment.d.ts +168 -258
- package/dist/erpnext/doctypes/tags.d.ts +10 -0
- package/dist/erpnext/doctypes/tags.js +102 -0
- package/dist/erpnext/model/Account.d.ts +0 -33
- package/dist/erpnext/model/Account.js +0 -11
- package/dist/erpnext/model/Address.d.ts +112 -233
- package/dist/erpnext/model/Address.js +11 -49
- package/dist/erpnext/model/Attachment.d.ts +0 -3
- package/dist/erpnext/model/Attachment.js +0 -1
- package/dist/erpnext/model/Boolean.d.ts +4 -0
- package/dist/erpnext/model/Boolean.js +9 -0
- package/dist/erpnext/model/Compliance.d.ts +0 -112
- package/dist/erpnext/model/Compliance.js +0 -19
- package/dist/erpnext/model/Contact.d.ts +166 -416
- package/dist/erpnext/model/Contact.js +16 -69
- package/dist/erpnext/model/Country.d.ts +0 -64
- package/dist/erpnext/model/Country.js +0 -10
- package/dist/erpnext/model/Customer.d.ts +39 -64
- package/dist/erpnext/model/Customer.js +11 -25
- package/dist/erpnext/model/DeliveryNote.d.ts +124 -1170
- package/dist/erpnext/model/DeliveryNote.js +5 -52
- package/dist/erpnext/model/DispatchRun.d.ts +7 -113
- package/dist/erpnext/model/DispatchRun.js +2 -31
- package/dist/erpnext/model/DispatcherPreset.d.ts +0 -119
- package/dist/erpnext/model/DispatcherPreset.js +1 -27
- package/dist/erpnext/model/DocInfo.d.ts +41 -339
- package/dist/erpnext/model/DocInfo.js +5 -6
- package/dist/erpnext/model/DocTypeHelpers.d.ts +141 -2
- package/dist/erpnext/model/DocTypeHelpers.js +132 -1
- package/dist/erpnext/model/ERPNextDocTypeMeta.d.ts +124 -0
- package/dist/erpnext/model/ERPNextDocTypeMeta.js +37 -0
- package/dist/erpnext/model/ERPNextRequest.d.ts +5 -5
- package/dist/erpnext/model/File.d.ts +0 -48
- package/dist/erpnext/model/File.js +0 -8
- package/dist/erpnext/model/Fulfiller.d.ts +0 -121
- package/dist/erpnext/model/Fulfiller.js +1 -56
- package/dist/erpnext/model/FulfillerSettings.d.ts +0 -39
- package/dist/erpnext/model/FulfillerSettings.js +0 -6
- package/dist/erpnext/model/InternalReasons.d.ts +0 -3
- package/dist/erpnext/model/InternalReasons.js +0 -1
- package/dist/erpnext/model/Item.d.ts +478 -1847
- package/dist/erpnext/model/Item.js +18 -142
- package/dist/erpnext/model/Logs.d.ts +0 -9
- package/dist/erpnext/model/Logs.js +0 -3
- package/dist/erpnext/model/PartList.d.ts +0 -15
- package/dist/erpnext/model/PartList.js +0 -5
- package/dist/erpnext/model/PaymentEntry.d.ts +141 -128
- package/dist/erpnext/model/PaymentEntry.js +46 -47
- package/dist/erpnext/model/Permissions.d.ts +3 -3
- package/dist/erpnext/model/Permissions.js +1 -1
- package/dist/erpnext/model/ProductBundle.d.ts +6 -107
- package/dist/erpnext/model/ProductBundle.js +0 -17
- package/dist/erpnext/model/PurchaseInvoice.d.ts +290 -362
- package/dist/erpnext/model/PurchaseInvoice.js +5 -23
- package/dist/erpnext/model/PurchaseOrder.d.ts +34 -180
- package/dist/erpnext/model/PurchaseOrder.js +0 -34
- package/dist/erpnext/model/Receipt.d.ts +30 -121
- package/dist/erpnext/model/Receipt.js +2 -25
- package/dist/erpnext/model/ReceiptDraft.d.ts +28 -67
- package/dist/erpnext/model/ReceiptDraft.js +2 -11
- package/dist/erpnext/model/Report.d.ts +0 -40
- package/dist/erpnext/model/Report.js +0 -8
- package/dist/erpnext/model/SalesInvoice.d.ts +2441 -0
- package/dist/erpnext/model/SalesInvoice.js +326 -0
- package/dist/erpnext/model/SalesOrder.d.ts +1043 -0
- package/dist/erpnext/model/SalesOrder.js +271 -0
- package/dist/erpnext/model/SalesTaxesAndCharges.d.ts +47 -0
- package/dist/erpnext/model/SalesTaxesAndCharges.js +30 -0
- package/dist/erpnext/model/Servicecase.d.ts +295 -740
- package/dist/erpnext/model/Servicecase.js +31 -116
- package/dist/erpnext/model/ServicecaseReason.d.ts +0 -8
- package/dist/erpnext/model/ServicecaseReason.js +0 -2
- package/dist/erpnext/model/ServicecaseSolution.d.ts +0 -3
- package/dist/erpnext/model/ServicecaseSolution.js +0 -1
- package/dist/erpnext/model/ServiceportalProductConfiguration.d.ts +0 -575
- package/dist/erpnext/model/ServiceportalProductConfiguration.js +5 -50
- package/dist/erpnext/model/Shipment.d.ts +18 -729
- package/dist/erpnext/model/Shipment.js +1 -82
- package/dist/erpnext/model/ShippingLabel.d.ts +0 -32
- package/dist/erpnext/model/ShippingLabel.js +0 -8
- package/dist/erpnext/model/ShippingProvider.d.ts +6 -87
- package/dist/erpnext/model/ShippingProvider.js +3 -6
- package/dist/erpnext/model/Stock.d.ts +6 -46
- package/dist/erpnext/model/Stock.js +0 -8
- package/dist/erpnext/model/StockEntry.d.ts +12 -45
- package/dist/erpnext/model/StockEntry.js +0 -11
- package/dist/erpnext/model/StockReconciliation.d.ts +5 -32
- package/dist/erpnext/model/StockReconciliation.js +0 -10
- package/dist/erpnext/model/Supplier.d.ts +0 -79
- package/dist/erpnext/model/Supplier.js +0 -8
- package/dist/erpnext/model/Version.d.ts +0 -9
- package/dist/erpnext/model/Version.js +0 -3
- package/dist/erpnext/model/Waitlist.d.ts +0 -3
- package/dist/erpnext/model/Waitlist.js +0 -1
- package/dist/erpnext/model/WarehouseCategory.d.ts +0 -11
- package/dist/erpnext/model/WarehouseCategory.js +1 -7
- package/dist/erpnext/reports.js +3 -7
- package/dist/erpnext/resourceRequest.d.ts +13 -11
- package/dist/erpnext/resourceRequest.js +23 -18
- package/dist/index.d.ts +16 -10
- package/dist/index.js +24 -12
- package/dist/index.test.d.ts +1 -0
- package/dist/index.test.js +227 -0
- package/dist/utils/utils.d.ts +3 -0
- package/dist/utils/zodContextOptionals.d.ts +14 -0
- package/dist/utils/zodContextOptionals.js +42 -0
- package/dist/utils/zodUtils.js +2 -1
- package/package.json +2 -2
- package/dist/erpnext/model/ConsolidatedCustomsInvoice.d.ts +0 -433
- package/dist/erpnext/model/ConsolidatedCustomsInvoice.js +0 -102
- package/dist/erpnext/model/ShippingFees.d.ts +0 -36
- 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,
|
|
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: <
|
|
11
|
-
fields?:
|
|
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[][] :
|
|
18
|
+
}) => Promise<(TAsDict extends false ? string[][] : TSelectedFields extends undefined ? {
|
|
19
19
|
name: string;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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
|
-
|
|
29
|
+
address_line1: string;
|
|
25
30
|
pincode: string;
|
|
31
|
+
city: string;
|
|
26
32
|
country: string;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
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
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
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
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
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
|
-
|
|
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
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
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:
|
|
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
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
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
|
-
|
|
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
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
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
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
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
|
-
|
|
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
|
-
|
|
259
|
+
address_line1: string;
|
|
318
260
|
pincode: string;
|
|
261
|
+
city: string;
|
|
319
262
|
country: string;
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
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",
|