@staticbackend/backend 1.5.0-alpha.3 → 1.5.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 +4 -0
- package/dist/backend.js +10 -0
- package/package.json +1 -1
package/dist/backend.d.ts
CHANGED
|
@@ -169,6 +169,10 @@ export declare class Backend {
|
|
|
169
169
|
ok: boolean;
|
|
170
170
|
content: any;
|
|
171
171
|
}>;
|
|
172
|
+
publish(token: string, channel: string, type: string, data: any): Promise<{
|
|
173
|
+
ok: boolean;
|
|
174
|
+
content: any;
|
|
175
|
+
}>;
|
|
172
176
|
sudoSendSMS(rootToken: string, data: SMSData): Promise<{
|
|
173
177
|
ok: boolean;
|
|
174
178
|
content: any;
|
package/dist/backend.js
CHANGED
|
@@ -266,6 +266,16 @@ class Backend {
|
|
|
266
266
|
return yield this.req(token, "POST", "/extra/htmltox", data);
|
|
267
267
|
});
|
|
268
268
|
}
|
|
269
|
+
publish(token, channel, type, data) {
|
|
270
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
271
|
+
const payload = {
|
|
272
|
+
channel: channel,
|
|
273
|
+
type: type,
|
|
274
|
+
data: data,
|
|
275
|
+
};
|
|
276
|
+
return yield this.req(token, "POST", "/publish", payload);
|
|
277
|
+
});
|
|
278
|
+
}
|
|
269
279
|
sudoSendSMS(rootToken, data) {
|
|
270
280
|
return __awaiter(this, void 0, void 0, function* () {
|
|
271
281
|
return yield this.req(rootToken, "POST", "/extra/sms", data);
|