@ubs-platform/users-common 1.1.4 → 1.4.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 (76) hide show
  1. package/capability.d.ts +14 -0
  2. package/capability.js +69 -0
  3. package/capability.js.map +1 -0
  4. package/entity-ownership-dto.d.ts +55 -0
  5. package/entity-ownership-dto.js +10 -0
  6. package/entity-ownership-dto.js.map +1 -0
  7. package/entity-ownership-group.d.ts +63 -0
  8. package/entity-ownership-group.js +46 -0
  9. package/entity-ownership-group.js.map +1 -0
  10. package/error-consts.js.map +1 -0
  11. package/error-informations.js.map +1 -0
  12. package/{dist/lib/dto/index.d.ts → index.d.ts} +3 -0
  13. package/index.js +32 -0
  14. package/index.js.map +1 -0
  15. package/package.json +1 -1
  16. package/password-change-dto.js.map +1 -0
  17. package/{dist/lib/dto/user-admin-dto.d.ts → user-admin-dto.d.ts} +1 -0
  18. package/user-admin-dto.js.map +1 -0
  19. package/user-admin-search.dto.d.ts +5 -0
  20. package/user-admin-search.dto.js +3 -0
  21. package/user-admin-search.dto.js.map +1 -0
  22. package/{dist/lib/dto/user-auth-status.model.d.ts → user-auth-status.model.d.ts} +2 -2
  23. package/user-auth-status.model.js.map +1 -0
  24. package/user-auth.model.js.map +1 -0
  25. package/{dist/lib/dto/user-create-dto.d.ts → user-create-dto.d.ts} +1 -3
  26. package/user-create-dto.js.map +1 -0
  27. package/{dist/lib/dto/user-dto.d.ts → user-dto.d.ts} +1 -0
  28. package/user-dto.js.map +1 -0
  29. package/{dist/lib/dto/user-full-dto.d.ts → user-full-dto.d.ts} +1 -0
  30. package/user-full-dto.js.map +1 -0
  31. package/{dist/lib/dto/user-general-info-dto.d.ts → user-general-info-dto.d.ts} +2 -2
  32. package/user-general-info-dto.js.map +1 -0
  33. package/{dist/lib/dto/user-minimalized.dto.d.ts → user-minimalized.dto.d.ts} +1 -0
  34. package/user-minimalized.dto.js.map +1 -0
  35. package/{dist/lib/dto/user-register.model.d.ts → user-register.model.d.ts} +2 -0
  36. package/user-register.model.js.map +1 -0
  37. package/.eslintrc.json +0 -25
  38. package/LICENSE +0 -21
  39. package/README.md +0 -5
  40. package/dist/index.d.ts +0 -1
  41. package/dist/index.js +0 -5
  42. package/dist/index.js.map +0 -1
  43. package/dist/lib/dto/error-consts.js.map +0 -1
  44. package/dist/lib/dto/error-informations.js.map +0 -1
  45. package/dist/lib/dto/index.js +0 -16
  46. package/dist/lib/dto/index.js.map +0 -1
  47. package/dist/lib/dto/password-change-dto.js.map +0 -1
  48. package/dist/lib/dto/user-admin-dto.js.map +0 -1
  49. package/dist/lib/dto/user-auth-status.model.js.map +0 -1
  50. package/dist/lib/dto/user-auth.model.js.map +0 -1
  51. package/dist/lib/dto/user-create-dto.js.map +0 -1
  52. package/dist/lib/dto/user-dto.js.map +0 -1
  53. package/dist/lib/dto/user-full-dto.js.map +0 -1
  54. package/dist/lib/dto/user-general-info-dto.js.map +0 -1
  55. package/dist/lib/dto/user-minimalized.dto.js.map +0 -1
  56. package/dist/lib/dto/user-register.model.js.map +0 -1
  57. package/jest.config.ts +0 -11
  58. package/tsconfig.json +0 -26
  59. package/tsconfig.lib.json +0 -10
  60. package/tsconfig.spec.json +0 -14
  61. /package/{dist/lib/dto/error-consts.d.ts → error-consts.d.ts} +0 -0
  62. /package/{dist/lib/dto/error-consts.js → error-consts.js} +0 -0
  63. /package/{dist/lib/dto/error-informations.d.ts → error-informations.d.ts} +0 -0
  64. /package/{dist/lib/dto/error-informations.js → error-informations.js} +0 -0
  65. /package/{dist/lib/dto/password-change-dto.d.ts → password-change-dto.d.ts} +0 -0
  66. /package/{dist/lib/dto/password-change-dto.js → password-change-dto.js} +0 -0
  67. /package/{dist/lib/dto/user-admin-dto.js → user-admin-dto.js} +0 -0
  68. /package/{dist/lib/dto/user-auth-status.model.js → user-auth-status.model.js} +0 -0
  69. /package/{dist/lib/dto/user-auth.model.d.ts → user-auth.model.d.ts} +0 -0
  70. /package/{dist/lib/dto/user-auth.model.js → user-auth.model.js} +0 -0
  71. /package/{dist/lib/dto/user-create-dto.js → user-create-dto.js} +0 -0
  72. /package/{dist/lib/dto/user-dto.js → user-dto.js} +0 -0
  73. /package/{dist/lib/dto/user-full-dto.js → user-full-dto.js} +0 -0
  74. /package/{dist/lib/dto/user-general-info-dto.js → user-general-info-dto.js} +0 -0
  75. /package/{dist/lib/dto/user-minimalized.dto.js → user-minimalized.dto.js} +0 -0
  76. /package/{dist/lib/dto/user-register.model.js → user-register.model.js} +0 -0
@@ -0,0 +1,14 @@
1
+ export declare enum Capability {
2
+ OWNER = 1,
3
+ VIEW = 2,
4
+ ADD = 3,
5
+ EDIT = 4,
6
+ DELETE = 5,
7
+ EOG_ADJUST_MEMBERS = 6,
8
+ EOG_ADJUST_CAPABILITIES = 7,
9
+ EOG_EDIT_METADATA = 8
10
+ }
11
+ export declare const hasCapability: (capabilities: Capability[], capabilityToCheck: Capability) => boolean;
12
+ export declare const hasCapabilityFromInnerArray: (capabilities: number[], query?: number[][]) => boolean;
13
+ export declare const migrateFromStringToCapability: (capability: string, applyTkLotusMigrations?: boolean) => number[];
14
+ export declare const requestedCapabilitiesToString: (requestedCapabilities?: number[][]) => string;
package/capability.js ADDED
@@ -0,0 +1,69 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.requestedCapabilitiesToString = exports.migrateFromStringToCapability = exports.hasCapabilityFromInnerArray = exports.hasCapability = exports.Capability = void 0;
4
+ var Capability;
5
+ (function (Capability) {
6
+ Capability[Capability["OWNER"] = 1] = "OWNER";
7
+ Capability[Capability["VIEW"] = 2] = "VIEW";
8
+ Capability[Capability["ADD"] = 3] = "ADD";
9
+ Capability[Capability["EDIT"] = 4] = "EDIT";
10
+ Capability[Capability["DELETE"] = 5] = "DELETE";
11
+ Capability[Capability["EOG_ADJUST_MEMBERS"] = 6] = "EOG_ADJUST_MEMBERS";
12
+ Capability[Capability["EOG_ADJUST_CAPABILITIES"] = 7] = "EOG_ADJUST_CAPABILITIES";
13
+ Capability[Capability["EOG_EDIT_METADATA"] = 8] = "EOG_EDIT_METADATA";
14
+ })(Capability || (exports.Capability = Capability = {}));
15
+ const hasCapability = (capabilities, capabilityToCheck) => {
16
+ return capabilities.includes(capabilityToCheck);
17
+ };
18
+ exports.hasCapability = hasCapability;
19
+ const hasCapabilityFromInnerArray = (capabilities, query) => {
20
+ if (!query || query.length === 0) {
21
+ return true;
22
+ }
23
+ for (const innerArray of query) {
24
+ let hasAll = true;
25
+ for (const capability of innerArray) {
26
+ if (!capabilities.includes(capability)) {
27
+ hasAll = false;
28
+ break;
29
+ }
30
+ }
31
+ if (hasAll) {
32
+ return true;
33
+ }
34
+ }
35
+ return false;
36
+ };
37
+ exports.hasCapabilityFromInnerArray = hasCapabilityFromInnerArray;
38
+ const migrateFromStringToCapability = (capability, applyTkLotusMigrations = true) => {
39
+ if (!applyTkLotusMigrations && (capability === "LIBRARY" || capability === "TENANT")) {
40
+ capability = "VIEW";
41
+ }
42
+ switch (capability) {
43
+ case "OWNER":
44
+ return [Capability.OWNER];
45
+ case "EDITOR":
46
+ return [Capability.EDIT, Capability.ADD, Capability.DELETE, Capability.VIEW];
47
+ case "EOG_ADJUST_MEMBERS":
48
+ return [Capability.EOG_ADJUST_MEMBERS];
49
+ case "EOG_ADJUST_CAPABILITIES":
50
+ return [Capability.EOG_ADJUST_CAPABILITIES];
51
+ case "EOG_EDIT_METADATA":
52
+ return [Capability.EOG_EDIT_METADATA];
53
+ case "LIBRARY":
54
+ return [101];
55
+ case "TENANT":
56
+ return [102];
57
+ default:
58
+ return [Capability.VIEW];
59
+ }
60
+ };
61
+ exports.migrateFromStringToCapability = migrateFromStringToCapability;
62
+ const requestedCapabilitiesToString = (requestedCapabilities) => {
63
+ if (!requestedCapabilities) {
64
+ return "<no requested capabilities>";
65
+ }
66
+ return "<requested caps." + requestedCapabilities.map(a => "(" + a.join(' and ') + ")").join(' or ') + ">";
67
+ };
68
+ exports.requestedCapabilitiesToString = requestedCapabilitiesToString;
69
+ //# sourceMappingURL=capability.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capability.js","sourceRoot":"","sources":["../../../../../libs/users-common/src/capability.ts"],"names":[],"mappings":";;;AAiBA,IAAY,UAmDX;AAnDD,WAAY,UAAU;IAClB,6CAAS,CAAA;IACT,2CAAQ,CAAA;IACR,yCAAO,CAAA;IACP,2CAAQ,CAAA;IACR,+CAAU,CAAA;IACV,uEAAsB,CAAA;IACtB,iFAA2B,CAAA;IAC3B,qEAAqB,CAAA;AA2CzB,CAAC,EAnDW,UAAU,0BAAV,UAAU,QAmDrB;AAEM,MAAM,aAAa,GAAG,CACzB,YAA0B,EAC1B,iBAA6B,EAAW,EAAE;IAC1C,OAAO,YAAY,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC;AACpD,CAAC,CAAC;AAJW,QAAA,aAAa,iBAIxB;AAQK,MAAM,2BAA2B,GAAG,CAAC,YAAsB,EAAE,KAAkB,EAAW,EAAE;IAC/F,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC/B,OAAO,IAAI,CAAC;IAChB,CAAC;IACD,KAAK,MAAM,UAAU,IAAI,KAAK,EAAE,CAAC;QAC7B,IAAI,MAAM,GAAG,IAAI,CAAC;QAClB,KAAK,MAAM,UAAU,IAAI,UAAU,EAAE,CAAC;YAClC,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC;gBACrC,MAAM,GAAG,KAAK,CAAC;gBACf,MAAM;YACV,CAAC;QACL,CAAC;QACD,IAAI,MAAM,EAAE,CAAC;YACT,OAAO,IAAI,CAAC;QAChB,CAAC;IACL,CAAC;IACD,OAAO,KAAK,CAAC;AACjB,CAAC,CAAC;AAjBW,QAAA,2BAA2B,+BAiBtC;AAQK,MAAM,6BAA6B,GAAG,CAAC,UAAkB,EAAE,sBAAsB,GAAG,IAAI,EAAY,EAAE;IACzG,IAAI,CAAC,sBAAsB,IAAI,CAAC,UAAU,KAAK,SAAS,IAAI,UAAU,KAAK,QAAQ,CAAC,EAAE,CAAC;QACnF,UAAU,GAAG,MAAM,CAAC;IACxB,CAAC;IACD,QAAQ,UAAU,EAAE,CAAC;QACjB,KAAK,OAAO;YACR,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;QAC9B,KAAK,QAAQ;YACT,OAAO,CAAC,UAAU,CAAC,IAAI,EAAE,UAAU,CAAC,GAAG,EAAE,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC;QACjF,KAAK,oBAAoB;YACrB,OAAO,CAAC,UAAU,CAAC,kBAAkB,CAAC,CAAC;QAC3C,KAAK,yBAAyB;YAC1B,OAAO,CAAC,UAAU,CAAC,uBAAuB,CAAC,CAAC;QAChD,KAAK,mBAAmB;YACpB,OAAO,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAC;QAC1C,KAAK,SAAS;YACV,OAAO,CAAC,GAAG,CAAC,CAAC;QACjB,KAAK,QAAQ;YACT,OAAO,CAAC,GAAG,CAAC,CAAC;QACjB;YACI,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IACjC,CAAC;AACL,CAAC,CAAA;AAtBY,QAAA,6BAA6B,iCAsBzC;AAEM,MAAM,6BAA6B,GAAG,CAAC,qBAAkC,EAAU,EAAE;IACxF,IAAI,CAAC,qBAAqB,EAAE,CAAC;QACzB,OAAO,6BAA6B,CAAC;IACzC,CAAC;IACD,OAAO,kBAAkB,GAAG,qBAAqB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,GAAG,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,GAAG,CAAC;AAC/G,CAAC,CAAA;AALY,QAAA,6BAA6B,iCAKzC"}
@@ -0,0 +1,55 @@
1
+ import { Capability } from "./capability";
2
+ export declare class UserCapabilityDTO {
3
+ userId: string;
4
+ capability?: string;
5
+ capabilities: Capability[];
6
+ }
7
+ export interface EntityOwnershipRemoveUserCapabilityDTO {
8
+ userId: string;
9
+ }
10
+ export interface EntityOwnershipSetGroupIdDTO {
11
+ userId: string;
12
+ groupId: string;
13
+ }
14
+ export interface EntityOwnershipDTO {
15
+ userCapabilities: UserCapabilityDTO[];
16
+ entityGroup: string;
17
+ entityName: string;
18
+ entityId: string;
19
+ overriderRoles: string[];
20
+ entityOwnershipGroupId: string;
21
+ }
22
+ export interface EntityOwnershipInsertCapabiltyDTO {
23
+ entityGroup: string;
24
+ entityName: string;
25
+ entityId: string;
26
+ userId: string;
27
+ capabilities: Capability[];
28
+ }
29
+ export interface EntityOwnershipUserSearch {
30
+ entityGroup: string;
31
+ entityName: string;
32
+ userId?: string;
33
+ entityOwnershipGroupId?: string;
34
+ requestedCapabilities?: number[][];
35
+ }
36
+ export interface EntityOwnershipSearch {
37
+ entityGroup: string;
38
+ entityName: string;
39
+ entityId?: string;
40
+ }
41
+ export interface EntityOwnershipUserCheck {
42
+ entityGroup: string;
43
+ entityName: string;
44
+ entityId?: string;
45
+ requestedCapabilities?: number[][];
46
+ userId: string;
47
+ entityOwnershipGroupId?: string;
48
+ }
49
+ export interface EntityOwnershipGroupIdCheck {
50
+ entityGroup: string;
51
+ entityName: string;
52
+ entityId?: string;
53
+ requestedCapabilities?: number[][];
54
+ entityOwnershipGroupId: string;
55
+ }
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UserCapabilityDTO = void 0;
4
+ class UserCapabilityDTO {
5
+ constructor() {
6
+ this.capabilities = [];
7
+ }
8
+ }
9
+ exports.UserCapabilityDTO = UserCapabilityDTO;
10
+ //# sourceMappingURL=entity-ownership-dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entity-ownership-dto.js","sourceRoot":"","sources":["../../../../../libs/users-common/src/entity-ownership-dto.ts"],"names":[],"mappings":";;;AAEA,MAAa,iBAAiB;IAA9B;QAGI,iBAAY,GAAiB,EAAE,CAAC;IACpC,CAAC;CAAA;AAJD,8CAIC"}
@@ -0,0 +1,63 @@
1
+ import { Capability } from "./capability";
2
+ export type GroupCapability = 'OWNER' | 'VIEWER' | "EDITOR" | "META_EDIT" | 'ADJUST_MEMBERS' | 'ONLY_EDIT_MEMBER_CAPABILITIES';
3
+ export declare class EntityOwnershipGroupCommonDTO {
4
+ id?: string;
5
+ name: string;
6
+ description: string;
7
+ initialUserId?: string;
8
+ initialUserEntityCapabilities: EOGUserEntityCapabilityDTO[];
9
+ }
10
+ export declare class EntityOwnershipGroupSearchDTO {
11
+ id?: string;
12
+ name: string;
13
+ description?: string;
14
+ memberUserId?: string;
15
+ admin?: "true" | "false";
16
+ }
17
+ export declare class EntityOwnershipGroupDTO {
18
+ id?: string;
19
+ name: string;
20
+ description?: string;
21
+ }
22
+ export declare class EntityOwnershipGroupMetaDTO {
23
+ id: string;
24
+ name: string;
25
+ description?: string;
26
+ }
27
+ export declare class EOGUserEntityCapabilityDTO {
28
+ entityGroup: string;
29
+ entityName: string;
30
+ capability?: string;
31
+ capabilities: Capability[];
32
+ }
33
+ export declare class EOGUserCapabilityDTO {
34
+ userId: string;
35
+ userFullName?: string;
36
+ entityCapabilities: EOGUserEntityCapabilityDTO[];
37
+ groupCapability?: GroupCapability;
38
+ groupCapabilities: Capability[];
39
+ }
40
+ export declare class EOGUserCapabilityInviteDTO {
41
+ userLogin: string;
42
+ entityCapabilities: EOGUserEntityCapabilityDTO[];
43
+ groupCapability?: GroupCapability;
44
+ capabilities: Capability[];
45
+ }
46
+ export declare class EOGUserCapabilityInvitationDTO {
47
+ eogName: string;
48
+ eogDescription: string;
49
+ eogId: string;
50
+ invitedByUserId: string;
51
+ invitedByUserName: string;
52
+ userName: string;
53
+ userId: string;
54
+ invitationId: string;
55
+ entityCapabilities: EOGUserEntityCapabilityDTO[];
56
+ groupCapability?: GroupCapability;
57
+ groupCapabilities: Capability[];
58
+ }
59
+ export declare class EOGCheckUserGroupCapabilityDTO {
60
+ entityOwnershipGroupId: string;
61
+ userId: string;
62
+ requestedCapabilities: number[][];
63
+ }
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EOGCheckUserGroupCapabilityDTO = exports.EOGUserCapabilityInvitationDTO = exports.EOGUserCapabilityInviteDTO = exports.EOGUserCapabilityDTO = exports.EOGUserEntityCapabilityDTO = exports.EntityOwnershipGroupMetaDTO = exports.EntityOwnershipGroupDTO = exports.EntityOwnershipGroupSearchDTO = exports.EntityOwnershipGroupCommonDTO = void 0;
4
+ class EntityOwnershipGroupCommonDTO {
5
+ }
6
+ exports.EntityOwnershipGroupCommonDTO = EntityOwnershipGroupCommonDTO;
7
+ class EntityOwnershipGroupSearchDTO {
8
+ }
9
+ exports.EntityOwnershipGroupSearchDTO = EntityOwnershipGroupSearchDTO;
10
+ class EntityOwnershipGroupDTO {
11
+ }
12
+ exports.EntityOwnershipGroupDTO = EntityOwnershipGroupDTO;
13
+ class EntityOwnershipGroupMetaDTO {
14
+ }
15
+ exports.EntityOwnershipGroupMetaDTO = EntityOwnershipGroupMetaDTO;
16
+ class EOGUserEntityCapabilityDTO {
17
+ constructor() {
18
+ this.capabilities = [];
19
+ }
20
+ }
21
+ exports.EOGUserEntityCapabilityDTO = EOGUserEntityCapabilityDTO;
22
+ class EOGUserCapabilityDTO {
23
+ constructor() {
24
+ this.groupCapabilities = [];
25
+ }
26
+ }
27
+ exports.EOGUserCapabilityDTO = EOGUserCapabilityDTO;
28
+ class EOGUserCapabilityInviteDTO {
29
+ constructor() {
30
+ this.capabilities = [];
31
+ }
32
+ }
33
+ exports.EOGUserCapabilityInviteDTO = EOGUserCapabilityInviteDTO;
34
+ class EOGUserCapabilityInvitationDTO {
35
+ constructor() {
36
+ this.groupCapabilities = [];
37
+ }
38
+ }
39
+ exports.EOGUserCapabilityInvitationDTO = EOGUserCapabilityInvitationDTO;
40
+ class EOGCheckUserGroupCapabilityDTO {
41
+ constructor() {
42
+ this.requestedCapabilities = [];
43
+ }
44
+ }
45
+ exports.EOGCheckUserGroupCapabilityDTO = EOGCheckUserGroupCapabilityDTO;
46
+ //# sourceMappingURL=entity-ownership-group.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entity-ownership-group.js","sourceRoot":"","sources":["../../../../../libs/users-common/src/entity-ownership-group.ts"],"names":[],"mappings":";;;AAIA,MAAa,6BAA6B;CAgBzC;AAhBD,sEAgBC;AAED,MAAa,6BAA6B;CAMzC;AAND,sEAMC;AAED,MAAa,uBAAuB;CAKnC;AALD,0DAKC;AAGD,MAAa,2BAA2B;CAKvC;AALD,kEAKC;AAED,MAAa,0BAA0B;IAAvC;QAOI,iBAAY,GAAiB,EAAE,CAAC;IACpC,CAAC;CAAA;AARD,gEAQC;AACD,MAAa,oBAAoB;IAAjC;QASI,sBAAiB,GAAiB,EAAE,CAAC;IAEzC,CAAC;CAAA;AAXD,oDAWC;AAGD,MAAa,0BAA0B;IAAvC;QAOI,iBAAY,GAAiB,EAAE,CAAC;IAEpC,CAAC;CAAA;AATD,gEASC;AAGD,MAAa,8BAA8B;IAA3C;QAcI,sBAAiB,GAAiB,EAAE,CAAC;IAEzC,CAAC;CAAA;AAhBD,wEAgBC;AAED,MAAa,8BAA8B;IAA3C;QAMI,0BAAqB,GAAe,EAAE,CAAC;IAC3C,CAAC;CAAA;AAPD,wEAOC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error-consts.js","sourceRoot":"","sources":["../../../../../libs/users-common/src/error-consts.ts"],"names":[],"mappings":";;;AAAA,MAAa,mBAAmB;;AAAhC,kDAMC;AALmB,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 @@
1
+ {"version":3,"file":"error-informations.js","sourceRoot":"","sources":["../../../../../libs/users-common/src/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"}
@@ -10,3 +10,6 @@ export * from './user-create-dto';
10
10
  export * from './password-change-dto';
11
11
  export * from './user-full-dto';
12
12
  export * from './error-informations';
13
+ export * from './entity-ownership-dto';
14
+ export * from "./entity-ownership-group";
15
+ export * from './capability';
package/index.js ADDED
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./user-auth.model"), exports);
18
+ __exportStar(require("./user-auth-status.model"), exports);
19
+ __exportStar(require("./user-register.model"), exports);
20
+ __exportStar(require("./error-consts"), exports);
21
+ __exportStar(require("./user-general-info-dto"), exports);
22
+ __exportStar(require("./user-dto"), exports);
23
+ __exportStar(require("./user-admin-dto"), exports);
24
+ __exportStar(require("./user-minimalized.dto"), exports);
25
+ __exportStar(require("./user-create-dto"), exports);
26
+ __exportStar(require("./password-change-dto"), exports);
27
+ __exportStar(require("./user-full-dto"), exports);
28
+ __exportStar(require("./error-informations"), exports);
29
+ __exportStar(require("./entity-ownership-dto"), exports);
30
+ __exportStar(require("./entity-ownership-group"), exports);
31
+ __exportStar(require("./capability"), exports);
32
+ //# sourceMappingURL=index.js.map
package/index.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/users-common/src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,2DAAyC;AACzC,wDAAsC;AACtC,iDAA+B;AAC/B,0DAAwC;AACxC,6CAA2B;AAC3B,mDAAiC;AACjC,yDAAuC;AACvC,oDAAkC;AAClC,wDAAsC;AACtC,kDAAgC;AAChC,uDAAqC;AACrC,yDAAuC;AACvC,2DAAyC;AACzC,+CAA6B"}
package/package.json CHANGED
@@ -1 +1 @@
1
- { "name": "@ubs-platform/users-common", "version": "1.1.4", "license": "MIT", "dependencies": { "tslib": "^2.3.0" }, "devDependencies": { "typescript": "~5.3.2", "@types/node": "~18.16.9" }, "publishConfig": { "access": "public" }, "peerDependencies": {}, "scripts": { "build": "tsc", "build-publish": "npm run build && npm publish" }, "type": "commonjs", "main": "./dist/index.js" }
1
+ {"name":"@ubs-platform/users-common","version":"1.4.0","description":"","repository":{"type":"git","url":"git+https://github.com/ubs-platform/ubs-mona-mr.git"},"homepage":"https://github.com/ubs-platform/ubs-mona-mr","iksir":{"type":"LIBRARY","libraryMode":"PEER","buildSubFolder":"users-common/src"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"ISC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"password-change-dto.js","sourceRoot":"","sources":["../../../../../libs/users-common/src/password-change-dto.ts"],"names":[],"mappings":""}
@@ -7,5 +7,6 @@ export interface UserAuthBackendDTO {
7
7
  suspended: boolean;
8
8
  suspendReason: string;
9
9
  roles: string[];
10
+ localeCode: string;
10
11
  active: boolean;
11
12
  }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user-admin-dto.js","sourceRoot":"","sources":["../../../../../libs/users-common/src/user-admin-dto.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ import { SearchRequest } from '@ubs-platform/crud-base-common';
2
+ export interface UserAdminSearch extends SearchRequest {
3
+ name: string;
4
+ username: string;
5
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=user-admin-search.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user-admin-search.dto.js","sourceRoot":"","sources":["../../../../../libs/users-common/src/user-admin-search.dto.ts"],"names":[],"mappings":""}
@@ -4,8 +4,8 @@ export interface UserAuthStatus {
4
4
  token?: string;
5
5
  }
6
6
  export declare class UserAuthSuccess implements UserAuthStatus {
7
- token?: string;
8
- constructor(token?: string);
7
+ token?: string | undefined;
8
+ constructor(token?: string | undefined);
9
9
  success: boolean;
10
10
  message: string;
11
11
  }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user-auth-status.model.js","sourceRoot":"","sources":["../../../../../libs/users-common/src/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 @@
1
+ {"version":3,"file":"user-auth.model.js","sourceRoot":"","sources":["../../../../../libs/users-common/src/user-auth.model.ts"],"names":[],"mappings":""}
@@ -1,6 +1,3 @@
1
- /**
2
- * ‼️‼️ do not use in frontend ‼️‼️
3
- */
4
1
  export interface UserCreateDTO {
5
2
  username: string;
6
3
  password: string;
@@ -8,5 +5,6 @@ export interface UserCreateDTO {
8
5
  name: string;
9
6
  surname: string;
10
7
  active: boolean;
8
+ localeCode: string;
11
9
  roles: Array<string>;
12
10
  }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user-create-dto.js","sourceRoot":"","sources":["../../../../../libs/users-common/src/user-create-dto.ts"],"names":[],"mappings":""}
@@ -7,4 +7,5 @@ export interface UserDTO {
7
7
  suspended: boolean;
8
8
  suspendReason: string;
9
9
  active: boolean;
10
+ localeCode: string;
10
11
  }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user-dto.js","sourceRoot":"","sources":["../../../../../libs/users-common/src/user-dto.ts"],"names":[],"mappings":""}
@@ -16,4 +16,5 @@ export interface UserFullDto {
16
16
  suspended: boolean;
17
17
  suspendReason: string;
18
18
  password?: string;
19
+ localeCode: string;
19
20
  }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user-full-dto.js","sourceRoot":"","sources":["../../../../../libs/users-common/src/user-full-dto.ts"],"names":[],"mappings":""}
@@ -9,6 +9,6 @@ export interface UserGeneralInfoDTO {
9
9
  state: string;
10
10
  city: string;
11
11
  district: string;
12
- fromNpmDepency: boolean;
13
- fromLocalLibrary: boolean;
12
+ localeCode: string;
13
+ username: string;
14
14
  }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user-general-info-dto.js","sourceRoot":"","sources":["../../../../../libs/users-common/src/user-general-info-dto.ts"],"names":[],"mappings":""}
@@ -2,4 +2,5 @@ export interface UserOnlyRequiredDTO {
2
2
  name: string;
3
3
  surname: string;
4
4
  id: string;
5
+ localeCode: string;
5
6
  }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user-minimalized.dto.js","sourceRoot":"","sources":["../../../../../libs/users-common/src/user-minimalized.dto.ts"],"names":[],"mappings":""}
@@ -1,7 +1,9 @@
1
1
  export interface UserRegisterDTO {
2
+ registerId: string;
2
3
  username: string;
3
4
  password: string;
4
5
  primaryEmail: string;
5
6
  name: string;
6
7
  surname: string;
8
+ localeCode: string;
7
9
  }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user-register.model.js","sourceRoot":"","sources":["../../../../../libs/users-common/src/user-register.model.ts"],"names":[],"mappings":""}
package/.eslintrc.json DELETED
@@ -1,25 +0,0 @@
1
- {
2
- "extends": ["../../.eslintrc.base.json"],
3
- "ignorePatterns": ["!**/*"],
4
- "overrides": [
5
- {
6
- "files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
7
- "rules": {}
8
- },
9
- {
10
- "files": ["*.ts", "*.tsx"],
11
- "rules": {}
12
- },
13
- {
14
- "files": ["*.js", "*.jsx"],
15
- "rules": {}
16
- },
17
- {
18
- "files": ["*.json"],
19
- "parser": "jsonc-eslint-parser",
20
- "rules": {
21
- "@nx/dependency-checks": "error"
22
- }
23
- }
24
- ]
25
- }
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2024 UBS Platform
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
package/README.md DELETED
@@ -1,5 +0,0 @@
1
- # users-common
2
-
3
- This library has common declerations that is used as HttpResponse in Users Mona
4
-
5
- Will be documented well soon
package/dist/index.d.ts DELETED
@@ -1 +0,0 @@
1
- export * from './lib/dto';
package/dist/index.js DELETED
@@ -1,5 +0,0 @@
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
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,oDAA0B"}
@@ -1 +0,0 @@
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"}
@@ -1 +0,0 @@
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"}
@@ -1,16 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"password-change-dto.js","sourceRoot":"","sources":["../../../src/lib/dto/password-change-dto.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"user-admin-dto.js","sourceRoot":"","sources":["../../../src/lib/dto/user-admin-dto.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
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"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"user-auth.model.js","sourceRoot":"","sources":["../../../src/lib/dto/user-auth.model.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"user-create-dto.js","sourceRoot":"","sources":["../../../src/lib/dto/user-create-dto.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"user-dto.js","sourceRoot":"","sources":["../../../src/lib/dto/user-dto.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"user-full-dto.js","sourceRoot":"","sources":["../../../src/lib/dto/user-full-dto.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"user-general-info-dto.js","sourceRoot":"","sources":["../../../src/lib/dto/user-general-info-dto.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"user-minimalized.dto.js","sourceRoot":"","sources":["../../../src/lib/dto/user-minimalized.dto.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"user-register.model.js","sourceRoot":"","sources":["../../../src/lib/dto/user-register.model.ts"],"names":[],"mappings":""}
package/jest.config.ts DELETED
@@ -1,11 +0,0 @@
1
- /* eslint-disable */
2
- export default {
3
- displayName: 'nest-microservice-setup-util',
4
- preset: '../../jest.preset.js',
5
- testEnvironment: 'node',
6
- transform: {
7
- '^.+\\.[tj]s$': ['ts-jest', { tsconfig: '<rootDir>/tsconfig.spec.json' }],
8
- },
9
- moduleFileExtensions: ['ts', 'js', 'html'],
10
- coverageDirectory: '../../coverage/libs/nest-microservice-setup-util',
11
- };
package/tsconfig.json DELETED
@@ -1,26 +0,0 @@
1
- {
2
- "compileOnSave": false,
3
- "compilerOptions": {
4
- "rootDir": "./src",
5
- "sourceMap": true,
6
- "moduleResolution": "node",
7
- "emitDecoratorMetadata": true,
8
- "experimentalDecorators": true,
9
- "importHelpers": true,
10
- "target": "es2015",
11
- "module": "commonjs",
12
- "outDir": "./dist",
13
- "lib": ["es2020", "dom"],
14
- "skipLibCheck": true,
15
- "skipDefaultLibCheck": true,
16
- "declaration": true,
17
- },
18
- "exclude": [
19
- "node_modules",
20
- "tmp",
21
- "jest.config.ts",
22
- "src/**/*.spec.ts",
23
- "src/**/*.test.ts"
24
- ],
25
- "include": ["src/**/*.ts"]
26
- }
package/tsconfig.lib.json DELETED
@@ -1,10 +0,0 @@
1
- {
2
- "extends": "./tsconfig.json",
3
- "compilerOptions": {
4
- "outDir": "../../dist/out-tsc",
5
- "declaration": true,
6
- "types": ["node"]
7
- },
8
- "include": ["src/**/*.ts"],
9
- "exclude": ["src/**/*.spec.ts", "src/**/*.test.ts"]
10
- }
@@ -1,14 +0,0 @@
1
- {
2
- "extends": "./tsconfig.json",
3
- "compilerOptions": {
4
- "outDir": "../../dist/out-tsc",
5
- "module": "commonjs",
6
- "types": ["jest", "node"]
7
- },
8
- "include": [
9
- "jest.config.ts",
10
- "src/**/*.test.ts",
11
- "src/**/*.spec.ts",
12
- "src/**/*.d.ts"
13
- ]
14
- }
File without changes