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
|
@@ -23,17 +23,7 @@ declare const StockEntryItem: z.ZodObject<{
|
|
|
23
23
|
}>;
|
|
24
24
|
export type StockEntryItemType = z.infer<typeof StockEntryItem>;
|
|
25
25
|
export declare const StockEntry: z.ZodObject<{
|
|
26
|
-
name: z.ZodString;
|
|
27
26
|
external_name: z.ZodOptional<z.ZodString>;
|
|
28
|
-
owner: z.ZodString;
|
|
29
|
-
creation: z.ZodString;
|
|
30
|
-
modified: z.ZodString;
|
|
31
|
-
modified_by: z.ZodString;
|
|
32
|
-
parent: z.ZodOptional<z.ZodString>;
|
|
33
|
-
parentfield: z.ZodOptional<z.ZodString>;
|
|
34
|
-
parenttype: z.ZodOptional<z.ZodString>;
|
|
35
|
-
idx: z.ZodNumber;
|
|
36
|
-
docstatus: z.ZodNumber;
|
|
37
27
|
naming_series: z.ZodString;
|
|
38
28
|
stock_entry_type: z.ZodString;
|
|
39
29
|
outgoing_stock_entry: z.ZodOptional<z.ZodString>;
|
|
@@ -81,7 +71,6 @@ export declare const StockEntry: z.ZodObject<{
|
|
|
81
71
|
amended_from: z.ZodOptional<z.ZodString>;
|
|
82
72
|
credit_note: z.ZodOptional<z.ZodString>;
|
|
83
73
|
is_return: z.ZodNumber;
|
|
84
|
-
doctype: z.ZodString;
|
|
85
74
|
items: z.ZodArray<z.ZodObject<{
|
|
86
75
|
t_warehouse: z.ZodOptional<z.ZodString>;
|
|
87
76
|
s_warehouse: z.ZodOptional<z.ZodString>;
|
|
@@ -106,16 +95,12 @@ export declare const StockEntry: z.ZodObject<{
|
|
|
106
95
|
}>, "many">;
|
|
107
96
|
additional_costs: z.ZodArray<z.ZodString, "many">;
|
|
108
97
|
}, "strip", z.ZodTypeAny, {
|
|
109
|
-
name: string;
|
|
110
|
-
doctype: string;
|
|
111
|
-
owner: string;
|
|
112
|
-
creation: string;
|
|
113
|
-
modified: string;
|
|
114
|
-
modified_by: string;
|
|
115
|
-
idx: number;
|
|
116
|
-
docstatus: number;
|
|
117
98
|
company: string;
|
|
118
99
|
naming_series: string;
|
|
100
|
+
posting_date: string;
|
|
101
|
+
posting_time: string;
|
|
102
|
+
set_posting_time: number;
|
|
103
|
+
is_return: number;
|
|
119
104
|
items: {
|
|
120
105
|
item_code: string;
|
|
121
106
|
qty: number;
|
|
@@ -124,10 +109,6 @@ export declare const StockEntry: z.ZodObject<{
|
|
|
124
109
|
s_warehouse?: string | undefined;
|
|
125
110
|
basic_rate?: number | undefined;
|
|
126
111
|
}[];
|
|
127
|
-
posting_date: string;
|
|
128
|
-
posting_time: string;
|
|
129
|
-
set_posting_time: number;
|
|
130
|
-
is_return: number;
|
|
131
112
|
is_opening: string;
|
|
132
113
|
apply_putaway_rule: number;
|
|
133
114
|
stock_entry_type: string;
|
|
@@ -144,12 +125,9 @@ export declare const StockEntry: z.ZodObject<{
|
|
|
144
125
|
per_transferred: number;
|
|
145
126
|
total_amount: number;
|
|
146
127
|
additional_costs: string[];
|
|
147
|
-
|
|
148
|
-
parentfield?: string | undefined;
|
|
149
|
-
parenttype?: string | undefined;
|
|
128
|
+
amended_from?: string | undefined;
|
|
150
129
|
supplier_name?: string | undefined;
|
|
151
130
|
project?: string | undefined;
|
|
152
|
-
amended_from?: string | undefined;
|
|
153
131
|
pick_list?: string | undefined;
|
|
154
132
|
address_display?: string | undefined;
|
|
155
133
|
scan_barcode?: string | undefined;
|
|
@@ -160,13 +138,13 @@ export declare const StockEntry: z.ZodObject<{
|
|
|
160
138
|
remarks?: string | undefined;
|
|
161
139
|
from_warehouse?: string | undefined;
|
|
162
140
|
supplier_address?: string | undefined;
|
|
141
|
+
bom_no?: string | undefined;
|
|
163
142
|
external_name?: string | undefined;
|
|
164
143
|
outgoing_stock_entry?: string | undefined;
|
|
165
144
|
work_order?: string | undefined;
|
|
166
145
|
delivery_note_no?: string | undefined;
|
|
167
146
|
sales_invoice_no?: string | undefined;
|
|
168
147
|
purchase_receipt_no?: string | undefined;
|
|
169
|
-
bom_no?: string | undefined;
|
|
170
148
|
source_warehouse_address?: string | undefined;
|
|
171
149
|
source_address_display?: string | undefined;
|
|
172
150
|
to_warehouse?: string | undefined;
|
|
@@ -175,16 +153,12 @@ export declare const StockEntry: z.ZodObject<{
|
|
|
175
153
|
job_card?: string | undefined;
|
|
176
154
|
credit_note?: string | undefined;
|
|
177
155
|
}, {
|
|
178
|
-
name: string;
|
|
179
|
-
doctype: string;
|
|
180
|
-
owner: string;
|
|
181
|
-
creation: string;
|
|
182
|
-
modified: string;
|
|
183
|
-
modified_by: string;
|
|
184
|
-
idx: number;
|
|
185
|
-
docstatus: number;
|
|
186
156
|
company: string;
|
|
187
157
|
naming_series: string;
|
|
158
|
+
posting_date: string;
|
|
159
|
+
posting_time: string;
|
|
160
|
+
set_posting_time: number;
|
|
161
|
+
is_return: number;
|
|
188
162
|
items: {
|
|
189
163
|
item_code: string;
|
|
190
164
|
qty: number;
|
|
@@ -193,10 +167,6 @@ export declare const StockEntry: z.ZodObject<{
|
|
|
193
167
|
s_warehouse?: string | undefined;
|
|
194
168
|
basic_rate?: number | undefined;
|
|
195
169
|
}[];
|
|
196
|
-
posting_date: string;
|
|
197
|
-
posting_time: string;
|
|
198
|
-
set_posting_time: number;
|
|
199
|
-
is_return: number;
|
|
200
170
|
is_opening: string;
|
|
201
171
|
apply_putaway_rule: number;
|
|
202
172
|
stock_entry_type: string;
|
|
@@ -213,12 +183,9 @@ export declare const StockEntry: z.ZodObject<{
|
|
|
213
183
|
per_transferred: number;
|
|
214
184
|
total_amount: number;
|
|
215
185
|
additional_costs: string[];
|
|
216
|
-
|
|
217
|
-
parentfield?: string | undefined;
|
|
218
|
-
parenttype?: string | undefined;
|
|
186
|
+
amended_from?: string | undefined;
|
|
219
187
|
supplier_name?: string | undefined;
|
|
220
188
|
project?: string | undefined;
|
|
221
|
-
amended_from?: string | undefined;
|
|
222
189
|
pick_list?: string | undefined;
|
|
223
190
|
address_display?: string | undefined;
|
|
224
191
|
scan_barcode?: string | undefined;
|
|
@@ -229,13 +196,13 @@ export declare const StockEntry: z.ZodObject<{
|
|
|
229
196
|
remarks?: string | undefined;
|
|
230
197
|
from_warehouse?: string | undefined;
|
|
231
198
|
supplier_address?: string | undefined;
|
|
199
|
+
bom_no?: string | undefined;
|
|
232
200
|
external_name?: string | undefined;
|
|
233
201
|
outgoing_stock_entry?: string | undefined;
|
|
234
202
|
work_order?: string | undefined;
|
|
235
203
|
delivery_note_no?: string | undefined;
|
|
236
204
|
sales_invoice_no?: string | undefined;
|
|
237
205
|
purchase_receipt_no?: string | undefined;
|
|
238
|
-
bom_no?: string | undefined;
|
|
239
206
|
source_warehouse_address?: string | undefined;
|
|
240
207
|
source_address_display?: string | undefined;
|
|
241
208
|
to_warehouse?: string | undefined;
|
|
@@ -15,17 +15,7 @@ const StockEntryItem = zod_1.z
|
|
|
15
15
|
.describe("Stock Entry Item");
|
|
16
16
|
exports.StockEntry = zod_1.z
|
|
17
17
|
.object({
|
|
18
|
-
name: zod_1.z.string(),
|
|
19
18
|
external_name: zod_1.z.string().optional(),
|
|
20
|
-
owner: zod_1.z.string(),
|
|
21
|
-
creation: zod_1.z.string(),
|
|
22
|
-
modified: zod_1.z.string(),
|
|
23
|
-
modified_by: zod_1.z.string(),
|
|
24
|
-
parent: zod_1.z.string().optional(),
|
|
25
|
-
parentfield: zod_1.z.string().optional(),
|
|
26
|
-
parenttype: zod_1.z.string().optional(),
|
|
27
|
-
idx: zod_1.z.number(),
|
|
28
|
-
docstatus: zod_1.z.number(),
|
|
29
19
|
naming_series: zod_1.z.string(),
|
|
30
20
|
stock_entry_type: zod_1.z.string(),
|
|
31
21
|
outgoing_stock_entry: zod_1.z.string().optional(),
|
|
@@ -73,7 +63,6 @@ exports.StockEntry = zod_1.z
|
|
|
73
63
|
amended_from: zod_1.z.string().optional(),
|
|
74
64
|
credit_note: zod_1.z.string().optional(),
|
|
75
65
|
is_return: zod_1.z.number(),
|
|
76
|
-
doctype: zod_1.z.string(),
|
|
77
66
|
items: zod_1.z.array(StockEntryItem),
|
|
78
67
|
additional_costs: zod_1.z.array(zod_1.z.string()),
|
|
79
68
|
})
|
|
@@ -44,7 +44,6 @@ declare const StockReconciliationItem: z.ZodObject<{
|
|
|
44
44
|
}>;
|
|
45
45
|
export type StockReconciliationItemType = z.infer<typeof StockReconciliationItem>;
|
|
46
46
|
export declare const StockReconciliation: z.ZodObject<{
|
|
47
|
-
doctype: z.ZodLiteral<"Stock Reconciliation">;
|
|
48
47
|
naming_series: z.ZodString;
|
|
49
48
|
company: z.ZodString;
|
|
50
49
|
purpose: z.ZodEnum<["Stock Reconciliation", "Opening Stock"]>;
|
|
@@ -99,26 +98,13 @@ export declare const StockReconciliation: z.ZodObject<{
|
|
|
99
98
|
reconciliation_json: z.ZodOptional<z.ZodString>;
|
|
100
99
|
scan_barcode: z.ZodOptional<z.ZodString>;
|
|
101
100
|
scan_mode: z.ZodDefault<z.ZodBoolean>;
|
|
102
|
-
docstatus: z.ZodNumber;
|
|
103
101
|
workflow_state: z.ZodOptional<z.ZodString>;
|
|
104
|
-
amended_from: z.ZodOptional<z.ZodString>;
|
|
105
|
-
owner: z.ZodString;
|
|
106
|
-
creation: z.ZodString;
|
|
107
|
-
modified: z.ZodString;
|
|
108
|
-
modified_by: z.ZodString;
|
|
109
|
-
idx: z.ZodNumber;
|
|
110
|
-
name: z.ZodString;
|
|
111
102
|
}, "strip", z.ZodTypeAny, {
|
|
112
|
-
name: string;
|
|
113
|
-
doctype: "Stock Reconciliation";
|
|
114
|
-
owner: string;
|
|
115
|
-
creation: string;
|
|
116
|
-
modified: string;
|
|
117
|
-
modified_by: string;
|
|
118
|
-
idx: number;
|
|
119
|
-
docstatus: number;
|
|
120
103
|
company: string;
|
|
121
104
|
naming_series: string;
|
|
105
|
+
posting_date: string;
|
|
106
|
+
posting_time: string;
|
|
107
|
+
set_posting_time: boolean;
|
|
122
108
|
items: {
|
|
123
109
|
item_code: string;
|
|
124
110
|
qty: number;
|
|
@@ -134,28 +120,18 @@ export declare const StockReconciliation: z.ZodObject<{
|
|
|
134
120
|
quantity_difference?: number | undefined;
|
|
135
121
|
amount_difference?: number | undefined;
|
|
136
122
|
}[];
|
|
137
|
-
posting_date: string;
|
|
138
|
-
posting_time: string;
|
|
139
|
-
set_posting_time: boolean;
|
|
140
123
|
purpose: "Stock Reconciliation" | "Opening Stock";
|
|
141
124
|
scan_mode: boolean;
|
|
142
125
|
expense_account?: string | undefined;
|
|
143
126
|
cost_center?: string | undefined;
|
|
144
|
-
amended_from?: string | undefined;
|
|
145
127
|
scan_barcode?: string | undefined;
|
|
146
128
|
reconciliation_json?: string | undefined;
|
|
147
129
|
workflow_state?: string | undefined;
|
|
148
130
|
}, {
|
|
149
|
-
name: string;
|
|
150
|
-
doctype: "Stock Reconciliation";
|
|
151
|
-
owner: string;
|
|
152
|
-
creation: string;
|
|
153
|
-
modified: string;
|
|
154
|
-
modified_by: string;
|
|
155
|
-
idx: number;
|
|
156
|
-
docstatus: number;
|
|
157
131
|
company: string;
|
|
158
132
|
naming_series: string;
|
|
133
|
+
posting_date: string;
|
|
134
|
+
posting_time: string;
|
|
159
135
|
items: {
|
|
160
136
|
item_code: string;
|
|
161
137
|
qty: number;
|
|
@@ -171,12 +147,9 @@ export declare const StockReconciliation: z.ZodObject<{
|
|
|
171
147
|
quantity_difference?: number | undefined;
|
|
172
148
|
amount_difference?: number | undefined;
|
|
173
149
|
}[];
|
|
174
|
-
posting_date: string;
|
|
175
|
-
posting_time: string;
|
|
176
150
|
purpose: "Stock Reconciliation" | "Opening Stock";
|
|
177
151
|
expense_account?: string | undefined;
|
|
178
152
|
cost_center?: string | undefined;
|
|
179
|
-
amended_from?: string | undefined;
|
|
180
153
|
set_posting_time?: boolean | undefined;
|
|
181
154
|
scan_barcode?: string | undefined;
|
|
182
155
|
reconciliation_json?: string | undefined;
|
|
@@ -18,7 +18,6 @@ const StockReconciliationItem = zod_1.z.object({
|
|
|
18
18
|
barcode: zod_1.z.string().optional(),
|
|
19
19
|
});
|
|
20
20
|
exports.StockReconciliation = zod_1.z.object({
|
|
21
|
-
doctype: zod_1.z.literal("Stock Reconciliation"),
|
|
22
21
|
naming_series: zod_1.z.string(),
|
|
23
22
|
company: zod_1.z.string(),
|
|
24
23
|
purpose: zod_1.z.enum(["Stock Reconciliation", "Opening Stock"]),
|
|
@@ -31,14 +30,5 @@ exports.StockReconciliation = zod_1.z.object({
|
|
|
31
30
|
reconciliation_json: zod_1.z.string().optional(), // JSON string
|
|
32
31
|
scan_barcode: zod_1.z.string().optional(),
|
|
33
32
|
scan_mode: zod_1.z.boolean().default(false),
|
|
34
|
-
docstatus: zod_1.z.number().min(0).max(2), // 0: Draft, 1: Submitted, 2: Cancelled
|
|
35
33
|
workflow_state: zod_1.z.string().optional(),
|
|
36
|
-
amended_from: zod_1.z.string().optional(),
|
|
37
|
-
// Metadata fields
|
|
38
|
-
owner: zod_1.z.string(),
|
|
39
|
-
creation: zod_1.z.string(), // ISO datetime
|
|
40
|
-
modified: zod_1.z.string(), // ISO datetime
|
|
41
|
-
modified_by: zod_1.z.string(),
|
|
42
|
-
idx: zod_1.z.number(),
|
|
43
|
-
name: zod_1.z.string(),
|
|
44
34
|
});
|
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const Supplier: z.ZodObject<{
|
|
3
|
-
name: z.ZodString;
|
|
4
|
-
owner: z.ZodString;
|
|
5
|
-
creation: z.ZodString;
|
|
6
|
-
modified: z.ZodString;
|
|
7
|
-
modified_by: z.ZodString;
|
|
8
|
-
idx: z.ZodNumber;
|
|
9
3
|
import_reference: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
10
|
-
docstatus: z.ZodNumber;
|
|
11
4
|
naming_series: z.ZodString;
|
|
12
5
|
supplier_display_name: z.ZodString;
|
|
13
6
|
supplier_name: z.ZodString;
|
|
@@ -29,62 +22,20 @@ export declare const Supplier: z.ZodObject<{
|
|
|
29
22
|
hold_type: z.ZodString;
|
|
30
23
|
language: z.ZodString;
|
|
31
24
|
is_frozen: z.ZodNumber;
|
|
32
|
-
doctype: z.ZodString;
|
|
33
25
|
companies: z.ZodArray<z.ZodString, "many">;
|
|
34
26
|
accounts: z.ZodArray<z.ZodObject<{
|
|
35
|
-
name: z.ZodString;
|
|
36
|
-
owner: z.ZodString;
|
|
37
|
-
creation: z.ZodString;
|
|
38
|
-
modified: z.ZodString;
|
|
39
|
-
modified_by: z.ZodString;
|
|
40
|
-
docstatus: z.ZodNumber;
|
|
41
|
-
idx: z.ZodNumber;
|
|
42
27
|
company: z.ZodString;
|
|
43
28
|
account: z.ZodString;
|
|
44
|
-
parent: z.ZodString;
|
|
45
|
-
parentfield: z.ZodString;
|
|
46
|
-
parenttype: z.ZodString;
|
|
47
|
-
doctype: z.ZodString;
|
|
48
29
|
}, "strip", z.ZodTypeAny, {
|
|
49
|
-
name: string;
|
|
50
|
-
doctype: string;
|
|
51
|
-
owner: string;
|
|
52
|
-
creation: string;
|
|
53
|
-
modified: string;
|
|
54
|
-
modified_by: string;
|
|
55
|
-
parent: string;
|
|
56
|
-
parentfield: string;
|
|
57
|
-
parenttype: string;
|
|
58
|
-
idx: number;
|
|
59
|
-
docstatus: number;
|
|
60
30
|
company: string;
|
|
61
31
|
account: string;
|
|
62
32
|
}, {
|
|
63
|
-
name: string;
|
|
64
|
-
doctype: string;
|
|
65
|
-
owner: string;
|
|
66
|
-
creation: string;
|
|
67
|
-
modified: string;
|
|
68
|
-
modified_by: string;
|
|
69
|
-
parent: string;
|
|
70
|
-
parentfield: string;
|
|
71
|
-
parenttype: string;
|
|
72
|
-
idx: number;
|
|
73
|
-
docstatus: number;
|
|
74
33
|
company: string;
|
|
75
34
|
account: string;
|
|
76
35
|
}>, "many">;
|
|
77
36
|
supplier_number_code: z.ZodOptional<z.ZodString>;
|
|
78
37
|
}, "strip", z.ZodTypeAny, {
|
|
79
|
-
name: string;
|
|
80
|
-
doctype: string;
|
|
81
38
|
country: string;
|
|
82
|
-
owner: string;
|
|
83
|
-
creation: string;
|
|
84
|
-
modified: string;
|
|
85
|
-
modified_by: string;
|
|
86
|
-
idx: number;
|
|
87
|
-
docstatus: number;
|
|
88
39
|
disabled: number;
|
|
89
40
|
naming_series: string;
|
|
90
41
|
supplier_display_name: string;
|
|
@@ -103,17 +54,6 @@ export declare const Supplier: z.ZodObject<{
|
|
|
103
54
|
is_frozen: number;
|
|
104
55
|
companies: string[];
|
|
105
56
|
accounts: {
|
|
106
|
-
name: string;
|
|
107
|
-
doctype: string;
|
|
108
|
-
owner: string;
|
|
109
|
-
creation: string;
|
|
110
|
-
modified: string;
|
|
111
|
-
modified_by: string;
|
|
112
|
-
parent: string;
|
|
113
|
-
parentfield: string;
|
|
114
|
-
parenttype: string;
|
|
115
|
-
idx: number;
|
|
116
|
-
docstatus: number;
|
|
117
57
|
company: string;
|
|
118
58
|
account: string;
|
|
119
59
|
}[];
|
|
@@ -124,15 +64,7 @@ export declare const Supplier: z.ZodObject<{
|
|
|
124
64
|
default_price_list?: string | null | undefined;
|
|
125
65
|
supplier_number_code?: string | undefined;
|
|
126
66
|
}, {
|
|
127
|
-
name: string;
|
|
128
|
-
doctype: string;
|
|
129
67
|
country: string;
|
|
130
|
-
owner: string;
|
|
131
|
-
creation: string;
|
|
132
|
-
modified: string;
|
|
133
|
-
modified_by: string;
|
|
134
|
-
idx: number;
|
|
135
|
-
docstatus: number;
|
|
136
68
|
disabled: number;
|
|
137
69
|
naming_series: string;
|
|
138
70
|
supplier_display_name: string;
|
|
@@ -151,17 +83,6 @@ export declare const Supplier: z.ZodObject<{
|
|
|
151
83
|
is_frozen: number;
|
|
152
84
|
companies: string[];
|
|
153
85
|
accounts: {
|
|
154
|
-
name: string;
|
|
155
|
-
doctype: string;
|
|
156
|
-
owner: string;
|
|
157
|
-
creation: string;
|
|
158
|
-
modified: string;
|
|
159
|
-
modified_by: string;
|
|
160
|
-
parent: string;
|
|
161
|
-
parentfield: string;
|
|
162
|
-
parenttype: string;
|
|
163
|
-
idx: number;
|
|
164
|
-
docstatus: number;
|
|
165
86
|
company: string;
|
|
166
87
|
account: string;
|
|
167
88
|
}[];
|
|
@@ -5,14 +5,7 @@ const zod_1 = require("zod");
|
|
|
5
5
|
const Account_1 = require("./Account");
|
|
6
6
|
exports.Supplier = zod_1.z
|
|
7
7
|
.object({
|
|
8
|
-
name: zod_1.z.string(),
|
|
9
|
-
owner: zod_1.z.string(),
|
|
10
|
-
creation: zod_1.z.string(),
|
|
11
|
-
modified: zod_1.z.string(),
|
|
12
|
-
modified_by: zod_1.z.string(),
|
|
13
|
-
idx: zod_1.z.number(),
|
|
14
8
|
import_reference: zod_1.z.string().optional().nullable(),
|
|
15
|
-
docstatus: zod_1.z.number(),
|
|
16
9
|
naming_series: zod_1.z.string(),
|
|
17
10
|
supplier_display_name: zod_1.z.string(),
|
|
18
11
|
supplier_name: zod_1.z.string(),
|
|
@@ -34,7 +27,6 @@ exports.Supplier = zod_1.z
|
|
|
34
27
|
hold_type: zod_1.z.string(),
|
|
35
28
|
language: zod_1.z.string(),
|
|
36
29
|
is_frozen: zod_1.z.number(),
|
|
37
|
-
doctype: zod_1.z.string(),
|
|
38
30
|
companies: zod_1.z.array(zod_1.z.string()),
|
|
39
31
|
accounts: zod_1.z.array(Account_1.Account),
|
|
40
32
|
supplier_number_code: zod_1.z.string().optional(),
|
|
@@ -1,17 +1,8 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const Version: z.ZodObject<{
|
|
3
|
-
name: z.ZodString;
|
|
4
|
-
owner: z.ZodString;
|
|
5
|
-
creation: z.ZodString;
|
|
6
3
|
data: z.ZodString;
|
|
7
4
|
}, "strip", z.ZodTypeAny, {
|
|
8
5
|
data: string;
|
|
9
|
-
name: string;
|
|
10
|
-
owner: string;
|
|
11
|
-
creation: string;
|
|
12
6
|
}, {
|
|
13
7
|
data: string;
|
|
14
|
-
name: string;
|
|
15
|
-
owner: string;
|
|
16
|
-
creation: string;
|
|
17
8
|
}>;
|
|
@@ -13,17 +13,14 @@ export type WaitlistInputType = z.infer<typeof WaitlistInput>;
|
|
|
13
13
|
export declare const Waitlist: z.ZodObject<{
|
|
14
14
|
sku: z.ZodString;
|
|
15
15
|
e_mail: z.ZodString;
|
|
16
|
-
name: z.ZodString;
|
|
17
16
|
is_notified: z.ZodNumber;
|
|
18
17
|
requested_at: z.ZodString;
|
|
19
18
|
}, "strip", z.ZodTypeAny, {
|
|
20
|
-
name: string;
|
|
21
19
|
sku: string;
|
|
22
20
|
e_mail: string;
|
|
23
21
|
is_notified: number;
|
|
24
22
|
requested_at: string;
|
|
25
23
|
}, {
|
|
26
|
-
name: string;
|
|
27
24
|
sku: string;
|
|
28
25
|
e_mail: string;
|
|
29
26
|
is_notified: number;
|
|
@@ -1,22 +1,11 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const WarehouseCategory: z.ZodObject<{
|
|
3
|
-
name: z.ZodString;
|
|
4
3
|
title: z.ZodString;
|
|
5
4
|
}, "strip", z.ZodTypeAny, {
|
|
6
|
-
name: string;
|
|
7
5
|
title: string;
|
|
8
6
|
}, {
|
|
9
|
-
name: string;
|
|
10
7
|
title: string;
|
|
11
8
|
}>;
|
|
12
|
-
export declare const WarehouseCategoryList: z.ZodArray<z.ZodObject<{
|
|
13
|
-
name: z.ZodString;
|
|
14
|
-
}, "strip", z.ZodTypeAny, {
|
|
15
|
-
name: string;
|
|
16
|
-
}, {
|
|
17
|
-
name: string;
|
|
18
|
-
}>, "many">;
|
|
19
|
-
export type WarehouseCategoryListType = z.infer<typeof WarehouseCategoryList>;
|
|
20
9
|
export declare const WarehouseCategoryMethodResponse: z.ZodArray<z.ZodObject<{
|
|
21
10
|
name: z.ZodString;
|
|
22
11
|
fulfillment_stations: z.ZodArray<z.ZodString, "many">;
|
|
@@ -1,19 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WarehouseCategoryMethodResponse = exports.
|
|
3
|
+
exports.WarehouseCategoryMethodResponse = exports.WarehouseCategory = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
// Partial model only, needs to be completed
|
|
6
6
|
exports.WarehouseCategory = zod_1.z
|
|
7
7
|
.object({
|
|
8
|
-
name: zod_1.z.string(),
|
|
9
8
|
title: zod_1.z.string(),
|
|
10
9
|
})
|
|
11
10
|
.describe("Warehouse Category");
|
|
12
|
-
exports.WarehouseCategoryList = zod_1.z
|
|
13
|
-
.array(zod_1.z.object({
|
|
14
|
-
name: zod_1.z.string(),
|
|
15
|
-
}))
|
|
16
|
-
.describe("Warehouse Category List");
|
|
17
11
|
exports.WarehouseCategoryMethodResponse = zod_1.z
|
|
18
12
|
.array(zod_1.z.object({
|
|
19
13
|
name: zod_1.z.string(),
|
package/dist/erpnext/reports.js
CHANGED
|
@@ -36,16 +36,12 @@ class ERPNextReports extends methodRequest_1.ERPNextMethodRequest {
|
|
|
36
36
|
return __awaiter(this, void 0, void 0, function* () {
|
|
37
37
|
const result = yield this.resourceRequest.getList({
|
|
38
38
|
resourceName: "Report",
|
|
39
|
-
filters: [["name", "=", reportName]],
|
|
40
39
|
fields: ["prepared_report"],
|
|
40
|
+
filters: [["name", "=", reportName]],
|
|
41
41
|
limit: 1,
|
|
42
|
-
resourceModel:
|
|
43
|
-
.object({
|
|
44
|
-
prepared_report: zod_1.z.number().transform(Boolean),
|
|
45
|
-
})
|
|
46
|
-
.describe("Report prepared_report"),
|
|
42
|
+
resourceModel: Report_1.PendingPreparedReport,
|
|
47
43
|
});
|
|
48
|
-
if (!result
|
|
44
|
+
if (!result[0])
|
|
49
45
|
throw new Error(`Report ${reportName} not found`);
|
|
50
46
|
return result[0].prepared_report;
|
|
51
47
|
});
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AnyZodObject, z, ZodTypeAny } from "zod";
|
|
2
2
|
import { TemporalClient } from "../client";
|
|
3
|
-
import {
|
|
3
|
+
import { Prettify } from "../utils/utils";
|
|
4
|
+
import { DocModelType, GetListReturnValue, KeysOfModel } from "./model/DocTypeHelpers";
|
|
4
5
|
import { DeleteResponseModel } from "./model/ERPNextResponse";
|
|
6
|
+
import { ResourceInputType } from "../utils/zodContextOptionals";
|
|
5
7
|
export declare class ERPNextResourceRequest {
|
|
6
8
|
protected temporalClient: TemporalClient;
|
|
7
9
|
constructor(temporalClient: TemporalClient);
|
|
8
10
|
private getParams;
|
|
9
|
-
getList<
|
|
11
|
+
getList<TFieldOptions extends KeysOfModel<TModel>, TSelectedFields extends TFieldOptions[] | readonly ["*"] | undefined = undefined, TModel extends AnyZodObject | undefined = undefined, TAsDict extends boolean | undefined = undefined>({ resourceName, fields, filters, resourceModel, skip, limit, priority, asDict, params, }: {
|
|
10
12
|
resourceName: string;
|
|
11
|
-
fields?:
|
|
13
|
+
fields?: TSelectedFields;
|
|
12
14
|
filters?: (string | string[])[][];
|
|
13
15
|
resourceModel?: TModel | undefined;
|
|
14
16
|
skip?: number;
|
|
@@ -16,22 +18,22 @@ export declare class ERPNextResourceRequest {
|
|
|
16
18
|
priority?: number;
|
|
17
19
|
asDict?: TAsDict;
|
|
18
20
|
params?: Record<string, string>;
|
|
19
|
-
}): Promise<
|
|
20
|
-
getById<TModel extends
|
|
21
|
+
}): Promise<GetListReturnValue<TModel, TFieldOptions, TSelectedFields, TAsDict>>;
|
|
22
|
+
getById<TModel extends AnyZodObject | undefined = undefined>({ resourceName, resourceId, resourceModel, priority, }: {
|
|
21
23
|
resourceName: string;
|
|
22
24
|
resourceId: string;
|
|
23
25
|
resourceModel?: TModel;
|
|
24
26
|
priority?: number;
|
|
25
|
-
}): Promise<TModel extends
|
|
26
|
-
updateById<TModel extends
|
|
27
|
+
}): Promise<Prettify<TModel extends AnyZodObject ? z.infer<DocModelType<TModel>> : any>>;
|
|
28
|
+
updateById<TModel extends AnyZodObject, TInput extends TInputModel extends undefined ? Partial<z.TypeOf<TModel>> : TInputModel extends ZodTypeAny ? z.TypeOf<TInputModel> : any, TInputModel extends ZodTypeAny | undefined = undefined>({ resourceName, resourceId, inputValidationModel, resourceModel, body, priority, }: {
|
|
27
29
|
resourceName: string;
|
|
28
30
|
resourceId: string;
|
|
29
31
|
inputValidationModel?: TInputModel;
|
|
30
32
|
resourceModel?: TModel;
|
|
31
33
|
priority?: number;
|
|
32
34
|
body: TInput;
|
|
33
|
-
}): Promise<z.
|
|
34
|
-
create<TModel extends
|
|
35
|
+
}): Promise<Prettify<z.infer<DocModelType<TModel>>>>;
|
|
36
|
+
create<TModel extends AnyZodObject, TInput extends TInputModel extends undefined ? z.TypeOf<ResourceInputType<TModel>> : TInputModel extends ZodTypeAny ? z.TypeOf<TInputModel> : any, TInputModel extends ZodTypeAny | undefined = undefined>({ resourceName, inputValidationModel, resourceModel, body, params, priority, }: {
|
|
35
37
|
resourceName: string;
|
|
36
38
|
inputValidationModel?: TInputModel;
|
|
37
39
|
resourceModel?: TModel;
|
|
@@ -39,7 +41,7 @@ export declare class ERPNextResourceRequest {
|
|
|
39
41
|
params?: Record<string, string>;
|
|
40
42
|
body: TInput;
|
|
41
43
|
}): Promise<z.TypeOf<TModel>>;
|
|
42
|
-
deleteById<TModel extends
|
|
44
|
+
deleteById<TModel extends AnyZodObject>({ resourceName, resourceId, resourceModel, priority, }: {
|
|
43
45
|
resourceName: string;
|
|
44
46
|
resourceId: string;
|
|
45
47
|
resourceModel?: TModel;
|