falconhub-apilibrary 1.5.1 → 1.5.2-dev.132

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/index.d.mts CHANGED
@@ -73,10 +73,19 @@ interface BulkRowError {
73
73
  }
74
74
  interface BulkResult {
75
75
  created: number;
76
+ updated: number;
76
77
  failed: number;
77
78
  rowErrors: BulkRowError[];
78
79
  }
79
80
 
81
+ /**
82
+ * Request genérico para la carga masiva de archivos.
83
+ * Contiene el archivo en formato base64.
84
+ */
85
+ interface BulkUploadRequest {
86
+ base64: string;
87
+ }
88
+
80
89
  /**
81
90
  * Interfaz que representa un género del catálogo.
82
91
  */
@@ -211,48 +220,6 @@ interface InventoryStatusesFilter {
211
220
  Description?: string;
212
221
  }
213
222
 
214
- /**
215
- * Interfaz que representa un empaque del inventario.
216
- */
217
- interface Packing {
218
- packingId: number;
219
- packing: string;
220
- key: string;
221
- materialId: number;
222
- length: number;
223
- width: number;
224
- height: number;
225
- weightLimit: number | null;
226
- cost: number;
227
- providerId: number;
228
- isActive: boolean;
229
- }
230
- /**
231
- * Request para crear o actualizar un empaque.
232
- */
233
- interface PackingRequest {
234
- packing: string;
235
- key?: string;
236
- materialId: number;
237
- length: number;
238
- width: number;
239
- height: number;
240
- weightLimit?: number;
241
- cost: number;
242
- providerId: number;
243
- isActive: boolean;
244
- }
245
- /**
246
- * Filtros disponibles para buscar empaques.
247
- */
248
- interface PackingsFilter {
249
- Search?: string;
250
- Packing?: string;
251
- MaterialId?: number;
252
- ProviderId?: number;
253
- IsActive?: boolean;
254
- }
255
-
256
223
  /**
257
224
  * Interfaz que representa un material del inventario.
258
225
  */
@@ -263,6 +230,9 @@ interface Material {
263
230
  description: string;
264
231
  isRecyclable: boolean;
265
232
  isFragile: boolean;
233
+ createdAt: string;
234
+ updatedAt: string | null;
235
+ deleted: boolean;
266
236
  }
267
237
  /**
268
238
  * Request para crear o actualizar un material.
@@ -284,6 +254,37 @@ interface MaterialsFilter {
284
254
  IsRecyclable?: boolean;
285
255
  IsFragile?: boolean;
286
256
  }
257
+ /**
258
+ * Fila del Excel de carga masiva / layout editable de Materiales.
259
+ * Todos los campos son string porque provienen de celdas Excel.
260
+ * Campos booleanos representados como "true" | "false".
261
+ */
262
+ interface MaterialsBulkItem {
263
+ materialId: string;
264
+ material: string;
265
+ description: string;
266
+ key: string;
267
+ isRecyclable: string;
268
+ isFragile: string;
269
+ }
270
+ /**
271
+ * Mapeo de encabezados Excel (plantilla vacía) a propiedades de MaterialsBulkItem.
272
+ * Usar al leer archivos descargados desde GET bulk/template.
273
+ */
274
+ declare const MATERIALS_BULK_COLUMN_MAP: Record<string, keyof MaterialsBulkItem>;
275
+ /**
276
+ * Encabezados en español de la plantilla vacía, en el orden exacto de las columnas.
277
+ */
278
+ declare const MATERIALS_BULK_HEADERS: string[];
279
+ /**
280
+ * Mapeo de encabezados Excel (layout editable) a propiedades de MaterialsBulkItem.
281
+ * Usar al leer archivos descargados desde GET bulk/layout.
282
+ */
283
+ declare const MATERIALS_LAYOUT_COLUMN_MAP: Record<string, keyof MaterialsBulkItem>;
284
+ /**
285
+ * Encabezados en español del layout editable, en el orden exacto de las columnas.
286
+ */
287
+ declare const MATERIALS_LAYOUT_HEADERS: string[];
287
288
 
288
289
  /**
289
290
  * Interfaz que representa un proveedor del inventario.
@@ -317,6 +318,53 @@ interface ProvidersFilter {
317
318
  IsActive?: boolean;
318
319
  }
319
320
 
321
+ /**
322
+ * Interfaz que representa un empaque del inventario.
323
+ */
324
+ interface Packing {
325
+ packingId: number;
326
+ packing: string;
327
+ key: string;
328
+ materialId: number;
329
+ length: number;
330
+ width: number;
331
+ height: number;
332
+ weightLimit: number | null;
333
+ cost: number;
334
+ providerId: number;
335
+ isActive: boolean;
336
+ createdAt: string;
337
+ updatedAt: string | null;
338
+ deleted: boolean;
339
+ material?: Material | null;
340
+ provider?: Provider | null;
341
+ }
342
+ /**
343
+ * Request para crear o actualizar un empaque.
344
+ */
345
+ interface PackingRequest {
346
+ packing: string;
347
+ key?: string;
348
+ materialId: number;
349
+ length: number;
350
+ width: number;
351
+ height: number;
352
+ weightLimit?: number;
353
+ cost: number;
354
+ providerId: number;
355
+ isActive: boolean;
356
+ }
357
+ /**
358
+ * Filtros disponibles para buscar empaques.
359
+ */
360
+ interface PackingsFilter {
361
+ Search?: string;
362
+ Packing?: string;
363
+ MaterialId?: number;
364
+ ProviderId?: number;
365
+ IsActive?: boolean;
366
+ }
367
+
320
368
  /**
321
369
  * Interfaz que representa un color.
322
370
  */
@@ -342,6 +390,33 @@ interface ColorsFilter {
342
390
  Search?: string;
343
391
  Color?: string;
344
392
  }
393
+ /**
394
+ * Fila del Excel de carga masiva / layout editable de Colores.
395
+ * Todos los campos son string porque provienen de celdas Excel.
396
+ */
397
+ interface ColorsBulkItem {
398
+ colorId: string;
399
+ color: string;
400
+ key: string;
401
+ }
402
+ /**
403
+ * Mapeo de encabezados Excel (plantilla vacía) a propiedades de ColorsBulkItem.
404
+ * Usar al leer archivos descargados desde GET bulk/template.
405
+ */
406
+ declare const COLORS_BULK_COLUMN_MAP: Record<string, keyof ColorsBulkItem>;
407
+ /**
408
+ * Encabezados en español de la plantilla vacía, en el orden exacto de las columnas.
409
+ */
410
+ declare const COLORS_BULK_HEADERS: string[];
411
+ /**
412
+ * Mapeo de encabezados Excel (layout editable) a propiedades de ColorsBulkItem.
413
+ * Usar al leer archivos descargados desde GET bulk/layout.
414
+ */
415
+ declare const COLORS_LAYOUT_COLUMN_MAP: Record<string, keyof ColorsBulkItem>;
416
+ /**
417
+ * Encabezados en español del layout editable, en el orden exacto de las columnas.
418
+ */
419
+ declare const COLORS_LAYOUT_HEADERS: string[];
345
420
 
346
421
  /**
347
422
  * Interfaz que representa un grupo de tallas.
@@ -451,12 +526,6 @@ interface BlanksFilter {
451
526
  Size: string;
452
527
  IsActive?: boolean;
453
528
  }
454
- /**
455
- * Request para carga masiva de archivos.
456
- */
457
- interface BulkUploadRequest {
458
- base64: string;
459
- }
460
529
  /**
461
530
  * Representa una fila del Excel de carga masiva de Blanks.
462
531
  */
@@ -551,6 +620,34 @@ interface ProductTypesFilter {
551
620
  productType?: string;
552
621
  description?: string;
553
622
  }
623
+ /**
624
+ * Representa una fila del Excel de carga masiva / layout editable de tipos de producto.
625
+ * Todos los campos son string porque provienen de celdas Excel.
626
+ */
627
+ interface ProductTypesBulkItem {
628
+ productTypeId: string;
629
+ productType: string;
630
+ key: string;
631
+ description: string;
632
+ }
633
+ /**
634
+ * Mapeo de encabezados Excel (plantilla vacía) a propiedades de ProductTypesBulkItem.
635
+ * Usar al leer archivos descargados desde GET bulk/template.
636
+ */
637
+ declare const PRODUCT_TYPES_BULK_COLUMN_MAP: Record<string, keyof ProductTypesBulkItem>;
638
+ /**
639
+ * Encabezados en español de la plantilla vacía, en el orden exacto de las columnas.
640
+ */
641
+ declare const PRODUCT_TYPES_BULK_HEADERS: string[];
642
+ /**
643
+ * Mapeo de encabezados Excel (layout editable) a propiedades de ProductTypesBulkItem.
644
+ * Usar al leer archivos descargados desde GET bulk/layout.
645
+ */
646
+ declare const PRODUCT_TYPES_LAYOUT_COLUMN_MAP: Record<string, keyof ProductTypesBulkItem>;
647
+ /**
648
+ * Encabezados en español del layout editable, en el orden exacto de las columnas.
649
+ */
650
+ declare const PRODUCT_TYPES_LAYOUT_HEADERS: string[];
554
651
 
555
652
  interface ProductCategory {
556
653
  productCategoryId: number;
@@ -574,6 +671,16 @@ interface ProductCategoriesFilter {
574
671
  description?: string;
575
672
  isActive?: boolean;
576
673
  }
674
+ /**
675
+ * Representa una fila del Excel de carga masiva de categorías de producto.
676
+ */
677
+ interface ProductCategoriesBulkItem {
678
+ productCategoryId: string;
679
+ productCategory: string;
680
+ key: string;
681
+ description: string;
682
+ isActive: string;
683
+ }
577
684
 
578
685
  interface ProductStatus {
579
686
  productStatusId: number;
@@ -984,6 +1091,12 @@ interface SiteConfigResponse {
984
1091
  catalogs: SiteConfigCatalogsResponse;
985
1092
  }
986
1093
 
1094
+ /**
1095
+ * Valor del marcador oculto embebido en la hoja "Catalogos" columna 1000 fila 1.
1096
+ * Si el archivo contiene este valor → modo layout (UPSERT); si está vacío → modo creación.
1097
+ */
1098
+ declare const LAYOUT_MARKER = "FH_LAYOUT";
1099
+
987
1100
  type MethodTypes = "GET" | "POST" | "PATCH" | "DELETE" | "PUT";
988
1101
  interface RequestOptions {
989
1102
  endpoint: string;
@@ -1595,6 +1708,20 @@ declare class InventoryService {
1595
1708
  * @param id - ID del material a eliminar
1596
1709
  */
1597
1710
  deleteMaterial(id: number): Promise<ResponseModel<void>>;
1711
+ /**
1712
+ * Descarga la plantilla Excel vacía para carga masiva de materiales.
1713
+ */
1714
+ getMaterialsBulkTemplate(): Promise<ResponseModel<Blob>>;
1715
+ /**
1716
+ * Descarga el layout Excel pre-poblado para edición masiva de materiales.
1717
+ * @param ids - Lista de IDs de materiales a incluir en el layout
1718
+ */
1719
+ getMaterialsBulkLayout(ids: number[]): Promise<ResponseModel<Blob>>;
1720
+ /**
1721
+ * Realiza una carga masiva de creación de materiales desde un archivo Excel.
1722
+ * @param request - Objeto con el archivo en base64
1723
+ */
1724
+ bulkCreateMaterials(request: BulkUploadRequest): Promise<ResponseModel<BulkResult>>;
1598
1725
  /**
1599
1726
  * Obtiene todos los proveedores con filtros opcionales.
1600
1727
  * @param filter - Filtros opcionales para la búsqueda
@@ -1663,6 +1790,19 @@ declare class ProductService {
1663
1790
  * Elimina un color.
1664
1791
  */
1665
1792
  deleteColor(id: number): Promise<ResponseModel<void>>;
1793
+ /**
1794
+ * Obtiene la plantilla para la carga masiva de colores.
1795
+ */
1796
+ getColorsBulkTemplate(): Promise<ResponseModel<Blob>>;
1797
+ /**
1798
+ * Obtiene el layout Excel pre-poblado para edición masiva de colores.
1799
+ * @param ids - Lista de IDs de colores a incluir en el layout
1800
+ */
1801
+ getColorsBulkLayout(ids: number[]): Promise<ResponseModel<Blob>>;
1802
+ /**
1803
+ * Realiza una carga masiva de colores.
1804
+ */
1805
+ bulkCreateColors(request: BulkUploadRequest): Promise<ResponseModel<BulkResult>>;
1666
1806
  /**
1667
1807
  * Obtiene todos los grupos de tallas con filtros opcionales.
1668
1808
  */
@@ -1827,6 +1967,18 @@ declare class ProductService {
1827
1967
  * Elimina un tipo de producto.
1828
1968
  */
1829
1969
  deleteProductType(id: number): Promise<ResponseModel<void>>;
1970
+ /**
1971
+ * Obtiene la plantilla para la carga masiva de tipos de producto.
1972
+ */
1973
+ getProductTypesBulkTemplate(): Promise<ResponseModel<Blob>>;
1974
+ /**
1975
+ * Obtiene el layout para la actualización masiva de tipos de producto.
1976
+ */
1977
+ getProductTypesBulkLayout(ids: number[]): Promise<ResponseModel<Blob>>;
1978
+ /**
1979
+ * Realiza una carga masiva (upsert) de tipos de producto.
1980
+ */
1981
+ bulkUpsertProductTypes(request: BulkUploadRequest): Promise<ResponseModel<BulkResult>>;
1830
1982
  /**
1831
1983
  * Obtiene todas las categorías de producto con filtros opcionales.
1832
1984
  */
@@ -1855,6 +2007,18 @@ declare class ProductService {
1855
2007
  * Elimina una categoría de producto.
1856
2008
  */
1857
2009
  deleteProductCategory(id: number): Promise<ResponseModel<void>>;
2010
+ /**
2011
+ * Obtiene la plantilla para la carga masiva de categorías de producto.
2012
+ */
2013
+ getProductCategoriesBulkTemplate(): Promise<ResponseModel<Blob>>;
2014
+ /**
2015
+ * Obtiene el layout para la actualización masiva de categorías de producto.
2016
+ */
2017
+ getProductCategoriesBulkLayout(ids: number[]): Promise<ResponseModel<Blob>>;
2018
+ /**
2019
+ * Realiza una carga masiva (upsert) de categorías de producto.
2020
+ */
2021
+ bulkUpsertProductCategories(request: BulkUploadRequest): Promise<ResponseModel<BulkResult>>;
1858
2022
  /**
1859
2023
  * Obtiene todos los estatus de producto con filtros opcionales.
1860
2024
  */
@@ -2199,4 +2363,4 @@ declare class FalconHUBSDK {
2199
2363
 
2200
2364
  declare function decrypt(encryptedBase64: string, secret: string, timestamp: string): string;
2201
2365
 
2202
- export { API, type AdminAuthentication, type AdminUser, type AreaCode, type AreaCodeRequest, type AreaCodeUserProfile, type AreaCodesFilter, AuthInterceptor, type AuthInterceptorConfig, AuthService, BLANKS_BULK_COLUMN_MAP, BLANKS_BULK_SPANISH_HEADERS, type Blank, type BlankRequest, type BlanksBulkItem, type BlanksFilter, type BulkResult, type BulkRowError, type BulkUploadRequest, CatalogService, type ChangePasswordAdminRequest, type ChangePasswordRequest, type ChangePasswordUserRequest, type Color, type ColorRequest, type ColorsFilter, type ConfirmEmailRequest, CryptoService, type Endpoint, type EndpointRequest, type EndpointsFilter, ErrorResponse, FalconHUBSDK, FilterBuilder, type FilterFieldMetadata, type FilterGroup, type FilterGroupOption, type FilterGroupsModel, type FilterMetadataModel, type FilterModel, type Gender, type GenderRequest, type GenderUserProfile, type GendersFilter, type GetSecretKeyRequest, type GetSecretKeyResponse, type HttpMethodType, type InterceptorContext, InventoryService, type InventoryStatus, type InventoryStatusRequest, type InventoryStatusesFilter, type License, type LicenseRequest, type LicensesFilter, type Location, type LocationsFilter, type LocationsRequest, type LoginRequest, type LoginResponse, type Material, type MaterialRequest, type MaterialsFilter, type MethodTypes, type Module, type ModuleRequest, type ModulesFilter, type Packing, type PackingRequest, type PackingsFilter, type ProductCategoriesFilter, type ProductCategory, type ProductCategoryRequest, ProductService, type ProductStatus, type ProductStatusRequest, type ProductStatusesFilter, type ProductType, type ProductTypeRequest, type ProductTypesFilter, type Provider, type ProviderRequest, type ProvidersFilter, type RefreshTokenRequest, type RefreshTokenResponse, type RequestConfig, type RequestInterceptor, type RequestOptions, type ResponseModel, type Role, type RoleRequest, type RoleUserProfile, type RolesFilter, type SendOtpRequest, type ServiceProperties, type SiteConfigCatalogsResponse, type SiteConfigResponse, type Size, type SizeGroup, type SizeGroupRequest, type SizeGroupsFilter, type SizeRequest, type SizesFilter, type Studio, type StudioRequest, type StudiosFilter, SystemService, type TokenData, TokenManager, type UIRoute, type UIRouteRequest, type UIRoutesFilter, type UserAdminFilter, type UserAdminRequest, type UserAdminUpdateRequest, type UserAuthAdminRequest, type UserAuthUpdateRequest, type UserBasicResponse, type UserDataUpdateRequest, type UserProfileResponse, type Role as UserRole, UserService, type UserType, type UserTypeRequest, type UserTypeUserProfile, type UserTypesFilter, type ValidateOtpRequest, type ValidateSessionRenewedResponse, type ValidateSessionResponse, decrypt };
2366
+ export { API, type AdminAuthentication, type AdminUser, type AreaCode, type AreaCodeRequest, type AreaCodeUserProfile, type AreaCodesFilter, AuthInterceptor, type AuthInterceptorConfig, AuthService, BLANKS_BULK_COLUMN_MAP, BLANKS_BULK_SPANISH_HEADERS, type Blank, type BlankRequest, type BlanksBulkItem, type BlanksFilter, type BulkResult, type BulkRowError, type BulkUploadRequest, COLORS_BULK_COLUMN_MAP, COLORS_BULK_HEADERS, COLORS_LAYOUT_COLUMN_MAP, COLORS_LAYOUT_HEADERS, CatalogService, type ChangePasswordAdminRequest, type ChangePasswordRequest, type ChangePasswordUserRequest, type Color, type ColorRequest, type ColorsBulkItem, type ColorsFilter, type ConfirmEmailRequest, CryptoService, type Endpoint, type EndpointRequest, type EndpointsFilter, ErrorResponse, FalconHUBSDK, FilterBuilder, type FilterFieldMetadata, type FilterGroup, type FilterGroupOption, type FilterGroupsModel, type FilterMetadataModel, type FilterModel, type Gender, type GenderRequest, type GenderUserProfile, type GendersFilter, type GetSecretKeyRequest, type GetSecretKeyResponse, type HttpMethodType, type InterceptorContext, InventoryService, type InventoryStatus, type InventoryStatusRequest, type InventoryStatusesFilter, LAYOUT_MARKER, type License, type LicenseRequest, type LicensesFilter, type Location, type LocationsFilter, type LocationsRequest, type LoginRequest, type LoginResponse, MATERIALS_BULK_COLUMN_MAP, MATERIALS_BULK_HEADERS, MATERIALS_LAYOUT_COLUMN_MAP, MATERIALS_LAYOUT_HEADERS, type Material, type MaterialRequest, type MaterialsBulkItem, type MaterialsFilter, type MethodTypes, type Module, type ModuleRequest, type ModulesFilter, PRODUCT_TYPES_BULK_COLUMN_MAP, PRODUCT_TYPES_BULK_HEADERS, PRODUCT_TYPES_LAYOUT_COLUMN_MAP, PRODUCT_TYPES_LAYOUT_HEADERS, type Packing, type PackingRequest, type PackingsFilter, type ProductCategoriesBulkItem, type ProductCategoriesFilter, type ProductCategory, type ProductCategoryRequest, ProductService, type ProductStatus, type ProductStatusRequest, type ProductStatusesFilter, type ProductType, type ProductTypeRequest, type ProductTypesBulkItem, type ProductTypesFilter, type Provider, type ProviderRequest, type ProvidersFilter, type RefreshTokenRequest, type RefreshTokenResponse, type RequestConfig, type RequestInterceptor, type RequestOptions, type ResponseModel, type Role, type RoleRequest, type RoleUserProfile, type RolesFilter, type SendOtpRequest, type ServiceProperties, type SiteConfigCatalogsResponse, type SiteConfigResponse, type Size, type SizeGroup, type SizeGroupRequest, type SizeGroupsFilter, type SizeRequest, type SizesFilter, type Studio, type StudioRequest, type StudiosFilter, SystemService, type TokenData, TokenManager, type UIRoute, type UIRouteRequest, type UIRoutesFilter, type UserAdminFilter, type UserAdminRequest, type UserAdminUpdateRequest, type UserAuthAdminRequest, type UserAuthUpdateRequest, type UserBasicResponse, type UserDataUpdateRequest, type UserProfileResponse, type Role as UserRole, UserService, type UserType, type UserTypeRequest, type UserTypeUserProfile, type UserTypesFilter, type ValidateOtpRequest, type ValidateSessionRenewedResponse, type ValidateSessionResponse, decrypt };