@staticbackend/backend 1.2.0 → 1.3.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/dist/backend.d.ts +13 -0
- package/dist/backend.js +11 -0
- package/package.json +1 -1
package/dist/backend.d.ts
CHANGED
|
@@ -11,6 +11,11 @@ export interface EmailData {
|
|
|
11
11
|
body: string;
|
|
12
12
|
replyTo: string;
|
|
13
13
|
}
|
|
14
|
+
export interface ConvertData {
|
|
15
|
+
toPDF: boolean;
|
|
16
|
+
url: string;
|
|
17
|
+
fullpage: boolean;
|
|
18
|
+
}
|
|
14
19
|
export declare class Backend {
|
|
15
20
|
private baseURL;
|
|
16
21
|
private pubKey;
|
|
@@ -97,6 +102,10 @@ export declare class Backend {
|
|
|
97
102
|
ok: boolean;
|
|
98
103
|
content: any;
|
|
99
104
|
}>;
|
|
105
|
+
sudoAddIndex(rootToken: string, repo: string, field: string): Promise<{
|
|
106
|
+
ok: boolean;
|
|
107
|
+
content: any;
|
|
108
|
+
}>;
|
|
100
109
|
storeFile(token: string, buf: ArrayBuffer): Promise<{
|
|
101
110
|
ok: boolean;
|
|
102
111
|
content: any;
|
|
@@ -113,5 +122,9 @@ export declare class Backend {
|
|
|
113
122
|
ok: boolean;
|
|
114
123
|
content: any;
|
|
115
124
|
}>;
|
|
125
|
+
convertURLToX(token: string, data: ConvertData): Promise<{
|
|
126
|
+
ok: boolean;
|
|
127
|
+
content: any;
|
|
128
|
+
}>;
|
|
116
129
|
private listParamToQuerystring;
|
|
117
130
|
}
|
package/dist/backend.js
CHANGED
|
@@ -179,6 +179,12 @@ class Backend {
|
|
|
179
179
|
return yield this.req(token, "PUT", `/inc/${repo}/${id}`, body);
|
|
180
180
|
});
|
|
181
181
|
}
|
|
182
|
+
sudoAddIndex(rootToken, repo, field) {
|
|
183
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
184
|
+
const qs = `?col=${repo}&field=${field}`;
|
|
185
|
+
return yield this.req(rootToken, "POST", `/sudo/index${qs}`, null);
|
|
186
|
+
});
|
|
187
|
+
}
|
|
182
188
|
storeFile(token, buf) {
|
|
183
189
|
return __awaiter(this, void 0, void 0, function* () {
|
|
184
190
|
let fd = new formData();
|
|
@@ -212,6 +218,11 @@ class Backend {
|
|
|
212
218
|
return yield this.rawreq(ct, token, "POST", "/extra/resizeimg", fd);
|
|
213
219
|
});
|
|
214
220
|
}
|
|
221
|
+
convertURLToX(token, data) {
|
|
222
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
223
|
+
return yield this.req(token, "POST", "/extra/htmltox", data);
|
|
224
|
+
});
|
|
225
|
+
}
|
|
215
226
|
listParamToQuerystring(param) {
|
|
216
227
|
var qs = "";
|
|
217
228
|
if (param) {
|