@twin.org/data-processing-rest-client 0.0.1-next.5 → 0.0.1-next.7
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/cjs/index.cjs
CHANGED
|
@@ -35,7 +35,7 @@ class DataProcessingClient extends apiCore.BaseRestClient {
|
|
|
35
35
|
core.Guards.stringValue(this.CLASS_NAME, "ruleGroup.id", ruleGroup.id);
|
|
36
36
|
core.Guards.stringValue(this.CLASS_NAME, "ruleGroup.label", ruleGroup.label);
|
|
37
37
|
core.Guards.array(this.CLASS_NAME, "ruleGroup.rules", ruleGroup.rules);
|
|
38
|
-
await this.fetch("/rule-group/:id", "
|
|
38
|
+
await this.fetch("/rule-group/:id", "PUT", {
|
|
39
39
|
pathParams: {
|
|
40
40
|
id: ruleGroup.id
|
|
41
41
|
},
|
|
@@ -107,6 +107,22 @@ class DataProcessingClient extends apiCore.BaseRestClient {
|
|
|
107
107
|
});
|
|
108
108
|
return core.ObjectHelper.fromExtended(result.body);
|
|
109
109
|
}
|
|
110
|
+
/**
|
|
111
|
+
* Query the rule group entries.
|
|
112
|
+
* @param cursor The cursor to request the next page of entities.
|
|
113
|
+
* @param pageSize The maximum number of entities in a page.
|
|
114
|
+
* @returns All the entities for the storage matching the conditions,
|
|
115
|
+
* and a cursor which can be used to request more entities.
|
|
116
|
+
*/
|
|
117
|
+
async query(cursor, pageSize) {
|
|
118
|
+
const response = await this.fetch("/", "GET", {
|
|
119
|
+
query: {
|
|
120
|
+
cursor,
|
|
121
|
+
pageSize
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
return response.body;
|
|
125
|
+
}
|
|
110
126
|
}
|
|
111
127
|
|
|
112
128
|
exports.DataProcessingClient = DataProcessingClient;
|
package/dist/esm/index.mjs
CHANGED
|
@@ -33,7 +33,7 @@ class DataProcessingClient extends BaseRestClient {
|
|
|
33
33
|
Guards.stringValue(this.CLASS_NAME, "ruleGroup.id", ruleGroup.id);
|
|
34
34
|
Guards.stringValue(this.CLASS_NAME, "ruleGroup.label", ruleGroup.label);
|
|
35
35
|
Guards.array(this.CLASS_NAME, "ruleGroup.rules", ruleGroup.rules);
|
|
36
|
-
await this.fetch("/rule-group/:id", "
|
|
36
|
+
await this.fetch("/rule-group/:id", "PUT", {
|
|
37
37
|
pathParams: {
|
|
38
38
|
id: ruleGroup.id
|
|
39
39
|
},
|
|
@@ -105,6 +105,22 @@ class DataProcessingClient extends BaseRestClient {
|
|
|
105
105
|
});
|
|
106
106
|
return ObjectHelper.fromExtended(result.body);
|
|
107
107
|
}
|
|
108
|
+
/**
|
|
109
|
+
* Query the rule group entries.
|
|
110
|
+
* @param cursor The cursor to request the next page of entities.
|
|
111
|
+
* @param pageSize The maximum number of entities in a page.
|
|
112
|
+
* @returns All the entities for the storage matching the conditions,
|
|
113
|
+
* and a cursor which can be used to request more entities.
|
|
114
|
+
*/
|
|
115
|
+
async query(cursor, pageSize) {
|
|
116
|
+
const response = await this.fetch("/", "GET", {
|
|
117
|
+
query: {
|
|
118
|
+
cursor,
|
|
119
|
+
pageSize
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
return response.body;
|
|
123
|
+
}
|
|
108
124
|
}
|
|
109
125
|
|
|
110
126
|
export { DataProcessingClient };
|
|
@@ -47,4 +47,21 @@ export declare class DataProcessingClient extends BaseRestClient implements IDat
|
|
|
47
47
|
* @returns The converted data.
|
|
48
48
|
*/
|
|
49
49
|
convert(data: Uint8Array, overrideMimeType?: string): Promise<unknown>;
|
|
50
|
+
/**
|
|
51
|
+
* Query the rule group entries.
|
|
52
|
+
* @param cursor The cursor to request the next page of entities.
|
|
53
|
+
* @param pageSize The maximum number of entities in a page.
|
|
54
|
+
* @returns All the entities for the storage matching the conditions,
|
|
55
|
+
* and a cursor which can be used to request more entities.
|
|
56
|
+
*/
|
|
57
|
+
query(cursor?: string, pageSize?: number): Promise<{
|
|
58
|
+
/**
|
|
59
|
+
* The entities, which can be partial if a limited keys list was provided.
|
|
60
|
+
*/
|
|
61
|
+
entities: IRuleGroup[];
|
|
62
|
+
/**
|
|
63
|
+
* An optional cursor, when defined can be used to call find to get more entities.
|
|
64
|
+
*/
|
|
65
|
+
cursor?: string;
|
|
66
|
+
}>;
|
|
50
67
|
}
|
package/docs/changelog.md
CHANGED
|
@@ -193,3 +193,36 @@ The converted data.
|
|
|
193
193
|
#### Implementation of
|
|
194
194
|
|
|
195
195
|
`IDataProcessingComponent.convert`
|
|
196
|
+
|
|
197
|
+
***
|
|
198
|
+
|
|
199
|
+
### query()
|
|
200
|
+
|
|
201
|
+
> **query**(`cursor`?, `pageSize`?): `Promise`\<\{ `entities`: `IRuleGroup`[]; `cursor`: `string`; \}\>
|
|
202
|
+
|
|
203
|
+
Query the rule group entries.
|
|
204
|
+
|
|
205
|
+
#### Parameters
|
|
206
|
+
|
|
207
|
+
##### cursor?
|
|
208
|
+
|
|
209
|
+
`string`
|
|
210
|
+
|
|
211
|
+
The cursor to request the next page of entities.
|
|
212
|
+
|
|
213
|
+
##### pageSize?
|
|
214
|
+
|
|
215
|
+
`number`
|
|
216
|
+
|
|
217
|
+
The maximum number of entities in a page.
|
|
218
|
+
|
|
219
|
+
#### Returns
|
|
220
|
+
|
|
221
|
+
`Promise`\<\{ `entities`: `IRuleGroup`[]; `cursor`: `string`; \}\>
|
|
222
|
+
|
|
223
|
+
All the entities for the storage matching the conditions,
|
|
224
|
+
and a cursor which can be used to request more entities.
|
|
225
|
+
|
|
226
|
+
#### Implementation of
|
|
227
|
+
|
|
228
|
+
`IDataProcessingComponent.query`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/data-processing-rest-client",
|
|
3
|
-
"version": "0.0.1-next.
|
|
3
|
+
"version": "0.0.1-next.7",
|
|
4
4
|
"description": "Data processing contract implementation which can connect to REST endpoints",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"@twin.org/api-core": "next",
|
|
18
18
|
"@twin.org/api-models": "next",
|
|
19
19
|
"@twin.org/core": "next",
|
|
20
|
-
"@twin.org/data-processing-models": "0.0.1-next.
|
|
20
|
+
"@twin.org/data-processing-models": "0.0.1-next.7",
|
|
21
21
|
"@twin.org/entity": "next",
|
|
22
22
|
"@twin.org/nameof": "next",
|
|
23
23
|
"@twin.org/web": "next"
|