@nu-art/ts-common 0.200.26 → 0.200.28

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.
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Created by TacB0sS on 3/16/17.
3
3
  */
4
- import { Constructor } from '../utils/types';
4
+ import { Constructor, UniqueId } from '../utils/types';
5
5
  /**
6
6
  * # <ins>isErrorOfType</ins>
7
7
  *
@@ -92,6 +92,21 @@ export declare class NotImplementedYetException extends CustomException {
92
92
  export declare class ThisShouldNotHappenException extends CustomException {
93
93
  constructor(message: string, cause?: Error);
94
94
  }
95
+ export type DependencyConflicts = {
96
+ collectionKey: string;
97
+ conflictingIds: UniqueId[];
98
+ };
99
+ /**
100
+ * #<ins>EntityHasDependencies</ins>
101
+ * This class inherits {@link CustomException} and represents an error of a entity trying to be deleted that has dependencies
102
+ * @category Exceptions
103
+ */
104
+ export declare class HasDependenciesException extends CustomException {
105
+ body?: DependencyConflicts[];
106
+ entityName?: string;
107
+ responseCode?: number;
108
+ constructor(debugMessage: string, body?: DependencyConflicts[], entityName?: UniqueId, e?: Error);
109
+ }
95
110
  /**
96
111
  * # <ins>DontCallthisException</ins>
97
112
  * This class inherits {@link CustomException} and functions like it, after setting the exceptionType property as "DontCallthisException",
@@ -20,7 +20,7 @@
20
20
  * Created by TacB0sS on 3/16/17.
21
21
  */
22
22
  Object.defineProperty(exports, "__esModule", { value: true });
23
- exports.AssertionException = exports.WhoCallthisException = exports.DontCallthisException = exports.ThisShouldNotHappenException = exports.NotImplementedYetException = exports.MUSTNeverHappenException = exports.ImplementationMissingException = exports.BadImplementationException = exports.Exception = exports.CustomException = exports.isErrorOfType = void 0;
23
+ exports.AssertionException = exports.WhoCallthisException = exports.DontCallthisException = exports.HasDependenciesException = exports.ThisShouldNotHappenException = exports.NotImplementedYetException = exports.MUSTNeverHappenException = exports.ImplementationMissingException = exports.BadImplementationException = exports.Exception = exports.CustomException = exports.isErrorOfType = void 0;
24
24
  /**
25
25
  * # <ins>isErrorOfType</ins>
26
26
  *
@@ -142,6 +142,19 @@ class ThisShouldNotHappenException extends CustomException {
142
142
  }
143
143
  }
144
144
  exports.ThisShouldNotHappenException = ThisShouldNotHappenException;
145
+ /**
146
+ * #<ins>EntityHasDependencies</ins>
147
+ * This class inherits {@link CustomException} and represents an error of a entity trying to be deleted that has dependencies
148
+ * @category Exceptions
149
+ */
150
+ class HasDependenciesException extends CustomException {
151
+ constructor(debugMessage, body, entityName, e) {
152
+ super(HasDependenciesException, debugMessage, e);
153
+ this.body = body;
154
+ this.entityName = entityName;
155
+ }
156
+ }
157
+ exports.HasDependenciesException = HasDependenciesException;
145
158
  /**
146
159
  * # <ins>DontCallthisException</ins>
147
160
  * This class inherits {@link CustomException} and functions like it, after setting the exceptionType property as "DontCallthisException",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nu-art/ts-common",
3
- "version": "0.200.26",
3
+ "version": "0.200.28",
4
4
  "description": "js and ts infra",
5
5
  "keywords": [
6
6
  "TacB0sS",