@intuitionrobotics/push-pub-sub 2.2.3 → 2.3.2

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 +1 @@
1
- {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../src/main/app-backend/api/routes.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,MAAM,EAAC,MAAM,SAAS,CAAC;AAW/B,eAAO,MAAM,gBAAgB,EAAE,MAAiB,CAAC"}
1
+ {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../src/main/app-backend/api/routes.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,MAAM,EAAC,MAAM,SAAS,CAAC;AAa/B,eAAO,MAAM,gBAAgB,EAAE,MAAiB,CAAC"}
@@ -1,11 +1,11 @@
1
- // Auto-generated by thunderstorm-bootstrap-routes initial seed.
2
- // Hand-edit this from here. The tool runs ONCE; do not regenerate.
1
+ // Hand-wired handler(fn) routes for the push-pub-sub lib.
3
2
  import { Router } from "express";
4
- import read from "./v1/push/read.js";
5
- import register from "./v1/push/register.js";
3
+ import { handler } from "@intuitionrobotics/thunderstorm/backend";
4
+ import { read } from "./v1/push/read.js";
5
+ import { register } from "./v1/push/register.js";
6
6
  const push = Router();
7
- push.post("/read", read.handler);
8
- push.post("/register", register.handler);
7
+ push.post("/read", handler(read));
8
+ push.post("/register", handler(register));
9
9
  const v1 = Router();
10
10
  v1.use("/push", push);
11
11
  export const pushPubSubRoutes = Router();
@@ -1 +1 @@
1
- {"version":3,"file":"routes.js","sourceRoot":"","sources":["../../../src/main/app-backend/api/routes.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,mEAAmE;AAEnE,OAAO,EAAC,MAAM,EAAC,MAAM,SAAS,CAAC;AAE/B,OAAO,IAAI,MAAM,mBAAmB,CAAC;AACrC,OAAO,QAAQ,MAAM,uBAAuB,CAAC;AAC7C,MAAM,IAAI,GAAG,MAAM,EAAE,CAAC;AACtB,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;AACjC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;AAEzC,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC;AACpB,EAAE,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;AAEtB,MAAM,CAAC,MAAM,gBAAgB,GAAW,MAAM,EAAE,CAAC;AACjD,gBAAgB,CAAC,GAAG,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC"}
1
+ {"version":3,"file":"routes.js","sourceRoot":"","sources":["../../../src/main/app-backend/api/routes.ts"],"names":[],"mappings":"AAAA,0DAA0D;AAE1D,OAAO,EAAC,MAAM,EAAC,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAC,OAAO,EAAC,MAAM,yCAAyC,CAAC;AAEhE,OAAO,EAAC,IAAI,EAAC,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,QAAQ,EAAC,MAAM,uBAAuB,CAAC;AAE/C,MAAM,IAAI,GAAG,MAAM,EAAE,CAAC;AACtB,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;AAClC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;AAE1C,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC;AACpB,EAAE,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;AAEtB,MAAM,CAAC,MAAM,gBAAgB,GAAW,MAAM,EAAE,CAAC;AACjD,gBAAgB,CAAC,GAAG,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC"}
@@ -1,9 +1,4 @@
1
- import { ApiResponse, type ExpressRequest, ServerApi } from "@intuitionrobotics/thunderstorm/backend";
2
- import { type PubSubReadNotification, type Request_ReadPush } from "../../../../index.js";
3
- declare class ServerApi_PushRead extends ServerApi<PubSubReadNotification> {
4
- constructor();
5
- protected process(request: ExpressRequest, response: ApiResponse, queryParams: {}, body: Request_ReadPush): Promise<void>;
6
- }
7
- declare const _default: ServerApi_PushRead;
8
- export default _default;
1
+ import { type TypedHandler } from "@intuitionrobotics/thunderstorm/backend";
2
+ import { type PubSubReadNotification } from "../../../../index.js";
3
+ export declare const read: TypedHandler<PubSubReadNotification>;
9
4
  //# sourceMappingURL=read.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"read.d.ts","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/push/read.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,WAAW,EACX,KAAK,cAAc,EACnB,SAAS,EACT,MAAM,yCAAyC,CAAC;AAKjD,OAAO,EACN,KAAK,sBAAsB,EAC3B,KAAK,gBAAgB,EACrB,MAAM,sBAAsB,CAAC;AAE9B,cAAM,kBACL,SAAQ,SAAS,CAAC,sBAAsB,CAAC;;cAMzB,OAAO,CAAC,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAE,EAAE,EAAE,IAAI,EAAE,gBAAgB;CAI/G;;AAED,wBAAwC"}
1
+ {"version":3,"file":"read.d.ts","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/push/read.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,YAAY,EAAC,MAAM,yCAAyC,CAAC;AAE1E,OAAO,EAAC,KAAK,sBAAsB,EAAwB,MAAM,sBAAsB,CAAC;AACxF,eAAO,MAAM,IAAI,EAAE,YAAY,CAAC,sBAAsB,CAGrD,CAAC"}
@@ -1,15 +1,8 @@
1
- import { ApiResponse, ServerApi } from "@intuitionrobotics/thunderstorm/backend";
2
- import { HttpMethod } from "@intuitionrobotics/thunderstorm";
1
+ import {} from "@intuitionrobotics/thunderstorm/backend";
3
2
  import { PushPubSubModule } from "../../../modules/PushPubSubModule.js";
4
3
  import {} from "../../../../index.js";
5
- class ServerApi_PushRead extends ServerApi {
6
- constructor() {
7
- super(HttpMethod.POST);
8
- }
9
- async process(request, response, queryParams, body) {
10
- // const user = await KasperoProxy.validateSession(request);
11
- return await PushPubSubModule.readNotification(body._id, body.read);
12
- }
13
- }
14
- export default new ServerApi_PushRead();
4
+ export const read = async (req) => {
5
+ const body = req.body;
6
+ return await PushPubSubModule.readNotification(body._id, body.read);
7
+ };
15
8
  //# 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,OAAO,EACN,WAAW,EAEX,SAAS,EACT,MAAM,yCAAyC,CAAC;AAGjD,OAAO,EAAC,UAAU,EAAC,MAAM,iCAAiC,CAAC;AAC3D,OAAO,EAAC,gBAAgB,EAAC,MAAM,sCAAsC,CAAC;AACtE,OAAO,EAGN,MAAM,sBAAsB,CAAC;AAE9B,MAAM,kBACL,SAAQ,SAAiC;IAEzC;QACC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IACxB,CAAC;IAES,KAAK,CAAC,OAAO,CAAC,OAAuB,EAAE,QAAqB,EAAE,WAAe,EAAE,IAAsB;QAC9G,4DAA4D;QAC5D,OAAO,MAAM,gBAAgB,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IACrE,CAAC;CACD;AAED,eAAe,IAAI,kBAAkB,EAAE,CAAC"}
1
+ {"version":3,"file":"read.js","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/push/read.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,MAAM,yCAAyC,CAAC;AAC1E,OAAO,EAAC,gBAAgB,EAAC,MAAM,sCAAsC,CAAC;AACtE,OAAO,EAAoD,MAAM,sBAAsB,CAAC;AACxF,MAAM,CAAC,MAAM,IAAI,GAAyC,KAAK,EAAE,GAAG,EAAE,EAAE;IACpE,MAAM,IAAI,GAAG,GAAG,CAAC,IAAwB,CAAC;IAC1C,OAAO,MAAM,gBAAgB,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;AACxE,CAAC,CAAC"}
@@ -1,9 +1,4 @@
1
- import { ApiResponse, type ExpressRequest, ServerApi } from "@intuitionrobotics/thunderstorm/backend";
2
- import { type PubSubRegisterClient, type Request_PushRegister } from "../../../../index.js";
3
- declare class ServerApi_PushRegister extends ServerApi<PubSubRegisterClient> {
4
- constructor();
5
- protected process(request: ExpressRequest, response: ApiResponse, queryParams: {}, body: Request_PushRegister): Promise<import("../../../../index.js").DB_Notifications[]>;
6
- }
7
- declare const _default: ServerApi_PushRegister;
8
- export default _default;
1
+ import { type TypedHandler } from "@intuitionrobotics/thunderstorm/backend";
2
+ import { type PubSubRegisterClient } from "../../../../index.js";
3
+ export declare const register: TypedHandler<PubSubRegisterClient>;
9
4
  //# sourceMappingURL=register.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/push/register.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,WAAW,EACX,KAAK,cAAc,EACnB,SAAS,EACT,MAAM,yCAAyC,CAAC;AAKjD,OAAO,EACN,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,MAAM,sBAAsB,CAAC;AAE9B,cAAM,sBACL,SAAQ,SAAS,CAAC,oBAAoB,CAAC;;cAMvB,OAAO,CAAC,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAE,EAAE,EAAE,IAAI,EAAE,oBAAoB;CAInH;;AAED,wBAA4C"}
1
+ {"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/push/register.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,YAAY,EAAsB,MAAM,yCAAyC,CAAC;AAE/F,OAAO,EAAC,KAAK,oBAAoB,EAA4B,MAAM,sBAAsB,CAAC;AAC1F,eAAO,MAAM,QAAQ,EAAE,YAAY,CAAC,oBAAoB,CAIvD,CAAC"}
@@ -1,15 +1,9 @@
1
- import { ApiResponse, ServerApi } from "@intuitionrobotics/thunderstorm/backend";
2
- import { HttpMethod } from "@intuitionrobotics/thunderstorm";
1
+ import {} from "@intuitionrobotics/thunderstorm/backend";
3
2
  import { PushPubSubModule } from "../../../modules/PushPubSubModule.js";
4
3
  import {} from "../../../../index.js";
5
- class ServerApi_PushRegister extends ServerApi {
6
- constructor() {
7
- super(HttpMethod.POST);
8
- }
9
- async process(request, response, queryParams, body) {
10
- // const user = await KasperoProxy.validateSession(request);
11
- return await PushPubSubModule.register(body, request);
12
- }
13
- }
14
- export default new ServerApi_PushRegister();
4
+ export const register = async (req) => {
5
+ const request = req;
6
+ const body = req.body;
7
+ return await PushPubSubModule.register(body, request);
8
+ };
15
9
  //# 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,OAAO,EACN,WAAW,EAEX,SAAS,EACT,MAAM,yCAAyC,CAAC;AAGjD,OAAO,EAAC,UAAU,EAAC,MAAM,iCAAiC,CAAC;AAC3D,OAAO,EAAC,gBAAgB,EAAC,MAAM,sCAAsC,CAAC;AACtE,OAAO,EAGN,MAAM,sBAAsB,CAAC;AAE9B,MAAM,sBACL,SAAQ,SAA+B;IAEvC;QACC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IACxB,CAAC;IAES,KAAK,CAAC,OAAO,CAAC,OAAuB,EAAE,QAAqB,EAAE,WAAe,EAAE,IAA0B;QAClH,4DAA4D;QAC5D,OAAO,MAAM,gBAAgB,CAAC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACvD,CAAC;CACD;AAED,eAAe,IAAI,sBAAsB,EAAE,CAAC"}
1
+ {"version":3,"file":"register.js","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/push/register.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwC,MAAM,yCAAyC,CAAC;AAC/F,OAAO,EAAC,gBAAgB,EAAC,MAAM,sCAAsC,CAAC;AACtE,OAAO,EAAsD,MAAM,sBAAsB,CAAC;AAC1F,MAAM,CAAC,MAAM,QAAQ,GAAuC,KAAK,EAAE,GAAG,EAAE,EAAE;IACtE,MAAM,OAAO,GAAG,GAAqB,CAAC;IACtC,MAAM,IAAI,GAAG,GAAG,CAAC,IAA4B,CAAC;IAC9C,OAAO,MAAM,gBAAgB,CAAC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AAC1D,CAAC,CAAC"}