fiftyone.pipeline.core 4.4.99 → 4.4.100
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/aspectPropertyValue.js +23 -23
- package/elementData.js +24 -23
- package/evidence.js +24 -24
- package/flowData.js +21 -21
- package/flowElement.js +34 -21
- package/helpers.js +25 -21
- package/javascriptbuilder.js +24 -20
- package/jsonbundler.js +24 -20
- package/package.json +5 -3
- package/pipeline.js +34 -25
- package/pipelineBuilder.js +26 -20
- package/sequenceElement.js +24 -20
- package/tsconfig.json +21 -20
- package/types/aspectPropertyValue.d.ts +4 -4
- package/types/constants.d.ts +2 -0
- package/types/elementData.d.ts +8 -6
- package/types/elementDataDictionary.d.ts +9 -1
- package/types/errorMessages.d.ts +3 -3
- package/types/evidence.d.ts +6 -6
- package/types/flowData.d.ts +4 -4
- package/types/flowElement.d.ts +26 -9
- package/types/helpers.d.ts +11 -3
- package/types/index.d.ts +24 -15
- package/types/javascriptbuilder.d.ts +30 -1
- package/types/jsonbundler.d.ts +12 -0
- package/types/pipeline.d.ts +25 -7
- package/types/pipelineBuilder.d.ts +13 -5
- package/types/sequenceElement.d.ts +18 -0
- package/types/setHeadersElement.d.ts +28 -12
package/pipelineBuilder.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
/* *********************************************************************
|
|
2
|
-
* This Original Work is copyright of 51 Degrees Mobile Experts Limited.
|
|
3
|
-
* Copyright 2023 51 Degrees Mobile Experts Limited, Davidson House,
|
|
4
|
-
* Forbury Square, Reading, Berkshire, United Kingdom RG1 3EU.
|
|
5
|
-
*
|
|
6
|
-
* This Original Work is licensed under the European Union Public Licence
|
|
7
|
-
* (EUPL) v.1.2 and is subject to its terms as set out below.
|
|
8
|
-
*
|
|
9
|
-
* If a copy of the EUPL was not distributed with this file, You can obtain
|
|
10
|
-
* one at https://opensource.org/licenses/EUPL-1.2.
|
|
11
|
-
*
|
|
12
|
-
* The 'Compatible Licences' set out in the Appendix to the EUPL (as may be
|
|
13
|
-
* amended by the European Commission) shall be deemed incompatible for
|
|
14
|
-
* the purposes of the Work and the provisions of the compatibility
|
|
15
|
-
* clause in Article 5 of the EUPL shall not apply.
|
|
16
|
-
*
|
|
17
|
-
* If using the Work as, or as part of, a network application, by
|
|
18
|
-
* including the attribution notice(s) required under Article 5 of the EUPL
|
|
19
|
-
* in the end user terms of the application under an appropriate heading,
|
|
20
|
-
* such notice(s) shall fulfill the requirements of that article.
|
|
1
|
+
/* *********************************************************************
|
|
2
|
+
* This Original Work is copyright of 51 Degrees Mobile Experts Limited.
|
|
3
|
+
* Copyright 2023 51 Degrees Mobile Experts Limited, Davidson House,
|
|
4
|
+
* Forbury Square, Reading, Berkshire, United Kingdom RG1 3EU.
|
|
5
|
+
*
|
|
6
|
+
* This Original Work is licensed under the European Union Public Licence
|
|
7
|
+
* (EUPL) v.1.2 and is subject to its terms as set out below.
|
|
8
|
+
*
|
|
9
|
+
* If a copy of the EUPL was not distributed with this file, You can obtain
|
|
10
|
+
* one at https://opensource.org/licenses/EUPL-1.2.
|
|
11
|
+
*
|
|
12
|
+
* The 'Compatible Licences' set out in the Appendix to the EUPL (as may be
|
|
13
|
+
* amended by the European Commission) shall be deemed incompatible for
|
|
14
|
+
* the purposes of the Work and the provisions of the compatibility
|
|
15
|
+
* clause in Article 5 of the EUPL shall not apply.
|
|
16
|
+
*
|
|
17
|
+
* If using the Work as, or as part of, a network application, by
|
|
18
|
+
* including the attribution notice(s) required under Article 5 of the EUPL
|
|
19
|
+
* in the end user terms of the application under an appropriate heading,
|
|
20
|
+
* such notice(s) shall fulfill the requirements of that article.
|
|
21
21
|
* ********************************************************************* */
|
|
22
22
|
|
|
23
23
|
const Pipeline = require('./pipeline');
|
|
@@ -131,6 +131,12 @@ class PipelineBuilder {
|
|
|
131
131
|
return new Pipeline(flowElements, false, this.dataFileUpdateService);
|
|
132
132
|
}
|
|
133
133
|
|
|
134
|
+
/**
|
|
135
|
+
* Add required elements to an existing FlowElement array
|
|
136
|
+
*
|
|
137
|
+
* @param {FlowElement[]} flowElements array of elements to add to
|
|
138
|
+
* @returns {FlowElement[]} resulting array with required elements
|
|
139
|
+
*/
|
|
134
140
|
addRequiredElements (flowElements) {
|
|
135
141
|
return flowElements
|
|
136
142
|
.concat(this.getJavaScriptElements())
|
package/sequenceElement.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
/* *********************************************************************
|
|
2
|
-
* This Original Work is copyright of 51 Degrees Mobile Experts Limited.
|
|
3
|
-
* Copyright 2023 51 Degrees Mobile Experts Limited, Davidson House,
|
|
4
|
-
* Forbury Square, Reading, Berkshire, United Kingdom RG1 3EU.
|
|
5
|
-
*
|
|
6
|
-
* This Original Work is licensed under the European Union Public Licence
|
|
7
|
-
* (EUPL) v.1.2 and is subject to its terms as set out below.
|
|
8
|
-
*
|
|
9
|
-
* If a copy of the EUPL was not distributed with this file, You can obtain
|
|
10
|
-
* one at https://opensource.org/licenses/EUPL-1.2.
|
|
11
|
-
*
|
|
12
|
-
* The 'Compatible Licences' set out in the Appendix to the EUPL (as may be
|
|
13
|
-
* amended by the European Commission) shall be deemed incompatible for
|
|
14
|
-
* the purposes of the Work and the provisions of the compatibility
|
|
15
|
-
* clause in Article 5 of the EUPL shall not apply.
|
|
16
|
-
*
|
|
17
|
-
* If using the Work as, or as part of, a network application, by
|
|
18
|
-
* including the attribution notice(s) required under Article 5 of the EUPL
|
|
19
|
-
* in the end user terms of the application under an appropriate heading,
|
|
20
|
-
* such notice(s) shall fulfill the requirements of that article.
|
|
1
|
+
/* *********************************************************************
|
|
2
|
+
* This Original Work is copyright of 51 Degrees Mobile Experts Limited.
|
|
3
|
+
* Copyright 2023 51 Degrees Mobile Experts Limited, Davidson House,
|
|
4
|
+
* Forbury Square, Reading, Berkshire, United Kingdom RG1 3EU.
|
|
5
|
+
*
|
|
6
|
+
* This Original Work is licensed under the European Union Public Licence
|
|
7
|
+
* (EUPL) v.1.2 and is subject to its terms as set out below.
|
|
8
|
+
*
|
|
9
|
+
* If a copy of the EUPL was not distributed with this file, You can obtain
|
|
10
|
+
* one at https://opensource.org/licenses/EUPL-1.2.
|
|
11
|
+
*
|
|
12
|
+
* The 'Compatible Licences' set out in the Appendix to the EUPL (as may be
|
|
13
|
+
* amended by the European Commission) shall be deemed incompatible for
|
|
14
|
+
* the purposes of the Work and the provisions of the compatibility
|
|
15
|
+
* clause in Article 5 of the EUPL shall not apply.
|
|
16
|
+
*
|
|
17
|
+
* If using the Work as, or as part of, a network application, by
|
|
18
|
+
* including the attribution notice(s) required under Article 5 of the EUPL
|
|
19
|
+
* in the end user terms of the application under an appropriate heading,
|
|
20
|
+
* such notice(s) shall fulfill the requirements of that article.
|
|
21
21
|
* ********************************************************************* */
|
|
22
22
|
|
|
23
23
|
const crypto = require('crypto');
|
|
@@ -25,6 +25,10 @@ const crypto = require('crypto');
|
|
|
25
25
|
const FlowElement = require('./flowElement.js');
|
|
26
26
|
const BasicListEvidenceKeyFilter = require('./basicListEvidenceKeyFilter');
|
|
27
27
|
|
|
28
|
+
/**
|
|
29
|
+
* @typedef {import('./flowData')} FlowData
|
|
30
|
+
*/
|
|
31
|
+
|
|
28
32
|
/**
|
|
29
33
|
* The SequenceElement stores session data regarding requests
|
|
30
34
|
* for client side JavaScript from the JavaScript created by a
|
package/tsconfig.json
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
2
|
+
// Change this to match your project
|
|
3
|
+
"include": ["*"],
|
|
4
|
+
"exclude": ["node_modules"],
|
|
5
|
+
"compilerOptions": {
|
|
6
|
+
// Tells TypeScript to read JS files, as
|
|
7
|
+
// normally they are ignored as source files
|
|
8
|
+
"allowJs": true,
|
|
9
|
+
// Generate d.ts files
|
|
10
|
+
"declaration": true,
|
|
11
|
+
// This compiler run should
|
|
12
|
+
// only output d.ts files
|
|
13
|
+
"emitDeclarationOnly": true,
|
|
14
|
+
// Types should go into this directory.
|
|
15
|
+
// Removing this would place the .d.ts files
|
|
16
|
+
// next to the .js files
|
|
17
|
+
"outDir": "types",
|
|
18
|
+
"lib": ["ES2015"],
|
|
19
|
+
"moduleResolution": "Node",
|
|
20
|
+
"noImplicitAny": true
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -9,7 +9,7 @@ declare class AspectPropertyValue {
|
|
|
9
9
|
* Constructor for AspectPropertyValue
|
|
10
10
|
*
|
|
11
11
|
* @param {string} noValueMessage The message to show when no value is set
|
|
12
|
-
* @param {
|
|
12
|
+
* @param {*} value The value inside the wrapper
|
|
13
13
|
*/
|
|
14
14
|
constructor(noValueMessage: string, value: any);
|
|
15
15
|
noValueMessage: string;
|
|
@@ -18,13 +18,13 @@ declare class AspectPropertyValue {
|
|
|
18
18
|
/**
|
|
19
19
|
* Set the value of this instance.
|
|
20
20
|
*
|
|
21
|
-
* @param {
|
|
21
|
+
* @param {*} value the value to set
|
|
22
22
|
*/
|
|
23
|
-
set value(
|
|
23
|
+
set value(value: any);
|
|
24
24
|
/**
|
|
25
25
|
* Get the value of this instance.
|
|
26
26
|
*
|
|
27
|
-
* @returns {
|
|
27
|
+
* @returns {*} The value of the property
|
|
28
28
|
* @throws Will throw error if 'hasValue' is false.
|
|
29
29
|
*/
|
|
30
30
|
get value(): any;
|
package/types/elementData.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export = ElementData;
|
|
2
2
|
/**
|
|
3
3
|
* @typedef {import('./flowElement')} FlowElement
|
|
4
|
+
* @typedef {import('./flowData')} FlowData
|
|
4
5
|
*/
|
|
5
6
|
/**
|
|
6
7
|
* Stores information created by a flowElement based on flowData.
|
|
@@ -31,9 +32,9 @@ declare class ElementData {
|
|
|
31
32
|
* (or skipping) the getInternal method
|
|
32
33
|
*
|
|
33
34
|
* @param {string} key the key to retrieve a property value for
|
|
34
|
-
* @returns {
|
|
35
|
+
* @returns {FlowData} value
|
|
35
36
|
*/
|
|
36
|
-
get(key: string):
|
|
37
|
+
get(key: string): FlowData;
|
|
37
38
|
/**
|
|
38
39
|
* Return string value of property
|
|
39
40
|
*
|
|
@@ -45,18 +46,19 @@ declare class ElementData {
|
|
|
45
46
|
* Return float value of property
|
|
46
47
|
*
|
|
47
48
|
* @param {string} key the key to retreive a property value for
|
|
48
|
-
* @returns {number} value
|
|
49
|
+
* @returns {number} float value
|
|
49
50
|
*/
|
|
50
51
|
getAsFloat(key: string): number;
|
|
51
52
|
/**
|
|
52
53
|
* Return int value of property
|
|
53
54
|
*
|
|
54
55
|
* @param {string} key the key to retreive a property value for
|
|
55
|
-
* @returns {number} value
|
|
56
|
+
* @returns {number} int value
|
|
56
57
|
*/
|
|
57
58
|
getAsInteger(key: string): number;
|
|
58
59
|
}
|
|
59
60
|
declare namespace ElementData {
|
|
60
|
-
export { FlowElement };
|
|
61
|
+
export { FlowElement, FlowData };
|
|
61
62
|
}
|
|
62
|
-
type FlowElement = import(
|
|
63
|
+
type FlowElement = import("./flowElement");
|
|
64
|
+
type FlowData = import("./flowData");
|
|
@@ -19,9 +19,17 @@ declare class ElementDataDictionary extends ElementData {
|
|
|
19
19
|
contents: object;
|
|
20
20
|
}, ...args: any[]);
|
|
21
21
|
contents: object;
|
|
22
|
+
/**
|
|
23
|
+
* Return value from elementData dictionary
|
|
24
|
+
*
|
|
25
|
+
* @param {string} key the property key to retrieve
|
|
26
|
+
* @returns {number} integer value
|
|
27
|
+
*/
|
|
28
|
+
getInternal(key: string): number;
|
|
29
|
+
[Symbol.iterator](): Generator<string, void, unknown>;
|
|
22
30
|
}
|
|
23
31
|
declare namespace ElementDataDictionary {
|
|
24
32
|
export { FlowElement };
|
|
25
33
|
}
|
|
26
34
|
import ElementData = require("./elementData");
|
|
27
|
-
type FlowElement = import(
|
|
35
|
+
type FlowElement = import("./flowElement");
|
package/types/errorMessages.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
1
|
+
export let noElementData: string;
|
|
2
|
+
export let genericMissingProperties: string;
|
|
3
|
+
export let noReasonUnknown: string;
|
package/types/evidence.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ declare class Evidence {
|
|
|
18
18
|
* Add a piece of evidence to flowData
|
|
19
19
|
*
|
|
20
20
|
* @param {string} key evidence key to add
|
|
21
|
-
* @param {
|
|
21
|
+
* @param {*} value value of evidence key
|
|
22
22
|
*/
|
|
23
23
|
add(key: string, value: any): void;
|
|
24
24
|
/**
|
|
@@ -26,7 +26,7 @@ declare class Evidence {
|
|
|
26
26
|
*
|
|
27
27
|
* @param {object} evidenceObject key value map of evidence
|
|
28
28
|
* @param {string} evidenceObject.key evidencekey
|
|
29
|
-
* @param {
|
|
29
|
+
* @param {*} evidenceObject.value evidence value
|
|
30
30
|
*/
|
|
31
31
|
addObject(evidenceObject: {
|
|
32
32
|
key: string;
|
|
@@ -38,14 +38,14 @@ declare class Evidence {
|
|
|
38
38
|
* headers, cookies, protocol, IP and query params
|
|
39
39
|
*
|
|
40
40
|
* @param {object} request an HTTP request object
|
|
41
|
-
* @returns {
|
|
41
|
+
* @returns {Evidence} return updated evidence
|
|
42
42
|
*/
|
|
43
|
-
addFromRequest(request: object):
|
|
43
|
+
addFromRequest(request: object): Evidence;
|
|
44
44
|
/**
|
|
45
45
|
* Get a piece of evidence
|
|
46
46
|
*
|
|
47
47
|
* @param {string} key evidence key to retreive
|
|
48
|
-
* @returns {
|
|
48
|
+
* @returns {*} the evidence value
|
|
49
49
|
*/
|
|
50
50
|
get(key: string): any;
|
|
51
51
|
/**
|
|
@@ -58,4 +58,4 @@ declare class Evidence {
|
|
|
58
58
|
declare namespace Evidence {
|
|
59
59
|
export { FlowData };
|
|
60
60
|
}
|
|
61
|
-
type FlowData = import(
|
|
61
|
+
type FlowData = import("./flowData");
|
package/types/flowData.d.ts
CHANGED
|
@@ -38,7 +38,7 @@ declare class FlowData {
|
|
|
38
38
|
* Set an error on the flowData (usually triggered by
|
|
39
39
|
* something going wrong in a flowElement's process function)
|
|
40
40
|
*
|
|
41
|
-
* @param {
|
|
41
|
+
* @param {*} error the error to throw
|
|
42
42
|
* @param {FlowElement} flowElement the FlowElement the error is thrown on
|
|
43
43
|
*/
|
|
44
44
|
setError(error: any, flowElement: FlowElement): void;
|
|
@@ -86,6 +86,6 @@ declare namespace FlowData {
|
|
|
86
86
|
export { Pipeline, FlowElement, ElementData };
|
|
87
87
|
}
|
|
88
88
|
import Evidence = require("./evidence");
|
|
89
|
-
type
|
|
90
|
-
type
|
|
91
|
-
type
|
|
89
|
+
type Pipeline = import("./pipeline");
|
|
90
|
+
type FlowElement = import("./flowElement");
|
|
91
|
+
type ElementData = import("./elementData");
|
package/types/flowElement.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export = FlowElement;
|
|
|
2
2
|
/**
|
|
3
3
|
* @typedef {import('./flowData')} FlowData
|
|
4
4
|
* @typedef {import('./pipeline')} Pipeline
|
|
5
|
+
* @typedef {import('./evidenceKeyFilter')} EvidenceKeyFilter
|
|
5
6
|
*/
|
|
6
7
|
/**
|
|
7
8
|
* A FlowElement is placed inside a pipeline
|
|
@@ -26,7 +27,7 @@ declare class FlowElement {
|
|
|
26
27
|
dataKey: string;
|
|
27
28
|
processInternal: Function;
|
|
28
29
|
properties: object;
|
|
29
|
-
evidenceKeyFilter:
|
|
30
|
+
evidenceKeyFilter: EvidenceKeyFilter;
|
|
30
31
|
});
|
|
31
32
|
dataKey: string;
|
|
32
33
|
/**
|
|
@@ -35,13 +36,19 @@ declare class FlowElement {
|
|
|
35
36
|
* by a pipleline is processsed. Overriden by instances of this base class
|
|
36
37
|
*
|
|
37
38
|
* @param {FlowData} flowData FlowData being processed
|
|
38
|
-
* @returns {
|
|
39
|
+
* @returns {*} result of processing
|
|
39
40
|
*/
|
|
40
41
|
processInternal(flowData: FlowData): any;
|
|
41
42
|
properties: object;
|
|
42
|
-
evidenceKeyFilter:
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
evidenceKeyFilter: EvidenceKeyFilterBase;
|
|
44
|
+
/**
|
|
45
|
+
* @type {Function[]}
|
|
46
|
+
*/
|
|
47
|
+
registrationCallbacks: Function[];
|
|
48
|
+
/**
|
|
49
|
+
* @type {Pipeline[]}
|
|
50
|
+
*/
|
|
51
|
+
pipelines: Pipeline[];
|
|
45
52
|
/**
|
|
46
53
|
* Internal function to be called when a FlowElement is added
|
|
47
54
|
* to pipeline, runs through any registrationCallbacks on the FlowElement
|
|
@@ -54,7 +61,8 @@ declare class FlowElement {
|
|
|
54
61
|
/**
|
|
55
62
|
* Function called to check if a FlowElement is ready
|
|
56
63
|
* Used when there are asynchronous initialisation steps
|
|
57
|
-
*
|
|
64
|
+
*
|
|
65
|
+
* @returns {Promise} returns Promise
|
|
58
66
|
* */
|
|
59
67
|
ready(): Promise<any>;
|
|
60
68
|
/**
|
|
@@ -81,9 +89,18 @@ declare class FlowElement {
|
|
|
81
89
|
* @returns {object} dictionary of properties
|
|
82
90
|
*/
|
|
83
91
|
getProperties(): object;
|
|
92
|
+
/**
|
|
93
|
+
* Internal log
|
|
94
|
+
*
|
|
95
|
+
* @param {string} type log type
|
|
96
|
+
* @param {*} message message to log
|
|
97
|
+
*/
|
|
98
|
+
_log(type: string, message: any): void;
|
|
84
99
|
}
|
|
85
100
|
declare namespace FlowElement {
|
|
86
|
-
export { FlowData, Pipeline };
|
|
101
|
+
export { FlowData, Pipeline, EvidenceKeyFilter };
|
|
87
102
|
}
|
|
88
|
-
|
|
89
|
-
type
|
|
103
|
+
import EvidenceKeyFilterBase = require("./evidenceKeyFilter");
|
|
104
|
+
type FlowData = import("./flowData");
|
|
105
|
+
type Pipeline = import("./pipeline");
|
|
106
|
+
type EvidenceKeyFilter = import("./evidenceKeyFilter");
|
package/types/helpers.d.ts
CHANGED
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
export = Helpers;
|
|
2
|
+
/**
|
|
3
|
+
* @typedef {import('./flowData')} FlowData
|
|
4
|
+
*/
|
|
2
5
|
declare class Helpers {
|
|
3
6
|
/**
|
|
4
7
|
* Set response headers in the response object (e.g. Accept-CH)
|
|
5
|
-
*
|
|
6
|
-
* @param
|
|
8
|
+
*
|
|
9
|
+
* @param {import('http').ServerResponse} response The response to set the headers in.
|
|
10
|
+
* @param {FlowData} flowData A processed FlowData instance to get the response header values
|
|
7
11
|
* from.
|
|
8
12
|
*/
|
|
9
|
-
static setResponseHeaders(response:
|
|
13
|
+
static setResponseHeaders(response: import("http").ServerResponse, flowData: FlowData): void;
|
|
10
14
|
}
|
|
15
|
+
declare namespace Helpers {
|
|
16
|
+
export { FlowData };
|
|
17
|
+
}
|
|
18
|
+
type FlowData = import("./flowData");
|
package/types/index.d.ts
CHANGED
|
@@ -1,15 +1,24 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
export
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export
|
|
14
|
-
export
|
|
15
|
-
export
|
|
1
|
+
export let BasicListEvidenceKeyFilter: typeof import("./basicListEvidenceKeyFilter");
|
|
2
|
+
export let ElementData: typeof import("./elementData");
|
|
3
|
+
export let ElementDataDictionary: typeof import("./elementDataDictionary");
|
|
4
|
+
export let ErrorMessages: {
|
|
5
|
+
noElementData: string;
|
|
6
|
+
genericMissingProperties: string;
|
|
7
|
+
noReasonUnknown: string;
|
|
8
|
+
};
|
|
9
|
+
export let Constants: {
|
|
10
|
+
evidenceEnableCookies: string;
|
|
11
|
+
evidenceObjectName: string;
|
|
12
|
+
};
|
|
13
|
+
export let Evidence: typeof import("./evidence");
|
|
14
|
+
export let EvidenceKeyFilter: typeof import("./evidenceKeyFilter");
|
|
15
|
+
export let FlowData: typeof import("./flowData");
|
|
16
|
+
export let FlowElement: typeof import("./flowElement");
|
|
17
|
+
export let Pipeline: typeof import("./pipeline");
|
|
18
|
+
export let PipelineBuilder: typeof import("./pipelineBuilder");
|
|
19
|
+
export let AspectPropertyValue: typeof import("./aspectPropertyValue");
|
|
20
|
+
export let JsonBundler: typeof import("./jsonbundler");
|
|
21
|
+
export let JavascriptBuilder: typeof import("./javascriptbuilder");
|
|
22
|
+
export let SequenceElement: typeof import("./sequenceElement");
|
|
23
|
+
export let SetHeadersElement: typeof import("./setHeadersElement");
|
|
24
|
+
export let Helpers: typeof import("./helpers");
|
|
@@ -26,7 +26,10 @@ declare class JavaScriptBuilderElement extends FlowElement {
|
|
|
26
26
|
* callback url. This can be overriden with header.host evidence.
|
|
27
27
|
* @param {string} options.endPoint The endpoint of the client side
|
|
28
28
|
* callback url
|
|
29
|
-
* @param {boolean} options.enableCookies
|
|
29
|
+
* @param {boolean} options.enableCookies Whether the client JavaScript
|
|
30
|
+
* stored results of client side processing in cookies. This can also
|
|
31
|
+
* be set per request, using the "query.fod-js-enable-cookies" evidence key.
|
|
32
|
+
* For more details on personal data policy, see http://51degrees.com/terms/client-services-privacy-policy/
|
|
30
33
|
* @param {boolean} options.minify Whether to minify the JavaScript
|
|
31
34
|
*/
|
|
32
35
|
constructor({ objName, protocol, host, endPoint, enableCookies, minify }?: {
|
|
@@ -45,5 +48,31 @@ declare class JavaScriptBuilderElement extends FlowElement {
|
|
|
45
48
|
enableCookies: boolean;
|
|
46
49
|
minify: boolean;
|
|
47
50
|
};
|
|
51
|
+
evidenceKeyFilter: JSEvidenceKeyFilter;
|
|
52
|
+
/**
|
|
53
|
+
* Internal process function of the JavaScript builder
|
|
54
|
+
* Gets JSON from the JSONBundler and constructs JavaScript
|
|
55
|
+
* to place on the client side
|
|
56
|
+
*
|
|
57
|
+
* @param {FlowData} flowData to process
|
|
58
|
+
* @returns {undefined}
|
|
59
|
+
*/
|
|
60
|
+
processInternal(flowData: FlowData): undefined;
|
|
61
|
+
}
|
|
62
|
+
declare namespace JavaScriptBuilderElement {
|
|
63
|
+
export { FlowData };
|
|
48
64
|
}
|
|
49
65
|
import FlowElement = require("./flowElement.js");
|
|
66
|
+
/**
|
|
67
|
+
* @typedef {import('./flowData')} FlowData
|
|
68
|
+
*/
|
|
69
|
+
/**
|
|
70
|
+
* An instance of EvidenceKeyFilter which removes all but header
|
|
71
|
+
* and query evidence as that is all that is used by
|
|
72
|
+
* the JavaScript builder
|
|
73
|
+
**/
|
|
74
|
+
declare class JSEvidenceKeyFilter extends EvidenceKeyFilter {
|
|
75
|
+
filterEvidenceKey(key: any): boolean;
|
|
76
|
+
}
|
|
77
|
+
type FlowData = import("./flowData");
|
|
78
|
+
import EvidenceKeyFilter = require("./evidenceKeyFilter.js");
|
package/types/jsonbundler.d.ts
CHANGED
|
@@ -10,6 +10,18 @@ export = JSONBundlerElement;
|
|
|
10
10
|
*/
|
|
11
11
|
declare class JSONBundlerElement extends FlowElement {
|
|
12
12
|
constructor(...args: any[]);
|
|
13
|
+
evidenceKeyFilter: BasicListEvidenceKeyFilter;
|
|
13
14
|
propertyCache: {};
|
|
15
|
+
/**
|
|
16
|
+
* The JSON Builder extracts all properties and serializes them into JSON
|
|
17
|
+
*
|
|
18
|
+
* @param {FlowData} flowData the FlowData being processed
|
|
19
|
+
*/
|
|
20
|
+
processInternal(flowData: FlowData): void;
|
|
21
|
+
}
|
|
22
|
+
declare namespace JSONBundlerElement {
|
|
23
|
+
export { FlowData };
|
|
14
24
|
}
|
|
15
25
|
import FlowElement = require("./flowElement.js");
|
|
26
|
+
import BasicListEvidenceKeyFilter = require("./basicListEvidenceKeyFilter.js");
|
|
27
|
+
type FlowData = import("./flowData");
|
package/types/pipeline.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export = Pipeline;
|
|
2
2
|
/**
|
|
3
3
|
* @typedef {import('./flowElement')} FlowElement
|
|
4
|
+
* @typedef {import('fiftyone.pipeline.engines').DataFileUpdateService} DataFileUpdateService
|
|
4
5
|
*/
|
|
5
6
|
/**
|
|
6
7
|
* Pipeline holding a list of flowElements for processing, can create
|
|
@@ -13,12 +14,27 @@ declare class Pipeline {
|
|
|
13
14
|
*
|
|
14
15
|
* @param {FlowElement[]} flowElements list of FlowElements to
|
|
15
16
|
* add to the Pipeline
|
|
17
|
+
* @param {boolean} suppressProcessExceptions If true then pipeline
|
|
18
|
+
* will suppress exceptions added to FlowData.
|
|
19
|
+
* @param {DataFileUpdateService} dataFileUpdateService Service that registers FlowElements
|
|
16
20
|
*/
|
|
17
|
-
constructor(flowElements?: FlowElement[]);
|
|
21
|
+
constructor(flowElements?: FlowElement[], suppressProcessExceptions?: boolean, dataFileUpdateService?: DataFileUpdateService);
|
|
18
22
|
flowElementsChain: import("./flowElement")[];
|
|
23
|
+
suppressProcessExceptions: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* A logger for emitting messages
|
|
26
|
+
* @type {EventEmitter}
|
|
27
|
+
*/
|
|
19
28
|
eventEmitter: EventEmitter;
|
|
20
|
-
|
|
21
|
-
|
|
29
|
+
/**
|
|
30
|
+
* @type {object}
|
|
31
|
+
*/
|
|
32
|
+
flowElements: object;
|
|
33
|
+
dataFileUpdateService: any;
|
|
34
|
+
/**
|
|
35
|
+
* @type {object}
|
|
36
|
+
*/
|
|
37
|
+
propertyDatabase: object;
|
|
22
38
|
processMethod: (flowData: any) => any;
|
|
23
39
|
/**
|
|
24
40
|
* get a FlowElement by its dataKey
|
|
@@ -39,7 +55,7 @@ declare class Pipeline {
|
|
|
39
55
|
* Shorthand to trigger a message on the pipeline's eventEmitter
|
|
40
56
|
*
|
|
41
57
|
* @param {string} type type of message
|
|
42
|
-
* @param {
|
|
58
|
+
* @param {*} message message to store in the log
|
|
43
59
|
*/
|
|
44
60
|
log(type: string, message: any): void;
|
|
45
61
|
/**
|
|
@@ -51,15 +67,17 @@ declare class Pipeline {
|
|
|
51
67
|
*/
|
|
52
68
|
createFlowData(): FlowData;
|
|
53
69
|
/**
|
|
70
|
+
* Update pipeline's property database for FlowElement
|
|
54
71
|
*
|
|
55
|
-
* @param {FlowElement} flowElement
|
|
72
|
+
* @param {FlowElement} flowElement FlowElement to update
|
|
56
73
|
* @returns {void}
|
|
57
74
|
*/
|
|
58
75
|
updatePropertyDataBaseForElement(flowElement: FlowElement): void;
|
|
59
76
|
}
|
|
60
77
|
declare namespace Pipeline {
|
|
61
|
-
export { FlowElement };
|
|
78
|
+
export { FlowElement, DataFileUpdateService };
|
|
62
79
|
}
|
|
63
80
|
import EventEmitter = require("events");
|
|
64
|
-
type FlowElement = import('./flowElement');
|
|
65
81
|
import FlowData = require("./flowData");
|
|
82
|
+
type FlowElement = import("./flowElement");
|
|
83
|
+
type DataFileUpdateService = any;
|
|
@@ -22,19 +22,20 @@ declare class PipelineBuilder {
|
|
|
22
22
|
* @param {boolean} settings.useSetHeaderProperties Whether to
|
|
23
23
|
* automatically add the SetHeadersElement needed to request additional
|
|
24
24
|
* HTTP headers from the client side. This is true by default.
|
|
25
|
-
* @param {typeof import('./javascriptbuilder').prototype.settings}
|
|
26
|
-
* settings
|
|
27
|
-
*
|
|
25
|
+
* @param {typeof import('./javascriptbuilder').prototype.settings} settings.javascriptBuilderSettings
|
|
26
|
+
* The settings to pass to the JavaScriptBuilder.
|
|
27
|
+
* See JavaScriptBuilder class for details.
|
|
28
28
|
*/
|
|
29
29
|
constructor(settings?: {
|
|
30
30
|
addJavaScriptBuilder: boolean;
|
|
31
31
|
useSetHeaderProperties: boolean;
|
|
32
|
-
javascriptBuilderSettings: typeof import(
|
|
32
|
+
javascriptBuilderSettings: typeof import("./javascriptbuilder").prototype.settings;
|
|
33
33
|
});
|
|
34
34
|
/**
|
|
35
35
|
* @type {FlowElement[]}
|
|
36
36
|
*/
|
|
37
37
|
flowElements: FlowElement[];
|
|
38
|
+
dataFileUpdateService: any;
|
|
38
39
|
addJavaScriptBuilder: boolean;
|
|
39
40
|
javascriptBuilderSettings: {
|
|
40
41
|
objName: string;
|
|
@@ -60,6 +61,13 @@ declare class PipelineBuilder {
|
|
|
60
61
|
* @returns {Pipeline} the constructed pipeline
|
|
61
62
|
*/
|
|
62
63
|
buildFromConfiguration(config: object): Pipeline;
|
|
64
|
+
/**
|
|
65
|
+
* Add required elements to an existing FlowElement array
|
|
66
|
+
*
|
|
67
|
+
* @param {FlowElement[]} flowElements array of elements to add to
|
|
68
|
+
* @returns {FlowElement[]} resulting array with required elements
|
|
69
|
+
*/
|
|
70
|
+
addRequiredElements(flowElements: FlowElement[]): FlowElement[];
|
|
63
71
|
/**
|
|
64
72
|
* Internal function used to first check if the
|
|
65
73
|
* JavaScript elements should be added to the pipeline
|
|
@@ -104,5 +112,5 @@ declare class PipelineBuilder {
|
|
|
104
112
|
declare namespace PipelineBuilder {
|
|
105
113
|
export { FlowElement };
|
|
106
114
|
}
|
|
107
|
-
type FlowElement = import('./flowElement');
|
|
108
115
|
import Pipeline = require("./pipeline");
|
|
116
|
+
type FlowElement = import("./flowElement");
|