@ubs-platform/users-common 1.0.6 → 1.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. package/README.md +2 -4
  2. package/dist/index.js +5 -0
  3. package/dist/index.js.map +1 -0
  4. package/dist/lib/dto/error-consts.d.ts +7 -0
  5. package/dist/lib/dto/error-consts.js +12 -0
  6. package/dist/lib/dto/error-consts.js.map +1 -0
  7. package/dist/lib/dto/error-informations.d.ts +5 -0
  8. package/dist/lib/dto/error-informations.js +11 -0
  9. package/dist/lib/dto/error-informations.js.map +1 -0
  10. package/dist/lib/dto/index.js +16 -0
  11. package/dist/lib/dto/index.js.map +1 -0
  12. package/dist/lib/dto/password-change-dto.d.ts +4 -0
  13. package/dist/lib/dto/password-change-dto.js +3 -0
  14. package/dist/lib/dto/password-change-dto.js.map +1 -0
  15. package/dist/lib/dto/user-admin-dto.d.ts +11 -0
  16. package/dist/lib/dto/user-admin-dto.js +3 -0
  17. package/dist/lib/dto/user-admin-dto.js.map +1 -0
  18. package/dist/lib/dto/user-auth-status.model.d.ts +15 -0
  19. package/dist/lib/dto/user-auth-status.model.js +19 -0
  20. package/dist/lib/dto/user-auth-status.model.js.map +1 -0
  21. package/dist/lib/dto/user-auth.model.d.ts +4 -0
  22. package/dist/lib/dto/user-auth.model.js +3 -0
  23. package/dist/lib/dto/user-auth.model.js.map +1 -0
  24. package/dist/lib/dto/user-create-dto.d.ts +12 -0
  25. package/dist/lib/dto/user-create-dto.js +3 -0
  26. package/dist/lib/dto/user-create-dto.js.map +1 -0
  27. package/dist/lib/dto/user-dto.d.ts +10 -0
  28. package/dist/lib/dto/user-dto.js +3 -0
  29. package/dist/lib/dto/user-dto.js.map +1 -0
  30. package/dist/lib/dto/user-full-dto.d.ts +19 -0
  31. package/dist/lib/dto/user-full-dto.js +3 -0
  32. package/dist/lib/dto/user-full-dto.js.map +1 -0
  33. package/dist/lib/dto/user-general-info-dto.d.ts +12 -0
  34. package/dist/lib/dto/user-general-info-dto.js +3 -0
  35. package/dist/lib/dto/user-general-info-dto.js.map +1 -0
  36. package/dist/lib/dto/user-minimalized.dto.d.ts +5 -0
  37. package/dist/lib/dto/user-minimalized.dto.js +3 -0
  38. package/dist/lib/dto/user-minimalized.dto.js.map +1 -0
  39. package/dist/lib/dto/user-register.model.d.ts +7 -0
  40. package/dist/lib/dto/user-register.model.js +3 -0
  41. package/dist/lib/dto/user-register.model.js.map +1 -0
  42. package/package.json +1 -1
  43. package/project.json +0 -23
  44. package/src/lib/dto/error-consts.ts +0 -7
  45. package/src/lib/dto/error-informations.ts +0 -3
  46. package/src/lib/dto/password-change-dto.ts +0 -4
  47. package/src/lib/dto/user-admin-dto.ts +0 -11
  48. package/src/lib/dto/user-auth-status.model.ts +0 -16
  49. package/src/lib/dto/user-auth.model.ts +0 -4
  50. package/src/lib/dto/user-create-dto.ts +0 -13
  51. package/src/lib/dto/user-dto.ts +0 -10
  52. package/src/lib/dto/user-full-dto.ts +0 -35
  53. package/src/lib/dto/user-general-info-dto.ts +0 -12
  54. package/src/lib/dto/user-minimalized.dto.ts +0 -5
  55. package/src/lib/dto/user-register.model.ts +0 -7
  56. /package/{src/index.ts → dist/index.d.ts} +0 -0
  57. /package/{src/lib/dto/index.ts → dist/lib/dto/index.d.ts} +0 -0
package/README.md CHANGED
@@ -1,7 +1,5 @@
1
1
  # users-common
2
2
 
3
- This library was generated with [Nx](https://nx.dev).
3
+ This library has common classes and interfaces that ubs users mona uses as DTO objects and return in these types. So that can used in frontend and backend
4
4
 
5
- ## Building
6
-
7
- Run `nx build users-common` to build the library.
5
+ Will be documented fine
package/dist/index.js ADDED
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./lib/dto"), exports);
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,oDAA0B"}
@@ -0,0 +1,7 @@
1
+ export declare class UBSUsersErrorConsts {
2
+ static readonly EXIST_USERNAME = "exist-username";
3
+ static readonly EXIST_PRIMARY_MAIL = "exist-primary-mail";
4
+ static readonly EMPTY_DATA = "empty-data";
5
+ static readonly AUTHENTICATION_FAIL = "fail-authentication";
6
+ static readonly USER_NOTFOUND = "notfound-user";
7
+ }
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UBSUsersErrorConsts = void 0;
4
+ class UBSUsersErrorConsts {
5
+ }
6
+ exports.UBSUsersErrorConsts = UBSUsersErrorConsts;
7
+ UBSUsersErrorConsts.EXIST_USERNAME = 'exist-username';
8
+ UBSUsersErrorConsts.EXIST_PRIMARY_MAIL = 'exist-primary-mail';
9
+ UBSUsersErrorConsts.EMPTY_DATA = 'empty-data';
10
+ UBSUsersErrorConsts.AUTHENTICATION_FAIL = 'fail-authentication';
11
+ UBSUsersErrorConsts.USER_NOTFOUND = 'notfound-user';
12
+ //# sourceMappingURL=error-consts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error-consts.js","sourceRoot":"","sources":["../../../src/lib/dto/error-consts.ts"],"names":[],"mappings":";;;AAAA,MAAa,mBAAmB;;AAAhC,kDAMC;AALiB,kCAAc,GAAG,gBAAgB,CAAC;AAClC,sCAAkB,GAAG,oBAAoB,CAAC;AAC1C,8BAAU,GAAG,YAAY,CAAC;AAC1B,uCAAmB,GAAG,qBAAqB,CAAC;AAC5C,iCAAa,GAAG,eAAe,CAAC"}
@@ -0,0 +1,5 @@
1
+ export declare class ErrorInformations {
2
+ key: string;
3
+ message: string;
4
+ constructor(key: string, message: string);
5
+ }
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ErrorInformations = void 0;
4
+ class ErrorInformations {
5
+ constructor(key, message) {
6
+ this.key = key;
7
+ this.message = message;
8
+ }
9
+ }
10
+ exports.ErrorInformations = ErrorInformations;
11
+ //# sourceMappingURL=error-informations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error-informations.js","sourceRoot":"","sources":["../../../src/lib/dto/error-informations.ts"],"names":[],"mappings":";;;AAAA,MAAa,iBAAiB;IAC5B,YAAmB,GAAW,EAAS,OAAe;QAAnC,QAAG,GAAH,GAAG,CAAQ;QAAS,YAAO,GAAP,OAAO,CAAQ;IAAG,CAAC;CAC3D;AAFD,8CAEC"}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./user-auth.model"), exports);
5
+ tslib_1.__exportStar(require("./user-auth-status.model"), exports);
6
+ tslib_1.__exportStar(require("./user-register.model"), exports);
7
+ tslib_1.__exportStar(require("./error-consts"), exports);
8
+ tslib_1.__exportStar(require("./user-general-info-dto"), exports);
9
+ tslib_1.__exportStar(require("./user-dto"), exports);
10
+ tslib_1.__exportStar(require("./user-admin-dto"), exports);
11
+ tslib_1.__exportStar(require("./user-minimalized.dto"), exports);
12
+ tslib_1.__exportStar(require("./user-create-dto"), exports);
13
+ tslib_1.__exportStar(require("./password-change-dto"), exports);
14
+ tslib_1.__exportStar(require("./user-full-dto"), exports);
15
+ tslib_1.__exportStar(require("./error-informations"), exports);
16
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/dto/index.ts"],"names":[],"mappings":";;;AAAA,4DAAkC;AAClC,mEAAyC;AACzC,gEAAsC;AACtC,yDAA+B;AAC/B,kEAAwC;AACxC,qDAA2B;AAC3B,2DAAiC;AACjC,iEAAuC;AACvC,4DAAkC;AAClC,gEAAsC;AACtC,0DAAgC;AAChC,+DAAqC"}
@@ -0,0 +1,4 @@
1
+ export interface PasswordChangeDto {
2
+ currentPassword: string;
3
+ newPassword: string;
4
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=password-change-dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"password-change-dto.js","sourceRoot":"","sources":["../../../src/lib/dto/password-change-dto.ts"],"names":[],"mappings":""}
@@ -0,0 +1,11 @@
1
+ export interface UserAuthBackendDTO {
2
+ username: string;
3
+ primaryEmail: string;
4
+ name: string;
5
+ surname: string;
6
+ id: string;
7
+ suspended: boolean;
8
+ suspendReason: string;
9
+ roles: string[];
10
+ active: boolean;
11
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=user-admin-dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user-admin-dto.js","sourceRoot":"","sources":["../../../src/lib/dto/user-admin-dto.ts"],"names":[],"mappings":""}
@@ -0,0 +1,15 @@
1
+ export interface UserAuthStatus {
2
+ success: boolean;
3
+ message: string;
4
+ token?: string;
5
+ }
6
+ export declare class UserAuthSuccess implements UserAuthStatus {
7
+ token?: string;
8
+ constructor(token?: string);
9
+ success: boolean;
10
+ message: string;
11
+ }
12
+ export declare class UserAuthFail implements UserAuthStatus {
13
+ success: boolean;
14
+ message: string;
15
+ }
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UserAuthFail = exports.UserAuthSuccess = void 0;
4
+ class UserAuthSuccess {
5
+ constructor(token) {
6
+ this.token = token;
7
+ this.success = true;
8
+ this.message = 'User login is success';
9
+ }
10
+ }
11
+ exports.UserAuthSuccess = UserAuthSuccess;
12
+ class UserAuthFail {
13
+ constructor() {
14
+ this.success = false;
15
+ this.message = 'Username or Password is wrong';
16
+ }
17
+ }
18
+ exports.UserAuthFail = UserAuthFail;
19
+ //# sourceMappingURL=user-auth-status.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user-auth-status.model.js","sourceRoot":"","sources":["../../../src/lib/dto/user-auth-status.model.ts"],"names":[],"mappings":";;;AAMA,MAAa,eAAe;IAC1B,YAAmB,KAAc;QAAd,UAAK,GAAL,KAAK,CAAS;QACjC,YAAO,GAAG,IAAI,CAAC;QACf,YAAO,GAAG,uBAAuB,CAAC;IAFE,CAAC;CAGtC;AAJD,0CAIC;AAED,MAAa,YAAY;IAAzB;QACE,YAAO,GAAG,KAAK,CAAC;QAChB,YAAO,GAAG,+BAA+B,CAAC;IAC5C,CAAC;CAAA;AAHD,oCAGC"}
@@ -0,0 +1,4 @@
1
+ export interface UserAuth {
2
+ login: string;
3
+ password: string;
4
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=user-auth.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user-auth.model.js","sourceRoot":"","sources":["../../../src/lib/dto/user-auth.model.ts"],"names":[],"mappings":""}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * ‼️‼️ do not use in frontend ‼️‼️
3
+ */
4
+ export interface UserCreateDTO {
5
+ username: string;
6
+ password: string;
7
+ primaryEmail: string;
8
+ name: string;
9
+ surname: string;
10
+ active: boolean;
11
+ roles: Array<string>;
12
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=user-create-dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user-create-dto.js","sourceRoot":"","sources":["../../../src/lib/dto/user-create-dto.ts"],"names":[],"mappings":""}
@@ -0,0 +1,10 @@
1
+ export interface UserDTO {
2
+ username: string;
3
+ primaryEmail: string;
4
+ name: string;
5
+ surname: string;
6
+ id: string;
7
+ suspended: boolean;
8
+ suspendReason: string;
9
+ active: boolean;
10
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=user-dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user-dto.js","sourceRoot":"","sources":["../../../src/lib/dto/user-dto.ts"],"names":[],"mappings":""}
@@ -0,0 +1,19 @@
1
+ export interface UserFullDto {
2
+ _id?: any;
3
+ username: string;
4
+ primaryEmail: string;
5
+ name: string;
6
+ surname: string;
7
+ country: string;
8
+ state: string;
9
+ city: string;
10
+ district: string;
11
+ gender: string;
12
+ pronounce: string;
13
+ roles: string[];
14
+ webSites: string[];
15
+ active: boolean;
16
+ suspended: boolean;
17
+ suspendReason: string;
18
+ password?: string;
19
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=user-full-dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user-full-dto.js","sourceRoot":"","sources":["../../../src/lib/dto/user-full-dto.ts"],"names":[],"mappings":""}
@@ -0,0 +1,12 @@
1
+ export interface UserGeneralInfoDTO {
2
+ id?: string;
3
+ name: string;
4
+ surname: string;
5
+ gender: string;
6
+ pronounce: string;
7
+ webSites: string[];
8
+ country: string;
9
+ state: string;
10
+ city: string;
11
+ district: string;
12
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=user-general-info-dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user-general-info-dto.js","sourceRoot":"","sources":["../../../src/lib/dto/user-general-info-dto.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ export interface UserOnlyRequiredDTO {
2
+ name: string;
3
+ surname: string;
4
+ id: string;
5
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=user-minimalized.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user-minimalized.dto.js","sourceRoot":"","sources":["../../../src/lib/dto/user-minimalized.dto.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ export interface UserRegisterDTO {
2
+ username: string;
3
+ password: string;
4
+ primaryEmail: string;
5
+ name: string;
6
+ surname: string;
7
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=user-register.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user-register.model.js","sourceRoot":"","sources":["../../../src/lib/dto/user-register.model.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ubs-platform/users-common",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "dependencies": {
5
5
  "tslib": "^2.3.0"
6
6
  },
package/project.json DELETED
@@ -1,23 +0,0 @@
1
- {
2
- "name": "users-common",
3
- "$schema": "../../node_modules/nx/schemas/project-schema.json",
4
- "sourceRoot": "libs/users-common/src",
5
- "projectType": "library",
6
- "targets": {
7
- "build": {
8
- "executor": "@nx/js:tsc",
9
- "outputs": ["{options.outputPath}"],
10
- "options": {
11
- "outputPath": "dist/libs/users-common",
12
- "main": "libs/users-common/src/index.ts",
13
- "tsConfig": "libs/users-common/tsconfig.lib.json",
14
- "assets": ["libs/users-common/*.md"]
15
- }
16
- },
17
- "publish": {
18
- "command": "node tools/scripts/publish.mjs users-common {args.ver} {args.tag}",
19
- "dependsOn": ["build"]
20
- }
21
- },
22
- "tags": []
23
- }
@@ -1,7 +0,0 @@
1
- export class UBSUsersErrorConsts {
2
- static readonly EXIST_USERNAME = 'exist-username';
3
- static readonly EXIST_PRIMARY_MAIL = 'exist-primary-mail';
4
- static readonly EMPTY_DATA = 'empty-data';
5
- static readonly AUTHENTICATION_FAIL = 'fail-authentication';
6
- static readonly USER_NOTFOUND = 'notfound-user';
7
- }
@@ -1,3 +0,0 @@
1
- export class ErrorInformations {
2
- constructor(public key: string, public message: string) {}
3
- }
@@ -1,4 +0,0 @@
1
- export interface PasswordChangeDto {
2
- currentPassword: string;
3
- newPassword: string;
4
- }
@@ -1,11 +0,0 @@
1
- export interface UserAuthBackendDTO {
2
- username: string;
3
- primaryEmail: string;
4
- name: string;
5
- surname: string;
6
- id: string;
7
- suspended: boolean;
8
- suspendReason: string;
9
- roles: string[];
10
- active: boolean;
11
- }
@@ -1,16 +0,0 @@
1
- export interface UserAuthStatus {
2
- success: boolean;
3
- message: string;
4
- token?: string;
5
- }
6
-
7
- export class UserAuthSuccess implements UserAuthStatus {
8
- constructor(public token?: string) {}
9
- success = true;
10
- message = 'User login is success';
11
- }
12
-
13
- export class UserAuthFail implements UserAuthStatus {
14
- success = false;
15
- message = 'Username or Password is wrong';
16
- }
@@ -1,4 +0,0 @@
1
- export interface UserAuth {
2
- login: string;
3
- password: string;
4
- }
@@ -1,13 +0,0 @@
1
- /**
2
- * ‼️‼️ do not use in frontend ‼️‼️
3
- */
4
- export interface UserCreateDTO {
5
- username: string;
6
- password: string;
7
- primaryEmail: string;
8
- name: string;
9
- surname: string;
10
- active: boolean;
11
- // id: string;
12
- roles: Array<string>;
13
- }
@@ -1,10 +0,0 @@
1
- export interface UserDTO {
2
- username: string;
3
- primaryEmail: string;
4
- name: string;
5
- surname: string;
6
- id: string;
7
- suspended: boolean;
8
- suspendReason: string;
9
- active: boolean;
10
- }
@@ -1,35 +0,0 @@
1
- export interface UserFullDto {
2
- _id?: any;
3
-
4
- username: string;
5
-
6
- primaryEmail: string;
7
-
8
- name: string;
9
-
10
- surname: string;
11
-
12
- country: string;
13
-
14
- state: string;
15
-
16
- city: string;
17
-
18
- district: string;
19
-
20
- gender: string;
21
-
22
- pronounce: string;
23
-
24
- roles: string[];
25
-
26
- webSites: string[];
27
-
28
- active: boolean;
29
-
30
- suspended: boolean;
31
-
32
- suspendReason: string;
33
-
34
- password?: string;
35
- }
@@ -1,12 +0,0 @@
1
- export interface UserGeneralInfoDTO {
2
- id?: string;
3
- name: string;
4
- surname: string;
5
- gender: string;
6
- pronounce: string;
7
- webSites: string[];
8
- country: string;
9
- state: string;
10
- city: string;
11
- district: string;
12
- }
@@ -1,5 +0,0 @@
1
- export interface UserOnlyRequiredDTO {
2
- name: string;
3
- surname: string;
4
- id: string;
5
- }
@@ -1,7 +0,0 @@
1
- export interface UserRegisterDTO {
2
- username: string;
3
- password: string;
4
- primaryEmail: string;
5
- name: string;
6
- surname: string;
7
- }
File without changes