@pittaj/contracts 1.2.2 → 1.3.2
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/README.md +53 -53
- package/package.json +1 -1
- package/dist/company/dtos/CompanyDTO.d.ts +0 -79
- package/dist/company/dtos/CompanyDTO.d.ts.map +0 -1
- package/dist/company/dtos/CompanyDTO.js +0 -12
- package/dist/company/dtos/CompanyDTO.js.map +0 -1
- package/dist/company/dtos/CreatedCompanyDTO.d.ts +0 -72
- package/dist/company/dtos/CreatedCompanyDTO.d.ts.map +0 -1
- package/dist/company/dtos/CreatedCompanyDTO.js +0 -12
- package/dist/company/dtos/CreatedCompanyDTO.js.map +0 -1
- package/dist/company/dtos/index.d.ts +0 -9
- package/dist/company/dtos/index.d.ts.map +0 -1
- package/dist/company/dtos/index.js +0 -8
- package/dist/company/dtos/index.js.map +0 -1
- package/dist/hono.d.ts +0 -47
- package/dist/hono.d.ts.map +0 -1
- package/dist/hono.js +0 -7
- package/dist/hono.js.map +0 -1
- package/dist/http/ResponseBase.d.ts +0 -161
- package/dist/http/ResponseBase.d.ts.map +0 -1
- package/dist/http/ResponseBase.js +0 -183
- package/dist/http/ResponseBase.js.map +0 -1
- package/dist/location/dtos/CreatedLocationDTO.d.ts +0 -94
- package/dist/location/dtos/CreatedLocationDTO.d.ts.map +0 -1
- package/dist/location/dtos/CreatedLocationDTO.js +0 -12
- package/dist/location/dtos/CreatedLocationDTO.js.map +0 -1
- package/dist/location/dtos/LocationDTO.d.ts +0 -125
- package/dist/location/dtos/LocationDTO.d.ts.map +0 -1
- package/dist/location/dtos/LocationDTO.js +0 -12
- package/dist/location/dtos/LocationDTO.js.map +0 -1
- package/dist/location/dtos/index.d.ts +0 -9
- package/dist/location/dtos/index.d.ts.map +0 -1
- package/dist/location/dtos/index.js +0 -8
- package/dist/location/dtos/index.js.map +0 -1
- package/dist/permission/PaginatedPermissionsDTO.d.ts +0 -59
- package/dist/permission/PaginatedPermissionsDTO.d.ts.map +0 -1
- package/dist/permission/PaginatedPermissionsDTO.js +0 -7
- package/dist/permission/PaginatedPermissionsDTO.js.map +0 -1
- package/dist/permission/PermissionDTO.d.ts +0 -66
- package/dist/permission/PermissionDTO.d.ts.map +0 -1
- package/dist/permission/PermissionDTO.js +0 -7
- package/dist/permission/PermissionDTO.js.map +0 -1
- package/dist/permission/getPermissionByIdSchema.d.ts +0 -36
- package/dist/permission/getPermissionByIdSchema.d.ts.map +0 -1
- package/dist/permission/getPermissionByIdSchema.js +0 -30
- package/dist/permission/getPermissionByIdSchema.js.map +0 -1
- package/dist/permission/getPermissionsSchema.d.ts +0 -71
- package/dist/permission/getPermissionsSchema.d.ts.map +0 -1
- package/dist/permission/getPermissionsSchema.js +0 -55
- package/dist/permission/getPermissionsSchema.js.map +0 -1
- package/dist/primitives/AttributeValue.d.ts +0 -2
- package/dist/primitives/AttributeValue.d.ts.map +0 -1
- package/dist/primitives/AttributeValue.js +0 -2
- package/dist/primitives/AttributeValue.js.map +0 -1
- package/dist/primitives/AuthClaimsDto.d.ts +0 -7
- package/dist/primitives/AuthClaimsDto.d.ts.map +0 -1
- package/dist/primitives/AuthClaimsDto.js +0 -2
- package/dist/primitives/AuthClaimsDto.js.map +0 -1
- package/dist/primitives/AuthUserDto.d.ts +0 -8
- package/dist/primitives/AuthUserDto.d.ts.map +0 -1
- package/dist/primitives/AuthUserDto.js +0 -2
- package/dist/primitives/AuthUserDto.js.map +0 -1
- package/dist/primitives/CashClosurePaymentSummaryPrimitives.d.ts +0 -10
- package/dist/primitives/CashClosurePaymentSummaryPrimitives.d.ts.map +0 -1
- package/dist/primitives/CashClosurePaymentSummaryPrimitives.js +0 -2
- package/dist/primitives/CashClosurePaymentSummaryPrimitives.js.map +0 -1
- package/dist/primitives/CashClosurePeriodPrimitives.d.ts +0 -5
- package/dist/primitives/CashClosurePeriodPrimitives.d.ts.map +0 -1
- package/dist/primitives/CashClosurePeriodPrimitives.js +0 -2
- package/dist/primitives/CashClosurePeriodPrimitives.js.map +0 -1
- package/dist/primitives/CashMovementPrimitives.d.ts +0 -11
- package/dist/primitives/CashMovementPrimitives.d.ts.map +0 -1
- package/dist/primitives/CashMovementPrimitives.js +0 -2
- package/dist/primitives/CashMovementPrimitives.js.map +0 -1
- package/dist/primitives/ClosingBalancePrimitives.d.ts +0 -7
- package/dist/primitives/ClosingBalancePrimitives.d.ts.map +0 -1
- package/dist/primitives/ClosingBalancePrimitives.js +0 -2
- package/dist/primitives/ClosingBalancePrimitives.js.map +0 -1
- package/dist/primitives/CustomerAddressPrimitives.d.ts +0 -9
- package/dist/primitives/CustomerAddressPrimitives.d.ts.map +0 -1
- package/dist/primitives/CustomerAddressPrimitives.js +0 -2
- package/dist/primitives/CustomerAddressPrimitives.js.map +0 -1
- package/dist/primitives/CustomerCreditConfigPrimitives.d.ts +0 -7
- package/dist/primitives/CustomerCreditConfigPrimitives.d.ts.map +0 -1
- package/dist/primitives/CustomerCreditConfigPrimitives.js +0 -2
- package/dist/primitives/CustomerCreditConfigPrimitives.js.map +0 -1
- package/dist/primitives/DeliveryAddressPrimitives.d.ts +0 -14
- package/dist/primitives/DeliveryAddressPrimitives.d.ts.map +0 -1
- package/dist/primitives/DeliveryAddressPrimitives.js +0 -2
- package/dist/primitives/DeliveryAddressPrimitives.js.map +0 -1
- package/dist/primitives/MoneyPrimitives.d.ts +0 -5
- package/dist/primitives/MoneyPrimitives.d.ts.map +0 -1
- package/dist/primitives/MoneyPrimitives.js +0 -2
- package/dist/primitives/MoneyPrimitives.js.map +0 -1
- package/dist/primitives/OpeningBalancePrimitives.d.ts +0 -5
- package/dist/primitives/OpeningBalancePrimitives.d.ts.map +0 -1
- package/dist/primitives/OpeningBalancePrimitives.js +0 -2
- package/dist/primitives/OpeningBalancePrimitives.js.map +0 -1
- package/dist/primitives/PaymentMethodConfigPrimitives.d.ts +0 -7
- package/dist/primitives/PaymentMethodConfigPrimitives.d.ts.map +0 -1
- package/dist/primitives/PaymentMethodConfigPrimitives.js +0 -2
- package/dist/primitives/PaymentMethodConfigPrimitives.js.map +0 -1
- package/dist/primitives/PosTicketLinePrimitives.d.ts +0 -5
- package/dist/primitives/PosTicketLinePrimitives.d.ts.map +0 -1
- package/dist/primitives/PosTicketLinePrimitives.js +0 -2
- package/dist/primitives/PosTicketLinePrimitives.js.map +0 -1
- package/dist/primitives/PosTicketPaymentPrimitives.d.ts +0 -5
- package/dist/primitives/PosTicketPaymentPrimitives.d.ts.map +0 -1
- package/dist/primitives/PosTicketPaymentPrimitives.js +0 -2
- package/dist/primitives/PosTicketPaymentPrimitives.js.map +0 -1
- package/dist/primitives/ProductInventoryConfigPrimitives.d.ts +0 -9
- package/dist/primitives/ProductInventoryConfigPrimitives.d.ts.map +0 -1
- package/dist/primitives/ProductInventoryConfigPrimitives.js +0 -2
- package/dist/primitives/ProductInventoryConfigPrimitives.js.map +0 -1
- package/dist/primitives/ProductPosConfigPrimitives.d.ts +0 -9
- package/dist/primitives/ProductPosConfigPrimitives.d.ts.map +0 -1
- package/dist/primitives/ProductPosConfigPrimitives.js +0 -2
- package/dist/primitives/ProductPosConfigPrimitives.js.map +0 -1
- package/dist/primitives/ProductPricePrimitives.d.ts +0 -8
- package/dist/primitives/ProductPricePrimitives.d.ts.map +0 -1
- package/dist/primitives/ProductPricePrimitives.js +0 -2
- package/dist/primitives/ProductPricePrimitives.js.map +0 -1
- package/dist/primitives/ProductTaxInfoPrimitives.d.ts +0 -7
- package/dist/primitives/ProductTaxInfoPrimitives.d.ts.map +0 -1
- package/dist/primitives/ProductTaxInfoPrimitives.js +0 -2
- package/dist/primitives/ProductTaxInfoPrimitives.js.map +0 -1
- package/dist/primitives/SaleLineBasePrimitives.d.ts +0 -16
- package/dist/primitives/SaleLineBasePrimitives.d.ts.map +0 -1
- package/dist/primitives/SaleLineBasePrimitives.js +0 -2
- package/dist/primitives/SaleLineBasePrimitives.js.map +0 -1
- package/dist/primitives/SalePaymentBasePrimitives.d.ts +0 -10
- package/dist/primitives/SalePaymentBasePrimitives.d.ts.map +0 -1
- package/dist/primitives/SalePaymentBasePrimitives.js +0 -2
- package/dist/primitives/SalePaymentBasePrimitives.js.map +0 -1
- package/dist/primitives/SalesOrderLinePrimitives.d.ts +0 -5
- package/dist/primitives/SalesOrderLinePrimitives.d.ts.map +0 -1
- package/dist/primitives/SalesOrderLinePrimitives.js +0 -2
- package/dist/primitives/SalesOrderLinePrimitives.js.map +0 -1
- package/dist/primitives/SalesOrderPaymentPrimitives.d.ts +0 -5
- package/dist/primitives/SalesOrderPaymentPrimitives.d.ts.map +0 -1
- package/dist/primitives/SalesOrderPaymentPrimitives.js +0 -2
- package/dist/primitives/SalesOrderPaymentPrimitives.js.map +0 -1
- package/dist/primitives/SessionSummaryPrimitives.d.ts +0 -12
- package/dist/primitives/SessionSummaryPrimitives.d.ts.map +0 -1
- package/dist/primitives/SessionSummaryPrimitives.js +0 -2
- package/dist/primitives/SessionSummaryPrimitives.js.map +0 -1
- package/dist/primitives/SyncBatchResult.d.ts +0 -8
- package/dist/primitives/SyncBatchResult.d.ts.map +0 -1
- package/dist/primitives/SyncBatchResult.js +0 -2
- package/dist/primitives/SyncBatchResult.js.map +0 -1
- package/dist/primitives/SyncChangeResult.d.ts +0 -6
- package/dist/primitives/SyncChangeResult.d.ts.map +0 -1
- package/dist/primitives/SyncChangeResult.js +0 -2
- package/dist/primitives/SyncChangeResult.js.map +0 -1
- package/dist/primitives/index.d.ts +0 -32
- package/dist/primitives/index.d.ts.map +0 -1
- package/dist/primitives/index.js +0 -7
- package/dist/primitives/index.js.map +0 -1
- package/dist/role/dtos/CreatedRoleDTO.d.ts +0 -62
- package/dist/role/dtos/CreatedRoleDTO.d.ts.map +0 -1
- package/dist/role/dtos/CreatedRoleDTO.js +0 -12
- package/dist/role/dtos/CreatedRoleDTO.js.map +0 -1
- package/dist/role/dtos/RoleDTO.d.ts +0 -70
- package/dist/role/dtos/RoleDTO.d.ts.map +0 -1
- package/dist/role/dtos/RoleDTO.js +0 -12
- package/dist/role/dtos/RoleDTO.js.map +0 -1
- package/dist/role/dtos/index.d.ts +0 -9
- package/dist/role/dtos/index.d.ts.map +0 -1
- package/dist/role/dtos/index.js +0 -8
- package/dist/role/dtos/index.js.map +0 -1
- package/dist/user/dtos/CreatedUserDTO.d.ts +0 -77
- package/dist/user/dtos/CreatedUserDTO.d.ts.map +0 -1
- package/dist/user/dtos/CreatedUserDTO.js +0 -12
- package/dist/user/dtos/CreatedUserDTO.js.map +0 -1
- package/dist/user/dtos/UserDTO.d.ts +0 -84
- package/dist/user/dtos/UserDTO.d.ts.map +0 -1
- package/dist/user/dtos/UserDTO.js +0 -12
- package/dist/user/dtos/UserDTO.js.map +0 -1
- package/dist/user/dtos/index.d.ts +0 -9
- package/dist/user/dtos/index.d.ts.map +0 -1
- package/dist/user/dtos/index.js +0 -8
- package/dist/user/dtos/index.js.map +0 -1
- package/dist/user-role/UserRoleDTO.d.ts +0 -40
- package/dist/user-role/UserRoleDTO.d.ts.map +0 -1
- package/dist/user-role/UserRoleDTO.js +0 -7
- package/dist/user-role/UserRoleDTO.js.map +0 -1
- package/dist/user-role/schemas.d.ts +0 -68
- package/dist/user-role/schemas.d.ts.map +0 -1
- package/dist/user-role/schemas.js +0 -52
- package/dist/user-role/schemas.js.map +0 -1
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview Clase base para respuestas HTTP estandarizadas
|
|
3
|
-
* @module ResponseBase
|
|
4
|
-
* @version 1.0.0
|
|
5
|
-
*
|
|
6
|
-
* PATRÓN DE DEPRECATED PRESERVADO:
|
|
7
|
-
* - Todas las respuestas tienen estructura consistente
|
|
8
|
-
* - Campo `success` para identificar éxito/error
|
|
9
|
-
* - Campo `message` descriptivo
|
|
10
|
-
* - Campo `data` para datos (null en errores)
|
|
11
|
-
* - Campo `errors` array para múltiples errores
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
* // Respuesta exitosa
|
|
15
|
-
* return ResponseBase.success(category, 'Category created successfully');
|
|
16
|
-
*
|
|
17
|
-
* @example
|
|
18
|
-
* // Respuesta de error
|
|
19
|
-
* return ResponseBase.error('Validation failed', ['Name is too short']);
|
|
20
|
-
*/
|
|
21
|
-
/**
|
|
22
|
-
* Clase base para todas las respuestas HTTP.
|
|
23
|
-
*
|
|
24
|
-
* Garantiza estructura consistente en toda la API:
|
|
25
|
-
* - success: boolean (true = éxito, false = error)
|
|
26
|
-
* - message: string (descripción legible)
|
|
27
|
-
* - data: T | null (datos en éxito, null en error)
|
|
28
|
-
* - errors: ErrorDetail[] | undefined (detalles de errores)
|
|
29
|
-
*
|
|
30
|
-
* @template T - Tipo de datos de la respuesta
|
|
31
|
-
*
|
|
32
|
-
* @class ResponseBase
|
|
33
|
-
* @since 1.0.0
|
|
34
|
-
*/
|
|
35
|
-
export class ResponseBase {
|
|
36
|
-
success;
|
|
37
|
-
message;
|
|
38
|
-
data;
|
|
39
|
-
errors;
|
|
40
|
-
/**
|
|
41
|
-
* Crea una instancia de ResponseBase.
|
|
42
|
-
*
|
|
43
|
-
* @param {boolean} success - Indica si la operación fue exitosa
|
|
44
|
-
* @param {string} message - Mensaje descriptivo de la respuesta
|
|
45
|
-
* @param {T | null} [data] - Datos de la respuesta (null en errores)
|
|
46
|
-
* @param {ErrorDetail[]} [errors] - Detalles de errores (solo en fallos)
|
|
47
|
-
*/
|
|
48
|
-
constructor(success, message, data = null, errors) {
|
|
49
|
-
this.success = success;
|
|
50
|
-
this.message = message;
|
|
51
|
-
this.data = data;
|
|
52
|
-
this.errors = errors;
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Crea una respuesta exitosa con datos.
|
|
56
|
-
*
|
|
57
|
-
* @template T - Tipo de datos
|
|
58
|
-
* @param {T} data - Datos a retornar
|
|
59
|
-
* @param {string} [message='Operación exitosa'] - Mensaje de éxito
|
|
60
|
-
* @returns {ResponseBase<T>} Respuesta estructurada
|
|
61
|
-
*
|
|
62
|
-
* @example
|
|
63
|
-
* ```typescript
|
|
64
|
-
* return ResponseBase.success(
|
|
65
|
-
* { id: '123', name: 'Electrónica' },
|
|
66
|
-
* 'Category created successfully'
|
|
67
|
-
* );
|
|
68
|
-
* ```
|
|
69
|
-
*/
|
|
70
|
-
static success(data, message = 'Operación exitosa') {
|
|
71
|
-
return new ResponseBase(true, message, data);
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* Crea una respuesta exitosa sin datos (solo mensaje).
|
|
75
|
-
*
|
|
76
|
-
* @param {string} [message='Operación exitosa'] - Mensaje de éxito
|
|
77
|
-
* @returns {ResponseBase<null>} Respuesta estructurada
|
|
78
|
-
*
|
|
79
|
-
* @example
|
|
80
|
-
* ```typescript
|
|
81
|
-
* return ResponseBase.successMessage('Category deleted successfully');
|
|
82
|
-
* ```
|
|
83
|
-
*/
|
|
84
|
-
static successMessage(message = 'Operación exitosa') {
|
|
85
|
-
return new ResponseBase(true, message, null);
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* Crea una respuesta de error.
|
|
89
|
-
*
|
|
90
|
-
* @param {string} message - Mensaje principal del error
|
|
91
|
-
* @param {ErrorDetail[] | string[]} [errors] - Detalles de errores
|
|
92
|
-
* @returns {ResponseBase<null>} Respuesta de error estructurada
|
|
93
|
-
*
|
|
94
|
-
* @example
|
|
95
|
-
* ```typescript
|
|
96
|
-
* // Error simple
|
|
97
|
-
* return ResponseBase.error('Category not found');
|
|
98
|
-
*
|
|
99
|
-
* // Error con detalles
|
|
100
|
-
* return ResponseBase.error('Validation failed', [
|
|
101
|
-
* { field: 'name', message: 'Name is too short', code: 'NAME_TOO_SHORT' },
|
|
102
|
-
* { field: 'code', message: 'Code already exists', code: 'CODE_DUPLICATE' }
|
|
103
|
-
* ]);
|
|
104
|
-
* ```
|
|
105
|
-
*/
|
|
106
|
-
static error(message, errors) {
|
|
107
|
-
// Normalizar errors a ErrorDetail[]
|
|
108
|
-
let errorDetails;
|
|
109
|
-
if (errors) {
|
|
110
|
-
if (typeof errors[0] === 'string') {
|
|
111
|
-
errorDetails = errors.map((msg) => ({ message: msg }));
|
|
112
|
-
}
|
|
113
|
-
else {
|
|
114
|
-
errorDetails = errors;
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
return new ResponseBase(false, message, null, errorDetails);
|
|
118
|
-
}
|
|
119
|
-
/**
|
|
120
|
-
* Crea una respuesta de error de validación.
|
|
121
|
-
*
|
|
122
|
-
* @param {ErrorDetail[] | string[]} errors - Errores de validación
|
|
123
|
-
* @param {string} [message='Error de validación'] - Mensaje principal
|
|
124
|
-
* @returns {ResponseBase<null>} Respuesta de error estructurada
|
|
125
|
-
*
|
|
126
|
-
* @example
|
|
127
|
-
* ```typescript
|
|
128
|
-
* return ResponseBase.validationError([
|
|
129
|
-
* { field: 'name', message: 'Name is required', code: 'REQUIRED' },
|
|
130
|
-
* { field: 'scope', message: 'Invalid scope', code: 'INVALID_ENUM' }
|
|
131
|
-
* ]);
|
|
132
|
-
* ```
|
|
133
|
-
*/
|
|
134
|
-
static validationError(errors, message = 'Error de validación') {
|
|
135
|
-
return ResponseBase.error(message, errors);
|
|
136
|
-
}
|
|
137
|
-
/**
|
|
138
|
-
* Crea una respuesta de recurso no encontrado.
|
|
139
|
-
*
|
|
140
|
-
* @param {string} [message='Recurso no encontrado'] - Mensaje de error
|
|
141
|
-
* @returns {ResponseBase<null>} Respuesta de error estructurada
|
|
142
|
-
*
|
|
143
|
-
* @example
|
|
144
|
-
* ```typescript
|
|
145
|
-
* return ResponseBase.notFound('Category not found');
|
|
146
|
-
* ```
|
|
147
|
-
*/
|
|
148
|
-
static notFound(message = 'Recurso no encontrado') {
|
|
149
|
-
return ResponseBase.error(message);
|
|
150
|
-
}
|
|
151
|
-
/**
|
|
152
|
-
* Crea una respuesta de conflicto (409).
|
|
153
|
-
*
|
|
154
|
-
* @param {string} message - Mensaje del conflicto
|
|
155
|
-
* @param {ErrorDetail[] | string[]} [errors] - Detalles adicionales
|
|
156
|
-
* @returns {ResponseBase<null>} Respuesta de error estructurada
|
|
157
|
-
*
|
|
158
|
-
* @example
|
|
159
|
-
* ```typescript
|
|
160
|
-
* return ResponseBase.conflict('Category code already exists');
|
|
161
|
-
* ```
|
|
162
|
-
*/
|
|
163
|
-
static conflict(message, errors) {
|
|
164
|
-
return ResponseBase.error(message, errors);
|
|
165
|
-
}
|
|
166
|
-
/**
|
|
167
|
-
* Crea una respuesta de error del servidor (500).
|
|
168
|
-
*
|
|
169
|
-
* @param {string} [message='Error interno del servidor'] - Mensaje de error
|
|
170
|
-
* @param {string} [errorStack] - Stack trace (solo en desarrollo)
|
|
171
|
-
* @returns {ResponseBase<null>} Respuesta de error estructurada
|
|
172
|
-
*
|
|
173
|
-
* @example
|
|
174
|
-
* ```typescript
|
|
175
|
-
* return ResponseBase.serverError('Database connection failed');
|
|
176
|
-
* ```
|
|
177
|
-
*/
|
|
178
|
-
static serverError(message = 'Error interno del servidor', errorStack) {
|
|
179
|
-
const errors = errorStack ? [{ message: errorStack }] : undefined;
|
|
180
|
-
return ResponseBase.error(message, errors);
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
//# sourceMappingURL=ResponseBase.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ResponseBase.js","sourceRoot":"","sources":["../../src/http/ResponseBase.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAWH;;;;;;;;;;;;;GAaG;AACH,MAAM,OAAO,YAAY;IAUL;IACA;IACA;IACA;IAZlB;;;;;;;OAOG;IACH,YACkB,OAAgB,EAChB,OAAe,EACf,OAAiB,IAAI,EACrB,MAAsB;QAHtB,YAAO,GAAP,OAAO,CAAS;QAChB,YAAO,GAAP,OAAO,CAAQ;QACf,SAAI,GAAJ,IAAI,CAAiB;QACrB,WAAM,GAAN,MAAM,CAAgB;IACrC,CAAC;IAEJ;;;;;;;;;;;;;;;OAeG;IACI,MAAM,CAAC,OAAO,CACnB,IAAO,EACP,OAAO,GAAG,mBAAmB;QAE7B,OAAO,IAAI,YAAY,CAAI,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;IAClD,CAAC;IAED;;;;;;;;;;OAUG;IACI,MAAM,CAAC,cAAc,CAC1B,OAAO,GAAG,mBAAmB;QAE7B,OAAO,IAAI,YAAY,CAAO,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;IACrD,CAAC;IAED;;;;;;;;;;;;;;;;;;OAkBG;IACI,MAAM,CAAC,KAAK,CACjB,OAAe,EACf,MAAiC;QAEjC,oCAAoC;QACpC,IAAI,YAAuC,CAAC;QAE5C,IAAI,MAAM,EAAE,CAAC;YACX,IAAI,OAAO,MAAM,CAAC,CAAC,CAAC,KAAK,QAAQ,EAAE,CAAC;gBAClC,YAAY,GAAI,MAAmB,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC;YACvE,CAAC;iBAAM,CAAC;gBACN,YAAY,GAAG,MAAuB,CAAC;YACzC,CAAC;QACH,CAAC;QAED,OAAO,IAAI,YAAY,CAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,YAAY,CAAC,CAAC;IACpE,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACI,MAAM,CAAC,eAAe,CAC3B,MAAgC,EAChC,OAAO,GAAG,qBAAqB;QAE/B,OAAO,YAAY,CAAC,KAAK,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IAC7C,CAAC;IAED;;;;;;;;;;OAUG;IACI,MAAM,CAAC,QAAQ,CACpB,OAAO,GAAG,uBAAuB;QAEjC,OAAO,YAAY,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACrC,CAAC;IAED;;;;;;;;;;;OAWG;IACI,MAAM,CAAC,QAAQ,CACpB,OAAe,EACf,MAAiC;QAEjC,OAAO,YAAY,CAAC,KAAK,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IAC7C,CAAC;IAED;;;;;;;;;;;OAWG;IACI,MAAM,CAAC,WAAW,CACvB,OAAO,GAAG,4BAA4B,EACtC,UAAmB;QAEnB,MAAM,MAAM,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QAClE,OAAO,YAAY,CAAC,KAAK,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IAC7C,CAAC;CACF"}
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview DTO de respuesta después de crear una ubicación.
|
|
3
|
-
*
|
|
4
|
-
* Define la estructura de datos que el backend devuelve
|
|
5
|
-
* después de crear exitosamente una ubicación (POST /locations).
|
|
6
|
-
*
|
|
7
|
-
* @module Contracts/Location/DTOs
|
|
8
|
-
* @version 1.0.0
|
|
9
|
-
* @since 11-11-2025
|
|
10
|
-
*/
|
|
11
|
-
import type { AddressDTO, CapabilitiesDTO } from './LocationDTO';
|
|
12
|
-
/**
|
|
13
|
-
* DTO de respuesta después de POST /locations.
|
|
14
|
-
*
|
|
15
|
-
* Contiene los datos esenciales de la ubicación recién creada.
|
|
16
|
-
*
|
|
17
|
-
* @example
|
|
18
|
-
* ```typescript
|
|
19
|
-
* const createdLocation: CreatedLocationDTO = {
|
|
20
|
-
* id: '550e8400-e29b-41d4-a716-446655440000',
|
|
21
|
-
* companyId: '660e8400-e29b-41d4-a716-446655440001',
|
|
22
|
-
* name: 'Sucursal Lima Centro',
|
|
23
|
-
* type: 'BRANCH',
|
|
24
|
-
* capabilities: {
|
|
25
|
-
* hasPointOfSale: true,
|
|
26
|
-
* hasInventory: true,
|
|
27
|
-
* hasProduction: false,
|
|
28
|
-
* hasShipping: true,
|
|
29
|
-
* isHeadquarters: false,
|
|
30
|
-
* },
|
|
31
|
-
* address: {
|
|
32
|
-
* street: 'Av. Javier Prado 123',
|
|
33
|
-
* city: 'Lima',
|
|
34
|
-
* state: 'Lima',
|
|
35
|
-
* country: 'Perú',
|
|
36
|
-
* },
|
|
37
|
-
* isDefault: false,
|
|
38
|
-
* isActive: true,
|
|
39
|
-
* createdAt: '2025-11-11T10:00:00Z',
|
|
40
|
-
* version: 1,
|
|
41
|
-
* };
|
|
42
|
-
* ```
|
|
43
|
-
*/
|
|
44
|
-
export interface CreatedLocationDTO {
|
|
45
|
-
/**
|
|
46
|
-
* ID único de la ubicación (UUID v4).
|
|
47
|
-
*/
|
|
48
|
-
readonly id: string;
|
|
49
|
-
/**
|
|
50
|
-
* ID de la company propietaria (UUID v4).
|
|
51
|
-
*/
|
|
52
|
-
readonly companyId: string;
|
|
53
|
-
/**
|
|
54
|
-
* Nombre de la ubicación.
|
|
55
|
-
*/
|
|
56
|
-
readonly name: string;
|
|
57
|
-
/**
|
|
58
|
-
* Tipo de ubicación (BRANCH, WAREHOUSE, OFFICE, FACTORY).
|
|
59
|
-
*/
|
|
60
|
-
readonly type: 'BRANCH' | 'WAREHOUSE' | 'OFFICE' | 'FACTORY';
|
|
61
|
-
/**
|
|
62
|
-
* Capacidades operativas de la ubicación.
|
|
63
|
-
*/
|
|
64
|
-
readonly capabilities: CapabilitiesDTO;
|
|
65
|
-
/**
|
|
66
|
-
* Dirección física completa.
|
|
67
|
-
*/
|
|
68
|
-
readonly address: AddressDTO;
|
|
69
|
-
/**
|
|
70
|
-
* Indica si es la ubicación por defecto de la company.
|
|
71
|
-
*/
|
|
72
|
-
readonly isDefault: boolean;
|
|
73
|
-
/**
|
|
74
|
-
* Indica si la ubicación está activa.
|
|
75
|
-
*
|
|
76
|
-
* Por defecto es true al crear.
|
|
77
|
-
*/
|
|
78
|
-
readonly isActive: boolean;
|
|
79
|
-
/**
|
|
80
|
-
* Fecha de creación (ISO 8601).
|
|
81
|
-
*/
|
|
82
|
-
readonly createdAt: string;
|
|
83
|
-
/**
|
|
84
|
-
* ID del usuario que creó este registro (UUID).
|
|
85
|
-
*/
|
|
86
|
-
readonly createdBy?: string;
|
|
87
|
-
/**
|
|
88
|
-
* Versión para optimistic locking.
|
|
89
|
-
*
|
|
90
|
-
* Siempre es 1 al crear.
|
|
91
|
-
*/
|
|
92
|
-
readonly version: number;
|
|
93
|
-
}
|
|
94
|
-
//# sourceMappingURL=CreatedLocationDTO.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CreatedLocationDTO.d.ts","sourceRoot":"","sources":["../../../src/location/dtos/CreatedLocationDTO.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEjE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAE3B;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,QAAQ,GAAG,WAAW,GAAG,QAAQ,GAAG,SAAS,CAAC;IAE7D;;OAEG;IACH,QAAQ,CAAC,YAAY,EAAE,eAAe,CAAC;IAEvC;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,UAAU,CAAC;IAE7B;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAE5B;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAE3B;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAE3B;;OAEG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAE5B;;;;OAIG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview DTO de respuesta después de crear una ubicación.
|
|
3
|
-
*
|
|
4
|
-
* Define la estructura de datos que el backend devuelve
|
|
5
|
-
* después de crear exitosamente una ubicación (POST /locations).
|
|
6
|
-
*
|
|
7
|
-
* @module Contracts/Location/DTOs
|
|
8
|
-
* @version 1.0.0
|
|
9
|
-
* @since 11-11-2025
|
|
10
|
-
*/
|
|
11
|
-
export {};
|
|
12
|
-
//# sourceMappingURL=CreatedLocationDTO.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CreatedLocationDTO.js","sourceRoot":"","sources":["../../../src/location/dtos/CreatedLocationDTO.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG"}
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview DTO de respuesta para Location (GET endpoints).
|
|
3
|
-
*
|
|
4
|
-
* Define la estructura de datos que el backend envía al frontend
|
|
5
|
-
* cuando se consulta información de ubicaciones físicas.
|
|
6
|
-
*
|
|
7
|
-
* @module Contracts/Location/DTOs
|
|
8
|
-
* @version 1.0.0
|
|
9
|
-
* @since 11-11-2025
|
|
10
|
-
*/
|
|
11
|
-
/**
|
|
12
|
-
* DTO de dirección física.
|
|
13
|
-
*/
|
|
14
|
-
export interface AddressDTO {
|
|
15
|
-
readonly street: string;
|
|
16
|
-
readonly city: string;
|
|
17
|
-
readonly state: string;
|
|
18
|
-
readonly country: string;
|
|
19
|
-
readonly zipCode?: string;
|
|
20
|
-
readonly coordinates?: {
|
|
21
|
-
readonly latitude: number;
|
|
22
|
-
readonly longitude: number;
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* DTO de capacidades operativas.
|
|
27
|
-
*/
|
|
28
|
-
export interface CapabilitiesDTO {
|
|
29
|
-
readonly hasPointOfSale: boolean;
|
|
30
|
-
readonly hasInventory: boolean;
|
|
31
|
-
readonly hasProduction: boolean;
|
|
32
|
-
readonly hasShipping: boolean;
|
|
33
|
-
readonly isHeadquarters: boolean;
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* DTO de respuesta para consultas de ubicaciones.
|
|
37
|
-
*
|
|
38
|
-
* Usado en:
|
|
39
|
-
* - GET /locations (lista)
|
|
40
|
-
* - GET /locations/:id (detalle)
|
|
41
|
-
* - PUT /locations/:id (respuesta después de update)
|
|
42
|
-
*
|
|
43
|
-
* @example
|
|
44
|
-
* ```typescript
|
|
45
|
-
* const location: LocationDTO = {
|
|
46
|
-
* id: '550e8400-e29b-41d4-a716-446655440000',
|
|
47
|
-
* companyId: '660e8400-e29b-41d4-a716-446655440001',
|
|
48
|
-
* name: 'Sucursal Lima Centro',
|
|
49
|
-
* type: 'BRANCH',
|
|
50
|
-
* capabilities: {
|
|
51
|
-
* hasPointOfSale: true,
|
|
52
|
-
* hasInventory: true,
|
|
53
|
-
* hasProduction: false,
|
|
54
|
-
* hasShipping: true,
|
|
55
|
-
* isHeadquarters: false,
|
|
56
|
-
* },
|
|
57
|
-
* address: {
|
|
58
|
-
* street: 'Av. Javier Prado 123',
|
|
59
|
-
* city: 'Lima',
|
|
60
|
-
* state: 'Lima',
|
|
61
|
-
* country: 'Perú',
|
|
62
|
-
* zipCode: '15036',
|
|
63
|
-
* },
|
|
64
|
-
* isDefault: false,
|
|
65
|
-
* isActive: true,
|
|
66
|
-
* createdAt: '2025-11-11T10:00:00Z',
|
|
67
|
-
* version: 1,
|
|
68
|
-
* };
|
|
69
|
-
* ```
|
|
70
|
-
*/
|
|
71
|
-
export interface LocationDTO {
|
|
72
|
-
/**
|
|
73
|
-
* ID único de la ubicación (UUID v4).
|
|
74
|
-
*/
|
|
75
|
-
readonly id: string;
|
|
76
|
-
/**
|
|
77
|
-
* ID de la company propietaria (UUID v4).
|
|
78
|
-
*/
|
|
79
|
-
readonly companyId: string;
|
|
80
|
-
/**
|
|
81
|
-
* Nombre de la ubicación.
|
|
82
|
-
*/
|
|
83
|
-
readonly name: string;
|
|
84
|
-
/**
|
|
85
|
-
* Tipo de ubicación (BRANCH, WAREHOUSE, OFFICE, FACTORY).
|
|
86
|
-
*/
|
|
87
|
-
readonly type: 'BRANCH' | 'WAREHOUSE' | 'OFFICE' | 'FACTORY';
|
|
88
|
-
/**
|
|
89
|
-
* Capacidades operativas de la ubicación.
|
|
90
|
-
*/
|
|
91
|
-
readonly capabilities: CapabilitiesDTO;
|
|
92
|
-
/**
|
|
93
|
-
* Dirección física completa.
|
|
94
|
-
*/
|
|
95
|
-
readonly address: AddressDTO;
|
|
96
|
-
/**
|
|
97
|
-
* Indica si es la ubicación por defecto de la company.
|
|
98
|
-
*/
|
|
99
|
-
readonly isDefault: boolean;
|
|
100
|
-
/**
|
|
101
|
-
* Indica si la ubicación está activa.
|
|
102
|
-
*/
|
|
103
|
-
readonly isActive: boolean;
|
|
104
|
-
/**
|
|
105
|
-
* Fecha de creación (ISO 8601).
|
|
106
|
-
*/
|
|
107
|
-
readonly createdAt: string;
|
|
108
|
-
/**
|
|
109
|
-
* ID del usuario que creó este registro (UUID).
|
|
110
|
-
*/
|
|
111
|
-
readonly createdBy?: string;
|
|
112
|
-
/**
|
|
113
|
-
* Fecha de última actualización (ISO 8601).
|
|
114
|
-
*/
|
|
115
|
-
readonly updatedAt?: string;
|
|
116
|
-
/**
|
|
117
|
-
* ID del usuario que actualizó este registro (UUID).
|
|
118
|
-
*/
|
|
119
|
-
readonly updatedBy?: string;
|
|
120
|
-
/**
|
|
121
|
-
* Versión para optimistic locking.
|
|
122
|
-
*/
|
|
123
|
-
readonly version: number;
|
|
124
|
-
}
|
|
125
|
-
//# sourceMappingURL=LocationDTO.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LocationDTO.d.ts","sourceRoot":"","sources":["../../../src/location/dtos/LocationDTO.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,WAAW,CAAC,EAAE;QACrB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;QAC1B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;KAC5B,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAC;IACjC,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;IAC/B,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;IAChC,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAC;CAClC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAE3B;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,QAAQ,GAAG,WAAW,GAAG,QAAQ,GAAG,SAAS,CAAC;IAE7D;;OAEG;IACH,QAAQ,CAAC,YAAY,EAAE,eAAe,CAAC;IAEvC;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,UAAU,CAAC;IAE7B;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAE5B;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAE3B;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAE3B;;OAEG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAE5B;;OAEG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAE5B;;OAEG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAE5B;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview DTO de respuesta para Location (GET endpoints).
|
|
3
|
-
*
|
|
4
|
-
* Define la estructura de datos que el backend envía al frontend
|
|
5
|
-
* cuando se consulta información de ubicaciones físicas.
|
|
6
|
-
*
|
|
7
|
-
* @module Contracts/Location/DTOs
|
|
8
|
-
* @version 1.0.0
|
|
9
|
-
* @since 11-11-2025
|
|
10
|
-
*/
|
|
11
|
-
export {};
|
|
12
|
-
//# sourceMappingURL=LocationDTO.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LocationDTO.js","sourceRoot":"","sources":["../../../src/location/dtos/LocationDTO.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview Barrel export para DTOs de Location.
|
|
3
|
-
* @module Contracts/Location/DTOs
|
|
4
|
-
* @version 1.0.0
|
|
5
|
-
* @since 11-11-2025
|
|
6
|
-
*/
|
|
7
|
-
export type { LocationDTO, AddressDTO, CapabilitiesDTO } from './LocationDTO';
|
|
8
|
-
export type { CreatedLocationDTO } from './CreatedLocationDTO';
|
|
9
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/location/dtos/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAC9E,YAAY,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/location/dtos/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview DTO para respuesta paginada de permisos
|
|
3
|
-
* @module Permission/Application/DTOs
|
|
4
|
-
* @version 1.0.0
|
|
5
|
-
*/
|
|
6
|
-
import type { PermissionDTO } from './PermissionDTO';
|
|
7
|
-
/**
|
|
8
|
-
* DTO para respuestas paginadas de permisos
|
|
9
|
-
*
|
|
10
|
-
* @interface PaginatedPermissionsDTO
|
|
11
|
-
* @since 1.0.0
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
* ```typescript
|
|
15
|
-
* const response: PaginatedPermissionsDTO = {
|
|
16
|
-
* items: [
|
|
17
|
-
* { id: '...', code: 'users.create', ... },
|
|
18
|
-
* { id: '...', code: 'users.read', ... },
|
|
19
|
-
* ],
|
|
20
|
-
* total: 78,
|
|
21
|
-
* page: 1,
|
|
22
|
-
* limit: 50,
|
|
23
|
-
* totalPages: 2,
|
|
24
|
-
* hasNextPage: true,
|
|
25
|
-
* hasPreviousPage: false,
|
|
26
|
-
* };
|
|
27
|
-
* ```
|
|
28
|
-
*/
|
|
29
|
-
export interface PaginatedPermissionsDTO {
|
|
30
|
-
/**
|
|
31
|
-
* Array de permisos en la página actual
|
|
32
|
-
*/
|
|
33
|
-
readonly items: PermissionDTO[];
|
|
34
|
-
/**
|
|
35
|
-
* Total de permisos que cumplen los filtros
|
|
36
|
-
*/
|
|
37
|
-
readonly total: number;
|
|
38
|
-
/**
|
|
39
|
-
* Número de página actual (1-indexed)
|
|
40
|
-
*/
|
|
41
|
-
readonly page: number;
|
|
42
|
-
/**
|
|
43
|
-
* Cantidad de items por página
|
|
44
|
-
*/
|
|
45
|
-
readonly limit: number;
|
|
46
|
-
/**
|
|
47
|
-
* Total de páginas disponibles
|
|
48
|
-
*/
|
|
49
|
-
readonly totalPages: number;
|
|
50
|
-
/**
|
|
51
|
-
* Indica si hay una página siguiente
|
|
52
|
-
*/
|
|
53
|
-
readonly hasNextPage: boolean;
|
|
54
|
-
/**
|
|
55
|
-
* Indica si hay una página anterior
|
|
56
|
-
*/
|
|
57
|
-
readonly hasPreviousPage: boolean;
|
|
58
|
-
}
|
|
59
|
-
//# sourceMappingURL=PaginatedPermissionsDTO.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PaginatedPermissionsDTO.d.ts","sourceRoot":"","sources":["../../src/permission/PaginatedPermissionsDTO.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,aAAa,EAAE,CAAC;IAEhC;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAE5B;;OAEG;IACH,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAE9B;;OAEG;IACH,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAC;CACnC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PaginatedPermissionsDTO.js","sourceRoot":"","sources":["../../src/permission/PaginatedPermissionsDTO.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview Data Transfer Object para Permission
|
|
3
|
-
* @module Permission/Application/DTOs
|
|
4
|
-
* @version 1.0.0
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* DTO para transferir datos de Permission entre capas
|
|
8
|
-
*
|
|
9
|
-
* NOTA: Los permisos son GLOBALES (sin tenantId).
|
|
10
|
-
* Son compartidos por todos los tenants del sistema.
|
|
11
|
-
*
|
|
12
|
-
* @interface PermissionDTO
|
|
13
|
-
* @since 1.0.0
|
|
14
|
-
*
|
|
15
|
-
* @example
|
|
16
|
-
* ```typescript
|
|
17
|
-
* const dto: PermissionDTO = {
|
|
18
|
-
* id: '550e8400-e29b-41d4-a716-446655440000',
|
|
19
|
-
* code: 'users.create',
|
|
20
|
-
* name: 'Crear Usuario',
|
|
21
|
-
* description: 'Permite crear nuevos usuarios en el sistema',
|
|
22
|
-
* scope: 'ACTION',
|
|
23
|
-
* module: 'users',
|
|
24
|
-
* createdAt: '2025-01-01T00:00:00Z',
|
|
25
|
-
* updatedAt: null,
|
|
26
|
-
* };
|
|
27
|
-
* ```
|
|
28
|
-
*/
|
|
29
|
-
export interface PermissionDTO {
|
|
30
|
-
/**
|
|
31
|
-
* ID único del permiso (UUID)
|
|
32
|
-
*/
|
|
33
|
-
readonly id: string;
|
|
34
|
-
/**
|
|
35
|
-
* Código único en formato module.action
|
|
36
|
-
* Ejemplos: 'users.create', 'products.read'
|
|
37
|
-
*/
|
|
38
|
-
readonly code: string;
|
|
39
|
-
/**
|
|
40
|
-
* Nombre descriptivo del permiso
|
|
41
|
-
* Ejemplo: 'Crear Usuario'
|
|
42
|
-
*/
|
|
43
|
-
readonly name: string;
|
|
44
|
-
/**
|
|
45
|
-
* Descripción detallada de qué permite hacer
|
|
46
|
-
*/
|
|
47
|
-
readonly description: string;
|
|
48
|
-
/**
|
|
49
|
-
* Ámbito del permiso: MODULE, FEATURE, ACTION
|
|
50
|
-
*/
|
|
51
|
-
readonly scope: string;
|
|
52
|
-
/**
|
|
53
|
-
* Módulo al que pertenece el permiso
|
|
54
|
-
* Ejemplo: 'users', 'products'
|
|
55
|
-
*/
|
|
56
|
-
readonly module: string;
|
|
57
|
-
/**
|
|
58
|
-
* Fecha de creación
|
|
59
|
-
*/
|
|
60
|
-
readonly createdAt: string;
|
|
61
|
-
/**
|
|
62
|
-
* Fecha de última actualización (null si nunca se actualizó)
|
|
63
|
-
*/
|
|
64
|
-
readonly updatedAt: string | null;
|
|
65
|
-
}
|
|
66
|
-
//# sourceMappingURL=PermissionDTO.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PermissionDTO.d.ts","sourceRoot":"","sources":["../../src/permission/PermissionDTO.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB;;;OAGG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAE7B;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAEvB;;;OAGG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAE3B;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CACnC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PermissionDTO.js","sourceRoot":"","sources":["../../src/permission/PermissionDTO.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview Zod schema para validar obtención de permiso por ID
|
|
3
|
-
* @module Contracts/Permission
|
|
4
|
-
* @version 1.0.0
|
|
5
|
-
*/
|
|
6
|
-
import { z } from 'zod';
|
|
7
|
-
/**
|
|
8
|
-
* Schema de validación para GetPermissionByIdQuery
|
|
9
|
-
*
|
|
10
|
-
* Valida el parámetro de ruta (path param) para obtener un permiso:
|
|
11
|
-
* - id: UUID del permiso (formato UUID válido)
|
|
12
|
-
*
|
|
13
|
-
* @since 1.0.0
|
|
14
|
-
*
|
|
15
|
-
* @example
|
|
16
|
-
* ```typescript
|
|
17
|
-
* // En controller
|
|
18
|
-
* const { id } = getPermissionByIdSchema.parse({ id: c.req.param('id') });
|
|
19
|
-
* ```
|
|
20
|
-
*/
|
|
21
|
-
export declare const getPermissionByIdSchema: z.ZodObject<{
|
|
22
|
-
/**
|
|
23
|
-
* ID del permiso (UUID)
|
|
24
|
-
* Debe ser un UUID válido
|
|
25
|
-
*/
|
|
26
|
-
id: z.ZodString;
|
|
27
|
-
}, "strip", z.ZodTypeAny, {
|
|
28
|
-
id: string;
|
|
29
|
-
}, {
|
|
30
|
-
id: string;
|
|
31
|
-
}>;
|
|
32
|
-
/**
|
|
33
|
-
* Tipo TypeScript inferido del schema
|
|
34
|
-
*/
|
|
35
|
-
export type GetPermissionByIdSchemaType = z.infer<typeof getPermissionByIdSchema>;
|
|
36
|
-
//# sourceMappingURL=getPermissionByIdSchema.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getPermissionByIdSchema.d.ts","sourceRoot":"","sources":["../../src/permission/getPermissionByIdSchema.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,uBAAuB;IAClC;;;OAGG;;;;;;EAIH,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
|