@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 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);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@staticbackend/backend",
3
- "version": "1.5.0-alpha.3",
3
+ "version": "1.5.0",
4
4
  "description": "Client library for StaticBackend API",
5
5
  "main": "./dist/index.js",
6
6
  "scripts": {