@intuitionrobotics/push-pub-sub 0.41.68 → 0.41.71

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.
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- var backend_1 = require("@intuitionrobotics/thunderstorm/backend");
3
+ const backend_1 = require("@intuitionrobotics/thunderstorm/backend");
4
4
  module.exports = new backend_1.RouteResolver(require, __dirname);
5
5
  //# sourceMappingURL=_push.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"_push.js","sourceRoot":"","sources":["../../../src/main/app-backend/api/_push.ts"],"names":[],"mappings":";;AAAA,mEAAsE;AAEtE,MAAM,CAAC,OAAO,GAAG,IAAI,uBAAa,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC"}
1
+ {"version":3,"file":"_push.js","sourceRoot":"","sources":["../../../src/main/app-backend/api/_push.ts"],"names":[],"mappings":";;AAAA,qEAAsE;AAEtE,MAAM,CAAC,OAAO,GAAG,IAAI,uBAAa,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC"}
@@ -1,17 +1,4 @@
1
1
  "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- extendStatics(d, b);
11
- function __() { this.constructor = d; }
12
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
13
- };
14
- })();
15
2
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
16
3
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
17
4
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -21,55 +8,20 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
21
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
22
9
  });
23
10
  };
24
- var __generator = (this && this.__generator) || function (thisArg, body) {
25
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
26
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
27
- function verb(n) { return function (v) { return step([n, v]); }; }
28
- function step(op) {
29
- if (f) throw new TypeError("Generator is already executing.");
30
- while (_) try {
31
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
32
- if (y = 0, t) op = [op[0] & 2, t.value];
33
- switch (op[0]) {
34
- case 0: case 1: t = op; break;
35
- case 4: _.label++; return { value: op[1], done: false };
36
- case 5: _.label++; y = op[1]; op = [0]; continue;
37
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
38
- default:
39
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
40
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
41
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
42
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
43
- if (t[2]) _.ops.pop();
44
- _.trys.pop(); continue;
45
- }
46
- op = body.call(thisArg, _);
47
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
48
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
49
- }
50
- };
51
11
  Object.defineProperty(exports, "__esModule", { value: true });
52
- var backend_1 = require("@intuitionrobotics/thunderstorm/backend");
53
- var thunderstorm_1 = require("@intuitionrobotics/thunderstorm");
54
- var PushPubSubModule_1 = require("../../../modules/PushPubSubModule");
55
- var ServerApi_PushRead = /** @class */ (function (_super) {
56
- __extends(ServerApi_PushRead, _super);
57
- function ServerApi_PushRead() {
58
- return _super.call(this, thunderstorm_1.HttpMethod.POST, "read") || this;
12
+ const backend_1 = require("@intuitionrobotics/thunderstorm/backend");
13
+ const thunderstorm_1 = require("@intuitionrobotics/thunderstorm");
14
+ const PushPubSubModule_1 = require("../../../modules/PushPubSubModule");
15
+ class ServerApi_PushRead extends backend_1.ServerApi {
16
+ constructor() {
17
+ super(thunderstorm_1.HttpMethod.POST, "read");
59
18
  }
60
- ServerApi_PushRead.prototype.process = function (request, response, queryParams, body) {
61
- return __awaiter(this, void 0, void 0, function () {
62
- return __generator(this, function (_a) {
63
- switch (_a.label) {
64
- case 0: return [4 /*yield*/, PushPubSubModule_1.PushPubSubModule.readNotification(body._id, body.read)];
65
- case 1:
66
- // const user = await KasperoProxy.validateSession(request);
67
- return [2 /*return*/, _a.sent()];
68
- }
69
- });
19
+ process(request, response, queryParams, body) {
20
+ return __awaiter(this, void 0, void 0, function* () {
21
+ // const user = await KasperoProxy.validateSession(request);
22
+ return yield PushPubSubModule_1.PushPubSubModule.readNotification(body._id, body.read);
70
23
  });
71
- };
72
- return ServerApi_PushRead;
73
- }(backend_1.ServerApi));
24
+ }
25
+ }
74
26
  module.exports = new ServerApi_PushRead();
75
27
  //# sourceMappingURL=read.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"read.js","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/push/read.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mEAIiD;AAGjD,gEAA2D;AAC3D,sEAAmE;AAMnE;IACS,sCAAiC;IAEzC;eACC,kBAAM,yBAAU,CAAC,IAAI,EAAE,MAAM,CAAC;IAC/B,CAAC;IAEe,oCAAO,GAAvB,UAAwB,OAAuB,EAAE,QAAqB,EAAE,WAAe,EAAE,IAAsB;;;;4BAEvG,qBAAM,mCAAgB,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,CAAC,EAAA;;oBADnE,4DAA4D;oBAC5D,sBAAO,SAA4D,EAAC;;;;KACpE;IACF,yBAAC;AAAD,CAAC,AAXD,CACS,mBAAS,GAUjB;AAED,MAAM,CAAC,OAAO,GAAG,IAAI,kBAAkB,EAAE,CAAC"}
1
+ {"version":3,"file":"read.js","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/push/read.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,qEAIiD;AAGjD,kEAA2D;AAC3D,wEAAmE;AAMnE,MAAM,kBACL,SAAQ,mBAAiC;IAEzC;QACC,KAAK,CAAC,yBAAU,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAChC,CAAC;IAEe,OAAO,CAAC,OAAuB,EAAE,QAAqB,EAAE,WAAe,EAAE,IAAsB;;YAC9G,4DAA4D;YAC5D,OAAO,MAAM,mCAAgB,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;QACrE,CAAC;KAAA;CACD;AAED,MAAM,CAAC,OAAO,GAAG,IAAI,kBAAkB,EAAE,CAAC"}
@@ -1,17 +1,4 @@
1
1
  "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- extendStatics(d, b);
11
- function __() { this.constructor = d; }
12
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
13
- };
14
- })();
15
2
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
16
3
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
17
4
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -21,55 +8,20 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
21
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
22
9
  });
23
10
  };
24
- var __generator = (this && this.__generator) || function (thisArg, body) {
25
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
26
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
27
- function verb(n) { return function (v) { return step([n, v]); }; }
28
- function step(op) {
29
- if (f) throw new TypeError("Generator is already executing.");
30
- while (_) try {
31
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
32
- if (y = 0, t) op = [op[0] & 2, t.value];
33
- switch (op[0]) {
34
- case 0: case 1: t = op; break;
35
- case 4: _.label++; return { value: op[1], done: false };
36
- case 5: _.label++; y = op[1]; op = [0]; continue;
37
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
38
- default:
39
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
40
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
41
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
42
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
43
- if (t[2]) _.ops.pop();
44
- _.trys.pop(); continue;
45
- }
46
- op = body.call(thisArg, _);
47
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
48
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
49
- }
50
- };
51
11
  Object.defineProperty(exports, "__esModule", { value: true });
52
- var backend_1 = require("@intuitionrobotics/thunderstorm/backend");
53
- var thunderstorm_1 = require("@intuitionrobotics/thunderstorm");
54
- var PushPubSubModule_1 = require("../../../modules/PushPubSubModule");
55
- var ServerApi_PushRegister = /** @class */ (function (_super) {
56
- __extends(ServerApi_PushRegister, _super);
57
- function ServerApi_PushRegister() {
58
- return _super.call(this, thunderstorm_1.HttpMethod.POST, "register") || this;
12
+ const backend_1 = require("@intuitionrobotics/thunderstorm/backend");
13
+ const thunderstorm_1 = require("@intuitionrobotics/thunderstorm");
14
+ const PushPubSubModule_1 = require("../../../modules/PushPubSubModule");
15
+ class ServerApi_PushRegister extends backend_1.ServerApi {
16
+ constructor() {
17
+ super(thunderstorm_1.HttpMethod.POST, "register");
59
18
  }
60
- ServerApi_PushRegister.prototype.process = function (request, response, queryParams, body) {
61
- return __awaiter(this, void 0, void 0, function () {
62
- return __generator(this, function (_a) {
63
- switch (_a.label) {
64
- case 0: return [4 /*yield*/, PushPubSubModule_1.PushPubSubModule.register(body, request)];
65
- case 1:
66
- // const user = await KasperoProxy.validateSession(request);
67
- return [2 /*return*/, _a.sent()];
68
- }
69
- });
19
+ process(request, response, queryParams, body) {
20
+ return __awaiter(this, void 0, void 0, function* () {
21
+ // const user = await KasperoProxy.validateSession(request);
22
+ return yield PushPubSubModule_1.PushPubSubModule.register(body, request);
70
23
  });
71
- };
72
- return ServerApi_PushRegister;
73
- }(backend_1.ServerApi));
24
+ }
25
+ }
74
26
  module.exports = new ServerApi_PushRegister();
75
27
  //# sourceMappingURL=register.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"register.js","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/push/register.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mEAIiD;AAGjD,gEAA2D;AAC3D,sEAAmE;AAMnE;IACS,0CAA+B;IAEvC;eACC,kBAAM,yBAAU,CAAC,IAAI,EAAE,UAAU,CAAC;IACnC,CAAC;IAEe,wCAAO,GAAvB,UAAwB,OAAuB,EAAE,QAAqB,EAAE,WAAe,EAAE,IAA0B;;;;4BAE3G,qBAAM,mCAAgB,CAAC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,EAAA;;oBADrD,4DAA4D;oBAC5D,sBAAO,SAA8C,EAAC;;;;KACtD;IACF,6BAAC;AAAD,CAAC,AAXD,CACS,mBAAS,GAUjB;AAED,MAAM,CAAC,OAAO,GAAG,IAAI,sBAAsB,EAAE,CAAC"}
1
+ {"version":3,"file":"register.js","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/push/register.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,qEAIiD;AAGjD,kEAA2D;AAC3D,wEAAmE;AAMnE,MAAM,sBACL,SAAQ,mBAA+B;IAEvC;QACC,KAAK,CAAC,yBAAU,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;IACpC,CAAC;IAEe,OAAO,CAAC,OAAuB,EAAE,QAAqB,EAAE,WAAe,EAAE,IAA0B;;YAClH,4DAA4D;YAC5D,OAAO,MAAM,mCAAgB,CAAC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACvD,CAAC;KAAA;CACD;AAED,MAAM,CAAC,OAAO,GAAG,IAAI,sBAAsB,EAAE,CAAC"}
@@ -29,8 +29,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
29
29
  };
30
30
  Object.defineProperty(exports, "__esModule", { value: true });
31
31
  exports.Backend_ModulePack_PushPubSub = void 0;
32
- var PushPubSubModule_1 = require("../modules/PushPubSubModule");
33
- var ScheduledPushCleanup_1 = require("../modules/ScheduledPushCleanup");
32
+ const PushPubSubModule_1 = require("../modules/PushPubSubModule");
33
+ const ScheduledPushCleanup_1 = require("../modules/ScheduledPushCleanup");
34
34
  exports.Backend_ModulePack_PushPubSub = [
35
35
  PushPubSubModule_1.PushPubSubModule,
36
36
  ScheduledPushCleanup_1.ScheduledCleanup
@@ -1 +1 @@
1
- {"version":3,"file":"module-pack.js","sourceRoot":"","sources":["../../../src/main/app-backend/core/module-pack.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;;;;;;;;;;;AAEH,gEAA6D;AAC7D,wEAAiE;AAEpD,QAAA,6BAA6B,GAAG;IAC5C,mCAAgB;IAChB,uCAAgB;CAChB,CAAC;AAEF,8DAA2C;AAC3C,kEAA+C;AAC/C,qDAAkC"}
1
+ {"version":3,"file":"module-pack.js","sourceRoot":"","sources":["../../../src/main/app-backend/core/module-pack.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;;;;;;;;;;;AAEH,kEAA6D;AAC7D,0EAAiE;AAEpD,QAAA,6BAA6B,GAAG;IAC5C,mCAAgB;IAChB,uCAAgB;CAChB,CAAC;AAEF,8DAA2C;AAC3C,kEAA+C;AAC/C,qDAAkC"}
@@ -26,51 +26,20 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
26
26
  step((generator = generator.apply(thisArg, _arguments || [])).next());
27
27
  });
28
28
  };
29
- var __generator = (this && this.__generator) || function (thisArg, body) {
30
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
31
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
32
- function verb(n) { return function (v) { return step([n, v]); }; }
33
- function step(op) {
34
- if (f) throw new TypeError("Generator is already executing.");
35
- while (_) try {
36
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
37
- if (y = 0, t) op = [op[0] & 2, t.value];
38
- switch (op[0]) {
39
- case 0: case 1: t = op; break;
40
- case 4: _.label++; return { value: op[1], done: false };
41
- case 5: _.label++; y = op[1]; op = [0]; continue;
42
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
43
- default:
44
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
45
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
46
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
47
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
48
- if (t[2]) _.ops.pop();
49
- _.trys.pop(); continue;
50
- }
51
- op = body.call(thisArg, _);
52
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
53
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
54
- }
55
- };
56
29
  Object.defineProperty(exports, "__esModule", { value: true });
57
30
  exports.PushKey = void 0;
58
- var PushPubSubModule_1 = require("./PushPubSubModule");
59
- var PushKey = /** @class */ (function () {
60
- function PushKey(key, persist) {
61
- if (persist === void 0) { persist = false; }
31
+ const PushPubSubModule_1 = require("./PushPubSubModule");
32
+ class PushKey {
33
+ constructor(key, persist = false) {
62
34
  this.key = key;
63
35
  this.persist = persist;
64
36
  }
65
- PushKey.prototype.push = function (data, props) {
66
- return __awaiter(this, void 0, void 0, function () {
67
- return __generator(this, function (_a) {
68
- return [2 /*return*/, PushPubSubModule_1.PushPubSubModule.pushToKey(this.key, props, data, this.persist)];
69
- });
37
+ push(data, props) {
38
+ return __awaiter(this, void 0, void 0, function* () {
39
+ return PushPubSubModule_1.PushPubSubModule.pushToKey(this.key, props, data, this.persist);
70
40
  });
71
- };
41
+ }
72
42
  ;
73
- return PushKey;
74
- }());
43
+ }
75
44
  exports.PushKey = PushKey;
76
45
  //# sourceMappingURL=PushKey.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PushKey.js","sourceRoot":"","sources":["../../../src/main/app-backend/modules/PushKey.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGH,uDAAoD;AAGpD;IAKC,iBAAY,GAAM,EAAE,OAAe;QAAf,wBAAA,EAAA,eAAe;QAClC,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACxB,CAAC;IAEK,sBAAI,GAAV,UAAW,IAAO,EAAE,KAAS;;;gBAC5B,sBAAO,mCAAgB,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,EAAC;;;KACvE;IAAA,CAAC;IACH,cAAC;AAAD,CAAC,AAbD,IAaC;AAbY,0BAAO"}
1
+ {"version":3,"file":"PushKey.js","sourceRoot":"","sources":["../../../src/main/app-backend/modules/PushKey.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;;;;;;;;;;AAGH,yDAAoD;AAGpD,MAAa,OAAO;IAKnB,YAAY,GAAM,EAAE,OAAO,GAAG,KAAK;QAClC,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACxB,CAAC;IAEK,IAAI,CAAC,IAAO,EAAE,KAAS;;YAC5B,OAAO,mCAAgB,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QACxE,CAAC;KAAA;IAAA,CAAC;CACF;AAbD,0BAaC"}