@staticbackend/backend 1.4.0-rc2 → 1.4.3

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/backend.d.ts CHANGED
@@ -57,6 +57,10 @@ export declare class Backend {
57
57
  ok: boolean;
58
58
  content: any;
59
59
  }>;
60
+ me(token: string): Promise<{
61
+ ok: boolean;
62
+ content: any;
63
+ }>;
60
64
  cacheGet(rootToken: string, key: string): Promise<{
61
65
  ok: boolean;
62
66
  content: any;
@@ -97,6 +101,10 @@ export declare class Backend {
97
101
  ok: boolean;
98
102
  content: any;
99
103
  }>;
104
+ count(token: string, repo: string, filters: any): Promise<{
105
+ ok: boolean;
106
+ content: any;
107
+ }>;
100
108
  sudoList(rootToken: string, repo: string, param?: ListParam): Promise<{
101
109
  ok: boolean;
102
110
  content: any;
package/dist/backend.js CHANGED
@@ -103,6 +103,11 @@ class Backend {
103
103
  return yield this.req(rootToken, "GET", `/sudogettoken/${accountId}`);
104
104
  });
105
105
  }
106
+ me(token) {
107
+ return __awaiter(this, void 0, void 0, function* () {
108
+ return yield this.req(token, "GET", "/me");
109
+ });
110
+ }
106
111
  cacheGet(rootToken, key) {
107
112
  return __awaiter(this, void 0, void 0, function* () {
108
113
  return yield this.req(rootToken, "GET", `/sudo/cache?key=${key}`);
@@ -156,6 +161,11 @@ class Backend {
156
161
  return yield this.req(token, "DELETE", `/db/${repo}/${id}`);
157
162
  });
158
163
  }
164
+ count(token, repo, filters) {
165
+ return __awaiter(this, void 0, void 0, function* () {
166
+ return yield this.req(token, "POST", `/db/count/${repo}`, filters);
167
+ });
168
+ }
159
169
  sudoList(rootToken, repo, param) {
160
170
  return __awaiter(this, void 0, void 0, function* () {
161
171
  const qs = this.listParamToQuerystring(param);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@staticbackend/backend",
3
- "version": "1.4.0-rc2",
3
+ "version": "1.4.3",
4
4
  "description": "Client library for StaticBackend API",
5
5
  "main": "./dist/index.js",
6
6
  "scripts": {