@olympeio/runtime-node 9.4.2 → 9.4.4
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/import/olympe.dm/datamodel/00_bootstrap.newInst.json +1 -1
- package/import/olympe.dm/datamodel/00_bootstrap.newRel.json +1 -1
- package/import/olympe.dm/datamodel/03_file.newInst.json +1 -1
- package/import/olympe.dm/datamodel/05_permission_schema.newInst.json +1 -1
- package/import/olympe.dm/datamodel/05_permission_schema.newRel.json +1 -1
- package/import/olympe.dm/datamodel/05_permission_schema.updateInst.json +1 -1
- package/import/olympe.dm/datamodel/06_structure.newInst.json +1 -1
- package/import/olympe.sc/datamodel/01_language.newInst.json +1 -1
- package/index.js +776 -758
- package/package.json +2 -3
- package/types/cloud.d.ts +18 -4
- package/types/runtime.d.ts +2 -1
- package/types/utils.d.ts +4 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@olympeio/runtime-node",
|
|
3
|
-
"version": "9.4.
|
|
3
|
+
"version": "9.4.4",
|
|
4
4
|
"description": "Olympe Node Runtime Environment",
|
|
5
5
|
"types": "types/index.d.ts",
|
|
6
6
|
"dependencies": {
|
|
@@ -9,8 +9,7 @@
|
|
|
9
9
|
"utf-8-validate": "~5.0.10",
|
|
10
10
|
"lowdb": "~1.0.0",
|
|
11
11
|
"rxjs": "7.8.1",
|
|
12
|
-
"fastify": "~3.29.4"
|
|
13
|
-
"@fastify/cors": "~7.0.0"
|
|
12
|
+
"fastify": "~3.29.4"
|
|
14
13
|
},
|
|
15
14
|
"dcInitConfig": "import/dcInitConfig.json",
|
|
16
15
|
"author": "Olympe S.A. <dev@olympe.ch>",
|
package/types/cloud.d.ts
CHANGED
|
@@ -128,7 +128,7 @@ export class File extends CloudObject {
|
|
|
128
128
|
* @param content byte content of the file
|
|
129
129
|
* @param mimeType optional mime type of the file
|
|
130
130
|
*/
|
|
131
|
-
static setContent(transaction: Transaction, file: Tag, name: string, content: ArrayBuffer, mimeType?: string);
|
|
131
|
+
static setContent(transaction: Transaction, file: Tag, name: string, content: Uint8Array | ArrayBuffer, mimeType?: string);
|
|
132
132
|
|
|
133
133
|
/**
|
|
134
134
|
* Set the content of a `File` from a specified URL
|
|
@@ -152,7 +152,7 @@ export class File extends CloudObject {
|
|
|
152
152
|
* @param tag optional tag for the file
|
|
153
153
|
* @return tag string of the file
|
|
154
154
|
*/
|
|
155
|
-
static createFromContent(transaction: Transaction, name: string, content: ArrayBuffer, mimeType?: string, source?: Source, tag?: string): string;
|
|
155
|
+
static createFromContent(transaction: Transaction, name: string, content: Uint8Array | ArrayBuffer, mimeType?: string, source?: Source, tag?: string): string;
|
|
156
156
|
|
|
157
157
|
/**
|
|
158
158
|
* @deprecated Please use {@apilink File.setURLContent}
|
|
@@ -946,7 +946,9 @@ export class QueryResult<T extends CloudObject | CloudObject[]> {
|
|
|
946
946
|
export class Query<T extends CloudObject, R> {
|
|
947
947
|
|
|
948
948
|
/**
|
|
949
|
-
* Create a query starting from the `CloudObject` specified tag
|
|
949
|
+
* Create a query starting from the `CloudObject` specified tag.
|
|
950
|
+
* That `CloudObject` must already exist in the local database. In case you have the tag as a `string` and need to get
|
|
951
|
+
* the object from a remote database, use {@apilink Query.fromTag} instead.
|
|
950
952
|
*
|
|
951
953
|
* @param tag tag of the `CloudObject` the query is starting from
|
|
952
954
|
* @param source optional source of the data to answer the query
|
|
@@ -954,6 +956,18 @@ export class Query<T extends CloudObject, R> {
|
|
|
954
956
|
*/
|
|
955
957
|
static from<T extends Tag>(tag: T, source?: Source): Query<T extends CloudObject ? T : CloudObject, never>;
|
|
956
958
|
|
|
959
|
+
/**
|
|
960
|
+
* Create a query starting from the `CloudObject` specified tag.
|
|
961
|
+
* The difference with {@apilink Query.from} method is that you specify the data type of the Tag: this allows to execute
|
|
962
|
+
* queries with a tag that is unknown by the local database, on the right remote database.
|
|
963
|
+
*
|
|
964
|
+
* @param tag tag of the `CloudObject` the query is starting from
|
|
965
|
+
* @param dataType data type of the `tag` `CloudObject`.
|
|
966
|
+
* @param source optional source of the data to answer the query
|
|
967
|
+
* @return an empty Query whose starting point is defined by a single `CloudObject`
|
|
968
|
+
*/
|
|
969
|
+
static fromTag<T extends CloudObject>(tag: string, dataType: Class<T> | Tag, source?: Source): Query<T, never>;
|
|
970
|
+
|
|
957
971
|
/**
|
|
958
972
|
* Create a query starting from the instances of the specified model. By default, it does include the instances of
|
|
959
973
|
* the models that inherit from the given one.
|
|
@@ -1493,7 +1507,7 @@ export type ParsedPredicate =
|
|
|
1493
1507
|
/** The tag of the property being checked. */
|
|
1494
1508
|
property: string,
|
|
1495
1509
|
/** The regular expression pattern being matched. */
|
|
1496
|
-
pattern:
|
|
1510
|
+
pattern: RegExp,
|
|
1497
1511
|
/** Whether the matching should be case-sensitive or not. */
|
|
1498
1512
|
caseSensitive: boolean
|
|
1499
1513
|
};
|
package/types/runtime.d.ts
CHANGED
|
@@ -53,6 +53,7 @@ export class BrickContext extends Context {
|
|
|
53
53
|
|
|
54
54
|
/**
|
|
55
55
|
* Wait for the property to get a new value, wrapped in a promise.
|
|
56
|
+
* The promise is rejected if no value is set to the specified property before the destruction of this BrickContext.
|
|
56
57
|
*
|
|
57
58
|
* @param key the property
|
|
58
59
|
* @param global [=false] whether the method checks parent contexts
|
|
@@ -204,7 +205,7 @@ export abstract class Brick extends CloudObject {
|
|
|
204
205
|
* @param inputs array of input values
|
|
205
206
|
* @param outputs array of output setter functions. A setter updates a specific output value of the brick.
|
|
206
207
|
*/
|
|
207
|
-
protected update($: BrickContext, inputs: any[], outputs: ((any) => void)[]): void
|
|
208
|
+
protected update($: BrickContext, inputs: any[], outputs: ((any) => void)[]): void | Promise<void>;
|
|
208
209
|
|
|
209
210
|
/**
|
|
210
211
|
* Called every time the context is cleared.
|
package/types/utils.d.ts
CHANGED
|
@@ -297,7 +297,8 @@ export class Auth {
|
|
|
297
297
|
static getIDPToken(): string;
|
|
298
298
|
|
|
299
299
|
/**
|
|
300
|
-
* Refresh the expiration time for the current authentication token
|
|
300
|
+
* Refresh the expiration time for the current authentication token.
|
|
301
|
+
* In case of OAuth2 authentication, it uses the refresh token associated to generate a new access token.
|
|
301
302
|
*
|
|
302
303
|
* @return Promise success when the refresh is done
|
|
303
304
|
*/
|
|
@@ -325,6 +326,8 @@ export class Auth {
|
|
|
325
326
|
|
|
326
327
|
/**
|
|
327
328
|
* Refresh the session token to keep it alive.
|
|
329
|
+
*
|
|
330
|
+
* @deprecated use {@apilink Auth.refreshToken} instead
|
|
328
331
|
*/
|
|
329
332
|
static sendKeepAlive(): void;
|
|
330
333
|
|