falconhub-apilibrary 1.3.1 → 1.4.0-dev.112
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 +1015 -1593
- package/dist/index.mjs +589 -996
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -217,6 +217,25 @@ declare class TokenManager {
|
|
|
217
217
|
private stopAutoRefreshTimer;
|
|
218
218
|
}
|
|
219
219
|
|
|
220
|
+
interface ChangePasswordRequest {
|
|
221
|
+
email: string;
|
|
222
|
+
oldPassword: string;
|
|
223
|
+
newPassword: string;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
interface ConfirmEmailRequest {
|
|
227
|
+
email: string;
|
|
228
|
+
expiresAt: number;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
interface GetSecretKeyRequest {
|
|
232
|
+
otpCode?: string;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
interface GetSecretKeyResponse {
|
|
236
|
+
secretKey: string;
|
|
237
|
+
}
|
|
238
|
+
|
|
220
239
|
interface LoginRequest {
|
|
221
240
|
email: string;
|
|
222
241
|
password: string;
|
|
@@ -244,6 +263,15 @@ interface RefreshTokenResponse {
|
|
|
244
263
|
type: string;
|
|
245
264
|
}
|
|
246
265
|
|
|
266
|
+
interface SendOtpRequest {
|
|
267
|
+
email: string;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
interface ValidateOtpRequest {
|
|
271
|
+
email: string;
|
|
272
|
+
otp: string;
|
|
273
|
+
}
|
|
274
|
+
|
|
247
275
|
interface ValidateSessionRenewedResponse {
|
|
248
276
|
accessToken: string;
|
|
249
277
|
refreshToken: string;
|
|
@@ -257,26 +285,6 @@ interface ValidateSessionResponse {
|
|
|
257
285
|
isRemembered: boolean;
|
|
258
286
|
}
|
|
259
287
|
|
|
260
|
-
interface ConfirmEmailRequest {
|
|
261
|
-
email: string;
|
|
262
|
-
expiresAt: number;
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
interface SendOtpRequest {
|
|
266
|
-
email: string;
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
interface ValidateOtpRequest {
|
|
270
|
-
email: string;
|
|
271
|
-
otp: string;
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
interface ChangePasswordRequest {
|
|
275
|
-
email: string;
|
|
276
|
-
oldPassword: string;
|
|
277
|
-
newPassword: string;
|
|
278
|
-
}
|
|
279
|
-
|
|
280
288
|
declare class AuthService {
|
|
281
289
|
private api;
|
|
282
290
|
private crytpoService;
|
|
@@ -305,6 +313,12 @@ declare class AuthService {
|
|
|
305
313
|
* Cierra sesión: notifica al servidor y limpia tokens
|
|
306
314
|
*/
|
|
307
315
|
logout(): Promise<ResponseModel>;
|
|
316
|
+
/**
|
|
317
|
+
* Obtiene la SecretKey del usuario autenticado.
|
|
318
|
+
* Requiere sesión activa. Si el usuario tiene 2FA habilitado, se debe proveer el OTP.
|
|
319
|
+
* @param request - Objeto opcional con otpCode (requerido si IsTwoFactorEnabled)
|
|
320
|
+
*/
|
|
321
|
+
getSecretKey(request?: GetSecretKeyRequest): Promise<ResponseModel<GetSecretKeyResponse>>;
|
|
308
322
|
/**
|
|
309
323
|
* Confirma el correo electrónico de un usuario.
|
|
310
324
|
* @param request - Email y expiresAt
|
|
@@ -335,232 +349,74 @@ declare class AuthService {
|
|
|
335
349
|
getTokens(): TokenData | null;
|
|
336
350
|
}
|
|
337
351
|
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
interface GenderUserProfile {
|
|
352
|
+
/**
|
|
353
|
+
* Interfaz que representa un género del catálogo.
|
|
354
|
+
*/
|
|
355
|
+
interface Gender {
|
|
345
356
|
genderId: number;
|
|
346
357
|
gender: string;
|
|
358
|
+
key: string;
|
|
347
359
|
}
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
interface UserTypeUserProfile {
|
|
355
|
-
userTypeId: number;
|
|
356
|
-
userType: string;
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
interface UserProfileResponse {
|
|
360
|
-
userId: number;
|
|
361
|
-
username: string;
|
|
362
|
-
firstName: string;
|
|
363
|
-
lastName: string;
|
|
364
|
-
fullName: string;
|
|
365
|
-
email: string;
|
|
366
|
-
phone: string;
|
|
367
|
-
profilePhoto: string;
|
|
368
|
-
areaCode: AreaCodeUserProfile;
|
|
369
|
-
birthday: Date;
|
|
370
|
-
gender: GenderUserProfile;
|
|
371
|
-
role: RoleUserProfile;
|
|
372
|
-
userType: UserTypeUserProfile;
|
|
373
|
-
userReferralCode: string;
|
|
374
|
-
securityLevel: number;
|
|
375
|
-
emailVerified: boolean;
|
|
376
|
-
phoneVerified: boolean;
|
|
377
|
-
lastLogin: Date;
|
|
378
|
-
mustChangePassword: boolean;
|
|
379
|
-
passwordExpiresAt: Date;
|
|
380
|
-
isActive: boolean;
|
|
381
|
-
createdAt: Date;
|
|
382
|
-
updatedAt: Date;
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
interface UserBasicResponse {
|
|
386
|
-
userId: number;
|
|
387
|
-
username: string;
|
|
388
|
-
firstName: string;
|
|
389
|
-
lastName: string;
|
|
390
|
-
fullName: string;
|
|
391
|
-
email: string;
|
|
392
|
-
phone: string;
|
|
393
|
-
role: string;
|
|
394
|
-
roleId: number;
|
|
395
|
-
userType: number;
|
|
396
|
-
userTypeId: number;
|
|
397
|
-
isActive: boolean;
|
|
398
|
-
securityLevel: number;
|
|
399
|
-
}
|
|
400
|
-
|
|
401
|
-
interface AdminUser {
|
|
402
|
-
userId: number;
|
|
403
|
-
username: string;
|
|
404
|
-
firstName: string;
|
|
405
|
-
lastName: string;
|
|
406
|
-
email: string;
|
|
407
|
-
phone: string;
|
|
408
|
-
areaCodeId: number | null;
|
|
409
|
-
birthday: string | null;
|
|
410
|
-
referrerUserId: number | null;
|
|
411
|
-
userReferralCode: string;
|
|
412
|
-
genderId: number | null;
|
|
413
|
-
roleId: number | null;
|
|
414
|
-
userTypeId: number | null;
|
|
415
|
-
isActive: boolean;
|
|
416
|
-
createdAt: string;
|
|
417
|
-
updatedAt: string | null;
|
|
418
|
-
deleted: boolean;
|
|
419
|
-
}
|
|
420
|
-
interface AdminAuthentication {
|
|
421
|
-
userAuthenticationId: number;
|
|
422
|
-
userId: number;
|
|
423
|
-
securityLevel: number;
|
|
424
|
-
clientId: string;
|
|
425
|
-
isTwoFactorEnabled: boolean;
|
|
426
|
-
failedLoginAttempts: number;
|
|
427
|
-
lastLogin: string | null;
|
|
428
|
-
isActive: boolean;
|
|
429
|
-
isLocked: boolean;
|
|
430
|
-
emailVerified: boolean;
|
|
431
|
-
phoneVerified: boolean;
|
|
432
|
-
mustChangePassword: boolean;
|
|
433
|
-
passwordLastChanged: string | null;
|
|
434
|
-
passwordExpiresAt: string | null;
|
|
435
|
-
lastLoginIP: string | null;
|
|
436
|
-
lastLoginDevice: string | null;
|
|
437
|
-
lastActivityAt: string | null;
|
|
438
|
-
createdAt: string;
|
|
439
|
-
updatedAt: string | null;
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
interface UserAdminRequest {
|
|
443
|
-
username: string;
|
|
444
|
-
firstName: string;
|
|
445
|
-
lastName: string;
|
|
446
|
-
email: string;
|
|
447
|
-
phone: string;
|
|
448
|
-
areaCodeId: number;
|
|
449
|
-
birthday: string;
|
|
450
|
-
genderId: number;
|
|
451
|
-
roleId: number;
|
|
452
|
-
userTypeId: number;
|
|
453
|
-
}
|
|
454
|
-
|
|
455
|
-
interface UserAuthAdminRequest {
|
|
456
|
-
userId: number;
|
|
457
|
-
securityLevel: number;
|
|
458
|
-
clientId: string;
|
|
459
|
-
requireEmailConfirmation?: boolean;
|
|
460
|
-
}
|
|
461
|
-
|
|
462
|
-
interface ChangePasswordAdminRequest {
|
|
463
|
-
newPassword: string;
|
|
360
|
+
/**
|
|
361
|
+
* Request para crear o actualizar un género.
|
|
362
|
+
*/
|
|
363
|
+
interface GenderRequest {
|
|
364
|
+
gender: string;
|
|
365
|
+
key?: string;
|
|
464
366
|
}
|
|
465
|
-
|
|
466
|
-
|
|
367
|
+
/**
|
|
368
|
+
* Filtros disponibles para buscar géneros.
|
|
369
|
+
*/
|
|
370
|
+
interface GendersFilter {
|
|
371
|
+
/** Búsqueda general */
|
|
467
372
|
Search?: string;
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
LastName?: string;
|
|
471
|
-
Email?: string;
|
|
472
|
-
Phone?: string;
|
|
473
|
-
RoleId?: number;
|
|
474
|
-
UserTypeId?: number;
|
|
475
|
-
IsActive?: boolean;
|
|
373
|
+
/** Filtro por nombre del género (búsqueda parcial) */
|
|
374
|
+
Gender?: string;
|
|
476
375
|
}
|
|
477
|
-
|
|
478
|
-
interface UserAdminUpdateRequest {
|
|
479
|
-
username: string;
|
|
480
|
-
firstName: string;
|
|
481
|
-
lastName: string;
|
|
482
|
-
email: string;
|
|
483
|
-
phone: string;
|
|
484
|
-
areaCodeId: number;
|
|
485
|
-
birthday?: string;
|
|
376
|
+
interface GenderUserProfile {
|
|
486
377
|
genderId: number;
|
|
487
|
-
|
|
488
|
-
userTypeId: number;
|
|
489
|
-
}
|
|
490
|
-
|
|
491
|
-
interface UserAuthUpdateRequest {
|
|
492
|
-
securityLevel: number;
|
|
493
|
-
clientId: string;
|
|
494
|
-
isTwoFactorEnabled?: boolean;
|
|
495
|
-
emailVerified?: boolean;
|
|
496
|
-
phoneVerified?: boolean;
|
|
378
|
+
gender: string;
|
|
497
379
|
}
|
|
498
380
|
|
|
499
381
|
/**
|
|
500
|
-
* Interfaz que representa un
|
|
382
|
+
* Interfaz que representa un código de área del catálogo.
|
|
501
383
|
*/
|
|
502
|
-
interface
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
deleted: boolean;
|
|
384
|
+
interface AreaCode {
|
|
385
|
+
areaCodeId: number;
|
|
386
|
+
countryCode: string;
|
|
387
|
+
iso: string;
|
|
388
|
+
countryName: string;
|
|
389
|
+
isActive: boolean;
|
|
509
390
|
}
|
|
510
391
|
/**
|
|
511
|
-
* Request para crear o actualizar un
|
|
392
|
+
* Request para crear o actualizar un código de área.
|
|
512
393
|
*/
|
|
513
|
-
interface
|
|
514
|
-
|
|
515
|
-
|
|
394
|
+
interface AreaCodeRequest {
|
|
395
|
+
countryCode: string;
|
|
396
|
+
iso: string;
|
|
397
|
+
countryName: string;
|
|
398
|
+
isActive: boolean;
|
|
516
399
|
}
|
|
517
400
|
/**
|
|
518
|
-
* Filtros disponibles para buscar
|
|
401
|
+
* Filtros disponibles para buscar códigos de área.
|
|
519
402
|
*/
|
|
520
|
-
interface
|
|
403
|
+
interface AreaCodesFilter {
|
|
521
404
|
/** Búsqueda general */
|
|
522
405
|
Search?: string;
|
|
523
|
-
/** Filtro por
|
|
524
|
-
|
|
525
|
-
/** Filtro por
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
/**
|
|
530
|
-
* Interfaz que representa un rol del sistema.
|
|
531
|
-
*/
|
|
532
|
-
interface Role {
|
|
533
|
-
roleId: number;
|
|
534
|
-
userTypeId: number | null;
|
|
535
|
-
role: string;
|
|
536
|
-
description: string;
|
|
537
|
-
isActive: boolean;
|
|
538
|
-
createdAt: string;
|
|
539
|
-
updatedAt: string | null;
|
|
540
|
-
deleted: boolean;
|
|
541
|
-
}
|
|
542
|
-
/**
|
|
543
|
-
* Request para crear o actualizar un rol.
|
|
544
|
-
*/
|
|
545
|
-
interface RoleRequest {
|
|
546
|
-
userTypeId?: number;
|
|
547
|
-
role: string;
|
|
548
|
-
description: string;
|
|
549
|
-
isActive?: boolean;
|
|
550
|
-
}
|
|
551
|
-
/**
|
|
552
|
-
* Filtros disponibles para buscar roles.
|
|
553
|
-
*/
|
|
554
|
-
interface RolesFilter {
|
|
555
|
-
/** Búsqueda general */
|
|
556
|
-
Search?: string;
|
|
557
|
-
/** Filtro por nombre del rol (búsqueda parcial) */
|
|
558
|
-
Role?: string;
|
|
559
|
-
/** Filtro por descripción (búsqueda parcial) */
|
|
560
|
-
Description?: string;
|
|
406
|
+
/** Filtro por código de país (búsqueda parcial) */
|
|
407
|
+
CountryCode?: string;
|
|
408
|
+
/** Filtro por ISO (búsqueda parcial) */
|
|
409
|
+
ISO?: string;
|
|
410
|
+
/** Filtro por nombre de país (búsqueda parcial) */
|
|
411
|
+
CountryName?: string;
|
|
561
412
|
/** Filtro por estado activo/inactivo */
|
|
562
413
|
IsActive?: boolean;
|
|
563
414
|
}
|
|
415
|
+
interface AreaCodeUserProfile {
|
|
416
|
+
areaCodeId: number;
|
|
417
|
+
countryCode: string;
|
|
418
|
+
country: string;
|
|
419
|
+
}
|
|
564
420
|
|
|
565
421
|
/**
|
|
566
422
|
* Utilidad para construir query params a partir de objetos de filtro.
|
|
@@ -676,1736 +532,1302 @@ interface FilterGroup {
|
|
|
676
532
|
*/
|
|
677
533
|
type FilterGroupsModel = FilterGroup[];
|
|
678
534
|
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
interface UserDataUpdateRequest {
|
|
685
|
-
username: string;
|
|
686
|
-
firstName: string;
|
|
687
|
-
lastName: string;
|
|
688
|
-
phone: string;
|
|
689
|
-
birthday: string;
|
|
690
|
-
profilePhoto: string;
|
|
691
|
-
}
|
|
692
|
-
|
|
693
|
-
declare class UserService {
|
|
535
|
+
/**
|
|
536
|
+
* Servicio para gestionar catálogos públicos.
|
|
537
|
+
* No requiere autenticación.
|
|
538
|
+
*/
|
|
539
|
+
declare class CatalogService {
|
|
694
540
|
private api;
|
|
695
541
|
private readonly BASE_PATH;
|
|
696
542
|
constructor(api: API);
|
|
697
|
-
me(): Promise<ResponseModel<UserBasicResponse>>;
|
|
698
|
-
profile(): Promise<ResponseModel<UserProfileResponse>>;
|
|
699
|
-
changePasswordUser(request: ChangePasswordUserRequest): Promise<ResponseModel>;
|
|
700
|
-
updateUserData(request: UserDataUpdateRequest): Promise<ResponseModel>;
|
|
701
|
-
/**
|
|
702
|
-
* Crea un nuevo usuario administrador.
|
|
703
|
-
* @param request - Datos del nuevo administrador
|
|
704
|
-
*/
|
|
705
|
-
newAdminUser(request: UserAdminRequest): Promise<ResponseModel<AdminUser>>;
|
|
706
|
-
/**
|
|
707
|
-
* Crea la autenticación para un usuario.
|
|
708
|
-
* @param request - Datos de autenticación del usuario
|
|
709
|
-
*/
|
|
710
|
-
createUserAuthentication(request: UserAuthAdminRequest): Promise<ResponseModel<AdminAuthentication>>;
|
|
711
|
-
/**
|
|
712
|
-
* Cambia la contraseña de un administrador.
|
|
713
|
-
* @param id - ID del usuario
|
|
714
|
-
* @param request - Nueva contraseña
|
|
715
|
-
*/
|
|
716
|
-
changePasswordAdmin(id: number, request: ChangePasswordAdminRequest): Promise<ResponseModel>;
|
|
717
|
-
/**
|
|
718
|
-
* Obtiene todos los administradores con filtros opcionales.
|
|
719
|
-
* @param filter - Filtros opcionales para la búsqueda
|
|
720
|
-
*/
|
|
721
|
-
getAllAdmins(filter?: UserAdminFilter): Promise<ResponseModel<AdminUser[]>>;
|
|
722
|
-
/**
|
|
723
|
-
* Obtiene el modelo de filtros disponibles para administradores.
|
|
724
|
-
*/
|
|
725
|
-
getAdminFiltersModel(): Promise<ResponseModel<FilterGroupsModel>>;
|
|
726
|
-
/**
|
|
727
|
-
* Obtiene un administrador por su ID.
|
|
728
|
-
* @param id - ID del administrador
|
|
729
|
-
*/
|
|
730
|
-
getAdminById(id: number): Promise<ResponseModel<AdminUser>>;
|
|
731
|
-
/**
|
|
732
|
-
* Obtiene la autenticación de un administrador.
|
|
733
|
-
* @param id - ID del usuario
|
|
734
|
-
*/
|
|
735
|
-
getAdminAuthentication(id: number): Promise<ResponseModel<AdminAuthentication>>;
|
|
736
543
|
/**
|
|
737
|
-
*
|
|
738
|
-
* @param id - ID del administrador
|
|
739
|
-
* @param request - Nuevos datos del administrador
|
|
740
|
-
*/
|
|
741
|
-
updateAdmin(id: number, request: UserAdminUpdateRequest): Promise<ResponseModel<AdminUser>>;
|
|
742
|
-
/**
|
|
743
|
-
* Activa o desactiva un administrador.
|
|
744
|
-
* @param id - ID del administrador
|
|
745
|
-
*/
|
|
746
|
-
toggleAdminStatus(id: number): Promise<ResponseModel<AdminUser>>;
|
|
747
|
-
/**
|
|
748
|
-
* Actualiza la autenticación de un administrador.
|
|
749
|
-
* @param id - ID del usuario
|
|
750
|
-
* @param request - Nuevos datos de autenticación
|
|
751
|
-
*/
|
|
752
|
-
updateAdminAuthentication(id: number, request: UserAuthUpdateRequest): Promise<ResponseModel<AdminAuthentication>>;
|
|
753
|
-
/**
|
|
754
|
-
* Obtiene todos los tipos de usuario con filtros opcionales.
|
|
544
|
+
* Obtiene todos los géneros con filtros opcionales.
|
|
755
545
|
* @param filter - Filtros opcionales para la búsqueda
|
|
756
546
|
*/
|
|
757
|
-
|
|
547
|
+
getGenders(filter?: GendersFilter): Promise<ResponseModel<Gender[]>>;
|
|
758
548
|
/**
|
|
759
|
-
* Obtiene el modelo de filtros disponibles para
|
|
549
|
+
* Obtiene el modelo de filtros disponibles para géneros.
|
|
760
550
|
*/
|
|
761
|
-
|
|
551
|
+
getGendersFilters(): Promise<ResponseModel<FilterGroupsModel>>;
|
|
762
552
|
/**
|
|
763
|
-
* Obtiene un
|
|
764
|
-
* @param id - ID del
|
|
553
|
+
* Obtiene un género por su ID.
|
|
554
|
+
* @param id - ID del género
|
|
765
555
|
*/
|
|
766
|
-
|
|
556
|
+
getGenderById(id: number): Promise<ResponseModel<Gender>>;
|
|
767
557
|
/**
|
|
768
|
-
* Crea un nuevo
|
|
769
|
-
* @param request - Datos del
|
|
558
|
+
* Crea un nuevo género.
|
|
559
|
+
* @param request - Datos del género a crear
|
|
770
560
|
*/
|
|
771
|
-
|
|
561
|
+
createGender(request: GenderRequest): Promise<ResponseModel<Gender>>;
|
|
772
562
|
/**
|
|
773
|
-
* Actualiza un
|
|
774
|
-
* @param id - ID del
|
|
775
|
-
* @param request - Nuevos datos del
|
|
563
|
+
* Actualiza un género existente.
|
|
564
|
+
* @param id - ID del género a actualizar
|
|
565
|
+
* @param request - Nuevos datos del género
|
|
776
566
|
*/
|
|
777
|
-
|
|
567
|
+
updateGender(id: number, request: GenderRequest): Promise<ResponseModel<Gender>>;
|
|
778
568
|
/**
|
|
779
|
-
* Elimina un
|
|
780
|
-
* @param id - ID del
|
|
569
|
+
* Elimina un género.
|
|
570
|
+
* @param id - ID del género a eliminar
|
|
781
571
|
*/
|
|
782
|
-
|
|
572
|
+
deleteGender(id: number): Promise<ResponseModel<void>>;
|
|
783
573
|
/**
|
|
784
|
-
* Obtiene todos los
|
|
574
|
+
* Obtiene todos los códigos de área con filtros opcionales.
|
|
785
575
|
* @param filter - Filtros opcionales para la búsqueda
|
|
786
576
|
*/
|
|
787
|
-
|
|
788
|
-
/**
|
|
789
|
-
* Obtiene el modelo de filtros disponibles para roles.
|
|
790
|
-
*/
|
|
791
|
-
getRolesFilters(): Promise<ResponseModel<FilterGroupsModel>>;
|
|
577
|
+
getAreaCodes(filter?: AreaCodesFilter): Promise<ResponseModel<AreaCode[]>>;
|
|
792
578
|
/**
|
|
793
|
-
* Obtiene
|
|
794
|
-
* @param id - ID del rol
|
|
579
|
+
* Obtiene el modelo de filtros disponibles para códigos de área.
|
|
795
580
|
*/
|
|
796
|
-
|
|
581
|
+
getAreaCodesFilters(): Promise<ResponseModel<FilterGroupsModel>>;
|
|
797
582
|
/**
|
|
798
|
-
* Obtiene
|
|
799
|
-
* @param
|
|
583
|
+
* Obtiene un código de área por su ID.
|
|
584
|
+
* @param id - ID del código de área
|
|
800
585
|
*/
|
|
801
|
-
|
|
586
|
+
getAreaCodeById(id: number): Promise<ResponseModel<AreaCode>>;
|
|
802
587
|
/**
|
|
803
|
-
* Crea un nuevo
|
|
804
|
-
* @param request - Datos del
|
|
588
|
+
* Crea un nuevo código de área.
|
|
589
|
+
* @param request - Datos del código de área a crear
|
|
805
590
|
*/
|
|
806
|
-
|
|
591
|
+
createAreaCode(request: AreaCodeRequest): Promise<ResponseModel<AreaCode>>;
|
|
807
592
|
/**
|
|
808
|
-
* Actualiza un
|
|
809
|
-
* @param id - ID del
|
|
810
|
-
* @param request - Nuevos datos del
|
|
593
|
+
* Actualiza un código de área existente.
|
|
594
|
+
* @param id - ID del código de área a actualizar
|
|
595
|
+
* @param request - Nuevos datos del código de área
|
|
811
596
|
*/
|
|
812
|
-
|
|
597
|
+
updateAreaCode(id: number, request: AreaCodeRequest): Promise<ResponseModel<AreaCode>>;
|
|
813
598
|
/**
|
|
814
|
-
* Activa o desactiva un
|
|
815
|
-
* @param id - ID del
|
|
599
|
+
* Activa o desactiva un código de área.
|
|
600
|
+
* @param id - ID del código de área
|
|
816
601
|
*/
|
|
817
|
-
|
|
602
|
+
toggleAreaCodeStatus(id: number): Promise<ResponseModel<AreaCode>>;
|
|
818
603
|
/**
|
|
819
|
-
* Elimina un
|
|
820
|
-
* @param id - ID del
|
|
604
|
+
* Elimina un código de área.
|
|
605
|
+
* @param id - ID del código de área a eliminar
|
|
821
606
|
*/
|
|
822
|
-
|
|
607
|
+
deleteAreaCode(id: number): Promise<ResponseModel<void>>;
|
|
823
608
|
}
|
|
824
609
|
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
610
|
+
interface Location {
|
|
611
|
+
locationId: number;
|
|
612
|
+
locationName: string;
|
|
613
|
+
address1: string;
|
|
614
|
+
address2: string;
|
|
615
|
+
city: string;
|
|
616
|
+
state: string;
|
|
617
|
+
country: string;
|
|
618
|
+
postalCode: string;
|
|
619
|
+
contactName: string;
|
|
620
|
+
areaCodeId: number;
|
|
621
|
+
contactPhone: string;
|
|
622
|
+
contactEmail: string;
|
|
832
623
|
isActive: boolean;
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
624
|
+
isPhysical: boolean;
|
|
625
|
+
parentLocationId: number | null;
|
|
626
|
+
url: string;
|
|
627
|
+
apiKey: string;
|
|
836
628
|
}
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
629
|
+
interface LocationsRequest {
|
|
630
|
+
locationName: string;
|
|
631
|
+
address1: string;
|
|
632
|
+
address2?: string;
|
|
633
|
+
city: string;
|
|
634
|
+
state: string;
|
|
635
|
+
country: string;
|
|
636
|
+
postalCode: string;
|
|
637
|
+
contactName: string;
|
|
638
|
+
areaCodeId: number;
|
|
639
|
+
contactPhone: string;
|
|
640
|
+
contactEmail: string;
|
|
843
641
|
isActive?: boolean;
|
|
642
|
+
isPhysical: boolean;
|
|
643
|
+
parentLocationId?: number;
|
|
644
|
+
/** URL requerida cuando isPhysical = true */
|
|
645
|
+
url?: string;
|
|
646
|
+
/** ApiKey requerida cuando isPhysical = true. Se almacena cifrada (AES-256) en el servidor. */
|
|
647
|
+
apiKey?: string;
|
|
844
648
|
}
|
|
845
|
-
|
|
846
|
-
* Filtros disponibles para buscar módulos.
|
|
847
|
-
* Todos los campos son opcionales.
|
|
848
|
-
*/
|
|
849
|
-
interface ModulesFilter {
|
|
850
|
-
/** Búsqueda general (busca en Module y Description) */
|
|
649
|
+
interface LocationsFilter {
|
|
851
650
|
Search?: string;
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
/** Filtro por estado activo/inactivo */
|
|
651
|
+
LocationName?: string;
|
|
652
|
+
City?: string;
|
|
653
|
+
State?: string;
|
|
654
|
+
Country?: string;
|
|
857
655
|
IsActive?: boolean;
|
|
858
656
|
}
|
|
859
657
|
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
endpointId: number;
|
|
865
|
-
endpoint: string;
|
|
866
|
-
httpMethod: string;
|
|
867
|
-
path: string;
|
|
658
|
+
interface InventoryStatus {
|
|
659
|
+
inventoryStatusId: number;
|
|
660
|
+
inventoryStatus: string;
|
|
661
|
+
key: string;
|
|
868
662
|
description: string;
|
|
869
|
-
requiresAuth: boolean;
|
|
870
|
-
requiresPermission: boolean | null;
|
|
871
|
-
requiresSignature: boolean;
|
|
872
|
-
requiresHeader: boolean;
|
|
873
|
-
allowedOrigins: string;
|
|
874
|
-
isActive: boolean;
|
|
875
|
-
createdAt: string;
|
|
876
|
-
updatedAt: string | null;
|
|
877
|
-
deleted: boolean;
|
|
878
663
|
}
|
|
664
|
+
interface InventoryStatusRequest {
|
|
665
|
+
inventoryStatus: string;
|
|
666
|
+
key?: string;
|
|
667
|
+
description: string;
|
|
668
|
+
}
|
|
669
|
+
interface InventoryStatusesFilter {
|
|
670
|
+
Search?: string;
|
|
671
|
+
InventoryStatus?: string;
|
|
672
|
+
Description?: string;
|
|
673
|
+
}
|
|
674
|
+
|
|
879
675
|
/**
|
|
880
|
-
*
|
|
676
|
+
* Interfaz que representa un empaque del inventario.
|
|
881
677
|
*/
|
|
882
|
-
interface
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
678
|
+
interface Packing {
|
|
679
|
+
packingId: number;
|
|
680
|
+
packing: string;
|
|
681
|
+
key: string;
|
|
682
|
+
materialId: number;
|
|
683
|
+
length: number;
|
|
684
|
+
width: number;
|
|
685
|
+
height: number;
|
|
686
|
+
weightLimit: number | null;
|
|
687
|
+
cost: number;
|
|
688
|
+
providerId: number;
|
|
689
|
+
isActive: boolean;
|
|
893
690
|
}
|
|
894
691
|
/**
|
|
895
|
-
*
|
|
692
|
+
* Request para crear o actualizar un empaque.
|
|
896
693
|
*/
|
|
897
|
-
|
|
694
|
+
interface PackingRequest {
|
|
695
|
+
packing: string;
|
|
696
|
+
key?: string;
|
|
697
|
+
materialId: number;
|
|
698
|
+
length: number;
|
|
699
|
+
width: number;
|
|
700
|
+
height: number;
|
|
701
|
+
weightLimit?: number;
|
|
702
|
+
cost: number;
|
|
703
|
+
providerId: number;
|
|
704
|
+
isActive: boolean;
|
|
705
|
+
}
|
|
898
706
|
/**
|
|
899
|
-
* Filtros disponibles para buscar
|
|
900
|
-
* Todos los campos son opcionales.
|
|
707
|
+
* Filtros disponibles para buscar empaques.
|
|
901
708
|
*/
|
|
902
|
-
interface
|
|
903
|
-
/** Búsqueda general (busca en Endpoint, Path y Description) */
|
|
709
|
+
interface PackingsFilter {
|
|
904
710
|
Search?: string;
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
HttpMethod?: HttpMethodType;
|
|
909
|
-
/** Filtro por módulo (primer segmento del path, búsqueda parcial) */
|
|
910
|
-
Module?: string;
|
|
911
|
-
/** Filtro por path (búsqueda parcial) */
|
|
912
|
-
Path?: string;
|
|
913
|
-
/** Filtro por descripción (búsqueda parcial) */
|
|
914
|
-
Description?: string;
|
|
915
|
-
/** Filtro por endpoints que requieren autenticación */
|
|
916
|
-
RequiresAuth?: boolean;
|
|
917
|
-
/** Filtro por endpoints que requieren validación de permisos */
|
|
918
|
-
RequiresPermission?: boolean;
|
|
919
|
-
/** Filtro por endpoints que requieren firma */
|
|
920
|
-
RequiresSignature?: boolean;
|
|
921
|
-
/** Filtro por endpoints que requieren header específico */
|
|
922
|
-
RequiresHeader?: boolean;
|
|
923
|
-
/** Filtro por estado activo/inactivo */
|
|
711
|
+
Packing?: string;
|
|
712
|
+
MaterialId?: number;
|
|
713
|
+
ProviderId?: number;
|
|
924
714
|
IsActive?: boolean;
|
|
925
715
|
}
|
|
926
716
|
|
|
927
717
|
/**
|
|
928
|
-
* Interfaz que representa
|
|
718
|
+
* Interfaz que representa un material del inventario.
|
|
929
719
|
*/
|
|
930
|
-
interface
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
720
|
+
interface Material {
|
|
721
|
+
materialId: number;
|
|
722
|
+
material: string;
|
|
723
|
+
key: string;
|
|
934
724
|
description: string;
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
updatedAt: string | null;
|
|
938
|
-
deleted: boolean;
|
|
725
|
+
isRecyclable: boolean;
|
|
726
|
+
isFragile: boolean;
|
|
939
727
|
}
|
|
940
728
|
/**
|
|
941
|
-
* Request para crear o actualizar
|
|
729
|
+
* Request para crear o actualizar un material.
|
|
942
730
|
*/
|
|
943
|
-
interface
|
|
944
|
-
|
|
945
|
-
path: string;
|
|
731
|
+
interface MaterialRequest {
|
|
732
|
+
material: string;
|
|
946
733
|
description: string;
|
|
947
|
-
|
|
734
|
+
key?: string;
|
|
735
|
+
isRecyclable: boolean;
|
|
736
|
+
isFragile: boolean;
|
|
948
737
|
}
|
|
949
738
|
/**
|
|
950
|
-
* Filtros disponibles para buscar
|
|
951
|
-
* Todos los campos son opcionales.
|
|
739
|
+
* Filtros disponibles para buscar materiales.
|
|
952
740
|
*/
|
|
953
|
-
interface
|
|
954
|
-
/** Búsqueda general (busca en UIRoute, Path y Description) */
|
|
741
|
+
interface MaterialsFilter {
|
|
955
742
|
Search?: string;
|
|
956
|
-
|
|
957
|
-
UIRoute?: string;
|
|
958
|
-
/** Filtro por path (búsqueda parcial) */
|
|
959
|
-
Path?: string;
|
|
960
|
-
/** Filtro por descripción (búsqueda parcial) */
|
|
743
|
+
Material?: string;
|
|
961
744
|
Description?: string;
|
|
962
|
-
|
|
745
|
+
IsRecyclable?: boolean;
|
|
746
|
+
IsFragile?: boolean;
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
/**
|
|
750
|
+
* Interfaz que representa un proveedor del inventario.
|
|
751
|
+
*/
|
|
752
|
+
interface Provider {
|
|
753
|
+
providerId: number;
|
|
754
|
+
provider: string;
|
|
755
|
+
contactName: string;
|
|
756
|
+
areaCodeId: number;
|
|
757
|
+
contactNumber: string;
|
|
758
|
+
contactEmail: string;
|
|
759
|
+
isActive: boolean;
|
|
760
|
+
}
|
|
761
|
+
/**
|
|
762
|
+
* Request para crear o actualizar un proveedor.
|
|
763
|
+
*/
|
|
764
|
+
interface ProviderRequest {
|
|
765
|
+
provider: string;
|
|
766
|
+
contactName: string;
|
|
767
|
+
areaCodeId: number;
|
|
768
|
+
contactNumber: string;
|
|
769
|
+
contactEmail: string;
|
|
770
|
+
isActive: boolean;
|
|
771
|
+
}
|
|
772
|
+
/**
|
|
773
|
+
* Filtros disponibles para buscar proveedores.
|
|
774
|
+
*/
|
|
775
|
+
interface ProvidersFilter {
|
|
776
|
+
Search?: string;
|
|
777
|
+
Provider?: string;
|
|
963
778
|
IsActive?: boolean;
|
|
964
779
|
}
|
|
965
780
|
|
|
966
781
|
/**
|
|
967
|
-
* Servicio para gestionar
|
|
782
|
+
* Servicio para gestionar inventario: ubicaciones, estatus, empaques y materiales.
|
|
968
783
|
*/
|
|
969
|
-
declare class
|
|
784
|
+
declare class InventoryService {
|
|
970
785
|
private api;
|
|
971
786
|
private readonly BASE_PATH;
|
|
972
787
|
constructor(api: API);
|
|
973
788
|
/**
|
|
974
|
-
* Obtiene
|
|
789
|
+
* Obtiene todas las ubicaciones con filtros opcionales.
|
|
975
790
|
* @param filter - Filtros opcionales para la búsqueda
|
|
976
791
|
*/
|
|
977
|
-
|
|
792
|
+
getLocations(filter?: LocationsFilter): Promise<ResponseModel<Location[]>>;
|
|
978
793
|
/**
|
|
979
|
-
* Obtiene el modelo de filtros disponibles para
|
|
794
|
+
* Obtiene el modelo de filtros disponibles para ubicaciones.
|
|
980
795
|
*/
|
|
981
|
-
|
|
796
|
+
getLocationFiltersModel(): Promise<ResponseModel<FilterGroupsModel>>;
|
|
982
797
|
/**
|
|
983
|
-
* Obtiene
|
|
984
|
-
* @param id - ID
|
|
798
|
+
* Obtiene una ubicación por su ID.
|
|
799
|
+
* @param id - ID de la ubicación
|
|
985
800
|
*/
|
|
986
|
-
|
|
801
|
+
getLocationById(id: number): Promise<ResponseModel<Location>>;
|
|
987
802
|
/**
|
|
988
|
-
* Crea
|
|
989
|
-
* @param request - Datos
|
|
803
|
+
* Crea una nueva ubicación.
|
|
804
|
+
* @param request - Datos de la ubicación a crear
|
|
990
805
|
*/
|
|
991
|
-
|
|
806
|
+
createLocation(request: LocationsRequest): Promise<ResponseModel<Location>>;
|
|
992
807
|
/**
|
|
993
|
-
* Actualiza
|
|
994
|
-
* @param id - ID
|
|
995
|
-
* @param request - Nuevos datos
|
|
808
|
+
* Actualiza una ubicación existente.
|
|
809
|
+
* @param id - ID de la ubicación a actualizar
|
|
810
|
+
* @param request - Nuevos datos de la ubicación
|
|
996
811
|
*/
|
|
997
|
-
|
|
812
|
+
updateLocation(id: number, request: LocationsRequest): Promise<ResponseModel<Location>>;
|
|
998
813
|
/**
|
|
999
|
-
* Activa o desactiva
|
|
1000
|
-
* @param id - ID
|
|
814
|
+
* Activa o desactiva una ubicación.
|
|
815
|
+
* @param id - ID de la ubicación
|
|
1001
816
|
*/
|
|
1002
|
-
|
|
817
|
+
toggleLocationStatus(id: number): Promise<ResponseModel<Location>>;
|
|
1003
818
|
/**
|
|
1004
|
-
* Elimina
|
|
1005
|
-
* @param id - ID
|
|
819
|
+
* Elimina una ubicación.
|
|
820
|
+
* @param id - ID de la ubicación a eliminar
|
|
1006
821
|
*/
|
|
1007
|
-
|
|
822
|
+
deleteLocation(id: number): Promise<ResponseModel<void>>;
|
|
1008
823
|
/**
|
|
1009
|
-
* Obtiene todos los
|
|
824
|
+
* Obtiene todos los estatus de inventario con filtros opcionales.
|
|
1010
825
|
* @param filter - Filtros opcionales para la búsqueda
|
|
1011
826
|
*/
|
|
1012
|
-
|
|
827
|
+
getStatuses(filter?: InventoryStatusesFilter): Promise<ResponseModel<InventoryStatus[]>>;
|
|
1013
828
|
/**
|
|
1014
|
-
* Obtiene el modelo de filtros disponibles para
|
|
829
|
+
* Obtiene el modelo de filtros disponibles para estatus de inventario.
|
|
1015
830
|
*/
|
|
1016
|
-
|
|
831
|
+
getStatusFiltersModel(): Promise<ResponseModel<FilterGroupsModel>>;
|
|
1017
832
|
/**
|
|
1018
|
-
* Obtiene
|
|
833
|
+
* Obtiene un estatus de inventario por su ID.
|
|
834
|
+
* @param id - ID del estatus
|
|
1019
835
|
*/
|
|
1020
|
-
|
|
836
|
+
getStatusById(id: number): Promise<ResponseModel<InventoryStatus>>;
|
|
1021
837
|
/**
|
|
1022
|
-
*
|
|
1023
|
-
* @param
|
|
838
|
+
* Crea un nuevo estatus de inventario.
|
|
839
|
+
* @param request - Datos del estatus a crear
|
|
1024
840
|
*/
|
|
1025
|
-
|
|
841
|
+
createStatus(request: InventoryStatusRequest): Promise<ResponseModel<InventoryStatus>>;
|
|
1026
842
|
/**
|
|
1027
|
-
*
|
|
1028
|
-
* @param
|
|
843
|
+
* Actualiza un estatus de inventario existente.
|
|
844
|
+
* @param id - ID del estatus a actualizar
|
|
845
|
+
* @param request - Nuevos datos del estatus
|
|
1029
846
|
*/
|
|
1030
|
-
|
|
847
|
+
updateStatus(id: number, request: InventoryStatusRequest): Promise<ResponseModel<InventoryStatus>>;
|
|
1031
848
|
/**
|
|
1032
|
-
*
|
|
1033
|
-
* @param id - ID del
|
|
1034
|
-
* @param request - Nuevos datos del endpoint
|
|
849
|
+
* Elimina un estatus de inventario.
|
|
850
|
+
* @param id - ID del estatus a eliminar
|
|
1035
851
|
*/
|
|
1036
|
-
|
|
852
|
+
deleteStatus(id: number): Promise<ResponseModel<void>>;
|
|
1037
853
|
/**
|
|
1038
|
-
*
|
|
1039
|
-
* @param
|
|
854
|
+
* Obtiene todos los empaques con filtros opcionales.
|
|
855
|
+
* @param filter - Filtros opcionales para la búsqueda
|
|
1040
856
|
*/
|
|
1041
|
-
|
|
857
|
+
getPackings(filter?: PackingsFilter): Promise<ResponseModel<Packing[]>>;
|
|
1042
858
|
/**
|
|
1043
|
-
*
|
|
1044
|
-
* @param id - ID del endpoint a eliminar
|
|
859
|
+
* Obtiene el modelo de filtros disponibles para empaques.
|
|
1045
860
|
*/
|
|
1046
|
-
|
|
861
|
+
getPackingFiltersModel(): Promise<ResponseModel<FilterGroupsModel>>;
|
|
1047
862
|
/**
|
|
1048
|
-
* Obtiene
|
|
1049
|
-
* @param
|
|
863
|
+
* Obtiene un empaque por su ID.
|
|
864
|
+
* @param id - ID del empaque
|
|
1050
865
|
*/
|
|
1051
|
-
|
|
866
|
+
getPackingById(id: number): Promise<ResponseModel<Packing>>;
|
|
1052
867
|
/**
|
|
1053
|
-
*
|
|
868
|
+
* Crea un nuevo empaque.
|
|
869
|
+
* @param request - Datos del empaque a crear
|
|
1054
870
|
*/
|
|
1055
|
-
|
|
871
|
+
createPacking(request: PackingRequest): Promise<ResponseModel<Packing>>;
|
|
1056
872
|
/**
|
|
1057
|
-
*
|
|
1058
|
-
* @param id - ID
|
|
873
|
+
* Actualiza un empaque existente.
|
|
874
|
+
* @param id - ID del empaque a actualizar
|
|
875
|
+
* @param request - Nuevos datos del empaque
|
|
1059
876
|
*/
|
|
1060
|
-
|
|
877
|
+
updatePacking(id: number, request: PackingRequest): Promise<ResponseModel<Packing>>;
|
|
1061
878
|
/**
|
|
1062
|
-
*
|
|
1063
|
-
* @param
|
|
879
|
+
* Activa o desactiva un empaque.
|
|
880
|
+
* @param id - ID del empaque
|
|
1064
881
|
*/
|
|
1065
|
-
|
|
882
|
+
togglePackingStatus(id: number): Promise<ResponseModel<Packing>>;
|
|
1066
883
|
/**
|
|
1067
|
-
*
|
|
1068
|
-
* @param id - ID
|
|
1069
|
-
* @param request - Nuevos datos de la ruta
|
|
884
|
+
* Elimina un empaque.
|
|
885
|
+
* @param id - ID del empaque a eliminar
|
|
1070
886
|
*/
|
|
1071
|
-
|
|
887
|
+
deletePacking(id: number): Promise<ResponseModel<void>>;
|
|
1072
888
|
/**
|
|
1073
|
-
*
|
|
1074
|
-
* @param
|
|
889
|
+
* Obtiene todos los materiales con filtros opcionales.
|
|
890
|
+
* @param filter - Filtros opcionales para la búsqueda
|
|
1075
891
|
*/
|
|
1076
|
-
|
|
892
|
+
getMaterials(filter?: MaterialsFilter): Promise<ResponseModel<Material[]>>;
|
|
1077
893
|
/**
|
|
1078
|
-
*
|
|
1079
|
-
* @param id - ID de la ruta a eliminar
|
|
894
|
+
* Obtiene el modelo de filtros disponibles para materiales.
|
|
1080
895
|
*/
|
|
1081
|
-
|
|
896
|
+
getMaterialFiltersModel(): Promise<ResponseModel<FilterGroupsModel>>;
|
|
897
|
+
/**
|
|
898
|
+
* Obtiene un material por su ID.
|
|
899
|
+
* @param id - ID del material
|
|
900
|
+
*/
|
|
901
|
+
getMaterialById(id: number): Promise<ResponseModel<Material>>;
|
|
902
|
+
/**
|
|
903
|
+
* Crea un nuevo material.
|
|
904
|
+
* @param request - Datos del material a crear
|
|
905
|
+
*/
|
|
906
|
+
createMaterial(request: MaterialRequest): Promise<ResponseModel<Material>>;
|
|
907
|
+
/**
|
|
908
|
+
* Actualiza un material existente.
|
|
909
|
+
* @param id - ID del material a actualizar
|
|
910
|
+
* @param request - Nuevos datos del material
|
|
911
|
+
*/
|
|
912
|
+
updateMaterial(id: number, request: MaterialRequest): Promise<ResponseModel<Material>>;
|
|
913
|
+
/**
|
|
914
|
+
* Elimina un material.
|
|
915
|
+
* @param id - ID del material a eliminar
|
|
916
|
+
*/
|
|
917
|
+
deleteMaterial(id: number): Promise<ResponseModel<void>>;
|
|
918
|
+
/**
|
|
919
|
+
* Obtiene todos los proveedores con filtros opcionales.
|
|
920
|
+
* @param filter - Filtros opcionales para la búsqueda
|
|
921
|
+
*/
|
|
922
|
+
getProviders(filter?: ProvidersFilter): Promise<ResponseModel<Provider[]>>;
|
|
923
|
+
/**
|
|
924
|
+
* Obtiene el modelo de filtros disponibles para proveedores.
|
|
925
|
+
*/
|
|
926
|
+
getProviderFiltersModel(): Promise<ResponseModel<FilterGroupsModel>>;
|
|
927
|
+
/**
|
|
928
|
+
* Obtiene un proveedor por su ID.
|
|
929
|
+
* @param id - ID del proveedor
|
|
930
|
+
*/
|
|
931
|
+
getProviderById(id: number): Promise<ResponseModel<Provider>>;
|
|
932
|
+
/**
|
|
933
|
+
* Crea un nuevo proveedor.
|
|
934
|
+
* @param request - Datos del proveedor a crear
|
|
935
|
+
*/
|
|
936
|
+
createProvider(request: ProviderRequest): Promise<ResponseModel<Provider>>;
|
|
937
|
+
/**
|
|
938
|
+
* Actualiza un proveedor existente.
|
|
939
|
+
* @param id - ID del proveedor a actualizar
|
|
940
|
+
* @param request - Nuevos datos del proveedor
|
|
941
|
+
*/
|
|
942
|
+
updateProvider(id: number, request: ProviderRequest): Promise<ResponseModel<Provider>>;
|
|
943
|
+
/**
|
|
944
|
+
* Activa o desactiva un proveedor.
|
|
945
|
+
* @param id - ID del proveedor
|
|
946
|
+
*/
|
|
947
|
+
toggleProviderStatus(id: number): Promise<ResponseModel<Provider>>;
|
|
948
|
+
/**
|
|
949
|
+
* Elimina un proveedor.
|
|
950
|
+
* @param id - ID del proveedor a eliminar
|
|
951
|
+
*/
|
|
952
|
+
deleteProvider(id: number): Promise<ResponseModel<void>>;
|
|
1082
953
|
}
|
|
1083
954
|
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
areaCodeId: number;
|
|
1095
|
-
contactPhone: string;
|
|
1096
|
-
contactEmail: string;
|
|
1097
|
-
isActive: boolean | null;
|
|
1098
|
-
createdAt: string | null;
|
|
1099
|
-
updatedAt: string | null;
|
|
1100
|
-
deleted: boolean | null;
|
|
955
|
+
/**
|
|
956
|
+
* Interfaz que representa un color.
|
|
957
|
+
*/
|
|
958
|
+
interface Color {
|
|
959
|
+
colorId: number;
|
|
960
|
+
color: string;
|
|
961
|
+
key: string;
|
|
962
|
+
createdAt: string;
|
|
963
|
+
updatedAt?: string;
|
|
964
|
+
deleted: boolean;
|
|
1101
965
|
}
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
country: string;
|
|
1109
|
-
postalCode: string;
|
|
1110
|
-
contactName: string;
|
|
1111
|
-
areaCodeId: number;
|
|
1112
|
-
contactPhone: string;
|
|
1113
|
-
contactEmail: string;
|
|
1114
|
-
isActive?: boolean;
|
|
966
|
+
/**
|
|
967
|
+
* Request para crear o actualizar un color.
|
|
968
|
+
*/
|
|
969
|
+
interface ColorRequest {
|
|
970
|
+
color: string;
|
|
971
|
+
key: string;
|
|
1115
972
|
}
|
|
1116
|
-
|
|
973
|
+
/**
|
|
974
|
+
* Filtros disponibles para buscar colores.
|
|
975
|
+
*/
|
|
976
|
+
interface ColorsFilter {
|
|
1117
977
|
Search?: string;
|
|
1118
|
-
|
|
1119
|
-
City?: string;
|
|
1120
|
-
State?: string;
|
|
1121
|
-
Country?: string;
|
|
1122
|
-
IsActive?: boolean;
|
|
978
|
+
Color?: string;
|
|
1123
979
|
}
|
|
1124
980
|
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
981
|
+
/**
|
|
982
|
+
* Interfaz que representa un grupo de tallas.
|
|
983
|
+
*/
|
|
984
|
+
interface SizeGroup {
|
|
985
|
+
sizeGroupId: number;
|
|
986
|
+
sizeGroup: string;
|
|
987
|
+
key: string;
|
|
1128
988
|
description: string;
|
|
1129
|
-
createdAt: string
|
|
1130
|
-
updatedAt
|
|
1131
|
-
deleted: boolean
|
|
989
|
+
createdAt: string;
|
|
990
|
+
updatedAt?: string;
|
|
991
|
+
deleted: boolean;
|
|
1132
992
|
}
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
993
|
+
/**
|
|
994
|
+
* Request para crear o actualizar un grupo de tallas.
|
|
995
|
+
*/
|
|
996
|
+
interface SizeGroupRequest {
|
|
997
|
+
sizeGroup: string;
|
|
998
|
+
key: string;
|
|
1136
999
|
description: string;
|
|
1137
|
-
createdAt?: string;
|
|
1138
|
-
updatedAt?: string;
|
|
1139
|
-
deleted?: boolean;
|
|
1140
1000
|
}
|
|
1141
|
-
|
|
1001
|
+
/**
|
|
1002
|
+
* Filtros disponibles para buscar grupos de tallas.
|
|
1003
|
+
*/
|
|
1004
|
+
interface SizeGroupsFilter {
|
|
1142
1005
|
Search?: string;
|
|
1143
|
-
|
|
1006
|
+
SizeGroup?: string;
|
|
1144
1007
|
Description?: string;
|
|
1145
1008
|
}
|
|
1146
1009
|
|
|
1147
1010
|
/**
|
|
1148
|
-
* Interfaz que representa
|
|
1011
|
+
* Interfaz que representa una talla.
|
|
1149
1012
|
*/
|
|
1150
|
-
interface
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
createdAt: string | null;
|
|
1162
|
-
updatedAt: string | null;
|
|
1163
|
-
deleted: boolean | null;
|
|
1013
|
+
interface Size {
|
|
1014
|
+
sizeId: number;
|
|
1015
|
+
size: string;
|
|
1016
|
+
iso: string;
|
|
1017
|
+
width: string;
|
|
1018
|
+
length: string;
|
|
1019
|
+
sizeGroupId: number;
|
|
1020
|
+
createdAt: string;
|
|
1021
|
+
updatedAt?: string;
|
|
1022
|
+
deleted: boolean;
|
|
1023
|
+
sizeGroup?: SizeGroup;
|
|
1164
1024
|
}
|
|
1165
1025
|
/**
|
|
1166
|
-
* Request para crear o actualizar
|
|
1026
|
+
* Request para crear o actualizar una talla.
|
|
1167
1027
|
*/
|
|
1168
|
-
interface
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
weightLimit?: number;
|
|
1175
|
-
cost?: number;
|
|
1176
|
-
providerId?: number;
|
|
1028
|
+
interface SizeRequest {
|
|
1029
|
+
size: string;
|
|
1030
|
+
iso: string;
|
|
1031
|
+
width: string;
|
|
1032
|
+
length: string;
|
|
1033
|
+
sizeGroupId: number;
|
|
1177
1034
|
}
|
|
1178
1035
|
/**
|
|
1179
|
-
* Filtros disponibles para buscar
|
|
1036
|
+
* Filtros disponibles para buscar tallas.
|
|
1180
1037
|
*/
|
|
1181
|
-
interface
|
|
1038
|
+
interface SizesFilter {
|
|
1182
1039
|
Search?: string;
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
ProviderId?: number;
|
|
1186
|
-
IsActive?: boolean;
|
|
1040
|
+
Size?: string;
|
|
1041
|
+
SizeGroupId?: number;
|
|
1187
1042
|
}
|
|
1188
1043
|
|
|
1189
1044
|
/**
|
|
1190
|
-
* Interfaz que representa un
|
|
1045
|
+
* Interfaz que representa un Blank en el catálogo de productos.
|
|
1191
1046
|
*/
|
|
1192
|
-
interface
|
|
1047
|
+
interface Blank {
|
|
1048
|
+
blankId: number;
|
|
1049
|
+
blank: string;
|
|
1050
|
+
sku: string;
|
|
1051
|
+
cost: number;
|
|
1052
|
+
isActive: boolean;
|
|
1053
|
+
colorId: number;
|
|
1054
|
+
providerId: number;
|
|
1193
1055
|
materialId: number;
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1056
|
+
sizeId: number;
|
|
1057
|
+
createdAt: string;
|
|
1058
|
+
updatedAt?: string;
|
|
1059
|
+
deleted: boolean;
|
|
1060
|
+
color?: Color;
|
|
1061
|
+
size?: Size;
|
|
1062
|
+
provider?: Provider;
|
|
1063
|
+
material?: Material;
|
|
1201
1064
|
}
|
|
1202
1065
|
/**
|
|
1203
|
-
* Request para crear o actualizar un
|
|
1066
|
+
* Request para crear o actualizar un Blank.
|
|
1204
1067
|
*/
|
|
1205
|
-
interface
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1068
|
+
interface BlankRequest {
|
|
1069
|
+
blank: string;
|
|
1070
|
+
sku: string;
|
|
1071
|
+
cost: number;
|
|
1072
|
+
colorId: number;
|
|
1073
|
+
providerId: number;
|
|
1074
|
+
materialId: number;
|
|
1075
|
+
sizeId: number;
|
|
1076
|
+
isActive: boolean;
|
|
1210
1077
|
}
|
|
1211
1078
|
/**
|
|
1212
|
-
* Filtros disponibles para buscar
|
|
1079
|
+
* Filtros disponibles para buscar Blanks.
|
|
1213
1080
|
*/
|
|
1214
|
-
interface
|
|
1081
|
+
interface BlanksFilter {
|
|
1215
1082
|
Search?: string;
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1083
|
+
SKU?: string;
|
|
1084
|
+
Provider: string;
|
|
1085
|
+
Material: string;
|
|
1086
|
+
Size: string;
|
|
1087
|
+
IsActive?: boolean;
|
|
1220
1088
|
}
|
|
1221
1089
|
|
|
1222
1090
|
/**
|
|
1223
|
-
* Servicio para gestionar
|
|
1091
|
+
* Servicio para gestionar entidades relacionadas a Productos (Blanks, Colors, Sizes, SizeGroups, etc.)
|
|
1224
1092
|
*/
|
|
1225
|
-
declare class
|
|
1093
|
+
declare class ProductService {
|
|
1226
1094
|
private api;
|
|
1227
1095
|
private readonly BASE_PATH;
|
|
1228
1096
|
constructor(api: API);
|
|
1229
1097
|
/**
|
|
1230
|
-
* Obtiene
|
|
1231
|
-
* @param filter - Filtros opcionales para la búsqueda
|
|
1098
|
+
* Obtiene todos los colores con filtros opcionales.
|
|
1232
1099
|
*/
|
|
1233
|
-
|
|
1100
|
+
getColors(filter?: ColorsFilter): Promise<ResponseModel<Color[]>>;
|
|
1234
1101
|
/**
|
|
1235
|
-
* Obtiene el modelo de filtros disponibles para
|
|
1102
|
+
* Obtiene el modelo de filtros disponibles para colores.
|
|
1236
1103
|
*/
|
|
1237
|
-
|
|
1104
|
+
getColorsFilters(): Promise<ResponseModel<FilterGroupsModel>>;
|
|
1238
1105
|
/**
|
|
1239
|
-
* Obtiene
|
|
1240
|
-
* @param id - ID de la ubicación
|
|
1106
|
+
* Obtiene un color por su ID.
|
|
1241
1107
|
*/
|
|
1242
|
-
|
|
1108
|
+
getColorById(id: number): Promise<ResponseModel<Color>>;
|
|
1243
1109
|
/**
|
|
1244
|
-
* Crea
|
|
1245
|
-
* @param request - Datos de la ubicación a crear
|
|
1110
|
+
* Crea un nuevo color.
|
|
1246
1111
|
*/
|
|
1247
|
-
|
|
1112
|
+
createColor(request: ColorRequest): Promise<ResponseModel<Color>>;
|
|
1248
1113
|
/**
|
|
1249
|
-
* Actualiza
|
|
1250
|
-
* @param id - ID de la ubicación a actualizar
|
|
1251
|
-
* @param request - Nuevos datos de la ubicación
|
|
1114
|
+
* Actualiza un color existente.
|
|
1252
1115
|
*/
|
|
1253
|
-
|
|
1116
|
+
updateColor(id: number, request: ColorRequest): Promise<ResponseModel<Color>>;
|
|
1254
1117
|
/**
|
|
1255
|
-
*
|
|
1256
|
-
* @param id - ID de la ubicación
|
|
1118
|
+
* Elimina un color.
|
|
1257
1119
|
*/
|
|
1258
|
-
|
|
1120
|
+
deleteColor(id: number): Promise<ResponseModel<void>>;
|
|
1259
1121
|
/**
|
|
1260
|
-
*
|
|
1261
|
-
* @param id - ID de la ubicación a eliminar
|
|
1122
|
+
* Obtiene todos los grupos de tallas con filtros opcionales.
|
|
1262
1123
|
*/
|
|
1263
|
-
|
|
1124
|
+
getSizeGroups(filter?: SizeGroupsFilter): Promise<ResponseModel<SizeGroup[]>>;
|
|
1264
1125
|
/**
|
|
1265
|
-
* Obtiene
|
|
1266
|
-
* @param filter - Filtros opcionales para la búsqueda
|
|
1126
|
+
* Obtiene el modelo de filtros disponibles para grupos de tallas.
|
|
1267
1127
|
*/
|
|
1268
|
-
|
|
1128
|
+
getSizeGroupsFilters(): Promise<ResponseModel<FilterGroupsModel>>;
|
|
1269
1129
|
/**
|
|
1270
|
-
* Obtiene
|
|
1130
|
+
* Obtiene un grupo de tallas por su ID.
|
|
1271
1131
|
*/
|
|
1272
|
-
|
|
1273
|
-
/**
|
|
1274
|
-
* Obtiene un estatus de inventario por su ID.
|
|
1275
|
-
* @param id - ID del estatus
|
|
1276
|
-
*/
|
|
1277
|
-
getStatusById(id: number): Promise<ResponseModel<InventoryStatus>>;
|
|
1132
|
+
getSizeGroupById(id: number): Promise<ResponseModel<SizeGroup>>;
|
|
1278
1133
|
/**
|
|
1279
|
-
* Crea un nuevo
|
|
1280
|
-
* @param request - Datos del estatus a crear
|
|
1134
|
+
* Crea un nuevo grupo de tallas.
|
|
1281
1135
|
*/
|
|
1282
|
-
|
|
1136
|
+
createSizeGroup(request: SizeGroupRequest): Promise<ResponseModel<SizeGroup>>;
|
|
1283
1137
|
/**
|
|
1284
|
-
* Actualiza un
|
|
1285
|
-
* @param id - ID del estatus a actualizar
|
|
1286
|
-
* @param request - Nuevos datos del estatus
|
|
1138
|
+
* Actualiza un grupo de tallas existente.
|
|
1287
1139
|
*/
|
|
1288
|
-
|
|
1140
|
+
updateSizeGroup(id: number, request: SizeGroupRequest): Promise<ResponseModel<SizeGroup>>;
|
|
1289
1141
|
/**
|
|
1290
|
-
*
|
|
1291
|
-
* @param id - ID del estatus
|
|
1142
|
+
* Elimina un grupo de tallas.
|
|
1292
1143
|
*/
|
|
1293
|
-
|
|
1144
|
+
deleteSizeGroup(id: number): Promise<ResponseModel<void>>;
|
|
1294
1145
|
/**
|
|
1295
|
-
*
|
|
1296
|
-
* @param id - ID del estatus a eliminar
|
|
1146
|
+
* Obtiene todas las tallas con filtros opcionales.
|
|
1297
1147
|
*/
|
|
1298
|
-
|
|
1148
|
+
getSizes(filter?: SizesFilter): Promise<ResponseModel<Size[]>>;
|
|
1299
1149
|
/**
|
|
1300
|
-
* Obtiene
|
|
1301
|
-
* @param filter - Filtros opcionales para la búsqueda
|
|
1150
|
+
* Obtiene el modelo de filtros disponibles para tallas.
|
|
1302
1151
|
*/
|
|
1303
|
-
|
|
1152
|
+
getSizesFilters(): Promise<ResponseModel<FilterGroupsModel>>;
|
|
1304
1153
|
/**
|
|
1305
|
-
* Obtiene
|
|
1154
|
+
* Obtiene una talla por su ID.
|
|
1306
1155
|
*/
|
|
1307
|
-
|
|
1156
|
+
getSizeById(id: number): Promise<ResponseModel<Size>>;
|
|
1308
1157
|
/**
|
|
1309
|
-
*
|
|
1310
|
-
* @param id - ID del empaque
|
|
1158
|
+
* Crea una nueva talla.
|
|
1311
1159
|
*/
|
|
1312
|
-
|
|
1160
|
+
createSize(request: SizeRequest): Promise<ResponseModel<Size>>;
|
|
1313
1161
|
/**
|
|
1314
|
-
*
|
|
1315
|
-
* @param request - Datos del empaque a crear
|
|
1162
|
+
* Actualiza una talla existente.
|
|
1316
1163
|
*/
|
|
1317
|
-
|
|
1164
|
+
updateSize(id: number, request: SizeRequest): Promise<ResponseModel<Size>>;
|
|
1318
1165
|
/**
|
|
1319
|
-
*
|
|
1320
|
-
* @param id - ID del empaque a actualizar
|
|
1321
|
-
* @param request - Nuevos datos del empaque
|
|
1166
|
+
* Elimina una talla.
|
|
1322
1167
|
*/
|
|
1323
|
-
|
|
1168
|
+
deleteSize(id: number): Promise<ResponseModel<void>>;
|
|
1324
1169
|
/**
|
|
1325
|
-
*
|
|
1326
|
-
* @param id - ID del empaque a eliminar
|
|
1170
|
+
* Obtiene todos los blanks con filtros opcionales.
|
|
1327
1171
|
*/
|
|
1328
|
-
|
|
1172
|
+
getBlanks(filter?: BlanksFilter): Promise<ResponseModel<Blank[]>>;
|
|
1329
1173
|
/**
|
|
1330
|
-
* Obtiene
|
|
1331
|
-
* @param filter - Filtros opcionales para la búsqueda
|
|
1174
|
+
* Obtiene el modelo de filtros disponibles para blanks.
|
|
1332
1175
|
*/
|
|
1333
|
-
|
|
1176
|
+
getBlanksFilters(): Promise<ResponseModel<FilterGroupsModel>>;
|
|
1334
1177
|
/**
|
|
1335
|
-
* Obtiene
|
|
1178
|
+
* Obtiene un blank por su ID.
|
|
1336
1179
|
*/
|
|
1337
|
-
|
|
1180
|
+
getBlankById(id: number): Promise<ResponseModel<Blank>>;
|
|
1338
1181
|
/**
|
|
1339
|
-
*
|
|
1340
|
-
* @param id - ID del material
|
|
1182
|
+
* Crea un nuevo blank.
|
|
1341
1183
|
*/
|
|
1342
|
-
|
|
1184
|
+
createBlank(request: BlankRequest): Promise<ResponseModel<Blank>>;
|
|
1343
1185
|
/**
|
|
1344
|
-
*
|
|
1345
|
-
* @param request - Datos del material a crear
|
|
1186
|
+
* Actualiza un blank existente.
|
|
1346
1187
|
*/
|
|
1347
|
-
|
|
1188
|
+
updateBlank(id: number, request: BlankRequest): Promise<ResponseModel<Blank>>;
|
|
1348
1189
|
/**
|
|
1349
|
-
*
|
|
1350
|
-
* @param id - ID del material a actualizar
|
|
1351
|
-
* @param request - Nuevos datos del material
|
|
1190
|
+
* Alterna el estado activo de un blank.
|
|
1352
1191
|
*/
|
|
1353
|
-
|
|
1192
|
+
toggleBlankStatus(id: number): Promise<ResponseModel<Blank>>;
|
|
1354
1193
|
/**
|
|
1355
|
-
* Elimina un
|
|
1356
|
-
* @param id - ID del material a eliminar
|
|
1194
|
+
* Elimina un blank.
|
|
1357
1195
|
*/
|
|
1358
|
-
|
|
1359
|
-
}
|
|
1360
|
-
|
|
1361
|
-
/**
|
|
1362
|
-
* Interfaz que representa una imagen de producto.
|
|
1363
|
-
*/
|
|
1364
|
-
interface ProductImage {
|
|
1365
|
-
productImageId: number;
|
|
1366
|
-
productImage: string;
|
|
1367
|
-
mediaTypeId: number;
|
|
1368
|
-
productId: number | null;
|
|
1369
|
-
mediaRoleId: number | null;
|
|
1370
|
-
imageURL: string;
|
|
1371
|
-
createdAt: string | null;
|
|
1372
|
-
updatedAt: string | null;
|
|
1373
|
-
deleted: boolean | null;
|
|
1374
|
-
}
|
|
1375
|
-
/**
|
|
1376
|
-
* Request para crear o actualizar una imagen de producto.
|
|
1377
|
-
*/
|
|
1378
|
-
interface ProductImageRequest {
|
|
1379
|
-
productImage: string;
|
|
1380
|
-
mediaTypeId: number;
|
|
1381
|
-
productId?: number;
|
|
1382
|
-
mediaRoleId?: number;
|
|
1383
|
-
imageURL: string;
|
|
1384
|
-
}
|
|
1385
|
-
/**
|
|
1386
|
-
* Filtros disponibles para buscar imágenes de producto.
|
|
1387
|
-
*/
|
|
1388
|
-
interface ProductImagesFilter {
|
|
1389
|
-
Search?: string;
|
|
1390
|
-
ProductImage?: string;
|
|
1391
|
-
MediaTypeId?: number;
|
|
1392
|
-
ProductId?: number;
|
|
1393
|
-
MediaRoleId?: number;
|
|
1394
|
-
}
|
|
1395
|
-
|
|
1396
|
-
/**
|
|
1397
|
-
* Interfaz que representa un bullet de producto.
|
|
1398
|
-
*/
|
|
1399
|
-
interface ProductBullet {
|
|
1400
|
-
productBulletId: number;
|
|
1401
|
-
productId: number;
|
|
1402
|
-
bulletOrder: number;
|
|
1403
|
-
title: string;
|
|
1404
|
-
text: string;
|
|
1405
|
-
createdAt: string | null;
|
|
1406
|
-
updatedAt: string | null;
|
|
1407
|
-
deleted: boolean | null;
|
|
1408
|
-
}
|
|
1409
|
-
/**
|
|
1410
|
-
* Request para crear o actualizar un bullet de producto.
|
|
1411
|
-
*/
|
|
1412
|
-
interface ProductBulletRequest {
|
|
1413
|
-
productId: number;
|
|
1414
|
-
bulletOrder: number;
|
|
1415
|
-
title: string;
|
|
1416
|
-
text: string;
|
|
1417
|
-
}
|
|
1418
|
-
/**
|
|
1419
|
-
* Filtros disponibles para buscar bullets de producto.
|
|
1420
|
-
*/
|
|
1421
|
-
interface ProductBulletsFilter {
|
|
1422
|
-
Search?: string;
|
|
1423
|
-
ProductId?: number;
|
|
1424
|
-
Title?: string;
|
|
1425
|
-
Text?: string;
|
|
1426
|
-
}
|
|
1427
|
-
|
|
1428
|
-
/**
|
|
1429
|
-
* Interfaz que representa un keyword de producto.
|
|
1430
|
-
*/
|
|
1431
|
-
interface ProductKeyword {
|
|
1432
|
-
productKeywordId: number;
|
|
1433
|
-
productId: number;
|
|
1434
|
-
keyword: string;
|
|
1435
|
-
createdAt: string | null;
|
|
1436
|
-
updatedAt: string | null;
|
|
1437
|
-
deleted: boolean | null;
|
|
1438
|
-
}
|
|
1439
|
-
/**
|
|
1440
|
-
* Request para crear o actualizar un keyword de producto.
|
|
1441
|
-
*/
|
|
1442
|
-
interface ProductKeywordRequest {
|
|
1443
|
-
productId: number;
|
|
1444
|
-
keyword: string;
|
|
1445
|
-
}
|
|
1446
|
-
/**
|
|
1447
|
-
* Filtros disponibles para buscar keywords de producto.
|
|
1448
|
-
*/
|
|
1449
|
-
interface ProductKeywordsFilter {
|
|
1450
|
-
Search?: string;
|
|
1451
|
-
ProductId?: number;
|
|
1452
|
-
Keyword?: string;
|
|
1196
|
+
deleteBlank(id: number): Promise<ResponseModel<void>>;
|
|
1453
1197
|
}
|
|
1454
1198
|
|
|
1455
1199
|
/**
|
|
1456
|
-
* Interfaz que representa un
|
|
1200
|
+
* Interfaz que representa un módulo del sistema.
|
|
1457
1201
|
*/
|
|
1458
|
-
interface
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
currency: string;
|
|
1464
|
-
eventId: number | null;
|
|
1465
|
-
validFrom: string | null;
|
|
1466
|
-
validTo: string | null;
|
|
1467
|
-
createdAt: string | null;
|
|
1468
|
-
updatedAt: string | null;
|
|
1469
|
-
deleted: boolean | null;
|
|
1202
|
+
interface Module {
|
|
1203
|
+
moduleId: number;
|
|
1204
|
+
module: string;
|
|
1205
|
+
description: string;
|
|
1206
|
+
isActive: boolean;
|
|
1470
1207
|
}
|
|
1471
1208
|
/**
|
|
1472
|
-
* Request para crear o actualizar un
|
|
1209
|
+
* Request para crear o actualizar un módulo.
|
|
1473
1210
|
*/
|
|
1474
|
-
interface
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
currency: string;
|
|
1479
|
-
eventId?: number;
|
|
1480
|
-
validFrom?: string;
|
|
1481
|
-
validTo?: string;
|
|
1211
|
+
interface ModuleRequest {
|
|
1212
|
+
module: string;
|
|
1213
|
+
description: string;
|
|
1214
|
+
isActive?: boolean;
|
|
1482
1215
|
}
|
|
1483
1216
|
/**
|
|
1484
|
-
* Filtros disponibles para buscar
|
|
1217
|
+
* Filtros disponibles para buscar módulos.
|
|
1218
|
+
* Todos los campos son opcionales.
|
|
1485
1219
|
*/
|
|
1486
|
-
interface
|
|
1220
|
+
interface ModulesFilter {
|
|
1221
|
+
/** Búsqueda general (busca en Module y Description) */
|
|
1487
1222
|
Search?: string;
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1223
|
+
/** Filtro por nombre del módulo (búsqueda parcial) */
|
|
1224
|
+
Module?: string;
|
|
1225
|
+
/** Filtro por descripción (búsqueda parcial) */
|
|
1226
|
+
Description?: string;
|
|
1227
|
+
/** Filtro por estado activo/inactivo */
|
|
1228
|
+
IsActive?: boolean;
|
|
1492
1229
|
}
|
|
1493
1230
|
|
|
1494
1231
|
/**
|
|
1495
|
-
* Interfaz que representa un
|
|
1496
|
-
*/
|
|
1497
|
-
interface BlankProduct {
|
|
1498
|
-
blankProductId: number;
|
|
1499
|
-
sku: string;
|
|
1500
|
-
providerId: number | null;
|
|
1501
|
-
materialId: number | null;
|
|
1502
|
-
color: string;
|
|
1503
|
-
sizeId: number | null;
|
|
1504
|
-
price: number | null;
|
|
1505
|
-
createdAt: string | null;
|
|
1506
|
-
updatedAt: string | null;
|
|
1507
|
-
deleted: boolean | null;
|
|
1508
|
-
}
|
|
1509
|
-
/**
|
|
1510
|
-
* Request para crear o actualizar un producto en blanco.
|
|
1511
|
-
*/
|
|
1512
|
-
interface BlankProductRequest {
|
|
1513
|
-
sku: string;
|
|
1514
|
-
providerId?: number;
|
|
1515
|
-
materialId?: number;
|
|
1516
|
-
color: string;
|
|
1517
|
-
sizeId?: number;
|
|
1518
|
-
price?: number;
|
|
1519
|
-
}
|
|
1520
|
-
/**
|
|
1521
|
-
* Filtros disponibles para buscar productos en blanco.
|
|
1232
|
+
* Interfaz que representa un endpoint del sistema.
|
|
1522
1233
|
*/
|
|
1523
|
-
interface
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1234
|
+
interface Endpoint {
|
|
1235
|
+
endpointId: number;
|
|
1236
|
+
endpoint: string;
|
|
1237
|
+
httpMethod: string;
|
|
1238
|
+
path: string;
|
|
1239
|
+
description: string;
|
|
1240
|
+
requiresAuth: boolean;
|
|
1241
|
+
requiresPermission: boolean | null;
|
|
1242
|
+
requiresSignature: boolean;
|
|
1243
|
+
requiresHeader: boolean;
|
|
1244
|
+
allowedOrigins: string;
|
|
1245
|
+
isActive: boolean;
|
|
1530
1246
|
}
|
|
1531
|
-
|
|
1532
1247
|
/**
|
|
1533
|
-
*
|
|
1248
|
+
* Request para crear o actualizar un endpoint.
|
|
1534
1249
|
*/
|
|
1535
|
-
interface
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
royalty: number | null;
|
|
1547
|
-
colorVariant: string;
|
|
1548
|
-
createdAt: string | null;
|
|
1549
|
-
updatedAt: string | null;
|
|
1550
|
-
deleted: boolean | null;
|
|
1250
|
+
interface EndpointRequest {
|
|
1251
|
+
endpoint: string;
|
|
1252
|
+
httpMethod: string;
|
|
1253
|
+
path: string;
|
|
1254
|
+
description: string;
|
|
1255
|
+
requiresAuth?: boolean;
|
|
1256
|
+
requiresPermission?: boolean;
|
|
1257
|
+
requiresSignature?: boolean;
|
|
1258
|
+
requiresHeader?: boolean;
|
|
1259
|
+
allowedOrigins?: string[];
|
|
1260
|
+
isActive?: boolean;
|
|
1551
1261
|
}
|
|
1552
1262
|
/**
|
|
1553
|
-
*
|
|
1263
|
+
* Métodos HTTP disponibles para endpoints.
|
|
1554
1264
|
*/
|
|
1555
|
-
|
|
1556
|
-
productId?: number;
|
|
1557
|
-
blankProductId?: number;
|
|
1558
|
-
mokup: string;
|
|
1559
|
-
frontPrint: string;
|
|
1560
|
-
backPrint: string;
|
|
1561
|
-
sidePrint: string;
|
|
1562
|
-
detailPrint: string;
|
|
1563
|
-
neckLabel: string;
|
|
1564
|
-
handTag: string;
|
|
1565
|
-
royalty?: number;
|
|
1566
|
-
colorVariant: string;
|
|
1567
|
-
}
|
|
1265
|
+
type HttpMethodType = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
|
|
1568
1266
|
/**
|
|
1569
|
-
* Filtros disponibles para buscar
|
|
1267
|
+
* Filtros disponibles para buscar endpoints.
|
|
1268
|
+
* Todos los campos son opcionales.
|
|
1570
1269
|
*/
|
|
1571
|
-
interface
|
|
1270
|
+
interface EndpointsFilter {
|
|
1271
|
+
/** Búsqueda general (busca en Endpoint, Path y Description) */
|
|
1572
1272
|
Search?: string;
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1273
|
+
/** Filtro por nombre del endpoint (búsqueda parcial) */
|
|
1274
|
+
Endpoint?: string;
|
|
1275
|
+
/** Filtro por método HTTP (GET, POST, PUT, DELETE, PATCH) */
|
|
1276
|
+
HttpMethod?: HttpMethodType;
|
|
1277
|
+
/** Filtro por módulo (primer segmento del path, búsqueda parcial) */
|
|
1278
|
+
Module?: string;
|
|
1279
|
+
/** Filtro por path (búsqueda parcial) */
|
|
1280
|
+
Path?: string;
|
|
1281
|
+
/** Filtro por descripción (búsqueda parcial) */
|
|
1282
|
+
Description?: string;
|
|
1283
|
+
/** Filtro por endpoints que requieren autenticación */
|
|
1284
|
+
RequiresAuth?: boolean;
|
|
1285
|
+
/** Filtro por endpoints que requieren validación de permisos */
|
|
1286
|
+
RequiresPermission?: boolean;
|
|
1287
|
+
/** Filtro por endpoints que requieren firma */
|
|
1288
|
+
RequiresSignature?: boolean;
|
|
1289
|
+
/** Filtro por endpoints que requieren header específico */
|
|
1290
|
+
RequiresHeader?: boolean;
|
|
1291
|
+
/** Filtro por estado activo/inactivo */
|
|
1292
|
+
IsActive?: boolean;
|
|
1576
1293
|
}
|
|
1577
1294
|
|
|
1578
1295
|
/**
|
|
1579
|
-
* Interfaz que representa una
|
|
1296
|
+
* Interfaz que representa una ruta de UI del sistema.
|
|
1580
1297
|
*/
|
|
1581
|
-
interface
|
|
1582
|
-
|
|
1583
|
-
|
|
1298
|
+
interface UIRoute {
|
|
1299
|
+
uiRouteId: number;
|
|
1300
|
+
uiRoute: string;
|
|
1301
|
+
path: string;
|
|
1584
1302
|
description: string;
|
|
1585
|
-
|
|
1586
|
-
width: string;
|
|
1587
|
-
length: string;
|
|
1588
|
-
createdAt: string | null;
|
|
1589
|
-
updatedAt: string | null;
|
|
1590
|
-
deleted: boolean | null;
|
|
1303
|
+
isActive: boolean;
|
|
1591
1304
|
}
|
|
1592
1305
|
/**
|
|
1593
|
-
* Request para crear o actualizar una
|
|
1306
|
+
* Request para crear o actualizar una ruta de UI.
|
|
1594
1307
|
*/
|
|
1595
|
-
interface
|
|
1596
|
-
|
|
1308
|
+
interface UIRouteRequest {
|
|
1309
|
+
uiRoute: string;
|
|
1310
|
+
path: string;
|
|
1597
1311
|
description: string;
|
|
1598
|
-
|
|
1599
|
-
width: string;
|
|
1600
|
-
length: string;
|
|
1312
|
+
isActive?: boolean;
|
|
1601
1313
|
}
|
|
1602
1314
|
/**
|
|
1603
|
-
* Filtros disponibles para buscar
|
|
1315
|
+
* Filtros disponibles para buscar rutas de UI.
|
|
1316
|
+
* Todos los campos son opcionales.
|
|
1604
1317
|
*/
|
|
1605
|
-
interface
|
|
1318
|
+
interface UIRoutesFilter {
|
|
1319
|
+
/** Búsqueda general (busca en UIRoute, Path y Description) */
|
|
1606
1320
|
Search?: string;
|
|
1607
|
-
|
|
1321
|
+
/** Filtro por nombre de la ruta (búsqueda parcial) */
|
|
1322
|
+
UIRoute?: string;
|
|
1323
|
+
/** Filtro por path (búsqueda parcial) */
|
|
1324
|
+
Path?: string;
|
|
1325
|
+
/** Filtro por descripción (búsqueda parcial) */
|
|
1608
1326
|
Description?: string;
|
|
1609
|
-
|
|
1327
|
+
/** Filtro por estado activo/inactivo */
|
|
1328
|
+
IsActive?: boolean;
|
|
1610
1329
|
}
|
|
1611
1330
|
|
|
1612
1331
|
/**
|
|
1613
|
-
*
|
|
1614
|
-
*/
|
|
1615
|
-
interface SizeGroup {
|
|
1616
|
-
sizeGroupId: number;
|
|
1617
|
-
sizeGroup: string;
|
|
1618
|
-
description: string;
|
|
1619
|
-
createdAt: string | null;
|
|
1620
|
-
updatedAt: string | null;
|
|
1621
|
-
deleted: boolean | null;
|
|
1622
|
-
}
|
|
1623
|
-
/**
|
|
1624
|
-
* Request para crear o actualizar un grupo de tallas.
|
|
1625
|
-
*/
|
|
1626
|
-
interface SizeGroupRequest {
|
|
1627
|
-
sizeGroup: string;
|
|
1628
|
-
description: string;
|
|
1629
|
-
}
|
|
1630
|
-
/**
|
|
1631
|
-
* Filtros disponibles para buscar grupos de tallas.
|
|
1332
|
+
* Servicio para gestionar las configuraciones del sistema.
|
|
1632
1333
|
*/
|
|
1633
|
-
|
|
1634
|
-
Search?: string;
|
|
1635
|
-
SizeGroup?: string;
|
|
1636
|
-
Description?: string;
|
|
1637
|
-
}
|
|
1638
|
-
|
|
1639
|
-
/**
|
|
1640
|
-
* Interfaz que representa un tipo de producto.
|
|
1641
|
-
*/
|
|
1642
|
-
interface ProductType {
|
|
1643
|
-
productTypeId: number;
|
|
1644
|
-
productType: string;
|
|
1645
|
-
description: string;
|
|
1646
|
-
createdAt: string | null;
|
|
1647
|
-
updatedAt: string | null;
|
|
1648
|
-
deleted: boolean | null;
|
|
1649
|
-
}
|
|
1650
|
-
/**
|
|
1651
|
-
* Request para crear o actualizar un tipo de producto.
|
|
1652
|
-
*/
|
|
1653
|
-
interface ProductTypeRequest {
|
|
1654
|
-
productType: string;
|
|
1655
|
-
description: string;
|
|
1656
|
-
}
|
|
1657
|
-
/**
|
|
1658
|
-
* Filtros disponibles para buscar tipos de producto.
|
|
1659
|
-
*/
|
|
1660
|
-
interface ProductTypesFilter {
|
|
1661
|
-
Search?: string;
|
|
1662
|
-
ProductType?: string;
|
|
1663
|
-
Description?: string;
|
|
1664
|
-
}
|
|
1665
|
-
|
|
1666
|
-
/**
|
|
1667
|
-
* Interfaz que representa una categoría de producto.
|
|
1668
|
-
*/
|
|
1669
|
-
interface ProductCategory {
|
|
1670
|
-
productCategoryId: number;
|
|
1671
|
-
productCategory: string;
|
|
1672
|
-
description: string;
|
|
1673
|
-
isActive: boolean | null;
|
|
1674
|
-
createdAt: string | null;
|
|
1675
|
-
updatedAt: string | null;
|
|
1676
|
-
deleted: boolean | null;
|
|
1677
|
-
}
|
|
1678
|
-
/**
|
|
1679
|
-
* Request para crear o actualizar una categoría de producto.
|
|
1680
|
-
*/
|
|
1681
|
-
interface ProductCategoryRequest {
|
|
1682
|
-
productCategory: string;
|
|
1683
|
-
description: string;
|
|
1684
|
-
isActive?: boolean;
|
|
1685
|
-
}
|
|
1686
|
-
/**
|
|
1687
|
-
* Filtros disponibles para buscar categorías de producto.
|
|
1688
|
-
*/
|
|
1689
|
-
interface ProductCategoriesFilter {
|
|
1690
|
-
Search?: string;
|
|
1691
|
-
ProductCategory?: string;
|
|
1692
|
-
Description?: string;
|
|
1693
|
-
IsActive?: boolean;
|
|
1694
|
-
}
|
|
1695
|
-
|
|
1696
|
-
/**
|
|
1697
|
-
* Interfaz que representa un estatus de producto.
|
|
1698
|
-
*/
|
|
1699
|
-
interface ProductStatus {
|
|
1700
|
-
productStatusId: number;
|
|
1701
|
-
productStatus: string;
|
|
1702
|
-
description: string;
|
|
1703
|
-
isSellable: boolean | null;
|
|
1704
|
-
createdAt: string | null;
|
|
1705
|
-
updatedAt: string | null;
|
|
1706
|
-
deleted: boolean | null;
|
|
1707
|
-
}
|
|
1708
|
-
/**
|
|
1709
|
-
* Request para crear o actualizar un estatus de producto.
|
|
1710
|
-
*/
|
|
1711
|
-
interface ProductStatusRequest {
|
|
1712
|
-
productStatus: string;
|
|
1713
|
-
description: string;
|
|
1714
|
-
isSellable?: boolean;
|
|
1715
|
-
}
|
|
1716
|
-
/**
|
|
1717
|
-
* Filtros disponibles para buscar estatus de producto.
|
|
1718
|
-
*/
|
|
1719
|
-
interface ProductStatusesFilter {
|
|
1720
|
-
Search?: string;
|
|
1721
|
-
ProductStatus?: string;
|
|
1722
|
-
Description?: string;
|
|
1723
|
-
IsSellable?: boolean;
|
|
1724
|
-
}
|
|
1725
|
-
|
|
1726
|
-
/**
|
|
1727
|
-
* Interfaz que representa un estudio.
|
|
1728
|
-
*/
|
|
1729
|
-
interface Studio {
|
|
1730
|
-
studioId: number;
|
|
1731
|
-
studio: string;
|
|
1732
|
-
logo: string;
|
|
1733
|
-
isActive: boolean | null;
|
|
1734
|
-
createdAt: string | null;
|
|
1735
|
-
updatedAt: string | null;
|
|
1736
|
-
deleted: boolean | null;
|
|
1737
|
-
}
|
|
1738
|
-
/**
|
|
1739
|
-
* Request para crear o actualizar un estudio.
|
|
1740
|
-
*/
|
|
1741
|
-
interface StudioRequest {
|
|
1742
|
-
studio: string;
|
|
1743
|
-
logo: string;
|
|
1744
|
-
isActive?: boolean;
|
|
1745
|
-
}
|
|
1746
|
-
/**
|
|
1747
|
-
* Filtros disponibles para buscar estudios.
|
|
1748
|
-
*/
|
|
1749
|
-
interface StudiosFilter {
|
|
1750
|
-
Search?: string;
|
|
1751
|
-
Studio?: string;
|
|
1752
|
-
IsActive?: boolean;
|
|
1753
|
-
}
|
|
1754
|
-
|
|
1755
|
-
/**
|
|
1756
|
-
* Interfaz que representa una licencia.
|
|
1757
|
-
*/
|
|
1758
|
-
interface License {
|
|
1759
|
-
licenseId: number;
|
|
1760
|
-
license: string;
|
|
1761
|
-
studioId: number | null;
|
|
1762
|
-
region: string;
|
|
1763
|
-
isActive: boolean | null;
|
|
1764
|
-
createdAt: string | null;
|
|
1765
|
-
updatedAt: string | null;
|
|
1766
|
-
deleted: boolean | null;
|
|
1767
|
-
}
|
|
1768
|
-
/**
|
|
1769
|
-
* Request para crear o actualizar una licencia.
|
|
1770
|
-
*/
|
|
1771
|
-
interface LicenseRequest {
|
|
1772
|
-
license: string;
|
|
1773
|
-
studioId?: number;
|
|
1774
|
-
region: string;
|
|
1775
|
-
isActive?: boolean;
|
|
1776
|
-
}
|
|
1777
|
-
/**
|
|
1778
|
-
* Filtros disponibles para buscar licencias.
|
|
1779
|
-
*/
|
|
1780
|
-
interface LicensesFilter {
|
|
1781
|
-
Search?: string;
|
|
1782
|
-
License?: string;
|
|
1783
|
-
StudioId?: number;
|
|
1784
|
-
Region?: string;
|
|
1785
|
-
IsActive?: boolean;
|
|
1786
|
-
}
|
|
1787
|
-
|
|
1788
|
-
/**
|
|
1789
|
-
* Interfaz que representa un proveedor.
|
|
1790
|
-
*/
|
|
1791
|
-
interface Provider {
|
|
1792
|
-
providerId: number;
|
|
1793
|
-
provider: string;
|
|
1794
|
-
contactName: string;
|
|
1795
|
-
areaCodeId: number;
|
|
1796
|
-
contactNumber: string;
|
|
1797
|
-
contactEmail: string;
|
|
1798
|
-
isActive: boolean;
|
|
1799
|
-
createdAt: string;
|
|
1800
|
-
updatedAt: string;
|
|
1801
|
-
deleted: boolean;
|
|
1802
|
-
}
|
|
1803
|
-
/**
|
|
1804
|
-
* Request para crear o actualizar un proveedor.
|
|
1805
|
-
*/
|
|
1806
|
-
interface ProviderRequest {
|
|
1807
|
-
provider: string;
|
|
1808
|
-
contactName: string;
|
|
1809
|
-
areaCodeId: number;
|
|
1810
|
-
contactNumber: string;
|
|
1811
|
-
contactEmail: string;
|
|
1812
|
-
isActive?: boolean;
|
|
1813
|
-
}
|
|
1814
|
-
/**
|
|
1815
|
-
* Filtros disponibles para buscar proveedores.
|
|
1816
|
-
*/
|
|
1817
|
-
interface ProvidersFilter {
|
|
1818
|
-
Search?: string;
|
|
1819
|
-
Provider?: string;
|
|
1820
|
-
IsActive?: boolean;
|
|
1821
|
-
}
|
|
1822
|
-
|
|
1823
|
-
/**
|
|
1824
|
-
* Servicio para gestionar productos y catálogos de productos.
|
|
1825
|
-
*/
|
|
1826
|
-
declare class ProductService {
|
|
1334
|
+
declare class SystemService {
|
|
1827
1335
|
private api;
|
|
1828
1336
|
private readonly BASE_PATH;
|
|
1829
1337
|
constructor(api: API);
|
|
1830
1338
|
/**
|
|
1831
|
-
* Obtiene
|
|
1832
|
-
* @param filter - Filtros opcionales para la búsqueda
|
|
1833
|
-
*/
|
|
1834
|
-
getImages(filter?: ProductImagesFilter): Promise<ResponseModel<ProductImage[]>>;
|
|
1835
|
-
/**
|
|
1836
|
-
* Obtiene el modelo de filtros disponibles para imágenes de producto.
|
|
1837
|
-
*/
|
|
1838
|
-
getImageFiltersModel(): Promise<ResponseModel<FilterGroupsModel>>;
|
|
1839
|
-
/**
|
|
1840
|
-
* Obtiene una imagen de producto por su ID.
|
|
1841
|
-
* @param id - ID de la imagen
|
|
1842
|
-
*/
|
|
1843
|
-
getImageById(id: number): Promise<ResponseModel<ProductImage>>;
|
|
1844
|
-
/**
|
|
1845
|
-
* Crea una nueva imagen de producto.
|
|
1846
|
-
* @param request - Datos de la imagen a crear
|
|
1847
|
-
*/
|
|
1848
|
-
createImage(request: ProductImageRequest): Promise<ResponseModel<ProductImage>>;
|
|
1849
|
-
/**
|
|
1850
|
-
* Actualiza una imagen de producto existente.
|
|
1851
|
-
* @param id - ID de la imagen a actualizar
|
|
1852
|
-
* @param request - Nuevos datos de la imagen
|
|
1853
|
-
*/
|
|
1854
|
-
updateImage(id: number, request: ProductImageRequest): Promise<ResponseModel<ProductImage>>;
|
|
1855
|
-
/**
|
|
1856
|
-
* Elimina una imagen de producto.
|
|
1857
|
-
* @param id - ID de la imagen a eliminar
|
|
1858
|
-
*/
|
|
1859
|
-
deleteImage(id: number): Promise<ResponseModel<void>>;
|
|
1860
|
-
/**
|
|
1861
|
-
* Obtiene todos los bullets de producto con filtros opcionales.
|
|
1862
|
-
* @param filter - Filtros opcionales para la búsqueda
|
|
1863
|
-
*/
|
|
1864
|
-
getBullets(filter?: ProductBulletsFilter): Promise<ResponseModel<ProductBullet[]>>;
|
|
1865
|
-
/**
|
|
1866
|
-
* Obtiene el modelo de filtros disponibles para bullets de producto.
|
|
1867
|
-
*/
|
|
1868
|
-
getBulletFiltersModel(): Promise<ResponseModel<FilterGroupsModel>>;
|
|
1869
|
-
/**
|
|
1870
|
-
* Obtiene un bullet de producto por su ID.
|
|
1871
|
-
* @param id - ID del bullet
|
|
1872
|
-
*/
|
|
1873
|
-
getBulletById(id: number): Promise<ResponseModel<ProductBullet>>;
|
|
1874
|
-
/**
|
|
1875
|
-
* Crea un nuevo bullet de producto.
|
|
1876
|
-
* @param request - Datos del bullet a crear
|
|
1877
|
-
*/
|
|
1878
|
-
createBullet(request: ProductBulletRequest): Promise<ResponseModel<ProductBullet>>;
|
|
1879
|
-
/**
|
|
1880
|
-
* Actualiza un bullet de producto existente.
|
|
1881
|
-
* @param id - ID del bullet a actualizar
|
|
1882
|
-
* @param request - Nuevos datos del bullet
|
|
1883
|
-
*/
|
|
1884
|
-
updateBullet(id: number, request: ProductBulletRequest): Promise<ResponseModel<ProductBullet>>;
|
|
1885
|
-
/**
|
|
1886
|
-
* Elimina un bullet de producto.
|
|
1887
|
-
* @param id - ID del bullet a eliminar
|
|
1888
|
-
*/
|
|
1889
|
-
deleteBullet(id: number): Promise<ResponseModel<void>>;
|
|
1890
|
-
/**
|
|
1891
|
-
* Obtiene todos los keywords de producto con filtros opcionales.
|
|
1892
|
-
* @param filter - Filtros opcionales para la búsqueda
|
|
1893
|
-
*/
|
|
1894
|
-
getKeywords(filter?: ProductKeywordsFilter): Promise<ResponseModel<ProductKeyword[]>>;
|
|
1895
|
-
/**
|
|
1896
|
-
* Obtiene el modelo de filtros disponibles para keywords de producto.
|
|
1897
|
-
*/
|
|
1898
|
-
getKeywordFiltersModel(): Promise<ResponseModel<FilterGroupsModel>>;
|
|
1899
|
-
/**
|
|
1900
|
-
* Obtiene un keyword de producto por su ID.
|
|
1901
|
-
* @param id - ID del keyword
|
|
1902
|
-
*/
|
|
1903
|
-
getKeywordById(id: number): Promise<ResponseModel<ProductKeyword>>;
|
|
1904
|
-
/**
|
|
1905
|
-
* Crea un nuevo keyword de producto.
|
|
1906
|
-
* @param request - Datos del keyword a crear
|
|
1907
|
-
*/
|
|
1908
|
-
createKeyword(request: ProductKeywordRequest): Promise<ResponseModel<ProductKeyword>>;
|
|
1909
|
-
/**
|
|
1910
|
-
* Actualiza un keyword de producto existente.
|
|
1911
|
-
* @param id - ID del keyword a actualizar
|
|
1912
|
-
* @param request - Nuevos datos del keyword
|
|
1913
|
-
*/
|
|
1914
|
-
updateKeyword(id: number, request: ProductKeywordRequest): Promise<ResponseModel<ProductKeyword>>;
|
|
1915
|
-
/**
|
|
1916
|
-
* Elimina un keyword de producto.
|
|
1917
|
-
* @param id - ID del keyword a eliminar
|
|
1918
|
-
*/
|
|
1919
|
-
deleteKeyword(id: number): Promise<ResponseModel<void>>;
|
|
1920
|
-
/**
|
|
1921
|
-
* Obtiene todos los precios de producto con filtros opcionales.
|
|
1922
|
-
* @param filter - Filtros opcionales para la búsqueda
|
|
1923
|
-
*/
|
|
1924
|
-
getPrices(filter?: ProductPricesFilter): Promise<ResponseModel<ProductPrice[]>>;
|
|
1925
|
-
/**
|
|
1926
|
-
* Obtiene el modelo de filtros disponibles para precios de producto.
|
|
1927
|
-
*/
|
|
1928
|
-
getPriceFiltersModel(): Promise<ResponseModel<FilterGroupsModel>>;
|
|
1929
|
-
/**
|
|
1930
|
-
* Obtiene un precio de producto por su ID.
|
|
1931
|
-
* @param id - ID del precio
|
|
1932
|
-
*/
|
|
1933
|
-
getPriceById(id: number): Promise<ResponseModel<ProductPrice>>;
|
|
1934
|
-
/**
|
|
1935
|
-
* Crea un nuevo precio de producto.
|
|
1936
|
-
* @param request - Datos del precio a crear
|
|
1937
|
-
*/
|
|
1938
|
-
createPrice(request: ProductPriceRequest): Promise<ResponseModel<ProductPrice>>;
|
|
1939
|
-
/**
|
|
1940
|
-
* Actualiza un precio de producto existente.
|
|
1941
|
-
* @param id - ID del precio a actualizar
|
|
1942
|
-
* @param request - Nuevos datos del precio
|
|
1943
|
-
*/
|
|
1944
|
-
updatePrice(id: number, request: ProductPriceRequest): Promise<ResponseModel<ProductPrice>>;
|
|
1945
|
-
/**
|
|
1946
|
-
* Elimina un precio de producto.
|
|
1947
|
-
* @param id - ID del precio a eliminar
|
|
1948
|
-
*/
|
|
1949
|
-
deletePrice(id: number): Promise<ResponseModel<void>>;
|
|
1950
|
-
/**
|
|
1951
|
-
* Obtiene todos los productos en blanco con filtros opcionales.
|
|
1952
|
-
* @param filter - Filtros opcionales para la búsqueda
|
|
1953
|
-
*/
|
|
1954
|
-
getBlankProducts(filter?: BlankProductsFilter): Promise<ResponseModel<BlankProduct[]>>;
|
|
1955
|
-
/**
|
|
1956
|
-
* Obtiene el modelo de filtros disponibles para productos en blanco.
|
|
1957
|
-
*/
|
|
1958
|
-
getBlankProductFiltersModel(): Promise<ResponseModel<FilterGroupsModel>>;
|
|
1959
|
-
/**
|
|
1960
|
-
* Obtiene un producto en blanco por su ID.
|
|
1961
|
-
* @param id - ID del producto en blanco
|
|
1962
|
-
*/
|
|
1963
|
-
getBlankProductById(id: number): Promise<ResponseModel<BlankProduct>>;
|
|
1964
|
-
/**
|
|
1965
|
-
* Crea un nuevo producto en blanco.
|
|
1966
|
-
* @param request - Datos del producto en blanco a crear
|
|
1967
|
-
*/
|
|
1968
|
-
createBlankProduct(request: BlankProductRequest): Promise<ResponseModel<BlankProduct>>;
|
|
1969
|
-
/**
|
|
1970
|
-
* Actualiza un producto en blanco existente.
|
|
1971
|
-
* @param id - ID del producto en blanco a actualizar
|
|
1972
|
-
* @param request - Nuevos datos del producto en blanco
|
|
1973
|
-
*/
|
|
1974
|
-
updateBlankProduct(id: number, request: BlankProductRequest): Promise<ResponseModel<BlankProduct>>;
|
|
1975
|
-
/**
|
|
1976
|
-
* Elimina un producto en blanco.
|
|
1977
|
-
* @param id - ID del producto en blanco a eliminar
|
|
1978
|
-
*/
|
|
1979
|
-
deleteBlankProduct(id: number): Promise<ResponseModel<void>>;
|
|
1980
|
-
/**
|
|
1981
|
-
* Obtiene todos los detalles de producto POD con filtros opcionales.
|
|
1339
|
+
* Obtiene todos los módulos con filtros opcionales.
|
|
1982
1340
|
* @param filter - Filtros opcionales para la búsqueda
|
|
1983
1341
|
*/
|
|
1984
|
-
|
|
1985
|
-
/**
|
|
1986
|
-
* Obtiene el modelo de filtros disponibles para detalles de producto POD.
|
|
1987
|
-
*/
|
|
1988
|
-
getPODDetailFiltersModel(): Promise<ResponseModel<FilterGroupsModel>>;
|
|
1989
|
-
/**
|
|
1990
|
-
* Obtiene un detalle de producto POD por su ID.
|
|
1991
|
-
* @param id - ID del detalle POD
|
|
1992
|
-
*/
|
|
1993
|
-
getPODDetailById(id: number): Promise<ResponseModel<DetailProductPOD>>;
|
|
1994
|
-
/**
|
|
1995
|
-
* Crea un nuevo detalle de producto POD.
|
|
1996
|
-
* @param request - Datos del detalle POD a crear
|
|
1997
|
-
*/
|
|
1998
|
-
createPODDetail(request: DetailProductPODRequest): Promise<ResponseModel<DetailProductPOD>>;
|
|
1999
|
-
/**
|
|
2000
|
-
* Actualiza un detalle de producto POD existente.
|
|
2001
|
-
* @param id - ID del detalle POD a actualizar
|
|
2002
|
-
* @param request - Nuevos datos del detalle POD
|
|
2003
|
-
*/
|
|
2004
|
-
updatePODDetail(id: number, request: DetailProductPODRequest): Promise<ResponseModel<DetailProductPOD>>;
|
|
2005
|
-
/**
|
|
2006
|
-
* Elimina un detalle de producto POD.
|
|
2007
|
-
* @param id - ID del detalle POD a eliminar
|
|
2008
|
-
*/
|
|
2009
|
-
deletePODDetail(id: number): Promise<ResponseModel<void>>;
|
|
1342
|
+
getModules(filter?: ModulesFilter): Promise<ResponseModel<Module[]>>;
|
|
2010
1343
|
/**
|
|
2011
|
-
* Obtiene
|
|
2012
|
-
* @param filter - Filtros opcionales para la búsqueda
|
|
1344
|
+
* Obtiene el modelo de filtros disponibles para módulos.
|
|
2013
1345
|
*/
|
|
2014
|
-
|
|
1346
|
+
getModulesFilters(): Promise<ResponseModel<FilterGroupsModel>>;
|
|
2015
1347
|
/**
|
|
2016
|
-
* Obtiene
|
|
1348
|
+
* Obtiene un módulo por su ID.
|
|
1349
|
+
* @param id - ID del módulo
|
|
2017
1350
|
*/
|
|
2018
|
-
|
|
1351
|
+
getModuleById(id: number): Promise<ResponseModel<Module>>;
|
|
2019
1352
|
/**
|
|
2020
|
-
*
|
|
2021
|
-
* @param
|
|
1353
|
+
* Crea un nuevo módulo.
|
|
1354
|
+
* @param request - Datos del módulo a crear
|
|
2022
1355
|
*/
|
|
2023
|
-
|
|
1356
|
+
createModule(request: ModuleRequest): Promise<ResponseModel<Module>>;
|
|
2024
1357
|
/**
|
|
2025
|
-
*
|
|
2026
|
-
* @param
|
|
1358
|
+
* Actualiza un módulo existente.
|
|
1359
|
+
* @param id - ID del módulo a actualizar
|
|
1360
|
+
* @param request - Nuevos datos del módulo
|
|
2027
1361
|
*/
|
|
2028
|
-
|
|
1362
|
+
updateModule(id: number, request: ModuleRequest): Promise<ResponseModel<Module>>;
|
|
2029
1363
|
/**
|
|
2030
|
-
*
|
|
2031
|
-
* @param id - ID
|
|
2032
|
-
* @param request - Nuevos datos de la talla
|
|
1364
|
+
* Activa o desactiva un módulo.
|
|
1365
|
+
* @param id - ID del módulo
|
|
2033
1366
|
*/
|
|
2034
|
-
|
|
1367
|
+
toggleModuleStatus(id: number): Promise<ResponseModel<Module>>;
|
|
2035
1368
|
/**
|
|
2036
|
-
* Elimina
|
|
2037
|
-
* @param id - ID
|
|
1369
|
+
* Elimina un módulo.
|
|
1370
|
+
* @param id - ID del módulo a eliminar
|
|
2038
1371
|
*/
|
|
2039
|
-
|
|
1372
|
+
deleteModule(id: number): Promise<ResponseModel<void>>;
|
|
2040
1373
|
/**
|
|
2041
|
-
* Obtiene todos los
|
|
1374
|
+
* Obtiene todos los endpoints con filtros opcionales.
|
|
2042
1375
|
* @param filter - Filtros opcionales para la búsqueda
|
|
2043
1376
|
*/
|
|
2044
|
-
|
|
2045
|
-
/**
|
|
2046
|
-
* Obtiene el modelo de filtros disponibles para grupos de tallas.
|
|
2047
|
-
*/
|
|
2048
|
-
getSizeGroupFiltersModel(): Promise<ResponseModel<FilterGroupsModel>>;
|
|
2049
|
-
/**
|
|
2050
|
-
* Obtiene un grupo de tallas por su ID.
|
|
2051
|
-
* @param id - ID del grupo de tallas
|
|
2052
|
-
*/
|
|
2053
|
-
getSizeGroupById(id: number): Promise<ResponseModel<SizeGroup>>;
|
|
2054
|
-
/**
|
|
2055
|
-
* Crea un nuevo grupo de tallas.
|
|
2056
|
-
* @param request - Datos del grupo de tallas a crear
|
|
2057
|
-
*/
|
|
2058
|
-
createSizeGroup(request: SizeGroupRequest): Promise<ResponseModel<SizeGroup>>;
|
|
2059
|
-
/**
|
|
2060
|
-
* Actualiza un grupo de tallas existente.
|
|
2061
|
-
* @param id - ID del grupo de tallas a actualizar
|
|
2062
|
-
* @param request - Nuevos datos del grupo de tallas
|
|
2063
|
-
*/
|
|
2064
|
-
updateSizeGroup(id: number, request: SizeGroupRequest): Promise<ResponseModel<SizeGroup>>;
|
|
1377
|
+
getEndpoints(filter?: EndpointsFilter): Promise<ResponseModel<Endpoint[]>>;
|
|
2065
1378
|
/**
|
|
2066
|
-
*
|
|
2067
|
-
* @param id - ID del grupo de tallas a eliminar
|
|
1379
|
+
* Obtiene el modelo de filtros disponibles para endpoints.
|
|
2068
1380
|
*/
|
|
2069
|
-
|
|
1381
|
+
getEndpointsFilters(): Promise<ResponseModel<FilterGroupsModel>>;
|
|
2070
1382
|
/**
|
|
2071
|
-
* Obtiene
|
|
2072
|
-
* @param filter - Filtros opcionales para la búsqueda
|
|
1383
|
+
* Obtiene los módulos disponibles (valores únicos del primer segmento del path).
|
|
2073
1384
|
*/
|
|
2074
|
-
|
|
1385
|
+
getEndpointModules(): Promise<ResponseModel<string[]>>;
|
|
2075
1386
|
/**
|
|
2076
|
-
* Obtiene
|
|
1387
|
+
* Obtiene un endpoint por su ID.
|
|
1388
|
+
* @param id - ID del endpoint
|
|
2077
1389
|
*/
|
|
2078
|
-
|
|
1390
|
+
getEndpointById(id: number): Promise<ResponseModel<Endpoint>>;
|
|
2079
1391
|
/**
|
|
2080
|
-
*
|
|
2081
|
-
* @param
|
|
1392
|
+
* Crea un nuevo endpoint.
|
|
1393
|
+
* @param request - Datos del endpoint a crear
|
|
2082
1394
|
*/
|
|
2083
|
-
|
|
1395
|
+
createEndpoint(request: EndpointRequest): Promise<ResponseModel<Endpoint>>;
|
|
2084
1396
|
/**
|
|
2085
|
-
*
|
|
2086
|
-
* @param
|
|
1397
|
+
* Actualiza un endpoint existente.
|
|
1398
|
+
* @param id - ID del endpoint a actualizar
|
|
1399
|
+
* @param request - Nuevos datos del endpoint
|
|
2087
1400
|
*/
|
|
2088
|
-
|
|
1401
|
+
updateEndpoint(id: number, request: EndpointRequest): Promise<ResponseModel<Endpoint>>;
|
|
2089
1402
|
/**
|
|
2090
|
-
*
|
|
2091
|
-
* @param id - ID del
|
|
2092
|
-
* @param request - Nuevos datos del tipo de producto
|
|
1403
|
+
* Activa o desactiva un endpoint.
|
|
1404
|
+
* @param id - ID del endpoint
|
|
2093
1405
|
*/
|
|
2094
|
-
|
|
1406
|
+
toggleEndpointStatus(id: number): Promise<ResponseModel<Endpoint>>;
|
|
2095
1407
|
/**
|
|
2096
|
-
* Elimina un
|
|
2097
|
-
* @param id - ID del
|
|
1408
|
+
* Elimina un endpoint.
|
|
1409
|
+
* @param id - ID del endpoint a eliminar
|
|
2098
1410
|
*/
|
|
2099
|
-
|
|
1411
|
+
deleteEndpoint(id: number): Promise<ResponseModel<void>>;
|
|
2100
1412
|
/**
|
|
2101
|
-
* Obtiene todas las
|
|
1413
|
+
* Obtiene todas las rutas de UI con filtros opcionales.
|
|
2102
1414
|
* @param filter - Filtros opcionales para la búsqueda
|
|
2103
1415
|
*/
|
|
2104
|
-
|
|
2105
|
-
/**
|
|
2106
|
-
* Obtiene el modelo de filtros disponibles para categorías de producto.
|
|
2107
|
-
*/
|
|
2108
|
-
getProductCategoryFiltersModel(): Promise<ResponseModel<FilterGroupsModel>>;
|
|
1416
|
+
getUIRoutes(filter?: UIRoutesFilter): Promise<ResponseModel<UIRoute[]>>;
|
|
2109
1417
|
/**
|
|
2110
|
-
* Obtiene
|
|
2111
|
-
* @param id - ID de la categoría
|
|
1418
|
+
* Obtiene el modelo de filtros disponibles para rutas de UI.
|
|
2112
1419
|
*/
|
|
2113
|
-
|
|
1420
|
+
getUIRoutesFilters(): Promise<ResponseModel<FilterGroupsModel>>;
|
|
2114
1421
|
/**
|
|
2115
|
-
*
|
|
2116
|
-
* @param
|
|
1422
|
+
* Obtiene una ruta de UI por su ID.
|
|
1423
|
+
* @param id - ID de la ruta
|
|
2117
1424
|
*/
|
|
2118
|
-
|
|
1425
|
+
getUIRouteById(id: number): Promise<ResponseModel<UIRoute>>;
|
|
2119
1426
|
/**
|
|
2120
|
-
*
|
|
2121
|
-
* @param
|
|
2122
|
-
* @param request - Nuevos datos de la categoría
|
|
1427
|
+
* Crea una nueva ruta de UI.
|
|
1428
|
+
* @param request - Datos de la ruta a crear
|
|
2123
1429
|
*/
|
|
2124
|
-
|
|
1430
|
+
createUIRoute(request: UIRouteRequest): Promise<ResponseModel<UIRoute>>;
|
|
2125
1431
|
/**
|
|
2126
|
-
*
|
|
2127
|
-
* @param id - ID de la
|
|
1432
|
+
* Actualiza una ruta de UI existente.
|
|
1433
|
+
* @param id - ID de la ruta a actualizar
|
|
1434
|
+
* @param request - Nuevos datos de la ruta
|
|
2128
1435
|
*/
|
|
2129
|
-
|
|
1436
|
+
updateUIRoute(id: number, request: UIRouteRequest): Promise<ResponseModel<UIRoute>>;
|
|
2130
1437
|
/**
|
|
2131
|
-
*
|
|
2132
|
-
* @param id - ID de la
|
|
1438
|
+
* Activa o desactiva una ruta de UI.
|
|
1439
|
+
* @param id - ID de la ruta
|
|
2133
1440
|
*/
|
|
2134
|
-
|
|
1441
|
+
toggleUIRouteStatus(id: number): Promise<ResponseModel<UIRoute>>;
|
|
2135
1442
|
/**
|
|
2136
|
-
*
|
|
2137
|
-
* @param
|
|
1443
|
+
* Elimina una ruta de UI.
|
|
1444
|
+
* @param id - ID de la ruta a eliminar
|
|
2138
1445
|
*/
|
|
2139
|
-
|
|
1446
|
+
deleteUIRoute(id: number): Promise<ResponseModel<void>>;
|
|
1447
|
+
}
|
|
1448
|
+
|
|
1449
|
+
interface AdminUser {
|
|
1450
|
+
userId: number;
|
|
1451
|
+
username: string;
|
|
1452
|
+
firstName: string;
|
|
1453
|
+
lastName: string;
|
|
1454
|
+
email: string;
|
|
1455
|
+
phone: string;
|
|
1456
|
+
areaCodeId: number | null;
|
|
1457
|
+
birthday: string | null;
|
|
1458
|
+
referrerUserId: number | null;
|
|
1459
|
+
userReferralCode: string;
|
|
1460
|
+
genderId: number | null;
|
|
1461
|
+
roleId: number | null;
|
|
1462
|
+
userTypeId: number | null;
|
|
1463
|
+
isActive: boolean;
|
|
1464
|
+
createdAt: string;
|
|
1465
|
+
updatedAt: string | null;
|
|
1466
|
+
}
|
|
1467
|
+
interface AdminAuthentication {
|
|
1468
|
+
userAuthenticationId: number;
|
|
1469
|
+
userId: number;
|
|
1470
|
+
securityLevel: number;
|
|
1471
|
+
clientId: string;
|
|
1472
|
+
isTwoFactorEnabled: boolean;
|
|
1473
|
+
failedLoginAttempts: number;
|
|
1474
|
+
lastLogin: string | null;
|
|
1475
|
+
isActive: boolean;
|
|
1476
|
+
isLocked: boolean;
|
|
1477
|
+
emailVerified: boolean;
|
|
1478
|
+
phoneVerified: boolean;
|
|
1479
|
+
mustChangePassword: boolean;
|
|
1480
|
+
passwordLastChanged: string | null;
|
|
1481
|
+
passwordExpiresAt: string | null;
|
|
1482
|
+
lastLoginIP: string | null;
|
|
1483
|
+
lastLoginDevice: string | null;
|
|
1484
|
+
lastActivityAt: string | null;
|
|
1485
|
+
createdAt: string;
|
|
1486
|
+
updatedAt: string | null;
|
|
1487
|
+
}
|
|
1488
|
+
|
|
1489
|
+
interface UserAdminRequest {
|
|
1490
|
+
username: string;
|
|
1491
|
+
firstName: string;
|
|
1492
|
+
lastName: string;
|
|
1493
|
+
email: string;
|
|
1494
|
+
phone: string;
|
|
1495
|
+
areaCodeId: number;
|
|
1496
|
+
birthday: string;
|
|
1497
|
+
genderId: number;
|
|
1498
|
+
roleId: number;
|
|
1499
|
+
userTypeId: number;
|
|
1500
|
+
}
|
|
1501
|
+
|
|
1502
|
+
interface UserAuthAdminRequest {
|
|
1503
|
+
userId: number;
|
|
1504
|
+
securityLevel: number;
|
|
1505
|
+
clientId: string;
|
|
1506
|
+
requireEmailConfirmation?: boolean;
|
|
1507
|
+
}
|
|
1508
|
+
|
|
1509
|
+
interface ChangePasswordAdminRequest {
|
|
1510
|
+
newPassword: string;
|
|
1511
|
+
}
|
|
1512
|
+
|
|
1513
|
+
interface UserAdminFilter {
|
|
1514
|
+
Search?: string;
|
|
1515
|
+
Username?: string;
|
|
1516
|
+
FirstName?: string;
|
|
1517
|
+
LastName?: string;
|
|
1518
|
+
Email?: string;
|
|
1519
|
+
Phone?: string;
|
|
1520
|
+
RoleId?: number;
|
|
1521
|
+
UserTypeId?: number;
|
|
1522
|
+
IsActive?: boolean;
|
|
1523
|
+
}
|
|
1524
|
+
|
|
1525
|
+
interface UserAdminUpdateRequest {
|
|
1526
|
+
username: string;
|
|
1527
|
+
firstName: string;
|
|
1528
|
+
lastName: string;
|
|
1529
|
+
email: string;
|
|
1530
|
+
phone: string;
|
|
1531
|
+
areaCodeId: number;
|
|
1532
|
+
birthday?: string;
|
|
1533
|
+
genderId: number;
|
|
1534
|
+
roleId: number;
|
|
1535
|
+
userTypeId: number;
|
|
1536
|
+
}
|
|
1537
|
+
|
|
1538
|
+
interface UserAuthUpdateRequest {
|
|
1539
|
+
securityLevel: number;
|
|
1540
|
+
clientId: string;
|
|
1541
|
+
isTwoFactorEnabled?: boolean;
|
|
1542
|
+
emailVerified?: boolean;
|
|
1543
|
+
phoneVerified?: boolean;
|
|
1544
|
+
}
|
|
1545
|
+
|
|
1546
|
+
interface ChangePasswordUserRequest {
|
|
1547
|
+
currentPassword: string;
|
|
1548
|
+
newPassword: string;
|
|
1549
|
+
}
|
|
1550
|
+
|
|
1551
|
+
/**
|
|
1552
|
+
* Interfaz que representa un rol del sistema.
|
|
1553
|
+
*/
|
|
1554
|
+
interface Role {
|
|
1555
|
+
roleId: number;
|
|
1556
|
+
role: string;
|
|
1557
|
+
key?: string;
|
|
1558
|
+
description?: string;
|
|
1559
|
+
userTypeId: number;
|
|
1560
|
+
isActive: boolean;
|
|
1561
|
+
}
|
|
1562
|
+
/**
|
|
1563
|
+
* Request para crear o actualizar un rol.
|
|
1564
|
+
*/
|
|
1565
|
+
interface RoleRequest {
|
|
1566
|
+
role: string;
|
|
1567
|
+
userTypeId: number;
|
|
1568
|
+
key?: string;
|
|
1569
|
+
description?: string;
|
|
1570
|
+
isActive?: boolean;
|
|
1571
|
+
}
|
|
1572
|
+
/**
|
|
1573
|
+
* Filtros disponibles para buscar roles.
|
|
1574
|
+
*/
|
|
1575
|
+
interface RolesFilter {
|
|
1576
|
+
/** Búsqueda general */
|
|
1577
|
+
Search?: string;
|
|
1578
|
+
/** Filtro por nombre del rol (búsqueda parcial) */
|
|
1579
|
+
Role?: string;
|
|
1580
|
+
/** Filtro por descripción (búsqueda parcial) */
|
|
1581
|
+
Description?: string;
|
|
1582
|
+
/** Filtro por estado activo/inactivo */
|
|
1583
|
+
IsActive?: boolean;
|
|
1584
|
+
}
|
|
1585
|
+
interface RoleUserProfile {
|
|
1586
|
+
roleId: number;
|
|
1587
|
+
role: string;
|
|
1588
|
+
}
|
|
1589
|
+
|
|
1590
|
+
interface UserBasicResponse {
|
|
1591
|
+
username: string;
|
|
1592
|
+
firstName: string;
|
|
1593
|
+
lastName: string;
|
|
1594
|
+
fullName: string;
|
|
1595
|
+
email: string;
|
|
1596
|
+
phone: string;
|
|
1597
|
+
role: UserRole;
|
|
1598
|
+
userType: UserType$1;
|
|
1599
|
+
isActive: boolean;
|
|
1600
|
+
securityLevel: number;
|
|
1601
|
+
}
|
|
1602
|
+
interface UserRole {
|
|
1603
|
+
roleId: number;
|
|
1604
|
+
key: string;
|
|
1605
|
+
role: string;
|
|
1606
|
+
}
|
|
1607
|
+
interface UserType$1 {
|
|
1608
|
+
userTypeId: number;
|
|
1609
|
+
key: string;
|
|
1610
|
+
userType: string;
|
|
1611
|
+
}
|
|
1612
|
+
|
|
1613
|
+
interface UserDataUpdateRequest {
|
|
1614
|
+
username: string;
|
|
1615
|
+
firstName: string;
|
|
1616
|
+
lastName: string;
|
|
1617
|
+
areaCodeId: number;
|
|
1618
|
+
phone: string;
|
|
1619
|
+
birthday: Date;
|
|
1620
|
+
profilePhoto: string;
|
|
1621
|
+
}
|
|
1622
|
+
|
|
1623
|
+
/**
|
|
1624
|
+
* Interfaz que representa un tipo de usuario.
|
|
1625
|
+
*/
|
|
1626
|
+
interface UserType {
|
|
1627
|
+
userTypeId: number;
|
|
1628
|
+
userType: string;
|
|
1629
|
+
key?: string;
|
|
1630
|
+
description?: string;
|
|
1631
|
+
}
|
|
1632
|
+
/**
|
|
1633
|
+
* Request para crear o actualizar un tipo de usuario.
|
|
1634
|
+
*/
|
|
1635
|
+
interface UserTypeRequest {
|
|
1636
|
+
userType: string;
|
|
1637
|
+
key?: string;
|
|
1638
|
+
description?: string;
|
|
1639
|
+
}
|
|
1640
|
+
/**
|
|
1641
|
+
* Filtros disponibles para buscar tipos de usuario.
|
|
1642
|
+
*/
|
|
1643
|
+
interface UserTypesFilter {
|
|
1644
|
+
/** Búsqueda general */
|
|
1645
|
+
Search?: string;
|
|
1646
|
+
/** Filtro por tipo de usuario (búsqueda parcial) */
|
|
1647
|
+
UserType?: string;
|
|
1648
|
+
/** Filtro por key (búsqueda parcial) */
|
|
1649
|
+
Key?: string;
|
|
1650
|
+
/** Filtro por descripción (búsqueda parcial) */
|
|
1651
|
+
Description?: string;
|
|
1652
|
+
}
|
|
1653
|
+
interface UserTypeUserProfile {
|
|
1654
|
+
userTypeId: number;
|
|
1655
|
+
userType: string;
|
|
1656
|
+
}
|
|
1657
|
+
|
|
1658
|
+
interface UserProfileResponse {
|
|
1659
|
+
username: string;
|
|
1660
|
+
firstName: string;
|
|
1661
|
+
lastName: string;
|
|
1662
|
+
fullName: string;
|
|
1663
|
+
email: string;
|
|
1664
|
+
phone: string;
|
|
1665
|
+
profilePhoto: string;
|
|
1666
|
+
areaCode: AreaCodeUserProfile;
|
|
1667
|
+
birthday: Date;
|
|
1668
|
+
gender: GenderUserProfile;
|
|
1669
|
+
role: RoleUserProfile;
|
|
1670
|
+
userType: UserTypeUserProfile;
|
|
1671
|
+
userReferralCode: string;
|
|
1672
|
+
securityLevel: number;
|
|
1673
|
+
emailVerified: boolean;
|
|
1674
|
+
phoneVerified: boolean;
|
|
1675
|
+
lastLogin: Date;
|
|
1676
|
+
mustChangePassword: boolean;
|
|
1677
|
+
passwordExpiresAt: Date;
|
|
1678
|
+
isActive: boolean;
|
|
1679
|
+
createdAt: Date;
|
|
1680
|
+
updatedAt: Date;
|
|
1681
|
+
}
|
|
1682
|
+
|
|
1683
|
+
declare class UserService {
|
|
1684
|
+
private api;
|
|
1685
|
+
private readonly BASE_PATH;
|
|
1686
|
+
constructor(api: API);
|
|
2140
1687
|
/**
|
|
2141
|
-
* Obtiene
|
|
2142
|
-
|
|
2143
|
-
|
|
1688
|
+
* Obtiene la información básica del usuario.
|
|
1689
|
+
* @returns retorna un objeto con la información básica del usuario
|
|
1690
|
+
*/
|
|
1691
|
+
me(): Promise<ResponseModel<UserBasicResponse>>;
|
|
2144
1692
|
/**
|
|
2145
|
-
* Obtiene
|
|
2146
|
-
* @
|
|
1693
|
+
* Obtiene la información general del usuario para la vista de perfil.
|
|
1694
|
+
* @returns
|
|
2147
1695
|
*/
|
|
2148
|
-
|
|
1696
|
+
profile(): Promise<ResponseModel<UserProfileResponse>>;
|
|
1697
|
+
changePasswordUser(request: ChangePasswordUserRequest): Promise<ResponseModel>;
|
|
1698
|
+
updateUserData(request: UserDataUpdateRequest): Promise<ResponseModel>;
|
|
2149
1699
|
/**
|
|
2150
|
-
* Crea un nuevo
|
|
2151
|
-
* @param request - Datos del
|
|
1700
|
+
* Crea un nuevo usuario administrador.
|
|
1701
|
+
* @param request - Datos del nuevo administrador
|
|
2152
1702
|
*/
|
|
2153
|
-
|
|
1703
|
+
newAdminUser(request: UserAdminRequest): Promise<ResponseModel<AdminUser>>;
|
|
2154
1704
|
/**
|
|
2155
|
-
*
|
|
2156
|
-
* @param
|
|
2157
|
-
* @param request - Nuevos datos del estatus
|
|
1705
|
+
* Crea la autenticación para un usuario.
|
|
1706
|
+
* @param request - Datos de autenticación del usuario
|
|
2158
1707
|
*/
|
|
2159
|
-
|
|
1708
|
+
createUserAuthentication(request: UserAuthAdminRequest): Promise<ResponseModel<AdminAuthentication>>;
|
|
2160
1709
|
/**
|
|
2161
|
-
*
|
|
2162
|
-
* @param id - ID del
|
|
1710
|
+
* Cambia la contraseña de un administrador.
|
|
1711
|
+
* @param id - ID del usuario
|
|
1712
|
+
* @param request - Nueva contraseña
|
|
2163
1713
|
*/
|
|
2164
|
-
|
|
1714
|
+
changePasswordAdmin(id: number, request: ChangePasswordAdminRequest): Promise<ResponseModel>;
|
|
2165
1715
|
/**
|
|
2166
|
-
* Obtiene todos los
|
|
1716
|
+
* Obtiene todos los administradores con filtros opcionales.
|
|
2167
1717
|
* @param filter - Filtros opcionales para la búsqueda
|
|
2168
1718
|
*/
|
|
2169
|
-
|
|
2170
|
-
/**
|
|
2171
|
-
* Obtiene el modelo de filtros disponibles para estudios.
|
|
2172
|
-
*/
|
|
2173
|
-
getStudioFiltersModel(): Promise<ResponseModel<FilterGroupsModel>>;
|
|
2174
|
-
/**
|
|
2175
|
-
* Obtiene un estudio por su ID.
|
|
2176
|
-
* @param id - ID del estudio
|
|
2177
|
-
*/
|
|
2178
|
-
getStudioById(id: number): Promise<ResponseModel<Studio>>;
|
|
2179
|
-
/**
|
|
2180
|
-
* Crea un nuevo estudio.
|
|
2181
|
-
* @param request - Datos del estudio a crear
|
|
2182
|
-
*/
|
|
2183
|
-
createStudio(request: StudioRequest): Promise<ResponseModel<Studio>>;
|
|
2184
|
-
/**
|
|
2185
|
-
* Actualiza un estudio existente.
|
|
2186
|
-
* @param id - ID del estudio a actualizar
|
|
2187
|
-
* @param request - Nuevos datos del estudio
|
|
2188
|
-
*/
|
|
2189
|
-
updateStudio(id: number, request: StudioRequest): Promise<ResponseModel<Studio>>;
|
|
2190
|
-
/**
|
|
2191
|
-
* Activa o desactiva un estudio.
|
|
2192
|
-
* @param id - ID del estudio
|
|
2193
|
-
*/
|
|
2194
|
-
toggleStudioStatus(id: number): Promise<ResponseModel<Studio>>;
|
|
1719
|
+
getAllAdmins(filter?: UserAdminFilter): Promise<ResponseModel<AdminUser[]>>;
|
|
2195
1720
|
/**
|
|
2196
|
-
*
|
|
2197
|
-
* @param id - ID del estudio a eliminar
|
|
1721
|
+
* Obtiene el modelo de filtros disponibles para administradores.
|
|
2198
1722
|
*/
|
|
2199
|
-
|
|
1723
|
+
getAdminFiltersModel(): Promise<ResponseModel<FilterGroupsModel>>;
|
|
2200
1724
|
/**
|
|
2201
|
-
* Obtiene
|
|
2202
|
-
* @param
|
|
1725
|
+
* Obtiene un administrador por su ID.
|
|
1726
|
+
* @param id - ID del administrador
|
|
2203
1727
|
*/
|
|
2204
|
-
|
|
1728
|
+
getAdminById(id: number): Promise<ResponseModel<AdminUser>>;
|
|
2205
1729
|
/**
|
|
2206
|
-
* Obtiene
|
|
1730
|
+
* Obtiene la autenticación de un administrador.
|
|
1731
|
+
* @param id - ID del usuario
|
|
2207
1732
|
*/
|
|
2208
|
-
|
|
1733
|
+
getAdminAuthentication(id: number): Promise<ResponseModel<AdminAuthentication>>;
|
|
2209
1734
|
/**
|
|
2210
|
-
*
|
|
2211
|
-
* @param id - ID
|
|
1735
|
+
* Actualiza un administrador existente.
|
|
1736
|
+
* @param id - ID del administrador
|
|
1737
|
+
* @param request - Nuevos datos del administrador
|
|
2212
1738
|
*/
|
|
2213
|
-
|
|
1739
|
+
updateAdmin(id: number, request: UserAdminUpdateRequest): Promise<ResponseModel<AdminUser>>;
|
|
2214
1740
|
/**
|
|
2215
|
-
*
|
|
2216
|
-
* @param
|
|
1741
|
+
* Activa o desactiva un administrador.
|
|
1742
|
+
* @param id - ID del administrador
|
|
2217
1743
|
*/
|
|
2218
|
-
|
|
1744
|
+
toggleAdminStatus(id: number): Promise<ResponseModel<AdminUser>>;
|
|
2219
1745
|
/**
|
|
2220
|
-
* Actualiza
|
|
2221
|
-
* @param id - ID
|
|
2222
|
-
* @param request - Nuevos datos de
|
|
1746
|
+
* Actualiza la autenticación de un administrador.
|
|
1747
|
+
* @param id - ID del usuario
|
|
1748
|
+
* @param request - Nuevos datos de autenticación
|
|
2223
1749
|
*/
|
|
2224
|
-
|
|
1750
|
+
updateAdminAuthentication(id: number, request: UserAuthUpdateRequest): Promise<ResponseModel<AdminAuthentication>>;
|
|
2225
1751
|
/**
|
|
2226
|
-
*
|
|
2227
|
-
* @param id - ID
|
|
1752
|
+
* Elimina un administrador.
|
|
1753
|
+
* @param id - ID del administrador
|
|
2228
1754
|
*/
|
|
2229
|
-
|
|
1755
|
+
deleteAdmin(id: number): Promise<ResponseModel>;
|
|
2230
1756
|
/**
|
|
2231
|
-
*
|
|
2232
|
-
* @param id - ID
|
|
1757
|
+
* Reenvía el correo de confirmación al usuario.
|
|
1758
|
+
* @param id - ID del usuario
|
|
2233
1759
|
*/
|
|
2234
|
-
|
|
1760
|
+
resendEmailConfirmation(id: number): Promise<ResponseModel>;
|
|
2235
1761
|
/**
|
|
2236
|
-
* Obtiene todos los
|
|
1762
|
+
* Obtiene todos los tipos de usuario con filtros opcionales.
|
|
2237
1763
|
* @param filter - Filtros opcionales para la búsqueda
|
|
2238
1764
|
*/
|
|
2239
|
-
|
|
2240
|
-
/**
|
|
2241
|
-
* Obtiene el modelo de filtros disponibles para proveedores.
|
|
2242
|
-
*/
|
|
2243
|
-
getProviderFiltersModel(): Promise<ResponseModel<FilterGroupsModel>>;
|
|
1765
|
+
getUserTypes(filter?: UserTypesFilter): Promise<ResponseModel<UserType[]>>;
|
|
2244
1766
|
/**
|
|
2245
|
-
* Obtiene
|
|
2246
|
-
* @param id - ID del proveedor
|
|
1767
|
+
* Obtiene el modelo de filtros disponibles para tipos de usuario.
|
|
2247
1768
|
*/
|
|
2248
|
-
|
|
1769
|
+
getUserTypesFilters(): Promise<ResponseModel<FilterGroupsModel>>;
|
|
2249
1770
|
/**
|
|
2250
|
-
*
|
|
2251
|
-
* @param
|
|
1771
|
+
* Obtiene un tipo de usuario por su ID.
|
|
1772
|
+
* @param id - ID del tipo de usuario
|
|
2252
1773
|
*/
|
|
2253
|
-
|
|
1774
|
+
getUserTypeById(id: number): Promise<ResponseModel<UserType>>;
|
|
2254
1775
|
/**
|
|
2255
|
-
*
|
|
2256
|
-
* @param
|
|
2257
|
-
* @param request - Nuevos datos del proveedor
|
|
1776
|
+
* Crea un nuevo tipo de usuario.
|
|
1777
|
+
* @param request - Datos del tipo de usuario a crear
|
|
2258
1778
|
*/
|
|
2259
|
-
|
|
1779
|
+
createUserType(request: UserTypeRequest): Promise<ResponseModel<UserType>>;
|
|
2260
1780
|
/**
|
|
2261
|
-
*
|
|
2262
|
-
* @param id - ID del
|
|
1781
|
+
* Actualiza un tipo de usuario existente.
|
|
1782
|
+
* @param id - ID del tipo de usuario a actualizar
|
|
1783
|
+
* @param request - Nuevos datos del tipo de usuario
|
|
2263
1784
|
*/
|
|
2264
|
-
|
|
1785
|
+
updateUserType(id: number, request: UserTypeRequest): Promise<ResponseModel<UserType>>;
|
|
2265
1786
|
/**
|
|
2266
|
-
* Elimina un
|
|
2267
|
-
* @param id - ID del
|
|
1787
|
+
* Elimina un tipo de usuario.
|
|
1788
|
+
* @param id - ID del tipo de usuario a eliminar
|
|
2268
1789
|
*/
|
|
2269
|
-
|
|
2270
|
-
}
|
|
2271
|
-
|
|
2272
|
-
/**
|
|
2273
|
-
* Interfaz que representa un género del catálogo.
|
|
2274
|
-
*/
|
|
2275
|
-
interface Gender {
|
|
2276
|
-
genderId: number;
|
|
2277
|
-
gender: string;
|
|
2278
|
-
createdAt: string;
|
|
2279
|
-
updatedAt: string | null;
|
|
2280
|
-
deleted: boolean;
|
|
2281
|
-
}
|
|
2282
|
-
/**
|
|
2283
|
-
* Request para crear o actualizar un género.
|
|
2284
|
-
*/
|
|
2285
|
-
interface GenderRequest {
|
|
2286
|
-
gender: string;
|
|
2287
|
-
}
|
|
2288
|
-
/**
|
|
2289
|
-
* Filtros disponibles para buscar géneros.
|
|
2290
|
-
*/
|
|
2291
|
-
interface GendersFilter {
|
|
2292
|
-
/** Búsqueda general */
|
|
2293
|
-
Search?: string;
|
|
2294
|
-
/** Filtro por nombre del género (búsqueda parcial) */
|
|
2295
|
-
Gender?: string;
|
|
2296
|
-
}
|
|
2297
|
-
|
|
2298
|
-
/**
|
|
2299
|
-
* Interfaz que representa un código de área del catálogo.
|
|
2300
|
-
*/
|
|
2301
|
-
interface AreaCode {
|
|
2302
|
-
areaCodeId: number;
|
|
2303
|
-
countryCode: string;
|
|
2304
|
-
iso: string;
|
|
2305
|
-
countryName: string;
|
|
2306
|
-
isActive: boolean;
|
|
2307
|
-
createdAt: string;
|
|
2308
|
-
updatedAt: string | null;
|
|
2309
|
-
deleted: boolean;
|
|
2310
|
-
}
|
|
2311
|
-
/**
|
|
2312
|
-
* Request para crear o actualizar un código de área.
|
|
2313
|
-
*/
|
|
2314
|
-
interface AreaCodeRequest {
|
|
2315
|
-
countryCode: string;
|
|
2316
|
-
iso: string;
|
|
2317
|
-
countryName: string;
|
|
2318
|
-
isActive?: boolean;
|
|
2319
|
-
}
|
|
2320
|
-
/**
|
|
2321
|
-
* Filtros disponibles para buscar códigos de área.
|
|
2322
|
-
*/
|
|
2323
|
-
interface AreaCodesFilter {
|
|
2324
|
-
/** Búsqueda general */
|
|
2325
|
-
Search?: string;
|
|
2326
|
-
/** Filtro por código de país (búsqueda parcial) */
|
|
2327
|
-
CountryCode?: string;
|
|
2328
|
-
/** Filtro por ISO (búsqueda parcial) */
|
|
2329
|
-
ISO?: string;
|
|
2330
|
-
/** Filtro por nombre de país (búsqueda parcial) */
|
|
2331
|
-
CountryName?: string;
|
|
2332
|
-
/** Filtro por estado activo/inactivo */
|
|
2333
|
-
IsActive?: boolean;
|
|
2334
|
-
}
|
|
2335
|
-
|
|
2336
|
-
/**
|
|
2337
|
-
* Servicio para gestionar catálogos públicos.
|
|
2338
|
-
* No requiere autenticación.
|
|
2339
|
-
*/
|
|
2340
|
-
declare class CatalogService {
|
|
2341
|
-
private api;
|
|
2342
|
-
private readonly BASE_PATH;
|
|
2343
|
-
constructor(api: API);
|
|
1790
|
+
deleteUserType(id: number): Promise<ResponseModel<void>>;
|
|
2344
1791
|
/**
|
|
2345
|
-
* Obtiene todos los
|
|
1792
|
+
* Obtiene todos los roles con filtros opcionales.
|
|
2346
1793
|
* @param filter - Filtros opcionales para la búsqueda
|
|
2347
1794
|
*/
|
|
2348
|
-
|
|
2349
|
-
/**
|
|
2350
|
-
* Obtiene el modelo de filtros disponibles para géneros.
|
|
2351
|
-
*/
|
|
2352
|
-
getGendersFilters(): Promise<ResponseModel<FilterGroupsModel>>;
|
|
2353
|
-
/**
|
|
2354
|
-
* Obtiene un género por su ID.
|
|
2355
|
-
* @param id - ID del género
|
|
2356
|
-
*/
|
|
2357
|
-
getGenderById(id: number): Promise<ResponseModel<Gender>>;
|
|
2358
|
-
/**
|
|
2359
|
-
* Crea un nuevo género.
|
|
2360
|
-
* @param request - Datos del género a crear
|
|
2361
|
-
*/
|
|
2362
|
-
createGender(request: GenderRequest): Promise<ResponseModel<Gender>>;
|
|
2363
|
-
/**
|
|
2364
|
-
* Actualiza un género existente.
|
|
2365
|
-
* @param id - ID del género a actualizar
|
|
2366
|
-
* @param request - Nuevos datos del género
|
|
2367
|
-
*/
|
|
2368
|
-
updateGender(id: number, request: GenderRequest): Promise<ResponseModel<Gender>>;
|
|
2369
|
-
/**
|
|
2370
|
-
* Elimina un género.
|
|
2371
|
-
* @param id - ID del género a eliminar
|
|
2372
|
-
*/
|
|
2373
|
-
deleteGender(id: number): Promise<ResponseModel<void>>;
|
|
1795
|
+
getRoles(filter?: RolesFilter): Promise<ResponseModel<Role[]>>;
|
|
2374
1796
|
/**
|
|
2375
|
-
* Obtiene
|
|
2376
|
-
* @param filter - Filtros opcionales para la búsqueda
|
|
1797
|
+
* Obtiene el modelo de filtros disponibles para roles.
|
|
2377
1798
|
*/
|
|
2378
|
-
|
|
1799
|
+
getRolesFilters(): Promise<ResponseModel<FilterGroupsModel>>;
|
|
2379
1800
|
/**
|
|
2380
|
-
* Obtiene
|
|
1801
|
+
* Obtiene un rol por su ID.
|
|
1802
|
+
* @param id - ID del rol
|
|
2381
1803
|
*/
|
|
2382
|
-
|
|
1804
|
+
getRoleById(id: number): Promise<ResponseModel<Role>>;
|
|
2383
1805
|
/**
|
|
2384
|
-
* Obtiene
|
|
2385
|
-
* @param
|
|
1806
|
+
* Obtiene los roles asociados a un tipo de usuario.
|
|
1807
|
+
* @param userTypeId - ID del tipo de usuario
|
|
2386
1808
|
*/
|
|
2387
|
-
|
|
1809
|
+
getRolesByUserType(userTypeId: number): Promise<ResponseModel<Role[]>>;
|
|
2388
1810
|
/**
|
|
2389
|
-
* Crea un nuevo
|
|
2390
|
-
* @param request - Datos del
|
|
1811
|
+
* Crea un nuevo rol.
|
|
1812
|
+
* @param request - Datos del rol a crear
|
|
2391
1813
|
*/
|
|
2392
|
-
|
|
1814
|
+
createRole(request: RoleRequest): Promise<ResponseModel<Role>>;
|
|
2393
1815
|
/**
|
|
2394
|
-
* Actualiza un
|
|
2395
|
-
* @param id - ID del
|
|
2396
|
-
* @param request - Nuevos datos del
|
|
1816
|
+
* Actualiza un rol existente.
|
|
1817
|
+
* @param id - ID del rol a actualizar
|
|
1818
|
+
* @param request - Nuevos datos del rol
|
|
2397
1819
|
*/
|
|
2398
|
-
|
|
1820
|
+
updateRole(id: number, request: RoleRequest): Promise<ResponseModel<Role>>;
|
|
2399
1821
|
/**
|
|
2400
|
-
* Activa o desactiva un
|
|
2401
|
-
* @param id - ID del
|
|
1822
|
+
* Activa o desactiva un rol.
|
|
1823
|
+
* @param id - ID del rol
|
|
2402
1824
|
*/
|
|
2403
|
-
|
|
1825
|
+
toggleRoleStatus(id: number): Promise<ResponseModel<Role>>;
|
|
2404
1826
|
/**
|
|
2405
|
-
* Elimina un
|
|
2406
|
-
* @param id - ID del
|
|
1827
|
+
* Elimina un rol.
|
|
1828
|
+
* @param id - ID del rol a eliminar
|
|
2407
1829
|
*/
|
|
2408
|
-
|
|
1830
|
+
deleteRole(id: number): Promise<ResponseModel<void>>;
|
|
2409
1831
|
}
|
|
2410
1832
|
|
|
2411
1833
|
/**
|
|
@@ -2416,8 +1838,8 @@ declare class FalconHUBSDK {
|
|
|
2416
1838
|
user: UserService;
|
|
2417
1839
|
system: SystemService;
|
|
2418
1840
|
inventory: InventoryService;
|
|
2419
|
-
product: ProductService;
|
|
2420
1841
|
catalog: CatalogService;
|
|
1842
|
+
product: ProductService;
|
|
2421
1843
|
private serviceProperties;
|
|
2422
1844
|
private cryptoService;
|
|
2423
1845
|
private tokenManager;
|
|
@@ -2450,4 +1872,4 @@ declare class FalconHUBSDK {
|
|
|
2450
1872
|
|
|
2451
1873
|
declare function decrypt(encryptedBase64: string, secret: string, timestamp: string): string;
|
|
2452
1874
|
|
|
2453
|
-
export { API, type AdminAuthentication, type AdminUser, type AreaCode, type AreaCodeRequest, type AreaCodesFilter, AuthInterceptor, type AuthInterceptorConfig, AuthService, type
|
|
1875
|
+
export { API, type AdminAuthentication, type AdminUser, type AreaCode, type AreaCodeRequest, type AreaCodeUserProfile, type AreaCodesFilter, AuthInterceptor, type AuthInterceptorConfig, AuthService, type Blank, type BlankRequest, type BlanksFilter, 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 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, ProductService, 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 Size, type SizeGroup, type SizeGroupRequest, type SizeGroupsFilter, type SizeRequest, type SizesFilter, 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, UserService, type UserType, type UserTypeRequest, type UserTypeUserProfile, type UserTypesFilter, type ValidateOtpRequest, type ValidateSessionRenewedResponse, type ValidateSessionResponse, decrypt };
|