@zauru-sdk/types 1.0.5

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/CHANGELOG.md ADDED
@@ -0,0 +1,8 @@
1
+ # Change Log
2
+
3
+ All notable changes to this project will be documented in this file.
4
+ See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
+
6
+ ## [1.0.5](https://github.com/intuitiva/zauru-typescript-sdk/compare/v1.0.4...v1.0.5) (2024-03-16)
7
+
8
+ **Note:** Version bump only for package @zauru-sdk/types
package/LICENCE.md ADDED
@@ -0,0 +1,11 @@
1
+ # Released under MIT License
2
+
3
+ Copyright (c) 2013 Mark Otto.
4
+
5
+ Copyright (c) 2017 Andrew Fong.
6
+
7
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
8
+
9
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
10
+
11
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,372 @@
1
+ import { EmployeeGraphQL, ItemGraphQL, LotGraphQL, LotStockGraphQL, MembershipGraphQL, MovementGraphQL, PriceListGraphQL, ProfileGraphQL, PurchaseOrderDetailsGraphQL, PurchaseOrderGraphQL, ShipmentGraphQL, SuggestedPriceGraphQL } from "./GraphQL.types";
2
+ export type SpecialItem = {
3
+ item: number;
4
+ provider: number;
5
+ region: string;
6
+ fechaEliminacion: string;
7
+ detalles: string;
8
+ tipo: string;
9
+ providerCategory: number;
10
+ specialLabel: string;
11
+ };
12
+ export type ExtendedInsertBookingBody = {
13
+ movements: Partial<MovementGraphQL>[];
14
+ };
15
+ export type InsertBookingBody = Omit<Partial<ShipmentGraphQL>, "movements"> & ExtendedInsertBookingBody;
16
+ export type ConsolidatePurchaseOrderAttributes = {
17
+ [index: number]: {
18
+ consolidated: string;
19
+ id: string;
20
+ };
21
+ };
22
+ export type NewConsolidatedBody = {
23
+ consolidate: {
24
+ name: string;
25
+ description: string;
26
+ purchase_orders_attributes: ConsolidatePurchaseOrderAttributes;
27
+ };
28
+ };
29
+ export type HTMLDataTableDeliveries = {
30
+ draw: number;
31
+ recordsTotal: number;
32
+ recordsFiltered: number;
33
+ data: Array<DeliveryHTMLDataTable>;
34
+ };
35
+ export type DeliveryHTMLDataTable = {
36
+ zid: string;
37
+ id: string;
38
+ ref: string;
39
+ nt: string;
40
+ pd: string;
41
+ dt: string;
42
+ af: string;
43
+ af_id: number;
44
+ at: string;
45
+ at_id: number;
46
+ d: string;
47
+ i: number;
48
+ m: string;
49
+ mem: string;
50
+ ra: string;
51
+ DT_RowId: string;
52
+ };
53
+ export type DischargeDetailsAttributes = {
54
+ [index: number]: {
55
+ purchase_order_id: number;
56
+ amount: string;
57
+ };
58
+ };
59
+ export type NewDischargeBody = {
60
+ discharge: {
61
+ id_number: string;
62
+ payee_id: number | string;
63
+ date: string;
64
+ discharge_method_id: number | string;
65
+ discharge_details_attributes: DischargeDetailsAttributes;
66
+ };
67
+ };
68
+ export type LoteRecordBody = {
69
+ lote_id: string;
70
+ agency_id: string;
71
+ lote_name: string;
72
+ created_at: string;
73
+ employee_id: string;
74
+ employee_name: string;
75
+ retenido: number;
76
+ };
77
+ export type UpdateLoteBody = {
78
+ lot: {
79
+ description: string;
80
+ };
81
+ };
82
+ export type LoteWithPurchaseFormatedSchema = PurchasesDataTableListFormatedSchema & {
83
+ id_lote: number;
84
+ name_lote: string;
85
+ item: string;
86
+ created_at: string;
87
+ weight: string;
88
+ baskets: number;
89
+ editable: boolean;
90
+ };
91
+ export type LoteDescription = {
92
+ id: number;
93
+ active: boolean;
94
+ name: string;
95
+ description: string;
96
+ description_baskets: BasketSchema[];
97
+ baskets_quantity: number;
98
+ availableByBaskets: number;
99
+ entity_id: number;
100
+ created_at: string;
101
+ updated_at: string;
102
+ item_id: number;
103
+ expires: string;
104
+ id_number: number | null;
105
+ stock_actual: LotStockGraphQL;
106
+ stocks: {
107
+ [key: string]: LotStockGraphQL | string;
108
+ };
109
+ };
110
+ export type LoteSchema = {
111
+ id: number;
112
+ lot_id: number;
113
+ entity_id: number;
114
+ agency_id: number;
115
+ available: string;
116
+ incoming: string;
117
+ outgoing: string;
118
+ created_at: string;
119
+ updated_at: string;
120
+ baskets: BasketSchema[];
121
+ availableByBasket: number;
122
+ baskets_quantity: number;
123
+ lot: {
124
+ id: number;
125
+ active: boolean;
126
+ name: string;
127
+ description: string;
128
+ entity_id: number;
129
+ created_at: string;
130
+ updated_at: string;
131
+ item_id: number;
132
+ expires: string;
133
+ id_number: number | null;
134
+ item: ItemGraphQL;
135
+ };
136
+ };
137
+ export type LoteProcesadoSchema = {
138
+ lote_id: string;
139
+ lote_name: string;
140
+ delivery_date: string;
141
+ purchase_date: string;
142
+ proveedor: string;
143
+ recepcion: string;
144
+ verdura: string;
145
+ pesoNeto: string;
146
+ canastas: string;
147
+ pesoNetoPorCanasta: string;
148
+ rechazo: string;
149
+ };
150
+ export type PoBasketType = {
151
+ [key: string]: {
152
+ lot_id: string;
153
+ rBaskets: number;
154
+ qcBaskets: number;
155
+ };
156
+ };
157
+ export type ItemAssociatedLots = {
158
+ lots: LotGraphQL[];
159
+ item: ItemGraphQL;
160
+ recepciones_basket_item_id: number;
161
+ poBasket: PoBasketType;
162
+ };
163
+ export type MotivoRechazo = {
164
+ Nombre: string;
165
+ };
166
+ export type RegisterMotivosRechazoBody = {
167
+ Canastas?: string;
168
+ Razon_primaria: string;
169
+ Razon_secundaria: string;
170
+ Razon_terciaria: string;
171
+ Otras_razones?: string;
172
+ };
173
+ export type CreatePriceListBody = Partial<PriceListGraphQL> & {
174
+ payee_category_ids: string[];
175
+ };
176
+ export type ProfileResponse = {
177
+ profile: ProfileGraphQL;
178
+ memberships: MembershipGraphQL[];
179
+ };
180
+ export type PurchasesListResponseSchema<T> = {
181
+ draw: number;
182
+ recordsTotal: number;
183
+ recordsFiltered: number;
184
+ data: T[];
185
+ vendors?: BasicIdNameSchema[];
186
+ vendor_categories?: BasicIdNameSchema[];
187
+ };
188
+ export type HTMLPurchasesListSchema = {
189
+ z: string;
190
+ i: string;
191
+ ref: string;
192
+ dte: string;
193
+ o: string;
194
+ ven: string;
195
+ inv: string;
196
+ ct: string;
197
+ itms: 1;
198
+ tot: string;
199
+ due: string;
200
+ r: string;
201
+ r2: string;
202
+ DT_RowId: string;
203
+ dis: string;
204
+ och: string | null;
205
+ rd: string;
206
+ };
207
+ export type PurchasesDataTableListFormatedSchema = {
208
+ id: string;
209
+ zid: string;
210
+ id_number: number;
211
+ no_orden: number;
212
+ dte: Date;
213
+ o: boolean;
214
+ vendor: string;
215
+ po_editable: boolean;
216
+ dis: number;
217
+ och: number;
218
+ rd: string;
219
+ };
220
+ export type UpdatePurchaseOrderBody = {
221
+ purchase_order: {
222
+ discount?: number;
223
+ other_charges?: number;
224
+ payee_id?: number | string;
225
+ purchase_order_details_attributes?: {
226
+ [key: string]: {
227
+ id?: string | number;
228
+ unit_cost: string | number;
229
+ item_id: string | number;
230
+ };
231
+ };
232
+ };
233
+ };
234
+ export type PurchaseOrderReceptionDetails = {
235
+ id: number;
236
+ purchase_order_detail_id: number;
237
+ reception_id: number;
238
+ quantity: string;
239
+ item_id: number;
240
+ lot_delivered_quantity: string[];
241
+ lot_name: string[];
242
+ lot_expire: string[];
243
+ serial_name?: any;
244
+ serial_description?: any;
245
+ lot_description: string[];
246
+ bundle_id?: any;
247
+ };
248
+ export type PurchaseOrderReception = {
249
+ id: number;
250
+ agency_id: string;
251
+ entity_id: string;
252
+ invoice_number?: any;
253
+ reception_details: PurchaseOrderReceptionDetails[];
254
+ };
255
+ export type NewPurchaseOrderResponse = {
256
+ purchase_order: PurchaseOrderGraphQL;
257
+ purchasers: EmployeeGraphQL[];
258
+ purchasersList: SelectFieldOption[];
259
+ };
260
+ export type PurchaseOrderGeneralInfo = {
261
+ incoterm_id: number;
262
+ currency_id: number;
263
+ charge_term_id: number;
264
+ };
265
+ export type ExtendedPurchaseOrderBody = {
266
+ payee_info: string;
267
+ tag_ids: string[];
268
+ purchase_order_details: Partial<PurchaseOrderDetailsGraphQL>[];
269
+ };
270
+ export type CreateNewPurchaseOrderBody = Omit<Partial<PurchaseOrderGraphQL>, "purchase_order_details"> & ExtendedPurchaseOrderBody;
271
+ export type SelectFieldOption = {
272
+ value: any;
273
+ label: string;
274
+ };
275
+ export type DataTablesFilterBody = {
276
+ start: number;
277
+ length: number;
278
+ tag?: string;
279
+ agency?: string;
280
+ agency_from?: string;
281
+ search?: {
282
+ value: string;
283
+ regex: boolean;
284
+ };
285
+ order: {
286
+ [key: string]: {
287
+ column: string;
288
+ dir: string;
289
+ };
290
+ };
291
+ Desde?: string;
292
+ Hasta?: string;
293
+ vendor?: string;
294
+ vendor_category?: string;
295
+ item?: string;
296
+ };
297
+ export type BasicIdNameSchema = {
298
+ id: number;
299
+ name: string;
300
+ };
301
+ export type ObjectKeyString<T> = {
302
+ [key: string]: T;
303
+ };
304
+ export type GeneratePDFBody = {
305
+ s_date: string;
306
+ e_date: string;
307
+ print_template: number | string;
308
+ };
309
+ export type GeneratedPDFResult = {
310
+ status: number;
311
+ zid: number;
312
+ };
313
+ export type PDFResult = {
314
+ status: number;
315
+ percentage: number;
316
+ message: string;
317
+ };
318
+ export type GenericStepResponse = {
319
+ msg: string;
320
+ step: string;
321
+ };
322
+ export type BasketSchema = {
323
+ total: number;
324
+ id: number;
325
+ color: string;
326
+ };
327
+ export interface ReceptionDetailsAttributes {
328
+ [key: string]: {
329
+ item_id: string | number;
330
+ purchase_order_detail_id: string | number;
331
+ lot_delivered_quantity: string[] | number[];
332
+ lot_name: string[];
333
+ lot_expire: string[];
334
+ lot_description: string[];
335
+ };
336
+ }
337
+ export type NewReceptionBody = {
338
+ reception: {
339
+ agency_id: string | number;
340
+ received_at: string;
341
+ invoice_number?: string;
342
+ purchase_order_id: string | number;
343
+ needs_transit: string | boolean;
344
+ entity_id: string | number;
345
+ reception_details_attributes: ReceptionDetailsAttributes;
346
+ };
347
+ };
348
+ export type ItemWithPrices = ItemGraphQL & {
349
+ suggested_prices: Array<SuggestedPriceGraphQL>;
350
+ };
351
+ export type WebAppTableBody<T> = {
352
+ temp_purchase_order_id?: string;
353
+ webapp_row: {
354
+ data: T;
355
+ };
356
+ };
357
+ export type WebAppTableUpdateResponse = {
358
+ id: number;
359
+ webapp_table_id: number;
360
+ data: {
361
+ Nombre: string;
362
+ };
363
+ creator_id: number;
364
+ updater_id: number | null;
365
+ created_at: string;
366
+ updated_at: string;
367
+ };
368
+ export type WebAppTableCreateBody = {
369
+ name: string;
370
+ rows_structure: string[];
371
+ rows_type: string[];
372
+ };
@@ -0,0 +1 @@
1
+ export {};