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
|
@@ -1,306 +1,212 @@
|
|
|
1
1
|
import { TemporalClient } from "../../client";
|
|
2
2
|
import { ERPNextDoctypeResourceRequest } from "../doctypeResourceRequest";
|
|
3
|
-
import { Contact,
|
|
3
|
+
import { Contact, ContactInputType } from "../model/Contact";
|
|
4
4
|
export declare class ERPNextContact {
|
|
5
5
|
protected temporalClient: TemporalClient;
|
|
6
6
|
protected baseRequest: ERPNextDoctypeResourceRequest<typeof Contact>;
|
|
7
|
-
getList: <
|
|
8
|
-
fields?:
|
|
7
|
+
getList: <TFieldOptions extends ("name" | "owner" | "creation" | "modified" | "modified_by" | "idx" | "docstatus" | "sync_with_google_contacts" | "pulled_from_google_contacts" | "is_primary_contact" | "is_billing_contact" | "unsubscribed") | ("status" | "address" | "_user_tags" | "phone" | "email_id" | "links" | "image" | "company" | "first_name" | "middle_name" | "last_name" | "mobile_no" | "email_ids" | "phone_nos"), TSelectedFields extends readonly ["*"] | TFieldOptions[] | undefined = undefined, TAsDict extends boolean | undefined = undefined>({ fields, filters, skip, limit, priority, asDict, params, }?: {
|
|
8
|
+
fields?: TSelectedFields;
|
|
9
9
|
filters?: (string | string[])[][];
|
|
10
10
|
skip?: number;
|
|
11
11
|
limit?: number;
|
|
12
12
|
priority?: number;
|
|
13
13
|
asDict?: TAsDict;
|
|
14
14
|
params?: Record<string, string>;
|
|
15
|
-
}) => Promise<TAsDict extends false ? string[][] :
|
|
15
|
+
}) => Promise<(TAsDict extends false ? string[][] : TSelectedFields extends undefined ? {
|
|
16
|
+
name: string;
|
|
17
|
+
}[] : TSelectedFields extends readonly ["*"] ? {
|
|
16
18
|
name: string;
|
|
17
|
-
doctype: string;
|
|
18
|
-
email_id: string;
|
|
19
19
|
owner: string;
|
|
20
20
|
creation: string;
|
|
21
21
|
modified: string;
|
|
22
22
|
modified_by: string;
|
|
23
23
|
idx: number;
|
|
24
24
|
docstatus: number;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
owner: string;
|
|
31
|
-
creation: string;
|
|
32
|
-
modified: string;
|
|
33
|
-
modified_by: string;
|
|
34
|
-
parent: string;
|
|
35
|
-
parentfield: string;
|
|
36
|
-
parenttype: string;
|
|
37
|
-
idx: number;
|
|
38
|
-
docstatus: number;
|
|
39
|
-
is_primary: boolean;
|
|
40
|
-
}[];
|
|
41
|
-
sync_with_google_contacts: number;
|
|
42
|
-
pulled_from_google_contacts: boolean;
|
|
43
|
-
is_primary_contact: boolean;
|
|
44
|
-
is_billing_contact: boolean;
|
|
45
|
-
unsubscribed: boolean;
|
|
25
|
+
sync_with_google_contacts: 0 | 1;
|
|
26
|
+
pulled_from_google_contacts: 0 | 1;
|
|
27
|
+
is_primary_contact: 0 | 1;
|
|
28
|
+
is_billing_contact: 0 | 1;
|
|
29
|
+
unsubscribed: 0 | 1;
|
|
46
30
|
status?: string | null | undefined;
|
|
31
|
+
address?: string | null | undefined;
|
|
32
|
+
_user_tags?: string | undefined;
|
|
33
|
+
phone?: string | null | undefined;
|
|
34
|
+
email_id?: string | null | undefined;
|
|
47
35
|
links?: {
|
|
48
|
-
name: string;
|
|
49
|
-
doctype: string;
|
|
50
36
|
link_doctype: string;
|
|
51
37
|
link_name: string;
|
|
52
|
-
owner: string;
|
|
53
|
-
creation: string;
|
|
54
|
-
modified: string;
|
|
55
|
-
modified_by: string;
|
|
56
|
-
parent: string;
|
|
57
|
-
parentfield: string;
|
|
58
|
-
parenttype: string;
|
|
59
|
-
idx: number;
|
|
60
|
-
docstatus: number;
|
|
61
38
|
link_title: string;
|
|
62
39
|
}[] | null | undefined;
|
|
63
|
-
phone?: string | null | undefined;
|
|
64
40
|
image?: string | null | undefined;
|
|
65
41
|
company?: string | null | undefined;
|
|
66
|
-
|
|
42
|
+
first_name?: string | null | undefined;
|
|
67
43
|
middle_name?: string | null | undefined;
|
|
44
|
+
last_name?: string | null | undefined;
|
|
68
45
|
mobile_no?: string | null | undefined;
|
|
46
|
+
email_ids?: {
|
|
47
|
+
email_id: string;
|
|
48
|
+
is_primary: 0 | 1;
|
|
49
|
+
}[] | null | undefined;
|
|
69
50
|
phone_nos?: {
|
|
70
|
-
name: string;
|
|
71
|
-
doctype: string;
|
|
72
|
-
owner: string;
|
|
73
|
-
creation: string;
|
|
74
|
-
modified: string;
|
|
75
|
-
modified_by: string;
|
|
76
|
-
parent: string;
|
|
77
|
-
parentfield: string;
|
|
78
|
-
parenttype: string;
|
|
79
|
-
idx: number;
|
|
80
|
-
docstatus: number;
|
|
81
51
|
phone: string;
|
|
82
|
-
is_primary_phone:
|
|
83
|
-
is_primary_mobile_no:
|
|
52
|
+
is_primary_phone: 0 | 1;
|
|
53
|
+
is_primary_mobile_no: 0 | 1;
|
|
84
54
|
}[] | null | undefined;
|
|
85
|
-
}
|
|
86
|
-
getById: ({ resourceId, priority, }: {
|
|
87
|
-
resourceId: string;
|
|
88
|
-
priority?: number;
|
|
89
|
-
}) => Promise<{
|
|
55
|
+
}[] : TSelectedFields extends TFieldOptions[] ? Pick<{
|
|
90
56
|
name: string;
|
|
91
|
-
doctype: string;
|
|
92
|
-
email_id: string;
|
|
93
57
|
owner: string;
|
|
94
58
|
creation: string;
|
|
95
59
|
modified: string;
|
|
96
60
|
modified_by: string;
|
|
97
61
|
idx: number;
|
|
98
62
|
docstatus: number;
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
owner: string;
|
|
105
|
-
creation: string;
|
|
106
|
-
modified: string;
|
|
107
|
-
modified_by: string;
|
|
108
|
-
parent: string;
|
|
109
|
-
parentfield: string;
|
|
110
|
-
parenttype: string;
|
|
111
|
-
idx: number;
|
|
112
|
-
docstatus: number;
|
|
113
|
-
is_primary: boolean;
|
|
114
|
-
}[];
|
|
115
|
-
sync_with_google_contacts: number;
|
|
116
|
-
pulled_from_google_contacts: boolean;
|
|
117
|
-
is_primary_contact: boolean;
|
|
118
|
-
is_billing_contact: boolean;
|
|
119
|
-
unsubscribed: boolean;
|
|
63
|
+
sync_with_google_contacts: 0 | 1;
|
|
64
|
+
pulled_from_google_contacts: 0 | 1;
|
|
65
|
+
is_primary_contact: 0 | 1;
|
|
66
|
+
is_billing_contact: 0 | 1;
|
|
67
|
+
unsubscribed: 0 | 1;
|
|
120
68
|
status?: string | null | undefined;
|
|
69
|
+
address?: string | null | undefined;
|
|
70
|
+
_user_tags?: string | undefined;
|
|
71
|
+
phone?: string | null | undefined;
|
|
72
|
+
email_id?: string | null | undefined;
|
|
121
73
|
links?: {
|
|
122
|
-
name: string;
|
|
123
|
-
doctype: string;
|
|
124
74
|
link_doctype: string;
|
|
125
75
|
link_name: string;
|
|
126
|
-
owner: string;
|
|
127
|
-
creation: string;
|
|
128
|
-
modified: string;
|
|
129
|
-
modified_by: string;
|
|
130
|
-
parent: string;
|
|
131
|
-
parentfield: string;
|
|
132
|
-
parenttype: string;
|
|
133
|
-
idx: number;
|
|
134
|
-
docstatus: number;
|
|
135
76
|
link_title: string;
|
|
136
77
|
}[] | null | undefined;
|
|
137
|
-
phone?: string | null | undefined;
|
|
138
78
|
image?: string | null | undefined;
|
|
139
79
|
company?: string | null | undefined;
|
|
140
|
-
|
|
80
|
+
first_name?: string | null | undefined;
|
|
141
81
|
middle_name?: string | null | undefined;
|
|
82
|
+
last_name?: string | null | undefined;
|
|
142
83
|
mobile_no?: string | null | undefined;
|
|
84
|
+
email_ids?: {
|
|
85
|
+
email_id: string;
|
|
86
|
+
is_primary: 0 | 1;
|
|
87
|
+
}[] | null | undefined;
|
|
143
88
|
phone_nos?: {
|
|
144
|
-
name: string;
|
|
145
|
-
doctype: string;
|
|
146
|
-
owner: string;
|
|
147
|
-
creation: string;
|
|
148
|
-
modified: string;
|
|
149
|
-
modified_by: string;
|
|
150
|
-
parent: string;
|
|
151
|
-
parentfield: string;
|
|
152
|
-
parenttype: string;
|
|
153
|
-
idx: number;
|
|
154
|
-
docstatus: number;
|
|
155
89
|
phone: string;
|
|
156
|
-
is_primary_phone:
|
|
157
|
-
is_primary_mobile_no:
|
|
90
|
+
is_primary_phone: 0 | 1;
|
|
91
|
+
is_primary_mobile_no: 0 | 1;
|
|
158
92
|
}[] | null | undefined;
|
|
159
|
-
}>;
|
|
160
|
-
|
|
93
|
+
}, TSelectedFields[number]>[] : any) extends infer T ? { [K in keyof T]: T[K]; } : never>;
|
|
94
|
+
getById: ({ resourceId, priority, }: {
|
|
95
|
+
resourceId: string;
|
|
96
|
+
priority?: number;
|
|
97
|
+
}) => Promise<{
|
|
161
98
|
name: string;
|
|
162
|
-
doctype: string;
|
|
163
|
-
email_id: string;
|
|
164
99
|
owner: string;
|
|
165
100
|
creation: string;
|
|
166
101
|
modified: string;
|
|
167
102
|
modified_by: string;
|
|
168
103
|
idx: number;
|
|
169
104
|
docstatus: number;
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
creation: string;
|
|
177
|
-
modified: string;
|
|
178
|
-
modified_by: string;
|
|
179
|
-
parent: string;
|
|
180
|
-
parentfield: string;
|
|
181
|
-
parenttype: string;
|
|
182
|
-
idx: number;
|
|
183
|
-
docstatus: number;
|
|
184
|
-
is_primary: boolean;
|
|
185
|
-
}[];
|
|
186
|
-
sync_with_google_contacts: number;
|
|
187
|
-
pulled_from_google_contacts: boolean;
|
|
188
|
-
is_primary_contact: boolean;
|
|
189
|
-
is_billing_contact: boolean;
|
|
190
|
-
unsubscribed: boolean;
|
|
105
|
+
doctype: string;
|
|
106
|
+
sync_with_google_contacts: 0 | 1;
|
|
107
|
+
pulled_from_google_contacts: 0 | 1;
|
|
108
|
+
is_primary_contact: 0 | 1;
|
|
109
|
+
is_billing_contact: 0 | 1;
|
|
110
|
+
unsubscribed: 0 | 1;
|
|
191
111
|
status?: string | null | undefined;
|
|
112
|
+
address?: string | null | undefined;
|
|
113
|
+
_user_tags?: string | undefined;
|
|
114
|
+
phone?: string | null | undefined;
|
|
115
|
+
email_id?: string | null | undefined;
|
|
192
116
|
links?: {
|
|
193
|
-
name: string;
|
|
194
|
-
doctype: string;
|
|
195
117
|
link_doctype: string;
|
|
196
118
|
link_name: string;
|
|
197
|
-
owner: string;
|
|
198
|
-
creation: string;
|
|
199
|
-
modified: string;
|
|
200
|
-
modified_by: string;
|
|
201
|
-
parent: string;
|
|
202
|
-
parentfield: string;
|
|
203
|
-
parenttype: string;
|
|
204
|
-
idx: number;
|
|
205
|
-
docstatus: number;
|
|
206
119
|
link_title: string;
|
|
207
120
|
}[] | null | undefined;
|
|
208
|
-
phone?: string | null | undefined;
|
|
209
121
|
image?: string | null | undefined;
|
|
210
122
|
company?: string | null | undefined;
|
|
123
|
+
first_name?: string | null | undefined;
|
|
124
|
+
middle_name?: string | null | undefined;
|
|
211
125
|
last_name?: string | null | undefined;
|
|
126
|
+
mobile_no?: string | null | undefined;
|
|
127
|
+
email_ids?: {
|
|
128
|
+
email_id: string;
|
|
129
|
+
is_primary: 0 | 1;
|
|
130
|
+
}[] | null | undefined;
|
|
131
|
+
phone_nos?: {
|
|
132
|
+
phone: string;
|
|
133
|
+
is_primary_phone: 0 | 1;
|
|
134
|
+
is_primary_mobile_no: 0 | 1;
|
|
135
|
+
}[] | null | undefined;
|
|
136
|
+
}>;
|
|
137
|
+
updateById: <TInput extends TInputModel extends undefined ? Partial<{
|
|
138
|
+
status?: string | null | undefined;
|
|
139
|
+
address?: string | null | undefined;
|
|
140
|
+
phone?: string | null | undefined;
|
|
141
|
+
email_id?: string | null | undefined;
|
|
142
|
+
links?: {
|
|
143
|
+
link_doctype: string;
|
|
144
|
+
link_name: string;
|
|
145
|
+
link_title: string;
|
|
146
|
+
}[] | null | undefined;
|
|
147
|
+
image?: string | null | undefined;
|
|
148
|
+
company?: string | null | undefined;
|
|
149
|
+
first_name?: string | null | undefined;
|
|
212
150
|
middle_name?: string | null | undefined;
|
|
151
|
+
last_name?: string | null | undefined;
|
|
152
|
+
sync_with_google_contacts?: 0 | 1 | undefined;
|
|
213
153
|
mobile_no?: string | null | undefined;
|
|
154
|
+
pulled_from_google_contacts?: 0 | 1 | undefined;
|
|
155
|
+
is_primary_contact?: 0 | 1 | undefined;
|
|
156
|
+
is_billing_contact?: 0 | 1 | undefined;
|
|
157
|
+
unsubscribed?: 0 | 1 | undefined;
|
|
158
|
+
email_ids?: {
|
|
159
|
+
email_id: string;
|
|
160
|
+
is_primary: 0 | 1;
|
|
161
|
+
}[] | null | undefined;
|
|
214
162
|
phone_nos?: {
|
|
215
|
-
name: string;
|
|
216
|
-
doctype: string;
|
|
217
|
-
owner: string;
|
|
218
|
-
creation: string;
|
|
219
|
-
modified: string;
|
|
220
|
-
modified_by: string;
|
|
221
|
-
parent: string;
|
|
222
|
-
parentfield: string;
|
|
223
|
-
parenttype: string;
|
|
224
|
-
idx: number;
|
|
225
|
-
docstatus: number;
|
|
226
163
|
phone: string;
|
|
227
|
-
is_primary_phone:
|
|
228
|
-
is_primary_mobile_no:
|
|
164
|
+
is_primary_phone: 0 | 1;
|
|
165
|
+
is_primary_mobile_no: 0 | 1;
|
|
229
166
|
}[] | null | undefined;
|
|
230
|
-
}> : TInputModel extends import("zod").ZodTypeAny ?
|
|
167
|
+
}> : TInputModel extends import("zod").ZodTypeAny ? import("zod").TypeOf<TInputModel> : any, TInputModel extends import("zod").ZodTypeAny | undefined = undefined>({ resourceId, inputValidationModel, body, priority, }: {
|
|
231
168
|
resourceId: string;
|
|
232
169
|
inputValidationModel?: TInputModel;
|
|
233
170
|
priority?: number;
|
|
234
171
|
body: TInput;
|
|
235
172
|
}) => Promise<{
|
|
236
173
|
name: string;
|
|
237
|
-
doctype: string;
|
|
238
|
-
email_id: string;
|
|
239
174
|
owner: string;
|
|
240
175
|
creation: string;
|
|
241
176
|
modified: string;
|
|
242
177
|
modified_by: string;
|
|
243
178
|
idx: number;
|
|
244
179
|
docstatus: number;
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
creation: string;
|
|
252
|
-
modified: string;
|
|
253
|
-
modified_by: string;
|
|
254
|
-
parent: string;
|
|
255
|
-
parentfield: string;
|
|
256
|
-
parenttype: string;
|
|
257
|
-
idx: number;
|
|
258
|
-
docstatus: number;
|
|
259
|
-
is_primary: boolean;
|
|
260
|
-
}[];
|
|
261
|
-
sync_with_google_contacts: number;
|
|
262
|
-
pulled_from_google_contacts: boolean;
|
|
263
|
-
is_primary_contact: boolean;
|
|
264
|
-
is_billing_contact: boolean;
|
|
265
|
-
unsubscribed: boolean;
|
|
180
|
+
doctype: string;
|
|
181
|
+
sync_with_google_contacts: 0 | 1;
|
|
182
|
+
pulled_from_google_contacts: 0 | 1;
|
|
183
|
+
is_primary_contact: 0 | 1;
|
|
184
|
+
is_billing_contact: 0 | 1;
|
|
185
|
+
unsubscribed: 0 | 1;
|
|
266
186
|
status?: string | null | undefined;
|
|
187
|
+
address?: string | null | undefined;
|
|
188
|
+
_user_tags?: string | undefined;
|
|
189
|
+
phone?: string | null | undefined;
|
|
190
|
+
email_id?: string | null | undefined;
|
|
267
191
|
links?: {
|
|
268
|
-
name: string;
|
|
269
|
-
doctype: string;
|
|
270
192
|
link_doctype: string;
|
|
271
193
|
link_name: string;
|
|
272
|
-
owner: string;
|
|
273
|
-
creation: string;
|
|
274
|
-
modified: string;
|
|
275
|
-
modified_by: string;
|
|
276
|
-
parent: string;
|
|
277
|
-
parentfield: string;
|
|
278
|
-
parenttype: string;
|
|
279
|
-
idx: number;
|
|
280
|
-
docstatus: number;
|
|
281
194
|
link_title: string;
|
|
282
195
|
}[] | null | undefined;
|
|
283
|
-
phone?: string | null | undefined;
|
|
284
196
|
image?: string | null | undefined;
|
|
285
197
|
company?: string | null | undefined;
|
|
286
|
-
|
|
198
|
+
first_name?: string | null | undefined;
|
|
287
199
|
middle_name?: string | null | undefined;
|
|
200
|
+
last_name?: string | null | undefined;
|
|
288
201
|
mobile_no?: string | null | undefined;
|
|
202
|
+
email_ids?: {
|
|
203
|
+
email_id: string;
|
|
204
|
+
is_primary: 0 | 1;
|
|
205
|
+
}[] | null | undefined;
|
|
289
206
|
phone_nos?: {
|
|
290
|
-
name: string;
|
|
291
|
-
doctype: string;
|
|
292
|
-
owner: string;
|
|
293
|
-
creation: string;
|
|
294
|
-
modified: string;
|
|
295
|
-
modified_by: string;
|
|
296
|
-
parent: string;
|
|
297
|
-
parentfield: string;
|
|
298
|
-
parenttype: string;
|
|
299
|
-
idx: number;
|
|
300
|
-
docstatus: number;
|
|
301
207
|
phone: string;
|
|
302
|
-
is_primary_phone:
|
|
303
|
-
is_primary_mobile_no:
|
|
208
|
+
is_primary_phone: 0 | 1;
|
|
209
|
+
is_primary_mobile_no: 0 | 1;
|
|
304
210
|
}[] | null | undefined;
|
|
305
211
|
}>;
|
|
306
212
|
deleteById: ({ resourceId, priority, }: {
|
|
@@ -308,146 +214,83 @@ export declare class ERPNextContact {
|
|
|
308
214
|
priority?: number;
|
|
309
215
|
}) => Promise<import("zod").TypeOf<typeof import("../model/ERPNextResponse").DeleteResponseModel>>;
|
|
310
216
|
constructor(temporalClient: TemporalClient);
|
|
311
|
-
getContactsByAddressEmail: <K extends keyof (typeof Contact)["_type"]>(email: string, fields?: K[]) => Promise<Pick<{
|
|
217
|
+
getContactsByAddressEmail: <K extends keyof (typeof Contact)["_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" | "sync_with_google_contacts" | "pulled_from_google_contacts" | "is_primary_contact" | "is_billing_contact" | "unsubscribed") | ("status" | "address" | "_user_tags" | "phone" | "email_id" | "links" | "image" | "company" | "first_name" | "middle_name" | "last_name" | "mobile_no" | "email_ids" | "phone_nos"))[] ? Pick<{
|
|
312
218
|
name: string;
|
|
313
|
-
doctype: string;
|
|
314
|
-
email_id: string;
|
|
315
219
|
owner: string;
|
|
316
220
|
creation: string;
|
|
317
221
|
modified: string;
|
|
318
222
|
modified_by: string;
|
|
319
223
|
idx: number;
|
|
320
224
|
docstatus: number;
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
owner: string;
|
|
327
|
-
creation: string;
|
|
328
|
-
modified: string;
|
|
329
|
-
modified_by: string;
|
|
330
|
-
parent: string;
|
|
331
|
-
parentfield: string;
|
|
332
|
-
parenttype: string;
|
|
333
|
-
idx: number;
|
|
334
|
-
docstatus: number;
|
|
335
|
-
is_primary: boolean;
|
|
336
|
-
}[];
|
|
337
|
-
sync_with_google_contacts: number;
|
|
338
|
-
pulled_from_google_contacts: boolean;
|
|
339
|
-
is_primary_contact: boolean;
|
|
340
|
-
is_billing_contact: boolean;
|
|
341
|
-
unsubscribed: boolean;
|
|
225
|
+
sync_with_google_contacts: 0 | 1;
|
|
226
|
+
pulled_from_google_contacts: 0 | 1;
|
|
227
|
+
is_primary_contact: 0 | 1;
|
|
228
|
+
is_billing_contact: 0 | 1;
|
|
229
|
+
unsubscribed: 0 | 1;
|
|
342
230
|
status?: string | null | undefined;
|
|
231
|
+
address?: string | null | undefined;
|
|
232
|
+
_user_tags?: string | undefined;
|
|
233
|
+
phone?: string | null | undefined;
|
|
234
|
+
email_id?: string | null | undefined;
|
|
343
235
|
links?: {
|
|
344
|
-
name: string;
|
|
345
|
-
doctype: string;
|
|
346
236
|
link_doctype: string;
|
|
347
237
|
link_name: string;
|
|
348
|
-
owner: string;
|
|
349
|
-
creation: string;
|
|
350
|
-
modified: string;
|
|
351
|
-
modified_by: string;
|
|
352
|
-
parent: string;
|
|
353
|
-
parentfield: string;
|
|
354
|
-
parenttype: string;
|
|
355
|
-
idx: number;
|
|
356
|
-
docstatus: number;
|
|
357
238
|
link_title: string;
|
|
358
239
|
}[] | null | undefined;
|
|
359
|
-
phone?: string | null | undefined;
|
|
360
240
|
image?: string | null | undefined;
|
|
361
241
|
company?: string | null | undefined;
|
|
362
|
-
|
|
242
|
+
first_name?: string | null | undefined;
|
|
363
243
|
middle_name?: string | null | undefined;
|
|
244
|
+
last_name?: string | null | undefined;
|
|
364
245
|
mobile_no?: string | null | undefined;
|
|
246
|
+
email_ids?: {
|
|
247
|
+
email_id: string;
|
|
248
|
+
is_primary: 0 | 1;
|
|
249
|
+
}[] | null | undefined;
|
|
365
250
|
phone_nos?: {
|
|
366
|
-
name: string;
|
|
367
|
-
doctype: string;
|
|
368
|
-
owner: string;
|
|
369
|
-
creation: string;
|
|
370
|
-
modified: string;
|
|
371
|
-
modified_by: string;
|
|
372
|
-
parent: string;
|
|
373
|
-
parentfield: string;
|
|
374
|
-
parenttype: string;
|
|
375
|
-
idx: number;
|
|
376
|
-
docstatus: number;
|
|
377
251
|
phone: string;
|
|
378
|
-
is_primary_phone:
|
|
379
|
-
is_primary_mobile_no:
|
|
252
|
+
is_primary_phone: 0 | 1;
|
|
253
|
+
is_primary_mobile_no: 0 | 1;
|
|
380
254
|
}[] | null | undefined;
|
|
381
|
-
},
|
|
382
|
-
create: (contact: Omit<
|
|
255
|
+
}, T_1[number]>[] : any : never : never) extends infer T ? { [K_1 in keyof T]: T[K_1]; } : never>;
|
|
256
|
+
create: (contact: Omit<ContactInputType, "links">, customerName: string) => Promise<{
|
|
383
257
|
name: string;
|
|
384
|
-
doctype: string;
|
|
385
|
-
email_id: string;
|
|
386
258
|
owner: string;
|
|
387
259
|
creation: string;
|
|
388
260
|
modified: string;
|
|
389
261
|
modified_by: string;
|
|
390
262
|
idx: number;
|
|
391
263
|
docstatus: number;
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
creation: string;
|
|
399
|
-
modified: string;
|
|
400
|
-
modified_by: string;
|
|
401
|
-
parent: string;
|
|
402
|
-
parentfield: string;
|
|
403
|
-
parenttype: string;
|
|
404
|
-
idx: number;
|
|
405
|
-
docstatus: number;
|
|
406
|
-
is_primary: boolean;
|
|
407
|
-
}[];
|
|
408
|
-
sync_with_google_contacts: number;
|
|
409
|
-
pulled_from_google_contacts: boolean;
|
|
410
|
-
is_primary_contact: boolean;
|
|
411
|
-
is_billing_contact: boolean;
|
|
412
|
-
unsubscribed: boolean;
|
|
264
|
+
doctype: string;
|
|
265
|
+
sync_with_google_contacts: 0 | 1;
|
|
266
|
+
pulled_from_google_contacts: 0 | 1;
|
|
267
|
+
is_primary_contact: 0 | 1;
|
|
268
|
+
is_billing_contact: 0 | 1;
|
|
269
|
+
unsubscribed: 0 | 1;
|
|
413
270
|
status?: string | null | undefined;
|
|
271
|
+
address?: string | null | undefined;
|
|
272
|
+
_user_tags?: string | undefined;
|
|
273
|
+
phone?: string | null | undefined;
|
|
274
|
+
email_id?: string | null | undefined;
|
|
414
275
|
links?: {
|
|
415
|
-
name: string;
|
|
416
|
-
doctype: string;
|
|
417
276
|
link_doctype: string;
|
|
418
277
|
link_name: string;
|
|
419
|
-
owner: string;
|
|
420
|
-
creation: string;
|
|
421
|
-
modified: string;
|
|
422
|
-
modified_by: string;
|
|
423
|
-
parent: string;
|
|
424
|
-
parentfield: string;
|
|
425
|
-
parenttype: string;
|
|
426
|
-
idx: number;
|
|
427
|
-
docstatus: number;
|
|
428
278
|
link_title: string;
|
|
429
279
|
}[] | null | undefined;
|
|
430
|
-
phone?: string | null | undefined;
|
|
431
280
|
image?: string | null | undefined;
|
|
432
281
|
company?: string | null | undefined;
|
|
433
|
-
|
|
282
|
+
first_name?: string | null | undefined;
|
|
434
283
|
middle_name?: string | null | undefined;
|
|
284
|
+
last_name?: string | null | undefined;
|
|
435
285
|
mobile_no?: string | null | undefined;
|
|
286
|
+
email_ids?: {
|
|
287
|
+
email_id: string;
|
|
288
|
+
is_primary: 0 | 1;
|
|
289
|
+
}[] | null | undefined;
|
|
436
290
|
phone_nos?: {
|
|
437
|
-
name: string;
|
|
438
|
-
doctype: string;
|
|
439
|
-
owner: string;
|
|
440
|
-
creation: string;
|
|
441
|
-
modified: string;
|
|
442
|
-
modified_by: string;
|
|
443
|
-
parent: string;
|
|
444
|
-
parentfield: string;
|
|
445
|
-
parenttype: string;
|
|
446
|
-
idx: number;
|
|
447
|
-
docstatus: number;
|
|
448
291
|
phone: string;
|
|
449
|
-
is_primary_phone:
|
|
450
|
-
is_primary_mobile_no:
|
|
292
|
+
is_primary_phone: 0 | 1;
|
|
293
|
+
is_primary_mobile_no: 0 | 1;
|
|
451
294
|
}[] | null | undefined;
|
|
452
295
|
}>;
|
|
453
296
|
}
|
|
@@ -25,11 +25,11 @@ class ERPNextContact {
|
|
|
25
25
|
});
|
|
26
26
|
this.create = (contact, customerName) => __awaiter(this, void 0, void 0, function* () {
|
|
27
27
|
const result = yield this.baseRequest.create({
|
|
28
|
-
inputValidationModel: Contact_1.ContactPostBody,
|
|
29
28
|
body: Object.assign(Object.assign({}, contact), { links: [
|
|
30
29
|
{
|
|
31
30
|
link_doctype: "Customer",
|
|
32
31
|
link_name: customerName,
|
|
32
|
+
link_title: customerName,
|
|
33
33
|
},
|
|
34
34
|
] }),
|
|
35
35
|
});
|