@trayio/cdk-dsl 0.0.1-beta
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/LICENSE.txt +22 -0
- package/README.md +858 -0
- package/dist/connector/operation/CompositeOperationHandler.d.ts +9 -0
- package/dist/connector/operation/CompositeOperationHandler.d.ts.map +1 -0
- package/dist/connector/operation/CompositeOperationHandler.js +10 -0
- package/dist/connector/operation/HttpOperationHandler.d.ts +83 -0
- package/dist/connector/operation/HttpOperationHandler.d.ts.map +1 -0
- package/dist/connector/operation/HttpOperationHandler.js +187 -0
- package/dist/connector/operation/OperationHandler.d.ts +134 -0
- package/dist/connector/operation/OperationHandler.d.ts.map +1 -0
- package/dist/connector/operation/OperationHandler.js +52 -0
- package/dist/connector/operation/OperationHandlerInvocation.d.ts +3 -0
- package/dist/connector/operation/OperationHandlerInvocation.d.ts.map +1 -0
- package/dist/connector/operation/OperationHandlerInvocation.js +2 -0
- package/dist/connector/operation/OperationHandlerSetup.d.ts +50 -0
- package/dist/connector/operation/OperationHandlerSetup.d.ts.map +1 -0
- package/dist/connector/operation/OperationHandlerSetup.js +148 -0
- package/dist/connector/operation/OperationHandlerTest.d.ts +135 -0
- package/dist/connector/operation/OperationHandlerTest.d.ts.map +1 -0
- package/dist/connector/operation/OperationHandlerTest.js +238 -0
- package/dist/connector/operation/OperationHandlerValidation.d.ts +42 -0
- package/dist/connector/operation/OperationHandlerValidation.d.ts.map +1 -0
- package/dist/connector/operation/OperationHandlerValidation.js +63 -0
- package/package.json +30 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OperationHandlerOutputValidationConditionConfiguration = exports.OperationHandlerOutputValidationErrorMessageConfiguration = exports.OperationHandlerOutputValidation = exports.OperationHandlerInputValidationConditionConfiguration = exports.OperationHandlerInputValidationErrorMessageConfiguration = exports.OperationHandlerInputValidation = exports.OperationHandlerValidation = void 0;
|
|
4
|
+
class OperationHandlerValidation {
|
|
5
|
+
static emptyValidation() {
|
|
6
|
+
return new OperationHandlerValidation([], []);
|
|
7
|
+
}
|
|
8
|
+
constructor(inputValidation, outputValidation) {
|
|
9
|
+
this.inputValidation = inputValidation;
|
|
10
|
+
this.outputValidation = outputValidation;
|
|
11
|
+
}
|
|
12
|
+
addInputValidation(inputValidation) {
|
|
13
|
+
return new OperationHandlerValidation(this.inputValidation.concat([inputValidation]), this.outputValidation);
|
|
14
|
+
}
|
|
15
|
+
addOutputValidation(outputValidation) {
|
|
16
|
+
return new OperationHandlerValidation(this.inputValidation, this.outputValidation.concat([outputValidation]));
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.OperationHandlerValidation = OperationHandlerValidation;
|
|
20
|
+
class OperationHandlerInputValidation {
|
|
21
|
+
constructor(condition, errorMessage) {
|
|
22
|
+
this.condition = condition;
|
|
23
|
+
this.errorMessage = errorMessage;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.OperationHandlerInputValidation = OperationHandlerInputValidation;
|
|
27
|
+
class OperationHandlerInputValidationErrorMessageConfiguration {
|
|
28
|
+
constructor(condition) {
|
|
29
|
+
this.condition = condition;
|
|
30
|
+
}
|
|
31
|
+
errorMessage(errorMessage) {
|
|
32
|
+
return new OperationHandlerInputValidation(this.condition, errorMessage);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.OperationHandlerInputValidationErrorMessageConfiguration = OperationHandlerInputValidationErrorMessageConfiguration;
|
|
36
|
+
class OperationHandlerInputValidationConditionConfiguration {
|
|
37
|
+
condition(condition) {
|
|
38
|
+
return new OperationHandlerInputValidationErrorMessageConfiguration(condition);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.OperationHandlerInputValidationConditionConfiguration = OperationHandlerInputValidationConditionConfiguration;
|
|
42
|
+
class OperationHandlerOutputValidation {
|
|
43
|
+
constructor(condition, errorMessage) {
|
|
44
|
+
this.condition = condition;
|
|
45
|
+
this.errorMessage = errorMessage;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.OperationHandlerOutputValidation = OperationHandlerOutputValidation;
|
|
49
|
+
class OperationHandlerOutputValidationErrorMessageConfiguration {
|
|
50
|
+
constructor(condition) {
|
|
51
|
+
this.condition = condition;
|
|
52
|
+
}
|
|
53
|
+
errorMessage(errorMessage) {
|
|
54
|
+
return new OperationHandlerOutputValidation(this.condition, errorMessage);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
exports.OperationHandlerOutputValidationErrorMessageConfiguration = OperationHandlerOutputValidationErrorMessageConfiguration;
|
|
58
|
+
class OperationHandlerOutputValidationConditionConfiguration {
|
|
59
|
+
condition(condition) {
|
|
60
|
+
return new OperationHandlerOutputValidationErrorMessageConfiguration(condition);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
exports.OperationHandlerOutputValidationConditionConfiguration = OperationHandlerOutputValidationConditionConfiguration;
|
package/package.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@trayio/cdk-dsl",
|
|
3
|
+
"version": "0.0.1-beta",
|
|
4
|
+
"description": "A DSL for connector development",
|
|
5
|
+
"exports": {
|
|
6
|
+
"./*": "./dist/*.js"
|
|
7
|
+
},
|
|
8
|
+
"author": "Tray.io",
|
|
9
|
+
"license": "MIT",
|
|
10
|
+
"engines": {
|
|
11
|
+
"node": ">=18.x"
|
|
12
|
+
},
|
|
13
|
+
"publishConfig": {
|
|
14
|
+
"access": "public"
|
|
15
|
+
},
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"@trayio/commons": "0.0.1-beta"
|
|
18
|
+
},
|
|
19
|
+
"typesVersions": {
|
|
20
|
+
"*": {
|
|
21
|
+
"*": [
|
|
22
|
+
"*",
|
|
23
|
+
"dist/*"
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"files": [
|
|
28
|
+
"/dist"
|
|
29
|
+
]
|
|
30
|
+
}
|