@auxilium/datalynk-client 0.6.14 → 0.7.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/README.md +2 -1
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/socket.d.ts +4 -3
- package/dist/socket.d.ts.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -11,6 +11,7 @@ Datalynk client library to integrate JavaScript clients with the Datalynk API.
|
|
|
11
11
|
- [Table of Contents](#Table-of-Contents)
|
|
12
12
|
- [Quick Start](#quick-start)
|
|
13
13
|
- [Documentation](#documentation)
|
|
14
|
+
- [API Documentation](https://auxilium.pages.gitlab.auxiliumgroup.com/datalynk/datalynk-client)
|
|
14
15
|
- [Integration](#integration)
|
|
15
16
|
- [Angular](#integration)
|
|
16
17
|
- [Node / Vue](#integration)
|
|
@@ -45,7 +46,7 @@ const resp = await api.request({'$/auth/current':{}});
|
|
|
45
46
|
|
|
46
47
|
## Documentation
|
|
47
48
|
|
|
48
|
-
|
|
49
|
+
[Full API Documentation](https://auxilium.pages.gitlab.auxiliumgroup.com/datalynk/datalynk-client)
|
|
49
50
|
|
|
50
51
|
<details>
|
|
51
52
|
<summary>
|
package/dist/index.cjs
CHANGED
|
@@ -2065,9 +2065,9 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
2065
2065
|
if (on) {
|
|
2066
2066
|
new Slice(this.slice, this.api).select().exec().rows().then((rows) => this.cache = rows);
|
|
2067
2067
|
if (!this.unsubscribe) this.unsubscribe = this.api.socket.sliceEvents(this.slice, (event) => {
|
|
2068
|
-
const ids = [...event.data.
|
|
2068
|
+
const ids = [...event.data.new, ...event.data.changed];
|
|
2069
2069
|
new Slice(this.slice, this.api).select(ids).exec().rows().then((rows) => this.cache = [...this.cache.filter((c2) => c2.id != null && !ids.includes(c2.id)), ...rows]);
|
|
2070
|
-
this.cache = this.cache.filter((v2) => v2.id && !event.data.
|
|
2070
|
+
this.cache = this.cache.filter((v2) => v2.id && !event.data.lost.includes(v2.id));
|
|
2071
2071
|
});
|
|
2072
2072
|
return this.cache$;
|
|
2073
2073
|
} else if (this.unsubscribe) {
|
package/dist/index.mjs
CHANGED
|
@@ -2061,9 +2061,9 @@ class Slice {
|
|
|
2061
2061
|
if (on) {
|
|
2062
2062
|
new Slice(this.slice, this.api).select().exec().rows().then((rows) => this.cache = rows);
|
|
2063
2063
|
if (!this.unsubscribe) this.unsubscribe = this.api.socket.sliceEvents(this.slice, (event) => {
|
|
2064
|
-
const ids = [...event.data.
|
|
2064
|
+
const ids = [...event.data.new, ...event.data.changed];
|
|
2065
2065
|
new Slice(this.slice, this.api).select(ids).exec().rows().then((rows) => this.cache = [...this.cache.filter((c2) => c2.id != null && !ids.includes(c2.id)), ...rows]);
|
|
2066
|
-
this.cache = this.cache.filter((v2) => v2.id && !event.data.
|
|
2066
|
+
this.cache = this.cache.filter((v2) => v2.id && !event.data.lost.includes(v2.id));
|
|
2067
2067
|
});
|
|
2068
2068
|
return this.cache$;
|
|
2069
2069
|
} else if (this.unsubscribe) {
|
package/dist/socket.d.ts
CHANGED
|
@@ -8,9 +8,10 @@ export type SocketEvent<T> = {
|
|
|
8
8
|
};
|
|
9
9
|
export type SocketEventSlice = SocketEvent<{
|
|
10
10
|
slice: number;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
tx: string;
|
|
12
|
+
new: number[];
|
|
13
|
+
lost: number[];
|
|
14
|
+
changed: number[];
|
|
14
15
|
}>;
|
|
15
16
|
/** Connection options */
|
|
16
17
|
export type SocketOptions = {
|
package/dist/socket.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"socket.d.ts","sourceRoot":"","sources":["../src/socket.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,GAAG,EAAC,MAAM,OAAO,CAAC;AAE1B,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI;IAC5B,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C1B,OAAO,CAAC,MAAM,CAAa;IAE3B;;;OAGG;IACH,IAAI,IAAI,YAA0C;gBAErB,GAAG,EAAE,GAAG,EAAkB,OAAO,GAAE,aAAkB;IAWlF;;;;;OAKG;IACH,WAAW,CAAC,EAAE,EAAE,cAAc,GAAG,WAAW;IAK5C;;OAEG;IACH,KAAK;IAKL;;;;OAIG;IACH,OAAO,CAAC,OAAO,SAAQ;IA+BvB;;;;OAIG;IACH,IAAI,CAAC,OAAO,EAAE,GAAG;IAIjB;;;;;;OAMG;IACH,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,GAAG,MAAM,EAAE,EAAE,QAAQ,EAAE,cAAc,CAAC,gBAAgB,CAAC,GAAG,WAAW;CAelH"}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@auxilium/datalynk-client",
|
|
3
3
|
"description": "Datalynk client library",
|
|
4
4
|
"repository": "https://gitlab.auxiliumgroup.com/auxilium/datalynk/datalynk-client",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.7.0",
|
|
6
6
|
"author": "Zak Timson <zaktimson@gmail.com>",
|
|
7
7
|
"private": false,
|
|
8
8
|
"main": "./dist/index.cjs",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"watch": "vite build --watch"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@ztimson/utils": "0.16.
|
|
28
|
+
"@ztimson/utils": "0.16.10",
|
|
29
29
|
"rxjs": "^7.8.1"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|