@degenerate/rules 0.0.4 → 0.0.8
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.md +15 -0
- package/README.md +1 -0
- package/dist/evaluation/check-function-integrity.d.ts.map +1 -0
- package/dist/evaluation/check-if-proposal-is-valid.d.ts.map +1 -0
- package/dist/evaluation/conditions/boolean-conditions.d.ts.map +1 -0
- package/dist/evaluation/conditions/contains-conditions.d.ts.map +1 -0
- package/dist/evaluation/conditions/empty-conditions.d.ts.map +1 -0
- package/dist/evaluation/conditions/equality-conditions.d.ts.map +1 -0
- package/dist/evaluation/conditions/null-conditions.d.ts.map +1 -0
- package/dist/evaluation/conditions/range-conditions.d.ts.map +1 -0
- package/dist/evaluation/conditions/special-conditions.d.ts.map +1 -0
- package/dist/{rules/src/evaluation → evaluation}/conditions/starts-end-with-conditions.d.ts +1 -1
- package/dist/evaluation/conditions/starts-end-with-conditions.d.ts.map +1 -0
- package/dist/evaluation/conditions/starts-end-with-conditions.js +100 -0
- package/dist/evaluation/conditions/typeof-rule-conditions.d.ts.map +1 -0
- package/dist/{rules/src/evaluation → evaluation}/conditions/typeof-rule-conditions.js +3 -3
- package/dist/evaluation/determine-if-data-has-changed.d.ts.map +1 -0
- package/dist/evaluation/evaluate-rule-conditions.d.ts.map +1 -0
- package/dist/evaluation/evaluate-rule.d.ts.map +1 -0
- package/dist/evaluation/evaluate-rules.d.ts.map +1 -0
- package/dist/evaluation/get-data-changed-information.d.ts.map +1 -0
- package/dist/evaluation/get-root-property-results.d.ts.map +1 -0
- package/dist/evaluation/index.d.ts.map +1 -0
- package/dist/evaluation/start-rule-evaluation.d.ts.map +1 -0
- package/dist/index.d.ts.map +1 -0
- package/package.json +4 -3
- package/dist/generic/src/errors/base-error.d.ts +0 -23
- package/dist/generic/src/errors/base-error.d.ts.map +0 -1
- package/dist/generic/src/errors/base-error.js +0 -34
- package/dist/generic/src/errors/generic/generic-errors.d.ts +0 -35
- package/dist/generic/src/errors/generic/generic-errors.d.ts.map +0 -1
- package/dist/generic/src/errors/generic/generic-errors.js +0 -47
- package/dist/generic/src/errors/index.d.ts +0 -7
- package/dist/generic/src/errors/index.d.ts.map +0 -1
- package/dist/generic/src/errors/index.js +0 -22
- package/dist/generic/src/errors/request/request-errors.d.ts +0 -89
- package/dist/generic/src/errors/request/request-errors.d.ts.map +0 -1
- package/dist/generic/src/errors/request/request-errors.js +0 -120
- package/dist/generic/src/errors/safe/safe-rules-errors.d.ts +0 -30
- package/dist/generic/src/errors/safe/safe-rules-errors.d.ts.map +0 -1
- package/dist/generic/src/errors/safe/safe-rules-errors.js +0 -40
- package/dist/generic/src/errors/scheduler/scheduler-errors.d.ts +0 -8
- package/dist/generic/src/errors/scheduler/scheduler-errors.d.ts.map +0 -1
- package/dist/generic/src/errors/scheduler/scheduler-errors.js +0 -14
- package/dist/generic/src/errors/share-data/share-data-errors.d.ts +0 -49
- package/dist/generic/src/errors/share-data/share-data-errors.d.ts.map +0 -1
- package/dist/generic/src/errors/share-data/share-data-errors.js +0 -66
- package/dist/generic/src/models/data/data-models.d.ts +0 -24
- package/dist/generic/src/models/data/data-models.d.ts.map +0 -1
- package/dist/generic/src/models/data/data-models.js +0 -3
- package/dist/generic/src/models/dynamic-execution/dynamic-execution-models.d.ts +0 -9
- package/dist/generic/src/models/dynamic-execution/dynamic-execution-models.d.ts.map +0 -1
- package/dist/generic/src/models/dynamic-execution/dynamic-execution-models.js +0 -2
- package/dist/generic/src/models/events/share-event-models.d.ts +0 -65
- package/dist/generic/src/models/events/share-event-models.d.ts.map +0 -1
- package/dist/generic/src/models/events/share-event-models.js +0 -70
- package/dist/generic/src/models/functions/share-data-function-models.d.ts +0 -86
- package/dist/generic/src/models/functions/share-data-function-models.d.ts.map +0 -1
- package/dist/generic/src/models/functions/share-data-function-models.js +0 -17
- package/dist/generic/src/models/generic/request-response-models.d.ts +0 -8
- package/dist/generic/src/models/generic/request-response-models.d.ts.map +0 -1
- package/dist/generic/src/models/generic/request-response-models.js +0 -2
- package/dist/generic/src/models/index.d.ts +0 -8
- package/dist/generic/src/models/index.d.ts.map +0 -1
- package/dist/generic/src/models/index.js +0 -24
- package/dist/generic/src/models/rules/share-rule-models.d.ts +0 -277
- package/dist/generic/src/models/rules/share-rule-models.d.ts.map +0 -1
- package/dist/generic/src/models/rules/share-rule-models.js +0 -107
- package/dist/generic/src/models/share-data/share-data.d.ts +0 -55
- package/dist/generic/src/models/share-data/share-data.d.ts.map +0 -1
- package/dist/generic/src/models/share-data/share-data.js +0 -19
- package/dist/rules/src/evaluation/check-function-integrity.d.ts.map +0 -1
- package/dist/rules/src/evaluation/check-if-proposal-is-valid.d.ts.map +0 -1
- package/dist/rules/src/evaluation/conditions/boolean-conditions.d.ts.map +0 -1
- package/dist/rules/src/evaluation/conditions/contains-conditions.d.ts.map +0 -1
- package/dist/rules/src/evaluation/conditions/empty-conditions.d.ts.map +0 -1
- package/dist/rules/src/evaluation/conditions/equality-conditions.d.ts.map +0 -1
- package/dist/rules/src/evaluation/conditions/null-conditions.d.ts.map +0 -1
- package/dist/rules/src/evaluation/conditions/range-conditions.d.ts.map +0 -1
- package/dist/rules/src/evaluation/conditions/special-conditions.d.ts.map +0 -1
- package/dist/rules/src/evaluation/conditions/starts-end-with-conditions.d.ts.map +0 -1
- package/dist/rules/src/evaluation/conditions/starts-end-with-conditions.js +0 -44
- package/dist/rules/src/evaluation/conditions/typeof-rule-conditions.d.ts.map +0 -1
- package/dist/rules/src/evaluation/determine-if-data-has-changed.d.ts.map +0 -1
- package/dist/rules/src/evaluation/evaluate-rule-conditions.d.ts.map +0 -1
- package/dist/rules/src/evaluation/evaluate-rule.d.ts.map +0 -1
- package/dist/rules/src/evaluation/evaluate-rules.d.ts.map +0 -1
- package/dist/rules/src/evaluation/get-data-changed-information.d.ts.map +0 -1
- package/dist/rules/src/evaluation/get-root-property-results.d.ts.map +0 -1
- package/dist/rules/src/evaluation/index.d.ts.map +0 -1
- package/dist/rules/src/evaluation/start-rule-evaluation.d.ts.map +0 -1
- package/dist/rules/src/index.d.ts.map +0 -1
- /package/dist/{rules/src/evaluation → evaluation}/check-function-integrity.d.ts +0 -0
- /package/dist/{rules/src/evaluation → evaluation}/check-function-integrity.js +0 -0
- /package/dist/{rules/src/evaluation → evaluation}/check-if-proposal-is-valid.d.ts +0 -0
- /package/dist/{rules/src/evaluation → evaluation}/check-if-proposal-is-valid.js +0 -0
- /package/dist/{rules/src/evaluation → evaluation}/conditions/boolean-conditions.d.ts +0 -0
- /package/dist/{rules/src/evaluation → evaluation}/conditions/boolean-conditions.js +0 -0
- /package/dist/{rules/src/evaluation → evaluation}/conditions/contains-conditions.d.ts +0 -0
- /package/dist/{rules/src/evaluation → evaluation}/conditions/contains-conditions.js +0 -0
- /package/dist/{rules/src/evaluation → evaluation}/conditions/empty-conditions.d.ts +0 -0
- /package/dist/{rules/src/evaluation → evaluation}/conditions/empty-conditions.js +0 -0
- /package/dist/{rules/src/evaluation → evaluation}/conditions/equality-conditions.d.ts +0 -0
- /package/dist/{rules/src/evaluation → evaluation}/conditions/equality-conditions.js +0 -0
- /package/dist/{rules/src/evaluation → evaluation}/conditions/null-conditions.d.ts +0 -0
- /package/dist/{rules/src/evaluation → evaluation}/conditions/null-conditions.js +0 -0
- /package/dist/{rules/src/evaluation → evaluation}/conditions/range-conditions.d.ts +0 -0
- /package/dist/{rules/src/evaluation → evaluation}/conditions/range-conditions.js +0 -0
- /package/dist/{rules/src/evaluation → evaluation}/conditions/special-conditions.d.ts +0 -0
- /package/dist/{rules/src/evaluation → evaluation}/conditions/special-conditions.js +0 -0
- /package/dist/{rules/src/evaluation → evaluation}/conditions/typeof-rule-conditions.d.ts +0 -0
- /package/dist/{rules/src/evaluation → evaluation}/determine-if-data-has-changed.d.ts +0 -0
- /package/dist/{rules/src/evaluation → evaluation}/determine-if-data-has-changed.js +0 -0
- /package/dist/{rules/src/evaluation → evaluation}/evaluate-rule-conditions.d.ts +0 -0
- /package/dist/{rules/src/evaluation → evaluation}/evaluate-rule-conditions.js +0 -0
- /package/dist/{rules/src/evaluation → evaluation}/evaluate-rule.d.ts +0 -0
- /package/dist/{rules/src/evaluation → evaluation}/evaluate-rule.js +0 -0
- /package/dist/{rules/src/evaluation → evaluation}/evaluate-rules.d.ts +0 -0
- /package/dist/{rules/src/evaluation → evaluation}/evaluate-rules.js +0 -0
- /package/dist/{rules/src/evaluation → evaluation}/get-data-changed-information.d.ts +0 -0
- /package/dist/{rules/src/evaluation → evaluation}/get-data-changed-information.js +0 -0
- /package/dist/{rules/src/evaluation → evaluation}/get-root-property-results.d.ts +0 -0
- /package/dist/{rules/src/evaluation → evaluation}/get-root-property-results.js +0 -0
- /package/dist/{rules/src/evaluation → evaluation}/index.d.ts +0 -0
- /package/dist/{rules/src/evaluation → evaluation}/index.js +0 -0
- /package/dist/{rules/src/evaluation → evaluation}/start-rule-evaluation.d.ts +0 -0
- /package/dist/{rules/src/evaluation → evaluation}/start-rule-evaluation.js +0 -0
- /package/dist/{rules/src/index.d.ts → index.d.ts} +0 -0
- /package/dist/{rules/src/index.js → index.js} +0 -0
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RequestParamNotValidError = exports.RequestQueryNotValidError = exports.RequestObjectPropertyNotMatchingParamProperty = exports.RequestObjectShouldOnlyHaveXPropertiesError = exports.RequestObjectTooFewPropertiesError = exports.RequestObjectTooManyPropertiesError = exports.RequestObjectValidationFailedError = void 0;
|
|
4
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
5
|
-
// This file contains the errors that are thrown when the request object is not valid.
|
|
6
|
-
const base_error_1 = require("../base-error");
|
|
7
|
-
//#region Request Body Errors
|
|
8
|
-
/**
|
|
9
|
-
* This is thrown when the request object is not valid.
|
|
10
|
-
*/
|
|
11
|
-
class RequestObjectValidationFailedError extends base_error_1.BaseError {
|
|
12
|
-
/**
|
|
13
|
-
* This is thrown when the request object is not valid.
|
|
14
|
-
* @param objectToValidate the object that is not valid
|
|
15
|
-
* @param validationType the type of validation that failed
|
|
16
|
-
*/
|
|
17
|
-
constructor(objectToValidate, validationObject, validationType) {
|
|
18
|
-
super(`The object ${objectToValidate} in the node ${validationObject} is not a valid ${validationType}`);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
exports.RequestObjectValidationFailedError = RequestObjectValidationFailedError;
|
|
22
|
-
/**
|
|
23
|
-
* This is throw when the request object has too many properties.
|
|
24
|
-
*/
|
|
25
|
-
class RequestObjectTooManyPropertiesError extends base_error_1.BaseError {
|
|
26
|
-
/**
|
|
27
|
-
* This is throw when the request object has too many properties.
|
|
28
|
-
* @param objectToValidate the object that is not valid
|
|
29
|
-
* @param validationOject the object property text that is being validated
|
|
30
|
-
* @param totalProperties the total properties on the object
|
|
31
|
-
* @param maxProperties the max properties allowed on the object
|
|
32
|
-
*/
|
|
33
|
-
constructor(objectToValidate, validationOject, totalProperties, maxProperties) {
|
|
34
|
-
super(`The object ${objectToValidate} which is property ${validationOject} has too many properties. It has ${totalProperties} and the max is ${maxProperties}`);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
exports.RequestObjectTooManyPropertiesError = RequestObjectTooManyPropertiesError;
|
|
38
|
-
/**
|
|
39
|
-
* This is thrown when the request object has too few properties.
|
|
40
|
-
*/
|
|
41
|
-
class RequestObjectTooFewPropertiesError extends base_error_1.BaseError {
|
|
42
|
-
/**
|
|
43
|
-
* This is thrown when the request object has too few properties.
|
|
44
|
-
* @param objectToValidate the object that is not valid
|
|
45
|
-
* @param validationOject the object property text that is being validated
|
|
46
|
-
* @param totalProperties the total properties on the object
|
|
47
|
-
* @param minProperties the min properties allowed on the object
|
|
48
|
-
*/
|
|
49
|
-
constructor(objectToValidate, validationOject, totalProperties, minProperties) {
|
|
50
|
-
super(`The object ${objectToValidate} which is property ${validationOject} has too few properties. It has ${totalProperties} and the min is ${minProperties}`);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
exports.RequestObjectTooFewPropertiesError = RequestObjectTooFewPropertiesError;
|
|
54
|
-
/**
|
|
55
|
-
* This is thrown when the request object should only have a certain number of properties.
|
|
56
|
-
*/
|
|
57
|
-
class RequestObjectShouldOnlyHaveXPropertiesError extends base_error_1.BaseError {
|
|
58
|
-
/**
|
|
59
|
-
* This is thrown when the request object should only have a certain number of properties.
|
|
60
|
-
* @param objectToValidate the object that is not valid
|
|
61
|
-
* @param validationOject the object property text that is being validated
|
|
62
|
-
* @param totalProperties the total properties on the object
|
|
63
|
-
* @param expectedProperties the expected properties on the object
|
|
64
|
-
*/
|
|
65
|
-
constructor(objectToValidate, validationOject, totalProperties, expectedProperties) {
|
|
66
|
-
super(`The object ${objectToValidate} which is property ${validationOject} should only have ${expectedProperties} properties. It has ${totalProperties}`);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
exports.RequestObjectShouldOnlyHaveXPropertiesError = RequestObjectShouldOnlyHaveXPropertiesError;
|
|
70
|
-
/**
|
|
71
|
-
* This is throw when the request object has a property that does not match the param property.
|
|
72
|
-
*/
|
|
73
|
-
class RequestObjectPropertyNotMatchingParamProperty extends base_error_1.BaseError {
|
|
74
|
-
/**
|
|
75
|
-
* This is thrown when the request object doesnot match the param property.
|
|
76
|
-
* @param requestPropertyName the property in the request object
|
|
77
|
-
* @param requestPropertyValue the value of the property in the request object
|
|
78
|
-
* @param paramPropertyName the property in the param object
|
|
79
|
-
* @param paramPropertyValue the value of the property in the param object
|
|
80
|
-
*/
|
|
81
|
-
constructor(requestPropertyName, requestPropertyValue, paramPropertyName, paramPropertyValue) {
|
|
82
|
-
super(`The request object property ${requestPropertyName} with value ${requestPropertyValue} does not match the param property ${paramPropertyName} with value ${paramPropertyValue}`);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
exports.RequestObjectPropertyNotMatchingParamProperty = RequestObjectPropertyNotMatchingParamProperty;
|
|
86
|
-
//#endregion Request Body Errors
|
|
87
|
-
//#region Request Query Errors
|
|
88
|
-
/**
|
|
89
|
-
* This is thrown when the query object is not valid.
|
|
90
|
-
*/
|
|
91
|
-
class RequestQueryNotValidError extends base_error_1.BaseError {
|
|
92
|
-
/**
|
|
93
|
-
* This is thrown when the query object is not valid.
|
|
94
|
-
* @param queryObjectName the name of the query object
|
|
95
|
-
* @param queryValue the value of the query object
|
|
96
|
-
* @param expectedType the expected type of the query object
|
|
97
|
-
*/
|
|
98
|
-
constructor(queryObjectName, queryValue, expectedType) {
|
|
99
|
-
super(`The query object ${queryObjectName} with value ${queryValue} is not a valid ${expectedType}`);
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
exports.RequestQueryNotValidError = RequestQueryNotValidError;
|
|
103
|
-
//#endregion Request Query Errors
|
|
104
|
-
//#region Request Param Errors
|
|
105
|
-
/**
|
|
106
|
-
* This is thrown when the param object is not valid.
|
|
107
|
-
*/
|
|
108
|
-
class RequestParamNotValidError extends base_error_1.BaseError {
|
|
109
|
-
/**
|
|
110
|
-
* This is thrown when the param object is not valid.
|
|
111
|
-
* @param paramName the name of the param object
|
|
112
|
-
* @param paramValue the value of the param object
|
|
113
|
-
* @param expectedType the expected type of the param object
|
|
114
|
-
*/
|
|
115
|
-
constructor(paramName, paramValue, expectedType, allParams) {
|
|
116
|
-
super(`The param object ${paramName} with value ${paramValue} is not a valid ${expectedType}. All params: ${JSON.stringify(allParams)}`);
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
exports.RequestParamNotValidError = RequestParamNotValidError;
|
|
120
|
-
//#endregion Request Param Errors
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { ConditionType } from '../../models';
|
|
2
|
-
import { BaseError } from '../base-error';
|
|
3
|
-
/**
|
|
4
|
-
* This error is thrown when a evaluation condition data value is not valid
|
|
5
|
-
*/
|
|
6
|
-
export declare class SafeRuleEvaluationConditionDataValueError extends BaseError {
|
|
7
|
-
/**
|
|
8
|
-
* This error is thrown when a evaluation condition data value is not valid
|
|
9
|
-
*/
|
|
10
|
-
constructor(dataValue: unknown, conditionValue: unknown, conditionType: ConditionType);
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* This error is thrown when a evaluation condition value is not valid
|
|
14
|
-
*/
|
|
15
|
-
export declare class SafeRuleEvaluationConditionValueError extends BaseError {
|
|
16
|
-
/**
|
|
17
|
-
* This error is thrown when a evaluation condition value is not valid
|
|
18
|
-
*/
|
|
19
|
-
constructor(dataValue: unknown, conditionValue: unknown, conditionType: ConditionType);
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* This error is thrown when a speical condition pattern is not valid
|
|
23
|
-
*/
|
|
24
|
-
export declare class SafeRuleEvaluationSpecialConditionPatternError extends BaseError {
|
|
25
|
-
/**
|
|
26
|
-
* This error is thrown when a speical condition pattern is not valid
|
|
27
|
-
*/
|
|
28
|
-
constructor(dataValue: unknown, conditionValue: unknown);
|
|
29
|
-
}
|
|
30
|
-
//# sourceMappingURL=safe-rules-errors.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"safe-rules-errors.d.ts","sourceRoot":"","sources":["../../../../../../generic/src/errors/safe/safe-rules-errors.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C;;GAEG;AACH,qBAAa,yCAA0C,SAAQ,SAAS;IACpE;;OAEG;gBACS,SAAS,EAAE,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,aAAa,EAAE,aAAa;CAGxF;AAED;;GAEG;AACH,qBAAa,qCAAsC,SAAQ,SAAS;IAChE;;OAEG;gBACS,SAAS,EAAE,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,aAAa,EAAE,aAAa;CAGxF;AAED;;GAEG;AACH,qBAAa,8CAA+C,SAAQ,SAAS;IACzE;;OAEG;gBACS,SAAS,EAAE,OAAO,EAAE,cAAc,EAAE,OAAO;CAG1D"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SafeRuleEvaluationSpecialConditionPatternError = exports.SafeRuleEvaluationConditionValueError = exports.SafeRuleEvaluationConditionDataValueError = void 0;
|
|
4
|
-
const base_error_1 = require("../base-error");
|
|
5
|
-
/**
|
|
6
|
-
* This error is thrown when a evaluation condition data value is not valid
|
|
7
|
-
*/
|
|
8
|
-
class SafeRuleEvaluationConditionDataValueError extends base_error_1.BaseError {
|
|
9
|
-
/**
|
|
10
|
-
* This error is thrown when a evaluation condition data value is not valid
|
|
11
|
-
*/
|
|
12
|
-
constructor(dataValue, conditionValue, conditionType) {
|
|
13
|
-
super(`Share Rule condition evaluation for type ${conditionType} failed to execute. dataValue: ${dataValue} is incorrect for conditionValue: ${conditionValue}`);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
exports.SafeRuleEvaluationConditionDataValueError = SafeRuleEvaluationConditionDataValueError;
|
|
17
|
-
/**
|
|
18
|
-
* This error is thrown when a evaluation condition value is not valid
|
|
19
|
-
*/
|
|
20
|
-
class SafeRuleEvaluationConditionValueError extends base_error_1.BaseError {
|
|
21
|
-
/**
|
|
22
|
-
* This error is thrown when a evaluation condition value is not valid
|
|
23
|
-
*/
|
|
24
|
-
constructor(dataValue, conditionValue, conditionType) {
|
|
25
|
-
super(`Share Rule condition evaluation for type ${conditionType} failed to execute. conditionValue: ${conditionValue} is incorrect for dataValue: ${dataValue}`);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
exports.SafeRuleEvaluationConditionValueError = SafeRuleEvaluationConditionValueError;
|
|
29
|
-
/**
|
|
30
|
-
* This error is thrown when a speical condition pattern is not valid
|
|
31
|
-
*/
|
|
32
|
-
class SafeRuleEvaluationSpecialConditionPatternError extends base_error_1.BaseError {
|
|
33
|
-
/**
|
|
34
|
-
* This error is thrown when a speical condition pattern is not valid
|
|
35
|
-
*/
|
|
36
|
-
constructor(dataValue, conditionValue) {
|
|
37
|
-
super(`Share Rule special condition pattern evaluation failed to execute. dataValue ${dataValue} and conditionValue: ${conditionValue}`);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
exports.SafeRuleEvaluationSpecialConditionPatternError = SafeRuleEvaluationSpecialConditionPatternError;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"scheduler-errors.d.ts","sourceRoot":"","sources":["../../../../../../generic/src/errors/scheduler/scheduler-errors.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C;;GAEG;AACH,qBAAa,iBAAkB,SAAQ,SAAS;gBAChC,MAAM,EAAE,MAAM;CAG7B"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// this file contains all the errors that can be thrown by the scheduler
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.TaskNotFoundError = void 0;
|
|
5
|
-
const base_error_1 = require("../base-error");
|
|
6
|
-
/**
|
|
7
|
-
* This error is thrown when a task is not found in the scheduler
|
|
8
|
-
*/
|
|
9
|
-
class TaskNotFoundError extends base_error_1.BaseError {
|
|
10
|
-
constructor(taskId) {
|
|
11
|
-
super(`An error occurred while trying to remove task ${taskId}.`);
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
exports.TaskNotFoundError = TaskNotFoundError;
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { BaseError } from '../base-error';
|
|
2
|
-
import { ShareDataTypes } from '../../models/share-data/share-data';
|
|
3
|
-
import { IShareDataFunction } from '../../models/functions/share-data-function-models';
|
|
4
|
-
/**
|
|
5
|
-
* This error is thrown when a function is tried to be applied to the share data thats state is locked.
|
|
6
|
-
*/
|
|
7
|
-
export declare class ShareDataIsLockedError extends BaseError {
|
|
8
|
-
/**
|
|
9
|
-
* This error is thrown when a function is tried to be applied to the share data thats state is locked.
|
|
10
|
-
*/
|
|
11
|
-
constructor(shareDataId: string, shareDataType: ShareDataTypes);
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* This error is thrown when a data proposal matches the current data in the rules evaluation service.
|
|
15
|
-
*/
|
|
16
|
-
export declare class ShareDataCurrentAndProposalDataMatchesError extends BaseError {
|
|
17
|
-
/**
|
|
18
|
-
* This error is thrown when a data proposal matches the current data in the rules evaluation service.
|
|
19
|
-
*/
|
|
20
|
-
constructor(shareDataId: string);
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* This error is thrown when the share data integrity check fails.
|
|
24
|
-
*/
|
|
25
|
-
export declare class ShareDataIntegrityError extends BaseError {
|
|
26
|
-
/**
|
|
27
|
-
* This error is thrown when the share data integrity check fails.
|
|
28
|
-
*/
|
|
29
|
-
constructor(shareDataId: string);
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* This error is thrown when the attemping to be applied function does not exist on the share data.
|
|
33
|
-
*/
|
|
34
|
-
export declare class ShareDataFunctionBeingAppliedDoesNotExistOnShareDataError extends BaseError {
|
|
35
|
-
/**
|
|
36
|
-
* This error is thrown when the attemping to be applied function does not exist on the share data.
|
|
37
|
-
*/
|
|
38
|
-
constructor(shareDataId: string, functionName: string, functionId: string);
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* This error is thrown when the function hash is not valid.
|
|
42
|
-
*/
|
|
43
|
-
export declare class ShareDataFunctionHashNotValid extends BaseError {
|
|
44
|
-
/**
|
|
45
|
-
* This error is thrown when the function hash is not valid.
|
|
46
|
-
*/
|
|
47
|
-
constructor(shareDataId: string, shareDataFunction: IShareDataFunction, calculatedHash: string);
|
|
48
|
-
}
|
|
49
|
-
//# sourceMappingURL=share-data-errors.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"share-data-errors.d.ts","sourceRoot":"","sources":["../../../../../../generic/src/errors/share-data/share-data-errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mDAAmD,CAAC;AAEvF;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,SAAS;IACjD;;OAEG;gBACS,WAAW,EAAE,MAAM,EAAE,aAAa,EAAE,cAAc;CAGjE;AAED;;GAEG;AACH,qBAAa,2CAA4C,SAAQ,SAAS;IACtE;;OAEG;gBACS,WAAW,EAAE,MAAM;CAGlC;AAED;;GAEG;AACH,qBAAa,uBAAwB,SAAQ,SAAS;IAClD;;OAEG;gBACS,WAAW,EAAE,MAAM;CAGlC;AAED;;GAEG;AACH,qBAAa,yDAA0D,SAAQ,SAAS;IACpF;;OAEG;gBACS,WAAW,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM;CAI5E;AAGD;;GAEG;AACH,qBAAa,6BAA8B,SAAQ,SAAS;IACxD;;OAEG;gBACS,WAAW,EAAE,MAAM,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM;CAIjG"}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ShareDataFunctionHashNotValid = exports.ShareDataFunctionBeingAppliedDoesNotExistOnShareDataError = exports.ShareDataIntegrityError = exports.ShareDataCurrentAndProposalDataMatchesError = exports.ShareDataIsLockedError = void 0;
|
|
4
|
-
const base_error_1 = require("../base-error");
|
|
5
|
-
/**
|
|
6
|
-
* This error is thrown when a function is tried to be applied to the share data thats state is locked.
|
|
7
|
-
*/
|
|
8
|
-
class ShareDataIsLockedError extends base_error_1.BaseError {
|
|
9
|
-
/**
|
|
10
|
-
* This error is thrown when a function is tried to be applied to the share data thats state is locked.
|
|
11
|
-
*/
|
|
12
|
-
constructor(shareDataId, shareDataType) {
|
|
13
|
-
super(`Share data with id ${shareDataId} and type ${shareDataType} is locked and cannot be modified.`);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
exports.ShareDataIsLockedError = ShareDataIsLockedError;
|
|
17
|
-
/**
|
|
18
|
-
* This error is thrown when a data proposal matches the current data in the rules evaluation service.
|
|
19
|
-
*/
|
|
20
|
-
class ShareDataCurrentAndProposalDataMatchesError extends base_error_1.BaseError {
|
|
21
|
-
/**
|
|
22
|
-
* This error is thrown when a data proposal matches the current data in the rules evaluation service.
|
|
23
|
-
*/
|
|
24
|
-
constructor(shareDataId) {
|
|
25
|
-
super(`Share data with id ${shareDataId} current and proposal data matches.`);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
exports.ShareDataCurrentAndProposalDataMatchesError = ShareDataCurrentAndProposalDataMatchesError;
|
|
29
|
-
/**
|
|
30
|
-
* This error is thrown when the share data integrity check fails.
|
|
31
|
-
*/
|
|
32
|
-
class ShareDataIntegrityError extends base_error_1.BaseError {
|
|
33
|
-
/**
|
|
34
|
-
* This error is thrown when the share data integrity check fails.
|
|
35
|
-
*/
|
|
36
|
-
constructor(shareDataId) {
|
|
37
|
-
super(`Share data with id ${shareDataId} failed the integrity check.`);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
exports.ShareDataIntegrityError = ShareDataIntegrityError;
|
|
41
|
-
/**
|
|
42
|
-
* This error is thrown when the attemping to be applied function does not exist on the share data.
|
|
43
|
-
*/
|
|
44
|
-
class ShareDataFunctionBeingAppliedDoesNotExistOnShareDataError extends base_error_1.BaseError {
|
|
45
|
-
/**
|
|
46
|
-
* This error is thrown when the attemping to be applied function does not exist on the share data.
|
|
47
|
-
*/
|
|
48
|
-
constructor(shareDataId, functionName, functionId) {
|
|
49
|
-
super(`On share data with id ${shareDataId} the function with id: ${functionId} & name: ${functionName} that is trying to be executed, ` +
|
|
50
|
-
'but does not exist in the authorized functions for the share data.');
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
exports.ShareDataFunctionBeingAppliedDoesNotExistOnShareDataError = ShareDataFunctionBeingAppliedDoesNotExistOnShareDataError;
|
|
54
|
-
/**
|
|
55
|
-
* This error is thrown when the function hash is not valid.
|
|
56
|
-
*/
|
|
57
|
-
class ShareDataFunctionHashNotValid extends base_error_1.BaseError {
|
|
58
|
-
/**
|
|
59
|
-
* This error is thrown when the function hash is not valid.
|
|
60
|
-
*/
|
|
61
|
-
constructor(shareDataId, shareDataFunction, calculatedHash) {
|
|
62
|
-
super(`On share data with id ${shareDataId} the function with current hash: ${shareDataFunction.currentHash} & previous hase: ${shareDataFunction.previousHash}` +
|
|
63
|
-
` that is trying to be executed does not meet the generated hash ${calculatedHash}. This makes it an authorized function execution.`);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
exports.ShareDataFunctionHashNotValid = ShareDataFunctionHashNotValid;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This contains the minimum information that is needed on a data record.
|
|
3
|
-
*/
|
|
4
|
-
export interface IGenericData {
|
|
5
|
-
createdAt: number;
|
|
6
|
-
createdBy: string;
|
|
7
|
-
updatedAt: number;
|
|
8
|
-
updatedBy: string;
|
|
9
|
-
versionNumber: number;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* This contains the data for an item with a searchable index.
|
|
13
|
-
* for the word 'found' this object would look like this:
|
|
14
|
-
* {
|
|
15
|
-
* f: true,
|
|
16
|
-
* fo: true,
|
|
17
|
-
* fou: true,
|
|
18
|
-
* foun: true,
|
|
19
|
-
* found: true,
|
|
20
|
-
*/
|
|
21
|
-
export interface ISearchableIndex {
|
|
22
|
-
[key: string]: true;
|
|
23
|
-
}
|
|
24
|
-
//# sourceMappingURL=data-models.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"data-models.d.ts","sourceRoot":"","sources":["../../../../../../generic/src/models/data/data-models.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,WAAW,YAAY;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,gBAAgB;IAC7B,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dynamic-execution-models.d.ts","sourceRoot":"","sources":["../../../../../../generic/src/models/dynamic-execution/dynamic-execution-models.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACpC,MAAM,EAAE,GAAG,CAAC;IACZ,aAAa,EAAE,MAAM,CAAC;IACtB,oBAAoB,EAAE,MAAM,CAAC;CAChC"}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This contains the interfaces for all event data types that can be run on the network.
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* This is the types of events that can be run on the network.
|
|
6
|
-
*/
|
|
7
|
-
export declare enum ShareEventType {
|
|
8
|
-
Application = "Application",
|
|
9
|
-
DataChange = "DataChange",
|
|
10
|
-
Scheduled = "Scheduled"
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* All sources of event trusts
|
|
14
|
-
*/
|
|
15
|
-
export declare enum EventSourceTruthType {
|
|
16
|
-
Crypto = "Crypto",
|
|
17
|
-
Oauth = "Oauth",
|
|
18
|
-
ShareBlock = "ShareBlock"
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* All the types of proofs that can be sent from the sources of event execution truths.
|
|
22
|
-
*/
|
|
23
|
-
export declare enum EventSourceTruthProofType {
|
|
24
|
-
Hash = "Hash",
|
|
25
|
-
Signature = "Signature"
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* This is the type of processing that can be done on the share data event.
|
|
29
|
-
*/
|
|
30
|
-
export declare enum ShareDataEventProcessingType {
|
|
31
|
-
Parallel = "parallel",
|
|
32
|
-
Linear = "linear"
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* This is the interface for the share data event.
|
|
36
|
-
*/
|
|
37
|
-
export interface ShareDataEvent {
|
|
38
|
-
eventId: string;
|
|
39
|
-
locked: boolean;
|
|
40
|
-
eventType: ShareEventType;
|
|
41
|
-
eventSource: string;
|
|
42
|
-
eventSourceTruthType: EventSourceTruthType;
|
|
43
|
-
eventSourceTruthProofType: EventSourceTruthProofType;
|
|
44
|
-
eventSourceTruthProof: string | number | Buffer;
|
|
45
|
-
triggerCondition: (...args: any[]) => boolean;
|
|
46
|
-
shareDataEventInformation: IShareDataEvent[];
|
|
47
|
-
eventContext?: object;
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* This is the interface for the share data event.
|
|
51
|
-
*/
|
|
52
|
-
export interface IShareDataEvent {
|
|
53
|
-
shareData: IShareDataAndFunctionEvent[];
|
|
54
|
-
processingType: ShareDataEventProcessingType;
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* This is all data that is required to find the sharedata and function to execute.
|
|
58
|
-
*/
|
|
59
|
-
export interface IShareDataAndFunctionEvent {
|
|
60
|
-
shareDataId: string;
|
|
61
|
-
functionId: string;
|
|
62
|
-
shareDataInputs: string[];
|
|
63
|
-
inputs: any;
|
|
64
|
-
}
|
|
65
|
-
//# sourceMappingURL=share-event-models.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"share-event-models.d.ts","sourceRoot":"","sources":["../../../../../../generic/src/models/events/share-event-models.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH;;GAEG;AACH,oBAAY,cAAc;IACtB,WAAW,gBAAgB;IAC3B,UAAU,eAAe;IACzB,SAAS,cAAc;CAC1B;AAED;;GAEG;AACH,oBAAY,oBAAoB;IAC5B,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,UAAU,eAAe;CAC5B;AAED;;GAEG;AACH,oBAAY,yBAAyB;IACjC,IAAI,SAAS;IACb,SAAS,cAAc;CAC1B;AAED;;GAEG;AACH,oBAAY,4BAA4B;IACpC,QAAQ,aAAa;IACrB,MAAM,WAAW;CACpB;AAKD;;GAEG;AACH,MAAM,WAAW,cAAc;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,cAAc,CAAC;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,oBAAoB,EAAE,oBAAoB,CAAC;IAC3C,yBAAyB,EAAE,yBAAyB,CAAC;IACrD,qBAAqB,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;IAChD,gBAAgB,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,CAAC;IAE9C,yBAAyB,EAAE,eAAe,EAAE,CAAC;IAC7C,YAAY,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC5B,SAAS,EAAE,0BAA0B,EAAE,CAAC;IACxC,cAAc,EAAE,4BAA4B,CAAC;CAChD;AAED;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACvC,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,MAAM,EAAE,GAAG,CAAC;CACf"}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* This contains the interfaces for all event data types that can be run on the network.
|
|
4
|
-
*/
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.ShareDataEventProcessingType = exports.EventSourceTruthProofType = exports.EventSourceTruthType = exports.ShareEventType = void 0;
|
|
7
|
-
//#region Share Event Data Enums
|
|
8
|
-
/**
|
|
9
|
-
* This is the types of events that can be run on the network.
|
|
10
|
-
*/
|
|
11
|
-
var ShareEventType;
|
|
12
|
-
(function (ShareEventType) {
|
|
13
|
-
ShareEventType["Application"] = "Application";
|
|
14
|
-
ShareEventType["DataChange"] = "DataChange";
|
|
15
|
-
ShareEventType["Scheduled"] = "Scheduled";
|
|
16
|
-
})(ShareEventType || (exports.ShareEventType = ShareEventType = {}));
|
|
17
|
-
/**
|
|
18
|
-
* All sources of event trusts
|
|
19
|
-
*/
|
|
20
|
-
var EventSourceTruthType;
|
|
21
|
-
(function (EventSourceTruthType) {
|
|
22
|
-
EventSourceTruthType["Crypto"] = "Crypto";
|
|
23
|
-
EventSourceTruthType["Oauth"] = "Oauth";
|
|
24
|
-
EventSourceTruthType["ShareBlock"] = "ShareBlock";
|
|
25
|
-
})(EventSourceTruthType || (exports.EventSourceTruthType = EventSourceTruthType = {}));
|
|
26
|
-
/**
|
|
27
|
-
* All the types of proofs that can be sent from the sources of event execution truths.
|
|
28
|
-
*/
|
|
29
|
-
var EventSourceTruthProofType;
|
|
30
|
-
(function (EventSourceTruthProofType) {
|
|
31
|
-
EventSourceTruthProofType["Hash"] = "Hash";
|
|
32
|
-
EventSourceTruthProofType["Signature"] = "Signature";
|
|
33
|
-
})(EventSourceTruthProofType || (exports.EventSourceTruthProofType = EventSourceTruthProofType = {}));
|
|
34
|
-
/**
|
|
35
|
-
* This is the type of processing that can be done on the share data event.
|
|
36
|
-
*/
|
|
37
|
-
var ShareDataEventProcessingType;
|
|
38
|
-
(function (ShareDataEventProcessingType) {
|
|
39
|
-
ShareDataEventProcessingType["Parallel"] = "parallel";
|
|
40
|
-
ShareDataEventProcessingType["Linear"] = "linear";
|
|
41
|
-
})(ShareDataEventProcessingType || (exports.ShareDataEventProcessingType = ShareDataEventProcessingType = {}));
|
|
42
|
-
// const applicationEvent: ShareDataEvent = {
|
|
43
|
-
// eventId: 'appEvent123',
|
|
44
|
-
// eventType: 'Application',
|
|
45
|
-
// eventSource: 'API',
|
|
46
|
-
// triggerCondition: () => true, // Always triggers for demonstration purposes
|
|
47
|
-
// shareDataEventInformation: [
|
|
48
|
-
// {
|
|
49
|
-
// shareData: [
|
|
50
|
-
// { shareDataId: shareDataIds[0], functionId: 'funcA', shareDataInputs: ['financial.principal', 'financial.time'], inputs: { rate: 0.45 } },
|
|
51
|
-
// { shareDataId: 'data2', functionId: 'funcB', shareDataInputs: {}, inputs: { rate: 0.45 } },
|
|
52
|
-
// { shareDataId: 'data3', functionId: 'funcC' },
|
|
53
|
-
// ],
|
|
54
|
-
// processingType: 'parallel', // Process in parallel
|
|
55
|
-
// },
|
|
56
|
-
// {
|
|
57
|
-
// shareData: [
|
|
58
|
-
// { shareDataId: 'data3', functionId: 'funcC' },
|
|
59
|
-
// { shareDataId: 'data4', functionId: 'funcD' },
|
|
60
|
-
// { shareDataId: 'data3', functionId: 'funcE' },
|
|
61
|
-
// ],
|
|
62
|
-
// processingType: 'linear', // Process in linear order
|
|
63
|
-
// },
|
|
64
|
-
// ],
|
|
65
|
-
// eventContext: {
|
|
66
|
-
// user: 'john_doe',
|
|
67
|
-
// timestamp: new Date().toISOString(),
|
|
68
|
-
// },
|
|
69
|
-
// };
|
|
70
|
-
// shareDataIds[0],
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This contains the data for the sahre functions
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* This is the incoming object for the share functions.
|
|
6
|
-
*/
|
|
7
|
-
export interface ITargetObject {
|
|
8
|
-
[key: string]: unknown;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* This contains all the proof types that exist for the network.
|
|
12
|
-
*/
|
|
13
|
-
export declare enum INetworkProofType {
|
|
14
|
-
CRYPTOGRAPHIC_SIGNATURE = "CRYPTOGRAPHIC_SIGNATURE"
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* This contains the network proof for the share data network functions.
|
|
18
|
-
*/
|
|
19
|
-
export type INetworkProof = ICryptographicSignatureProof;
|
|
20
|
-
/**
|
|
21
|
-
* This contains the cryptographic signature proof for the share data network functions.
|
|
22
|
-
*/
|
|
23
|
-
export interface ICryptographicSignatureProof {
|
|
24
|
-
publicKey: string;
|
|
25
|
-
signature: string;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* This contains the data for a share data network function without the signature
|
|
29
|
-
*/
|
|
30
|
-
export interface IShareDataFunctionBasic {
|
|
31
|
-
createdAt: number;
|
|
32
|
-
previousHash: string;
|
|
33
|
-
stringifiedFunction: string;
|
|
34
|
-
currentHash: string;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* This contains the data for a share data network function.
|
|
38
|
-
*/
|
|
39
|
-
export interface IShareDataFunction extends IShareDataFunctionBasic {
|
|
40
|
-
proof: INetworkProof;
|
|
41
|
-
proofType: INetworkProofType;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* This contains a share data network function
|
|
45
|
-
*/
|
|
46
|
-
export interface IShareDataNetworkFunction {
|
|
47
|
-
id: string;
|
|
48
|
-
name: string;
|
|
49
|
-
description: string;
|
|
50
|
-
shareDataFunctions: IShareDataFunction[];
|
|
51
|
-
proof: INetworkProof;
|
|
52
|
-
proofType: INetworkProofType;
|
|
53
|
-
}
|
|
54
|
-
export interface IShareDataNetworkFunctionDescriptor {
|
|
55
|
-
functionNumber: number;
|
|
56
|
-
name: string;
|
|
57
|
-
description: string;
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* This contains the data for a share data network rule that is the basic shape.
|
|
61
|
-
*/
|
|
62
|
-
export interface IShareDataRuleBasic {
|
|
63
|
-
createdAt: number;
|
|
64
|
-
previousHash: string;
|
|
65
|
-
stringifiedRule: string;
|
|
66
|
-
currentHash: string;
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* This contains the interface for a share function record in the share data object
|
|
70
|
-
*/
|
|
71
|
-
export interface IShareDataNetworkRule {
|
|
72
|
-
id: string;
|
|
73
|
-
shareDataRules: IShareDataRule[];
|
|
74
|
-
applicationId: string;
|
|
75
|
-
applicationIdProof: string;
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* This contains the data for a share data network rule.
|
|
79
|
-
*/
|
|
80
|
-
export interface IShareDataRule {
|
|
81
|
-
createdAt: number;
|
|
82
|
-
previousHash: string;
|
|
83
|
-
stringifiedRule: string;
|
|
84
|
-
currentHash: string;
|
|
85
|
-
}
|
|
86
|
-
//# sourceMappingURL=share-data-function-models.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"share-data-function-models.d.ts","sourceRoot":"","sources":["../../../../../../generic/src/models/functions/share-data-function-models.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,MAAM,WAAW,aAAa;IAC1B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B;AAED;;GAEG;AACH,oBAAY,iBAAiB;IACzB,uBAAuB,4BAA4B;CACtD;AACD;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,4BAA4B,CAAC;AAEzD;;GAEG;AACH,MAAM,WAAW,4BAA4B;IACzC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACrB;AACD;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,WAAW,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAmB,SAAQ,uBAAuB;IAC/D,KAAK,EAAE,aAAa,CAAC;IACrB,SAAS,EAAE,iBAAiB,CAAC;CAChC;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,kBAAkB,EAAE,kBAAkB,EAAE,CAAC;IACzC,KAAK,EAAE,aAAa,CAAC;IACrB,SAAS,EAAE,iBAAiB,CAAC;CAChC;AAED,MAAM,WAAW,mCAAmC;IAChD,cAAc,EAAE,MAAM,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;CACvB;AAGD;;GAEG;AACH,MAAM,WAAW,qBAAqB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,cAAc,EAAE,cAAc,EAAE,CAAC;IACjC,aAAa,EAAE,MAAM,CAAC;IACtB,kBAAkB,EAAE,MAAM,CAAC;CAC9B;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;CACvB"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* This contains the data for the sahre functions
|
|
4
|
-
*/
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.INetworkProofType = void 0;
|
|
7
|
-
/**
|
|
8
|
-
* This contains all the proof types that exist for the network.
|
|
9
|
-
*/
|
|
10
|
-
var INetworkProofType;
|
|
11
|
-
(function (INetworkProofType) {
|
|
12
|
-
INetworkProofType["CRYPTOGRAPHIC_SIGNATURE"] = "CRYPTOGRAPHIC_SIGNATURE";
|
|
13
|
-
})(INetworkProofType || (exports.INetworkProofType = INetworkProofType = {}));
|
|
14
|
-
/// Use of user defined function in the share data
|
|
15
|
-
/// Storage / Retrieval of the user defined functions in the network. (logic library)
|
|
16
|
-
// Use of user defined rules in the share data (product)
|
|
17
|
-
// Storage / Retrieval of the user defined rules in the network. (logic library)
|