@hemia/common 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/types/errors/domain.error.d.ts +34 -0
- package/dist/types/errors/infrastructure.error.d.ts +40 -0
- package/dist/types/errors/persistence.error.d.ts +43 -0
- package/dist/types/interfaces/configuration/aws-s3-configuration.interface.d.ts +6 -0
- package/dist/types/interfaces/configuration/drizzle-db-configuration.interface.d.ts +7 -0
- package/dist/types/interfaces/configuration/mongo-db-configuration.interface.d.ts +7 -0
- package/dist/types/interfaces/configuration/olap-db-configuration.interface.d.ts +6 -0
- package/dist/types/interfaces/configuration/redis-configuration.interface.d.ts +8 -0
- package/dist/types/interfaces/index.d.ts +5 -0
- package/package.json +1 -1
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Errores de lógica de negocio (Business Layer)
|
|
3
|
+
* No conocen HTTP, son agnósticos a la infraestructura
|
|
4
|
+
*/
|
|
5
|
+
export declare class DomainError extends Error {
|
|
6
|
+
constructor(message: string);
|
|
7
|
+
}
|
|
8
|
+
export declare class EntityNotFoundError extends DomainError {
|
|
9
|
+
constructor(entity: string, criteria: string);
|
|
10
|
+
}
|
|
11
|
+
export declare class DuplicateEntityError extends DomainError {
|
|
12
|
+
constructor(entity: string, criteria: string);
|
|
13
|
+
}
|
|
14
|
+
export declare class ValidationError extends DomainError {
|
|
15
|
+
constructor(message: string);
|
|
16
|
+
}
|
|
17
|
+
export declare class BusinessRuleViolationError extends DomainError {
|
|
18
|
+
constructor(message: string);
|
|
19
|
+
}
|
|
20
|
+
export declare class OperationNotAllowedError extends DomainError {
|
|
21
|
+
constructor(operation: string);
|
|
22
|
+
}
|
|
23
|
+
export declare class DependencyError extends DomainError {
|
|
24
|
+
constructor(dependency: string, message: string);
|
|
25
|
+
}
|
|
26
|
+
export declare class TimeoutError extends DomainError {
|
|
27
|
+
constructor(operation: string, timeout: number);
|
|
28
|
+
}
|
|
29
|
+
export declare class ResourceLimitExceededError extends DomainError {
|
|
30
|
+
constructor(resource: string, limit: number);
|
|
31
|
+
}
|
|
32
|
+
export declare class ConfigurationError extends DomainError {
|
|
33
|
+
constructor(message: string);
|
|
34
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export declare class InfrastructureError extends Error {
|
|
2
|
+
readonly originalError?: Error | undefined;
|
|
3
|
+
constructor(message: string, originalError?: Error | undefined);
|
|
4
|
+
}
|
|
5
|
+
export declare class InfraDatabaseConnectionError extends InfrastructureError {
|
|
6
|
+
constructor(dbType: string, originalError?: Error);
|
|
7
|
+
}
|
|
8
|
+
export declare class InfraCacheConnectionError extends InfrastructureError {
|
|
9
|
+
constructor(cacheType: string, originalError?: Error);
|
|
10
|
+
}
|
|
11
|
+
export declare class InfraMessageQueueError extends InfrastructureError {
|
|
12
|
+
constructor(queueType: string, originalError?: Error);
|
|
13
|
+
}
|
|
14
|
+
export declare class InfraExternalServiceError extends InfrastructureError {
|
|
15
|
+
constructor(serviceName: string, originalError?: Error);
|
|
16
|
+
}
|
|
17
|
+
export declare class InfraConfigurationError extends InfrastructureError {
|
|
18
|
+
constructor(configItem: string, originalError?: Error);
|
|
19
|
+
}
|
|
20
|
+
export declare class InfraNetworkError extends InfrastructureError {
|
|
21
|
+
constructor(message: string, originalError?: Error);
|
|
22
|
+
}
|
|
23
|
+
export declare class InfraTimeoutError extends InfrastructureError {
|
|
24
|
+
constructor(operation: string, timeout: number, originalError?: Error);
|
|
25
|
+
}
|
|
26
|
+
export declare class InfraAuthenticationError extends InfrastructureError {
|
|
27
|
+
constructor(message: string, originalError?: Error);
|
|
28
|
+
}
|
|
29
|
+
export declare class InfraAuthorizationError extends InfrastructureError {
|
|
30
|
+
constructor(message: string, originalError?: Error);
|
|
31
|
+
}
|
|
32
|
+
export declare class InfraServiceUnavailableError extends InfrastructureError {
|
|
33
|
+
constructor(serviceName: string, originalError?: Error);
|
|
34
|
+
}
|
|
35
|
+
export declare class InfraDataSerializationError extends InfrastructureError {
|
|
36
|
+
constructor(dataType: string, originalError?: Error);
|
|
37
|
+
}
|
|
38
|
+
export declare class InfraDataDeserializationError extends InfrastructureError {
|
|
39
|
+
constructor(dataType: string, originalError?: Error);
|
|
40
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export declare class PersistenceError extends Error {
|
|
2
|
+
readonly originalError?: Error | undefined;
|
|
3
|
+
constructor(message: string, originalError?: Error | undefined);
|
|
4
|
+
}
|
|
5
|
+
export declare class DataNotFoundError extends PersistenceError {
|
|
6
|
+
constructor(entity: string, criteria: string, originalError?: Error);
|
|
7
|
+
}
|
|
8
|
+
export declare class DataConflictError extends PersistenceError {
|
|
9
|
+
constructor(entity: string, criteria: string, originalError?: Error);
|
|
10
|
+
}
|
|
11
|
+
export declare class DataValidationError extends PersistenceError {
|
|
12
|
+
constructor(message: string, originalError?: Error);
|
|
13
|
+
}
|
|
14
|
+
export declare class TransactionError extends PersistenceError {
|
|
15
|
+
constructor(message: string, originalError?: Error);
|
|
16
|
+
}
|
|
17
|
+
export declare class QueryExecutionError extends PersistenceError {
|
|
18
|
+
constructor(query: string, originalError?: Error);
|
|
19
|
+
}
|
|
20
|
+
export declare class ConnectionError extends PersistenceError {
|
|
21
|
+
constructor(databaseType: string, originalError?: Error);
|
|
22
|
+
}
|
|
23
|
+
export declare class SchemaMismatchError extends PersistenceError {
|
|
24
|
+
constructor(expectedSchema: string, actualSchema: string, originalError?: Error);
|
|
25
|
+
}
|
|
26
|
+
export declare class DataIntegrityError extends PersistenceError {
|
|
27
|
+
constructor(message: string, originalError?: Error);
|
|
28
|
+
}
|
|
29
|
+
export declare class BackupError extends PersistenceError {
|
|
30
|
+
constructor(message: string, originalError?: Error);
|
|
31
|
+
}
|
|
32
|
+
export declare class RestoreError extends PersistenceError {
|
|
33
|
+
constructor(message: string, originalError?: Error);
|
|
34
|
+
}
|
|
35
|
+
export declare class IndexingError extends PersistenceError {
|
|
36
|
+
constructor(indexName: string, originalError?: Error);
|
|
37
|
+
}
|
|
38
|
+
export declare class DataMigrationError extends PersistenceError {
|
|
39
|
+
constructor(migrationName: string, originalError?: Error);
|
|
40
|
+
}
|
|
41
|
+
export declare class ResourceLimitError extends PersistenceError {
|
|
42
|
+
constructor(resourceType: string, limit: number, originalError?: Error);
|
|
43
|
+
}
|
|
@@ -7,3 +7,8 @@ export * from "./features/arguments-host.interface";
|
|
|
7
7
|
export * from './type.interface';
|
|
8
8
|
export * from './handler.interface';
|
|
9
9
|
export * from './interceptor.interface';
|
|
10
|
+
export * from './configuration/redis-configuration.interface';
|
|
11
|
+
export * from './configuration/mongo-db-configuration.interface';
|
|
12
|
+
export * from './configuration/aws-s3-configuration.interface';
|
|
13
|
+
export * from './configuration/drizzle-db-configuration.interface';
|
|
14
|
+
export * from './configuration/olap-db-configuration.interface';
|