@darraghor/nest-backend-libs 2.8.0 → 2.10.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.
- package/dist/authz/AccessToken.js +2 -1
- package/dist/authz/AuthConfigurationService.js +15 -12
- package/dist/authz/AuthConfigurationService.js.map +1 -1
- package/dist/authz/AuthConfigurationVariables.js +4 -2
- package/dist/authz/AuthConfigurationVariables.js.map +1 -1
- package/dist/authz/ClaimsAuthorisationGuard.js +13 -7
- package/dist/authz/ClaimsAuthorisationGuard.js.map +1 -1
- package/dist/authz/DefaultAuthGuard.js +8 -5
- package/dist/authz/DefaultAuthGuard.js.map +1 -1
- package/dist/authz/MandatoryUserClaims.decorator.js +6 -2
- package/dist/authz/MandatoryUserClaims.decorator.js.map +1 -1
- package/dist/authz/RequestWithUser.js +2 -1
- package/dist/authz/authz.module.js +23 -17
- package/dist/authz/authz.module.js.map +1 -1
- package/dist/authz/authzstrategy.js +22 -16
- package/dist/authz/authzstrategy.js.map +1 -1
- package/dist/authzclient/AuthClientConfigurationService.js +13 -10
- package/dist/authzclient/AuthClientConfigurationService.js.map +1 -1
- package/dist/authzclient/AuthClientConfigurationVariables.js +4 -2
- package/dist/authzclient/AuthClientConfigurationVariables.js.map +1 -1
- package/dist/authzclient/AuthzClientProvider.js +8 -5
- package/dist/authzclient/AuthzClientProvider.js.map +1 -1
- package/dist/authzclient/UserProfile.dto.js +5 -1
- package/dist/authzclient/UserProfile.dto.js.map +1 -1
- package/dist/authzclient/authz-client.module.js +19 -13
- package/dist/authzclient/authz-client.module.js.map +1 -1
- package/dist/authzclient/authz.service.js +14 -8
- package/dist/authzclient/authz.service.js.map +1 -1
- package/dist/cli/cli.js +12 -7
- package/dist/cli/cli.js.map +1 -1
- package/dist/cli/commands/WriteApiClientCommand.d.ts +3 -0
- package/dist/cli/commands/WriteApiClientCommand.js +24 -7
- package/dist/cli/commands/WriteApiClientCommand.js.map +1 -1
- package/dist/cli/commands/WriteTypeOrmConfigCommand.js +18 -11
- package/dist/cli/commands/WriteTypeOrmConfigCommand.js.map +1 -1
- package/dist/configuration/ValidatedConfigurationService.js +8 -5
- package/dist/configuration/ValidatedConfigurationService.js.map +1 -1
- package/dist/core-config/CoreConfig.module.js +15 -9
- package/dist/core-config/CoreConfig.module.js.map +1 -1
- package/dist/core-config/CoreConfigurationService.js +25 -22
- package/dist/core-config/CoreConfigurationService.js.map +1 -1
- package/dist/core-config/CoreConfigurationVariables.js +4 -2
- package/dist/core-config/CoreConfigurationVariables.js.map +1 -1
- package/dist/database-postgres/PostgresDatabase.module.js +14 -11
- package/dist/database-postgres/PostgresDatabase.module.js.map +1 -1
- package/dist/database-postgres/PostgresDatabaseConfigurationService.js +8 -5
- package/dist/database-postgres/PostgresDatabaseConfigurationService.js.map +1 -1
- package/dist/database-postgres/PostgresTypeOrmConfigurationProvider.js +12 -5
- package/dist/database-postgres/PostgresTypeOrmConfigurationProvider.js.map +1 -1
- package/dist/database-sqlite/SqliteDatabase.module.js +14 -11
- package/dist/database-sqlite/SqliteDatabase.module.js.map +1 -1
- package/dist/database-sqlite/SqliteDatabaseConfigurationService.js +8 -5
- package/dist/database-sqlite/SqliteDatabaseConfigurationService.js.map +1 -1
- package/dist/database-sqlite/SqliteTypeOrmConfigurationProvider.js +12 -5
- package/dist/database-sqlite/SqliteTypeOrmConfigurationProvider.js.map +1 -1
- package/dist/index.js +64 -30
- package/dist/index.js.map +1 -1
- package/dist/invitations/InvitationConfigurationService.js +13 -10
- package/dist/invitations/InvitationConfigurationService.js.map +1 -1
- package/dist/invitations/InvitationConfigurationVariables.js +4 -2
- package/dist/invitations/InvitationConfigurationVariables.js.map +1 -1
- package/dist/invitations/dto/create-invitation.dto.js +9 -5
- package/dist/invitations/dto/create-invitation.dto.js.map +1 -1
- package/dist/invitations/entities/invitation.entity.js +33 -30
- package/dist/invitations/entities/invitation.entity.js.map +1 -1
- package/dist/invitations/invitation.controller.js +24 -21
- package/dist/invitations/invitation.controller.js.map +1 -1
- package/dist/invitations/invitation.module.js +27 -21
- package/dist/invitations/invitation.module.js.map +1 -1
- package/dist/invitations/invitation.service.js +21 -18
- package/dist/invitations/invitation.service.js.map +1 -1
- package/dist/logger/CoreLoggerService.js +9 -7
- package/dist/logger/CoreLoggerService.js.map +1 -1
- package/dist/logger/LoggingConfigurationService.js +15 -12
- package/dist/logger/LoggingConfigurationService.js.map +1 -1
- package/dist/logger/LoggingConfigurationVariables.js +4 -2
- package/dist/logger/LoggingConfigurationVariables.js.map +1 -1
- package/dist/logger/LoggingInterceptor.js +13 -7
- package/dist/logger/LoggingInterceptor.js.map +1 -1
- package/dist/logger/logger.module.js +20 -14
- package/dist/logger/logger.module.js.map +1 -1
- package/dist/organisation/dto/RolesEnum.js +5 -2
- package/dist/organisation/dto/RolesEnum.js.map +1 -1
- package/dist/organisation/dto/create-organisation.dto.js +11 -7
- package/dist/organisation/dto/create-organisation.dto.js.map +1 -1
- package/dist/organisation/dto/update-organisation.dto.js +7 -3
- package/dist/organisation/dto/update-organisation.dto.js.map +1 -1
- package/dist/organisation/entities/member-role.entity.js +23 -20
- package/dist/organisation/entities/member-role.entity.js.map +1 -1
- package/dist/organisation/entities/organisation-membership.entity.js +40 -37
- package/dist/organisation/entities/organisation-membership.entity.js.map +1 -1
- package/dist/organisation/entities/organisation.entity.js +29 -26
- package/dist/organisation/entities/organisation.entity.js.map +1 -1
- package/dist/organisation/organisation.controller.js +32 -29
- package/dist/organisation/organisation.controller.js.map +1 -1
- package/dist/organisation/organisation.module.js +15 -12
- package/dist/organisation/organisation.module.js.map +1 -1
- package/dist/organisation/organisation.service.js +23 -20
- package/dist/organisation/organisation.service.js.map +1 -1
- package/dist/person/dto/create-person.dto.js +5 -1
- package/dist/person/dto/create-person.dto.js.map +1 -1
- package/dist/person/dto/update-person.dto.js +7 -3
- package/dist/person/dto/update-person.dto.js.map +1 -1
- package/dist/person/entities/person.entity.js +44 -41
- package/dist/person/entities/person.entity.js.map +1 -1
- package/dist/person/person.controller.js +28 -25
- package/dist/person/person.controller.js.map +1 -1
- package/dist/person/person.module.js +18 -15
- package/dist/person/person.module.js.map +1 -1
- package/dist/person/person.service.js +28 -22
- package/dist/person/person.service.js.map +1 -1
- package/dist/root-app/SwaggerGen.js +21 -15
- package/dist/root-app/SwaggerGen.js.map +1 -1
- package/dist/root-app/app.controller.js +23 -17
- package/dist/root-app/app.controller.js.map +1 -1
- package/dist/root-app/app.service.js +6 -3
- package/dist/root-app/app.service.js.map +1 -1
- package/dist/root-app/core-app.module.js +32 -26
- package/dist/root-app/core-app.module.js.map +1 -1
- package/dist/root-app/notfound.interceptor.js +9 -6
- package/dist/root-app/notfound.interceptor.js.map +1 -1
- package/dist/runningCommandLine/CliCommandService.js +14 -8
- package/dist/runningCommandLine/CliCommandService.js.map +1 -1
- package/dist/runningCommandLine/RunningCommandLine.module.js +12 -9
- package/dist/runningCommandLine/RunningCommandLine.module.js.map +1 -1
- package/dist/smtp-email-client/EmailClientProvider.js +8 -5
- package/dist/smtp-email-client/EmailClientProvider.js.map +1 -1
- package/dist/smtp-email-client/EmailConfigurationService.js +27 -24
- package/dist/smtp-email-client/EmailConfigurationService.js.map +1 -1
- package/dist/smtp-email-client/EmailConfigurationVariables.js +4 -2
- package/dist/smtp-email-client/EmailConfigurationVariables.js.map +1 -1
- package/dist/smtp-email-client/email-client.service.js +21 -15
- package/dist/smtp-email-client/email-client.service.js.map +1 -1
- package/dist/smtp-email-client/email.controller.js +15 -12
- package/dist/smtp-email-client/email.controller.js.map +1 -1
- package/dist/smtp-email-client/email.entity.js +35 -32
- package/dist/smtp-email-client/email.entity.js.map +1 -1
- package/dist/smtp-email-client/smtp-email-client.module.js +32 -26
- package/dist/smtp-email-client/smtp-email-client.module.js.map +1 -1
- package/dist/smtp-email-client/smtp-email-handler.js +21 -15
- package/dist/smtp-email-client/smtp-email-handler.js.map +1 -1
- package/dist/stripe-client/StripeClientConfigurationService.js +17 -14
- package/dist/stripe-client/StripeClientConfigurationService.js.map +1 -1
- package/dist/stripe-client/StripeClientProvider.js +11 -5
- package/dist/stripe-client/StripeClientProvider.js.map +1 -1
- package/dist/stripe-client/StripeConfigurationVariables.js +4 -2
- package/dist/stripe-client/StripeConfigurationVariables.js.map +1 -1
- package/dist/stripe-client/models/StripeCheckoutSessionParams.js +24 -19
- package/dist/stripe-client/models/StripeCheckoutSessionParams.js.map +1 -1
- package/dist/stripe-client/services/stripe-checkout.service.js +16 -10
- package/dist/stripe-client/services/stripe-checkout.service.js.map +1 -1
- package/dist/stripe-client/services/stripe-event-handler.js +18 -12
- package/dist/stripe-client/services/stripe-event-handler.js.map +1 -1
- package/dist/stripe-client/services/stripe-webhook-handler.service.js +19 -13
- package/dist/stripe-client/services/stripe-webhook-handler.service.js.map +1 -1
- package/dist/stripe-client/stripe-account.module.js +28 -22
- package/dist/stripe-client/stripe-account.module.js.map +1 -1
- package/dist/stripe-client/stripe-controller.js +30 -27
- package/dist/stripe-client/stripe-controller.js.map +1 -1
- package/dist/testing/preRun.js +3 -1
- package/dist/testing/preRun.js.map +1 -1
- package/dist/twitter-client/TwitterClientConfigurationService.js +19 -16
- package/dist/twitter-client/TwitterClientConfigurationService.js.map +1 -1
- package/dist/twitter-client/TwitterClientProvider.js +8 -5
- package/dist/twitter-client/TwitterClientProvider.js.map +1 -1
- package/dist/twitter-client/TwitterConfigurationVariables.js +4 -2
- package/dist/twitter-client/TwitterConfigurationVariables.js.map +1 -1
- package/dist/twitter-client/services/twitter-client.service.js +14 -8
- package/dist/twitter-client/services/twitter-client.service.js.map +1 -1
- package/dist/twitter-client/twitter-account.module.js +21 -15
- package/dist/twitter-client/twitter-account.module.js.map +1 -1
- package/package.json +5 -5
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
3
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
4
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -7,10 +8,12 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
8
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
10
|
};
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.Organisation = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const typeorm_1 = require("typeorm");
|
|
15
|
+
const invitation_entity_1 = require("../../invitations/entities/invitation.entity");
|
|
16
|
+
const organisation_membership_entity_1 = require("./organisation-membership.entity");
|
|
14
17
|
let Organisation = class Organisation {
|
|
15
18
|
id;
|
|
16
19
|
uuid;
|
|
@@ -28,65 +31,65 @@ let Organisation = class Organisation {
|
|
|
28
31
|
}
|
|
29
32
|
};
|
|
30
33
|
__decorate([
|
|
31
|
-
PrimaryGeneratedColumn(),
|
|
32
|
-
ApiProperty(),
|
|
34
|
+
(0, typeorm_1.PrimaryGeneratedColumn)(),
|
|
35
|
+
(0, swagger_1.ApiProperty)(),
|
|
33
36
|
__metadata("design:type", Number)
|
|
34
37
|
], Organisation.prototype, "id", void 0);
|
|
35
38
|
__decorate([
|
|
36
|
-
Column("uuid", {
|
|
39
|
+
(0, typeorm_1.Column)("uuid", {
|
|
37
40
|
name: "uuid",
|
|
38
41
|
default: () => "uuid_generate_v4()",
|
|
39
42
|
}),
|
|
40
|
-
Generated("uuid"),
|
|
41
|
-
ApiProperty(),
|
|
43
|
+
(0, typeorm_1.Generated)("uuid"),
|
|
44
|
+
(0, swagger_1.ApiProperty)(),
|
|
42
45
|
__metadata("design:type", String)
|
|
43
46
|
], Organisation.prototype, "uuid", void 0);
|
|
44
47
|
__decorate([
|
|
45
|
-
OneToMany(() => OrganisationMembership, (om) => om.organisation, {
|
|
48
|
+
(0, typeorm_1.OneToMany)(() => organisation_membership_entity_1.OrganisationMembership, (om) => om.organisation, {
|
|
46
49
|
eager: true,
|
|
47
50
|
cascade: ["insert", "update"],
|
|
48
51
|
}),
|
|
49
|
-
Index(),
|
|
52
|
+
(0, typeorm_1.Index)(),
|
|
50
53
|
__metadata("design:type", Array)
|
|
51
54
|
], Organisation.prototype, "memberships", void 0);
|
|
52
55
|
__decorate([
|
|
53
|
-
OneToMany(() => Invitation, (om) => om.organisation, {
|
|
56
|
+
(0, typeorm_1.OneToMany)(() => invitation_entity_1.Invitation, (om) => om.organisation, {
|
|
54
57
|
eager: true,
|
|
55
58
|
cascade: ["insert", "update"],
|
|
56
59
|
}),
|
|
57
|
-
Index(),
|
|
60
|
+
(0, typeorm_1.Index)(),
|
|
58
61
|
__metadata("design:type", Array)
|
|
59
62
|
], Organisation.prototype, "invitations", void 0);
|
|
60
63
|
__decorate([
|
|
61
|
-
Column(),
|
|
62
|
-
ApiProperty(),
|
|
64
|
+
(0, typeorm_1.Column)(),
|
|
65
|
+
(0, swagger_1.ApiProperty)(),
|
|
63
66
|
__metadata("design:type", String)
|
|
64
67
|
], Organisation.prototype, "name", void 0);
|
|
65
68
|
__decorate([
|
|
66
|
-
CreateDateColumn(),
|
|
67
|
-
ApiProperty(),
|
|
69
|
+
(0, typeorm_1.CreateDateColumn)(),
|
|
70
|
+
(0, swagger_1.ApiProperty)(),
|
|
68
71
|
__metadata("design:type", Date)
|
|
69
72
|
], Organisation.prototype, "createdDate", void 0);
|
|
70
73
|
__decorate([
|
|
71
|
-
UpdateDateColumn(),
|
|
72
|
-
ApiProperty(),
|
|
74
|
+
(0, typeorm_1.UpdateDateColumn)(),
|
|
75
|
+
(0, swagger_1.ApiProperty)(),
|
|
73
76
|
__metadata("design:type", Date)
|
|
74
77
|
], Organisation.prototype, "updateDate", void 0);
|
|
75
78
|
__decorate([
|
|
76
|
-
DeleteDateColumn(),
|
|
77
|
-
ApiProperty(),
|
|
79
|
+
(0, typeorm_1.DeleteDateColumn)(),
|
|
80
|
+
(0, swagger_1.ApiProperty)(),
|
|
78
81
|
__metadata("design:type", Date)
|
|
79
82
|
], Organisation.prototype, "deletedDate", void 0);
|
|
80
83
|
__decorate([
|
|
81
|
-
AfterLoad(),
|
|
82
|
-
AfterInsert(),
|
|
83
|
-
AfterUpdate(),
|
|
84
|
+
(0, typeorm_1.AfterLoad)(),
|
|
85
|
+
(0, typeorm_1.AfterInsert)(),
|
|
86
|
+
(0, typeorm_1.AfterUpdate)(),
|
|
84
87
|
__metadata("design:type", Function),
|
|
85
88
|
__metadata("design:paramtypes", []),
|
|
86
89
|
__metadata("design:returntype", Promise)
|
|
87
90
|
], Organisation.prototype, "nullChecks", null);
|
|
88
91
|
Organisation = __decorate([
|
|
89
|
-
Entity()
|
|
92
|
+
(0, typeorm_1.Entity)()
|
|
90
93
|
], Organisation);
|
|
91
|
-
|
|
94
|
+
exports.Organisation = Organisation;
|
|
92
95
|
//# sourceMappingURL=organisation.entity.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organisation.entity.js","sourceRoot":"","sources":["../../../src/organisation/entities/organisation.entity.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"organisation.entity.js","sourceRoot":"","sources":["../../../src/organisation/entities/organisation.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA4C;AAE5C,qCAaiB;AACjB,oFAAwE;AACxE,qFAAwE;AAGjE,IAAM,YAAY,GAAlB,MAAM,YAAY;IAGrB,EAAE,CAAU;IAQL,IAAI,CAAU;IAOrB,WAAW,CAA4B;IAOvC,WAAW,CAAgB;IAI3B,IAAI,CAAU;IAId,WAAW,CAAQ;IAInB,UAAU,CAAQ;IAIlB,WAAW,CAAQ;IAEnB,4DAA4D;IAItD,AAAN,KAAK,CAAC,UAAU;QACZ,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE;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,YAAY,CAoDxB;AApDY,oCAAY"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
3
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
4
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -10,12 +11,14 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
11
|
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
11
12
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
13
|
};
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.OrganisationController = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const organisation_service_1 = require("./organisation.service");
|
|
18
|
+
const update_organisation_dto_1 = require("./dto/update-organisation.dto");
|
|
19
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
20
|
+
const organisation_entity_1 = require("./entities/organisation.entity");
|
|
21
|
+
const passport_1 = require("@nestjs/passport");
|
|
19
22
|
let OrganisationController = class OrganisationController {
|
|
20
23
|
organisationService;
|
|
21
24
|
constructor(organisationService) {
|
|
@@ -40,47 +43,47 @@ let OrganisationController = class OrganisationController {
|
|
|
40
43
|
}
|
|
41
44
|
};
|
|
42
45
|
__decorate([
|
|
43
|
-
Get(":uuid"),
|
|
44
|
-
ApiOkResponse({ type: Organisation }),
|
|
45
|
-
__param(0, Param("uuid")),
|
|
46
|
-
__param(1, Request()),
|
|
46
|
+
(0, common_1.Get)(":uuid"),
|
|
47
|
+
(0, swagger_1.ApiOkResponse)({ type: organisation_entity_1.Organisation }),
|
|
48
|
+
__param(0, (0, common_1.Param)("uuid")),
|
|
49
|
+
__param(1, (0, common_1.Request)()),
|
|
47
50
|
__metadata("design:type", Function),
|
|
48
51
|
__metadata("design:paramtypes", [String, Object]),
|
|
49
52
|
__metadata("design:returntype", Promise)
|
|
50
53
|
], OrganisationController.prototype, "findOne", null);
|
|
51
54
|
__decorate([
|
|
52
|
-
Get(),
|
|
53
|
-
ApiOkResponse({ type: Organisation, isArray: true }),
|
|
54
|
-
__param(0, Request()),
|
|
55
|
+
(0, common_1.Get)(),
|
|
56
|
+
(0, swagger_1.ApiOkResponse)({ type: organisation_entity_1.Organisation, isArray: true }),
|
|
57
|
+
__param(0, (0, common_1.Request)()),
|
|
55
58
|
__metadata("design:type", Function),
|
|
56
59
|
__metadata("design:paramtypes", [Object]),
|
|
57
60
|
__metadata("design:returntype", Promise)
|
|
58
61
|
], OrganisationController.prototype, "findAllForUser", null);
|
|
59
62
|
__decorate([
|
|
60
|
-
Patch(":uuid"),
|
|
61
|
-
ApiOkResponse({ type: Organisation }),
|
|
62
|
-
__param(0, Param("uuid")),
|
|
63
|
-
__param(1, Body()),
|
|
64
|
-
__param(2, Request()),
|
|
63
|
+
(0, common_1.Patch)(":uuid"),
|
|
64
|
+
(0, swagger_1.ApiOkResponse)({ type: organisation_entity_1.Organisation }),
|
|
65
|
+
__param(0, (0, common_1.Param)("uuid")),
|
|
66
|
+
__param(1, (0, common_1.Body)()),
|
|
67
|
+
__param(2, (0, common_1.Request)()),
|
|
65
68
|
__metadata("design:type", Function),
|
|
66
|
-
__metadata("design:paramtypes", [String, UpdateOrganisationDto, Object]),
|
|
69
|
+
__metadata("design:paramtypes", [String, update_organisation_dto_1.UpdateOrganisationDto, Object]),
|
|
67
70
|
__metadata("design:returntype", Promise)
|
|
68
71
|
], OrganisationController.prototype, "update", null);
|
|
69
72
|
__decorate([
|
|
70
|
-
Delete(":uuid"),
|
|
71
|
-
ApiOkResponse({ type: Organisation }),
|
|
72
|
-
__param(0, Param("uuid")),
|
|
73
|
-
__param(1, Request()),
|
|
73
|
+
(0, common_1.Delete)(":uuid"),
|
|
74
|
+
(0, swagger_1.ApiOkResponse)({ type: organisation_entity_1.Organisation }),
|
|
75
|
+
__param(0, (0, common_1.Param)("uuid")),
|
|
76
|
+
__param(1, (0, common_1.Request)()),
|
|
74
77
|
__metadata("design:type", Function),
|
|
75
78
|
__metadata("design:paramtypes", [String, Object]),
|
|
76
79
|
__metadata("design:returntype", Promise)
|
|
77
80
|
], OrganisationController.prototype, "remove", null);
|
|
78
81
|
OrganisationController = __decorate([
|
|
79
|
-
UseGuards(AuthGuard("jwt")),
|
|
80
|
-
ApiBearerAuth(),
|
|
81
|
-
Controller("organisation"),
|
|
82
|
-
ApiTags("organisations"),
|
|
83
|
-
__metadata("design:paramtypes", [OrganisationService])
|
|
82
|
+
(0, common_1.UseGuards)((0, passport_1.AuthGuard)("jwt")),
|
|
83
|
+
(0, swagger_1.ApiBearerAuth)(),
|
|
84
|
+
(0, common_1.Controller)("organisation"),
|
|
85
|
+
(0, swagger_1.ApiTags)("organisations"),
|
|
86
|
+
__metadata("design:paramtypes", [organisation_service_1.OrganisationService])
|
|
84
87
|
], OrganisationController);
|
|
85
|
-
|
|
88
|
+
exports.OrganisationController = OrganisationController;
|
|
86
89
|
//# sourceMappingURL=organisation.controller.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organisation.controller.js","sourceRoot":"","sources":["../../src/organisation/organisation.controller.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"organisation.controller.js","sourceRoot":"","sources":["../../src/organisation/organisation.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CASwB;AACxB,iEAA2D;AAC3D,2EAAoE;AACpE,6CAAsE;AACtE,wEAA4D;AAC5D,+CAA2C;AAOpC,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IACF;IAA7B,YAA6B,mBAAwC;QAAxC,wBAAmB,GAAnB,mBAAmB,CAAqB;IAAG,CAAC;IAInE,AAAN,KAAK,CAAC,OAA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Gb;AAIK;IAFL,IAAA,cAAK,EAAC,OAAO,CAAC;IACd,IAAA,uBAAa,EAAC,EAAC,IAAI,EAAE,kCAAY,EAAC,CAAC;IAE/B,WAAA,IAAA,cAAK,EAAC,MAAM,CAAC,CAAA;IACb,WAAA,IAAA,aAAI,GAAE,CAAA;IACN,WAAA,IAAA,gBAAO,GAAE,CAAA;;6CADqB,+CAAqB;;oDAQvD;AAIK;IAFL,IAAA,eAAM,EAAC,OAAO,CAAC;IACf,IAAA,uBAAa,EAAC,EAAC,IAAI,EAAE,kCAAY,EAAC,CAAC;IAE/B,WAAA,IAAA,cAAK,EAAC,MAAM,CAAC,CAAA;IACb,WAAA,IAAA,gBAAO,GAAE,CAAA;;;;oDAYb;AAnDQ,sBAAsB;IAJlC,IAAA,kBAAS,EAAC,IAAA,oBAAS,EAAC,KAAK,CAAC,CAAC;IAC3B,IAAA,uBAAa,GAAE;IACf,IAAA,mBAAU,EAAC,cAAc,CAAC;IAC1B,IAAA,iBAAO,EAAC,eAAe,CAAC;qCAE6B,0CAAmB;GAD5D,sBAAsB,CAoDlC;AApDY,wDAAsB"}
|
|
@@ -1,24 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
3
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
4
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
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;
|
|
5
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
7
|
};
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.OrganisationModule = void 0;
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
const organisation_service_1 = require("./organisation.service");
|
|
12
|
+
const organisation_controller_1 = require("./organisation.controller");
|
|
13
|
+
const logger_module_1 = require("../logger/logger.module");
|
|
14
|
+
const typeorm_1 = require("@nestjs/typeorm");
|
|
15
|
+
const organisation_entity_1 = require("./entities/organisation.entity");
|
|
13
16
|
let OrganisationModule = class OrganisationModule {
|
|
14
17
|
};
|
|
15
18
|
OrganisationModule = __decorate([
|
|
16
|
-
Module({
|
|
17
|
-
imports: [LoggerModule, TypeOrmModule.forFeature([Organisation])],
|
|
18
|
-
controllers: [OrganisationController],
|
|
19
|
-
providers: [OrganisationService],
|
|
20
|
-
exports: [OrganisationService],
|
|
19
|
+
(0, common_1.Module)({
|
|
20
|
+
imports: [logger_module_1.LoggerModule, typeorm_1.TypeOrmModule.forFeature([organisation_entity_1.Organisation])],
|
|
21
|
+
controllers: [organisation_controller_1.OrganisationController],
|
|
22
|
+
providers: [organisation_service_1.OrganisationService],
|
|
23
|
+
exports: [organisation_service_1.OrganisationService],
|
|
21
24
|
})
|
|
22
25
|
], OrganisationModule);
|
|
23
|
-
|
|
26
|
+
exports.OrganisationModule = OrganisationModule;
|
|
24
27
|
//# sourceMappingURL=organisation.module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organisation.module.js","sourceRoot":"","sources":["../../src/organisation/organisation.module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"organisation.module.js","sourceRoot":"","sources":["../../src/organisation/organisation.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAsC;AACtC,iEAA2D;AAC3D,uEAAiE;AACjE,2DAAqD;AACrD,6CAA8C;AAC9C,wEAA4D;AAQrD,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;CAAG,CAAA;AAArB,kBAAkB;IAN9B,IAAA,eAAM,EAAC;QACJ,OAAO,EAAE,CAAC,4BAAY,EAAE,uBAAa,CAAC,UAAU,CAAC,CAAC,kCAAY,CAAC,CAAC,CAAC;QACjE,WAAW,EAAE,CAAC,gDAAsB,CAAC;QACrC,SAAS,EAAE,CAAC,0CAAmB,CAAC;QAChC,OAAO,EAAE,CAAC,0CAAmB,CAAC;KACjC,CAAC;GACW,kBAAkB,CAAG;AAArB,gDAAkB"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
3
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
4
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -10,13 +11,15 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
11
|
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
11
12
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
13
|
};
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.OrganisationService = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const typeorm_1 = require("@nestjs/typeorm");
|
|
18
|
+
const typeorm_2 = require("typeorm");
|
|
19
|
+
const RolesEnum_1 = require("./dto/RolesEnum");
|
|
20
|
+
const member_role_entity_1 = require("./entities/member-role.entity");
|
|
21
|
+
const organisation_membership_entity_1 = require("./entities/organisation-membership.entity");
|
|
22
|
+
const organisation_entity_1 = require("./entities/organisation.entity");
|
|
20
23
|
let OrganisationService = class OrganisationService {
|
|
21
24
|
repository;
|
|
22
25
|
constructor(repository) {
|
|
@@ -24,22 +27,22 @@ let OrganisationService = class OrganisationService {
|
|
|
24
27
|
}
|
|
25
28
|
async create(createOrganisationDto) {
|
|
26
29
|
// create a new organisation
|
|
27
|
-
const unsavedOrganisation = new Organisation();
|
|
30
|
+
const unsavedOrganisation = new organisation_entity_1.Organisation();
|
|
28
31
|
unsavedOrganisation.name = createOrganisationDto.name;
|
|
29
32
|
unsavedOrganisation.memberships = [];
|
|
30
33
|
// add the owner
|
|
31
|
-
const ownerMembership = new OrganisationMembership();
|
|
34
|
+
const ownerMembership = new organisation_membership_entity_1.OrganisationMembership();
|
|
32
35
|
ownerMembership.person = createOrganisationDto.owner;
|
|
33
|
-
const ownerRole = new MembershipRole();
|
|
34
|
-
ownerRole.name = Roles.owner;
|
|
36
|
+
const ownerRole = new member_role_entity_1.MembershipRole();
|
|
37
|
+
ownerRole.name = RolesEnum_1.Roles.owner;
|
|
35
38
|
ownerMembership.roles.push(ownerRole);
|
|
36
39
|
unsavedOrganisation.memberships.push(ownerMembership);
|
|
37
40
|
// add all the others
|
|
38
41
|
const normalMemberships = createOrganisationDto.members.map((member) => {
|
|
39
|
-
const membership = new OrganisationMembership();
|
|
42
|
+
const membership = new organisation_membership_entity_1.OrganisationMembership();
|
|
40
43
|
membership.person = member;
|
|
41
|
-
const memberRole = new MembershipRole();
|
|
42
|
-
memberRole.name = Roles.member;
|
|
44
|
+
const memberRole = new member_role_entity_1.MembershipRole();
|
|
45
|
+
memberRole.name = RolesEnum_1.Roles.member;
|
|
43
46
|
membership.roles.push(memberRole);
|
|
44
47
|
return membership;
|
|
45
48
|
});
|
|
@@ -78,7 +81,7 @@ let OrganisationService = class OrganisationService {
|
|
|
78
81
|
id: currentUserId,
|
|
79
82
|
},
|
|
80
83
|
roles: {
|
|
81
|
-
name: Roles.owner,
|
|
84
|
+
name: RolesEnum_1.Roles.owner,
|
|
82
85
|
},
|
|
83
86
|
},
|
|
84
87
|
},
|
|
@@ -95,7 +98,7 @@ let OrganisationService = class OrganisationService {
|
|
|
95
98
|
id: currentUserId,
|
|
96
99
|
},
|
|
97
100
|
roles: {
|
|
98
|
-
name: Roles.owner,
|
|
101
|
+
name: RolesEnum_1.Roles.owner,
|
|
99
102
|
},
|
|
100
103
|
},
|
|
101
104
|
},
|
|
@@ -106,9 +109,9 @@ let OrganisationService = class OrganisationService {
|
|
|
106
109
|
}
|
|
107
110
|
};
|
|
108
111
|
OrganisationService = __decorate([
|
|
109
|
-
Injectable(),
|
|
110
|
-
__param(0, InjectRepository(Organisation)),
|
|
111
|
-
__metadata("design:paramtypes", [Repository])
|
|
112
|
+
(0, common_1.Injectable)(),
|
|
113
|
+
__param(0, (0, typeorm_1.InjectRepository)(organisation_entity_1.Organisation)),
|
|
114
|
+
__metadata("design:paramtypes", [typeorm_2.Repository])
|
|
112
115
|
], OrganisationService);
|
|
113
|
-
|
|
116
|
+
exports.OrganisationService = OrganisationService;
|
|
114
117
|
//# sourceMappingURL=organisation.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organisation.service.js","sourceRoot":"","sources":["../../src/organisation/organisation.service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"organisation.service.js","sourceRoot":"","sources":["../../src/organisation/organisation.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA0C;AAC1C,6CAAiD;AACjD,qCAA+D;AAE/D,+CAAsC;AAEtC,sEAA6D;AAC7D,8FAAiF;AACjF,wEAA4D;AAGrD,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAGhB;IAFZ,YAEY,UAAoC;QAApC,eAAU,GAAV,UAAU,CAA0B;IAC7C,CAAC;IAEJ,KAAK,CAAC,MAAM,CACR,qBAA4C;QAE5C,4BAA4B;QAC5B,MAAM,mBAAmB,GAAG,IAAI,kCAAY,EAAE,CAAC;QAC/C,mBAAmB,CAAC,IAAI,GAAG,qBAAqB,CAAC,IAAI,CAAC;QACtD,mBAAmB,CAAC,WAAW,GAAG,EAAE,CAAC;QAErC,gBAAgB;QAChB,MAAM,eAAe,GAAG,IAAI,uDAAsB,EAAE,CAAC;QACrD,eAAe,CAAC,MAAM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|
|
3
|
+
exports.CreatePersonDto = void 0;
|
|
4
|
+
class CreatePersonDto {
|
|
2
5
|
}
|
|
6
|
+
exports.CreatePersonDto = CreatePersonDto;
|
|
3
7
|
//# sourceMappingURL=create-person.dto.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-person.dto.js","sourceRoot":"","sources":["../../../src/person/dto/create-person.dto.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"create-person.dto.js","sourceRoot":"","sources":["../../../src/person/dto/create-person.dto.ts"],"names":[],"mappings":";;;AAAA,MAAa,eAAe;CAAG;AAA/B,0CAA+B"}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UpdatePersonDto = void 0;
|
|
4
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
5
|
+
const create_person_dto_1 = require("./create-person.dto");
|
|
6
|
+
class UpdatePersonDto extends (0, swagger_1.PartialType)(create_person_dto_1.CreatePersonDto) {
|
|
4
7
|
}
|
|
8
|
+
exports.UpdatePersonDto = UpdatePersonDto;
|
|
5
9
|
//# sourceMappingURL=update-person.dto.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-person.dto.js","sourceRoot":"","sources":["../../../src/person/dto/update-person.dto.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"update-person.dto.js","sourceRoot":"","sources":["../../../src/person/dto/update-person.dto.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAC5C,2DAAoD;AAEpD,MAAa,eAAgB,SAAQ,IAAA,qBAAW,EAAC,mCAAe,CAAC;CAAG;AAApE,0CAAoE"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
3
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
4
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -7,10 +8,12 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
8
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
10
|
};
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.Person = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const class_transformer_1 = require("class-transformer");
|
|
15
|
+
const typeorm_1 = require("typeorm");
|
|
16
|
+
const organisation_membership_entity_1 = require("../../organisation/entities/organisation-membership.entity");
|
|
14
17
|
let Person = class Person {
|
|
15
18
|
id;
|
|
16
19
|
email;
|
|
@@ -35,97 +38,97 @@ let Person = class Person {
|
|
|
35
38
|
}
|
|
36
39
|
};
|
|
37
40
|
__decorate([
|
|
38
|
-
PrimaryGeneratedColumn(),
|
|
39
|
-
ApiProperty(),
|
|
41
|
+
(0, typeorm_1.PrimaryGeneratedColumn)(),
|
|
42
|
+
(0, swagger_1.ApiProperty)(),
|
|
40
43
|
__metadata("design:type", Number)
|
|
41
44
|
], Person.prototype, "id", void 0);
|
|
42
45
|
__decorate([
|
|
43
|
-
ApiProperty(),
|
|
44
|
-
Column(),
|
|
46
|
+
(0, swagger_1.ApiProperty)(),
|
|
47
|
+
(0, typeorm_1.Column)(),
|
|
45
48
|
__metadata("design:type", String)
|
|
46
49
|
], Person.prototype, "email", void 0);
|
|
47
50
|
__decorate([
|
|
48
|
-
Column("uuid", {
|
|
51
|
+
(0, typeorm_1.Column)("uuid", {
|
|
49
52
|
name: "uuid",
|
|
50
53
|
default: () => "uuid_generate_v4()",
|
|
51
54
|
}),
|
|
52
|
-
Generated("uuid"),
|
|
53
|
-
ApiProperty(),
|
|
55
|
+
(0, typeorm_1.Generated)("uuid"),
|
|
56
|
+
(0, swagger_1.ApiProperty)(),
|
|
54
57
|
__metadata("design:type", String)
|
|
55
58
|
], Person.prototype, "uuid", void 0);
|
|
56
59
|
__decorate([
|
|
57
|
-
ApiProperty(),
|
|
58
|
-
Column({ default: false }),
|
|
60
|
+
(0, swagger_1.ApiProperty)(),
|
|
61
|
+
(0, typeorm_1.Column)({ default: false }),
|
|
59
62
|
__metadata("design:type", Boolean)
|
|
60
63
|
], Person.prototype, "emailVerified", void 0);
|
|
61
64
|
__decorate([
|
|
62
|
-
ApiProperty(),
|
|
63
|
-
Column({ default: false }),
|
|
65
|
+
(0, swagger_1.ApiProperty)(),
|
|
66
|
+
(0, typeorm_1.Column)({ default: false }),
|
|
64
67
|
__metadata("design:type", Boolean)
|
|
65
68
|
], Person.prototype, "blocked", void 0);
|
|
66
69
|
__decorate([
|
|
67
|
-
ApiPropertyOptional(),
|
|
68
|
-
Column({ nullable: true }),
|
|
70
|
+
(0, swagger_1.ApiPropertyOptional)(),
|
|
71
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
69
72
|
__metadata("design:type", String)
|
|
70
73
|
], Person.prototype, "name", void 0);
|
|
71
74
|
__decorate([
|
|
72
|
-
ApiPropertyOptional(),
|
|
73
|
-
Column({ nullable: true }),
|
|
75
|
+
(0, swagger_1.ApiPropertyOptional)(),
|
|
76
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
74
77
|
__metadata("design:type", String)
|
|
75
78
|
], Person.prototype, "familyName", void 0);
|
|
76
79
|
__decorate([
|
|
77
|
-
ApiPropertyOptional(),
|
|
78
|
-
Column({ nullable: true }),
|
|
80
|
+
(0, swagger_1.ApiPropertyOptional)(),
|
|
81
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
79
82
|
__metadata("design:type", String)
|
|
80
83
|
], Person.prototype, "givenName", void 0);
|
|
81
84
|
__decorate([
|
|
82
|
-
ApiProperty(),
|
|
83
|
-
Column(),
|
|
85
|
+
(0, swagger_1.ApiProperty)(),
|
|
86
|
+
(0, typeorm_1.Column)(),
|
|
84
87
|
__metadata("design:type", String)
|
|
85
88
|
], Person.prototype, "picture", void 0);
|
|
86
89
|
__decorate([
|
|
87
|
-
ApiProperty(),
|
|
88
|
-
Column(),
|
|
89
|
-
Index({ unique: true }),
|
|
90
|
+
(0, swagger_1.ApiProperty)(),
|
|
91
|
+
(0, typeorm_1.Column)(),
|
|
92
|
+
(0, typeorm_1.Index)({ unique: true }),
|
|
90
93
|
__metadata("design:type", String)
|
|
91
94
|
], Person.prototype, "auth0UserId", void 0);
|
|
92
95
|
__decorate([
|
|
93
|
-
ApiPropertyOptional(),
|
|
94
|
-
Column({ nullable: true }),
|
|
96
|
+
(0, swagger_1.ApiPropertyOptional)(),
|
|
97
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
95
98
|
__metadata("design:type", String)
|
|
96
99
|
], Person.prototype, "username", void 0);
|
|
97
100
|
__decorate([
|
|
98
|
-
Exclude(),
|
|
99
|
-
OneToMany(() => OrganisationMembership, (om) => om.person, {
|
|
101
|
+
(0, class_transformer_1.Exclude)(),
|
|
102
|
+
(0, typeorm_1.OneToMany)(() => organisation_membership_entity_1.OrganisationMembership, (om) => om.person, {
|
|
100
103
|
cascade: ["insert", "update"],
|
|
101
104
|
}),
|
|
102
105
|
__metadata("design:type", Array)
|
|
103
106
|
], Person.prototype, "memberships", void 0);
|
|
104
107
|
__decorate([
|
|
105
|
-
CreateDateColumn(),
|
|
106
|
-
ApiProperty(),
|
|
108
|
+
(0, typeorm_1.CreateDateColumn)(),
|
|
109
|
+
(0, swagger_1.ApiProperty)(),
|
|
107
110
|
__metadata("design:type", Date)
|
|
108
111
|
], Person.prototype, "createdDate", void 0);
|
|
109
112
|
__decorate([
|
|
110
|
-
UpdateDateColumn(),
|
|
111
|
-
ApiProperty(),
|
|
113
|
+
(0, typeorm_1.UpdateDateColumn)(),
|
|
114
|
+
(0, swagger_1.ApiProperty)(),
|
|
112
115
|
__metadata("design:type", Date)
|
|
113
116
|
], Person.prototype, "updateDate", void 0);
|
|
114
117
|
__decorate([
|
|
115
|
-
DeleteDateColumn(),
|
|
116
|
-
ApiProperty(),
|
|
118
|
+
(0, typeorm_1.DeleteDateColumn)(),
|
|
119
|
+
(0, swagger_1.ApiProperty)(),
|
|
117
120
|
__metadata("design:type", Date)
|
|
118
121
|
], Person.prototype, "deletedDate", void 0);
|
|
119
122
|
__decorate([
|
|
120
|
-
AfterLoad(),
|
|
121
|
-
AfterInsert(),
|
|
122
|
-
AfterUpdate(),
|
|
123
|
+
(0, typeorm_1.AfterLoad)(),
|
|
124
|
+
(0, typeorm_1.AfterInsert)(),
|
|
125
|
+
(0, typeorm_1.AfterUpdate)(),
|
|
123
126
|
__metadata("design:type", Function),
|
|
124
127
|
__metadata("design:paramtypes", []),
|
|
125
128
|
__metadata("design:returntype", Promise)
|
|
126
129
|
], Person.prototype, "nullChecks", null);
|
|
127
130
|
Person = __decorate([
|
|
128
|
-
Entity()
|
|
131
|
+
(0, typeorm_1.Entity)()
|
|
129
132
|
], Person);
|
|
130
|
-
|
|
133
|
+
exports.Person = Person;
|
|
131
134
|
//# sourceMappingURL=person.entity.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"person.entity.js","sourceRoot":"","sources":["../../../src/person/entities/person.entity.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"person.entity.js","sourceRoot":"","sources":["../../../src/person/entities/person.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAiE;AACjE,yDAA0C;AAC1C,qCAaiB;AACjB,+GAAkG;AAG3F,IAAM,MAAM,GAAZ,MAAM,MAAM;IAGf,EAAE,CAAU;IAIZ,KAAK,CAAU;IAQR,IAAI,CAAU;IAIrB,aAAa,CAAW;IAIxB,OAAO,CAAW;IAIl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