@intuitionrobotics/user-account 0.45.3 → 0.46.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.
Files changed (74) hide show
  1. package/app-backend/api/_user-account.js +2 -20
  2. package/app-backend/api/_user-account.js.map +1 -1
  3. package/app-backend/api/v1/account/_assert.d.ts +3 -2
  4. package/app-backend/api/v1/account/_assert.js +6 -24
  5. package/app-backend/api/v1/account/_assert.js.map +1 -1
  6. package/app-backend/api/v1/account/create.js +6 -24
  7. package/app-backend/api/v1/account/create.js.map +1 -1
  8. package/app-backend/api/v1/account/list.js +6 -24
  9. package/app-backend/api/v1/account/list.js.map +1 -1
  10. package/app-backend/api/v1/account/login-saml.js +4 -22
  11. package/app-backend/api/v1/account/login-saml.js.map +1 -1
  12. package/app-backend/api/v1/account/login.js +12 -24
  13. package/app-backend/api/v1/account/login.js.map +1 -1
  14. package/app-backend/api/v1/account/logout.js +9 -26
  15. package/app-backend/api/v1/account/logout.js.map +1 -1
  16. package/app-backend/api/v1/account/upsert.js +10 -9
  17. package/app-backend/api/v1/account/upsert.js.map +1 -1
  18. package/app-backend/api/v1/account/validate.js +6 -24
  19. package/app-backend/api/v1/account/validate.js.map +1 -1
  20. package/app-backend/apis/add-new-account.d.ts +3 -3
  21. package/app-backend/apis/add-new-account.js +12 -24
  22. package/app-backend/apis/add-new-account.js.map +1 -1
  23. package/app-backend/core/module-pack.d.ts +0 -2
  24. package/app-backend/core/module-pack.js +0 -30
  25. package/app-backend/core/module-pack.js.map +1 -1
  26. package/app-backend/modules/AccountModule.d.ts +10 -7
  27. package/app-backend/modules/AccountModule.js +55 -79
  28. package/app-backend/modules/AccountModule.js.map +1 -1
  29. package/app-backend/modules/JWTBuilder.d.ts +1 -1
  30. package/app-backend/modules/JWTBuilder.js +6 -5
  31. package/app-backend/modules/JWTBuilder.js.map +1 -1
  32. package/app-backend/modules/SamlModule.d.ts +3 -2
  33. package/app-backend/modules/SamlModule.js +7 -23
  34. package/app-backend/modules/SamlModule.js.map +1 -1
  35. package/app-backend/modules/SecretsModule.d.ts +4 -2
  36. package/app-backend/modules/SecretsModule.js +30 -27
  37. package/app-backend/modules/SecretsModule.js.map +1 -1
  38. package/app-backend/modules/{_imports.d.ts → types.d.ts} +1 -2
  39. package/app-backend/modules/types.js +3 -0
  40. package/app-backend/modules/types.js.map +1 -0
  41. package/app-frontend/core/module-pack.d.ts +0 -1
  42. package/app-frontend/core/module-pack.js +0 -29
  43. package/app-frontend/core/module-pack.js.map +1 -1
  44. package/app-frontend/modules/AccountModule.d.ts +3 -2
  45. package/app-frontend/modules/AccountModule.js +38 -50
  46. package/app-frontend/modules/AccountModule.js.map +1 -1
  47. package/index.d.ts +0 -2
  48. package/index.js +0 -31
  49. package/index.js.map +1 -1
  50. package/package.json +5 -6
  51. package/shared/api.d.ts +1 -1
  52. package/shared/api.js +0 -18
  53. package/shared/api.js.map +1 -1
  54. package/shared/utils/AuthenticationConsts.js.map +1 -1
  55. package/app-backend/api/v1/account/_imports.d.ts +0 -4
  56. package/app-backend/api/v1/account/_imports.js +0 -36
  57. package/app-backend/api/v1/account/_imports.js.map +0 -1
  58. package/app-backend/modules/_imports.js +0 -32
  59. package/app-backend/modules/_imports.js.map +0 -1
  60. package/app-frontend/ui/Component_Login.d.ts +0 -21
  61. package/app-frontend/ui/Component_Login.js +0 -86
  62. package/app-frontend/ui/Component_Login.js.map +0 -1
  63. package/app-frontend/ui/Component_Register.d.ts +0 -17
  64. package/app-frontend/ui/Component_Register.js +0 -92
  65. package/app-frontend/ui/Component_Register.js.map +0 -1
  66. package/backend.d.ts +0 -2
  67. package/backend.js +0 -33
  68. package/backend.js.map +0 -1
  69. package/frontend.d.ts +0 -3
  70. package/frontend.js +0 -34
  71. package/frontend.js.map +0 -1
  72. package/shared/types.d.ts +0 -0
  73. package/shared/types.js +0 -20
  74. package/shared/types.js.map +0 -1
@@ -1,23 +1,5 @@
1
1
  "use strict";
2
- /*
3
- * Permissions management system, define access level for each of
4
- * your server apis, and restrict users by giving them access levels
5
- *
6
- * Copyright (C) 2020 Intuition Robotics
7
- *
8
- * Licensed under the Apache License, Version 2.0 (the "License");
9
- * you may not use this file except in compliance with the License.
10
- * You may obtain a copy of the License at
11
- *
12
- * http://www.apache.org/licenses/LICENSE-2.0
13
- *
14
- * Unless required by applicable law or agreed to in writing, software
15
- * distributed under the License is distributed on an "AS IS" BASIS,
16
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
- * See the License for the specific language governing permissions and
18
- * limitations under the License.
19
- */
20
2
  Object.defineProperty(exports, "__esModule", { value: true });
21
- const backend_1 = require("@intuitionrobotics/thunderstorm/backend");
22
- module.exports = new backend_1.RouteResolver(require, __dirname);
3
+ const HttpServer_1 = require("@intuitionrobotics/thunderstorm/app-backend/modules/server/HttpServer");
4
+ module.exports = new HttpServer_1.RouteResolver(require, __dirname);
23
5
  //# sourceMappingURL=_user-account.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"_user-account.js","sourceRoot":"","sources":["../../../src/main/app-backend/api/_user-account.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;AAEH,qEAAsE;AAEtE,MAAM,CAAC,OAAO,GAAG,IAAI,uBAAa,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC"}
1
+ {"version":3,"file":"_user-account.js","sourceRoot":"","sources":["../../../src/main/app-backend/api/_user-account.ts"],"names":[],"mappings":";;AACA,sGAAoG;AAEpG,MAAM,CAAC,OAAO,GAAG,IAAI,0BAAa,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC"}
@@ -1,5 +1,6 @@
1
- import { ApiResponse, ExpressRequest, ServerApi } from "@intuitionrobotics/thunderstorm/backend";
2
- import { AccountApi_AssertLoginSAML, PostAssertBody } from "./_imports";
1
+ import { AccountApi_AssertLoginSAML, PostAssertBody } from "../../../../shared/api";
2
+ import { ApiResponse, ServerApi } from "@intuitionrobotics/thunderstorm/app-backend/modules/server/server-api";
3
+ import { ExpressRequest } from "@intuitionrobotics/thunderstorm/app-backend/utils/types";
3
4
  export declare class AssertSamlToken extends ServerApi<AccountApi_AssertLoginSAML> {
4
5
  constructor(pathPart?: string);
5
6
  protected process(request: ExpressRequest, response: ApiResponse, queryParams: {}, body: PostAssertBody): Promise<void>;
@@ -1,22 +1,4 @@
1
1
  "use strict";
2
- /*
3
- * Permissions management system, define access level for each of
4
- * your server apis, and restrict users by giving them access levels
5
- *
6
- * Copyright (C) 2020 Intuition Robotics
7
- *
8
- * Licensed under the Apache License, Version 2.0 (the "License");
9
- * you may not use this file except in compliance with the License.
10
- * You may obtain a copy of the License at
11
- *
12
- * http://www.apache.org/licenses/LICENSE-2.0
13
- *
14
- * Unless required by applicable law or agreed to in writing, software
15
- * distributed under the License is distributed on an "AS IS" BASIS,
16
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
- * See the License for the specific language governing permissions and
18
- * limitations under the License.
19
- */
20
2
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
21
3
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
22
4
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -28,16 +10,16 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
28
10
  };
29
11
  Object.defineProperty(exports, "__esModule", { value: true });
30
12
  exports.AssertSamlToken = void 0;
31
- const backend_1 = require("@intuitionrobotics/thunderstorm/backend");
32
- const _imports_1 = require("./_imports");
33
- const thunderstorm_1 = require("@intuitionrobotics/thunderstorm");
34
- class AssertSamlToken extends backend_1.ServerApi {
13
+ const server_api_1 = require("@intuitionrobotics/thunderstorm/app-backend/modules/server/server-api");
14
+ const types_1 = require("@intuitionrobotics/thunderstorm/shared/types");
15
+ const AccountModule_1 = require("../../../modules/AccountModule");
16
+ class AssertSamlToken extends server_api_1.ServerApi {
35
17
  constructor(pathPart = "assert") {
36
- super(thunderstorm_1.HttpMethod.POST, pathPart);
18
+ super(types_1.HttpMethod.POST, pathPart);
37
19
  }
38
20
  process(request, response, queryParams, body) {
39
21
  return __awaiter(this, void 0, void 0, function* () {
40
- return yield _imports_1.AccountModule.assertApi(body, response);
22
+ return yield AccountModule_1.AccountModule.assertApi(body, response);
41
23
  });
42
24
  }
43
25
  }
@@ -1 +1 @@
1
- {"version":3,"file":"_assert.js","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/account/_assert.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;;;;;;;;;;AAEH,qEAIiD;AACjD,yCAIoB;AACpB,kEAA2D;AAG3D,MAAa,eACZ,SAAQ,mBAAqC;IAE7C,YAAY,WAAmB,QAAQ;QACtC,KAAK,CAAC,yBAAU,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAClC,CAAC;IAEe,OAAO,CAAC,OAAuB,EAAE,QAAqB,EAAE,WAAe,EAAE,IAAoB;;YAC5G,OAAO,MAAM,wBAAa,CAAC,SAAS,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;QACtD,CAAC;KAAA;CACD;AAVD,0CAUC"}
1
+ {"version":3,"file":"_assert.js","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/account/_assert.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,sGAA6G;AAE7G,wEAAwE;AACxE,kEAA6D;AAE7D,MAAa,eACT,SAAQ,sBAAqC;IAE7C,YAAY,WAAmB,QAAQ;QACnC,KAAK,CAAC,kBAAU,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IACrC,CAAC;IAEe,OAAO,CAAC,OAAuB,EAAE,QAAqB,EAAE,WAAe,EAAE,IAAoB;;YACzG,OAAO,MAAM,6BAAa,CAAC,SAAS,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;QACzD,CAAC;KAAA;CACJ;AAVD,0CAUC"}
@@ -1,22 +1,4 @@
1
1
  "use strict";
2
- /*
3
- * Permissions management system, define access level for each of
4
- * your server apis, and restrict users by giving them access levels
5
- *
6
- * Copyright (C) 2020 Intuition Robotics
7
- *
8
- * Licensed under the Apache License, Version 2.0 (the "License");
9
- * you may not use this file except in compliance with the License.
10
- * You may obtain a copy of the License at
11
- *
12
- * http://www.apache.org/licenses/LICENSE-2.0
13
- *
14
- * Unless required by applicable law or agreed to in writing, software
15
- * distributed under the License is distributed on an "AS IS" BASIS,
16
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
- * See the License for the specific language governing permissions and
18
- * limitations under the License.
19
- */
20
2
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
21
3
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
22
4
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -27,18 +9,18 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
27
9
  });
28
10
  };
29
11
  Object.defineProperty(exports, "__esModule", { value: true });
30
- const backend_1 = require("@intuitionrobotics/thunderstorm/backend");
31
- const _imports_1 = require("./_imports");
32
- const thunderstorm_1 = require("@intuitionrobotics/thunderstorm");
33
- class ServerApi_Account_Create extends backend_1.ServerApi {
12
+ const server_api_1 = require("@intuitionrobotics/thunderstorm/app-backend/modules/server/server-api");
13
+ const types_1 = require("@intuitionrobotics/thunderstorm/shared/types");
14
+ const AccountModule_1 = require("../../../modules/AccountModule");
15
+ class ServerApi_Account_Create extends server_api_1.ServerApi {
34
16
  constructor() {
35
- super(thunderstorm_1.HttpMethod.POST, "create");
17
+ super(types_1.HttpMethod.POST, "create");
36
18
  this.dontPrintResponse();
37
19
  }
38
20
  process(request, response, queryParams, body) {
39
21
  return __awaiter(this, void 0, void 0, function* () {
40
22
  this.assertProperty(body, ["password", "email"]);
41
- return _imports_1.AccountModule.create(body, response);
23
+ return AccountModule_1.AccountModule.create(body, response);
42
24
  });
43
25
  }
44
26
  }
@@ -1 +1 @@
1
- {"version":3,"file":"create.js","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/account/create.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;;;;;;;;;AAEH,qEAGiD;AAGjD,yCAIoB;AACpB,kEAA2D;AAG3D,MAAM,wBACL,SAAQ,mBAA4B;IAEpC;QACC,KAAK,CAAC,yBAAU,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;QACjC,IAAI,CAAC,iBAAiB,EAAE,CAAC;IAC1B,CAAC;IAEe,OAAO,CAAC,OAAuB,EAAE,QAAqB,EAAE,WAAe,EAAE,IAA2B;;YACnH,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC,CAAC;YAEjD,OAAO,wBAAa,CAAC,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;QAC7C,CAAC;KAAA;CACD;AAED,MAAM,CAAC,OAAO,GAAG,IAAI,wBAAwB,EAAE,CAAC"}
1
+ {"version":3,"file":"create.js","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/account/create.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,sGAA6G;AAE7G,wEAAwE;AACxE,kEAA6D;AAE7D,MAAM,wBACF,SAAQ,sBAA4B;IAEpC;QACI,KAAK,CAAC,kBAAU,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;QACjC,IAAI,CAAC,iBAAiB,EAAE,CAAC;IAC7B,CAAC;IAEe,OAAO,CAAC,OAAuB,EAAE,QAAqB,EAAE,WAAe,EAAE,IAA2B;;YAChH,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC,CAAC;YAEjD,OAAO,6BAAa,CAAC,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;QAChD,CAAC;KAAA;CACJ;AAED,MAAM,CAAC,OAAO,GAAG,IAAI,wBAAwB,EAAE,CAAC"}
@@ -1,22 +1,4 @@
1
1
  "use strict";
2
- /*
3
- * Permissions management system, define access level for each of
4
- * your server apis, and restrict users by giving them access levels
5
- *
6
- * Copyright (C) 2020 Intuition Robotics
7
- *
8
- * Licensed under the Apache License, Version 2.0 (the "License");
9
- * you may not use this file except in compliance with the License.
10
- * You may obtain a copy of the License at
11
- *
12
- * http://www.apache.org/licenses/LICENSE-2.0
13
- *
14
- * Unless required by applicable law or agreed to in writing, software
15
- * distributed under the License is distributed on an "AS IS" BASIS,
16
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
- * See the License for the specific language governing permissions and
18
- * limitations under the License.
19
- */
20
2
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
21
3
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
22
4
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -27,16 +9,16 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
27
9
  });
28
10
  };
29
11
  Object.defineProperty(exports, "__esModule", { value: true });
30
- const backend_1 = require("@intuitionrobotics/thunderstorm/backend");
31
- const _imports_1 = require("./_imports");
32
- const thunderstorm_1 = require("@intuitionrobotics/thunderstorm");
33
- class ListAccounts extends backend_1.ServerApi {
12
+ const server_api_1 = require("@intuitionrobotics/thunderstorm/app-backend/modules/server/server-api");
13
+ const types_1 = require("@intuitionrobotics/thunderstorm/shared/types");
14
+ const AccountModule_1 = require("../../../modules/AccountModule");
15
+ class ListAccounts extends server_api_1.ServerApi {
34
16
  constructor() {
35
- super(thunderstorm_1.HttpMethod.GET, "query");
17
+ super(types_1.HttpMethod.GET, "query");
36
18
  }
37
19
  process(request, response, queryParams, body) {
38
20
  return __awaiter(this, void 0, void 0, function* () {
39
- const accounts = yield _imports_1.AccountModule.listUsers();
21
+ const accounts = yield AccountModule_1.AccountModule.listUsers();
40
22
  return { accounts };
41
23
  });
42
24
  }
@@ -1 +1 @@
1
- {"version":3,"file":"list.js","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/account/list.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;;;;;;;;;AAEH,qEAIiD;AACjD,yCAIoB;AACpB,kEAA2D;AAG3D,MAAM,YACL,SAAQ,mBAAkC;IAE1C;QACC,KAAK,CAAC,yBAAU,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;IAChC,CAAC;IAEe,OAAO,CAAC,OAAuB,EAAE,QAAqB,EAAE,WAAe,EAAE,IAAU;;YAClG,MAAM,QAAQ,GAAiB,MAAM,wBAAa,CAAC,SAAS,EAAE,CAAC;YAC/D,OAAO,EAAC,QAAQ,EAAC,CAAA;QAClB,CAAC;KAAA;CACD;AAED,MAAM,CAAC,OAAO,GAAG,IAAI,YAAY,EAAE,CAAC"}
1
+ {"version":3,"file":"list.js","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/account/list.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,sGAA6G;AAE7G,wEAAwE;AACxE,kEAA6D;AAE7D,MAAM,YACF,SAAQ,sBAAkC;IAE1C;QACI,KAAK,CAAC,kBAAU,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;IACnC,CAAC;IAEe,OAAO,CAAC,OAAuB,EAAE,QAAqB,EAAE,WAAe,EAAE,IAAU;;YAC/F,MAAM,QAAQ,GAAiB,MAAM,6BAAa,CAAC,SAAS,EAAE,CAAC;YAC/D,OAAO,EAAC,QAAQ,EAAC,CAAA;QACrB,CAAC;KAAA;CACJ;AAED,MAAM,CAAC,OAAO,GAAG,IAAI,YAAY,EAAE,CAAC"}
@@ -1,22 +1,4 @@
1
1
  "use strict";
2
- /*
3
- * Permissions management system, define access level for each of
4
- * your server apis, and restrict users by giving them access levels
5
- *
6
- * Copyright (C) 2020 Intuition Robotics
7
- *
8
- * Licensed under the Apache License, Version 2.0 (the "License");
9
- * you may not use this file except in compliance with the License.
10
- * You may obtain a copy of the License at
11
- *
12
- * http://www.apache.org/licenses/LICENSE-2.0
13
- *
14
- * Unless required by applicable law or agreed to in writing, software
15
- * distributed under the License is distributed on an "AS IS" BASIS,
16
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
- * See the License for the specific language governing permissions and
18
- * limitations under the License.
19
- */
20
2
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
21
3
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
22
4
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -27,16 +9,16 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
27
9
  });
28
10
  };
29
11
  Object.defineProperty(exports, "__esModule", { value: true });
30
- const backend_1 = require("@intuitionrobotics/thunderstorm/backend");
31
- const _imports_1 = require("./_imports");
32
- class ServerApi_Account_LoginSAML extends backend_1.ServerApi_Get {
12
+ const server_api_1 = require("@intuitionrobotics/thunderstorm/app-backend/modules/server/server-api");
13
+ const SamlModule_1 = require("../../../modules/SamlModule");
14
+ class ServerApi_Account_LoginSAML extends server_api_1.ServerApi_Get {
33
15
  constructor() {
34
16
  super("login-saml");
35
17
  this.dontPrintResponse();
36
18
  }
37
19
  process(request, response, queryParams, body) {
38
20
  return __awaiter(this, void 0, void 0, function* () {
39
- const loginUrl = yield _imports_1.SamlModule.loginRequest(queryParams);
21
+ const loginUrl = yield SamlModule_1.SamlModule.loginRequest(queryParams);
40
22
  return { loginUrl };
41
23
  });
42
24
  }
@@ -1 +1 @@
1
- {"version":3,"file":"login-saml.js","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/account/login-saml.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;;;;;;;;;AAEH,qEAGiD;AAGjD,yCAIoB;AAGpB,MAAM,2BACL,SAAQ,uBAAmC;IAE3C;QACC,KAAK,CAAC,YAAY,CAAC,CAAC;QACpB,IAAI,CAAC,iBAAiB,EAAE,CAAC;IAC1B,CAAC;IAEe,OAAO,CAAC,OAAuB,EAAE,QAAqB,EAAE,WAAoC,EAAE,IAAU;;YACvH,MAAM,QAAQ,GAAG,MAAM,qBAAU,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC;YAC5D,OAAO,EAAC,QAAQ,EAAC,CAAA;QAClB,CAAC;KAAA;CACD;AAED,MAAM,CAAC,OAAO,GAAG,IAAI,2BAA2B,EAAE,CAAC"}
1
+ {"version":3,"file":"login-saml.js","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/account/login-saml.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,sGAAiH;AAEjH,4DAAuD;AAEvD,MAAM,2BACF,SAAQ,0BAAmC;IAE3C;QACI,KAAK,CAAC,YAAY,CAAC,CAAC;QACpB,IAAI,CAAC,iBAAiB,EAAE,CAAC;IAC7B,CAAC;IAEe,OAAO,CAAC,OAAuB,EAAE,QAAqB,EAAE,WAAoC,EAAE,IAAU;;YACpH,MAAM,QAAQ,GAAG,MAAM,uBAAU,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC;YAC5D,OAAO,EAAC,QAAQ,EAAC,CAAA;QACrB,CAAC;KAAA;CACJ;AAED,MAAM,CAAC,OAAO,GAAG,IAAI,2BAA2B,EAAE,CAAC"}
@@ -1,22 +1,4 @@
1
1
  "use strict";
2
- /*
3
- * Permissions management system, define access level for each of
4
- * your server apis, and restrict users by giving them access levels
5
- *
6
- * Copyright (C) 2020 Intuition Robotics
7
- *
8
- * Licensed under the Apache License, Version 2.0 (the "License");
9
- * you may not use this file except in compliance with the License.
10
- * You may obtain a copy of the License at
11
- *
12
- * http://www.apache.org/licenses/LICENSE-2.0
13
- *
14
- * Unless required by applicable law or agreed to in writing, software
15
- * distributed under the License is distributed on an "AS IS" BASIS,
16
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
- * See the License for the specific language governing permissions and
18
- * limitations under the License.
19
- */
20
2
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
21
3
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
22
4
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -27,17 +9,23 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
27
9
  });
28
10
  };
29
11
  Object.defineProperty(exports, "__esModule", { value: true });
30
- const backend_1 = require("@intuitionrobotics/thunderstorm/backend");
31
- const _imports_1 = require("./_imports");
32
- const thunderstorm_1 = require("@intuitionrobotics/thunderstorm");
33
- class ServerApi_Account_Login extends backend_1.ServerApi {
12
+ const server_api_1 = require("@intuitionrobotics/thunderstorm/app-backend/modules/server/server-api");
13
+ const types_1 = require("@intuitionrobotics/thunderstorm/shared/types");
14
+ const AccountModule_1 = require("../../../modules/AccountModule");
15
+ const validator_1 = require("@intuitionrobotics/ts-common/validator/validator");
16
+ class ServerApi_Account_Login extends server_api_1.ServerApi {
34
17
  constructor() {
35
- super(thunderstorm_1.HttpMethod.POST, "login");
18
+ super(types_1.HttpMethod.POST, "login");
19
+ this.setBodyValidator({
20
+ email: validator_1.validateString(),
21
+ password: validator_1.validateString(),
22
+ frontType: undefined
23
+ });
36
24
  }
37
25
  process(request, response, queryParams, body) {
38
26
  return __awaiter(this, void 0, void 0, function* () {
39
27
  this.assertProperty(body, ["email", "password"]);
40
- return _imports_1.AccountModule.login(body, response);
28
+ return AccountModule_1.AccountModule.login(body, response);
41
29
  });
42
30
  }
43
31
  }
@@ -1 +1 @@
1
- {"version":3,"file":"login.js","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/account/login.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;;;;;;;;;AAEH,qEAGiD;AAGjD,yCAIoB;AACpB,kEAA2D;AAG3D,MAAM,uBACL,SAAQ,mBAA2B;IAEnC;QACC,KAAK,CAAC,yBAAU,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACjC,CAAC;IAEe,OAAO,CAAC,OAAuB,EAAE,QAAqB,EAAE,WAAe,EAAE,IAA0B;;YAClH,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC;YAEjD,OAAO,wBAAa,CAAC,KAAK,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;QAC5C,CAAC;KAAA;CACD;AAED,MAAM,CAAC,OAAO,GAAG,IAAI,uBAAuB,EAAE,CAAC"}
1
+ {"version":3,"file":"login.js","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/account/login.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,sGAA6G;AAE7G,wEAAwE;AACxE,kEAA6D;AAC7D,gFAAgF;AAEhF,MAAM,uBACF,SAAQ,sBAA2B;IAEnC;QACI,KAAK,CAAC,kBAAU,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAChC,IAAI,CAAC,gBAAgB,CAAC;YACd,KAAK,EAAE,0BAAc,EAAE;YACvB,QAAQ,EAAE,0BAAc,EAAE;YAC1B,SAAS,EAAE,SAAS;SACvB,CACJ,CAAA;IACL,CAAC;IAEe,OAAO,CAAC,OAAuB,EAAE,QAAqB,EAAE,WAAe,EAAE,IAA0B;;YAC/G,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC;YAEjD,OAAO,6BAAa,CAAC,KAAK,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;QAC/C,CAAC;KAAA;CACJ;AAED,MAAM,CAAC,OAAO,GAAG,IAAI,uBAAuB,EAAE,CAAC"}
@@ -1,22 +1,4 @@
1
1
  "use strict";
2
- /*
3
- * Permissions management system, define access level for each of
4
- * your server apis, and restrict users by giving them access levels
5
- *
6
- * Copyright (C) 2020 Intuition Robotics
7
- *
8
- * Licensed under the Apache License, Version 2.0 (the "License");
9
- * you may not use this file except in compliance with the License.
10
- * You may obtain a copy of the License at
11
- *
12
- * http://www.apache.org/licenses/LICENSE-2.0
13
- *
14
- * Unless required by applicable law or agreed to in writing, software
15
- * distributed under the License is distributed on an "AS IS" BASIS,
16
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
- * See the License for the specific language governing permissions and
18
- * limitations under the License.
19
- */
20
2
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
21
3
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
22
4
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -27,19 +9,20 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
27
9
  });
28
10
  };
29
11
  Object.defineProperty(exports, "__esModule", { value: true });
30
- const backend_1 = require("@intuitionrobotics/thunderstorm/backend");
31
- const _imports_1 = require("./_imports");
32
- const thunderstorm_1 = require("@intuitionrobotics/thunderstorm");
33
- class ServerApi_Account_Logout extends backend_1.ServerApi {
12
+ const server_api_1 = require("@intuitionrobotics/thunderstorm/app-backend/modules/server/server-api");
13
+ const types_1 = require("@intuitionrobotics/thunderstorm/shared/types");
14
+ const AccountModule_1 = require("../../../modules/AccountModule");
15
+ const exceptions_1 = require("@intuitionrobotics/thunderstorm/app-backend/exceptions");
16
+ class ServerApi_Account_Logout extends server_api_1.ServerApi {
34
17
  constructor() {
35
- super(thunderstorm_1.HttpMethod.POST, "logout");
18
+ super(types_1.HttpMethod.POST, "logout");
36
19
  }
37
20
  process(request, response, queryParams, body) {
38
21
  return __awaiter(this, void 0, void 0, function* () {
39
- const sessionId = _imports_1.Header_SessionId.get(request);
22
+ const sessionId = AccountModule_1.Header_SessionId.get(request);
40
23
  if (!sessionId)
41
- throw new backend_1.ApiException(404, 'Missing sessionId');
42
- return _imports_1.AccountModule.logout(sessionId);
24
+ throw new exceptions_1.ApiException(404, 'Missing sessionId');
25
+ return AccountModule_1.AccountModule.logout(sessionId);
43
26
  });
44
27
  }
45
28
  }
@@ -1 +1 @@
1
- {"version":3,"file":"logout.js","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/account/logout.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;;;;;;;;;AAEH,qEAIiD;AACjD,yCAIoB;AACpB,kEAA2D;AAG3D,MAAM,wBACL,SAAQ,mBAA4B;IAEpC;QACC,KAAK,CAAC,yBAAU,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAClC,CAAC;IAEe,OAAO,CAAC,OAAuB,EAAE,QAAqB,EAAE,WAAe,EAAE,IAAQ;;YAChG,MAAM,SAAS,GAAG,2BAAgB,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;YAChD,IAAI,CAAC,SAAS;gBACb,MAAM,IAAI,sBAAY,CAAC,GAAG,EAAE,mBAAmB,CAAC,CAAC;YAElD,OAAO,wBAAa,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QACxC,CAAC;KAAA;CACD;AAED,MAAM,CAAC,OAAO,GAAG,IAAI,wBAAwB,EAAE,CAAC"}
1
+ {"version":3,"file":"logout.js","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/account/logout.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,sGAA6G;AAE7G,wEAAwE;AACxE,kEAA+E;AAC/E,uFAAoF;AAEpF,MAAM,wBACF,SAAQ,sBAA4B;IAEpC;QACI,KAAK,CAAC,kBAAU,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IACrC,CAAC;IAEe,OAAO,CAAC,OAAuB,EAAE,QAAqB,EAAE,WAAe,EAAE,IAAQ;;YAC7F,MAAM,SAAS,GAAG,gCAAgB,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;YAChD,IAAI,CAAC,SAAS;gBACV,MAAM,IAAI,yBAAY,CAAC,GAAG,EAAE,mBAAmB,CAAC,CAAC;YAErD,OAAO,6BAAa,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QAC3C,CAAC;KAAA;CACJ;AAED,MAAM,CAAC,OAAO,GAAG,IAAI,wBAAwB,EAAE,CAAC"}
@@ -9,20 +9,21 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- const backend_1 = require("@intuitionrobotics/thunderstorm/backend");
13
- const _imports_1 = require("./_imports");
14
- const thunderstorm_1 = require("@intuitionrobotics/thunderstorm");
15
- const ts_common_1 = require("@intuitionrobotics/ts-common");
16
- class ServerApi_Account_Upsert extends backend_1.ServerApi {
12
+ const server_api_1 = require("@intuitionrobotics/thunderstorm/app-backend/modules/server/server-api");
13
+ const RemoteProxy_1 = require("@intuitionrobotics/thunderstorm/app-backend/modules/proxy/RemoteProxy");
14
+ const types_1 = require("@intuitionrobotics/thunderstorm/shared/types");
15
+ const AccountModule_1 = require("../../../modules/AccountModule");
16
+ const validator_1 = require("@intuitionrobotics/ts-common/validator/validator");
17
+ class ServerApi_Account_Upsert extends server_api_1.ServerApi {
17
18
  constructor() {
18
- super(thunderstorm_1.HttpMethod.POST, "upsert");
19
- this.setMiddlewares(backend_1.RemoteProxy.Middleware);
20
- this.setBodyValidator({ password: ts_common_1.validateExists(), email: ts_common_1.validateExists(), password_check: undefined });
19
+ super(types_1.HttpMethod.POST, "upsert");
20
+ this.setMiddlewares(RemoteProxy_1.RemoteProxy.Middleware);
21
+ this.setBodyValidator({ password: validator_1.validateExists(), email: validator_1.validateExists(), password_check: undefined });
21
22
  this.dontPrintResponse();
22
23
  }
23
24
  process(request, response, queryParams, body) {
24
25
  return __awaiter(this, void 0, void 0, function* () {
25
- return _imports_1.AccountModule.upsert(body);
26
+ return AccountModule_1.AccountModule.upsert(body);
26
27
  });
27
28
  }
28
29
  }
@@ -1 +1 @@
1
- {"version":3,"file":"upsert.js","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/account/upsert.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,qEAIiD;AACjD,yCAIoB;AACpB,kEAA2D;AAE3D,4DAA8D;AAE9D,MAAM,wBACL,SAAQ,mBAA4B;IAEpC;QACC,KAAK,CAAC,yBAAU,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;QACjC,IAAI,CAAC,cAAc,CAAC,qBAAW,CAAC,UAAU,CAAC,CAAC;QAC5C,IAAI,CAAC,gBAAgB,CAAC,EAAC,QAAQ,EAAE,0BAAc,EAAE,EAAE,KAAK,EAAE,0BAAc,EAAE,EAAE,cAAc,EAAE,SAAS,EAAC,CAAC,CAAC;QACxG,IAAI,CAAC,iBAAiB,EAAE,CAAC;IAC1B,CAAC;IAEe,OAAO,CAAC,OAAuB,EAAE,QAAqB,EAAE,WAAe,EAAE,IAA2B;;YACnH,OAAO,wBAAa,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACnC,CAAC;KAAA;CACD;AAED,MAAM,CAAC,OAAO,GAAG,IAAI,wBAAwB,EAAE,CAAC"}
1
+ {"version":3,"file":"upsert.js","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/account/upsert.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,sGAA6G;AAE7G,uGAAkG;AAClG,wEAAwE;AACxE,kEAA6D;AAC7D,gFAAgF;AAEhF,MAAM,wBACF,SAAQ,sBAA4B;IAEpC;QACI,KAAK,CAAC,kBAAU,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;QACjC,IAAI,CAAC,cAAc,CAAC,yBAAW,CAAC,UAAU,CAAC,CAAC;QAC5C,IAAI,CAAC,gBAAgB,CAAC,EAAC,QAAQ,EAAE,0BAAc,EAAE,EAAE,KAAK,EAAE,0BAAc,EAAE,EAAE,cAAc,EAAE,SAAS,EAAC,CAAC,CAAC;QACxG,IAAI,CAAC,iBAAiB,EAAE,CAAC;IAC7B,CAAC;IAEe,OAAO,CAAC,OAAuB,EAAE,QAAqB,EAAE,WAAe,EAAE,IAA2B;;YAChH,OAAO,6BAAa,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACtC,CAAC;KAAA;CACJ;AAED,MAAM,CAAC,OAAO,GAAG,IAAI,wBAAwB,EAAE,CAAC"}
@@ -1,22 +1,4 @@
1
1
  "use strict";
2
- /*
3
- * Permissions management system, define access level for each of
4
- * your server apis, and restrict users by giving them access levels
5
- *
6
- * Copyright (C) 2020 Intuition Robotics
7
- *
8
- * Licensed under the Apache License, Version 2.0 (the "License");
9
- * you may not use this file except in compliance with the License.
10
- * You may obtain a copy of the License at
11
- *
12
- * http://www.apache.org/licenses/LICENSE-2.0
13
- *
14
- * Unless required by applicable law or agreed to in writing, software
15
- * distributed under the License is distributed on an "AS IS" BASIS,
16
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
- * See the License for the specific language governing permissions and
18
- * limitations under the License.
19
- */
20
2
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
21
3
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
22
4
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -27,16 +9,16 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
27
9
  });
28
10
  };
29
11
  Object.defineProperty(exports, "__esModule", { value: true });
30
- const backend_1 = require("@intuitionrobotics/thunderstorm/backend");
31
- const thunderstorm_1 = require("@intuitionrobotics/thunderstorm");
32
- const _imports_1 = require("./_imports");
33
- class ValidateToken extends backend_1.ServerApi {
12
+ const server_api_1 = require("@intuitionrobotics/thunderstorm/app-backend/modules/server/server-api");
13
+ const types_1 = require("@intuitionrobotics/thunderstorm/shared/types");
14
+ const AccountModule_1 = require("../../../modules/AccountModule");
15
+ class ValidateToken extends server_api_1.ServerApi {
34
16
  constructor() {
35
- super(thunderstorm_1.HttpMethod.GET, "validate");
17
+ super(types_1.HttpMethod.GET, "validate");
36
18
  }
37
19
  process(request, response, queryParams, body) {
38
20
  return __awaiter(this, void 0, void 0, function* () {
39
- const { email, _id } = yield _imports_1.AccountModule.validateSession(request, this.getScopes(), response);
21
+ const { email, _id } = yield AccountModule_1.AccountModule.validateSession(request, this.getScopes(), response);
40
22
  return { email, _id };
41
23
  });
42
24
  }
@@ -1 +1 @@
1
- {"version":3,"file":"validate.js","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/account/validate.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;;;;;;;;;AAEH,qEAIiD;AAEjD,kEAA2D;AAC3D,yCAGoB;AAEpB,MAAM,aACL,SAAQ,mBAAqC;IAE7C;QACC,KAAK,CAAC,yBAAU,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC;IACnC,CAAC;IAEe,OAAO,CAAC,OAAuB,EAAE,QAAqB,EAAE,WAAe,EAAE,IAAU;;YAClG,MAAM,EAAC,KAAK,EAAE,GAAG,EAAC,GAAG,MAAM,wBAAa,CAAC,eAAe,CAAC,OAAO,EAAE,IAAI,CAAC,SAAS,EAAE,EAAE,QAAQ,CAAC,CAAC;YAC9F,OAAO,EAAC,KAAK,EAAE,GAAG,EAAC,CAAC;QACrB,CAAC;KAAA;CACD;AAED,MAAM,CAAC,OAAO,GAAG,IAAI,aAAa,EAAE,CAAC"}
1
+ {"version":3,"file":"validate.js","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/account/validate.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,sGAA6G;AAE7G,wEAAwE;AACxE,kEAA6D;AAE7D,MAAM,aACF,SAAQ,sBAAqC;IAE7C;QACI,KAAK,CAAC,kBAAU,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC;IACtC,CAAC;IAEY,OAAO,CAAC,OAAuB,EAAE,QAAqB,EAAE,WAAe,EAAE,IAAU;;YAClG,MAAM,EAAC,KAAK,EAAE,GAAG,EAAC,GAAG,MAAM,6BAAa,CAAC,eAAe,CAAC,OAAO,EAAE,IAAI,CAAC,SAAS,EAAE,EAAE,QAAQ,CAAC,CAAC;YAC9F,OAAO,EAAC,KAAK,EAAE,GAAG,EAAC,CAAC;QACrB,CAAC;KAAA;CACD;AAED,MAAM,CAAC,OAAO,GAAG,IAAI,aAAa,EAAE,CAAC"}
@@ -1,6 +1,6 @@
1
- import { ApiResponse, ServerApi } from "@intuitionrobotics/thunderstorm/backend";
2
- import { Request_AddNewAccount, AccountApi_AddNewAccount } from "../api/v1/account/_imports";
3
- import { ExpressRequest } from "@intuitionrobotics/thunderstorm/backend";
1
+ import { ApiResponse, ServerApi } from "@intuitionrobotics/thunderstorm/app-backend/modules/server/server-api";
2
+ import { ExpressRequest } from "@intuitionrobotics/thunderstorm/app-backend/utils/types";
3
+ import { AccountApi_AddNewAccount, Request_AddNewAccount } from "../../shared/api";
4
4
  export declare class ServerApi_Account_AddNewAccount extends ServerApi<AccountApi_AddNewAccount> {
5
5
  constructor();
6
6
  protected process(request: ExpressRequest, response: ApiResponse, queryParams: {}, body: Request_AddNewAccount): Promise<import("../../shared/api").UI_Account>;
@@ -1,22 +1,4 @@
1
1
  "use strict";
2
- /*
3
- * Permissions management system, define access level for each of
4
- * your server apis, and restrict users by giving them access levels
5
- *
6
- * Copyright (C) 2020 Intuition Robotics
7
- *
8
- * Licensed under the Apache License, Version 2.0 (the "License");
9
- * you may not use this file except in compliance with the License.
10
- * You may obtain a copy of the License at
11
- *
12
- * http://www.apache.org/licenses/LICENSE-2.0
13
- *
14
- * Unless required by applicable law or agreed to in writing, software
15
- * distributed under the License is distributed on an "AS IS" BASIS,
16
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
- * See the License for the specific language governing permissions and
18
- * limitations under the License.
19
- */
20
2
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
21
3
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
22
4
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -28,18 +10,24 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
28
10
  };
29
11
  Object.defineProperty(exports, "__esModule", { value: true });
30
12
  exports.ServerApi_Account_AddNewAccount = void 0;
31
- const backend_1 = require("@intuitionrobotics/thunderstorm/backend");
32
- const _imports_1 = require("../api/v1/account/_imports");
33
- const thunderstorm_1 = require("@intuitionrobotics/thunderstorm");
34
- class ServerApi_Account_AddNewAccount extends backend_1.ServerApi {
13
+ const server_api_1 = require("@intuitionrobotics/thunderstorm/app-backend/modules/server/server-api");
14
+ const types_1 = require("@intuitionrobotics/thunderstorm/shared/types");
15
+ const validator_1 = require("@intuitionrobotics/ts-common/validator/validator");
16
+ const AccountModule_1 = require("../modules/AccountModule");
17
+ class ServerApi_Account_AddNewAccount extends server_api_1.ServerApi {
35
18
  constructor() {
36
- super(thunderstorm_1.HttpMethod.POST, "add-new-account");
19
+ super(types_1.HttpMethod.POST, "add-new-account");
20
+ this.setBodyValidator({
21
+ email: validator_1.validateString(),
22
+ password: validator_1.validateString(false),
23
+ password_check: validator_1.validateString(false)
24
+ });
37
25
  this.dontPrintResponse();
38
26
  }
39
27
  process(request, response, queryParams, body) {
40
28
  return __awaiter(this, void 0, void 0, function* () {
41
29
  this.assertProperty(body, ["email"]);
42
- return _imports_1.AccountModule.addNewAccount(body.email, body.password, body.password_check);
30
+ return AccountModule_1.AccountModule.addNewAccount(body.email, body.password, body.password_check);
43
31
  });
44
32
  }
45
33
  }
@@ -1 +1 @@
1
- {"version":3,"file":"add-new-account.js","sourceRoot":"","sources":["../../../src/main/app-backend/apis/add-new-account.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;;;;;;;;;;AAEH,qEAGiD;AACjD,yDAIoC;AACpC,kEAA2D;AAG3D,MAAa,+BACZ,SAAQ,mBAAmC;IAE3C;QACC,KAAK,CAAC,yBAAU,CAAC,IAAI,EAAE,iBAAiB,CAAC,CAAC;QAC1C,IAAI,CAAC,iBAAiB,EAAE,CAAC;IAC1B,CAAC;IAEe,OAAO,CAAC,OAAuB,EAAE,QAAqB,EAAE,WAAe,EAAE,IAA2B;;YACnH,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;YAErC,OAAO,wBAAa,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;QACpF,CAAC;KAAA;CACD;AAbD,0EAaC"}
1
+ {"version":3,"file":"add-new-account.js","sourceRoot":"","sources":["../../../src/main/app-backend/apis/add-new-account.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,sGAA6G;AAE7G,wEAAwE;AACxE,gFAAgF;AAEhF,4DAAuD;AAEvD,MAAa,+BACT,SAAQ,sBAAmC;IAE3C;QACI,KAAK,CAAC,kBAAU,CAAC,IAAI,EAAE,iBAAiB,CAAC,CAAC;QAC1C,IAAI,CAAC,gBAAgB,CAAC;YAClB,KAAK,EAAE,0BAAc,EAAE;YACvB,QAAQ,EAAE,0BAAc,CAAC,KAAK,CAAC;YAC/B,cAAc,EAAE,0BAAc,CAAC,KAAK,CAAC;SACxC,CAAC,CAAA;QACF,IAAI,CAAC,iBAAiB,EAAE,CAAC;IAC7B,CAAC;IAEe,OAAO,CAAC,OAAuB,EAAE,QAAqB,EAAE,WAAe,EAAE,IAA2B;;YAChH,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;YAErC,OAAO,6BAAa,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;QACvF,CAAC;KAAA;CACJ;AAlBD,0EAkBC"}
@@ -1,3 +1 @@
1
1
  export declare const Backend_ModulePack_Users: (import("../modules/SecretsModule").SecretsModule_Class | import("../modules/AccountModule").AccountsModule_Class)[];
2
- export * from "../modules/AccountModule";
3
- export * from "../modules/SamlModule";
@@ -1,32 +1,4 @@
1
1
  "use strict";
2
- /*
3
- * Permissions management system, define access level for each of
4
- * your server apis, and restrict users by giving them access levels
5
- *
6
- * Copyright (C) 2020 Intuition Robotics
7
- *
8
- * Licensed under the Apache License, Version 2.0 (the "License");
9
- * you may not use this file except in compliance with the License.
10
- * You may obtain a copy of the License at
11
- *
12
- * http://www.apache.org/licenses/LICENSE-2.0
13
- *
14
- * Unless required by applicable law or agreed to in writing, software
15
- * distributed under the License is distributed on an "AS IS" BASIS,
16
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
- * See the License for the specific language governing permissions and
18
- * limitations under the License.
19
- */
20
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
21
- if (k2 === undefined) k2 = k;
22
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
23
- }) : (function(o, m, k, k2) {
24
- if (k2 === undefined) k2 = k;
25
- o[k2] = m[k];
26
- }));
27
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
28
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
29
- };
30
2
  Object.defineProperty(exports, "__esModule", { value: true });
31
3
  exports.Backend_ModulePack_Users = void 0;
32
4
  const AccountModule_1 = require("../modules/AccountModule");
@@ -35,6 +7,4 @@ exports.Backend_ModulePack_Users = [
35
7
  AccountModule_1.AccountModule,
36
8
  SecretsModule_1.SecretsModule
37
9
  ];
38
- __exportStar(require("../modules/AccountModule"), exports);
39
- __exportStar(require("../modules/SamlModule"), exports);
40
10
  //# sourceMappingURL=module-pack.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"module-pack.js","sourceRoot":"","sources":["../../../src/main/app-backend/core/module-pack.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;;;;;;;;;;;AAEH,4DAAuD;AACvD,4DAAuD;AAE1C,QAAA,wBAAwB,GAAG;IACpC,6BAAa;IACb,6BAAa;CAChB,CAAC;AAEF,2DAAyC;AACzC,wDAAsC"}
1
+ {"version":3,"file":"module-pack.js","sourceRoot":"","sources":["../../../src/main/app-backend/core/module-pack.ts"],"names":[],"mappings":";;;AAAA,4DAAuD;AACvD,4DAAuD;AAE1C,QAAA,wBAAwB,GAAG;IACpC,6BAAa;IACb,6BAAa;CAChB,CAAC"}