@intuitionrobotics/user-account 2.2.2 → 2.3.1
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/app-backend/api/routes.d.ts.map +1 -1
- package/dist/app-backend/api/routes.js +18 -16
- package/dist/app-backend/api/routes.js.map +1 -1
- package/dist/app-backend/api/v1/account/_assert.d.ts +3 -6
- package/dist/app-backend/api/v1/account/_assert.d.ts.map +1 -1
- package/dist/app-backend/api/v1/account/_assert.js +7 -10
- package/dist/app-backend/api/v1/account/_assert.js.map +1 -1
- package/dist/app-backend/api/v1/account/create.d.ts +3 -9
- package/dist/app-backend/api/v1/account/create.d.ts.map +1 -1
- package/dist/app-backend/api/v1/account/create.js +7 -14
- package/dist/app-backend/api/v1/account/create.js.map +1 -1
- package/dist/app-backend/api/v1/account/list.d.ts +3 -10
- package/dist/app-backend/api/v1/account/list.d.ts.map +1 -1
- package/dist/app-backend/api/v1/account/list.js +5 -12
- package/dist/app-backend/api/v1/account/list.js.map +1 -1
- package/dist/app-backend/api/v1/account/login-saml.d.ts +3 -11
- package/dist/app-backend/api/v1/account/login-saml.d.ts.map +1 -1
- package/dist/app-backend/api/v1/account/login-saml.js +6 -13
- package/dist/app-backend/api/v1/account/login-saml.js.map +1 -1
- package/dist/app-backend/api/v1/account/login.d.ts +3 -9
- package/dist/app-backend/api/v1/account/login.d.ts.map +1 -1
- package/dist/app-backend/api/v1/account/login.js +7 -13
- package/dist/app-backend/api/v1/account/login.js.map +1 -1
- package/dist/app-backend/api/v1/account/logout.d.ts +2 -8
- package/dist/app-backend/api/v1/account/logout.d.ts.map +1 -1
- package/dist/app-backend/api/v1/account/logout.js +8 -15
- package/dist/app-backend/api/v1/account/logout.js.map +1 -1
- package/dist/app-backend/api/v1/account/upsert.d.ts +8 -9
- package/dist/app-backend/api/v1/account/upsert.d.ts.map +1 -1
- package/dist/app-backend/api/v1/account/upsert.js +6 -15
- package/dist/app-backend/api/v1/account/upsert.js.map +1 -1
- package/dist/app-backend/api/v1/account/validate.d.ts +2 -11
- package/dist/app-backend/api/v1/account/validate.d.ts.map +1 -1
- package/dist/app-backend/api/v1/account/validate.js +8 -12
- package/dist/app-backend/api/v1/account/validate.js.map +1 -1
- package/dist/app-backend/apis/add-new-account.d.ts +3 -7
- package/dist/app-backend/apis/add-new-account.d.ts.map +1 -1
- package/dist/app-backend/apis/add-new-account.js +8 -13
- package/dist/app-backend/apis/add-new-account.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../src/main/app-backend/api/routes.ts"],"names":[],"mappings":"
|
|
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;AAyB/B,eAAO,MAAM,iBAAiB,EAAE,MAAiB,CAAC"}
|
|
@@ -1,21 +1,23 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Hand-edit this from here. The tool runs ONCE; do not regenerate.
|
|
1
|
+
// Hand-wired handler(fn) routes for the user-account lib.
|
|
3
2
|
import { Router } from "express";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
3
|
+
import { handler, RemoteProxy, useMiddleware } from "@intuitionrobotics/thunderstorm/backend";
|
|
4
|
+
import { create } from "./v1/account/create.js";
|
|
5
|
+
import { list } from "./v1/account/list.js";
|
|
6
|
+
import { loginSaml } from "./v1/account/login-saml.js";
|
|
7
|
+
import { login } from "./v1/account/login.js";
|
|
8
|
+
import { logout } from "./v1/account/logout.js";
|
|
9
|
+
import { upsert } from "./v1/account/upsert.js";
|
|
10
|
+
import { validate } from "./v1/account/validate.js";
|
|
11
11
|
const account = Router();
|
|
12
|
-
|
|
13
|
-
account.
|
|
14
|
-
account.get("/
|
|
15
|
-
account.
|
|
16
|
-
account.post("/
|
|
17
|
-
account.post("/
|
|
18
|
-
|
|
12
|
+
// create + login-saml carried dontPrintResponse() → {printResponse:false}.
|
|
13
|
+
account.post("/create", handler(create, { printResponse: false }));
|
|
14
|
+
account.get("/list", handler(list));
|
|
15
|
+
account.get("/login-saml", handler(loginSaml, { printResponse: false }));
|
|
16
|
+
account.post("/login", handler(login));
|
|
17
|
+
account.post("/logout", handler(logout));
|
|
18
|
+
// Gate preserved from the class's setMiddlewares(RemoteProxy.Middleware).
|
|
19
|
+
account.post("/upsert", useMiddleware(RemoteProxy.Middleware), handler(upsert));
|
|
20
|
+
account.get("/validate", handler(validate));
|
|
19
21
|
const v1 = Router();
|
|
20
22
|
v1.use("/account", account);
|
|
21
23
|
export const userAccountRoutes = Router();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes.js","sourceRoot":"","sources":["../../../src/main/app-backend/api/routes.ts"],"names":[],"mappings":"AAAA,
|
|
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,EAAE,WAAW,EAAE,aAAa,EAAC,MAAM,yCAAyC,CAAC;AAE5F,OAAO,EAAC,MAAM,EAAC,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAC,IAAI,EAAC,MAAM,sBAAsB,CAAC;AAC1C,OAAO,EAAC,SAAS,EAAC,MAAM,4BAA4B,CAAC;AACrD,OAAO,EAAC,KAAK,EAAC,MAAM,uBAAuB,CAAC;AAC5C,OAAO,EAAC,MAAM,EAAC,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAC,MAAM,EAAC,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAC,QAAQ,EAAC,MAAM,0BAA0B,CAAC;AAElD,MAAM,OAAO,GAAG,MAAM,EAAE,CAAC;AACzB,2EAA2E;AAC3E,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,MAAM,EAAE,EAAC,aAAa,EAAE,KAAK,EAAC,CAAC,CAAC,CAAC;AACjE,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;AACpC,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,OAAO,CAAC,SAAS,EAAE,EAAC,aAAa,EAAE,KAAK,EAAC,CAAC,CAAC,CAAC;AACvE,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;AACvC,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;AACzC,0EAA0E;AAC1E,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,aAAa,CAAC,WAAW,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;AAChF,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;AAE5C,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC;AACpB,EAAE,CAAC,GAAG,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;AAE5B,MAAM,CAAC,MAAM,iBAAiB,GAAW,MAAM,EAAE,CAAC;AAClD,iBAAiB,CAAC,GAAG,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC"}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { type AccountApi_AssertLoginSAML
|
|
3
|
-
export declare
|
|
4
|
-
constructor(pathPart?: string);
|
|
5
|
-
protected process(request: ExpressRequest, response: ApiResponse, queryParams: {}, body: PostAssertBody): Promise<void>;
|
|
6
|
-
}
|
|
1
|
+
import { type TypedHandler } from "@intuitionrobotics/thunderstorm/backend";
|
|
2
|
+
import { type AccountApi_AssertLoginSAML } from "./_imports.js";
|
|
3
|
+
export declare const Assert: TypedHandler<AccountApi_AssertLoginSAML>;
|
|
7
4
|
//# sourceMappingURL=_assert.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_assert.d.ts","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/account/_assert.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"_assert.d.ts","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/account/_assert.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,YAAY,EAAC,MAAM,yCAAyC,CAAC;AAC1E,OAAO,EAAC,KAAK,0BAA0B,EAAqC,MAAM,eAAe,CAAC;AAElG,eAAO,MAAM,MAAM,EAAE,YAAY,CAAC,0BAA0B,CAI3D,CAAC"}
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {} from "@intuitionrobotics/thunderstorm/backend";
|
|
2
2
|
import { AccountModule } from "./_imports.js";
|
|
3
|
-
import {
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
return await AccountModule.assertApi(body, response);
|
|
10
|
-
}
|
|
11
|
-
}
|
|
3
|
+
import { headerSink } from "@intuitionrobotics/thunderstorm/backend";
|
|
4
|
+
export const Assert = async (req, res) => {
|
|
5
|
+
const response = headerSink(res);
|
|
6
|
+
const body = req.body;
|
|
7
|
+
return await AccountModule.assertApi(body, response);
|
|
8
|
+
};
|
|
12
9
|
//# sourceMappingURL=_assert.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_assert.js","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/account/_assert.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"_assert.js","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/account/_assert.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,MAAM,yCAAyC,CAAC;AAC1E,OAAO,EAAkC,aAAa,EAAsB,MAAM,eAAe,CAAC;AAClG,OAAO,EAAC,UAAU,EAAC,MAAM,yCAAyC,CAAC;AACnE,MAAM,CAAC,MAAM,MAAM,GAA6C,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE;IAC/E,MAAM,QAAQ,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC;IACjC,MAAM,IAAI,GAAG,GAAG,CAAC,IAAsB,CAAC;IACxC,OAAO,MAAM,aAAa,CAAC,SAAS,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AACzD,CAAC,CAAC"}
|
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { type AccountApi_Create
|
|
3
|
-
|
|
4
|
-
declare class ServerApi_Account_Create extends ServerApi<AccountApi_Create> {
|
|
5
|
-
constructor();
|
|
6
|
-
protected process(request: ExpressRequest, response: ApiResponse, queryParams: {}, body: Request_CreateAccount): Promise<import("./_imports.js").Response_Auth>;
|
|
7
|
-
}
|
|
8
|
-
declare const _default: ServerApi_Account_Create;
|
|
9
|
-
export default _default;
|
|
1
|
+
import { type TypedHandler } from "@intuitionrobotics/thunderstorm/backend";
|
|
2
|
+
import { type AccountApi_Create } from "./_imports.js";
|
|
3
|
+
export declare const create: TypedHandler<AccountApi_Create>;
|
|
10
4
|
//# sourceMappingURL=create.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/account/create.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/account/create.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6B,KAAK,YAAY,EAAC,MAAM,yCAAyC,CAAC;AACtG,OAAO,EAAgB,KAAK,iBAAiB,EAA6B,MAAM,eAAe,CAAC;AAEhG,eAAO,MAAM,MAAM,EAAE,YAAY,CAAC,iBAAiB,CAKlD,CAAC"}
|
|
@@ -1,16 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { assertProperty, headerSink } from "@intuitionrobotics/thunderstorm/backend";
|
|
2
2
|
import { AccountModule } from "./_imports.js";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
async process(request, response, queryParams, body) {
|
|
11
|
-
this.assertProperty(body, ["password", "email"]);
|
|
12
|
-
return AccountModule.create(body, response);
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
export default new ServerApi_Account_Create();
|
|
3
|
+
export const create = async (req, res) => {
|
|
4
|
+
const body = req.body;
|
|
5
|
+
const response = headerSink(res);
|
|
6
|
+
assertProperty(body, ["password", "email"]);
|
|
7
|
+
return AccountModule.create(body, response);
|
|
8
|
+
};
|
|
16
9
|
//# sourceMappingURL=create.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/account/create.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/account/create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAE,UAAU,EAAoB,MAAM,yCAAyC,CAAC;AACtG,OAAO,EAAC,aAAa,EAAqD,MAAM,eAAe,CAAC;AAEhG,MAAM,CAAC,MAAM,MAAM,GAAoC,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE;IACtE,MAAM,IAAI,GAAG,GAAG,CAAC,IAA6B,CAAC;IAC/C,MAAM,QAAQ,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC;IACjC,cAAc,CAAC,IAAI,EAAE,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC,CAAC;IAC5C,OAAO,aAAa,CAAC,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AAChD,CAAC,CAAC"}
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { type AccountApi_ListAccounts
|
|
3
|
-
declare
|
|
4
|
-
constructor();
|
|
5
|
-
protected process(_request: ExpressRequest, _response: ApiResponse, _queryParams: {}, _body: void): Promise<{
|
|
6
|
-
accounts: UI_Account[];
|
|
7
|
-
}>;
|
|
8
|
-
}
|
|
9
|
-
declare const _default: ListAccounts;
|
|
10
|
-
export default _default;
|
|
1
|
+
import { type TypedHandler } from "@intuitionrobotics/thunderstorm/backend";
|
|
2
|
+
import { type AccountApi_ListAccounts } from "./_imports.js";
|
|
3
|
+
export declare const list: TypedHandler<AccountApi_ListAccounts>;
|
|
11
4
|
//# sourceMappingURL=list.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/account/list.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/account/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,YAAY,EAAC,MAAM,yCAAyC,CAAC;AAC1E,OAAO,EAAC,KAAK,uBAAuB,EAAiC,MAAM,eAAe,CAAC;AAC3F,eAAO,MAAM,IAAI,EAAE,YAAY,CAAC,uBAAuB,CAGtD,CAAC"}
|
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {} from "@intuitionrobotics/thunderstorm/backend";
|
|
2
2
|
import { AccountModule } from "./_imports.js";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
async process(_request, _response, _queryParams, _body) {
|
|
9
|
-
const accounts = await AccountModule.listUsers();
|
|
10
|
-
return { accounts };
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
export default new ListAccounts();
|
|
3
|
+
export const list = async (req) => {
|
|
4
|
+
const accounts = await AccountModule.listUsers();
|
|
5
|
+
return { accounts };
|
|
6
|
+
};
|
|
14
7
|
//# sourceMappingURL=list.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/account/list.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/account/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,MAAM,yCAAyC,CAAC;AAC1E,OAAO,EAA+B,aAAa,EAAkB,MAAM,eAAe,CAAC;AAC3F,MAAM,CAAC,MAAM,IAAI,GAA0C,KAAK,EAAE,GAAG,EAAE,EAAE;IACrE,MAAM,QAAQ,GAAiB,MAAM,aAAa,CAAC,SAAS,EAAE,CAAC;IAC/D,OAAO,EAAC,QAAQ,EAAC,CAAA;AACrB,CAAC,CAAC"}
|
|
@@ -1,12 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { type AccountApi_LoginSAML
|
|
3
|
-
|
|
4
|
-
declare class ServerApi_Account_LoginSAML extends ServerApi<AccountApi_LoginSAML> {
|
|
5
|
-
constructor();
|
|
6
|
-
protected process(request: ExpressRequest, response: ApiResponse, queryParams: RequestParams_LoginSAML, _body: void): Promise<{
|
|
7
|
-
loginUrl: string;
|
|
8
|
-
}>;
|
|
9
|
-
}
|
|
10
|
-
declare const _default: ServerApi_Account_LoginSAML;
|
|
11
|
-
export default _default;
|
|
1
|
+
import { type TypedHandler } from "@intuitionrobotics/thunderstorm/backend";
|
|
2
|
+
import { type AccountApi_LoginSAML } from "./_imports.js";
|
|
3
|
+
export declare const loginSaml: TypedHandler<AccountApi_LoginSAML>;
|
|
12
4
|
//# sourceMappingURL=login-saml.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"login-saml.d.ts","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/account/login-saml.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"login-saml.d.ts","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/account/login-saml.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,YAAY,EAAC,MAAM,yCAAyC,CAAC;AAC1E,OAAO,EAAC,KAAK,oBAAoB,EAA2C,MAAM,eAAe,CAAC;AAClG,eAAO,MAAM,SAAS,EAAE,YAAY,CAAC,oBAAoB,CAIxD,CAAC"}
|
|
@@ -1,15 +1,8 @@
|
|
|
1
|
-
import { ApiResponse, HttpMethod, ServerApi } from "@intuitionrobotics/thunderstorm/backend";
|
|
2
|
-
import { SamlModule } from "./_imports.js";
|
|
3
1
|
import {} from "@intuitionrobotics/thunderstorm/backend";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
const loginUrl = await SamlModule.loginRequest(queryParams);
|
|
11
|
-
return { loginUrl };
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
export default new ServerApi_Account_LoginSAML();
|
|
2
|
+
import { SamlModule } from "./_imports.js";
|
|
3
|
+
export const loginSaml = async (req) => {
|
|
4
|
+
const queryParams = req.query;
|
|
5
|
+
const loginUrl = await SamlModule.loginRequest(queryParams);
|
|
6
|
+
return { loginUrl };
|
|
7
|
+
};
|
|
15
8
|
//# sourceMappingURL=login-saml.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"login-saml.js","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/account/login-saml.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"login-saml.js","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/account/login-saml.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,MAAM,yCAAyC,CAAC;AAC1E,OAAO,EAA0D,UAAU,EAAC,MAAM,eAAe,CAAC;AAClG,MAAM,CAAC,MAAM,SAAS,GAAuC,KAAK,EAAE,GAAG,EAAE,EAAE;IACvE,MAAM,WAAW,GAAG,GAAG,CAAC,KAAgC,CAAC;IACzD,MAAM,QAAQ,GAAG,MAAM,UAAU,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC;IAC5D,OAAO,EAAC,QAAQ,EAAC,CAAA;AACrB,CAAC,CAAC"}
|
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { type AccountApi_Login
|
|
3
|
-
|
|
4
|
-
declare class ServerApi_Account_Login extends ServerApi<AccountApi_Login> {
|
|
5
|
-
constructor();
|
|
6
|
-
protected process(request: ExpressRequest, response: ApiResponse, queryParams: {}, body: Request_LoginAccount): Promise<import("./_imports.js").Response_Auth>;
|
|
7
|
-
}
|
|
8
|
-
declare const _default: ServerApi_Account_Login;
|
|
9
|
-
export default _default;
|
|
1
|
+
import { type TypedHandler } from "@intuitionrobotics/thunderstorm/backend";
|
|
2
|
+
import { type AccountApi_Login } from "./_imports.js";
|
|
3
|
+
export declare const login: TypedHandler<AccountApi_Login>;
|
|
10
4
|
//# sourceMappingURL=login.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/account/login.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/account/login.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6B,KAAK,YAAY,EAAC,MAAM,yCAAyC,CAAC;AACtG,OAAO,EAAgB,KAAK,gBAAgB,EAA4B,MAAM,eAAe,CAAC;AAE9F,eAAO,MAAM,KAAK,EAAE,YAAY,CAAC,gBAAgB,CAKhD,CAAC"}
|
|
@@ -1,15 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { assertProperty, headerSink } from "@intuitionrobotics/thunderstorm/backend";
|
|
2
2
|
import { AccountModule } from "./_imports.js";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
async process(request, response, queryParams, body) {
|
|
10
|
-
this.assertProperty(body, ["email", "password"]);
|
|
11
|
-
return AccountModule.login(body, response);
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
export default new ServerApi_Account_Login();
|
|
3
|
+
export const login = async (req, res) => {
|
|
4
|
+
const body = req.body;
|
|
5
|
+
const response = headerSink(res);
|
|
6
|
+
assertProperty(body, ["email", "password"]);
|
|
7
|
+
return AccountModule.login(body, response);
|
|
8
|
+
};
|
|
15
9
|
//# sourceMappingURL=login.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"login.js","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/account/login.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"login.js","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/account/login.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAE,UAAU,EAAoB,MAAM,yCAAyC,CAAC;AACtG,OAAO,EAAC,aAAa,EAAmD,MAAM,eAAe,CAAC;AAE9F,MAAM,CAAC,MAAM,KAAK,GAAmC,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE;IACpE,MAAM,IAAI,GAAG,GAAG,CAAC,IAA4B,CAAC;IAC9C,MAAM,QAAQ,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC;IACjC,cAAc,CAAC,IAAI,EAAE,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC;IAC5C,OAAO,aAAa,CAAC,KAAK,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AAC/C,CAAC,CAAC"}
|
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { type TypedHandler } from "@intuitionrobotics/thunderstorm/backend";
|
|
2
2
|
import { type AccountApi_Logout } from "./_imports.js";
|
|
3
|
-
|
|
4
|
-
declare class ServerApi_Account_Logout extends ServerApi<AccountApi_Logout> {
|
|
5
|
-
constructor();
|
|
6
|
-
protected process(request: ExpressRequest, _response: ApiResponse, _queryParams: {}, _body: {}): Promise<void>;
|
|
7
|
-
}
|
|
8
|
-
declare const _default: ServerApi_Account_Logout;
|
|
9
|
-
export default _default;
|
|
3
|
+
export declare const logout: TypedHandler<AccountApi_Logout>;
|
|
10
4
|
//# sourceMappingURL=logout.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logout.d.ts","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/account/logout.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"logout.d.ts","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/account/logout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,YAAY,EAAsB,MAAM,yCAAyC,CAAC;AAC7G,OAAO,EAAgB,KAAK,iBAAiB,EAAmB,MAAM,eAAe,CAAC;AACtF,eAAO,MAAM,MAAM,EAAE,YAAY,CAAC,iBAAiB,CAMlD,CAAC"}
|
|
@@ -1,17 +1,10 @@
|
|
|
1
|
-
import { ApiException
|
|
1
|
+
import { ApiException } from "@intuitionrobotics/thunderstorm/backend";
|
|
2
2
|
import { AccountModule, Header_SessionId } from "./_imports.js";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const sessionId = Header_SessionId.get(request);
|
|
11
|
-
if (!sessionId)
|
|
12
|
-
throw new ApiException(404, 'Missing sessionId');
|
|
13
|
-
return AccountModule.logout(sessionId);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
export default new ServerApi_Account_Logout();
|
|
3
|
+
export const logout = async (req) => {
|
|
4
|
+
const request = req;
|
|
5
|
+
const sessionId = Header_SessionId.get(request);
|
|
6
|
+
if (!sessionId)
|
|
7
|
+
throw new ApiException(404, 'Missing sessionId');
|
|
8
|
+
return AccountModule.logout(sessionId);
|
|
9
|
+
};
|
|
17
10
|
//# sourceMappingURL=logout.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logout.js","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/account/logout.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"logout.js","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/account/logout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAyC,MAAM,yCAAyC,CAAC;AAC7G,OAAO,EAAC,aAAa,EAA0B,gBAAgB,EAAC,MAAM,eAAe,CAAC;AACtF,MAAM,CAAC,MAAM,MAAM,GAAoC,KAAK,EAAE,GAAG,EAAE,EAAE;IACjE,MAAM,OAAO,GAAG,GAAqB,CAAC;IACtC,MAAM,SAAS,GAAG,gBAAgB,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAChD,IAAI,CAAC,SAAS;QACf,MAAM,IAAI,YAAY,CAAC,GAAG,EAAE,mBAAmB,CAAC,CAAC;IAChD,OAAO,aAAa,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;AAC3C,CAAC,CAAC"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { type AccountApi_Upsert
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
declare const
|
|
9
|
-
export default _default;
|
|
1
|
+
import { type TypedHandler } from "@intuitionrobotics/thunderstorm/backend";
|
|
2
|
+
import { type AccountApi_Upsert } from "./_imports.js";
|
|
3
|
+
export declare const upsertValidator: {
|
|
4
|
+
password: import("@intuitionrobotics/ts-common").Validator<any>;
|
|
5
|
+
email: import("@intuitionrobotics/ts-common").Validator<any>;
|
|
6
|
+
password_check: undefined;
|
|
7
|
+
};
|
|
8
|
+
export declare const upsert: TypedHandler<AccountApi_Upsert>;
|
|
10
9
|
//# sourceMappingURL=upsert.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upsert.d.ts","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/account/upsert.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"upsert.d.ts","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/account/upsert.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,YAAY,EAAC,MAAM,yCAAyC,CAAC;AAC1E,OAAO,EAAgB,KAAK,iBAAiB,EAA6B,MAAM,eAAe,CAAC;AAEhG,eAAO,MAAM,eAAe;;;;CAAmF,CAAC;AAEhH,eAAO,MAAM,MAAM,EAAE,YAAY,CAAC,iBAAiB,CAGlD,CAAC"}
|
|
@@ -1,18 +1,9 @@
|
|
|
1
|
-
import { ApiResponse, RemoteProxy, ServerApi } from "@intuitionrobotics/thunderstorm/backend";
|
|
2
|
-
import { AccountModule } from "./_imports.js";
|
|
3
|
-
import { HttpMethod } from "@intuitionrobotics/thunderstorm";
|
|
4
1
|
import {} from "@intuitionrobotics/thunderstorm/backend";
|
|
2
|
+
import { AccountModule } from "./_imports.js";
|
|
5
3
|
import { validateExists } from "@intuitionrobotics/ts-common";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
this.dontPrintResponse();
|
|
12
|
-
}
|
|
13
|
-
async process(request, response, queryParams, body) {
|
|
14
|
-
return AccountModule.upsert(body);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
export default new ServerApi_Account_Upsert();
|
|
4
|
+
export const upsertValidator = { password: validateExists(), email: validateExists(), password_check: undefined };
|
|
5
|
+
export const upsert = async (req) => {
|
|
6
|
+
const body = req.body;
|
|
7
|
+
return AccountModule.upsert(body);
|
|
8
|
+
};
|
|
18
9
|
//# sourceMappingURL=upsert.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upsert.js","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/account/upsert.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"upsert.js","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/account/upsert.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,MAAM,yCAAyC,CAAC;AAC1E,OAAO,EAAC,aAAa,EAAqD,MAAM,eAAe,CAAC;AAChG,OAAO,EAAC,cAAc,EAAC,MAAM,8BAA8B,CAAC;AAC5D,MAAM,CAAC,MAAM,eAAe,GAAG,EAAC,QAAQ,EAAE,cAAc,EAAE,EAAE,KAAK,EAAE,cAAc,EAAE,EAAE,cAAc,EAAE,SAAS,EAAC,CAAC;AAEhH,MAAM,CAAC,MAAM,MAAM,GAAoC,KAAK,EAAE,GAAG,EAAE,EAAE;IACjE,MAAM,IAAI,GAAG,GAAG,CAAC,IAA6B,CAAC;IAC/C,OAAO,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AACtC,CAAC,CAAC"}
|
|
@@ -1,13 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { type TypedHandler } from "@intuitionrobotics/thunderstorm/backend";
|
|
2
2
|
import { type AccountApi_ValidateSession } from "./_imports.js";
|
|
3
|
-
declare
|
|
4
|
-
constructor();
|
|
5
|
-
protected process(request: ExpressRequest, response: ApiResponse, _queryParams: {}, _body: void): Promise<{
|
|
6
|
-
email: string;
|
|
7
|
-
_id: string;
|
|
8
|
-
createdTimestamp: number | undefined;
|
|
9
|
-
}>;
|
|
10
|
-
}
|
|
11
|
-
declare const _default: ValidateToken;
|
|
12
|
-
export default _default;
|
|
3
|
+
export declare const validate: TypedHandler<AccountApi_ValidateSession>;
|
|
13
4
|
//# sourceMappingURL=validate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/account/validate.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/account/validate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,YAAY,EAAsB,MAAM,yCAAyC,CAAC;AAC/F,OAAO,EAAC,KAAK,0BAA0B,EAAgB,MAAM,eAAe,CAAC;AAE7E,eAAO,MAAM,QAAQ,EAAE,YAAY,CAAC,0BAA0B,CAK7D,CAAC"}
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { HttpMethod } from "@intuitionrobotics/thunderstorm";
|
|
1
|
+
import {} from "@intuitionrobotics/thunderstorm/backend";
|
|
3
2
|
import { AccountModule } from "./_imports.js";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
export default new ValidateToken();
|
|
3
|
+
import { headerSink } from "@intuitionrobotics/thunderstorm/backend";
|
|
4
|
+
export const validate = async (req, res) => {
|
|
5
|
+
const request = req;
|
|
6
|
+
const response = headerSink(res);
|
|
7
|
+
const { email, _id, createdTimestamp } = await AccountModule.validateSession(request, [], response);
|
|
8
|
+
return { email, _id, createdTimestamp };
|
|
9
|
+
};
|
|
14
10
|
//# sourceMappingURL=validate.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate.js","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/account/validate.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"validate.js","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/account/validate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwC,MAAM,yCAAyC,CAAC;AAC/F,OAAO,EAAkC,aAAa,EAAC,MAAM,eAAe,CAAC;AAC7E,OAAO,EAAC,UAAU,EAAC,MAAM,yCAAyC,CAAC;AACnE,MAAM,CAAC,MAAM,QAAQ,GAA6C,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE;IACjF,MAAM,OAAO,GAAG,GAAqB,CAAC;IACtC,MAAM,QAAQ,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC;IACjC,MAAM,EAAC,KAAK,EAAE,GAAG,EAAE,gBAAgB,EAAC,GAAG,MAAM,aAAa,CAAC,eAAe,CAAC,OAAO,EAAE,EAAE,EAAE,QAAQ,CAAC,CAAC;IAClG,OAAO,EAAC,KAAK,EAAE,GAAG,EAAE,gBAAgB,EAAC,CAAC;AAC1C,CAAC,CAAC"}
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { type
|
|
3
|
-
|
|
4
|
-
export declare class ServerApi_Account_AddNewAccount extends ServerApi<AccountApi_AddNewAccount> {
|
|
5
|
-
constructor();
|
|
6
|
-
protected process(request: ExpressRequest, response: ApiResponse, queryParams: {}, body: Request_AddNewAccount): Promise<import("../../shared/api.js").UI_Account>;
|
|
7
|
-
}
|
|
1
|
+
import { type TypedHandler } from "@intuitionrobotics/thunderstorm/backend";
|
|
2
|
+
import { type AccountApi_AddNewAccount } from "../api/v1/account/_imports.js";
|
|
3
|
+
export declare const addNewAccount: TypedHandler<AccountApi_AddNewAccount>;
|
|
8
4
|
//# sourceMappingURL=add-new-account.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-new-account.d.ts","sourceRoot":"","sources":["../../../src/main/app-backend/apis/add-new-account.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"add-new-account.d.ts","sourceRoot":"","sources":["../../../src/main/app-backend/apis/add-new-account.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,YAAY,EAAC,MAAM,yCAAyC,CAAC;AAC1F,OAAO,EAGH,KAAK,wBAAwB,EAChC,MAAM,+BAA+B,CAAC;AAIvC,eAAO,MAAM,aAAa,EAAE,YAAY,CAAC,wBAAwB,CAIhE,CAAC"}
|
|
@@ -1,15 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { assertProperty } from "@intuitionrobotics/thunderstorm/backend";
|
|
2
2
|
import { AccountModule } from "../api/v1/account/_imports.js";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
async process(request, response, queryParams, body) {
|
|
11
|
-
this.assertProperty(body, ["email"]);
|
|
12
|
-
return AccountModule.addNewAccount(body.email, body.password, body.password_check);
|
|
13
|
-
}
|
|
14
|
-
}
|
|
3
|
+
// Was ServerApi_Account_AddNewAccount (dontPrintResponse) — mount with
|
|
4
|
+
// handler(addNewAccount, {printResponse: false}).
|
|
5
|
+
export const addNewAccount = async (req) => {
|
|
6
|
+
const body = req.body;
|
|
7
|
+
assertProperty(body, ["email"]);
|
|
8
|
+
return AccountModule.addNewAccount(body.email, body.password, body.password_check);
|
|
9
|
+
};
|
|
15
10
|
//# sourceMappingURL=add-new-account.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-new-account.js","sourceRoot":"","sources":["../../../src/main/app-backend/apis/add-new-account.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"add-new-account.js","sourceRoot":"","sources":["../../../src/main/app-backend/apis/add-new-account.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAoB,MAAM,yCAAyC,CAAC;AAC1F,OAAO,EACH,aAAa,EAGhB,MAAM,+BAA+B,CAAC;AAEvC,uEAAuE;AACvE,kDAAkD;AAClD,MAAM,CAAC,MAAM,aAAa,GAA2C,KAAK,EAAE,GAAG,EAAE,EAAE;IAC/E,MAAM,IAAI,GAAG,GAAG,CAAC,IAA6B,CAAC;IAC/C,cAAc,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IAChC,OAAO,aAAa,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;AACvF,CAAC,CAAC"}
|