@olympeio/runtime-node 9.11.7 → 9.11.9
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/.Primordial.newInst.json +1 -1
- package/import/olympe.dm/datamodel/05_permission_schema.updateInst.json +1 -1
- package/import/olympe.sc/datamodel/01_language.newInst.json +1 -1
- package/index.js +955 -947
- package/package.json +1 -1
- package/types/data.d.ts +10 -0
- package/types/other.d.ts +64 -0
- package/types/query.d.ts +10 -0
package/package.json
CHANGED
package/types/data.d.ts
CHANGED
|
@@ -254,6 +254,16 @@ export abstract class CloudObject implements HasTag {
|
|
|
254
254
|
*/
|
|
255
255
|
static exists(tag: InstanceOrTag): boolean;
|
|
256
256
|
|
|
257
|
+
/**
|
|
258
|
+
* Mark the specified instances as obsolete in cache database: the instances won't exist anymore in the local cache.
|
|
259
|
+
* It does not delete the instances from the remote data store and they can still be retrieved using a {@link Query}.
|
|
260
|
+
* Warning: this is only for experimented users: only use this method if you know what you are doing.
|
|
261
|
+
*
|
|
262
|
+
* @static
|
|
263
|
+
* @param {...InstanceOrTag} tags
|
|
264
|
+
*/
|
|
265
|
+
static markObsolete(...tags: InstanceOrTag[]): void;
|
|
266
|
+
|
|
257
267
|
/**
|
|
258
268
|
* Create an instance of the specified data type (or `model`)
|
|
259
269
|
* in the local datacloud (not persisted) with the specified property values.
|
package/types/other.d.ts
CHANGED
|
@@ -406,3 +406,67 @@ export class Process {
|
|
|
406
406
|
*/
|
|
407
407
|
static isOnline(context: Context): Observable<boolean>;
|
|
408
408
|
}
|
|
409
|
+
|
|
410
|
+
export class EventMonitor {
|
|
411
|
+
/**
|
|
412
|
+
* Enable monitoring and start the periodic flush timer.
|
|
413
|
+
*
|
|
414
|
+
* Starts internal timers if they are not already running.
|
|
415
|
+
*/
|
|
416
|
+
static enable(): void;
|
|
417
|
+
|
|
418
|
+
/**
|
|
419
|
+
* Disable monitoring and stop the periodic flush timer.
|
|
420
|
+
*
|
|
421
|
+
* Counters are preserved in memory until a flush or destroy.*/
|
|
422
|
+
static disable(): void;
|
|
423
|
+
|
|
424
|
+
/**
|
|
425
|
+
* Set how often the monitor flushes accumulated counts.
|
|
426
|
+
* Values lower than 1000ms are coerced to 1000ms.
|
|
427
|
+
*
|
|
428
|
+
* @param ms The flush frequency in milliseconds.
|
|
429
|
+
*/
|
|
430
|
+
static setFlushFrequency(ms: number): void;
|
|
431
|
+
|
|
432
|
+
/**
|
|
433
|
+
* Set the HTTP destination (orchestrator) URL used when sending batches.
|
|
434
|
+
*
|
|
435
|
+
* @param url Destination URL.
|
|
436
|
+
*/
|
|
437
|
+
static setDestinationUrl(url: string): void;
|
|
438
|
+
|
|
439
|
+
/**
|
|
440
|
+
* Track an occurrence of an event. No network call is made; an in-memory counter is incremented
|
|
441
|
+
* and later flushed in batch. If monitoring is disabled, the call is a no‑op.
|
|
442
|
+
*
|
|
443
|
+
* @param eventType One of {@link EventMonitor.EVENT_TYPE}.
|
|
444
|
+
* @param eventName Logical event name (e.g. brick name or endpoint id).
|
|
445
|
+
* @param options Additional context used for aggregation and payload (serviceAppName, host, olympeRuntimeId).
|
|
446
|
+
*/
|
|
447
|
+
static track(
|
|
448
|
+
eventType: EventMonitor.EVENT_TYPE,
|
|
449
|
+
eventName: string,
|
|
450
|
+
options: { serviceAppName: string; host: string; olympeRuntimeId: string }
|
|
451
|
+
): void;
|
|
452
|
+
|
|
453
|
+
/**
|
|
454
|
+
* Flush accumulated counts immediately. Resets counters after a successful send.
|
|
455
|
+
* If there is nothing to flush, resolves immediately.
|
|
456
|
+
*/
|
|
457
|
+
static flush(): Promise<void>;
|
|
458
|
+
|
|
459
|
+
/**
|
|
460
|
+
* Stop timers and clear all in-memory counters.
|
|
461
|
+
*/
|
|
462
|
+
static destroy(): void;
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
export namespace EventMonitor {
|
|
466
|
+
/** Event type enum */
|
|
467
|
+
export enum EVENT_TYPE {
|
|
468
|
+
REMOTE_ACTION = "Remote Action",
|
|
469
|
+
DATA_SOURCE = "Data Source",
|
|
470
|
+
ENDPOINT = "Endpoint"
|
|
471
|
+
}
|
|
472
|
+
}
|
package/types/query.d.ts
CHANGED
|
@@ -281,6 +281,16 @@ export class Predicate {
|
|
|
281
281
|
*/
|
|
282
282
|
static in(...tags: InstanceOrTag[]): Predicate;
|
|
283
283
|
|
|
284
|
+
/**
|
|
285
|
+
* Create a predicate matching a specified property to multiple values.
|
|
286
|
+
* **EXPERIMENTAL** this method and the in() method may change in the future.
|
|
287
|
+
*
|
|
288
|
+
* @param property the property to use for filtering
|
|
289
|
+
* @param values the values that the property must match at least one
|
|
290
|
+
* @return new Predicate with the in operation
|
|
291
|
+
*/
|
|
292
|
+
static propertyIn<T>(property: Property<T>, values: T[]): Predicate;
|
|
293
|
+
|
|
284
294
|
/**
|
|
285
295
|
* Create a predicate matching a specified property to a specified value.
|
|
286
296
|
*
|