falconhub-apilibrary 1.5.1 → 1.5.3-dev.134

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