@3sixty/data-processing-models 0.0.0-stage → 0.20.0-next.0
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 +201 -0
- package/README.md +24 -2
- package/dist/es/factories/dataConverterConnectorFactory.js +9 -0
- package/dist/es/factories/dataConverterConnectorFactory.js.map +1 -0
- package/dist/es/factories/dataExtractorConnectorFactory.js +9 -0
- package/dist/es/factories/dataExtractorConnectorFactory.js.map +1 -0
- package/dist/es/index.js +20 -0
- package/dist/es/index.js.map +1 -0
- package/dist/es/models/IDataConverterConnector.js +2 -0
- package/dist/es/models/IDataConverterConnector.js.map +1 -0
- package/dist/es/models/IDataExtractorConnector.js +2 -0
- package/dist/es/models/IDataExtractorConnector.js.map +1 -0
- package/dist/es/models/IDataProcessingComponent.js +2 -0
- package/dist/es/models/IDataProcessingComponent.js.map +1 -0
- package/dist/es/models/IExtractRule.js +2 -0
- package/dist/es/models/IExtractRule.js.map +1 -0
- package/dist/es/models/IRule.js +2 -0
- package/dist/es/models/IRule.js.map +1 -0
- package/dist/es/models/IRuleGroup.js +2 -0
- package/dist/es/models/IRuleGroup.js.map +1 -0
- package/dist/es/models/IStructuredData.js +4 -0
- package/dist/es/models/IStructuredData.js.map +1 -0
- package/dist/es/models/api/IDataProcessingConvertRequest.js +4 -0
- package/dist/es/models/api/IDataProcessingConvertRequest.js.map +1 -0
- package/dist/es/models/api/IDataProcessingConvertResponse.js +4 -0
- package/dist/es/models/api/IDataProcessingConvertResponse.js.map +1 -0
- package/dist/es/models/api/IDataProcessingExtractRequest.js +4 -0
- package/dist/es/models/api/IDataProcessingExtractRequest.js.map +1 -0
- package/dist/es/models/api/IDataProcessingExtractResponse.js +4 -0
- package/dist/es/models/api/IDataProcessingExtractResponse.js.map +1 -0
- package/dist/es/models/api/IDataProcessingRuleGroupGetRequest.js +4 -0
- package/dist/es/models/api/IDataProcessingRuleGroupGetRequest.js.map +1 -0
- package/dist/es/models/api/IDataProcessingRuleGroupGetResponse.js +2 -0
- package/dist/es/models/api/IDataProcessingRuleGroupGetResponse.js.map +1 -0
- package/dist/es/models/api/IDataProcessingRuleGroupListRequest.js +4 -0
- package/dist/es/models/api/IDataProcessingRuleGroupListRequest.js.map +1 -0
- package/dist/es/models/api/IDataProcessingRuleGroupListResponse.js +2 -0
- package/dist/es/models/api/IDataProcessingRuleGroupListResponse.js.map +1 -0
- package/dist/es/models/api/IDataProcessingRuleGroupRemoveRequest.js +4 -0
- package/dist/es/models/api/IDataProcessingRuleGroupRemoveRequest.js.map +1 -0
- package/dist/es/models/api/IDataProcessingRuleGroupSetRequest.js +2 -0
- package/dist/es/models/api/IDataProcessingRuleGroupSetRequest.js.map +1 -0
- package/dist/types/factories/dataConverterConnectorFactory.d.ts +6 -0
- package/dist/types/factories/dataExtractorConnectorFactory.d.ts +6 -0
- package/dist/types/index.d.ts +17 -0
- package/dist/types/models/IDataConverterConnector.d.ts +17 -0
- package/dist/types/models/IDataExtractorConnector.d.ts +14 -0
- package/dist/types/models/IDataProcessingComponent.d.ts +58 -0
- package/dist/types/models/IExtractRule.d.ts +23 -0
- package/dist/types/models/IRule.d.ts +23 -0
- package/dist/types/models/IRuleGroup.d.ts +18 -0
- package/dist/types/models/IStructuredData.d.ts +13 -0
- package/dist/types/models/api/IDataProcessingConvertRequest.d.ts +18 -0
- package/dist/types/models/api/IDataProcessingConvertResponse.d.ts +9 -0
- package/dist/types/models/api/IDataProcessingExtractRequest.d.ts +26 -0
- package/dist/types/models/api/IDataProcessingExtractResponse.d.ts +9 -0
- package/dist/types/models/api/IDataProcessingRuleGroupGetRequest.d.ts +14 -0
- package/dist/types/models/api/IDataProcessingRuleGroupGetResponse.d.ts +10 -0
- package/dist/types/models/api/IDataProcessingRuleGroupListRequest.d.ts +18 -0
- package/dist/types/models/api/IDataProcessingRuleGroupListResponse.d.ts +19 -0
- package/dist/types/models/api/IDataProcessingRuleGroupRemoveRequest.d.ts +14 -0
- package/dist/types/models/api/IDataProcessingRuleGroupSetRequest.d.ts +28 -0
- package/docs/changelog.md +0 -0
- package/docs/examples.md +35 -0
- package/docs/reference/index.md +24 -0
- package/docs/reference/interfaces/IDataConverterConnector.md +43 -0
- package/docs/reference/interfaces/IDataExtractorConnector.md +35 -0
- package/docs/reference/interfaces/IDataProcessingComponent.md +170 -0
- package/docs/reference/interfaces/IDataProcessingConvertRequest.md +23 -0
- package/docs/reference/interfaces/IDataProcessingConvertResponse.md +11 -0
- package/docs/reference/interfaces/IDataProcessingExtractRequest.md +35 -0
- package/docs/reference/interfaces/IDataProcessingExtractResponse.md +11 -0
- package/docs/reference/interfaces/IDataProcessingRuleGroupGetRequest.md +17 -0
- package/docs/reference/interfaces/IDataProcessingRuleGroupGetResponse.md +11 -0
- package/docs/reference/interfaces/IDataProcessingRuleGroupListRequest.md +23 -0
- package/docs/reference/interfaces/IDataProcessingRuleGroupListResponse.md +23 -0
- package/docs/reference/interfaces/IDataProcessingRuleGroupRemoveRequest.md +17 -0
- package/docs/reference/interfaces/IDataProcessingRuleGroupSetRequest.md +37 -0
- package/docs/reference/interfaces/IRule.md +39 -0
- package/docs/reference/interfaces/IRuleGroup.md +27 -0
- package/docs/reference/variables/DataConverterConnectorFactory.md +5 -0
- package/docs/reference/variables/DataExtractorConnectorFactory.md +5 -0
- package/locales/en.json +1 -0
- package/package.json +53 -5
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { CoerceType } from "@3sixty/core";
|
|
2
|
+
/**
|
|
3
|
+
* Rule defining how to extract data from an object.
|
|
4
|
+
*/
|
|
5
|
+
export interface IRule {
|
|
6
|
+
/**
|
|
7
|
+
* The JSONPath expression identifying the data to extract from the document.
|
|
8
|
+
* @see https://www.rfc-editor.org/rfc/rfc9535.html
|
|
9
|
+
*/
|
|
10
|
+
source: string;
|
|
11
|
+
/**
|
|
12
|
+
* The target path of where to store the extracted data, using dotted or numeric index notation.
|
|
13
|
+
*/
|
|
14
|
+
target: string;
|
|
15
|
+
/**
|
|
16
|
+
* When extracting objects, how much of the original path should be maintained in the target object.
|
|
17
|
+
*/
|
|
18
|
+
retainPathDepth?: number;
|
|
19
|
+
/**
|
|
20
|
+
* Should the data be coerced to a specific type.
|
|
21
|
+
*/
|
|
22
|
+
coerce?: CoerceType;
|
|
23
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { IRule } from "./IRule.js";
|
|
2
|
+
/**
|
|
3
|
+
* Group of rules for extraction.
|
|
4
|
+
*/
|
|
5
|
+
export interface IRuleGroup {
|
|
6
|
+
/**
|
|
7
|
+
* The id for the rule group.
|
|
8
|
+
*/
|
|
9
|
+
id: string;
|
|
10
|
+
/**
|
|
11
|
+
* The label for the rule group.
|
|
12
|
+
*/
|
|
13
|
+
label: string;
|
|
14
|
+
/**
|
|
15
|
+
* The rules.
|
|
16
|
+
*/
|
|
17
|
+
rules: IRule[];
|
|
18
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Perform a conversion on the data.
|
|
3
|
+
*/
|
|
4
|
+
export interface IDataProcessingConvertRequest {
|
|
5
|
+
/**
|
|
6
|
+
* The request body containing the data to convert.
|
|
7
|
+
*/
|
|
8
|
+
body: {
|
|
9
|
+
/**
|
|
10
|
+
* The binary data to convert in base64.
|
|
11
|
+
*/
|
|
12
|
+
data: string;
|
|
13
|
+
/**
|
|
14
|
+
* Use the specified mime type for conversion, will auto detect if undefined.
|
|
15
|
+
*/
|
|
16
|
+
overrideMimeType?: string;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Perform an extraction on the data with the specified ruleset.
|
|
3
|
+
*/
|
|
4
|
+
export interface IDataProcessingExtractRequest {
|
|
5
|
+
/**
|
|
6
|
+
* The request body containing the data and rule group to use for extraction.
|
|
7
|
+
*/
|
|
8
|
+
body: {
|
|
9
|
+
/**
|
|
10
|
+
* The rule group id to use for the extraction.
|
|
11
|
+
*/
|
|
12
|
+
ruleGroupId: string;
|
|
13
|
+
/**
|
|
14
|
+
* The binary data to extract from in base64.
|
|
15
|
+
*/
|
|
16
|
+
data: string;
|
|
17
|
+
/**
|
|
18
|
+
* The default extractor connector will be used if not specified.
|
|
19
|
+
*/
|
|
20
|
+
overrideExtractorType?: string;
|
|
21
|
+
/**
|
|
22
|
+
* An optional override for the mime type for conversion, will auto detect if not provided.
|
|
23
|
+
*/
|
|
24
|
+
overrideMimeType?: string;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get a list of the rule group entries.
|
|
3
|
+
*/
|
|
4
|
+
export interface IDataProcessingRuleGroupListRequest {
|
|
5
|
+
/**
|
|
6
|
+
* The query parameters.
|
|
7
|
+
*/
|
|
8
|
+
query?: {
|
|
9
|
+
/**
|
|
10
|
+
* The optional cursor to get next chunk.
|
|
11
|
+
*/
|
|
12
|
+
cursor?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Limit the number of entities to return.
|
|
15
|
+
*/
|
|
16
|
+
limit?: string;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { IRuleGroup } from "../IRuleGroup.js";
|
|
2
|
+
/**
|
|
3
|
+
* Response for rule group entry list request.
|
|
4
|
+
*/
|
|
5
|
+
export interface IDataProcessingRuleGroupListResponse {
|
|
6
|
+
/**
|
|
7
|
+
* The response body containing the list of rule groups and optional pagination cursor.
|
|
8
|
+
*/
|
|
9
|
+
body: {
|
|
10
|
+
/**
|
|
11
|
+
* The entities, which can be partial if a limited keys list was provided.
|
|
12
|
+
*/
|
|
13
|
+
entities: IRuleGroup[];
|
|
14
|
+
/**
|
|
15
|
+
* An optional cursor, when defined can be used to call find to get more entities.
|
|
16
|
+
*/
|
|
17
|
+
cursor?: string;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { IRule } from "../IRule.js";
|
|
2
|
+
/**
|
|
3
|
+
* Set a rule group.
|
|
4
|
+
*/
|
|
5
|
+
export interface IDataProcessingRuleGroupSetRequest {
|
|
6
|
+
/**
|
|
7
|
+
* The path parameters for the request.
|
|
8
|
+
*/
|
|
9
|
+
pathParams: {
|
|
10
|
+
/**
|
|
11
|
+
* The id of the rule group to set.
|
|
12
|
+
*/
|
|
13
|
+
id: string;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* The rule group data to store.
|
|
17
|
+
*/
|
|
18
|
+
body: {
|
|
19
|
+
/**
|
|
20
|
+
* The label for the rule group.
|
|
21
|
+
*/
|
|
22
|
+
label: string;
|
|
23
|
+
/**
|
|
24
|
+
* The rules.
|
|
25
|
+
*/
|
|
26
|
+
rules: IRule[];
|
|
27
|
+
};
|
|
28
|
+
}
|
|
File without changes
|
package/docs/examples.md
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Data Processing Models Examples
|
|
2
|
+
|
|
3
|
+
These examples focus on registering and resolving connector implementations so processing components can discover them at runtime.
|
|
4
|
+
|
|
5
|
+
## DataConverterConnectorFactory
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
import { JsonConverterConnector } from '@3sixty/data-processing-converters';
|
|
9
|
+
import { DataConverterConnectorFactory } from '@3sixty/data-processing-models';
|
|
10
|
+
|
|
11
|
+
DataConverterConnectorFactory.register('json', () => new JsonConverterConnector());
|
|
12
|
+
|
|
13
|
+
const converterNames = DataConverterConnectorFactory.names();
|
|
14
|
+
const converter = DataConverterConnectorFactory.get('json');
|
|
15
|
+
const converterInstances = DataConverterConnectorFactory.instancesList();
|
|
16
|
+
|
|
17
|
+
console.log(converterNames); // ['json']
|
|
18
|
+
console.log(converter.className()); // jsonConverterConnector
|
|
19
|
+
console.log(converterInstances.length); // 1
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## DataExtractorConnectorFactory
|
|
23
|
+
|
|
24
|
+
```typescript
|
|
25
|
+
import { JsonPathExtractorConnector } from '@3sixty/data-processing-extractors';
|
|
26
|
+
import { DataExtractorConnectorFactory } from '@3sixty/data-processing-models';
|
|
27
|
+
|
|
28
|
+
DataExtractorConnectorFactory.register('JSONPath', () => new JsonPathExtractorConnector());
|
|
29
|
+
|
|
30
|
+
const extractorNames = DataExtractorConnectorFactory.names();
|
|
31
|
+
const extractor = DataExtractorConnectorFactory.get('JSONPath');
|
|
32
|
+
|
|
33
|
+
console.log(extractorNames); // ['JSONPath']
|
|
34
|
+
console.log(extractor.className()); // jsonPathExtractorConnector
|
|
35
|
+
```
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# @3sixty/data-processing-models
|
|
2
|
+
|
|
3
|
+
## Interfaces
|
|
4
|
+
|
|
5
|
+
- [IDataConverterConnector](interfaces/IDataConverterConnector.md)
|
|
6
|
+
- [IDataExtractorConnector](interfaces/IDataExtractorConnector.md)
|
|
7
|
+
- [IDataProcessingComponent](interfaces/IDataProcessingComponent.md)
|
|
8
|
+
- [IRule](interfaces/IRule.md)
|
|
9
|
+
- [IRuleGroup](interfaces/IRuleGroup.md)
|
|
10
|
+
- [IDataProcessingConvertRequest](interfaces/IDataProcessingConvertRequest.md)
|
|
11
|
+
- [IDataProcessingConvertResponse](interfaces/IDataProcessingConvertResponse.md)
|
|
12
|
+
- [IDataProcessingExtractRequest](interfaces/IDataProcessingExtractRequest.md)
|
|
13
|
+
- [IDataProcessingExtractResponse](interfaces/IDataProcessingExtractResponse.md)
|
|
14
|
+
- [IDataProcessingRuleGroupGetRequest](interfaces/IDataProcessingRuleGroupGetRequest.md)
|
|
15
|
+
- [IDataProcessingRuleGroupGetResponse](interfaces/IDataProcessingRuleGroupGetResponse.md)
|
|
16
|
+
- [IDataProcessingRuleGroupListRequest](interfaces/IDataProcessingRuleGroupListRequest.md)
|
|
17
|
+
- [IDataProcessingRuleGroupListResponse](interfaces/IDataProcessingRuleGroupListResponse.md)
|
|
18
|
+
- [IDataProcessingRuleGroupRemoveRequest](interfaces/IDataProcessingRuleGroupRemoveRequest.md)
|
|
19
|
+
- [IDataProcessingRuleGroupSetRequest](interfaces/IDataProcessingRuleGroupSetRequest.md)
|
|
20
|
+
|
|
21
|
+
## Variables
|
|
22
|
+
|
|
23
|
+
- [DataConverterConnectorFactory](variables/DataConverterConnectorFactory.md)
|
|
24
|
+
- [DataExtractorConnectorFactory](variables/DataExtractorConnectorFactory.md)
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Interface: IDataConverterConnector
|
|
2
|
+
|
|
3
|
+
Interface describing a connector for converting data.
|
|
4
|
+
|
|
5
|
+
## Extends
|
|
6
|
+
|
|
7
|
+
- `IComponent`
|
|
8
|
+
|
|
9
|
+
## Methods
|
|
10
|
+
|
|
11
|
+
### mimeTypes() {#mimetypes}
|
|
12
|
+
|
|
13
|
+
> **mimeTypes**(): `string`[]
|
|
14
|
+
|
|
15
|
+
Returns the MIME types that this connector can convert.
|
|
16
|
+
|
|
17
|
+
#### Returns
|
|
18
|
+
|
|
19
|
+
`string`[]
|
|
20
|
+
|
|
21
|
+
The supported MIME type strings.
|
|
22
|
+
|
|
23
|
+
***
|
|
24
|
+
|
|
25
|
+
### convert() {#convert}
|
|
26
|
+
|
|
27
|
+
> **convert**(`data`): `Promise`\<`unknown`\>
|
|
28
|
+
|
|
29
|
+
Converts the data to a structured object.
|
|
30
|
+
|
|
31
|
+
#### Parameters
|
|
32
|
+
|
|
33
|
+
##### data
|
|
34
|
+
|
|
35
|
+
`Uint8Array`
|
|
36
|
+
|
|
37
|
+
The binary data to convert.
|
|
38
|
+
|
|
39
|
+
#### Returns
|
|
40
|
+
|
|
41
|
+
`Promise`\<`unknown`\>
|
|
42
|
+
|
|
43
|
+
The parsed structured object.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Interface: IDataExtractorConnector
|
|
2
|
+
|
|
3
|
+
Interface describing a connector for extracting data.
|
|
4
|
+
|
|
5
|
+
## Extends
|
|
6
|
+
|
|
7
|
+
- `IComponent`
|
|
8
|
+
|
|
9
|
+
## Methods
|
|
10
|
+
|
|
11
|
+
### extract() {#extract}
|
|
12
|
+
|
|
13
|
+
> **extract**(`data`, `rules`): `Promise`\<`unknown`\>
|
|
14
|
+
|
|
15
|
+
Extracts data from the provided input.
|
|
16
|
+
|
|
17
|
+
#### Parameters
|
|
18
|
+
|
|
19
|
+
##### data
|
|
20
|
+
|
|
21
|
+
`unknown`
|
|
22
|
+
|
|
23
|
+
The object to extract from.
|
|
24
|
+
|
|
25
|
+
##### rules
|
|
26
|
+
|
|
27
|
+
[`IRule`](IRule.md)[]
|
|
28
|
+
|
|
29
|
+
The rules to use to extract the data.
|
|
30
|
+
|
|
31
|
+
#### Returns
|
|
32
|
+
|
|
33
|
+
`Promise`\<`unknown`\>
|
|
34
|
+
|
|
35
|
+
The extracted data.
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
# Interface: IDataProcessingComponent
|
|
2
|
+
|
|
3
|
+
Interface describing a component for processing data.
|
|
4
|
+
|
|
5
|
+
## Extends
|
|
6
|
+
|
|
7
|
+
- `IComponent`
|
|
8
|
+
|
|
9
|
+
## Methods
|
|
10
|
+
|
|
11
|
+
### ruleGroupSet() {#rulegroupset}
|
|
12
|
+
|
|
13
|
+
> **ruleGroupSet**(`ruleGroup`): `Promise`\<`void`\>
|
|
14
|
+
|
|
15
|
+
Set an extraction rule group.
|
|
16
|
+
|
|
17
|
+
#### Parameters
|
|
18
|
+
|
|
19
|
+
##### ruleGroup
|
|
20
|
+
|
|
21
|
+
[`IRuleGroup`](IRuleGroup.md)
|
|
22
|
+
|
|
23
|
+
The rule group to store.
|
|
24
|
+
|
|
25
|
+
#### Returns
|
|
26
|
+
|
|
27
|
+
`Promise`\<`void`\>
|
|
28
|
+
|
|
29
|
+
A promise that resolves when the rule group has been stored.
|
|
30
|
+
|
|
31
|
+
***
|
|
32
|
+
|
|
33
|
+
### ruleGroupGet() {#rulegroupget}
|
|
34
|
+
|
|
35
|
+
> **ruleGroupGet**(`ruleGroupId`): `Promise`\<[`IRuleGroup`](IRuleGroup.md)\>
|
|
36
|
+
|
|
37
|
+
Get a rule group for extraction.
|
|
38
|
+
|
|
39
|
+
#### Parameters
|
|
40
|
+
|
|
41
|
+
##### ruleGroupId
|
|
42
|
+
|
|
43
|
+
`string`
|
|
44
|
+
|
|
45
|
+
The id of the rule group to get.
|
|
46
|
+
|
|
47
|
+
#### Returns
|
|
48
|
+
|
|
49
|
+
`Promise`\<[`IRuleGroup`](IRuleGroup.md)\>
|
|
50
|
+
|
|
51
|
+
The rule group.
|
|
52
|
+
|
|
53
|
+
***
|
|
54
|
+
|
|
55
|
+
### ruleGroupRemove() {#rulegroupremove}
|
|
56
|
+
|
|
57
|
+
> **ruleGroupRemove**(`ruleGroupId`): `Promise`\<`void`\>
|
|
58
|
+
|
|
59
|
+
Remove a rule group.
|
|
60
|
+
|
|
61
|
+
#### Parameters
|
|
62
|
+
|
|
63
|
+
##### ruleGroupId
|
|
64
|
+
|
|
65
|
+
`string`
|
|
66
|
+
|
|
67
|
+
The id of the rule group to remove.
|
|
68
|
+
|
|
69
|
+
#### Returns
|
|
70
|
+
|
|
71
|
+
`Promise`\<`void`\>
|
|
72
|
+
|
|
73
|
+
A promise that resolves when the rule group has been removed.
|
|
74
|
+
|
|
75
|
+
***
|
|
76
|
+
|
|
77
|
+
### extract() {#extract}
|
|
78
|
+
|
|
79
|
+
> **extract**(`ruleGroupId`, `data`, `overrideExtractorType?`, `overrideMimeType?`): `Promise`\<`unknown`\>
|
|
80
|
+
|
|
81
|
+
Extracts data from the provided input.
|
|
82
|
+
|
|
83
|
+
#### Parameters
|
|
84
|
+
|
|
85
|
+
##### ruleGroupId
|
|
86
|
+
|
|
87
|
+
`string`
|
|
88
|
+
|
|
89
|
+
The id of the rule group to use to extract data.
|
|
90
|
+
|
|
91
|
+
##### data
|
|
92
|
+
|
|
93
|
+
`Uint8Array`
|
|
94
|
+
|
|
95
|
+
The data to extract from.
|
|
96
|
+
|
|
97
|
+
##### overrideExtractorType?
|
|
98
|
+
|
|
99
|
+
`string`
|
|
100
|
+
|
|
101
|
+
An optional override for the extractor type.
|
|
102
|
+
|
|
103
|
+
##### overrideMimeType?
|
|
104
|
+
|
|
105
|
+
`string`
|
|
106
|
+
|
|
107
|
+
An optional override for the mime type for conversion, will auto detect if not provided.
|
|
108
|
+
|
|
109
|
+
#### Returns
|
|
110
|
+
|
|
111
|
+
`Promise`\<`unknown`\>
|
|
112
|
+
|
|
113
|
+
The extracted data.
|
|
114
|
+
|
|
115
|
+
***
|
|
116
|
+
|
|
117
|
+
### convert() {#convert}
|
|
118
|
+
|
|
119
|
+
> **convert**(`data`, `overrideMimeType?`): `Promise`\<`unknown`\>
|
|
120
|
+
|
|
121
|
+
Converts data from the provided input to a structured JSON document.
|
|
122
|
+
|
|
123
|
+
#### Parameters
|
|
124
|
+
|
|
125
|
+
##### data
|
|
126
|
+
|
|
127
|
+
`Uint8Array`
|
|
128
|
+
|
|
129
|
+
The data to convert.
|
|
130
|
+
|
|
131
|
+
##### overrideMimeType?
|
|
132
|
+
|
|
133
|
+
`string`
|
|
134
|
+
|
|
135
|
+
An optional override for the mime type, will auto detect if empty.
|
|
136
|
+
|
|
137
|
+
#### Returns
|
|
138
|
+
|
|
139
|
+
`Promise`\<`unknown`\>
|
|
140
|
+
|
|
141
|
+
The converted data.
|
|
142
|
+
|
|
143
|
+
***
|
|
144
|
+
|
|
145
|
+
### query() {#query}
|
|
146
|
+
|
|
147
|
+
> **query**(`cursor?`, `limit?`): `Promise`\<\{ `entities`: [`IRuleGroup`](IRuleGroup.md)[]; `cursor?`: `string`; \}\>
|
|
148
|
+
|
|
149
|
+
Query the rule group entries.
|
|
150
|
+
|
|
151
|
+
#### Parameters
|
|
152
|
+
|
|
153
|
+
##### cursor?
|
|
154
|
+
|
|
155
|
+
`string`
|
|
156
|
+
|
|
157
|
+
The cursor to request the next chunk of entities.
|
|
158
|
+
|
|
159
|
+
##### limit?
|
|
160
|
+
|
|
161
|
+
`number`
|
|
162
|
+
|
|
163
|
+
Limit the number of entities to return.
|
|
164
|
+
|
|
165
|
+
#### Returns
|
|
166
|
+
|
|
167
|
+
`Promise`\<\{ `entities`: [`IRuleGroup`](IRuleGroup.md)[]; `cursor?`: `string`; \}\>
|
|
168
|
+
|
|
169
|
+
All the entities for the storage matching the conditions,
|
|
170
|
+
and a cursor which can be used to request more entities.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Interface: IDataProcessingConvertRequest
|
|
2
|
+
|
|
3
|
+
Perform a conversion on the data.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
### body {#body}
|
|
8
|
+
|
|
9
|
+
> **body**: `object`
|
|
10
|
+
|
|
11
|
+
The request body containing the data to convert.
|
|
12
|
+
|
|
13
|
+
#### data
|
|
14
|
+
|
|
15
|
+
> **data**: `string`
|
|
16
|
+
|
|
17
|
+
The binary data to convert in base64.
|
|
18
|
+
|
|
19
|
+
#### overrideMimeType?
|
|
20
|
+
|
|
21
|
+
> `optional` **overrideMimeType?**: `string`
|
|
22
|
+
|
|
23
|
+
Use the specified mime type for conversion, will auto detect if undefined.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Interface: IDataProcessingExtractRequest
|
|
2
|
+
|
|
3
|
+
Perform an extraction on the data with the specified ruleset.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
### body {#body}
|
|
8
|
+
|
|
9
|
+
> **body**: `object`
|
|
10
|
+
|
|
11
|
+
The request body containing the data and rule group to use for extraction.
|
|
12
|
+
|
|
13
|
+
#### ruleGroupId
|
|
14
|
+
|
|
15
|
+
> **ruleGroupId**: `string`
|
|
16
|
+
|
|
17
|
+
The rule group id to use for the extraction.
|
|
18
|
+
|
|
19
|
+
#### data
|
|
20
|
+
|
|
21
|
+
> **data**: `string`
|
|
22
|
+
|
|
23
|
+
The binary data to extract from in base64.
|
|
24
|
+
|
|
25
|
+
#### overrideExtractorType?
|
|
26
|
+
|
|
27
|
+
> `optional` **overrideExtractorType?**: `string`
|
|
28
|
+
|
|
29
|
+
The default extractor connector will be used if not specified.
|
|
30
|
+
|
|
31
|
+
#### overrideMimeType?
|
|
32
|
+
|
|
33
|
+
> `optional` **overrideMimeType?**: `string`
|
|
34
|
+
|
|
35
|
+
An optional override for the mime type for conversion, will auto detect if not provided.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Interface: IDataProcessingRuleGroupGetRequest
|
|
2
|
+
|
|
3
|
+
Get a rule group.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
### pathParams {#pathparams}
|
|
8
|
+
|
|
9
|
+
> **pathParams**: `object`
|
|
10
|
+
|
|
11
|
+
The path parameters for the request.
|
|
12
|
+
|
|
13
|
+
#### id
|
|
14
|
+
|
|
15
|
+
> **id**: `string`
|
|
16
|
+
|
|
17
|
+
The id of the rule group to retrieve.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Interface: IDataProcessingRuleGroupListRequest
|
|
2
|
+
|
|
3
|
+
Get a list of the rule group entries.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
### query? {#query}
|
|
8
|
+
|
|
9
|
+
> `optional` **query?**: `object`
|
|
10
|
+
|
|
11
|
+
The query parameters.
|
|
12
|
+
|
|
13
|
+
#### cursor?
|
|
14
|
+
|
|
15
|
+
> `optional` **cursor?**: `string`
|
|
16
|
+
|
|
17
|
+
The optional cursor to get next chunk.
|
|
18
|
+
|
|
19
|
+
#### limit?
|
|
20
|
+
|
|
21
|
+
> `optional` **limit?**: `string`
|
|
22
|
+
|
|
23
|
+
Limit the number of entities to return.
|