@staticbackend/backend 1.3.1 → 1.4.0-rc2
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 +8 -0
- package/dist/backend.js +5 -0
- package/package.json +1 -1
package/dist/backend.d.ts
CHANGED
|
@@ -3,6 +3,10 @@ export interface ListParam {
|
|
|
3
3
|
size: number;
|
|
4
4
|
descending: boolean;
|
|
5
5
|
}
|
|
6
|
+
export interface BulkUpdate {
|
|
7
|
+
update: any;
|
|
8
|
+
clauses: Array<Array<any>>;
|
|
9
|
+
}
|
|
6
10
|
export interface EmailData {
|
|
7
11
|
fromName: string;
|
|
8
12
|
from: string;
|
|
@@ -85,6 +89,10 @@ export declare class Backend {
|
|
|
85
89
|
ok: boolean;
|
|
86
90
|
content: any;
|
|
87
91
|
}>;
|
|
92
|
+
updateBulk(token: string, repo: string, data: BulkUpdate): Promise<{
|
|
93
|
+
ok: boolean;
|
|
94
|
+
content: any;
|
|
95
|
+
}>;
|
|
88
96
|
delete(token: string, repo: string, id: string): Promise<{
|
|
89
97
|
ok: boolean;
|
|
90
98
|
content: any;
|
package/dist/backend.js
CHANGED
|
@@ -146,6 +146,11 @@ class Backend {
|
|
|
146
146
|
return yield this.req(token, "PUT", `/db/${repo}/${id}`, doc);
|
|
147
147
|
});
|
|
148
148
|
}
|
|
149
|
+
updateBulk(token, repo, data) {
|
|
150
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
151
|
+
return yield this.req(token, "PUT", `/db/${repo}?bulk=1`, data);
|
|
152
|
+
});
|
|
153
|
+
}
|
|
149
154
|
delete(token, repo, id) {
|
|
150
155
|
return __awaiter(this, void 0, void 0, function* () {
|
|
151
156
|
return yield this.req(token, "DELETE", `/db/${repo}/${id}`);
|