erpnext-queue-client 1.0.6 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/dist/client.js +41 -16
  2. package/dist/erpnext/decryptFromErpNext.server.d.ts +1 -1
  3. package/dist/erpnext/doctypeResourceRequest.d.ts +38 -0
  4. package/dist/erpnext/doctypeResourceRequest.js +59 -0
  5. package/dist/erpnext/doctypeSubmittableResourceRequest.d.ts +8 -0
  6. package/dist/erpnext/doctypeSubmittableResourceRequest.js +39 -0
  7. package/dist/erpnext/doctypes/address.d.ts +263 -0
  8. package/dist/erpnext/doctypes/address.js +46 -0
  9. package/dist/erpnext/doctypes/contact.d.ts +383 -0
  10. package/dist/erpnext/doctypes/contact.js +46 -0
  11. package/dist/erpnext/doctypes/deliveryNote.d.ts +985 -0
  12. package/dist/erpnext/doctypes/deliveryNote.js +38 -0
  13. package/dist/erpnext/doctypes/item.d.ts +572 -0
  14. package/dist/erpnext/doctypes/item.js +95 -0
  15. package/dist/erpnext/doctypes/purchaseReceipt.d.ts +743 -0
  16. package/dist/erpnext/doctypes/purchaseReceipt.js +50 -0
  17. package/dist/erpnext/doctypes/shipment.d.ts +752 -0
  18. package/dist/erpnext/doctypes/shipment.js +51 -0
  19. package/dist/erpnext/erpnextRequestWrapper.js +15 -13
  20. package/dist/erpnext/fileRequests.d.ts +10 -0
  21. package/dist/erpnext/fileRequests.js +42 -0
  22. package/dist/erpnext/methodRequest.d.ts +15 -0
  23. package/dist/erpnext/methodRequest.js +32 -0
  24. package/dist/erpnext/model/Address.d.ts +200 -198
  25. package/dist/erpnext/model/Address.js +3 -2
  26. package/dist/erpnext/model/Contact.d.ts +343 -344
  27. package/dist/erpnext/model/Contact.js +2 -2
  28. package/dist/erpnext/model/Country.d.ts +83 -31
  29. package/dist/erpnext/model/Country.js +2 -6
  30. package/dist/erpnext/model/Customer.d.ts +64 -65
  31. package/dist/erpnext/model/Customer.js +2 -2
  32. package/dist/erpnext/model/DeliveryNote.d.ts +1048 -1048
  33. package/dist/erpnext/model/DispatchRun.d.ts +399 -399
  34. package/dist/erpnext/model/DispatcherPreset.d.ts +94 -94
  35. package/dist/erpnext/model/ERPNextRequest.d.ts +47 -30
  36. package/dist/erpnext/model/ERPNextResponse.d.ts +4 -4
  37. package/dist/erpnext/model/File.d.ts +88 -88
  38. package/dist/erpnext/model/Fulfiller.d.ts +97 -97
  39. package/dist/erpnext/model/FulfillerSettings.d.ts +66 -66
  40. package/dist/erpnext/model/FulfillmentStation.d.ts +2 -2
  41. package/dist/erpnext/model/Item.d.ts +819 -819
  42. package/dist/erpnext/model/Item.js +2 -2
  43. package/dist/erpnext/model/PaymentEntry.d.ts +197 -0
  44. package/dist/erpnext/model/PaymentEntry.js +63 -0
  45. package/dist/erpnext/model/ProjectedQuantityReport.d.ts +178 -178
  46. package/dist/erpnext/model/PurchaseOrder.d.ts +528 -528
  47. package/dist/erpnext/model/Receipt.d.ts +448 -448
  48. package/dist/erpnext/model/Receipt.js +2 -2
  49. package/dist/erpnext/model/ReceiptDraft.d.ts +392 -392
  50. package/dist/erpnext/model/Shipment.d.ts +709 -709
  51. package/dist/erpnext/model/ShippingProvider.d.ts +198 -198
  52. package/dist/erpnext/model/StockEntry.d.ts +248 -0
  53. package/dist/erpnext/model/StockEntry.js +76 -0
  54. package/dist/erpnext/model/StockReconciliation.d.ts +187 -0
  55. package/dist/erpnext/model/StockReconciliation.js +44 -0
  56. package/dist/erpnext/model/Supplier.d.ts +105 -0
  57. package/dist/erpnext/model/Supplier.js +39 -0
  58. package/dist/erpnext/model/Waitlist.d.ts +32 -0
  59. package/dist/erpnext/model/Waitlist.js +19 -0
  60. package/dist/erpnext/model/WarehouseCategory.d.ts +6 -6
  61. package/dist/erpnext/resourceRequest.d.ts +39 -10
  62. package/dist/erpnext/resourceRequest.js +115 -14
  63. package/dist/index.d.ts +39 -4
  64. package/dist/index.js +43 -8
  65. package/dist/utils/fernet.server.d.ts +11 -11
  66. package/dist/utils/fernet.server.js +0 -1
  67. package/dist/utils/request.js +2 -2
  68. package/dist/utils/zodUtils.d.ts +2 -1
  69. package/dist/utils/zodUtils.js +14 -1
  70. package/package.json +4 -1
  71. package/dist/erpnext/doctypes/country.d.ts +0 -9
  72. package/dist/erpnext/doctypes/country.js +0 -28
  73. package/dist/erpnext/erpnextRequests.d.ts +0 -1
  74. package/dist/erpnext/erpnextRequests.js +0 -15
  75. package/dist/erpnext.d.ts +0 -20
  76. package/dist/erpnext.js +0 -45
@@ -0,0 +1,248 @@
1
+ import { z } from "zod";
2
+ declare const StockEntryItem: z.ZodObject<{
3
+ t_warehouse: z.ZodOptional<z.ZodString>;
4
+ s_warehouse: z.ZodOptional<z.ZodString>;
5
+ item_code: z.ZodString;
6
+ qty: z.ZodNumber;
7
+ basic_rate: z.ZodOptional<z.ZodNumber>;
8
+ allow_zero_valuation_rate: z.ZodOptional<z.ZodNumber>;
9
+ }, "strip", z.ZodTypeAny, {
10
+ item_code: string;
11
+ qty: number;
12
+ allow_zero_valuation_rate?: number | undefined;
13
+ t_warehouse?: string | undefined;
14
+ s_warehouse?: string | undefined;
15
+ basic_rate?: number | undefined;
16
+ }, {
17
+ item_code: string;
18
+ qty: number;
19
+ allow_zero_valuation_rate?: number | undefined;
20
+ t_warehouse?: string | undefined;
21
+ s_warehouse?: string | undefined;
22
+ basic_rate?: number | undefined;
23
+ }>;
24
+ export type StockEntryItem = z.infer<typeof StockEntryItem>;
25
+ export declare const StockEntry: z.ZodObject<{
26
+ name: z.ZodString;
27
+ 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
+ naming_series: z.ZodString;
38
+ stock_entry_type: z.ZodString;
39
+ outgoing_stock_entry: z.ZodOptional<z.ZodString>;
40
+ purpose: z.ZodString;
41
+ add_to_transit: z.ZodNumber;
42
+ work_order: z.ZodOptional<z.ZodString>;
43
+ purchase_order: z.ZodOptional<z.ZodString>;
44
+ delivery_note_no: z.ZodOptional<z.ZodString>;
45
+ sales_invoice_no: z.ZodOptional<z.ZodString>;
46
+ pick_list: z.ZodOptional<z.ZodString>;
47
+ purchase_receipt_no: z.ZodOptional<z.ZodString>;
48
+ company: z.ZodString;
49
+ posting_date: z.ZodString;
50
+ posting_time: z.ZodString;
51
+ set_posting_time: z.ZodNumber;
52
+ inspection_required: z.ZodNumber;
53
+ from_bom: z.ZodNumber;
54
+ apply_putaway_rule: z.ZodNumber;
55
+ bom_no: z.ZodOptional<z.ZodString>;
56
+ fg_completed_qty: z.ZodNumber;
57
+ use_multi_level_bom: z.ZodNumber;
58
+ from_warehouse: z.ZodOptional<z.ZodString>;
59
+ source_warehouse_address: z.ZodOptional<z.ZodString>;
60
+ source_address_display: z.ZodOptional<z.ZodString>;
61
+ to_warehouse: z.ZodOptional<z.ZodString>;
62
+ target_warehouse_address: z.ZodOptional<z.ZodString>;
63
+ target_address_display: z.ZodOptional<z.ZodString>;
64
+ scan_barcode: z.ZodOptional<z.ZodString>;
65
+ total_outgoing_value: z.ZodNumber;
66
+ total_incoming_value: z.ZodNumber;
67
+ value_difference: z.ZodNumber;
68
+ total_additional_costs: z.ZodNumber;
69
+ supplier: z.ZodOptional<z.ZodString>;
70
+ supplier_name: z.ZodOptional<z.ZodString>;
71
+ supplier_address: z.ZodOptional<z.ZodString>;
72
+ address_display: z.ZodOptional<z.ZodString>;
73
+ project: z.ZodOptional<z.ZodString>;
74
+ select_print_heading: z.ZodOptional<z.ZodString>;
75
+ letter_head: z.ZodOptional<z.ZodString>;
76
+ is_opening: z.ZodString;
77
+ remarks: z.ZodOptional<z.ZodString>;
78
+ per_transferred: z.ZodNumber;
79
+ total_amount: z.ZodNumber;
80
+ job_card: z.ZodOptional<z.ZodString>;
81
+ amended_from: z.ZodOptional<z.ZodString>;
82
+ credit_note: z.ZodOptional<z.ZodString>;
83
+ is_return: z.ZodNumber;
84
+ doctype: z.ZodString;
85
+ items: z.ZodArray<z.ZodObject<{
86
+ t_warehouse: z.ZodOptional<z.ZodString>;
87
+ s_warehouse: z.ZodOptional<z.ZodString>;
88
+ item_code: z.ZodString;
89
+ qty: z.ZodNumber;
90
+ basic_rate: z.ZodOptional<z.ZodNumber>;
91
+ allow_zero_valuation_rate: z.ZodOptional<z.ZodNumber>;
92
+ }, "strip", z.ZodTypeAny, {
93
+ item_code: string;
94
+ qty: number;
95
+ allow_zero_valuation_rate?: number | undefined;
96
+ t_warehouse?: string | undefined;
97
+ s_warehouse?: string | undefined;
98
+ basic_rate?: number | undefined;
99
+ }, {
100
+ item_code: string;
101
+ qty: number;
102
+ allow_zero_valuation_rate?: number | undefined;
103
+ t_warehouse?: string | undefined;
104
+ s_warehouse?: string | undefined;
105
+ basic_rate?: number | undefined;
106
+ }>, "many">;
107
+ additional_costs: z.ZodArray<z.ZodString, "many">;
108
+ }, "strip", z.ZodTypeAny, {
109
+ name: string;
110
+ owner: string;
111
+ creation: string;
112
+ modified: string;
113
+ modified_by: string;
114
+ idx: number;
115
+ docstatus: number;
116
+ doctype: string;
117
+ company: string;
118
+ items: {
119
+ item_code: string;
120
+ qty: number;
121
+ allow_zero_valuation_rate?: number | undefined;
122
+ t_warehouse?: string | undefined;
123
+ s_warehouse?: string | undefined;
124
+ basic_rate?: number | undefined;
125
+ }[];
126
+ naming_series: string;
127
+ posting_date: string;
128
+ posting_time: string;
129
+ set_posting_time: number;
130
+ is_return: number;
131
+ apply_putaway_rule: number;
132
+ stock_entry_type: string;
133
+ purpose: string;
134
+ add_to_transit: number;
135
+ inspection_required: number;
136
+ from_bom: number;
137
+ fg_completed_qty: number;
138
+ use_multi_level_bom: number;
139
+ total_outgoing_value: number;
140
+ total_incoming_value: number;
141
+ value_difference: number;
142
+ total_additional_costs: number;
143
+ is_opening: string;
144
+ per_transferred: number;
145
+ total_amount: number;
146
+ additional_costs: string[];
147
+ parent?: string | undefined;
148
+ parentfield?: string | undefined;
149
+ parenttype?: string | undefined;
150
+ project?: string | undefined;
151
+ amended_from?: string | undefined;
152
+ pick_list?: string | undefined;
153
+ address_display?: string | undefined;
154
+ scan_barcode?: string | undefined;
155
+ letter_head?: string | undefined;
156
+ select_print_heading?: string | undefined;
157
+ supplier?: string | undefined;
158
+ from_warehouse?: string | undefined;
159
+ purchase_order?: string | undefined;
160
+ supplier_name?: string | undefined;
161
+ supplier_address?: string | undefined;
162
+ remarks?: string | undefined;
163
+ external_name?: string | undefined;
164
+ outgoing_stock_entry?: string | undefined;
165
+ work_order?: string | undefined;
166
+ delivery_note_no?: string | undefined;
167
+ sales_invoice_no?: string | undefined;
168
+ purchase_receipt_no?: string | undefined;
169
+ bom_no?: string | undefined;
170
+ source_warehouse_address?: string | undefined;
171
+ source_address_display?: string | undefined;
172
+ to_warehouse?: string | undefined;
173
+ target_warehouse_address?: string | undefined;
174
+ target_address_display?: string | undefined;
175
+ job_card?: string | undefined;
176
+ credit_note?: string | undefined;
177
+ }, {
178
+ name: string;
179
+ owner: string;
180
+ creation: string;
181
+ modified: string;
182
+ modified_by: string;
183
+ idx: number;
184
+ docstatus: number;
185
+ doctype: string;
186
+ company: string;
187
+ items: {
188
+ item_code: string;
189
+ qty: number;
190
+ allow_zero_valuation_rate?: number | undefined;
191
+ t_warehouse?: string | undefined;
192
+ s_warehouse?: string | undefined;
193
+ basic_rate?: number | undefined;
194
+ }[];
195
+ naming_series: string;
196
+ posting_date: string;
197
+ posting_time: string;
198
+ set_posting_time: number;
199
+ is_return: number;
200
+ apply_putaway_rule: number;
201
+ stock_entry_type: string;
202
+ purpose: string;
203
+ add_to_transit: number;
204
+ inspection_required: number;
205
+ from_bom: number;
206
+ fg_completed_qty: number;
207
+ use_multi_level_bom: number;
208
+ total_outgoing_value: number;
209
+ total_incoming_value: number;
210
+ value_difference: number;
211
+ total_additional_costs: number;
212
+ is_opening: string;
213
+ per_transferred: number;
214
+ total_amount: number;
215
+ additional_costs: string[];
216
+ parent?: string | undefined;
217
+ parentfield?: string | undefined;
218
+ parenttype?: string | undefined;
219
+ project?: string | undefined;
220
+ amended_from?: string | undefined;
221
+ pick_list?: string | undefined;
222
+ address_display?: string | undefined;
223
+ scan_barcode?: string | undefined;
224
+ letter_head?: string | undefined;
225
+ select_print_heading?: string | undefined;
226
+ supplier?: string | undefined;
227
+ from_warehouse?: string | undefined;
228
+ purchase_order?: string | undefined;
229
+ supplier_name?: string | undefined;
230
+ supplier_address?: string | undefined;
231
+ remarks?: string | undefined;
232
+ external_name?: string | undefined;
233
+ outgoing_stock_entry?: string | undefined;
234
+ work_order?: string | undefined;
235
+ delivery_note_no?: string | undefined;
236
+ sales_invoice_no?: string | undefined;
237
+ purchase_receipt_no?: string | undefined;
238
+ bom_no?: string | undefined;
239
+ source_warehouse_address?: string | undefined;
240
+ source_address_display?: string | undefined;
241
+ to_warehouse?: string | undefined;
242
+ target_warehouse_address?: string | undefined;
243
+ target_address_display?: string | undefined;
244
+ job_card?: string | undefined;
245
+ credit_note?: string | undefined;
246
+ }>;
247
+ export type StockEntry = z.infer<typeof StockEntry>;
248
+ export {};
@@ -0,0 +1,76 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.StockEntry = void 0;
4
+ // convert from types to zod schema
5
+ const zod_1 = require("zod");
6
+ const StockEntryItem = zod_1.z.object({
7
+ t_warehouse: zod_1.z.string().optional(),
8
+ s_warehouse: zod_1.z.string().optional(),
9
+ item_code: zod_1.z.string(),
10
+ qty: zod_1.z.number(),
11
+ basic_rate: zod_1.z.number().optional(),
12
+ allow_zero_valuation_rate: zod_1.z.number().optional(),
13
+ });
14
+ exports.StockEntry = zod_1.z.object({
15
+ name: zod_1.z.string(),
16
+ external_name: zod_1.z.string().optional(),
17
+ owner: zod_1.z.string(),
18
+ creation: zod_1.z.string(),
19
+ modified: zod_1.z.string(),
20
+ modified_by: zod_1.z.string(),
21
+ parent: zod_1.z.string().optional(),
22
+ parentfield: zod_1.z.string().optional(),
23
+ parenttype: zod_1.z.string().optional(),
24
+ idx: zod_1.z.number(),
25
+ docstatus: zod_1.z.number(),
26
+ naming_series: zod_1.z.string(),
27
+ stock_entry_type: zod_1.z.string(),
28
+ outgoing_stock_entry: zod_1.z.string().optional(),
29
+ purpose: zod_1.z.string(),
30
+ add_to_transit: zod_1.z.number(),
31
+ work_order: zod_1.z.string().optional(),
32
+ purchase_order: zod_1.z.string().optional(),
33
+ delivery_note_no: zod_1.z.string().optional(),
34
+ sales_invoice_no: zod_1.z.string().optional(),
35
+ pick_list: zod_1.z.string().optional(),
36
+ purchase_receipt_no: zod_1.z.string().optional(),
37
+ company: zod_1.z.string(),
38
+ posting_date: zod_1.z.string(),
39
+ posting_time: zod_1.z.string(),
40
+ set_posting_time: zod_1.z.number(),
41
+ inspection_required: zod_1.z.number(),
42
+ from_bom: zod_1.z.number(),
43
+ apply_putaway_rule: zod_1.z.number(),
44
+ bom_no: zod_1.z.string().optional(),
45
+ fg_completed_qty: zod_1.z.number(),
46
+ use_multi_level_bom: zod_1.z.number(),
47
+ from_warehouse: zod_1.z.string().optional(),
48
+ source_warehouse_address: zod_1.z.string().optional(),
49
+ source_address_display: zod_1.z.string().optional(),
50
+ to_warehouse: zod_1.z.string().optional(),
51
+ target_warehouse_address: zod_1.z.string().optional(),
52
+ target_address_display: zod_1.z.string().optional(),
53
+ scan_barcode: zod_1.z.string().optional(),
54
+ total_outgoing_value: zod_1.z.number(),
55
+ total_incoming_value: zod_1.z.number(),
56
+ value_difference: zod_1.z.number(),
57
+ total_additional_costs: zod_1.z.number(),
58
+ supplier: zod_1.z.string().optional(),
59
+ supplier_name: zod_1.z.string().optional(),
60
+ supplier_address: zod_1.z.string().optional(),
61
+ address_display: zod_1.z.string().optional(),
62
+ project: zod_1.z.string().optional(),
63
+ select_print_heading: zod_1.z.string().optional(),
64
+ letter_head: zod_1.z.string().optional(),
65
+ is_opening: zod_1.z.string(),
66
+ remarks: zod_1.z.string().optional(),
67
+ per_transferred: zod_1.z.number(),
68
+ total_amount: zod_1.z.number(),
69
+ job_card: zod_1.z.string().optional(),
70
+ amended_from: zod_1.z.string().optional(),
71
+ credit_note: zod_1.z.string().optional(),
72
+ is_return: zod_1.z.number(),
73
+ doctype: zod_1.z.string(),
74
+ items: zod_1.z.array(StockEntryItem),
75
+ additional_costs: zod_1.z.array(zod_1.z.string()),
76
+ });
@@ -0,0 +1,187 @@
1
+ import { z } from "zod";
2
+ declare const StockReconciliationItem: z.ZodObject<{
3
+ item_code: z.ZodString;
4
+ warehouse: z.ZodString;
5
+ batch_no: z.ZodOptional<z.ZodString>;
6
+ serial_no: z.ZodOptional<z.ZodString>;
7
+ qty: z.ZodNumber;
8
+ valuation_rate: z.ZodNumber;
9
+ amount: z.ZodNumber;
10
+ current_qty: z.ZodOptional<z.ZodNumber>;
11
+ current_valuation_rate: z.ZodOptional<z.ZodNumber>;
12
+ current_amount: z.ZodOptional<z.ZodNumber>;
13
+ quantity_difference: z.ZodOptional<z.ZodNumber>;
14
+ amount_difference: z.ZodOptional<z.ZodNumber>;
15
+ barcode: z.ZodOptional<z.ZodString>;
16
+ }, "strip", z.ZodTypeAny, {
17
+ item_code: string;
18
+ qty: number;
19
+ amount: number;
20
+ warehouse: string;
21
+ valuation_rate: number;
22
+ barcode?: string | undefined;
23
+ batch_no?: string | undefined;
24
+ serial_no?: string | undefined;
25
+ current_qty?: number | undefined;
26
+ current_valuation_rate?: number | undefined;
27
+ current_amount?: number | undefined;
28
+ quantity_difference?: number | undefined;
29
+ amount_difference?: number | undefined;
30
+ }, {
31
+ item_code: string;
32
+ qty: number;
33
+ amount: number;
34
+ warehouse: string;
35
+ valuation_rate: number;
36
+ barcode?: string | undefined;
37
+ batch_no?: string | undefined;
38
+ serial_no?: string | undefined;
39
+ current_qty?: number | undefined;
40
+ current_valuation_rate?: number | undefined;
41
+ current_amount?: number | undefined;
42
+ quantity_difference?: number | undefined;
43
+ amount_difference?: number | undefined;
44
+ }>;
45
+ export type StockReconciliationItemType = z.infer<typeof StockReconciliationItem>;
46
+ export declare const StockReconciliation: z.ZodObject<{
47
+ doctype: z.ZodLiteral<"Stock Reconciliation">;
48
+ naming_series: z.ZodString;
49
+ company: z.ZodString;
50
+ purpose: z.ZodEnum<["Stock Reconciliation", "Opening Stock"]>;
51
+ posting_date: z.ZodString;
52
+ posting_time: z.ZodString;
53
+ set_posting_time: z.ZodDefault<z.ZodBoolean>;
54
+ items: z.ZodArray<z.ZodObject<{
55
+ item_code: z.ZodString;
56
+ warehouse: z.ZodString;
57
+ batch_no: z.ZodOptional<z.ZodString>;
58
+ serial_no: z.ZodOptional<z.ZodString>;
59
+ qty: z.ZodNumber;
60
+ valuation_rate: z.ZodNumber;
61
+ amount: z.ZodNumber;
62
+ current_qty: z.ZodOptional<z.ZodNumber>;
63
+ current_valuation_rate: z.ZodOptional<z.ZodNumber>;
64
+ current_amount: z.ZodOptional<z.ZodNumber>;
65
+ quantity_difference: z.ZodOptional<z.ZodNumber>;
66
+ amount_difference: z.ZodOptional<z.ZodNumber>;
67
+ barcode: z.ZodOptional<z.ZodString>;
68
+ }, "strip", z.ZodTypeAny, {
69
+ item_code: string;
70
+ qty: number;
71
+ amount: number;
72
+ warehouse: string;
73
+ valuation_rate: number;
74
+ barcode?: string | undefined;
75
+ batch_no?: string | undefined;
76
+ serial_no?: string | undefined;
77
+ current_qty?: number | undefined;
78
+ current_valuation_rate?: number | undefined;
79
+ current_amount?: number | undefined;
80
+ quantity_difference?: number | undefined;
81
+ amount_difference?: number | undefined;
82
+ }, {
83
+ item_code: string;
84
+ qty: number;
85
+ amount: number;
86
+ warehouse: string;
87
+ valuation_rate: number;
88
+ barcode?: string | undefined;
89
+ batch_no?: string | undefined;
90
+ serial_no?: string | undefined;
91
+ current_qty?: number | undefined;
92
+ current_valuation_rate?: number | undefined;
93
+ current_amount?: number | undefined;
94
+ quantity_difference?: number | undefined;
95
+ amount_difference?: number | undefined;
96
+ }>, "many">;
97
+ cost_center: z.ZodOptional<z.ZodString>;
98
+ expense_account: z.ZodOptional<z.ZodString>;
99
+ reconciliation_json: z.ZodOptional<z.ZodString>;
100
+ scan_barcode: z.ZodOptional<z.ZodString>;
101
+ scan_mode: z.ZodDefault<z.ZodBoolean>;
102
+ docstatus: z.ZodNumber;
103
+ 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
+ }, "strip", z.ZodTypeAny, {
112
+ name: string;
113
+ owner: string;
114
+ creation: string;
115
+ modified: string;
116
+ modified_by: string;
117
+ idx: number;
118
+ docstatus: number;
119
+ doctype: "Stock Reconciliation";
120
+ company: string;
121
+ items: {
122
+ item_code: string;
123
+ qty: number;
124
+ amount: number;
125
+ warehouse: string;
126
+ valuation_rate: number;
127
+ barcode?: string | undefined;
128
+ batch_no?: string | undefined;
129
+ serial_no?: string | undefined;
130
+ current_qty?: number | undefined;
131
+ current_valuation_rate?: number | undefined;
132
+ current_amount?: number | undefined;
133
+ quantity_difference?: number | undefined;
134
+ amount_difference?: number | undefined;
135
+ }[];
136
+ naming_series: string;
137
+ posting_date: string;
138
+ posting_time: string;
139
+ set_posting_time: boolean;
140
+ purpose: "Stock Reconciliation" | "Opening Stock";
141
+ scan_mode: boolean;
142
+ expense_account?: string | undefined;
143
+ cost_center?: string | undefined;
144
+ amended_from?: string | undefined;
145
+ scan_barcode?: string | undefined;
146
+ reconciliation_json?: string | undefined;
147
+ workflow_state?: string | undefined;
148
+ }, {
149
+ name: string;
150
+ owner: string;
151
+ creation: string;
152
+ modified: string;
153
+ modified_by: string;
154
+ idx: number;
155
+ docstatus: number;
156
+ doctype: "Stock Reconciliation";
157
+ company: string;
158
+ items: {
159
+ item_code: string;
160
+ qty: number;
161
+ amount: number;
162
+ warehouse: string;
163
+ valuation_rate: number;
164
+ barcode?: string | undefined;
165
+ batch_no?: string | undefined;
166
+ serial_no?: string | undefined;
167
+ current_qty?: number | undefined;
168
+ current_valuation_rate?: number | undefined;
169
+ current_amount?: number | undefined;
170
+ quantity_difference?: number | undefined;
171
+ amount_difference?: number | undefined;
172
+ }[];
173
+ naming_series: string;
174
+ posting_date: string;
175
+ posting_time: string;
176
+ purpose: "Stock Reconciliation" | "Opening Stock";
177
+ expense_account?: string | undefined;
178
+ cost_center?: string | undefined;
179
+ amended_from?: string | undefined;
180
+ set_posting_time?: boolean | undefined;
181
+ scan_barcode?: string | undefined;
182
+ reconciliation_json?: string | undefined;
183
+ scan_mode?: boolean | undefined;
184
+ workflow_state?: string | undefined;
185
+ }>;
186
+ export type StockReconciliationType = z.infer<typeof StockReconciliation>;
187
+ export {};
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.StockReconciliation = void 0;
4
+ const zod_1 = require("zod");
5
+ const StockReconciliationItem = zod_1.z.object({
6
+ item_code: zod_1.z.string(),
7
+ warehouse: zod_1.z.string(),
8
+ batch_no: zod_1.z.string().optional(),
9
+ serial_no: zod_1.z.string().optional(),
10
+ qty: zod_1.z.number(),
11
+ valuation_rate: zod_1.z.number(),
12
+ amount: zod_1.z.number(),
13
+ current_qty: zod_1.z.number().optional(),
14
+ current_valuation_rate: zod_1.z.number().optional(),
15
+ current_amount: zod_1.z.number().optional(),
16
+ quantity_difference: zod_1.z.number().optional(),
17
+ amount_difference: zod_1.z.number().optional(),
18
+ barcode: zod_1.z.string().optional(),
19
+ });
20
+ exports.StockReconciliation = zod_1.z.object({
21
+ doctype: zod_1.z.literal("Stock Reconciliation"),
22
+ naming_series: zod_1.z.string(),
23
+ company: zod_1.z.string(),
24
+ purpose: zod_1.z.enum(["Stock Reconciliation", "Opening Stock"]),
25
+ posting_date: zod_1.z.string(), // ISO date string
26
+ posting_time: zod_1.z.string(), // Time string
27
+ set_posting_time: zod_1.z.boolean().default(false),
28
+ items: zod_1.z.array(StockReconciliationItem),
29
+ cost_center: zod_1.z.string().optional(),
30
+ expense_account: zod_1.z.string().optional(),
31
+ reconciliation_json: zod_1.z.string().optional(), // JSON string
32
+ scan_barcode: zod_1.z.string().optional(),
33
+ 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
+ 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
+ });
@@ -0,0 +1,105 @@
1
+ import { z } from "zod";
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
+ import_reference: z.ZodString;
10
+ docstatus: z.ZodNumber;
11
+ naming_series: z.ZodString;
12
+ supplier_display_name: z.ZodString;
13
+ supplier_name: z.ZodString;
14
+ supplier_contact: z.ZodString;
15
+ country: z.ZodString;
16
+ is_transporter: z.ZodNumber;
17
+ is_internal_supplier: z.ZodNumber;
18
+ supplier_group: z.ZodString;
19
+ allow_purchase_invoice_creation_without_purchase_order: z.ZodNumber;
20
+ allow_purchase_invoice_creation_without_purchase_receipt: z.ZodNumber;
21
+ disabled: z.ZodNumber;
22
+ warn_rfqs: z.ZodNumber;
23
+ warn_pos: z.ZodNumber;
24
+ prevent_rfqs: z.ZodNumber;
25
+ prevent_pos: z.ZodNumber;
26
+ default_currency: z.ZodString;
27
+ default_price_list: z.ZodString;
28
+ on_hold: z.ZodNumber;
29
+ hold_type: z.ZodString;
30
+ language: z.ZodString;
31
+ is_frozen: z.ZodNumber;
32
+ doctype: z.ZodString;
33
+ companies: z.ZodArray<z.ZodString, "many">;
34
+ accounts: z.ZodArray<z.ZodString, "many">;
35
+ supplier_number_code: z.ZodOptional<z.ZodString>;
36
+ }, "strip", z.ZodTypeAny, {
37
+ name: string;
38
+ country: string;
39
+ owner: string;
40
+ creation: string;
41
+ modified: string;
42
+ modified_by: string;
43
+ idx: number;
44
+ docstatus: number;
45
+ doctype: string;
46
+ import_reference: string;
47
+ disabled: number;
48
+ naming_series: string;
49
+ language: string;
50
+ supplier_name: string;
51
+ is_internal_supplier: number;
52
+ is_frozen: number;
53
+ companies: string[];
54
+ accounts: string[];
55
+ supplier_display_name: string;
56
+ supplier_contact: string;
57
+ is_transporter: number;
58
+ supplier_group: string;
59
+ allow_purchase_invoice_creation_without_purchase_order: number;
60
+ allow_purchase_invoice_creation_without_purchase_receipt: number;
61
+ warn_rfqs: number;
62
+ warn_pos: number;
63
+ prevent_rfqs: number;
64
+ prevent_pos: number;
65
+ default_currency: string;
66
+ default_price_list: string;
67
+ on_hold: number;
68
+ hold_type: string;
69
+ supplier_number_code?: string | undefined;
70
+ }, {
71
+ name: string;
72
+ country: string;
73
+ owner: string;
74
+ creation: string;
75
+ modified: string;
76
+ modified_by: string;
77
+ idx: number;
78
+ docstatus: number;
79
+ doctype: string;
80
+ import_reference: string;
81
+ disabled: number;
82
+ naming_series: string;
83
+ language: string;
84
+ supplier_name: string;
85
+ is_internal_supplier: number;
86
+ is_frozen: number;
87
+ companies: string[];
88
+ accounts: string[];
89
+ supplier_display_name: string;
90
+ supplier_contact: string;
91
+ is_transporter: number;
92
+ supplier_group: string;
93
+ allow_purchase_invoice_creation_without_purchase_order: number;
94
+ allow_purchase_invoice_creation_without_purchase_receipt: number;
95
+ warn_rfqs: number;
96
+ warn_pos: number;
97
+ prevent_rfqs: number;
98
+ prevent_pos: number;
99
+ default_currency: string;
100
+ default_price_list: string;
101
+ on_hold: number;
102
+ hold_type: string;
103
+ supplier_number_code?: string | undefined;
104
+ }>;
105
+ export type SupplierType = z.infer<typeof Supplier>;
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Supplier = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.Supplier = zod_1.z.object({
6
+ name: zod_1.z.string(),
7
+ owner: zod_1.z.string(),
8
+ creation: zod_1.z.string(),
9
+ modified: zod_1.z.string(),
10
+ modified_by: zod_1.z.string(),
11
+ idx: zod_1.z.number(),
12
+ import_reference: zod_1.z.string(),
13
+ docstatus: zod_1.z.number(),
14
+ naming_series: zod_1.z.string(),
15
+ supplier_display_name: zod_1.z.string(),
16
+ supplier_name: zod_1.z.string(),
17
+ supplier_contact: zod_1.z.string(),
18
+ country: zod_1.z.string(),
19
+ is_transporter: zod_1.z.number(),
20
+ is_internal_supplier: zod_1.z.number(),
21
+ supplier_group: zod_1.z.string(),
22
+ allow_purchase_invoice_creation_without_purchase_order: zod_1.z.number(),
23
+ allow_purchase_invoice_creation_without_purchase_receipt: zod_1.z.number(),
24
+ disabled: zod_1.z.number(),
25
+ warn_rfqs: zod_1.z.number(),
26
+ warn_pos: zod_1.z.number(),
27
+ prevent_rfqs: zod_1.z.number(),
28
+ prevent_pos: zod_1.z.number(),
29
+ default_currency: zod_1.z.string(),
30
+ default_price_list: zod_1.z.string(),
31
+ on_hold: zod_1.z.number(),
32
+ hold_type: zod_1.z.string(),
33
+ language: zod_1.z.string(),
34
+ is_frozen: zod_1.z.number(),
35
+ doctype: zod_1.z.string(),
36
+ companies: zod_1.z.array(zod_1.z.string()),
37
+ accounts: zod_1.z.array(zod_1.z.string()),
38
+ supplier_number_code: zod_1.z.string().optional(),
39
+ });