@openframe-org/criteria-set-protocol 1.0.37 → 1.0.38
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/v1/errors/DataValidationError.d.ts +6 -0
- package/dist/v1/errors/DataValidationError.js +12 -0
- package/dist/v1/errors/ParameterValidationError.d.ts +6 -0
- package/dist/v1/errors/ParameterValidationError.js +12 -0
- package/dist/v1/errors/ValidationError.d.ts +14 -0
- package/dist/v1/errors/ValidationError.js +21 -0
- package/dist/v1/errors/index.d.ts +2 -0
- package/dist/v1/errors/index.js +18 -0
- package/dist/v1/errors/types.d.ts +1 -0
- package/dist/v1/errors/types.js +2 -0
- package/dist/v1/index.d.ts +1 -0
- package/dist/v1/index.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DataValidationError = void 0;
|
|
4
|
+
const ValidationError_1 = require("./ValidationError");
|
|
5
|
+
class DataValidationError extends ValidationError_1.ValidationError {
|
|
6
|
+
constructor(code, path, args) {
|
|
7
|
+
super('data', code, path, args);
|
|
8
|
+
this.code = code;
|
|
9
|
+
this.path = path;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.DataValidationError = DataValidationError;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ParameterValidationError = void 0;
|
|
4
|
+
const ValidationError_1 = require("./ValidationError");
|
|
5
|
+
class ParameterValidationError extends ValidationError_1.ValidationError {
|
|
6
|
+
constructor(code, path, args) {
|
|
7
|
+
super('parameter', code, path, args);
|
|
8
|
+
this.code = code;
|
|
9
|
+
this.path = path;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.ParameterValidationError = ParameterValidationError;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ValidationErrorType } from './types';
|
|
2
|
+
export declare abstract class ValidationError extends Error {
|
|
3
|
+
errorType: ValidationErrorType;
|
|
4
|
+
code: string;
|
|
5
|
+
path?: string | undefined;
|
|
6
|
+
arguments?: Record<string, unknown>;
|
|
7
|
+
protected constructor(errorType: ValidationErrorType, code: string, path?: string | undefined, args?: Record<string, unknown>);
|
|
8
|
+
toJSON(): {
|
|
9
|
+
errorType: ValidationErrorType;
|
|
10
|
+
code: string;
|
|
11
|
+
path: string | undefined;
|
|
12
|
+
arguments: Record<string, unknown> | undefined;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ValidationError = void 0;
|
|
4
|
+
class ValidationError extends Error {
|
|
5
|
+
constructor(errorType, code, path, args) {
|
|
6
|
+
super(`Validation error: ${errorType}`);
|
|
7
|
+
this.errorType = errorType;
|
|
8
|
+
this.code = code;
|
|
9
|
+
this.path = path;
|
|
10
|
+
this.arguments = args;
|
|
11
|
+
}
|
|
12
|
+
toJSON() {
|
|
13
|
+
return {
|
|
14
|
+
errorType: this.errorType,
|
|
15
|
+
code: this.code,
|
|
16
|
+
path: this.path,
|
|
17
|
+
arguments: this.arguments
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.ValidationError = ValidationError;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./DataValidationError"), exports);
|
|
18
|
+
__exportStar(require("./types"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type ValidationErrorType = 'data' | 'parameter';
|
package/dist/v1/index.d.ts
CHANGED
package/dist/v1/index.js
CHANGED
package/package.json
CHANGED