@darraghor/nest-backend-libs 2.18.25 → 2.18.27
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/organisation-subscriptions/organisation-subscriptions.controller.d.ts +3 -3
- package/dist/organisation-subscriptions/organisation-subscriptions.controller.js +12 -12
- package/dist/organisation-subscriptions/organisation-subscriptions.controller.js.map +1 -1
- package/dist/organisation-subscriptions/organisation-subscriptions.service.d.ts +2 -2
- package/dist/organisation-subscriptions/organisation-subscriptions.service.js +20 -12
- package/dist/organisation-subscriptions/organisation-subscriptions.service.js.map +1 -1
- package/dist/person/dto/personResponseDto.d.ts +19 -0
- package/dist/person/dto/personResponseDto.js +100 -0
- package/dist/person/dto/personResponseDto.js.map +1 -0
- package/dist/person/person.controller.d.ts +2 -2
- package/dist/person/person.controller.js +12 -4
- package/dist/person/person.controller.js.map +1 -1
- package/dist/person/person.service.js +3 -1
- package/dist/person/person.service.js.map +1 -1
- package/package.json +1 -1
|
@@ -6,7 +6,7 @@ import { BooleanResult } from "../root-app/models/boolean-result";
|
|
|
6
6
|
export declare class OrganisationSubscriptionsController {
|
|
7
7
|
private readonly osrService;
|
|
8
8
|
constructor(osrService: OrganisationSubscriptionService);
|
|
9
|
-
findAll(
|
|
10
|
-
addSubscription(
|
|
11
|
-
deleteSubscription(
|
|
9
|
+
findAll(orgId: number, request: RequestWithUser): Promise<OrganisationSubscriptionRecord[]>;
|
|
10
|
+
addSubscription(orgId: number, body: SaveOrganisationSubscriptionRecordDto): Promise<OrganisationSubscriptionRecord[]>;
|
|
11
|
+
deleteSubscription(orgId: number, uuid: string): Promise<BooleanResult>;
|
|
12
12
|
}
|
|
@@ -27,13 +27,13 @@ let OrganisationSubscriptionsController = class OrganisationSubscriptionsControl
|
|
|
27
27
|
constructor(osrService) {
|
|
28
28
|
this.osrService = osrService;
|
|
29
29
|
}
|
|
30
|
-
async findAll(
|
|
31
|
-
return this.osrService.findAllForOwnerOfOrg(
|
|
30
|
+
async findAll(orgId, request) {
|
|
31
|
+
return this.osrService.findAllForOwnerOfOrg(orgId, request.user.id);
|
|
32
32
|
}
|
|
33
|
-
async addSubscription(
|
|
34
|
-
return this.osrService.save([body],
|
|
33
|
+
async addSubscription(orgId, body) {
|
|
34
|
+
return this.osrService.save([body], orgId);
|
|
35
35
|
}
|
|
36
|
-
async deleteSubscription(
|
|
36
|
+
async deleteSubscription(orgId, uuid) {
|
|
37
37
|
const isDeleted = await this.osrService.delete(uuid);
|
|
38
38
|
return { result: isDeleted };
|
|
39
39
|
}
|
|
@@ -41,36 +41,36 @@ let OrganisationSubscriptionsController = class OrganisationSubscriptionsControl
|
|
|
41
41
|
__decorate([
|
|
42
42
|
(0, common_1.Get)(),
|
|
43
43
|
(0, swagger_1.ApiOkResponse)({ type: [organisation_subscription_entity_1.OrganisationSubscriptionRecord] }),
|
|
44
|
-
__param(0, (0, common_1.Param)("
|
|
44
|
+
__param(0, (0, common_1.Param)("orgId")),
|
|
45
45
|
__param(1, (0, common_1.Request)()),
|
|
46
46
|
__metadata("design:type", Function),
|
|
47
|
-
__metadata("design:paramtypes", [
|
|
47
|
+
__metadata("design:paramtypes", [Number, Object]),
|
|
48
48
|
__metadata("design:returntype", Promise)
|
|
49
49
|
], OrganisationSubscriptionsController.prototype, "findAll", null);
|
|
50
50
|
__decorate([
|
|
51
51
|
(0, authz_1.MandatoryUserClaims)("modify:all"),
|
|
52
52
|
(0, common_1.Post)(),
|
|
53
53
|
(0, swagger_1.ApiOkResponse)({ type: [organisation_subscription_entity_1.OrganisationSubscriptionRecord] }),
|
|
54
|
-
__param(0, (0, common_1.Param)("
|
|
54
|
+
__param(0, (0, common_1.Param)("orgId")),
|
|
55
55
|
__param(1, (0, common_1.Body)()),
|
|
56
56
|
__metadata("design:type", Function),
|
|
57
|
-
__metadata("design:paramtypes", [
|
|
57
|
+
__metadata("design:paramtypes", [Number, fulfillSubscriptionDto_1.SaveOrganisationSubscriptionRecordDto]),
|
|
58
58
|
__metadata("design:returntype", Promise)
|
|
59
59
|
], OrganisationSubscriptionsController.prototype, "addSubscription", null);
|
|
60
60
|
__decorate([
|
|
61
61
|
(0, authz_1.MandatoryUserClaims)("modify:all"),
|
|
62
62
|
(0, common_1.Delete)(":uuid"),
|
|
63
63
|
(0, swagger_1.ApiOkResponse)({ type: boolean_result_1.BooleanResult }),
|
|
64
|
-
__param(0, (0, common_1.Param)("
|
|
64
|
+
__param(0, (0, common_1.Param)("orgId")),
|
|
65
65
|
__param(1, (0, common_1.Param)("uuid")),
|
|
66
66
|
__metadata("design:type", Function),
|
|
67
|
-
__metadata("design:paramtypes", [
|
|
67
|
+
__metadata("design:paramtypes", [Number, String]),
|
|
68
68
|
__metadata("design:returntype", Promise)
|
|
69
69
|
], OrganisationSubscriptionsController.prototype, "deleteSubscription", null);
|
|
70
70
|
OrganisationSubscriptionsController = __decorate([
|
|
71
71
|
(0, common_1.UseGuards)((0, passport_1.AuthGuard)("jwt"), authz_1.ClaimsAuthorisationGuard),
|
|
72
72
|
(0, swagger_1.ApiBearerAuth)(),
|
|
73
|
-
(0, common_1.Controller)("organisation/:
|
|
73
|
+
(0, common_1.Controller)("organisation/:orgId/subscriptions"),
|
|
74
74
|
(0, swagger_1.ApiTags)("Organisation Subscriptions"),
|
|
75
75
|
__metadata("design:paramtypes", [organisation_subscriptions_service_1.OrganisationSubscriptionService])
|
|
76
76
|
], OrganisationSubscriptionsController);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organisation-subscriptions.controller.js","sourceRoot":"","sources":["../../src/organisation-subscriptions/organisation-subscriptions.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gDAAgD;AAChD,2CASwB;AACxB,6CAAsE;AACtE,+CAA2C;AAE3C,kGAA2F;AAC3F,6FAAqF;AACrF,oCAAuE;AACvE,4EAAsF;AACtF,sEAAgE;AAMzD,IAAM,mCAAmC,GAAzC,MAAM,mCAAmC;IACf;IAA7B,YAA6B,UAA2C;QAA3C,eAAU,GAAV,UAAU,CAAiC;IAAG,CAAC;IAItE,AAAN,KAAK,CAAC,OAAO,
|
|
1
|
+
{"version":3,"file":"organisation-subscriptions.controller.js","sourceRoot":"","sources":["../../src/organisation-subscriptions/organisation-subscriptions.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gDAAgD;AAChD,2CASwB;AACxB,6CAAsE;AACtE,+CAA2C;AAE3C,kGAA2F;AAC3F,6FAAqF;AACrF,oCAAuE;AACvE,4EAAsF;AACtF,sEAAgE;AAMzD,IAAM,mCAAmC,GAAzC,MAAM,mCAAmC;IACf;IAA7B,YAA6B,UAA2C;QAA3C,eAAU,GAAV,UAAU,CAAiC;IAAG,CAAC;IAItE,AAAN,KAAK,CAAC,OAAO,CACO,KAAa,EAClB,OAAwB;QAEnC,OAAO,IAAI,CAAC,UAAU,CAAC,oBAAoB,CAAC,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACxE,CAAC;IAKK,AAAN,KAAK,CAAC,eAAe,CACD,KAAa,EACrB,IAA2C;QAEnD,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC,CAAC;IAC/C,CAAC;IAKK,AAAN,KAAK,CAAC,kBAAkB,CACJ,KAAa,EACd,IAAY;QAE3B,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACrD,OAAO,EAAC,MAAM,EAAE,SAAS,EAAC,CAAC;IAC/B,CAAC;CACJ,CAAA;AA3BS;IAFL,IAAA,YAAG,GAAE;IACL,IAAA,uBAAa,EAAC,EAAC,IAAI,EAAE,CAAC,iEAA8B,CAAC,EAAC,CAAC;IAEnD,WAAA,IAAA,cAAK,EAAC,OAAO,CAAC,CAAA;IACd,WAAA,IAAA,gBAAO,GAAE,CAAA;;;;kEAGb;AAKK;IAHL,IAAA,2BAAmB,EAAC,YAAY,CAAC;IACjC,IAAA,aAAI,GAAE;IACN,IAAA,uBAAa,EAAC,EAAC,IAAI,EAAE,CAAC,iEAA8B,CAAC,EAAC,CAAC;IAEnD,WAAA,IAAA,cAAK,EAAC,OAAO,CAAC,CAAA;IACd,WAAA,IAAA,aAAI,GAAE,CAAA;;6CAAO,8DAAqC;;0EAGtD;AAKK;IAHL,IAAA,2BAAmB,EAAC,YAAY,CAAC;IACjC,IAAA,eAAM,EAAC,OAAO,CAAC;IACf,IAAA,uBAAa,EAAC,EAAC,IAAI,EAAE,8BAAa,EAAC,CAAC;IAEhC,WAAA,IAAA,cAAK,EAAC,OAAO,CAAC,CAAA;IACd,WAAA,IAAA,cAAK,EAAC,MAAM,CAAC,CAAA;;;;6EAIjB;AA/BQ,mCAAmC;IAJ/C,IAAA,kBAAS,EAAC,IAAA,oBAAS,EAAC,KAAK,CAAC,EAAE,gCAAwB,CAAC;IACrD,IAAA,uBAAa,GAAE;IACf,IAAA,mBAAU,EAAC,mCAAmC,CAAC;IAC/C,IAAA,iBAAO,EAAC,4BAA4B,CAAC;qCAEO,oEAA+B;GAD/D,mCAAmC,CAgC/C;AAhCY,kFAAmC"}
|
|
@@ -10,9 +10,9 @@ export declare class OrganisationSubscriptionService {
|
|
|
10
10
|
private readonly logger;
|
|
11
11
|
constructor(orgRepo: Repository<Organisation>, orgSubRepository: Repository<OrganisationSubscriptionRecord>, paymentSessionService: PaymentSessionService);
|
|
12
12
|
private notFoundMessage;
|
|
13
|
-
findAllForOwnerOfOrg(
|
|
13
|
+
findAllForOwnerOfOrg(orgId: number, currentUserId: number): Promise<OrganisationSubscriptionRecord[]>;
|
|
14
14
|
findOne(subscriptionUuid: string): Promise<OrganisationSubscriptionRecord>;
|
|
15
15
|
findAllForOrg(orgUuid: string): Promise<OrganisationSubscriptionRecord[]>;
|
|
16
|
-
save(subRecordDtoCollection: SaveOrganisationSubscriptionRecordDto[],
|
|
16
|
+
save(subRecordDtoCollection: SaveOrganisationSubscriptionRecordDto[], orgId?: number): Promise<OrganisationSubscriptionRecord[]>;
|
|
17
17
|
delete(subUuid: string): Promise<boolean>;
|
|
18
18
|
}
|
|
@@ -32,11 +32,11 @@ let OrganisationSubscriptionService = OrganisationSubscriptionService_1 = class
|
|
|
32
32
|
this.paymentSessionService = paymentSessionService;
|
|
33
33
|
}
|
|
34
34
|
notFoundMessage = "Organisation not found or you are not owner of it";
|
|
35
|
-
async findAllForOwnerOfOrg(
|
|
35
|
+
async findAllForOwnerOfOrg(orgId, currentUserId) {
|
|
36
36
|
// find the org if the user is owner
|
|
37
37
|
const org = await this.orgRepo.findOne({
|
|
38
38
|
where: {
|
|
39
|
-
|
|
39
|
+
id: orgId,
|
|
40
40
|
memberships: {
|
|
41
41
|
personId: currentUserId,
|
|
42
42
|
roles: {
|
|
@@ -83,7 +83,8 @@ let OrganisationSubscriptionService = OrganisationSubscriptionService_1 = class
|
|
|
83
83
|
}
|
|
84
84
|
return org.subscriptionRecords;
|
|
85
85
|
}
|
|
86
|
-
|
|
86
|
+
// eslint-disable-next-line sonarjs/cognitive-complexity
|
|
87
|
+
async save(subRecordDtoCollection, orgId) {
|
|
87
88
|
const results = [];
|
|
88
89
|
for (const subRecord of subRecordDtoCollection) {
|
|
89
90
|
let existingSubscription = await this.orgSubRepository.findOne({
|
|
@@ -94,21 +95,28 @@ let OrganisationSubscriptionService = OrganisationSubscriptionService_1 = class
|
|
|
94
95
|
if (!existingSubscription) {
|
|
95
96
|
// if no existing subscription then create a new one, get the org
|
|
96
97
|
let org;
|
|
97
|
-
if (
|
|
98
|
+
if (orgId === undefined) {
|
|
98
99
|
if (!subRecord.millerPaymentReferenceUuid) {
|
|
99
100
|
this.logger.error("No organisation uuid or payment reference uuid provided. Cannot match this payment to a customer", subRecord);
|
|
100
101
|
throw new common_1.NotFoundException("No organisation uuid or payment reference uuid provided. Cannot match this payment to a customer");
|
|
101
102
|
}
|
|
102
103
|
const paymentReference = await this.paymentSessionService.findSessionByUuid(subRecord.millerPaymentReferenceUuid ?? "");
|
|
103
|
-
|
|
104
|
+
org =
|
|
105
|
+
(await this.orgRepo.findOne({
|
|
106
|
+
where: {
|
|
107
|
+
uuid: paymentReference?.organisationUuid,
|
|
108
|
+
},
|
|
109
|
+
})) || undefined;
|
|
110
|
+
}
|
|
111
|
+
else {
|
|
112
|
+
// eslint-disable-next-line prefer-const
|
|
113
|
+
org =
|
|
114
|
+
(await this.orgRepo.findOne({
|
|
115
|
+
where: {
|
|
116
|
+
id: orgId,
|
|
117
|
+
},
|
|
118
|
+
})) || undefined;
|
|
104
119
|
}
|
|
105
|
-
// eslint-disable-next-line prefer-const
|
|
106
|
-
org =
|
|
107
|
-
(await this.orgRepo.findOne({
|
|
108
|
-
where: {
|
|
109
|
-
uuid: orgUuid,
|
|
110
|
-
},
|
|
111
|
-
})) || undefined;
|
|
112
120
|
existingSubscription = this.orgSubRepository.create({
|
|
113
121
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
114
122
|
organisation: org,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organisation-subscriptions.service.js","sourceRoot":"","sources":["../../src/organisation-subscriptions/organisation-subscriptions.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAqE;AACrE,6CAAiD;AACjD,qCAAmC;AACnC,6DAAoD;AACpD,sFAA0E;AAC1E,yFAAkF;AAClF,kGAA2F;AAIpF,IAAM,+BAA+B,uCAArC,MAAM,+BAA+B;IAI5B;IAEA;IACS;IANJ,MAAM,GAAG,IAAI,eAAM,CAAC,iCAA+B,CAAC,IAAI,CAAC,CAAC;IAC3E,YAEY,OAAiC,EAEjC,gBAA4D,EACnD,qBAA4C;QAHrD,YAAO,GAAP,OAAO,CAA0B;QAEjC,qBAAgB,GAAhB,gBAAgB,CAA4C;QACnD,0BAAqB,GAArB,qBAAqB,CAAuB;IAC9D,CAAC;IACI,eAAe,GACnB,mDAAmD,CAAC;IACxD,KAAK,CAAC,oBAAoB,CACtB,
|
|
1
|
+
{"version":3,"file":"organisation-subscriptions.service.js","sourceRoot":"","sources":["../../src/organisation-subscriptions/organisation-subscriptions.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAqE;AACrE,6CAAiD;AACjD,qCAAmC;AACnC,6DAAoD;AACpD,sFAA0E;AAC1E,yFAAkF;AAClF,kGAA2F;AAIpF,IAAM,+BAA+B,uCAArC,MAAM,+BAA+B;IAI5B;IAEA;IACS;IANJ,MAAM,GAAG,IAAI,eAAM,CAAC,iCAA+B,CAAC,IAAI,CAAC,CAAC;IAC3E,YAEY,OAAiC,EAEjC,gBAA4D,EACnD,qBAA4C;QAHrD,YAAO,GAAP,OAAO,CAA0B;QAEjC,qBAAgB,GAAhB,gBAAgB,CAA4C;QACnD,0BAAqB,GAArB,qBAAqB,CAAuB;IAC9D,CAAC;IACI,eAAe,GACnB,mDAAmD,CAAC;IACxD,KAAK,CAAC,oBAAoB,CACtB,KAAa,EACb,aAAqB;QAErB,oCAAoC;QACpC,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC;YACnC,KAAK,EAAE;gBACH,EAAE,EAAE,KAAK;gBACT,WAAW,EAAE;oBACT,QAAQ,EAAE,aAAa;oBACvB,KAAK,EAAE;wBACH,IAAI,EAAE,iBAAK,CAAC,KAAK;qBACpB;iBACJ;aACJ;YACD,SAAS,EAAE;gBACP,mBAAmB,EAAE,IAAI;aAC5B;SACJ,CAAC,CAAC;QACH,IAAI,CAAC,GAAG,EAAE;YACN,MAAM,IAAI,0BAAiB,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;SACrD;QAED,OAAO,GAAG,CAAC,mBAAmB,CAAC;IACnC,CAAC;IAED,KAAK,CAAC,OAAO,CACT,gBAAwB;QAExB,oCAAoC;QACpC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC;YAC/C,KAAK,EAAE;gBACH,IAAI,EAAE,gBAAgB;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AM,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAC3C,oBAAoB,CACvB,CAAC;YACF,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;SACxB;QAED,OAAO,OAAO,CAAC;IACnB,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,OAAe;QACxB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC;YAC9C,IAAI,EAAE,OAAO;SAChB,CAAC,CAAC;QAEH,OAAO,CACH,MAAM,CAAC,QAAQ,KAAK,SAAS;YAC7B,MAAM,CAAC,QAAQ,KAAK,IAAI;YACxB,MAAM,CAAC,QAAQ,GAAG,CAAC,CACtB,CAAC;IACN,CAAC;CACJ,CAAA;AAhLY,+BAA+B;IAD3C,IAAA,mBAAU,GAAE;IAIJ,WAAA,IAAA,0BAAgB,EAAC,kCAAY,CAAC,CAAA;IAE9B,WAAA,IAAA,0BAAgB,EAAC,iEAA8B,CAAC,CAAA;qCADhC,oBAAU;QAED,oBAAU;QACI,+CAAqB;GAPxD,+BAA+B,CAgL3C;AAhLY,0EAA+B"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { OrganisationMembership } from "../../organisation-memberships/entities/organisation-membership.entity";
|
|
2
|
+
export declare class PersonDto {
|
|
3
|
+
isSuper: boolean;
|
|
4
|
+
id: number;
|
|
5
|
+
email: string;
|
|
6
|
+
uuid: string;
|
|
7
|
+
emailVerified: boolean;
|
|
8
|
+
blocked: boolean;
|
|
9
|
+
name?: string;
|
|
10
|
+
familyName?: string;
|
|
11
|
+
givenName?: string;
|
|
12
|
+
picture: string;
|
|
13
|
+
auth0UserId: string;
|
|
14
|
+
username?: string;
|
|
15
|
+
memberships: OrganisationMembership[];
|
|
16
|
+
createdDate: Date;
|
|
17
|
+
updateDate: Date;
|
|
18
|
+
deletedDate: Date;
|
|
19
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
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.PersonDto = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const typeorm_1 = require("typeorm");
|
|
15
|
+
const organisation_membership_entity_1 = require("../../organisation-memberships/entities/organisation-membership.entity");
|
|
16
|
+
class PersonDto {
|
|
17
|
+
isSuper;
|
|
18
|
+
id;
|
|
19
|
+
email;
|
|
20
|
+
uuid;
|
|
21
|
+
emailVerified;
|
|
22
|
+
blocked;
|
|
23
|
+
name;
|
|
24
|
+
familyName;
|
|
25
|
+
givenName;
|
|
26
|
+
picture;
|
|
27
|
+
auth0UserId;
|
|
28
|
+
username;
|
|
29
|
+
memberships;
|
|
30
|
+
createdDate;
|
|
31
|
+
updateDate;
|
|
32
|
+
deletedDate;
|
|
33
|
+
}
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, swagger_1.ApiProperty)(),
|
|
36
|
+
__metadata("design:type", Boolean)
|
|
37
|
+
], PersonDto.prototype, "isSuper", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, swagger_1.ApiProperty)(),
|
|
40
|
+
__metadata("design:type", Number)
|
|
41
|
+
], PersonDto.prototype, "id", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, swagger_1.ApiProperty)(),
|
|
44
|
+
__metadata("design:type", String)
|
|
45
|
+
], PersonDto.prototype, "email", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, swagger_1.ApiProperty)(),
|
|
48
|
+
__metadata("design:type", String)
|
|
49
|
+
], PersonDto.prototype, "uuid", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, swagger_1.ApiProperty)(),
|
|
52
|
+
__metadata("design:type", Boolean)
|
|
53
|
+
], PersonDto.prototype, "emailVerified", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, swagger_1.ApiProperty)(),
|
|
56
|
+
(0, typeorm_1.Column)({ default: false }),
|
|
57
|
+
__metadata("design:type", Boolean)
|
|
58
|
+
], PersonDto.prototype, "blocked", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, swagger_1.ApiPropertyOptional)(),
|
|
61
|
+
__metadata("design:type", String)
|
|
62
|
+
], PersonDto.prototype, "name", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, swagger_1.ApiPropertyOptional)(),
|
|
65
|
+
__metadata("design:type", String)
|
|
66
|
+
], PersonDto.prototype, "familyName", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, swagger_1.ApiPropertyOptional)(),
|
|
69
|
+
__metadata("design:type", String)
|
|
70
|
+
], PersonDto.prototype, "givenName", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, swagger_1.ApiProperty)(),
|
|
73
|
+
__metadata("design:type", String)
|
|
74
|
+
], PersonDto.prototype, "picture", void 0);
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, swagger_1.ApiProperty)(),
|
|
77
|
+
__metadata("design:type", String)
|
|
78
|
+
], PersonDto.prototype, "auth0UserId", void 0);
|
|
79
|
+
__decorate([
|
|
80
|
+
(0, swagger_1.ApiPropertyOptional)(),
|
|
81
|
+
__metadata("design:type", String)
|
|
82
|
+
], PersonDto.prototype, "username", void 0);
|
|
83
|
+
__decorate([
|
|
84
|
+
(0, swagger_1.ApiProperty)({ type: () => organisation_membership_entity_1.OrganisationMembership, isArray: true }),
|
|
85
|
+
__metadata("design:type", Array)
|
|
86
|
+
], PersonDto.prototype, "memberships", void 0);
|
|
87
|
+
__decorate([
|
|
88
|
+
(0, swagger_1.ApiProperty)(),
|
|
89
|
+
__metadata("design:type", Date)
|
|
90
|
+
], PersonDto.prototype, "createdDate", void 0);
|
|
91
|
+
__decorate([
|
|
92
|
+
(0, swagger_1.ApiProperty)(),
|
|
93
|
+
__metadata("design:type", Date)
|
|
94
|
+
], PersonDto.prototype, "updateDate", void 0);
|
|
95
|
+
__decorate([
|
|
96
|
+
(0, swagger_1.ApiProperty)(),
|
|
97
|
+
__metadata("design:type", Date)
|
|
98
|
+
], PersonDto.prototype, "deletedDate", void 0);
|
|
99
|
+
exports.PersonDto = PersonDto;
|
|
100
|
+
//# sourceMappingURL=personResponseDto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"personResponseDto.js","sourceRoot":"","sources":["../../../src/person/dto/personResponseDto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAiE;AACjE,qCAA+B;AAC/B,2HAA8G;AAE9G,MAAa,SAAS;IAElB,OAAO,CAAW;IAGlB,EAAE,CAAU;IAGZ,KAAK,CAAU;IAGR,IAAI,CAAU;IAGrB,aAAa,CAAW;IAIxB,OAAO,CAAW;IAGlB,IAAI,CAAU;IAGd,UAAU,CAAU;IAGpB,SAAS,CAAU;IAGnB,OAAO,CAAU;IAGjB,WAAW,CAAU;IAGrB,QAAQ,CAAU;IAGlB,WAAW,CAA4B;IAGvC,WAAW,CAAQ;IAGnB,UAAU,CAAQ;IAGlB,WAAW,CAAQ;CACtB;AAhDG;IAAC,IAAA,qBAAW,GAAE;;0CACI;AAElB;IAAC,IAAA,qBAAW,GAAE;;qCACF;AAEZ;IAAC,IAAA,qBAAW,GAAE;;wCACC;AAEf;IAAC,IAAA,qBAAW,GAAE;;uCACO;AAErB;IAAC,IAAA,qBAAW,GAAE;;gDACU;AAExB;IAAC,IAAA,qBAAW,GAAE;IACb,IAAA,gBAAM,EAAC,EAAC,OAAO,EAAE,KAAK,EAAC,CAAC;;0CACP;AAElB;IAAC,IAAA,6BAAmB,GAAE;;uCACR;AAEd;IAAC,IAAA,6BAAmB,GAAE;;6CACF;AAEpB;IAAC,IAAA,6BAAmB,GAAE;;4CACH;AAEnB;IAAC,IAAA,qBAAW,GAAE;;0CACG;AAEjB;IAAC,IAAA,qBAAW,GAAE;;8CACO;AAErB;IAAC,IAAA,6BAAmB,GAAE;;2CACJ;AAElB;IAAC,IAAA,qBAAW,EAAC,EAAC,IAAI,EAAE,GAAG,EAAE,CAAC,uDAAsB,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;;8CAC1B;AAEvC;IAAC,IAAA,qBAAW,GAAE;8BACA,IAAI;8CAAC;AAEnB;IAAC,IAAA,qBAAW,GAAE;8BACD,IAAI;6CAAC;AAElB;IAAC,IAAA,qBAAW,GAAE;8BACA,IAAI;8CAAC;AAhDvB,8BAiDC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { PersonService } from "./person.service";
|
|
2
2
|
import { UpdatePersonDto } from "./dto/update-person.dto";
|
|
3
|
-
import { Person } from "./entities/person.entity";
|
|
4
3
|
import { RequestWithUser } from "../authz/RequestWithUser";
|
|
5
4
|
import { BooleanResult } from "../root-app/models/boolean-result";
|
|
5
|
+
import { PersonDto } from "./dto/personResponseDto";
|
|
6
6
|
export declare class PersonController {
|
|
7
7
|
private readonly personService;
|
|
8
8
|
constructor(personService: PersonService);
|
|
9
|
-
findOne(request: RequestWithUser, uuid: string): Promise<
|
|
9
|
+
findOne(request: RequestWithUser, uuid: string): Promise<PersonDto>;
|
|
10
10
|
update(uuid: string, updatePersonDto: UpdatePersonDto, request: RequestWithUser): Promise<{
|
|
11
11
|
result: boolean | 0 | undefined;
|
|
12
12
|
}>;
|
|
@@ -17,10 +17,10 @@ const common_1 = require("@nestjs/common");
|
|
|
17
17
|
const person_service_1 = require("./person.service");
|
|
18
18
|
const update_person_dto_1 = require("./dto/update-person.dto");
|
|
19
19
|
const swagger_1 = require("@nestjs/swagger");
|
|
20
|
-
const person_entity_1 = require("./entities/person.entity");
|
|
21
20
|
const passport_1 = require("@nestjs/passport");
|
|
22
21
|
const class_validator_1 = require("class-validator");
|
|
23
22
|
const boolean_result_1 = require("../root-app/models/boolean-result");
|
|
23
|
+
const personResponseDto_1 = require("./dto/personResponseDto");
|
|
24
24
|
let PersonController = class PersonController {
|
|
25
25
|
personService;
|
|
26
26
|
constructor(personService) {
|
|
@@ -28,13 +28,21 @@ let PersonController = class PersonController {
|
|
|
28
28
|
}
|
|
29
29
|
async findOne(request, uuid) {
|
|
30
30
|
if (uuid === "me") {
|
|
31
|
-
|
|
31
|
+
const result = await this.personService.findOne(request.user.id);
|
|
32
|
+
return {
|
|
33
|
+
...result,
|
|
34
|
+
isSuper: request.user.permissions.includes("write:all"),
|
|
35
|
+
};
|
|
32
36
|
}
|
|
33
37
|
if (!(0, class_validator_1.isUUID)(uuid, "4")) {
|
|
34
38
|
throw new common_1.BadRequestException(uuid, "Invalid UUID");
|
|
35
39
|
}
|
|
36
40
|
// find the person if they are in the same organisation as the user
|
|
37
|
-
|
|
41
|
+
const result = await this.personService.findOneIfSameOrganisation(uuid, request.user);
|
|
42
|
+
return {
|
|
43
|
+
...result,
|
|
44
|
+
isSuper: request.user.permissions.includes("write:all"),
|
|
45
|
+
};
|
|
38
46
|
}
|
|
39
47
|
async update(uuid, updatePersonDto, request) {
|
|
40
48
|
const result = await this.personService.update(uuid, updatePersonDto, request.user.uuid);
|
|
@@ -47,7 +55,7 @@ let PersonController = class PersonController {
|
|
|
47
55
|
};
|
|
48
56
|
__decorate([
|
|
49
57
|
(0, common_1.Get)(":uuid"),
|
|
50
|
-
(0, swagger_1.ApiOkResponse)({ type:
|
|
58
|
+
(0, swagger_1.ApiOkResponse)({ type: personResponseDto_1.PersonDto }),
|
|
51
59
|
__param(0, (0, common_1.Request)()),
|
|
52
60
|
__param(1, (0, common_1.Param)("uuid")),
|
|
53
61
|
__metadata("design:type", Function),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"person.controller.js","sourceRoot":"","sources":["../../src/person/person.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAUwB;AACxB,qDAA+C;AAC/C,+DAAwD;AACxD,6CAAsE;AACtE
|
|
1
|
+
{"version":3,"file":"person.controller.js","sourceRoot":"","sources":["../../src/person/person.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAUwB;AACxB,qDAA+C;AAC/C,+DAAwD;AACxD,6CAAsE;AACtE,+CAA2C;AAE3C,qDAAuC;AACvC,sEAAgE;AAChE,+DAAkD;AAM3C,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IACI;IAA7B,YAA6B,aAA4B;QAA5B,kBAAa,GAAb,aAAa,CAAe;IAAG,CAAC;IAIvD,AAAN,KAAK,CAAC,OAAO,CACE,OAAwB,EACpB,IAAY;QAE3B,IAAI,IAAI,KAAK,IAAI,EAAE;YACf,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACjE,OAAO;gBACH,GAAG,MAAM;gBACT,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,WAAW,CAAC;aAC1D,CAAC;SACL;QACD,IAAI,CAAC,IAAA,wBAAM,EAAC,IAAI,EAAE,GAAG,CAAC,EAAE;YACpB,MAAM,IAAI,4BAAmB,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC;SACvD;QAED,mEAAmE;QACnE,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAC7D,IAAI,EACJ,OAAO,CAAC,IAAI,CACf,CAA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,EAAE,8BAAa,EAAC,CAAC;IAEhC,WAAA,IAAA,cAAK,EAAC,MAAM,CAAC,CAAA;IACb,WAAA,IAAA,gBAAO,GAAE,CAAA;;;;8CAOb;AAzDQ,gBAAgB;IAJ5B,IAAA,kBAAS,EAAC,IAAA,oBAAS,EAAC,KAAK,CAAC,CAAC;IAC3B,IAAA,uBAAa,GAAE;IACf,IAAA,mBAAU,EAAC,QAAQ,CAAC;IACpB,IAAA,iBAAO,EAAC,SAAS,CAAC;qCAE6B,8BAAa;GADhD,gBAAgB,CA0D5B;AA1DY,4CAAgB"}
|
|
@@ -72,7 +72,9 @@ let PersonService = PersonService_1 = class PersonService {
|
|
|
72
72
|
}
|
|
73
73
|
const person = this.repository.create();
|
|
74
74
|
person.memberships = [membership];
|
|
75
|
-
|
|
75
|
+
// eslint-disable-next-line sonarjs/prefer-immediate-return
|
|
76
|
+
const updatedPerson = this.updatePersonFromAuth0(person, auth0User);
|
|
77
|
+
return updatedPerson;
|
|
76
78
|
}
|
|
77
79
|
async updatePersonFromAuth0(person, auth0User) {
|
|
78
80
|
person.auth0UserId = auth0User.sub;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"person.service.js","sourceRoot":"","sources":["../../src/person/person.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAqE;AACrE,6CAAiD;AACjD,qCAAmC;AAGnC,gEAAgE;AAEhE,wHAA2G;AAC3G,6DAAoD;AACpD,oFAA2E;AAC3E,sFAA0E;AAE1E,4DAAgD;AAGzC,IAAM,aAAa,qBAAnB,MAAM,aAAa;IAIV;IACA;IAJK,MAAM,GAAG,IAAI,eAAM,CAAC,eAAa,CAAC,IAAI,CAAC,CAAC;IACzD,YAEY,UAA8B,EAC9B,WAA+B;QAD/B,eAAU,GAAV,UAAU,CAAoB;QAC9B,gBAAW,GAAX,WAAW,CAAoB;IACxC,CAAC;IAEJ,KAAK,CAAC,YAAY,CACd,OAAoB,EACpB,cAAsB;QAEtB,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AM,IAAI,KAAK,CACX,sEAAsE,CACzE,CAAC;SACL;QAED,OAAO,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACxC,CAAC;IAEO,YAAY,CAChB,IAAY,EACZ,eAAuB,EACvB,eAAuB;QAEvB,IAAI,IAAI,KAAK,eAAe,EAAE;YAC1B,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,gBAAgB,eAAe,eAAe,EAAE;gBAC7D,eAAe;gBACf,IAAI;aACP,CAAC,CAAC;YACH,MAAM,IAAI,0BAAiB,EAAE,CAAC;SACjC;IACL,CAAC;CACJ,CAAA;AAjMY,aAAa;IADzB,IAAA,mBAAU,GAAE;IAIJ,WAAA,IAAA,0BAAgB,EAAC,sBAAM,CAAC,CAAA;qCACL,oBAAU;QACT,kCAAkB;GALlC,aAAa,CAiMzB;AAjMY,sCAAa"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@darraghor/nest-backend-libs",
|
|
3
|
-
"version": "2.18.
|
|
3
|
+
"version": "2.18.27",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
5
5
|
"description": "Some helpers for personal projects in nestjs",
|
|
6
6
|
"homepage": "https://github.com/darraghoriordan/nest-backend-libs",
|