@mxpicture/gcp-functions-frontend 0.1.24 → 0.1.26
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/api/FrontendApi.js +9 -7
- package/package.json +1 -1
package/dist/api/FrontendApi.js
CHANGED
|
@@ -20,20 +20,21 @@ export class FrontendApi extends IApi {
|
|
|
20
20
|
await (await this.service())({ route: "delete", keys });
|
|
21
21
|
}
|
|
22
22
|
async get(keys) {
|
|
23
|
-
return (await (await
|
|
23
|
+
return (await (await this.service())({ route: "get", keys })).data
|
|
24
24
|
.doc;
|
|
25
25
|
}
|
|
26
26
|
// todo add filter
|
|
27
27
|
async query() {
|
|
28
|
-
return (await (await
|
|
28
|
+
return (await (await this.service())({ route: "query" })).data
|
|
29
29
|
.doc;
|
|
30
30
|
}
|
|
31
31
|
async count() {
|
|
32
|
-
return (await (await
|
|
32
|
+
return (await (await this.service())({ route: "count" })).data
|
|
33
33
|
.doc;
|
|
34
34
|
}
|
|
35
35
|
async exists(keys) {
|
|
36
|
-
return (await (await
|
|
36
|
+
return (await (await this.service())({ route: "exists", keys })).data
|
|
37
|
+
.doc;
|
|
37
38
|
}
|
|
38
39
|
async meta() {
|
|
39
40
|
// return new Meta(this.shape).items();
|
|
@@ -41,13 +42,14 @@ export class FrontendApi extends IApi {
|
|
|
41
42
|
return [];
|
|
42
43
|
}
|
|
43
44
|
async create(data) {
|
|
44
|
-
return (await (await
|
|
45
|
+
return (await (await this.service())({ route: "create", content: data }))
|
|
46
|
+
.data.doc;
|
|
45
47
|
}
|
|
46
48
|
async update(keys, data) {
|
|
47
|
-
return (await (await
|
|
49
|
+
return (await (await this.service())({
|
|
48
50
|
route: "update",
|
|
49
51
|
keys,
|
|
50
52
|
content: data,
|
|
51
|
-
})).data
|
|
53
|
+
})).data.doc;
|
|
52
54
|
}
|
|
53
55
|
}
|