@darraghor/nest-backend-libs 2.10.7 → 2.10.9
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/invitations/InvitationConfigurationService.d.ts +7 -0
- package/dist/invitations/InvitationConfigurationService.js +39 -0
- package/dist/invitations/InvitationConfigurationService.js.map +1 -0
- package/dist/invitations/InvitationConfigurationVariables.d.ts +6 -0
- package/dist/invitations/InvitationConfigurationVariables.js +7 -0
- package/dist/invitations/InvitationConfigurationVariables.js.map +1 -0
- package/dist/invitations/dto/create-invitation.dto.d.ts +5 -0
- package/dist/invitations/dto/create-invitation.dto.js +32 -0
- package/dist/invitations/dto/create-invitation.dto.js.map +1 -0
- package/dist/invitations/entities/invitation.entity.d.ts +14 -0
- package/dist/invitations/entities/invitation.entity.js +94 -0
- package/dist/invitations/entities/invitation.entity.js.map +1 -0
- package/dist/invitations/invitation.controller.d.ts +10 -0
- package/dist/invitations/invitation.controller.js +61 -0
- package/dist/invitations/invitation.controller.js.map +1 -0
- package/dist/invitations/invitation.module.d.ts +2 -0
- package/dist/invitations/invitation.module.js +42 -0
- package/dist/invitations/invitation.module.js.map +1 -0
- package/dist/invitations/invitation.service.d.ts +16 -0
- package/dist/invitations/invitation.service.js +96 -0
- package/dist/invitations/invitation.service.js.map +1 -0
- package/dist/organisation/entities/organisation-membership.entity.d.ts +2 -0
- package/dist/organisation/entities/organisation-membership.entity.js +12 -6
- package/dist/organisation/entities/organisation-membership.entity.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ConfigService } from "@nestjs/config";
|
|
2
|
+
import { ValidatedConfigurationService } from "../configuration/ValidatedConfigurationService";
|
|
3
|
+
export declare class InvitationsConfigurationService extends ValidatedConfigurationService {
|
|
4
|
+
private configService;
|
|
5
|
+
constructor(configService: ConfigService);
|
|
6
|
+
get baseUrl(): string;
|
|
7
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
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.InvitationsConfigurationService = void 0;
|
|
13
|
+
/* eslint-disable @typescript-eslint/no-non-null-assertion */
|
|
14
|
+
const common_1 = require("@nestjs/common");
|
|
15
|
+
const config_1 = require("@nestjs/config");
|
|
16
|
+
const class_validator_1 = require("class-validator");
|
|
17
|
+
const ValidatedConfigurationService_1 = require("../configuration/ValidatedConfigurationService");
|
|
18
|
+
let InvitationsConfigurationService = class InvitationsConfigurationService extends ValidatedConfigurationService_1.ValidatedConfigurationService {
|
|
19
|
+
configService;
|
|
20
|
+
constructor(configService) {
|
|
21
|
+
super();
|
|
22
|
+
this.configService = configService;
|
|
23
|
+
}
|
|
24
|
+
get baseUrl() {
|
|
25
|
+
return this.configService.get("invitations.baseUrl");
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, class_validator_1.IsDefined)(),
|
|
30
|
+
(0, class_validator_1.IsString)(),
|
|
31
|
+
__metadata("design:type", String),
|
|
32
|
+
__metadata("design:paramtypes", [])
|
|
33
|
+
], InvitationsConfigurationService.prototype, "baseUrl", null);
|
|
34
|
+
InvitationsConfigurationService = __decorate([
|
|
35
|
+
(0, common_1.Injectable)(),
|
|
36
|
+
__metadata("design:paramtypes", [config_1.ConfigService])
|
|
37
|
+
], InvitationsConfigurationService);
|
|
38
|
+
exports.InvitationsConfigurationService = InvitationsConfigurationService;
|
|
39
|
+
//# sourceMappingURL=InvitationConfigurationService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InvitationConfigurationService.js","sourceRoot":"","sources":["../../src/invitations/InvitationConfigurationService.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6DAA6D;AAC7D,2CAA0C;AAC1C,2CAA6C;AAC7C,qDAAoD;AACpD,kGAA6F;AAGtF,IAAM,+BAA+B,GAArC,MAAM,+BAAgC,SAAQ,6DAA6B;IAC1D;IAApB,YAAoB,aAA4B;QAC5C,KAAK,EAAE,CAAC;QADQ,kBAAa,GAAb,aAAa,CAAe;IAEhD,CAAC;IAED,IAEI,OAAO;QACP,OAAO,IAAI,CAAC,aAAa,CAAC,GAAG,CAAS,qBAAqB,CAAE,CAAC;IAClE,CAAC;CACJ,CAAA;AALG;IAAC,IAAA,2BAAS,GAAE;IACX,IAAA,0BAAQ,GAAE;;;8DAGV;AATQ,+BAA+B;IAD3C,IAAA,mBAAU,GAAE;qCAE0B,sBAAa;GADvC,+BAA+B,CAU3C;AAVY,0EAA+B"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const config_1 = require("@nestjs/config");
|
|
4
|
+
exports.default = (0, config_1.registerAs)("invitations", () => ({
|
|
5
|
+
baseUrl: process.env.INVITATION_URLS_BASE_URL,
|
|
6
|
+
}));
|
|
7
|
+
//# sourceMappingURL=InvitationConfigurationVariables.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InvitationConfigurationVariables.js","sourceRoot":"","sources":["../../src/invitations/InvitationConfigurationVariables.ts"],"names":[],"mappings":";;AAAA,2CAA0C;AAE1C,kBAAe,IAAA,mBAAU,EAAC,aAAa,EAAE,GAAG,EAAE,CAAC,CAAC;IAC5C,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,wBAAwB;CAChD,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
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.CreateInvitationDto = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
class CreateInvitationDto {
|
|
15
|
+
givenName;
|
|
16
|
+
emailAddress;
|
|
17
|
+
organisationId;
|
|
18
|
+
}
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, swagger_1.ApiProperty)(),
|
|
21
|
+
__metadata("design:type", String)
|
|
22
|
+
], CreateInvitationDto.prototype, "givenName", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, swagger_1.ApiProperty)(),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], CreateInvitationDto.prototype, "emailAddress", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, swagger_1.ApiProperty)(),
|
|
29
|
+
__metadata("design:type", Number)
|
|
30
|
+
], CreateInvitationDto.prototype, "organisationId", void 0);
|
|
31
|
+
exports.CreateInvitationDto = CreateInvitationDto;
|
|
32
|
+
//# sourceMappingURL=create-invitation.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-invitation.dto.js","sourceRoot":"","sources":["../../../src/invitations/dto/create-invitation.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA4C;AAE5C,MAAa,mBAAmB;IAE5B,SAAS,CAAU;IAGnB,YAAY,CAAU;IAGtB,cAAc,CAAU;CAC3B;AARG;IAAC,IAAA,qBAAW,GAAE;;sDACK;AAEnB;IAAC,IAAA,qBAAW,GAAE;;yDACQ;AAEtB;IAAC,IAAA,qBAAW,GAAE;;2DACU;AAR5B,kDASC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Organisation } from "../../organisation/entities/organisation.entity";
|
|
2
|
+
export declare class Invitation {
|
|
3
|
+
id: number;
|
|
4
|
+
uuid: string;
|
|
5
|
+
givenName: string;
|
|
6
|
+
emailAddress: string;
|
|
7
|
+
notificationSent: Date;
|
|
8
|
+
expiresOn: Date;
|
|
9
|
+
acceptedOn?: Date;
|
|
10
|
+
organisation: Organisation;
|
|
11
|
+
createdDate: Date;
|
|
12
|
+
updateDate: Date;
|
|
13
|
+
deletedDate?: Date;
|
|
14
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
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.Invitation = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const typeorm_1 = require("typeorm");
|
|
15
|
+
const organisation_entity_1 = require("../../organisation/entities/organisation.entity");
|
|
16
|
+
let Invitation = class Invitation {
|
|
17
|
+
id;
|
|
18
|
+
uuid;
|
|
19
|
+
givenName;
|
|
20
|
+
emailAddress;
|
|
21
|
+
notificationSent;
|
|
22
|
+
expiresOn;
|
|
23
|
+
acceptedOn;
|
|
24
|
+
organisation;
|
|
25
|
+
createdDate;
|
|
26
|
+
updateDate;
|
|
27
|
+
deletedDate;
|
|
28
|
+
};
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, typeorm_1.PrimaryGeneratedColumn)(),
|
|
31
|
+
(0, swagger_1.ApiProperty)(),
|
|
32
|
+
__metadata("design:type", Number)
|
|
33
|
+
], Invitation.prototype, "id", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typeorm_1.Column)("uuid", {
|
|
36
|
+
name: "uuid",
|
|
37
|
+
default: () => "uuid_generate_v4()",
|
|
38
|
+
}),
|
|
39
|
+
(0, typeorm_1.Generated)("uuid"),
|
|
40
|
+
(0, swagger_1.ApiProperty)(),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], Invitation.prototype, "uuid", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, typeorm_1.Column)(),
|
|
45
|
+
(0, swagger_1.ApiProperty)(),
|
|
46
|
+
__metadata("design:type", String)
|
|
47
|
+
], Invitation.prototype, "givenName", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, typeorm_1.Column)(),
|
|
50
|
+
(0, swagger_1.ApiProperty)(),
|
|
51
|
+
__metadata("design:type", String)
|
|
52
|
+
], Invitation.prototype, "emailAddress", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, typeorm_1.Column)(),
|
|
55
|
+
(0, swagger_1.ApiProperty)(),
|
|
56
|
+
__metadata("design:type", Date)
|
|
57
|
+
], Invitation.prototype, "notificationSent", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, typeorm_1.Column)(),
|
|
60
|
+
(0, swagger_1.ApiProperty)(),
|
|
61
|
+
__metadata("design:type", Date)
|
|
62
|
+
], Invitation.prototype, "expiresOn", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, typeorm_1.Column)(),
|
|
65
|
+
(0, swagger_1.ApiPropertyOptional)(),
|
|
66
|
+
__metadata("design:type", Date)
|
|
67
|
+
], Invitation.prototype, "acceptedOn", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, swagger_1.ApiProperty)(),
|
|
70
|
+
(0, typeorm_1.ManyToOne)(() => organisation_entity_1.Organisation, {
|
|
71
|
+
eager: true,
|
|
72
|
+
}),
|
|
73
|
+
__metadata("design:type", organisation_entity_1.Organisation)
|
|
74
|
+
], Invitation.prototype, "organisation", void 0);
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, typeorm_1.CreateDateColumn)(),
|
|
77
|
+
(0, swagger_1.ApiProperty)(),
|
|
78
|
+
__metadata("design:type", Date)
|
|
79
|
+
], Invitation.prototype, "createdDate", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
(0, typeorm_1.UpdateDateColumn)(),
|
|
82
|
+
(0, swagger_1.ApiProperty)(),
|
|
83
|
+
__metadata("design:type", Date)
|
|
84
|
+
], Invitation.prototype, "updateDate", void 0);
|
|
85
|
+
__decorate([
|
|
86
|
+
(0, typeorm_1.DeleteDateColumn)(),
|
|
87
|
+
(0, swagger_1.ApiPropertyOptional)(),
|
|
88
|
+
__metadata("design:type", Date)
|
|
89
|
+
], Invitation.prototype, "deletedDate", void 0);
|
|
90
|
+
Invitation = __decorate([
|
|
91
|
+
(0, typeorm_1.Entity)()
|
|
92
|
+
], Invitation);
|
|
93
|
+
exports.Invitation = Invitation;
|
|
94
|
+
//# sourceMappingURL=invitation.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invitation.entity.js","sourceRoot":"","sources":["../../../src/invitations/entities/invitation.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAiE;AAEjE,qCASiB;AACjB,yFAA6E;AAGtE,IAAM,UAAU,GAAhB,MAAM,UAAU;IAGnB,EAAE,CAAU;IAQL,IAAI,CAAU;IAIrB,SAAS,CAAU;IAInB,YAAY,CAAU;IAItB,gBAAgB,CAAQ;IAIxB,SAAS,CAAQ;IAIjB,UAAU,CAAQ;IAMlB,YAAY,CAAgB;IAI5B,WAAW,CAAQ;IAInB,UAAU,CAAQ;IAIlB,WAAW,CAAQ;CACtB,CAAA;AAjDG;IAAC,IAAA,gCAAsB,GAAE;IACxB,IAAA,qBAAW,GAAE;;sCACF;AAEZ;IAAC,IAAA,gBAAM,EAAC,MAAM,EAAE;QACZ,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,GAAG,EAAE,CAAC,oBAAoB;KACtC,CAAC;IACD,IAAA,mBAAS,EAAC,MAAM,CAAC;IACjB,IAAA,qBAAW,GAAE;;wCACO;AAErB;IAAC,IAAA,gBAAM,GAAE;IACR,IAAA,qBAAW,GAAE;;6CACK;AAEnB;IAAC,IAAA,gBAAM,GAAE;IACR,IAAA,qBAAW,GAAE;;gDACQ;AAEtB;IAAC,IAAA,gBAAM,GAAE;IACR,IAAA,qBAAW,GAAE;8BACK,IAAI;oDAAC;AAExB;IAAC,IAAA,gBAAM,GAAE;IACR,IAAA,qBAAW,GAAE;8BACF,IAAI;6CAAC;AAEjB;IAAC,IAAA,gBAAM,GAAE;IACR,IAAA,6BAAmB,GAAE;8BACT,IAAI;8CAAC;AAElB;IAAC,IAAA,qBAAW,GAAE;IACb,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,kCAAY,EAAE;QAC3B,KAAK,EAAE,IAAI;KACd,CAAC;8BACa,kCAAY;gDAAC;AAE5B;IAAC,IAAA,0BAAgB,GAAE;IAClB,IAAA,qBAAW,GAAE;8BACA,IAAI;+CAAC;AAEnB;IAAC,IAAA,0BAAgB,GAAE;IAClB,IAAA,qBAAW,GAAE;8BACD,IAAI;8CAAC;AAElB;IAAC,IAAA,0BAAgB,GAAE;IAClB,IAAA,6BAAmB,GAAE;8BACR,IAAI;+CAAC;AAjDV,UAAU;IADtB,IAAA,gBAAM,GAAE;GACI,UAAU,CAkDtB;AAlDY,gCAAU"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { RequestWithUser } from "../authz/RequestWithUser";
|
|
2
|
+
import { Invitation } from "./entities/invitation.entity";
|
|
3
|
+
import { InvitationService } from "./invitation.service";
|
|
4
|
+
import { CreateInvitationDto } from "./dto/create-invitation.dto";
|
|
5
|
+
export declare class InvitationController {
|
|
6
|
+
private readonly invitationService;
|
|
7
|
+
constructor(invitationService: InvitationService);
|
|
8
|
+
create(createDto: CreateInvitationDto, request: RequestWithUser): Promise<Invitation>;
|
|
9
|
+
remove(uuid: string, request: RequestWithUser): Promise<boolean>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
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
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.InvitationController = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
18
|
+
const passport_1 = require("@nestjs/passport");
|
|
19
|
+
const invitation_entity_1 = require("./entities/invitation.entity");
|
|
20
|
+
const invitation_service_1 = require("./invitation.service");
|
|
21
|
+
const create_invitation_dto_1 = require("./dto/create-invitation.dto");
|
|
22
|
+
let InvitationController = class InvitationController {
|
|
23
|
+
invitationService;
|
|
24
|
+
constructor(invitationService) {
|
|
25
|
+
this.invitationService = invitationService;
|
|
26
|
+
}
|
|
27
|
+
async create(createDto, request) {
|
|
28
|
+
return this.invitationService.create(createDto, request.user);
|
|
29
|
+
}
|
|
30
|
+
async remove(uuid, request) {
|
|
31
|
+
const deleteResult = await this.invitationService.remove(uuid, request.user.id);
|
|
32
|
+
return deleteResult.deletedDate !== undefined;
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, common_1.Post)(),
|
|
37
|
+
(0, swagger_1.ApiOkResponse)({ type: invitation_entity_1.Invitation }),
|
|
38
|
+
__param(0, (0, common_1.Body)()),
|
|
39
|
+
__param(1, (0, common_1.Request)()),
|
|
40
|
+
__metadata("design:type", Function),
|
|
41
|
+
__metadata("design:paramtypes", [create_invitation_dto_1.CreateInvitationDto, Object]),
|
|
42
|
+
__metadata("design:returntype", Promise)
|
|
43
|
+
], InvitationController.prototype, "create", null);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, common_1.Delete)(":uuid"),
|
|
46
|
+
(0, swagger_1.ApiOkResponse)({ type: invitation_entity_1.Invitation }),
|
|
47
|
+
__param(0, (0, common_1.Param)("uuid")),
|
|
48
|
+
__param(1, (0, common_1.Request)()),
|
|
49
|
+
__metadata("design:type", Function),
|
|
50
|
+
__metadata("design:paramtypes", [String, Object]),
|
|
51
|
+
__metadata("design:returntype", Promise)
|
|
52
|
+
], InvitationController.prototype, "remove", null);
|
|
53
|
+
InvitationController = __decorate([
|
|
54
|
+
(0, common_1.UseGuards)((0, passport_1.AuthGuard)("jwt")),
|
|
55
|
+
(0, swagger_1.ApiBearerAuth)(),
|
|
56
|
+
(0, common_1.Controller)("invitations"),
|
|
57
|
+
(0, swagger_1.ApiTags)("organisations"),
|
|
58
|
+
__metadata("design:paramtypes", [invitation_service_1.InvitationService])
|
|
59
|
+
], InvitationController);
|
|
60
|
+
exports.InvitationController = InvitationController;
|
|
61
|
+
//# sourceMappingURL=invitation.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invitation.controller.js","sourceRoot":"","sources":["../../src/invitations/invitation.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAQwB;AAExB,6CAAsE;AAEtE,+CAA2C;AAE3C,oEAAwD;AACxD,6DAAuD;AACvD,uEAAgE;AAMzD,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IACA;IAA7B,YAA6B,iBAAoC;QAApC,sBAAiB,GAAjB,iBAAiB,CAAmB;IAAG,CAAC;IAI/D,AAAN,KAAK,CAAC,MAAM,CACA,SAA8B,EAC3B,OAAwB;QAEnC,OAAO,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IAClE,CAAC;IAIK,AAAN,KAAK,CAAC,MAAM,CACO,IAAY,EAChB,OAAwB;QAEnC,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,iBAAiB,CAAC,MAAM,CACpD,IAAI,EACJ,OAAO,CAAC,IAAI,CAAC,EAAE,CAClB,CAAC;QAEF,OAAO,YAAY,CAAC,WAAW,KAAK,SAAS,CAAC;IAClD,CAAC;CACJ,CAAA;AApBS;IAFL,IAAA,aAAI,GAAE;IACN,IAAA,uBAAa,EAAC,EAAC,IAAI,EAAE,8BAAU,EAAC,CAAC;IAE7B,WAAA,IAAA,aAAI,GAAE,CAAA;IACN,WAAA,IAAA,gBAAO,GAAE,CAAA;;qCADS,2CAAmB;;kDAIzC;AAIK;IAFL,IAAA,eAAM,EAAC,OAAO,CAAC;IACf,IAAA,uBAAa,EAAC,EAAC,IAAI,EAAE,8BAAU,EAAC,CAAC;IAE7B,WAAA,IAAA,cAAK,EAAC,MAAM,CAAC,CAAA;IACb,WAAA,IAAA,gBAAO,GAAE,CAAA;;;;kDAQb;AAxBQ,oBAAoB;IAJhC,IAAA,kBAAS,EAAC,IAAA,oBAAS,EAAC,KAAK,CAAC,CAAC;IAC3B,IAAA,uBAAa,GAAE;IACf,IAAA,mBAAU,EAAC,aAAa,CAAC;IACzB,IAAA,iBAAO,EAAC,eAAe,CAAC;qCAE2B,sCAAiB;GADxD,oBAAoB,CAyBhC;AAzBY,oDAAoB"}
|
|
@@ -0,0 +1,42 @@
|
|
|
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 __importDefault = (this && this.__importDefault) || function (mod) {
|
|
9
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.InvitationModule = void 0;
|
|
13
|
+
const common_1 = require("@nestjs/common");
|
|
14
|
+
const logger_module_1 = require("../logger/logger.module");
|
|
15
|
+
const typeorm_1 = require("@nestjs/typeorm");
|
|
16
|
+
const invitation_entity_1 = require("./entities/invitation.entity");
|
|
17
|
+
const invitation_controller_1 = require("./invitation.controller");
|
|
18
|
+
const invitation_service_1 = require("./invitation.service");
|
|
19
|
+
const smtp_email_client_module_1 = require("../smtp-email-client/smtp-email-client.module");
|
|
20
|
+
const organisation_module_1 = require("../organisation/organisation.module");
|
|
21
|
+
const config_1 = require("@nestjs/config");
|
|
22
|
+
const InvitationConfigurationVariables_1 = __importDefault(require("./InvitationConfigurationVariables"));
|
|
23
|
+
const InvitationConfigurationService_1 = require("./InvitationConfigurationService");
|
|
24
|
+
const organisation_entity_1 = require("../organisation/entities/organisation.entity");
|
|
25
|
+
let InvitationModule = class InvitationModule {
|
|
26
|
+
};
|
|
27
|
+
InvitationModule = __decorate([
|
|
28
|
+
(0, common_1.Module)({
|
|
29
|
+
imports: [
|
|
30
|
+
config_1.ConfigModule.forFeature(InvitationConfigurationVariables_1.default),
|
|
31
|
+
logger_module_1.LoggerModule,
|
|
32
|
+
typeorm_1.TypeOrmModule.forFeature([invitation_entity_1.Invitation, organisation_entity_1.Organisation]),
|
|
33
|
+
smtp_email_client_module_1.SmtpEmailClientModule,
|
|
34
|
+
organisation_module_1.OrganisationModule,
|
|
35
|
+
],
|
|
36
|
+
controllers: [invitation_controller_1.InvitationController],
|
|
37
|
+
providers: [invitation_service_1.InvitationService, InvitationConfigurationService_1.InvitationsConfigurationService],
|
|
38
|
+
exports: [invitation_service_1.InvitationService],
|
|
39
|
+
})
|
|
40
|
+
], InvitationModule);
|
|
41
|
+
exports.InvitationModule = InvitationModule;
|
|
42
|
+
//# sourceMappingURL=invitation.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invitation.module.js","sourceRoot":"","sources":["../../src/invitations/invitation.module.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAsC;AACtC,2DAAqD;AACrD,6CAA8C;AAC9C,oEAAwD;AACxD,mEAA6D;AAC7D,6DAAuD;AACvD,4FAAoF;AACpF,6EAAuE;AACvE,2CAA4C;AAC5C,0GAAiE;AACjE,qFAAiF;AACjF,sFAA0E;AAcnE,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;CAAG,CAAA;AAAnB,gBAAgB;IAZ5B,IAAA,eAAM,EAAC;QACJ,OAAO,EAAE;YACL,qBAAY,CAAC,UAAU,CAAC,0CAAe,CAAC;YACxC,4BAAY;YACZ,uBAAa,CAAC,UAAU,CAAC,CAAC,8BAAU,EAAE,kCAAY,CAAC,CAAC;YACpD,gDAAqB;YACrB,wCAAkB;SACrB;QACD,WAAW,EAAE,CAAC,4CAAoB,CAAC;QACnC,SAAS,EAAE,CAAC,sCAAiB,EAAE,gEAA+B,CAAC;QAC/D,OAAO,EAAE,CAAC,sCAAiB,CAAC;KAC/B,CAAC;GACW,gBAAgB,CAAG;AAAnB,4CAAgB"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Repository } from "typeorm";
|
|
2
|
+
import { CreateInvitationDto } from "./dto/create-invitation.dto";
|
|
3
|
+
import { Invitation } from "./entities/invitation.entity";
|
|
4
|
+
import { SmtpEmailClient } from "../smtp-email-client/email-client.service";
|
|
5
|
+
import { Person } from "../person/entities/person.entity";
|
|
6
|
+
import { Organisation } from "../organisation/entities/organisation.entity";
|
|
7
|
+
import { InvitationsConfigurationService } from "./InvitationConfigurationService";
|
|
8
|
+
export declare class InvitationService {
|
|
9
|
+
private invitationRepository;
|
|
10
|
+
private organisationRepository;
|
|
11
|
+
private readonly emailClient;
|
|
12
|
+
private readonly configService;
|
|
13
|
+
constructor(invitationRepository: Repository<Invitation>, organisationRepository: Repository<Organisation>, emailClient: SmtpEmailClient, configService: InvitationsConfigurationService);
|
|
14
|
+
create(createDto: CreateInvitationDto, createdBy: Omit<Person, "nullChecks">): Promise<Invitation>;
|
|
15
|
+
remove(uuid: string, currentUserId: number): Promise<Invitation>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
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
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.InvitationService = 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("../organisation/dto/RolesEnum");
|
|
20
|
+
const invitation_entity_1 = require("./entities/invitation.entity");
|
|
21
|
+
const email_client_service_1 = require("../smtp-email-client/email-client.service");
|
|
22
|
+
const organisation_entity_1 = require("../organisation/entities/organisation.entity");
|
|
23
|
+
const InvitationConfigurationService_1 = require("./InvitationConfigurationService");
|
|
24
|
+
let InvitationService = class InvitationService {
|
|
25
|
+
invitationRepository;
|
|
26
|
+
organisationRepository;
|
|
27
|
+
emailClient;
|
|
28
|
+
configService;
|
|
29
|
+
constructor(invitationRepository, organisationRepository, emailClient, configService) {
|
|
30
|
+
this.invitationRepository = invitationRepository;
|
|
31
|
+
this.organisationRepository = organisationRepository;
|
|
32
|
+
this.emailClient = emailClient;
|
|
33
|
+
this.configService = configService;
|
|
34
|
+
}
|
|
35
|
+
async create(createDto, createdBy) {
|
|
36
|
+
const existingInvitations = await this.invitationRepository.find({
|
|
37
|
+
where: {
|
|
38
|
+
emailAddress: createDto.emailAddress,
|
|
39
|
+
organisation: {
|
|
40
|
+
id: createDto.organisationId,
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
const hasUnexpiredInvitations = existingInvitations.some((invitation) => invitation.expiresOn > new Date());
|
|
45
|
+
if (hasUnexpiredInvitations) {
|
|
46
|
+
throw new Error("An valid invitation already exists for this email address for this organisation");
|
|
47
|
+
}
|
|
48
|
+
// otherwise, create a new invitation
|
|
49
|
+
const unsavedInvitation = new invitation_entity_1.Invitation();
|
|
50
|
+
unsavedInvitation.emailAddress = createDto.emailAddress;
|
|
51
|
+
unsavedInvitation.expiresOn = new Date();
|
|
52
|
+
unsavedInvitation.expiresOn.setDate(unsavedInvitation.expiresOn.getDate() + 1);
|
|
53
|
+
unsavedInvitation.organisation =
|
|
54
|
+
await this.organisationRepository.findOneOrFail({
|
|
55
|
+
where: { id: createDto.organisationId },
|
|
56
|
+
});
|
|
57
|
+
unsavedInvitation.givenName = createDto.givenName;
|
|
58
|
+
const savedInvitation = await this.invitationRepository.save(unsavedInvitation);
|
|
59
|
+
// try to email the invitation
|
|
60
|
+
await this.emailClient.sendMail([unsavedInvitation.emailAddress], [], `Invitation to join ${unsavedInvitation.organisation.name}`, createdBy.uuid, `You have been invited to join ${unsavedInvitation.organisation.name} by ${createdBy.givenName || "another "} ${createdBy.familyName || "member"}. Please click the link below to accept the invitation.
|
|
61
|
+
|
|
62
|
+
${this.configService.baseUrl}/accept-invitation/${savedInvitation.uuid}`);
|
|
63
|
+
// if it gets to here we have a sent invitation
|
|
64
|
+
savedInvitation.notificationSent = new Date();
|
|
65
|
+
return this.invitationRepository.save(savedInvitation);
|
|
66
|
+
}
|
|
67
|
+
async remove(uuid, currentUserId) {
|
|
68
|
+
const invitation = await this.invitationRepository.findOneOrFail({
|
|
69
|
+
where: {
|
|
70
|
+
uuid,
|
|
71
|
+
organisation: {
|
|
72
|
+
memberships: {
|
|
73
|
+
person: {
|
|
74
|
+
id: currentUserId,
|
|
75
|
+
},
|
|
76
|
+
roles: {
|
|
77
|
+
name: RolesEnum_1.Roles.owner,
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
});
|
|
83
|
+
return this.invitationRepository.remove(invitation);
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
InvitationService = __decorate([
|
|
87
|
+
(0, common_1.Injectable)(),
|
|
88
|
+
__param(0, (0, typeorm_1.InjectRepository)(invitation_entity_1.Invitation)),
|
|
89
|
+
__param(1, (0, typeorm_1.InjectRepository)(organisation_entity_1.Organisation)),
|
|
90
|
+
__metadata("design:paramtypes", [typeorm_2.Repository,
|
|
91
|
+
typeorm_2.Repository,
|
|
92
|
+
email_client_service_1.SmtpEmailClient,
|
|
93
|
+
InvitationConfigurationService_1.InvitationsConfigurationService])
|
|
94
|
+
], InvitationService);
|
|
95
|
+
exports.InvitationService = InvitationService;
|
|
96
|
+
//# sourceMappingURL=invitation.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invitation.service.js","sourceRoot":"","sources":["../../src/invitations/invitation.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA0C;AAC1C,6CAAiD;AACjD,qCAAmC;AACnC,6DAAoD;AAEpD,oEAAwD;AACxD,oFAA0E;AAE1E,sFAA0E;AAC1E,qFAAiF;A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C,CAAA;qCADD,oBAAU;QAER,oBAAU;QACZ,sCAAe;QACb,gEAA+B;GAP1D,iBAAiB,CA2F7B;AA3FY,8CAAiB"}
|
|
@@ -19,13 +19,9 @@ let OrganisationMembership = class OrganisationMembership {
|
|
|
19
19
|
id;
|
|
20
20
|
uuid;
|
|
21
21
|
person;
|
|
22
|
-
|
|
23
|
-
// @RelationId((membership: OrganisationMembership) => membership.person)
|
|
24
|
-
// public personId!: number;
|
|
22
|
+
personId;
|
|
25
23
|
organisation;
|
|
26
|
-
|
|
27
|
-
// @RelationId((membership: OrganisationMembership) => membership.organisation)
|
|
28
|
-
// public organisationId!: number;
|
|
24
|
+
organisationId;
|
|
29
25
|
roles;
|
|
30
26
|
createdDate;
|
|
31
27
|
updateDate;
|
|
@@ -58,6 +54,11 @@ __decorate([
|
|
|
58
54
|
}),
|
|
59
55
|
__metadata("design:type", person_entity_1.Person)
|
|
60
56
|
], OrganisationMembership.prototype, "person", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, typeorm_1.Column)(),
|
|
59
|
+
(0, typeorm_1.RelationId)((membership) => membership.person),
|
|
60
|
+
__metadata("design:type", Number)
|
|
61
|
+
], OrganisationMembership.prototype, "personId", void 0);
|
|
61
62
|
__decorate([
|
|
62
63
|
(0, typeorm_1.ManyToOne)(() => organisation_entity_1.Organisation, (org) => org.memberships, {
|
|
63
64
|
eager: true,
|
|
@@ -65,6 +66,11 @@ __decorate([
|
|
|
65
66
|
}),
|
|
66
67
|
__metadata("design:type", organisation_entity_1.Organisation)
|
|
67
68
|
], OrganisationMembership.prototype, "organisation", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, typeorm_1.Column)(),
|
|
71
|
+
(0, typeorm_1.RelationId)((membership) => membership.organisation),
|
|
72
|
+
__metadata("design:type", Number)
|
|
73
|
+
], OrganisationMembership.prototype, "organisationId", void 0);
|
|
68
74
|
__decorate([
|
|
69
75
|
(0, typeorm_1.OneToMany)(() => member_role_entity_1.MembershipRole, (role) => role.membership, {
|
|
70
76
|
eager: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organisation-membership.entity.js","sourceRoot":"","sources":["../../../src/organisation/entities/organisation-membership.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA4C;AAE5C,
|
|
1
|
+
{"version":3,"file":"organisation-membership.entity.js","sourceRoot":"","sources":["../../../src/organisation/entities/organisation-membership.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA4C;AAE5C,qCAciB;AACjB,yFAA6E;AAC7E,uEAA2D;AAC3D,6DAAoD;AAG7C,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IAG/B,EAAE,CAAU;IAQL,IAAI,CAAU;IAMrB,MAAM,CAAU;IAIT,QAAQ,CAAU;IAMzB,YAAY,CAAgB;IAIrB,cAAc,CAAU;IAM/B,KAAK,CAAoB;IAIzB,WAAW,CAAQ;IAInB,UAAU,CAAQ;IAIlB,WAAW,CAAQ;IAEnB,4DAA4D;IAItD,AAAN,KAAK,CAAC,UAAU;QACZ,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE;YACb,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;SACnB;IACL,CAAC;CACJ,CAAA;AA3DG;IAAC,IAAA,gCAAsB,GAAE;IACxB,IAAA,qBAAW,GAAE;;kDACF;AAEZ;IAAC,IAAA,gBAAM,EAAC,MAAM,EAAE;QACZ,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,GAAG,EAAE,CAAC,oBAAoB;KACtC,CAAC;IACD,IAAA,mBAAS,EAAC,MAAM,CAAC;IACjB,IAAA,qBAAW,GAAE;;oDACO;AAErB;IAAC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,sBAAM,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,WAAW,EAAE;QACrD,KAAK,EAAE,IAAI;QACX,OAAO,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC;KAChC,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