synunu-libs 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/dist/entities/branch.entity.d.ts +10 -0
  2. package/dist/entities/branch.entity.d.ts.map +1 -0
  3. package/dist/entities/branch.entity.js +48 -0
  4. package/dist/entities/branch.entity.js.map +1 -0
  5. package/dist/entities/index.d.ts +3 -0
  6. package/dist/entities/index.d.ts.map +1 -0
  7. package/dist/entities/index.js +19 -0
  8. package/dist/entities/index.js.map +1 -0
  9. package/dist/entities/membership.entity.d.ts +17 -0
  10. package/dist/entities/membership.entity.d.ts.map +1 -0
  11. package/dist/entities/membership.entity.js +67 -0
  12. package/dist/entities/membership.entity.js.map +1 -0
  13. package/dist/entities/organization.entity.d.ts +12 -0
  14. package/dist/entities/organization.entity.d.ts.map +1 -0
  15. package/dist/entities/organization.entity.js +53 -0
  16. package/dist/entities/organization.entity.js.map +1 -0
  17. package/dist/entities/role.entity.d.ts +18 -0
  18. package/dist/entities/role.entity.d.ts.map +1 -0
  19. package/dist/entities/role.entity.js +51 -0
  20. package/dist/entities/role.entity.js.map +1 -0
  21. package/dist/entities/user.entity.d.ts +18 -0
  22. package/dist/entities/user.entity.d.ts.map +1 -0
  23. package/dist/entities/user.entity.js +70 -0
  24. package/dist/entities/user.entity.js.map +1 -0
  25. package/dist/enum/account-status.enum.d.ts +6 -0
  26. package/dist/enum/account-status.enum.d.ts.map +1 -0
  27. package/dist/enum/account-status.enum.js +15 -0
  28. package/dist/enum/account-status.enum.js.map +1 -0
  29. package/dist/interfaces/account.interface.d.ts +13 -0
  30. package/dist/interfaces/account.interface.d.ts.map +1 -0
  31. package/dist/interfaces/account.interface.js +3 -0
  32. package/dist/interfaces/account.interface.js.map +1 -0
  33. package/dist/types/date-range.type.d.ts +5 -0
  34. package/dist/types/date-range.type.d.ts.map +1 -0
  35. package/dist/types/date-range.type.js +3 -0
  36. package/dist/types/date-range.type.js.map +1 -0
  37. package/dist/types/paginated-result.type.d.ts +7 -0
  38. package/dist/types/paginated-result.type.d.ts.map +1 -0
  39. package/dist/types/paginated-result.type.js +38 -0
  40. package/dist/types/paginated-result.type.js.map +1 -0
  41. package/package.json +4 -2
@@ -0,0 +1,10 @@
1
+ export declare class BranchEntity {
2
+ _id: string;
3
+ name: string;
4
+ code: string;
5
+ organizationId: string;
6
+ description?: string;
7
+ createdAt: number;
8
+ createdBy?: string;
9
+ }
10
+ //# sourceMappingURL=branch.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"branch.entity.d.ts","sourceRoot":"","sources":["../../src/entities/branch.entity.ts"],"names":[],"mappings":"AAEA,qBACa,YAAY;IAEvB,GAAG,EAAE,MAAM,CAAC;IAGZ,IAAI,EAAE,MAAM,CAAC;IAGb,IAAI,EAAE,MAAM,CAAC;IAGb,cAAc,EAAE,MAAM,CAAC;IAGvB,WAAW,CAAC,EAAE,MAAM,CAAC;IAGrB,SAAS,EAAE,MAAM,CAAC;IAGlB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.BranchEntity = void 0;
13
+ const graphql_1 = require("@nestjs/graphql");
14
+ let BranchEntity = class BranchEntity {
15
+ };
16
+ exports.BranchEntity = BranchEntity;
17
+ __decorate([
18
+ (0, graphql_1.Field)(() => graphql_1.ID),
19
+ __metadata("design:type", String)
20
+ ], BranchEntity.prototype, "_id", void 0);
21
+ __decorate([
22
+ (0, graphql_1.Field)(),
23
+ __metadata("design:type", String)
24
+ ], BranchEntity.prototype, "name", void 0);
25
+ __decorate([
26
+ (0, graphql_1.Field)(),
27
+ __metadata("design:type", String)
28
+ ], BranchEntity.prototype, "code", void 0);
29
+ __decorate([
30
+ (0, graphql_1.Field)(),
31
+ __metadata("design:type", String)
32
+ ], BranchEntity.prototype, "organizationId", void 0);
33
+ __decorate([
34
+ (0, graphql_1.Field)({ nullable: true }),
35
+ __metadata("design:type", String)
36
+ ], BranchEntity.prototype, "description", void 0);
37
+ __decorate([
38
+ (0, graphql_1.Field)(() => Number),
39
+ __metadata("design:type", Number)
40
+ ], BranchEntity.prototype, "createdAt", void 0);
41
+ __decorate([
42
+ (0, graphql_1.Field)({ nullable: true }),
43
+ __metadata("design:type", String)
44
+ ], BranchEntity.prototype, "createdBy", void 0);
45
+ exports.BranchEntity = BranchEntity = __decorate([
46
+ (0, graphql_1.ObjectType)()
47
+ ], BranchEntity);
48
+ //# sourceMappingURL=branch.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"branch.entity.js","sourceRoot":"","sources":["../../src/entities/branch.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAwD;AAGjD,IAAM,YAAY,GAAlB,MAAM,YAAY;CAqBxB,CAAA;AArBY,oCAAY;AAEvB;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,YAAE,CAAC;;yCACJ;AAGZ;IADC,IAAA,eAAK,GAAE;;0CACK;AAGb;IADC,IAAA,eAAK,GAAE;;0CACK;AAGb;IADC,IAAA,eAAK,GAAE;;oDACe;AAGvB;IADC,IAAA,eAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iDACL;AAGrB;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;;+CACF;AAGlB;IADC,IAAA,eAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACP;uBApBR,YAAY;IADxB,IAAA,oBAAU,GAAE;GACA,YAAY,CAqBxB"}
@@ -0,0 +1,3 @@
1
+ export * from "./branch.entity";
2
+ export * from "./user.entity";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/entities/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC"}
@@ -0,0 +1,19 @@
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("./branch.entity"), exports);
18
+ __exportStar(require("./user.entity"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/entities/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC;AAChC,gDAA8B"}
@@ -0,0 +1,17 @@
1
+ import { OrganizationEntity } from "./organization.entity";
2
+ import { BranchEntity } from "./branch.entity";
3
+ import { RoleEntity } from "./role.entity";
4
+ export declare class MembershipEntity {
5
+ _id: string;
6
+ name: string;
7
+ userId: string;
8
+ roleId: string;
9
+ organizationId?: string;
10
+ branchId?: string;
11
+ createdAt: number;
12
+ updatedAt: number;
13
+ organization: OrganizationEntity;
14
+ branch: BranchEntity;
15
+ role: RoleEntity;
16
+ }
17
+ //# sourceMappingURL=membership.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"membership.entity.d.ts","sourceRoot":"","sources":["../../src/entities/membership.entity.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,qBACa,gBAAgB;IAE3B,GAAG,EAAE,MAAM,CAAC;IAGZ,IAAI,EAAE,MAAM,CAAC;IAGb,MAAM,EAAE,MAAM,CAAC;IAGf,MAAM,EAAE,MAAM,CAAC;IAGf,cAAc,CAAC,EAAE,MAAM,CAAC;IAGxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAGlB,SAAS,EAAE,MAAM,CAAC;IAGlB,SAAS,EAAE,MAAM,CAAC;IAGlB,YAAY,EAAE,kBAAkB,CAAC;IAGjC,MAAM,EAAE,YAAY,CAAC;IAGrB,IAAI,EAAE,UAAU,CAAC;CAClB"}
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.MembershipEntity = void 0;
13
+ const graphql_1 = require("@nestjs/graphql");
14
+ const organization_entity_1 = require("./organization.entity");
15
+ const branch_entity_1 = require("./branch.entity");
16
+ const role_entity_1 = require("./role.entity");
17
+ let MembershipEntity = class MembershipEntity {
18
+ };
19
+ exports.MembershipEntity = MembershipEntity;
20
+ __decorate([
21
+ (0, graphql_1.Field)(() => graphql_1.ID),
22
+ __metadata("design:type", String)
23
+ ], MembershipEntity.prototype, "_id", void 0);
24
+ __decorate([
25
+ (0, graphql_1.Field)(() => String),
26
+ __metadata("design:type", String)
27
+ ], MembershipEntity.prototype, "name", void 0);
28
+ __decorate([
29
+ (0, graphql_1.Field)(() => String),
30
+ __metadata("design:type", String)
31
+ ], MembershipEntity.prototype, "userId", void 0);
32
+ __decorate([
33
+ (0, graphql_1.Field)(() => String),
34
+ __metadata("design:type", String)
35
+ ], MembershipEntity.prototype, "roleId", void 0);
36
+ __decorate([
37
+ (0, graphql_1.Field)(() => String, { nullable: true }),
38
+ __metadata("design:type", String)
39
+ ], MembershipEntity.prototype, "organizationId", void 0);
40
+ __decorate([
41
+ (0, graphql_1.Field)(() => String, { nullable: true }),
42
+ __metadata("design:type", String)
43
+ ], MembershipEntity.prototype, "branchId", void 0);
44
+ __decorate([
45
+ (0, graphql_1.Field)(() => Number),
46
+ __metadata("design:type", Number)
47
+ ], MembershipEntity.prototype, "createdAt", void 0);
48
+ __decorate([
49
+ (0, graphql_1.Field)(() => Number),
50
+ __metadata("design:type", Number)
51
+ ], MembershipEntity.prototype, "updatedAt", void 0);
52
+ __decorate([
53
+ (0, graphql_1.Field)(() => organization_entity_1.OrganizationEntity),
54
+ __metadata("design:type", organization_entity_1.OrganizationEntity)
55
+ ], MembershipEntity.prototype, "organization", void 0);
56
+ __decorate([
57
+ (0, graphql_1.Field)(() => branch_entity_1.BranchEntity),
58
+ __metadata("design:type", branch_entity_1.BranchEntity)
59
+ ], MembershipEntity.prototype, "branch", void 0);
60
+ __decorate([
61
+ (0, graphql_1.Field)(() => role_entity_1.RoleEntity),
62
+ __metadata("design:type", role_entity_1.RoleEntity)
63
+ ], MembershipEntity.prototype, "role", void 0);
64
+ exports.MembershipEntity = MembershipEntity = __decorate([
65
+ (0, graphql_1.ObjectType)()
66
+ ], MembershipEntity);
67
+ //# sourceMappingURL=membership.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"membership.entity.js","sourceRoot":"","sources":["../../src/entities/membership.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAwD;AACxD,+DAA2D;AAC3D,mDAA+C;AAC/C,+CAA2C;AAGpC,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;CAiC5B,CAAA;AAjCY,4CAAgB;AAE3B;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,YAAE,CAAC;;6CACJ;AAGZ;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;;8CACP;AAGb;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;;gDACL;AAGf;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;;gDACL;AAGf;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wDAChB;AAGxB;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kDACtB;AAGlB;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;;mDACF;AAGlB;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;;mDACF;AAGlB;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,wCAAkB,CAAC;8BAClB,wCAAkB;sDAAC;AAGjC;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,4BAAY,CAAC;8BAClB,4BAAY;gDAAC;AAGrB;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,wBAAU,CAAC;8BAClB,wBAAU;8CAAC;2BAhCN,gBAAgB;IAD5B,IAAA,oBAAU,GAAE;GACA,gBAAgB,CAiC5B"}
@@ -0,0 +1,12 @@
1
+ import { UserEntity } from "./user.entity";
2
+ export declare class OrganizationEntity {
3
+ _id: string;
4
+ name: string;
5
+ language: string[];
6
+ description?: string;
7
+ createdBy: string;
8
+ createdAt: number;
9
+ updatedAt: number;
10
+ creator?: UserEntity;
11
+ }
12
+ //# sourceMappingURL=organization.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organization.entity.d.ts","sourceRoot":"","sources":["../../src/entities/organization.entity.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,qBACa,kBAAkB;IAE7B,GAAG,EAAE,MAAM,CAAC;IAGZ,IAAI,EAAE,MAAM,CAAC;IAGb,QAAQ,EAAE,MAAM,EAAE,CAAC;IAGnB,WAAW,CAAC,EAAE,MAAM,CAAC;IAGrB,SAAS,EAAE,MAAM,CAAC;IAGlB,SAAS,EAAE,MAAM,CAAC;IAGlB,SAAS,EAAE,MAAM,CAAC;IAGlB,OAAO,CAAC,EAAE,UAAU,CAAC;CACtB"}
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.OrganizationEntity = void 0;
13
+ const graphql_1 = require("@nestjs/graphql");
14
+ const user_entity_1 = require("./user.entity");
15
+ let OrganizationEntity = class OrganizationEntity {
16
+ };
17
+ exports.OrganizationEntity = OrganizationEntity;
18
+ __decorate([
19
+ (0, graphql_1.Field)(() => graphql_1.ID),
20
+ __metadata("design:type", String)
21
+ ], OrganizationEntity.prototype, "_id", void 0);
22
+ __decorate([
23
+ (0, graphql_1.Field)(() => String),
24
+ __metadata("design:type", String)
25
+ ], OrganizationEntity.prototype, "name", void 0);
26
+ __decorate([
27
+ (0, graphql_1.Field)(() => [String]),
28
+ __metadata("design:type", Array)
29
+ ], OrganizationEntity.prototype, "language", void 0);
30
+ __decorate([
31
+ (0, graphql_1.Field)(() => String, { nullable: true }),
32
+ __metadata("design:type", String)
33
+ ], OrganizationEntity.prototype, "description", void 0);
34
+ __decorate([
35
+ (0, graphql_1.Field)(() => String),
36
+ __metadata("design:type", String)
37
+ ], OrganizationEntity.prototype, "createdBy", void 0);
38
+ __decorate([
39
+ (0, graphql_1.Field)(() => Number),
40
+ __metadata("design:type", Number)
41
+ ], OrganizationEntity.prototype, "createdAt", void 0);
42
+ __decorate([
43
+ (0, graphql_1.Field)(() => Number),
44
+ __metadata("design:type", Number)
45
+ ], OrganizationEntity.prototype, "updatedAt", void 0);
46
+ __decorate([
47
+ (0, graphql_1.Field)(() => user_entity_1.UserEntity, { nullable: true }),
48
+ __metadata("design:type", user_entity_1.UserEntity)
49
+ ], OrganizationEntity.prototype, "creator", void 0);
50
+ exports.OrganizationEntity = OrganizationEntity = __decorate([
51
+ (0, graphql_1.ObjectType)()
52
+ ], OrganizationEntity);
53
+ //# sourceMappingURL=organization.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organization.entity.js","sourceRoot":"","sources":["../../src/entities/organization.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAwD;AACxD,+CAA2C;AAGpC,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;CAwB9B,CAAA;AAxBY,gDAAkB;AAE7B;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,YAAE,CAAC;;+CACJ;AAGZ;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;;gDACP;AAGb;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC;;oDACH;AAGnB;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uDACnB;AAGrB;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;;qDACF;AAGlB;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;;qDACF;AAGlB;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;;qDACF;AAGlB;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,wBAAU,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BAClC,wBAAU;mDAAC;6BAvBV,kBAAkB;IAD9B,IAAA,oBAAU,GAAE;GACA,kBAAkB,CAwB9B"}
@@ -0,0 +1,18 @@
1
+ export declare class RoleEntity {
2
+ _id: string;
3
+ name: string;
4
+ description?: string;
5
+ createdAt: number;
6
+ updatedAt: number;
7
+ permissions?: string[];
8
+ }
9
+ declare const PaginatedRoleResult_base: abstract new () => {
10
+ items: RoleEntity[];
11
+ total: number;
12
+ page: number;
13
+ size: number;
14
+ };
15
+ export declare class PaginatedRoleResult extends PaginatedRoleResult_base {
16
+ }
17
+ export {};
18
+ //# sourceMappingURL=role.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"role.entity.d.ts","sourceRoot":"","sources":["../../src/entities/role.entity.ts"],"names":[],"mappings":"AAGA,qBACa,UAAU;IAErB,GAAG,EAAE,MAAM,CAAC;IAGZ,IAAI,EAAE,MAAM,CAAC;IAGb,WAAW,CAAC,EAAE,MAAM,CAAC;IAGrB,SAAS,EAAE,MAAM,CAAC;IAGlB,SAAS,EAAE,MAAM,CAAC;IAGlB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;CACxB;;;;;;;AAED,qBACa,mBAAoB,SAAQ,wBAA2B;CAAG"}
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.PaginatedRoleResult = exports.RoleEntity = void 0;
13
+ const graphql_1 = require("@nestjs/graphql");
14
+ const paginated_result_type_1 = require("types/paginated-result.type");
15
+ let RoleEntity = class RoleEntity {
16
+ };
17
+ exports.RoleEntity = RoleEntity;
18
+ __decorate([
19
+ (0, graphql_1.Field)(() => graphql_1.ID),
20
+ __metadata("design:type", String)
21
+ ], RoleEntity.prototype, "_id", void 0);
22
+ __decorate([
23
+ (0, graphql_1.Field)(() => String),
24
+ __metadata("design:type", String)
25
+ ], RoleEntity.prototype, "name", void 0);
26
+ __decorate([
27
+ (0, graphql_1.Field)(() => String, { nullable: true }),
28
+ __metadata("design:type", String)
29
+ ], RoleEntity.prototype, "description", void 0);
30
+ __decorate([
31
+ (0, graphql_1.Field)(() => Number),
32
+ __metadata("design:type", Number)
33
+ ], RoleEntity.prototype, "createdAt", void 0);
34
+ __decorate([
35
+ (0, graphql_1.Field)(() => Number),
36
+ __metadata("design:type", Number)
37
+ ], RoleEntity.prototype, "updatedAt", void 0);
38
+ __decorate([
39
+ (0, graphql_1.Field)(() => [String], { nullable: true }),
40
+ __metadata("design:type", Array)
41
+ ], RoleEntity.prototype, "permissions", void 0);
42
+ exports.RoleEntity = RoleEntity = __decorate([
43
+ (0, graphql_1.ObjectType)()
44
+ ], RoleEntity);
45
+ let PaginatedRoleResult = class PaginatedRoleResult extends (0, paginated_result_type_1.PaginatedResult)(RoleEntity) {
46
+ };
47
+ exports.PaginatedRoleResult = PaginatedRoleResult;
48
+ exports.PaginatedRoleResult = PaginatedRoleResult = __decorate([
49
+ (0, graphql_1.ObjectType)()
50
+ ], PaginatedRoleResult);
51
+ //# sourceMappingURL=role.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"role.entity.js","sourceRoot":"","sources":["../../src/entities/role.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAwD;AACxD,uEAA8D;AAGvD,IAAM,UAAU,GAAhB,MAAM,UAAU;CAkBtB,CAAA;AAlBY,gCAAU;AAErB;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,YAAE,CAAC;;uCACJ;AAGZ;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;;wCACP;AAGb;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACnB;AAGrB;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;;6CACF;AAGlB;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;;6CACF;AAGlB;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACnB;qBAjBZ,UAAU;IADtB,IAAA,oBAAU,GAAE;GACA,UAAU,CAkBtB;AAGM,IAAM,mBAAmB,GAAzB,MAAM,mBAAoB,SAAQ,IAAA,uCAAe,EAAC,UAAU,CAAC;CAAG,CAAA;AAA1D,kDAAmB;8BAAnB,mBAAmB;IAD/B,IAAA,oBAAU,GAAE;GACA,mBAAmB,CAAuC"}
@@ -0,0 +1,18 @@
1
+ import { EAccountStatus } from "enum/account-status.enum";
2
+ import { ISocialAccounts } from "interfaces/account.interface";
3
+ import { MembershipEntity } from "./membership.entity";
4
+ export declare class UserEntity {
5
+ _id: string;
6
+ userName?: string;
7
+ password?: string;
8
+ email?: string;
9
+ phone?: string;
10
+ fullName?: string;
11
+ isEmailVerified?: boolean;
12
+ status?: EAccountStatus;
13
+ lastLoginAt?: number;
14
+ lastLoginIp?: string;
15
+ socialAccounts?: ISocialAccounts | null;
16
+ memberships?: MembershipEntity[];
17
+ }
18
+ //# sourceMappingURL=user.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user.entity.d.ts","sourceRoot":"","sources":["../../src/entities/user.entity.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD,qBACa,UAAU;IAErB,GAAG,EAAE,MAAM,CAAC;IAGZ,QAAQ,CAAC,EAAE,MAAM,CAAC;IAGlB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAGlB,KAAK,CAAC,EAAE,MAAM,CAAC;IAGf,KAAK,CAAC,EAAE,MAAM,CAAC;IAGf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAGlB,eAAe,CAAC,EAAE,OAAO,CAAC;IAG1B,MAAM,CAAC,EAAE,cAAc,CAAC;IAGxB,WAAW,CAAC,EAAE,MAAM,CAAC;IAGrB,WAAW,CAAC,EAAE,MAAM,CAAC;IAGrB,cAAc,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IAGxC,WAAW,CAAC,EAAE,gBAAgB,EAAE,CAAC;CAClC"}
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.UserEntity = void 0;
13
+ const graphql_1 = require("@nestjs/graphql");
14
+ const account_status_enum_1 = require("enum/account-status.enum");
15
+ const membership_entity_1 = require("./membership.entity");
16
+ let UserEntity = class UserEntity {
17
+ };
18
+ exports.UserEntity = UserEntity;
19
+ __decorate([
20
+ (0, graphql_1.Field)(() => graphql_1.ID),
21
+ __metadata("design:type", String)
22
+ ], UserEntity.prototype, "_id", void 0);
23
+ __decorate([
24
+ (0, graphql_1.Field)({ nullable: true }),
25
+ __metadata("design:type", String)
26
+ ], UserEntity.prototype, "userName", void 0);
27
+ __decorate([
28
+ (0, graphql_1.Field)({ nullable: true }),
29
+ __metadata("design:type", String)
30
+ ], UserEntity.prototype, "password", void 0);
31
+ __decorate([
32
+ (0, graphql_1.Field)({ nullable: true }),
33
+ __metadata("design:type", String)
34
+ ], UserEntity.prototype, "email", void 0);
35
+ __decorate([
36
+ (0, graphql_1.Field)({ nullable: true }),
37
+ __metadata("design:type", String)
38
+ ], UserEntity.prototype, "phone", void 0);
39
+ __decorate([
40
+ (0, graphql_1.Field)({ nullable: true }),
41
+ __metadata("design:type", String)
42
+ ], UserEntity.prototype, "fullName", void 0);
43
+ __decorate([
44
+ (0, graphql_1.Field)({ nullable: true }),
45
+ __metadata("design:type", Boolean)
46
+ ], UserEntity.prototype, "isEmailVerified", void 0);
47
+ __decorate([
48
+ (0, graphql_1.Field)(() => account_status_enum_1.EAccountStatus, { nullable: true }),
49
+ __metadata("design:type", String)
50
+ ], UserEntity.prototype, "status", void 0);
51
+ __decorate([
52
+ (0, graphql_1.Field)(() => String, { nullable: true }),
53
+ __metadata("design:type", Number)
54
+ ], UserEntity.prototype, "lastLoginAt", void 0);
55
+ __decorate([
56
+ (0, graphql_1.Field)({ nullable: true }),
57
+ __metadata("design:type", String)
58
+ ], UserEntity.prototype, "lastLoginIp", void 0);
59
+ __decorate([
60
+ (0, graphql_1.Field)(() => [String], { nullable: true }),
61
+ __metadata("design:type", Object)
62
+ ], UserEntity.prototype, "socialAccounts", void 0);
63
+ __decorate([
64
+ (0, graphql_1.Field)(() => [membership_entity_1.MembershipEntity], { nullable: true }),
65
+ __metadata("design:type", Array)
66
+ ], UserEntity.prototype, "memberships", void 0);
67
+ exports.UserEntity = UserEntity = __decorate([
68
+ (0, graphql_1.ObjectType)()
69
+ ], UserEntity);
70
+ //# sourceMappingURL=user.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user.entity.js","sourceRoot":"","sources":["../../src/entities/user.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAwD;AACxD,kEAA0D;AAE1D,2DAAuD;AAGhD,IAAM,UAAU,GAAhB,MAAM,UAAU;CAoCtB,CAAA;AApCY,gCAAU;AAErB;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,YAAE,CAAC;;uCACJ;AAGZ;IADC,IAAA,eAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACR;AAGlB;IADC,IAAA,eAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACR;AAGlB;IADC,IAAA,eAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yCACX;AAGf;IADC,IAAA,eAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yCACX;AAGf;IADC,IAAA,eAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACR;AAGlB;IADC,IAAA,eAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDACA;AAG1B;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,oCAAc,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0CACxB;AAGxB;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACnB;AAGrB;IADC,IAAA,eAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACL;AAGrB;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kDACF;AAGxC;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,CAAC,oCAAgB,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACnB;qBAnCtB,UAAU;IADtB,IAAA,oBAAU,GAAE;GACA,UAAU,CAoCtB"}
@@ -0,0 +1,6 @@
1
+ export declare enum EAccountStatus {
2
+ ACTIVE = "ACTIVE",
3
+ INACTIVE = "INACTIVE",
4
+ BANNED = "BANNED"
5
+ }
6
+ //# sourceMappingURL=account-status.enum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"account-status.enum.d.ts","sourceRoot":"","sources":["../../src/enum/account-status.enum.ts"],"names":[],"mappings":"AAEA,oBAAY,cAAc;IACxB,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,MAAM,WAAW;CAClB"}
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EAccountStatus = void 0;
4
+ const graphql_1 = require("@nestjs/graphql");
5
+ var EAccountStatus;
6
+ (function (EAccountStatus) {
7
+ EAccountStatus["ACTIVE"] = "ACTIVE";
8
+ EAccountStatus["INACTIVE"] = "INACTIVE";
9
+ EAccountStatus["BANNED"] = "BANNED";
10
+ })(EAccountStatus || (exports.EAccountStatus = EAccountStatus = {}));
11
+ (0, graphql_1.registerEnumType)(EAccountStatus, {
12
+ name: "EAccountStatus",
13
+ description: "Trạng thái của tài khoản",
14
+ });
15
+ //# sourceMappingURL=account-status.enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"account-status.enum.js","sourceRoot":"","sources":["../../src/enum/account-status.enum.ts"],"names":[],"mappings":";;;AAAA,6CAAmD;AAEnD,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,mCAAiB,CAAA;IACjB,uCAAqB,CAAA;IACrB,mCAAiB,CAAA;AACnB,CAAC,EAJW,cAAc,8BAAd,cAAc,QAIzB;AAED,IAAA,0BAAgB,EAAC,cAAc,EAAE;IAC/B,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,0BAA0B;CACxC,CAAC,CAAC"}
@@ -0,0 +1,13 @@
1
+ interface ISocialAccount {
2
+ id: string;
3
+ email: string;
4
+ connectedAt: number;
5
+ name: string;
6
+ }
7
+ interface ISocialAccounts {
8
+ google?: ISocialAccount | null;
9
+ facebook?: ISocialAccount | null;
10
+ apple?: ISocialAccount | null;
11
+ }
12
+ export type { ISocialAccount, ISocialAccounts };
13
+ //# sourceMappingURL=account.interface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"account.interface.d.ts","sourceRoot":"","sources":["../../src/interfaces/account.interface.ts"],"names":[],"mappings":"AAAA,UAAU,cAAc;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,UAAU,eAAe;IACvB,MAAM,CAAC,EAAE,cAAc,GAAG,IAAI,CAAC;IAC/B,QAAQ,CAAC,EAAE,cAAc,GAAG,IAAI,CAAC;IACjC,KAAK,CAAC,EAAE,cAAc,GAAG,IAAI,CAAC;CAC/B;AAED,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,CAAC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=account.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"account.interface.js","sourceRoot":"","sources":["../../src/interfaces/account.interface.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ export interface DateRange {
2
+ from?: number;
3
+ to?: number;
4
+ }
5
+ //# sourceMappingURL=date-range.type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"date-range.type.d.ts","sourceRoot":"","sources":["../../src/types/date-range.type.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,SAAS;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;CACb"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=date-range.type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"date-range.type.js","sourceRoot":"","sources":["../../src/types/date-range.type.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ export declare function PaginatedResult<TItem>(TItemClass: new () => TItem): abstract new () => {
2
+ items: TItem[];
3
+ total: number;
4
+ page: number;
5
+ size: number;
6
+ };
7
+ //# sourceMappingURL=paginated-result.type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paginated-result.type.d.ts","sourceRoot":"","sources":["../../src/types/paginated-result.type.ts"],"names":[],"mappings":"AAEA,wBAAgB,eAAe,CAAC,KAAK,EAAE,UAAU,EAAE,UAAU,KAAK;WAIvD,KAAK,EAAE;WAGP,MAAM;UAGP,MAAM;UAGN,MAAM;EAIf"}
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.PaginatedResult = PaginatedResult;
13
+ const graphql_1 = require("@nestjs/graphql");
14
+ function PaginatedResult(TItemClass) {
15
+ let PaginatedResultClass = class PaginatedResultClass {
16
+ };
17
+ __decorate([
18
+ (0, graphql_1.Field)(() => [TItemClass]),
19
+ __metadata("design:type", Array)
20
+ ], PaginatedResultClass.prototype, "items", void 0);
21
+ __decorate([
22
+ (0, graphql_1.Field)(() => graphql_1.Int),
23
+ __metadata("design:type", Number)
24
+ ], PaginatedResultClass.prototype, "total", void 0);
25
+ __decorate([
26
+ (0, graphql_1.Field)(() => graphql_1.Int),
27
+ __metadata("design:type", Number)
28
+ ], PaginatedResultClass.prototype, "page", void 0);
29
+ __decorate([
30
+ (0, graphql_1.Field)(() => graphql_1.Int),
31
+ __metadata("design:type", Number)
32
+ ], PaginatedResultClass.prototype, "size", void 0);
33
+ PaginatedResultClass = __decorate([
34
+ (0, graphql_1.ObjectType)({ isAbstract: true })
35
+ ], PaginatedResultClass);
36
+ return PaginatedResultClass;
37
+ }
38
+ //# sourceMappingURL=paginated-result.type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paginated-result.type.js","sourceRoot":"","sources":["../../src/types/paginated-result.type.ts"],"names":[],"mappings":";;;;;;;;;;;AAEA,0CAiBC;AAnBD,6CAAyD;AAEzD,SAAgB,eAAe,CAAQ,UAA2B;IAEhE,IAAe,oBAAoB,GAAnC,MAAe,oBAAoB;KAYlC,CAAA;IAVC;QADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,CAAC,UAAU,CAAC,CAAC;;uDACX;IAGf;QADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,aAAG,CAAC;;uDACH;IAGd;QADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,aAAG,CAAC;;sDACJ;IAGb;QADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,aAAG,CAAC;;sDACJ;IAXA,oBAAoB;QADlC,IAAA,oBAAU,EAAC,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC;OAClB,oBAAoB,CAYlC;IAED,OAAO,oBAAoB,CAAC;AAC9B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "synunu-libs",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "description": "Shared DTOs, constants, and utilities for Synunu microservices",
@@ -17,6 +17,8 @@
17
17
  "typescript": "^5.6.0"
18
18
  },
19
19
  "dependencies": {
20
- "@nestjs/common": "^10.0.0"
20
+ "@nestjs/common": "^10.0.0",
21
+ "@nestjs/graphql": "^12.2.1",
22
+ "graphql": "^16.11.0"
21
23
  }
22
24
  }