erpnext-queue-client 2.0.0-beta.0 → 2.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client.js +1 -4
- package/dist/constants.d.ts +1 -1
- package/dist/constants.js +4 -4
- package/dist/erpnext/doctypeResourceRequest.d.ts +1 -1
- package/dist/erpnext/doctypeSubmittableResourceRequest.d.ts +56 -16
- package/dist/erpnext/doctypeSubmittableResourceRequest.js +10 -8
- package/dist/erpnext/doctypes/address.d.ts +18 -18
- package/dist/erpnext/doctypes/contact.d.ts +18 -18
- package/dist/erpnext/doctypes/deliveryNote.d.ts +44 -33
- package/dist/erpnext/doctypes/item.d.ts +49 -49
- package/dist/erpnext/doctypes/paymentEntry.d.ts +820 -0
- package/dist/erpnext/doctypes/paymentEntry.js +72 -0
- package/dist/erpnext/doctypes/productBundle.d.ts +16 -16
- package/dist/erpnext/doctypes/purchaseInvoice.d.ts +99 -99
- package/dist/erpnext/doctypes/purchaseReceipt.d.ts +48 -49
- package/dist/erpnext/doctypes/salesInvoice.d.ts +2205 -2203
- package/dist/erpnext/doctypes/servicecase.d.ts +56 -56
- package/dist/erpnext/doctypes/shipment.d.ts +76 -44
- package/dist/erpnext/doctypes/stock.d.ts +2 -0
- package/dist/erpnext/doctypes/stock.js +19 -3
- package/dist/erpnext/model/ConsolidatedCustomsInvoice.d.ts +321 -0
- package/dist/erpnext/model/ConsolidatedCustomsInvoice.js +83 -0
- package/dist/erpnext/model/DeliveryNote.d.ts +3 -0
- package/dist/erpnext/model/DeliveryNote.js +1 -0
- package/dist/erpnext/model/DispatchRun.d.ts +3 -3
- package/dist/erpnext/model/DispatchRun.js +1 -1
- package/dist/erpnext/model/DocTypeHelpers.d.ts +26 -7
- package/dist/erpnext/model/DocTypeHelpers.js +0 -8
- package/dist/erpnext/model/ERPNextDocTypeMeta.d.ts +28 -15
- package/dist/erpnext/model/ERPNextDocTypeMeta.js +12 -7
- package/dist/erpnext/model/FulfillmentStation.d.ts +3 -0
- package/dist/erpnext/model/FulfillmentStation.js +1 -0
- package/dist/erpnext/model/Item.d.ts +35 -25
- package/dist/erpnext/model/ItemTaxTemplate.d.ts +57 -0
- package/dist/erpnext/model/ItemTaxTemplate.js +25 -0
- package/dist/erpnext/model/PaymentEntry.d.ts +183 -16
- package/dist/erpnext/model/PaymentEntry.js +6 -1
- package/dist/erpnext/model/PurchaseInvoice.d.ts +49 -47
- package/dist/erpnext/model/PurchaseInvoice.js +0 -1
- package/dist/erpnext/model/PurchaseOrder.d.ts +10 -10
- package/dist/erpnext/model/Receipt.d.ts +2 -2
- package/dist/erpnext/model/ReceiptDraft.d.ts +0 -3
- package/dist/erpnext/model/ReceiptDraft.js +0 -1
- package/dist/erpnext/model/SalesInvoice.d.ts +1530 -1526
- package/dist/erpnext/model/SalesInvoice.js +182 -178
- package/dist/erpnext/model/SalesOrder.d.ts +778 -748
- package/dist/erpnext/model/SalesOrder.js +151 -149
- package/dist/erpnext/model/Servicecase.d.ts +30 -30
- package/dist/erpnext/model/Servicecase.js +8 -1
- package/dist/erpnext/model/ServiceportalProductConfiguration.d.ts +128 -3
- package/dist/erpnext/model/ServiceportalProductConfiguration.js +34 -2
- package/dist/erpnext/model/Shipment.d.ts +14 -0
- package/dist/erpnext/model/Shipment.js +14 -1
- package/dist/erpnext/model/ShippingFees.d.ts +36 -0
- package/dist/erpnext/model/ShippingFees.js +18 -0
- package/dist/erpnext/model/ShippingProvider.d.ts +2 -2
- package/dist/erpnext/model/Stock.d.ts +6 -6
- package/dist/erpnext/model/StockEntry.d.ts +2 -2
- package/dist/erpnext/model/TaxCategory.d.ts +20 -0
- package/dist/erpnext/model/TaxCategory.js +16 -0
- package/dist/erpnext/resourceRequest.d.ts +1 -1
- package/dist/erpnext/resourceRequest.js +11 -5
- package/dist/index.d.ts +8 -2
- package/dist/index.js +9 -2
- package/dist/index.test.js +104 -70
- package/dist/utils/zodContextOptionals.js +7 -4
- package/dist/utils/zodUtils.js +14 -2
- package/package.json +7 -2
|
@@ -0,0 +1,321 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const ConsolidatedCustomsInvoiceItem: z.ZodObject<{
|
|
3
|
+
item_code: z.ZodString;
|
|
4
|
+
description: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
5
|
+
qty: z.ZodNumber;
|
|
6
|
+
item_tax_template: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
7
|
+
rate: z.ZodNumber;
|
|
8
|
+
amount: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
9
|
+
base_rate: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
10
|
+
base_amount: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
11
|
+
net_rate: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
12
|
+
net_amount: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
13
|
+
base_net_rate: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
14
|
+
base_net_amount: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
15
|
+
delivered_by_supplier: z.ZodEffects<z.ZodNumber, boolean, number>;
|
|
16
|
+
weight_per_unit: z.ZodNumber;
|
|
17
|
+
total_weight: z.ZodNumber;
|
|
18
|
+
weight_uom: z.ZodString;
|
|
19
|
+
sales_order: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
20
|
+
so_detail: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
21
|
+
sales_invoice: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
22
|
+
sales_invoice_item: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
23
|
+
customer: z.ZodString;
|
|
24
|
+
shipment: z.ZodString;
|
|
25
|
+
delivery_note: z.ZodString;
|
|
26
|
+
dn_detail: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
27
|
+
}, "strip", z.ZodTypeAny, {
|
|
28
|
+
item_code: string;
|
|
29
|
+
qty: number;
|
|
30
|
+
rate: number;
|
|
31
|
+
weight_per_unit: number;
|
|
32
|
+
total_weight: number;
|
|
33
|
+
weight_uom: string;
|
|
34
|
+
customer: string;
|
|
35
|
+
delivered_by_supplier: boolean;
|
|
36
|
+
delivery_note: string;
|
|
37
|
+
shipment: string;
|
|
38
|
+
description?: string | null | undefined;
|
|
39
|
+
amount?: number | null | undefined;
|
|
40
|
+
base_rate?: number | null | undefined;
|
|
41
|
+
base_amount?: number | null | undefined;
|
|
42
|
+
net_rate?: number | null | undefined;
|
|
43
|
+
net_amount?: number | null | undefined;
|
|
44
|
+
item_tax_template?: string | null | undefined;
|
|
45
|
+
base_net_rate?: number | null | undefined;
|
|
46
|
+
base_net_amount?: number | null | undefined;
|
|
47
|
+
so_detail?: string | null | undefined;
|
|
48
|
+
dn_detail?: string | null | undefined;
|
|
49
|
+
sales_order?: string | null | undefined;
|
|
50
|
+
sales_invoice_item?: string | null | undefined;
|
|
51
|
+
sales_invoice?: string | null | undefined;
|
|
52
|
+
}, {
|
|
53
|
+
item_code: string;
|
|
54
|
+
qty: number;
|
|
55
|
+
rate: number;
|
|
56
|
+
weight_per_unit: number;
|
|
57
|
+
total_weight: number;
|
|
58
|
+
weight_uom: string;
|
|
59
|
+
customer: string;
|
|
60
|
+
delivered_by_supplier: number;
|
|
61
|
+
delivery_note: string;
|
|
62
|
+
shipment: string;
|
|
63
|
+
description?: string | null | undefined;
|
|
64
|
+
amount?: number | null | undefined;
|
|
65
|
+
base_rate?: number | null | undefined;
|
|
66
|
+
base_amount?: number | null | undefined;
|
|
67
|
+
net_rate?: number | null | undefined;
|
|
68
|
+
net_amount?: number | null | undefined;
|
|
69
|
+
item_tax_template?: string | null | undefined;
|
|
70
|
+
base_net_rate?: number | null | undefined;
|
|
71
|
+
base_net_amount?: number | null | undefined;
|
|
72
|
+
so_detail?: string | null | undefined;
|
|
73
|
+
dn_detail?: string | null | undefined;
|
|
74
|
+
sales_order?: string | null | undefined;
|
|
75
|
+
sales_invoice_item?: string | null | undefined;
|
|
76
|
+
sales_invoice?: string | null | undefined;
|
|
77
|
+
}>;
|
|
78
|
+
export type ConsolidatedCustomsInvoiceItemType = z.infer<typeof ConsolidatedCustomsInvoiceItem>;
|
|
79
|
+
export declare const ConsolidatedCustomsInvoiceExportApprovalStatus: z.ZodNullable<z.ZodOptional<z.ZodEnum<["", "Waiting for Approval", "Approved", "Declined"]>>>;
|
|
80
|
+
export type ConsolidatedCustomsInvoiceExportApprovalStatusType = z.infer<typeof ConsolidatedCustomsInvoiceExportApprovalStatus>;
|
|
81
|
+
export declare const ConsolidatedCustomsInvoice: z.ZodObject<{
|
|
82
|
+
posting_date: z.ZodString;
|
|
83
|
+
posting_time: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
84
|
+
set_posting_time: z.ZodEffects<z.ZodNumber, boolean, number>;
|
|
85
|
+
naming_series: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
86
|
+
company: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
87
|
+
company_tax_id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
88
|
+
amended_from: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
89
|
+
export_approval_status: z.ZodNullable<z.ZodOptional<z.ZodEnum<["", "Waiting for Approval", "Approved", "Declined"]>>>;
|
|
90
|
+
mrn: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
91
|
+
currency: z.ZodString;
|
|
92
|
+
conversion_rate: z.ZodNumber;
|
|
93
|
+
total_qty: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
94
|
+
total_net_weight: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
95
|
+
base_total: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
96
|
+
base_net_total: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
97
|
+
total: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
98
|
+
net_total: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
99
|
+
customer_address: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
100
|
+
address_display: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
101
|
+
contact_person: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
102
|
+
contact_phone: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
103
|
+
contact_email: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
104
|
+
shipping_address_name: z.ZodString;
|
|
105
|
+
shipping_address: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
106
|
+
dispatch_address_name: z.ZodString;
|
|
107
|
+
dispatch_address: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
108
|
+
importer_address: z.ZodString;
|
|
109
|
+
importer_address_display: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
110
|
+
importer_contact: z.ZodString;
|
|
111
|
+
importer_contact_phone: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
112
|
+
importer_contact_email: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
113
|
+
exporter_address: z.ZodString;
|
|
114
|
+
exporter_address_display: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
115
|
+
exporter_contact: z.ZodString;
|
|
116
|
+
exporter_contact_phone: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
117
|
+
exporter_contact_email: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
118
|
+
items: z.ZodArray<z.ZodObject<{
|
|
119
|
+
item_code: z.ZodString;
|
|
120
|
+
description: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
121
|
+
qty: z.ZodNumber;
|
|
122
|
+
item_tax_template: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
123
|
+
rate: z.ZodNumber;
|
|
124
|
+
amount: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
125
|
+
base_rate: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
126
|
+
base_amount: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
127
|
+
net_rate: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
128
|
+
net_amount: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
129
|
+
base_net_rate: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
130
|
+
base_net_amount: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
131
|
+
delivered_by_supplier: z.ZodEffects<z.ZodNumber, boolean, number>;
|
|
132
|
+
weight_per_unit: z.ZodNumber;
|
|
133
|
+
total_weight: z.ZodNumber;
|
|
134
|
+
weight_uom: z.ZodString;
|
|
135
|
+
sales_order: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
136
|
+
so_detail: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
137
|
+
sales_invoice: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
138
|
+
sales_invoice_item: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
139
|
+
customer: z.ZodString;
|
|
140
|
+
shipment: z.ZodString;
|
|
141
|
+
delivery_note: z.ZodString;
|
|
142
|
+
dn_detail: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
143
|
+
}, "strip", z.ZodTypeAny, {
|
|
144
|
+
item_code: string;
|
|
145
|
+
qty: number;
|
|
146
|
+
rate: number;
|
|
147
|
+
weight_per_unit: number;
|
|
148
|
+
total_weight: number;
|
|
149
|
+
weight_uom: string;
|
|
150
|
+
customer: string;
|
|
151
|
+
delivered_by_supplier: boolean;
|
|
152
|
+
delivery_note: string;
|
|
153
|
+
shipment: string;
|
|
154
|
+
description?: string | null | undefined;
|
|
155
|
+
amount?: number | null | undefined;
|
|
156
|
+
base_rate?: number | null | undefined;
|
|
157
|
+
base_amount?: number | null | undefined;
|
|
158
|
+
net_rate?: number | null | undefined;
|
|
159
|
+
net_amount?: number | null | undefined;
|
|
160
|
+
item_tax_template?: string | null | undefined;
|
|
161
|
+
base_net_rate?: number | null | undefined;
|
|
162
|
+
base_net_amount?: number | null | undefined;
|
|
163
|
+
so_detail?: string | null | undefined;
|
|
164
|
+
dn_detail?: string | null | undefined;
|
|
165
|
+
sales_order?: string | null | undefined;
|
|
166
|
+
sales_invoice_item?: string | null | undefined;
|
|
167
|
+
sales_invoice?: string | null | undefined;
|
|
168
|
+
}, {
|
|
169
|
+
item_code: string;
|
|
170
|
+
qty: number;
|
|
171
|
+
rate: number;
|
|
172
|
+
weight_per_unit: number;
|
|
173
|
+
total_weight: number;
|
|
174
|
+
weight_uom: string;
|
|
175
|
+
customer: string;
|
|
176
|
+
delivered_by_supplier: number;
|
|
177
|
+
delivery_note: string;
|
|
178
|
+
shipment: string;
|
|
179
|
+
description?: string | null | undefined;
|
|
180
|
+
amount?: number | null | undefined;
|
|
181
|
+
base_rate?: number | null | undefined;
|
|
182
|
+
base_amount?: number | null | undefined;
|
|
183
|
+
net_rate?: number | null | undefined;
|
|
184
|
+
net_amount?: number | null | undefined;
|
|
185
|
+
item_tax_template?: string | null | undefined;
|
|
186
|
+
base_net_rate?: number | null | undefined;
|
|
187
|
+
base_net_amount?: number | null | undefined;
|
|
188
|
+
so_detail?: string | null | undefined;
|
|
189
|
+
dn_detail?: string | null | undefined;
|
|
190
|
+
sales_order?: string | null | undefined;
|
|
191
|
+
sales_invoice_item?: string | null | undefined;
|
|
192
|
+
sales_invoice?: string | null | undefined;
|
|
193
|
+
}>, "many">;
|
|
194
|
+
}, "strip", z.ZodTypeAny, {
|
|
195
|
+
posting_date: string;
|
|
196
|
+
set_posting_time: boolean;
|
|
197
|
+
shipping_address_name: string;
|
|
198
|
+
dispatch_address_name: string;
|
|
199
|
+
currency: string;
|
|
200
|
+
conversion_rate: number;
|
|
201
|
+
items: {
|
|
202
|
+
item_code: string;
|
|
203
|
+
qty: number;
|
|
204
|
+
rate: number;
|
|
205
|
+
weight_per_unit: number;
|
|
206
|
+
total_weight: number;
|
|
207
|
+
weight_uom: string;
|
|
208
|
+
customer: string;
|
|
209
|
+
delivered_by_supplier: boolean;
|
|
210
|
+
delivery_note: string;
|
|
211
|
+
shipment: string;
|
|
212
|
+
description?: string | null | undefined;
|
|
213
|
+
amount?: number | null | undefined;
|
|
214
|
+
base_rate?: number | null | undefined;
|
|
215
|
+
base_amount?: number | null | undefined;
|
|
216
|
+
net_rate?: number | null | undefined;
|
|
217
|
+
net_amount?: number | null | undefined;
|
|
218
|
+
item_tax_template?: string | null | undefined;
|
|
219
|
+
base_net_rate?: number | null | undefined;
|
|
220
|
+
base_net_amount?: number | null | undefined;
|
|
221
|
+
so_detail?: string | null | undefined;
|
|
222
|
+
dn_detail?: string | null | undefined;
|
|
223
|
+
sales_order?: string | null | undefined;
|
|
224
|
+
sales_invoice_item?: string | null | undefined;
|
|
225
|
+
sales_invoice?: string | null | undefined;
|
|
226
|
+
}[];
|
|
227
|
+
importer_address: string;
|
|
228
|
+
importer_contact: string;
|
|
229
|
+
exporter_address: string;
|
|
230
|
+
exporter_contact: string;
|
|
231
|
+
amended_from?: string | null | undefined;
|
|
232
|
+
company?: string | null | undefined;
|
|
233
|
+
naming_series?: string | null | undefined;
|
|
234
|
+
posting_time?: string | null | undefined;
|
|
235
|
+
shipping_address?: string | null | undefined;
|
|
236
|
+
dispatch_address?: string | null | undefined;
|
|
237
|
+
contact_person?: string | null | undefined;
|
|
238
|
+
contact_email?: string | null | undefined;
|
|
239
|
+
customer_address?: string | null | undefined;
|
|
240
|
+
address_display?: string | null | undefined;
|
|
241
|
+
total_qty?: number | null | undefined;
|
|
242
|
+
base_total?: number | null | undefined;
|
|
243
|
+
base_net_total?: number | null | undefined;
|
|
244
|
+
total_net_weight?: number | null | undefined;
|
|
245
|
+
total?: number | null | undefined;
|
|
246
|
+
net_total?: number | null | undefined;
|
|
247
|
+
company_tax_id?: string | null | undefined;
|
|
248
|
+
export_approval_status?: "" | "Waiting for Approval" | "Approved" | "Declined" | null | undefined;
|
|
249
|
+
mrn?: string | null | undefined;
|
|
250
|
+
contact_phone?: string | null | undefined;
|
|
251
|
+
importer_address_display?: string | null | undefined;
|
|
252
|
+
importer_contact_phone?: string | null | undefined;
|
|
253
|
+
importer_contact_email?: string | null | undefined;
|
|
254
|
+
exporter_address_display?: string | null | undefined;
|
|
255
|
+
exporter_contact_phone?: string | null | undefined;
|
|
256
|
+
exporter_contact_email?: string | null | undefined;
|
|
257
|
+
}, {
|
|
258
|
+
posting_date: string;
|
|
259
|
+
set_posting_time: number;
|
|
260
|
+
shipping_address_name: string;
|
|
261
|
+
dispatch_address_name: string;
|
|
262
|
+
currency: string;
|
|
263
|
+
conversion_rate: number;
|
|
264
|
+
items: {
|
|
265
|
+
item_code: string;
|
|
266
|
+
qty: number;
|
|
267
|
+
rate: number;
|
|
268
|
+
weight_per_unit: number;
|
|
269
|
+
total_weight: number;
|
|
270
|
+
weight_uom: string;
|
|
271
|
+
customer: string;
|
|
272
|
+
delivered_by_supplier: number;
|
|
273
|
+
delivery_note: string;
|
|
274
|
+
shipment: string;
|
|
275
|
+
description?: string | null | undefined;
|
|
276
|
+
amount?: number | null | undefined;
|
|
277
|
+
base_rate?: number | null | undefined;
|
|
278
|
+
base_amount?: number | null | undefined;
|
|
279
|
+
net_rate?: number | null | undefined;
|
|
280
|
+
net_amount?: number | null | undefined;
|
|
281
|
+
item_tax_template?: string | null | undefined;
|
|
282
|
+
base_net_rate?: number | null | undefined;
|
|
283
|
+
base_net_amount?: number | null | undefined;
|
|
284
|
+
so_detail?: string | null | undefined;
|
|
285
|
+
dn_detail?: string | null | undefined;
|
|
286
|
+
sales_order?: string | null | undefined;
|
|
287
|
+
sales_invoice_item?: string | null | undefined;
|
|
288
|
+
sales_invoice?: string | null | undefined;
|
|
289
|
+
}[];
|
|
290
|
+
importer_address: string;
|
|
291
|
+
importer_contact: string;
|
|
292
|
+
exporter_address: string;
|
|
293
|
+
exporter_contact: string;
|
|
294
|
+
amended_from?: string | null | undefined;
|
|
295
|
+
company?: string | null | undefined;
|
|
296
|
+
naming_series?: string | null | undefined;
|
|
297
|
+
posting_time?: string | null | undefined;
|
|
298
|
+
shipping_address?: string | null | undefined;
|
|
299
|
+
dispatch_address?: string | null | undefined;
|
|
300
|
+
contact_person?: string | null | undefined;
|
|
301
|
+
contact_email?: string | null | undefined;
|
|
302
|
+
customer_address?: string | null | undefined;
|
|
303
|
+
address_display?: string | null | undefined;
|
|
304
|
+
total_qty?: number | null | undefined;
|
|
305
|
+
base_total?: number | null | undefined;
|
|
306
|
+
base_net_total?: number | null | undefined;
|
|
307
|
+
total_net_weight?: number | null | undefined;
|
|
308
|
+
total?: number | null | undefined;
|
|
309
|
+
net_total?: number | null | undefined;
|
|
310
|
+
company_tax_id?: string | null | undefined;
|
|
311
|
+
export_approval_status?: "" | "Waiting for Approval" | "Approved" | "Declined" | null | undefined;
|
|
312
|
+
mrn?: string | null | undefined;
|
|
313
|
+
contact_phone?: string | null | undefined;
|
|
314
|
+
importer_address_display?: string | null | undefined;
|
|
315
|
+
importer_contact_phone?: string | null | undefined;
|
|
316
|
+
importer_contact_email?: string | null | undefined;
|
|
317
|
+
exporter_address_display?: string | null | undefined;
|
|
318
|
+
exporter_contact_phone?: string | null | undefined;
|
|
319
|
+
exporter_contact_email?: string | null | undefined;
|
|
320
|
+
}>;
|
|
321
|
+
export type ConsolidatedCustomsInvoiceType = z.infer<typeof ConsolidatedCustomsInvoice>;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ConsolidatedCustomsInvoice = exports.ConsolidatedCustomsInvoiceExportApprovalStatus = exports.ConsolidatedCustomsInvoiceItem = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
// Child table: Consolidated Customs Invoice Item
|
|
6
|
+
exports.ConsolidatedCustomsInvoiceItem = zod_1.z
|
|
7
|
+
.object({
|
|
8
|
+
// Item details
|
|
9
|
+
item_code: zod_1.z.string(),
|
|
10
|
+
description: zod_1.z.string().optional().nullable(),
|
|
11
|
+
qty: zod_1.z.number(),
|
|
12
|
+
item_tax_template: zod_1.z.string().optional().nullable(),
|
|
13
|
+
// Pricing
|
|
14
|
+
rate: zod_1.z.number(),
|
|
15
|
+
amount: zod_1.z.number().optional().nullable(),
|
|
16
|
+
base_rate: zod_1.z.number().optional().nullable(),
|
|
17
|
+
base_amount: zod_1.z.number().optional().nullable(),
|
|
18
|
+
net_rate: zod_1.z.number().optional().nullable(),
|
|
19
|
+
net_amount: zod_1.z.number().optional().nullable(),
|
|
20
|
+
base_net_rate: zod_1.z.number().optional().nullable(),
|
|
21
|
+
base_net_amount: zod_1.z.number().optional().nullable(),
|
|
22
|
+
// Drop ship
|
|
23
|
+
delivered_by_supplier: zod_1.z.number().transform(Boolean),
|
|
24
|
+
// Weight details
|
|
25
|
+
weight_per_unit: zod_1.z.number(),
|
|
26
|
+
total_weight: zod_1.z.number(),
|
|
27
|
+
weight_uom: zod_1.z.string(),
|
|
28
|
+
// References
|
|
29
|
+
sales_order: zod_1.z.string().optional().nullable(),
|
|
30
|
+
so_detail: zod_1.z.string().optional().nullable(),
|
|
31
|
+
sales_invoice: zod_1.z.string().optional().nullable(),
|
|
32
|
+
sales_invoice_item: zod_1.z.string().optional().nullable(),
|
|
33
|
+
customer: zod_1.z.string(),
|
|
34
|
+
shipment: zod_1.z.string(),
|
|
35
|
+
delivery_note: zod_1.z.string(),
|
|
36
|
+
dn_detail: zod_1.z.string().optional().nullable(),
|
|
37
|
+
})
|
|
38
|
+
.describe("Consolidated Customs Invoice Item");
|
|
39
|
+
exports.ConsolidatedCustomsInvoiceExportApprovalStatus = zod_1.z
|
|
40
|
+
.enum(["", "Waiting for Approval", "Approved", "Declined"])
|
|
41
|
+
.optional()
|
|
42
|
+
.nullable();
|
|
43
|
+
exports.ConsolidatedCustomsInvoice = zod_1.z
|
|
44
|
+
.object({
|
|
45
|
+
posting_date: zod_1.z.string(),
|
|
46
|
+
posting_time: zod_1.z.string().optional().nullable(),
|
|
47
|
+
set_posting_time: zod_1.z.number().transform(Boolean),
|
|
48
|
+
naming_series: zod_1.z.string().optional().nullable(),
|
|
49
|
+
company: zod_1.z.string().optional().nullable(),
|
|
50
|
+
company_tax_id: zod_1.z.string().optional().nullable(),
|
|
51
|
+
amended_from: zod_1.z.string().optional().nullable(),
|
|
52
|
+
export_approval_status: exports.ConsolidatedCustomsInvoiceExportApprovalStatus,
|
|
53
|
+
mrn: zod_1.z.string().optional().nullable(),
|
|
54
|
+
currency: zod_1.z.string(),
|
|
55
|
+
conversion_rate: zod_1.z.number(),
|
|
56
|
+
total_qty: zod_1.z.number().optional().nullable(),
|
|
57
|
+
total_net_weight: zod_1.z.number().optional().nullable(),
|
|
58
|
+
base_total: zod_1.z.number().optional().nullable(),
|
|
59
|
+
base_net_total: zod_1.z.number().optional().nullable(),
|
|
60
|
+
total: zod_1.z.number().optional().nullable(),
|
|
61
|
+
net_total: zod_1.z.number().optional().nullable(),
|
|
62
|
+
customer_address: zod_1.z.string().optional().nullable(),
|
|
63
|
+
address_display: zod_1.z.string().optional().nullable(),
|
|
64
|
+
contact_person: zod_1.z.string().optional().nullable(),
|
|
65
|
+
contact_phone: zod_1.z.string().optional().nullable(),
|
|
66
|
+
contact_email: zod_1.z.string().optional().nullable(),
|
|
67
|
+
shipping_address_name: zod_1.z.string(),
|
|
68
|
+
shipping_address: zod_1.z.string().optional().nullable(),
|
|
69
|
+
dispatch_address_name: zod_1.z.string(),
|
|
70
|
+
dispatch_address: zod_1.z.string().optional().nullable(),
|
|
71
|
+
importer_address: zod_1.z.string(),
|
|
72
|
+
importer_address_display: zod_1.z.string().optional().nullable(),
|
|
73
|
+
importer_contact: zod_1.z.string(),
|
|
74
|
+
importer_contact_phone: zod_1.z.string().optional().nullable(),
|
|
75
|
+
importer_contact_email: zod_1.z.string().optional().nullable(),
|
|
76
|
+
exporter_address: zod_1.z.string(),
|
|
77
|
+
exporter_address_display: zod_1.z.string().optional().nullable(),
|
|
78
|
+
exporter_contact: zod_1.z.string(),
|
|
79
|
+
exporter_contact_phone: zod_1.z.string().optional().nullable(),
|
|
80
|
+
exporter_contact_email: zod_1.z.string().optional().nullable(),
|
|
81
|
+
items: zod_1.z.array(exports.ConsolidatedCustomsInvoiceItem),
|
|
82
|
+
})
|
|
83
|
+
.describe("Consolidated Customs Invoice");
|
|
@@ -3,6 +3,7 @@ export declare const DeliveryNote: z.ZodObject<{
|
|
|
3
3
|
title: z.ZodString;
|
|
4
4
|
naming_series: z.ZodString;
|
|
5
5
|
order_number: z.ZodString;
|
|
6
|
+
custom_order_number: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
6
7
|
customer: z.ZodString;
|
|
7
8
|
customer_name: z.ZodString;
|
|
8
9
|
company: z.ZodString;
|
|
@@ -423,6 +424,7 @@ export declare const DeliveryNote: z.ZodObject<{
|
|
|
423
424
|
sales_team: string[];
|
|
424
425
|
cost_center?: string | null | undefined;
|
|
425
426
|
project?: string | null | undefined;
|
|
427
|
+
custom_order_number?: string | null | undefined;
|
|
426
428
|
return_against?: string | null | undefined;
|
|
427
429
|
po_date?: string | null | undefined;
|
|
428
430
|
pick_list?: string | null | undefined;
|
|
@@ -592,6 +594,7 @@ export declare const DeliveryNote: z.ZodObject<{
|
|
|
592
594
|
sales_team: string[];
|
|
593
595
|
cost_center?: string | null | undefined;
|
|
594
596
|
project?: string | null | undefined;
|
|
597
|
+
custom_order_number?: string | null | undefined;
|
|
595
598
|
return_against?: string | null | undefined;
|
|
596
599
|
po_date?: string | null | undefined;
|
|
597
600
|
pick_list?: string | null | undefined;
|
|
@@ -74,6 +74,7 @@ exports.DeliveryNote = zod_1.z
|
|
|
74
74
|
title: zod_1.z.string(),
|
|
75
75
|
naming_series: zod_1.z.string(),
|
|
76
76
|
order_number: zod_1.z.string(),
|
|
77
|
+
custom_order_number: zod_1.z.string().optional().nullable(),
|
|
77
78
|
customer: zod_1.z.string(),
|
|
78
79
|
customer_name: zod_1.z.string(),
|
|
79
80
|
company: zod_1.z.string(),
|
|
@@ -91,17 +91,17 @@ export declare const DispatchRunPostFilteredResponse: z.ZodObject<{
|
|
|
91
91
|
}>;
|
|
92
92
|
export declare const DispatchRunMatchesByOrderNumber: z.ZodArray<z.ZodObject<{
|
|
93
93
|
picking_strategy: z.ZodString;
|
|
94
|
-
|
|
94
|
+
custom_order_number: z.ZodString;
|
|
95
95
|
customer_name: z.ZodString;
|
|
96
96
|
status: z.ZodEnum<["Processing", "Completed", "Failed"]>;
|
|
97
97
|
}, "strip", z.ZodTypeAny, {
|
|
98
98
|
status: "Completed" | "Processing" | "Failed";
|
|
99
|
-
|
|
99
|
+
custom_order_number: string;
|
|
100
100
|
customer_name: string;
|
|
101
101
|
picking_strategy: string;
|
|
102
102
|
}, {
|
|
103
103
|
status: "Completed" | "Processing" | "Failed";
|
|
104
|
-
|
|
104
|
+
custom_order_number: string;
|
|
105
105
|
customer_name: string;
|
|
106
106
|
picking_strategy: string;
|
|
107
107
|
}>, "many">;
|
|
@@ -53,7 +53,7 @@ exports.DispatchRunPostFilteredResponse = zod_1.z
|
|
|
53
53
|
exports.DispatchRunMatchesByOrderNumber = zod_1.z
|
|
54
54
|
.array(zod_1.z.object({
|
|
55
55
|
picking_strategy: zod_1.z.string(),
|
|
56
|
-
|
|
56
|
+
custom_order_number: zod_1.z.string(),
|
|
57
57
|
customer_name: zod_1.z.string(),
|
|
58
58
|
status: zod_1.z.enum(["Processing", "Completed", "Failed"]),
|
|
59
59
|
}))
|
|
@@ -3,9 +3,22 @@ import { Prettify } from "../../utils/utils";
|
|
|
3
3
|
import { KeysOf } from "../../utils/zodUtils";
|
|
4
4
|
import { DocTypeChildTableEntryMeta, DocTypeMeta } from "./ERPNextDocTypeMeta";
|
|
5
5
|
export type KeysOfModel<T> = KeysOf<T extends AnyZodObject ? DocModelListEntryType<T> : never>;
|
|
6
|
+
/**
|
|
7
|
+
* Extracts the alias from a field name if it contains " as ".
|
|
8
|
+
* For example: "`tabItemTaxTemplateDetail`.rate as rate" -> "rate"
|
|
9
|
+
* If no " as " is found, returns the original string.
|
|
10
|
+
*/
|
|
11
|
+
type ExtractAlias<T extends string> = T extends `${infer _Before} as ${infer Alias}` ? Alias : T;
|
|
12
|
+
/**
|
|
13
|
+
* Creates a mapped type that picks fields from TModel using aliases extracted from TFields.
|
|
14
|
+
* For fields with " as ", uses the alias; otherwise uses the original field name.
|
|
15
|
+
*/
|
|
16
|
+
type PickWithAliases<TModel extends AnyZodObject, TFields extends readonly string[]> = {
|
|
17
|
+
[K in TFields[number] as ExtractAlias<K>]: ExtractAlias<K> extends keyof z.infer<DocModelListEntryType<TModel>> ? z.infer<DocModelListEntryType<TModel>>[ExtractAlias<K>] : never;
|
|
18
|
+
};
|
|
6
19
|
export type GetListReturnValue<TModel, TFieldOptions extends KeysOfModel<TModel>, TSelectedFields extends TFieldOptions[] | readonly ["*"] | undefined, TAsDict> = Prettify<TAsDict extends false ? Array<Array<string>> : TModel extends AnyZodObject ? TSelectedFields extends undefined ? Array<{
|
|
7
20
|
name: string;
|
|
8
|
-
}> : TSelectedFields extends readonly ["*"] ? Array<z.infer<DocModelListEntryType<TModel>>> : TSelectedFields extends TFieldOptions[] ? Array<
|
|
21
|
+
}> : TSelectedFields extends readonly ["*"] ? Array<z.infer<DocModelListEntryType<TModel>>> : TSelectedFields extends TFieldOptions[] ? Array<PickWithAliases<TModel, TSelectedFields>> : any : any>;
|
|
9
22
|
export declare const LoadDocumentWrapper: <T extends AnyZodObject>(BaseModel: T) => z.ZodObject<{
|
|
10
23
|
[x: string]: any;
|
|
11
24
|
} & {
|
|
@@ -105,9 +118,11 @@ export declare const CreateChildTableEntrySchema: <T extends ZodRawShape>(busine
|
|
|
105
118
|
modified: z.ZodString;
|
|
106
119
|
modified_by: z.ZodString;
|
|
107
120
|
idx: z.ZodNumber;
|
|
108
|
-
docstatus: z.ZodDefault<z.ZodNumber
|
|
121
|
+
docstatus: z.ZodDefault<z.ZodNumber> & {
|
|
122
|
+
__optionalForInput: true;
|
|
123
|
+
};
|
|
109
124
|
doctype: z.ZodString;
|
|
110
|
-
_user_tags: z.ZodOptional<z.ZodString
|
|
125
|
+
_user_tags: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
111
126
|
} & {
|
|
112
127
|
parenttype: z.ZodString;
|
|
113
128
|
parentfield: z.ZodString;
|
|
@@ -118,9 +133,11 @@ export declare const CreateChildTableEntrySchema: <T extends ZodRawShape>(busine
|
|
|
118
133
|
modified: z.ZodString;
|
|
119
134
|
modified_by: z.ZodString;
|
|
120
135
|
idx: z.ZodNumber;
|
|
121
|
-
docstatus: z.ZodDefault<z.ZodNumber
|
|
136
|
+
docstatus: z.ZodDefault<z.ZodNumber> & {
|
|
137
|
+
__optionalForInput: true;
|
|
138
|
+
};
|
|
122
139
|
doctype: z.ZodString;
|
|
123
|
-
_user_tags: z.ZodOptional<z.ZodString
|
|
140
|
+
_user_tags: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
124
141
|
} & {
|
|
125
142
|
parenttype: z.ZodString;
|
|
126
143
|
parentfield: z.ZodString;
|
|
@@ -131,9 +148,11 @@ export declare const CreateChildTableEntrySchema: <T extends ZodRawShape>(busine
|
|
|
131
148
|
modified: z.ZodString;
|
|
132
149
|
modified_by: z.ZodString;
|
|
133
150
|
idx: z.ZodNumber;
|
|
134
|
-
docstatus: z.ZodDefault<z.ZodNumber
|
|
151
|
+
docstatus: z.ZodDefault<z.ZodNumber> & {
|
|
152
|
+
__optionalForInput: true;
|
|
153
|
+
};
|
|
135
154
|
doctype: z.ZodString;
|
|
136
|
-
_user_tags: z.ZodOptional<z.ZodString
|
|
155
|
+
_user_tags: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
137
156
|
} & {
|
|
138
157
|
parenttype: z.ZodString;
|
|
139
158
|
parentfield: z.ZodString;
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CreateChildTableEntrySchema = exports.AugmentChildTableArrays = exports.DocTypeList = exports.DocModelListEntry = exports.DocModel = exports.LoadDocumentWrapper = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
const zodUtils_1 = require("../../utils/zodUtils");
|
|
6
5
|
const ERPNextDocTypeMeta_1 = require("./ERPNextDocTypeMeta");
|
|
7
6
|
const LoadDocumentWrapper = (BaseModel) => BaseModel.extend({ __onload: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()) }).describe(BaseModel.description + " with __onload");
|
|
8
7
|
exports.LoadDocumentWrapper = LoadDocumentWrapper;
|
|
@@ -52,13 +51,6 @@ const DocModelListEntry = (BaseModel) => {
|
|
|
52
51
|
.describe(`${BaseModel.description || "DocType"} List Item`);
|
|
53
52
|
};
|
|
54
53
|
exports.DocModelListEntry = DocModelListEntry;
|
|
55
|
-
const NameArray = zod_1.z.object({
|
|
56
|
-
name: zod_1.z.string(),
|
|
57
|
-
abc: zod_1.z.string(),
|
|
58
|
-
array: zod_1.z.array(zod_1.z.string()),
|
|
59
|
-
});
|
|
60
|
-
const newModel = (0, zodUtils_1.pickFromSchema)((0, exports.DocModelListEntry)(NameArray), ["abc"])["shape"];
|
|
61
|
-
newModel.abc;
|
|
62
54
|
const DocTypeList = (BaseModel) => {
|
|
63
55
|
return zod_1.z
|
|
64
56
|
.array(BaseModel)
|