@degenerate/rules 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/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/evaluation/conditions/starts-end-with-conditions.d.ts.map +1 -0
- package/dist/evaluation/conditions/typeof-rule-conditions.d.ts.map +1 -0
- 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 +1 -1
- 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/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/starts-end-with-conditions.d.ts +0 -0
- /package/dist/{rules/src/evaluation → evaluation}/conditions/starts-end-with-conditions.js +0 -0
- /package/dist/{rules/src/evaluation → evaluation}/conditions/typeof-rule-conditions.d.ts +0 -0
- /package/dist/{rules/src/evaluation → evaluation}/conditions/typeof-rule-conditions.js +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,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)
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"request-response-models.d.ts","sourceRoot":"","sources":["../../../../../../generic/src/models/generic/request-response-models.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC7B,UAAU,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export * from './data/data-models';
|
|
2
|
-
export * from './dynamic-execution/dynamic-execution-models';
|
|
3
|
-
export * from './events/share-event-models';
|
|
4
|
-
export * from './functions/share-data-function-models';
|
|
5
|
-
export * from './generic/request-response-models';
|
|
6
|
-
export * from './rules/share-rule-models';
|
|
7
|
-
export * from './share-data/share-data';
|
|
8
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../generic/src/models/index.ts"],"names":[],"mappings":"AAEA,cAAc,oBAAoB,CAAC;AACnC,cAAc,8CAA8C,CAAC;AAC7D,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wCAAwC,CAAC;AACvD,cAAc,mCAAmC,CAAC;AAClD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// This exports all model files from the models folder.
|
|
3
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
-
if (k2 === undefined) k2 = k;
|
|
5
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
-
}
|
|
9
|
-
Object.defineProperty(o, k2, desc);
|
|
10
|
-
}) : (function(o, m, k, k2) {
|
|
11
|
-
if (k2 === undefined) k2 = k;
|
|
12
|
-
o[k2] = m[k];
|
|
13
|
-
}));
|
|
14
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
15
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
16
|
-
};
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
__exportStar(require("./data/data-models"), exports);
|
|
19
|
-
__exportStar(require("./dynamic-execution/dynamic-execution-models"), exports);
|
|
20
|
-
__exportStar(require("./events/share-event-models"), exports);
|
|
21
|
-
__exportStar(require("./functions/share-data-function-models"), exports);
|
|
22
|
-
__exportStar(require("./generic/request-response-models"), exports);
|
|
23
|
-
__exportStar(require("./rules/share-rule-models"), exports);
|
|
24
|
-
__exportStar(require("./share-data/share-data"), exports);
|