@darraghor/nest-backend-libs 2.10.3 → 2.10.5
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/database-postgres/PostgresTypeOrmConfigurationProvider.js +1 -0
- package/dist/database-postgres/PostgresTypeOrmConfigurationProvider.js.map +1 -1
- package/dist/database-sqlite/SqliteTypeOrmConfigurationProvider.js +1 -0
- package/dist/database-sqlite/SqliteTypeOrmConfigurationProvider.js.map +1 -1
- package/dist/index.d.ts +1 -2
- package/dist/index.js +2 -3
- package/dist/index.js.map +1 -1
- package/dist/organisation/entities/member-role.entity.d.ts +0 -1
- package/dist/organisation/entities/member-role.entity.js +3 -9
- package/dist/organisation/entities/member-role.entity.js.map +1 -1
- package/dist/organisation/entities/organisation-membership.entity.d.ts +0 -2
- package/dist/organisation/entities/organisation-membership.entity.js +6 -19
- package/dist/organisation/entities/organisation-membership.entity.js.map +1 -1
- package/dist/organisation/entities/organisation.entity.d.ts +0 -2
- package/dist/organisation/entities/organisation.entity.js +7 -11
- package/dist/organisation/entities/organisation.entity.js.map +1 -1
- package/dist/organisation/organisation.module.js +10 -1
- package/dist/organisation/organisation.module.js.map +1 -1
- package/package.json +1 -1
- package/dist/invitations/InvitationConfigurationService.d.ts +0 -7
- package/dist/invitations/InvitationConfigurationService.js +0 -39
- package/dist/invitations/InvitationConfigurationService.js.map +0 -1
- package/dist/invitations/InvitationConfigurationVariables.d.ts +0 -6
- package/dist/invitations/InvitationConfigurationVariables.js +0 -7
- package/dist/invitations/InvitationConfigurationVariables.js.map +0 -1
- package/dist/invitations/dto/create-invitation.dto.d.ts +0 -5
- package/dist/invitations/dto/create-invitation.dto.js +0 -32
- package/dist/invitations/dto/create-invitation.dto.js.map +0 -1
- package/dist/invitations/entities/invitation.entity.d.ts +0 -14
- package/dist/invitations/entities/invitation.entity.js +0 -96
- package/dist/invitations/entities/invitation.entity.js.map +0 -1
- package/dist/invitations/invitation.controller.d.ts +0 -10
- package/dist/invitations/invitation.controller.js +0 -61
- package/dist/invitations/invitation.controller.js.map +0 -1
- package/dist/invitations/invitation.module.d.ts +0 -2
- package/dist/invitations/invitation.module.js +0 -41
- package/dist/invitations/invitation.module.js.map +0 -1
- package/dist/invitations/invitation.service.d.ts +0 -16
- package/dist/invitations/invitation.service.js +0 -96
- package/dist/invitations/invitation.service.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PostgresTypeOrmConfigurationProvider.js","sourceRoot":"","sources":["../../src/database-postgres/PostgresTypeOrmConfigurationProvider.ts"],"names":[],"mappings":";;;;;;AAGA,gDAAwB;AAGxB,MAAa,oCAAoC;IAC7C;;;;OAIG;IACI,MAAM,CAAC,gBAAgB;QAC1B,MAAM,kBAAkB,GAAG,cAAI,CAAC,IAAI;QAChC,aAAa;QACb,OAAO,CAAC,GAAG,CAAC,uBAAuB,IAAI,IAAI,EAC3C,IAAI,EACJ,kBAAkB,CACrB,CAAC;QAEF,MAAM,aAAa,GAAG,cAAI,CAAC,IAAI;QAC3B,aAAa;QACb,OAAO,CAAC,GAAG,CAAC,sBAAsB;YAC9B,kCAAkC,EACtC,IAAI,EACJ,kBAAkB,CACrB,CAAC;QAEF,MAAM,cAAc,GAAG,cAAI,CAAC,IAAI;QAC5B,aAAa;QACb,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,kCAAkC,EACjE,IAAI,EACJ,YAAY,EACZ,WAAW,CACd,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,oCAAoC,EAAE;YAC9C,aAAa;YACb,kBAAkB,EAAE,SAAS;YAC7B,cAAc;YACd,kBAAkB;SACrB,CAAC,CAAC;QACH,gCAAgC;QAChC,IAAI,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE;YAC1B,OAAO;gBACH,IAAI,EAAE,UAAU;gBAChB,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC,YAAY;gBAC7B,OAAO,EAAE,KAAK;gBACd,mBAAmB,EAAE,YAAY;gBACjC,aAAa,EAAE,IAAI;gBACnB,WAAW,EAAE,KAAK;gBAClB,QAAQ,EAAE,CAAC,kBAAkB,EAAE,aAAa,CAAC;gBAC7C,UAAU,EAAE,CAAC,cAAc,CAAC;aAC/B,CAAC;SACL;QACD,iDAAiD;QACjD,OAAO;YACH,IAAI,EAAE,UAAU;YAChB,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,iBAAiB;YACnC,IAAI,EAAE,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,IAAI,MAAM,EAAE,EAAE,CAAC;YAClE,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,iBAAiB;YACvC,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,qBAAqB;YAC3C,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,qBAAqB;YAC3C,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,mBAAmB;YACvC,mBAAmB,EAAE,YAAY;YACjC,aAAa,EAAE,IAAI;YACnB,OAAO,EAAE,IAAI;YACb,WAAW,EAAE,KAAK;YAClB,QAAQ,EAAE,CAAC,kBAAkB,EAAE,aAAa,CAAC;YAC7C,UAAU,EAAE,CAAC,cAAc,CAAC;YAC5B,GAAG,EAAE;gBACD,aAAa,EAAE,gBAAgB;aAClC;SACiB,CAAC,CAAC,kDAAkD;IAC9E,CAAC;IAEM,MAAM,CAAC,oBAAoB;QAC9B,OAAO;YACH,GAAG,oCAAoC,CAAC,gBAAgB,EAAE;YAC1D,gBAAgB,EAAE,IAAI;SACzB,CAAC;IACN,CAAC;CACJ;
|
|
1
|
+
{"version":3,"file":"PostgresTypeOrmConfigurationProvider.js","sourceRoot":"","sources":["../../src/database-postgres/PostgresTypeOrmConfigurationProvider.ts"],"names":[],"mappings":";;;;;;AAGA,gDAAwB;AAGxB,MAAa,oCAAoC;IAC7C;;;;OAIG;IACI,MAAM,CAAC,gBAAgB;QAC1B,MAAM,kBAAkB,GAAG,cAAI,CAAC,IAAI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AAqB;YAC3C,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,qBAAqB;YAC3C,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,mBAAmB;YACvC,mBAAmB,EAAE,YAAY;YACjC,aAAa,EAAE,IAAI;YACnB,OAAO,EAAE,IAAI;YACb,WAAW,EAAE,KAAK;YAClB,QAAQ,EAAE,CAAC,kBAAkB,EAAE,aAAa,CAAC;YAC7C,UAAU,EAAE,CAAC,cAAc,CAAC;YAC5B,GAAG,EAAE;gBACD,aAAa,EAAE,gBAAgB;aAClC;SACiB,CAAC,CAAC,kDAAkD;IAC9E,CAAC;IAEM,MAAM,CAAC,oBAAoB;QAC9B,OAAO;YACH,GAAG,oCAAoC,CAAC,gBAAgB,EAAE;YAC1D,gBAAgB,EAAE,IAAI;SACzB,CAAC;IACN,CAAC;CACJ;AA5ED,oFA4EC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SqliteTypeOrmConfigurationProvider.js","sourceRoot":"","sources":["../../src/database-sqlite/SqliteTypeOrmConfigurationProvider.ts"],"names":[],"mappings":";AAAA,0CAA0C;;;;;;AAG1C,gDAAwB;AAGxB,MAAa,kCAAkC;IAC3C;;;;OAIG;IACI,MAAM,CAAC,gBAAgB;QAC1B,MAAM,kBAAkB,GAAG,cAAI,CAAC,IAAI,CAChC,SAAS,EACT,OAAO,CAAC,GAAG,CAAC,uBAAuB,IAAI,IAAI,EAC3C,IAAI,EACJ,kBAAkB,CACrB,CAAC;QAEF,MAAM,aAAa,GAAG,cAAI,CAAC,IAAI,CAC3B,SAAS,EACT,OAAO,CAAC,GAAG,CAAC,sBAAsB;YAC9B,kCAAkC,EACtC,IAAI,EACJ,kBAAkB,CACrB,CAAC;QAEF,MAAM,cAAc,GAAG,cAAI,CAAC,IAAI,CAC5B,SAAS,EACT,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,kCAAkC,EACjE,IAAI,EACJ,YAAY,EACZ,WAAW,CACd,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,oCAAoC,EAAE;YAC9C,aAAa;YACb,eAAe,EAAE,SAAS;YAC1B,cAAc;YACd,kBAAkB;SACrB,CAAC,CAAC;QAEH,OAAO;YACH,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,wBAAwB;YAC9C,OAAO,EAAE,KAAK;YACd,mBAAmB,EAAE,YAAY;YACjC,aAAa,EAAE,KAAK;YACpB,WAAW,EAAE,KAAK;YAClB,QAAQ,EAAE,CAAC,kBAAkB,EAAE,aAAa,CAAC;YAC7C,UAAU,EAAE,CAAC,cAAc,CAAC;YAC5B,GAAG,EAAE;gBACD,aAAa,EAAE,gBAAgB;aAClC;SACiB,CAAC;IAC3B,CAAC;IAEM,MAAM,CAAC,oBAAoB;QAC9B,OAAO;YACH,GAAG,kCAAkC,CAAC,gBAAgB,EAAE;YACxD,gBAAgB,EAAE,IAAI;SACzB,CAAC;IACN,CAAC;CACJ;
|
|
1
|
+
{"version":3,"file":"SqliteTypeOrmConfigurationProvider.js","sourceRoot":"","sources":["../../src/database-sqlite/SqliteTypeOrmConfigurationProvider.ts"],"names":[],"mappings":";AAAA,0CAA0C;;;;;;AAG1C,gDAAwB;AAGxB,MAAa,kCAAkC;IAC3C;;;;OAIG;IACI,MAAM,CAAC,gBAAgB;QAC1B,MAAM,kBAAkB,GAAG,cAAI,CAAC,IAAI,CAChC,SAAS,EACT,OAAO,CAAC,GAAG,CAAC,uBAAuB,IAAI,IAAI,EAC3C,IAAI,EACJ,kBAAkB,CACrB,CAAC;QAEF,MAAM,aAAa,GAAG,cAAI,CAAC,IAAI,CAC3B,SAAS,EACT,OAAO,CAAC,GAAG,CAAC,sBAAsB;YAC9B,kCAAkC,EACtC,IAAI,EACJ,kBAAkB,CACrB,CAAC;QAEF,MAAM,cAAc,GAAG,cAAI,CAAC,IAAI,CAC5B,SAAS,EACT,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,kCAAkC,EACjE,IAAI,EACJ,YAAY,EACZ,WAAW,CACd,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,oCAAoC,EAAE;YAC9C,aAAa;YACb,eAAe,EAAE,SAAS;YAC1B,cAAc;YACd,kBAAkB;YAClB,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE;SACrB,CAAC,CAAC;QAEH,OAAO;YACH,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,wBAAwB;YAC9C,OAAO,EAAE,KAAK;YACd,mBAAmB,EAAE,YAAY;YACjC,aAAa,EAAE,KAAK;YACpB,WAAW,EAAE,KAAK;YAClB,QAAQ,EAAE,CAAC,kBAAkB,EAAE,aAAa,CAAC;YAC7C,UAAU,EAAE,CAAC,cAAc,CAAC;YAC5B,GAAG,EAAE;gBACD,aAAa,EAAE,gBAAgB;aAClC;SACiB,CAAC;IAC3B,CAAC;IAEM,MAAM,CAAC,oBAAoB;QAC9B,OAAO;YACH,GAAG,kCAAkC,CAAC,gBAAgB,EAAE;YACxD,gBAAgB,EAAE,IAAI;SACzB,CAAC;IACN,CAAC;CACJ;AA1DD,gFA0DC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -25,7 +25,6 @@ import { CoreConfigModule } from "./core-config/CoreConfig.module";
|
|
|
25
25
|
import { CliCommandService } from "./runningCommandLine/CliCommandService";
|
|
26
26
|
import { ClaimsAuthorisationGuard } from "./authz/ClaimsAuthorisationGuard";
|
|
27
27
|
import { MandatoryUserClaims } from "./authz/MandatoryUserClaims.decorator";
|
|
28
|
-
import { InvitationModule } from "./invitations/invitation.module";
|
|
29
28
|
import { StripeAccountModule } from "./stripe-client/stripe-account.module";
|
|
30
29
|
import { StripeEventHandler } from "./stripe-client/services/stripe-event-handler";
|
|
31
|
-
export { CoreLoggerService, CoreConfigurationService, SmtpEmailClientModule, CoreModule, CoreConfigModule, SwaggerGen, DefaultAuthGuard, PostgresDatabaseModule as DatabaseModule, JwtStrategy, AuthzModule, Person, PostgresTypeOrmConfigurationProvider as TypeOrmConfigurationProvider, SmtpEmailClient, ValidatedConfigurationService, RequestWithUser, PersonModule, OrganisationModule, PersonService, SqliteDatabaseModule, SqliteDatabaseConfigurationService, TwitterClientService, TwitterAccountModule, EUploadMimeType, RunningCommandLineModule, CliCommandService, ClaimsAuthorisationGuard, MandatoryUserClaims,
|
|
30
|
+
export { CoreLoggerService, CoreConfigurationService, SmtpEmailClientModule, CoreModule, CoreConfigModule, SwaggerGen, DefaultAuthGuard, PostgresDatabaseModule as DatabaseModule, JwtStrategy, AuthzModule, Person, PostgresTypeOrmConfigurationProvider as TypeOrmConfigurationProvider, SmtpEmailClient, ValidatedConfigurationService, RequestWithUser, PersonModule, OrganisationModule, PersonService, SqliteDatabaseModule, SqliteDatabaseConfigurationService, TwitterClientService, TwitterAccountModule, EUploadMimeType, RunningCommandLineModule, CliCommandService, ClaimsAuthorisationGuard, MandatoryUserClaims, StripeAccountModule, StripeEventHandler, };
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.StripeEventHandler = exports.StripeAccountModule = exports.
|
|
6
|
+
exports.StripeEventHandler = exports.StripeAccountModule = exports.MandatoryUserClaims = exports.ClaimsAuthorisationGuard = exports.CliCommandService = exports.RunningCommandLineModule = exports.EUploadMimeType = exports.TwitterAccountModule = exports.TwitterClientService = exports.SqliteDatabaseConfigurationService = exports.SqliteDatabaseModule = exports.PersonService = exports.OrganisationModule = exports.PersonModule = exports.ValidatedConfigurationService = exports.SmtpEmailClient = exports.TypeOrmConfigurationProvider = exports.Person = exports.AuthzModule = exports.JwtStrategy = exports.DatabaseModule = exports.DefaultAuthGuard = exports.SwaggerGen = exports.CoreConfigModule = exports.CoreModule = exports.SmtpEmailClientModule = exports.CoreConfigurationService = exports.CoreLoggerService = void 0;
|
|
7
7
|
/* eslint-disable unicorn/prefer-export-from */
|
|
8
8
|
const RunningCommandLine_module_1 = require("./runningCommandLine/RunningCommandLine.module");
|
|
9
9
|
Object.defineProperty(exports, "RunningCommandLineModule", { enumerable: true, get: function () { return RunningCommandLine_module_1.RunningCommandLineModule; } });
|
|
@@ -57,8 +57,7 @@ const ClaimsAuthorisationGuard_1 = require("./authz/ClaimsAuthorisationGuard");
|
|
|
57
57
|
Object.defineProperty(exports, "ClaimsAuthorisationGuard", { enumerable: true, get: function () { return ClaimsAuthorisationGuard_1.ClaimsAuthorisationGuard; } });
|
|
58
58
|
const MandatoryUserClaims_decorator_1 = require("./authz/MandatoryUserClaims.decorator");
|
|
59
59
|
Object.defineProperty(exports, "MandatoryUserClaims", { enumerable: true, get: function () { return MandatoryUserClaims_decorator_1.MandatoryUserClaims; } });
|
|
60
|
-
|
|
61
|
-
Object.defineProperty(exports, "InvitationModule", { enumerable: true, get: function () { return invitation_module_1.InvitationModule; } });
|
|
60
|
+
//import {InvitationModule} from "./invitations/invitation.module";
|
|
62
61
|
const stripe_account_module_1 = require("./stripe-client/stripe-account.module");
|
|
63
62
|
Object.defineProperty(exports, "StripeAccountModule", { enumerable: true, get: function () { return stripe_account_module_1.StripeAccountModule; } });
|
|
64
63
|
const stripe_event_handler_1 = require("./stripe-client/services/stripe-event-handler");
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,+CAA+C;AAC/C,8FAAwF;AAuDpF,yGAvDI,oDAAwB,OAuDJ;AAtD5B,oFAA6E;AAoDzE,qGApDI,6CAAoB,OAoDJ;AAnDxB,2FAAmF;AAgC/E,sGAhCI,gDAAqB,OAgCJ;AA/BzB,mDAA+C;AAmD3C,gGAnDI,gCAAe,OAmDJ;AAlDnB,uDAAiD;AAqC7C,4FArCI,0BAAW,OAqCJ;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;AA/BvB,wFAAiF;AAgC7E,mGAhCI,yCAAkB,OAgCJ"}
|
|
@@ -16,7 +16,9 @@ const organisation_membership_entity_1 = require("./organisation-membership.enti
|
|
|
16
16
|
let MembershipRole = class MembershipRole {
|
|
17
17
|
id;
|
|
18
18
|
membership;
|
|
19
|
-
|
|
19
|
+
// @Column()
|
|
20
|
+
// @RelationId((mr: MembershipRole) => mr.membership)
|
|
21
|
+
// public membershipId!: number;
|
|
20
22
|
name;
|
|
21
23
|
createdDate;
|
|
22
24
|
updateDate;
|
|
@@ -30,17 +32,9 @@ __decorate([
|
|
|
30
32
|
__decorate([
|
|
31
33
|
(0, typeorm_1.ManyToOne)(() => organisation_membership_entity_1.OrganisationMembership, (membership) => membership.roles, {
|
|
32
34
|
eager: true,
|
|
33
|
-
cascade: true,
|
|
34
35
|
}),
|
|
35
|
-
(0, typeorm_1.Index)(),
|
|
36
|
-
(0, typeorm_1.JoinColumn)(),
|
|
37
36
|
__metadata("design:type", organisation_membership_entity_1.OrganisationMembership)
|
|
38
37
|
], MembershipRole.prototype, "membership", void 0);
|
|
39
|
-
__decorate([
|
|
40
|
-
(0, typeorm_1.Column)(),
|
|
41
|
-
(0, typeorm_1.RelationId)((membership) => membership.membership),
|
|
42
|
-
__metadata("design:type", Number)
|
|
43
|
-
], MembershipRole.prototype, "membershipId", void 0);
|
|
44
38
|
__decorate([
|
|
45
39
|
(0, typeorm_1.Column)(),
|
|
46
40
|
__metadata("design:type", String)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"member-role.entity.js","sourceRoot":"","sources":["../../../src/organisation/entities/member-role.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA4C;AAE5C,
|
|
1
|
+
{"version":3,"file":"member-role.entity.js","sourceRoot":"","sources":["../../../src/organisation/entities/member-role.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA4C;AAE5C,qCASiB;AACjB,qFAAwE;AAGjE,IAAM,cAAc,GAApB,MAAM,cAAc;IAGvB,EAAE,CAAU;IAKZ,UAAU,CAA0B;IAEpC,YAAY;IACZ,qDAAqD;IACrD,gCAAgC;IAGhC,IAAI,CAAU;IAId,WAAW,CAAQ;IAInB,UAAU,CAAQ;IAIlB,WAAW,CAAQ;CACtB,CAAA;AA3BG;IAAC,IAAA,gCAAsB,GAAE;IACxB,IAAA,qBAAW,GAAE;;0CACF;AAEZ;IAAC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,uDAAsB,EAAE,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE;QACvE,KAAK,EAAE,IAAI;KACd,CAAC;8BACW,uDAAsB;kDAAC;AAMpC;IAAC,IAAA,gBAAM,GAAE;;4CACK;AAEd;IAAC,IAAA,0BAAgB,GAAE;IAClB,IAAA,qBAAW,GAAE;8BACA,IAAI;mDAAC;AAEnB;IAAC,IAAA,0BAAgB,GAAE;IAClB,IAAA,qBAAW,GAAE;8BACD,IAAI;kDAAC;AAElB;IAAC,IAAA,0BAAgB,GAAE;IAClB,IAAA,qBAAW,GAAE;8BACA,IAAI;mDAAC;AA3BV,cAAc;IAD1B,IAAA,gBAAM,GAAE;GACI,cAAc,CA4B1B;AA5BY,wCAAc"}
|
|
@@ -11,7 +11,6 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.OrganisationMembership = void 0;
|
|
13
13
|
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
-
const class_transformer_1 = require("class-transformer");
|
|
15
14
|
const typeorm_1 = require("typeorm");
|
|
16
15
|
const organisation_entity_1 = require("../../organisation/entities/organisation.entity");
|
|
17
16
|
const person_entity_1 = require("../../person/entities/person.entity");
|
|
@@ -20,9 +19,13 @@ let OrganisationMembership = class OrganisationMembership {
|
|
|
20
19
|
id;
|
|
21
20
|
uuid;
|
|
22
21
|
person;
|
|
23
|
-
|
|
22
|
+
// @Column()
|
|
23
|
+
// @RelationId((membership: OrganisationMembership) => membership.person)
|
|
24
|
+
// public personId!: number;
|
|
24
25
|
organisation;
|
|
25
|
-
|
|
26
|
+
// @Column()
|
|
27
|
+
// @RelationId((membership: OrganisationMembership) => membership.organisation)
|
|
28
|
+
// public organisationId!: number;
|
|
26
29
|
roles;
|
|
27
30
|
createdDate;
|
|
28
31
|
updateDate;
|
|
@@ -53,36 +56,20 @@ __decorate([
|
|
|
53
56
|
eager: true,
|
|
54
57
|
cascade: ["insert", "update"],
|
|
55
58
|
}),
|
|
56
|
-
(0, class_transformer_1.Exclude)(),
|
|
57
|
-
(0, typeorm_1.JoinColumn)(),
|
|
58
59
|
__metadata("design:type", person_entity_1.Person)
|
|
59
60
|
], OrganisationMembership.prototype, "person", void 0);
|
|
60
|
-
__decorate([
|
|
61
|
-
(0, typeorm_1.Column)(),
|
|
62
|
-
(0, typeorm_1.RelationId)((membership) => membership.person),
|
|
63
|
-
__metadata("design:type", Number)
|
|
64
|
-
], OrganisationMembership.prototype, "personId", void 0);
|
|
65
61
|
__decorate([
|
|
66
62
|
(0, typeorm_1.ManyToOne)(() => organisation_entity_1.Organisation, (org) => org.memberships, {
|
|
67
63
|
eager: true,
|
|
68
64
|
cascade: ["insert", "update"],
|
|
69
65
|
}),
|
|
70
|
-
(0, class_transformer_1.Exclude)(),
|
|
71
|
-
(0, typeorm_1.JoinColumn)(),
|
|
72
66
|
__metadata("design:type", organisation_entity_1.Organisation)
|
|
73
67
|
], OrganisationMembership.prototype, "organisation", void 0);
|
|
74
|
-
__decorate([
|
|
75
|
-
(0, typeorm_1.Column)(),
|
|
76
|
-
(0, typeorm_1.RelationId)((membership) => membership.organisation),
|
|
77
|
-
__metadata("design:type", Number)
|
|
78
|
-
], OrganisationMembership.prototype, "organisationId", void 0);
|
|
79
68
|
__decorate([
|
|
80
69
|
(0, typeorm_1.OneToMany)(() => member_role_entity_1.MembershipRole, (role) => role.membership, {
|
|
81
70
|
eager: true,
|
|
82
71
|
cascade: true,
|
|
83
72
|
}),
|
|
84
|
-
(0, typeorm_1.Index)(),
|
|
85
|
-
(0, typeorm_1.JoinColumn)(),
|
|
86
73
|
__metadata("design:type", Array)
|
|
87
74
|
], OrganisationMembership.prototype, "roles", void 0);
|
|
88
75
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organisation-membership.entity.js","sourceRoot":"","sources":["../../../src/organisation/entities/organisation-membership.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA4C;
|
|
1
|
+
{"version":3,"file":"organisation-membership.entity.js","sourceRoot":"","sources":["../../../src/organisation/entities/organisation-membership.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA4C;AAE5C,qCAaiB;AACjB,yFAA6E;AAC7E,uEAA2D;AAC3D,6DAAoD;AAG7C,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IAG/B,EAAE,CAAU;IAQL,IAAI,CAAU;IAMrB,MAAM,CAAU;IAEhB,YAAY;IACZ,yEAAyE;IACzE,4BAA4B;IAM5B,YAAY,CAAgB;IAE5B,YAAY;IACZ,+EAA+E;IAC/E,kCAAkC;IAMlC,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,CAAC;8BACO,sBAAM;sDAAC;AAMhB;IAAC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,kCAAY,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,WAAW,EAAE;QACrD,KAAK,EAAE,IAAI;QACX,OAAO,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC;KAChC,CAAC;8BACa,kCAAY;4DAAC;AAM5B;IAAC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,mCAAc,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,UAAU,EAAE;QACxD,KAAK,EAAE,IAAI;QACX,OAAO,EAAE,IAAI;KAChB,CAAC;;qDACuB;AAEzB;IAAC,IAAA,0BAAgB,GAAE;IAClB,IAAA,qBAAW,GAAE;8BACA,IAAI;2DAAC;AAEnB;IAAC,IAAA,0BAAgB,GAAE;IAClB,IAAA,qBAAW,GAAE;8BACD,IAAI;0DAAC;AAElB;IAAC,IAAA,0BAAgB,GAAE;IAClB,IAAA,qBAAW,GAAE;8BACA,IAAI;2DAAC;AAMb;IAHL,IAAA,mBAAS,GAAE;IACX,IAAA,qBAAW,GAAE;IACb,IAAA,qBAAW,GAAE;;;;wDAKb;AA3DQ,sBAAsB;IADlC,IAAA,gBAAM,GAAE;GACI,sBAAsB,CA4DlC;AA5DY,wDAAsB"}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import { Invitation } from "../../invitations/entities/invitation.entity";
|
|
2
1
|
import { OrganisationMembership } from "./organisation-membership.entity";
|
|
3
2
|
export declare class Organisation {
|
|
4
3
|
id: number;
|
|
5
4
|
uuid: string;
|
|
6
5
|
memberships: OrganisationMembership[];
|
|
7
|
-
invitations: Invitation[];
|
|
8
6
|
name: string;
|
|
9
7
|
createdDate: Date;
|
|
10
8
|
updateDate: Date;
|
|
@@ -12,13 +12,18 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.Organisation = void 0;
|
|
13
13
|
const swagger_1 = require("@nestjs/swagger");
|
|
14
14
|
const typeorm_1 = require("typeorm");
|
|
15
|
-
|
|
15
|
+
//import {Invitation} from "../../invitations/entities/invitation.entity";
|
|
16
16
|
const organisation_membership_entity_1 = require("./organisation-membership.entity");
|
|
17
17
|
let Organisation = class Organisation {
|
|
18
18
|
id;
|
|
19
19
|
uuid;
|
|
20
20
|
memberships;
|
|
21
|
-
|
|
21
|
+
// @OneToMany(() => Invitation, (om) => om.organisation, {
|
|
22
|
+
// eager: true,
|
|
23
|
+
// cascade: ["insert", "update"],
|
|
24
|
+
// })
|
|
25
|
+
// @Index()
|
|
26
|
+
// invitations!: Invitation[];
|
|
22
27
|
name;
|
|
23
28
|
createdDate;
|
|
24
29
|
updateDate;
|
|
@@ -49,17 +54,8 @@ __decorate([
|
|
|
49
54
|
eager: true,
|
|
50
55
|
cascade: ["insert", "update"],
|
|
51
56
|
}),
|
|
52
|
-
(0, typeorm_1.Index)(),
|
|
53
57
|
__metadata("design:type", Array)
|
|
54
58
|
], Organisation.prototype, "memberships", void 0);
|
|
55
|
-
__decorate([
|
|
56
|
-
(0, typeorm_1.OneToMany)(() => invitation_entity_1.Invitation, (om) => om.organisation, {
|
|
57
|
-
eager: true,
|
|
58
|
-
cascade: ["insert", "update"],
|
|
59
|
-
}),
|
|
60
|
-
(0, typeorm_1.Index)(),
|
|
61
|
-
__metadata("design:type", Array)
|
|
62
|
-
], Organisation.prototype, "invitations", void 0);
|
|
63
59
|
__decorate([
|
|
64
60
|
(0, typeorm_1.Column)(),
|
|
65
61
|
(0, swagger_1.ApiProperty)(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organisation.entity.js","sourceRoot":"","sources":["../../../src/organisation/entities/organisation.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA4C;AAE5C,
|
|
1
|
+
{"version":3,"file":"organisation.entity.js","sourceRoot":"","sources":["../../../src/organisation/entities/organisation.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA4C;AAE5C,qCAYiB;AACjB,0EAA0E;AAC1E,qFAAwE;AAGjE,IAAM,YAAY,GAAlB,MAAM,YAAY;IAGrB,EAAE,CAAU;IAQL,IAAI,CAAU;IAMrB,WAAW,CAA4B;IAEvC,0DAA0D;IAC1D,mBAAmB;IACnB,qCAAqC;IACrC,KAAK;IACL,WAAW;IACX,8BAA8B;IAI9B,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;YACnB,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;SACzB;IACL,CAAC;CACJ,CAAA;AAlDG;IAAC,IAAA,gCAAsB,GAAE;IACxB,IAAA,qBAAW,GAAE;;wCACF;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;;0CACO;AAErB;IAAC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,uDAAsB,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,YAAY,EAAE;QAC9D,KAAK,EAAE,IAAI;QACX,OAAO,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC;KAChC,CAAC;;iDACqC;AASvC;IAAC,IAAA,gBAAM,GAAE;IACR,IAAA,qBAAW,GAAE;;0CACA;AAEd;IAAC,IAAA,0BAAgB,GAAE;IAClB,IAAA,qBAAW,GAAE;8BACA,IAAI;iDAAC;AAEnB;IAAC,IAAA,0BAAgB,GAAE;IAClB,IAAA,qBAAW,GAAE;8BACD,IAAI;gDAAC;AAElB;IAAC,IAAA,0BAAgB,GAAE;IAClB,IAAA,qBAAW,GAAE;8BACA,IAAI;iDAAC;AAMb;IAHL,IAAA,mBAAS,GAAE;IACX,IAAA,qBAAW,GAAE;IACb,IAAA,qBAAW,GAAE;;;;8CAKb;AAlDQ,YAAY;IADxB,IAAA,gBAAM,GAAE;GACI,YAAY,CAmDxB;AAnDY,oCAAY"}
|
|
@@ -13,11 +13,20 @@ const organisation_controller_1 = require("./organisation.controller");
|
|
|
13
13
|
const logger_module_1 = require("../logger/logger.module");
|
|
14
14
|
const typeorm_1 = require("@nestjs/typeorm");
|
|
15
15
|
const organisation_entity_1 = require("./entities/organisation.entity");
|
|
16
|
+
const organisation_membership_entity_1 = require("./entities/organisation-membership.entity");
|
|
17
|
+
const member_role_entity_1 = require("./entities/member-role.entity");
|
|
16
18
|
let OrganisationModule = class OrganisationModule {
|
|
17
19
|
};
|
|
18
20
|
OrganisationModule = __decorate([
|
|
19
21
|
(0, common_1.Module)({
|
|
20
|
-
imports: [
|
|
22
|
+
imports: [
|
|
23
|
+
logger_module_1.LoggerModule,
|
|
24
|
+
typeorm_1.TypeOrmModule.forFeature([
|
|
25
|
+
organisation_entity_1.Organisation,
|
|
26
|
+
organisation_membership_entity_1.OrganisationMembership,
|
|
27
|
+
member_role_entity_1.MembershipRole,
|
|
28
|
+
]),
|
|
29
|
+
],
|
|
21
30
|
controllers: [organisation_controller_1.OrganisationController],
|
|
22
31
|
providers: [organisation_service_1.OrganisationService],
|
|
23
32
|
exports: [organisation_service_1.OrganisationService],
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
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;AAC5D,8FAAiF;AACjF,sEAA6D;AAetD,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;CAAG,CAAA;AAArB,kBAAkB;IAb9B,IAAA,eAAM,EAAC;QACJ,OAAO,EAAE;YACL,4BAAY;YACZ,uBAAa,CAAC,UAAU,CAAC;gBACrB,kCAAY;gBACZ,uDAAsB;gBACtB,mCAAc;aACjB,CAAC;SACL;QACD,WAAW,EAAE,CAAC,gDAAsB,CAAC;QACrC,SAAS,EAAE,CAAC,0CAAmB,CAAC;QAChC,OAAO,EAAE,CAAC,0CAAmB,CAAC;KACjC,CAAC;GACW,kBAAkB,CAAG;AAArB,gDAAkB"}
|
package/package.json
CHANGED
|
@@ -1,7 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,7 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,32 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,14 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,96 +0,0 @@
|
|
|
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, typeorm_1.Column)(),
|
|
70
|
-
(0, swagger_1.ApiProperty)(),
|
|
71
|
-
(0, typeorm_1.ManyToOne)(() => organisation_entity_1.Organisation, (org) => org.invitations, {
|
|
72
|
-
eager: true,
|
|
73
|
-
cascade: ["insert", "update"],
|
|
74
|
-
}),
|
|
75
|
-
__metadata("design:type", organisation_entity_1.Organisation)
|
|
76
|
-
], Invitation.prototype, "organisation", void 0);
|
|
77
|
-
__decorate([
|
|
78
|
-
(0, typeorm_1.CreateDateColumn)(),
|
|
79
|
-
(0, swagger_1.ApiProperty)(),
|
|
80
|
-
__metadata("design:type", Date)
|
|
81
|
-
], Invitation.prototype, "createdDate", void 0);
|
|
82
|
-
__decorate([
|
|
83
|
-
(0, typeorm_1.UpdateDateColumn)(),
|
|
84
|
-
(0, swagger_1.ApiProperty)(),
|
|
85
|
-
__metadata("design:type", Date)
|
|
86
|
-
], Invitation.prototype, "updateDate", void 0);
|
|
87
|
-
__decorate([
|
|
88
|
-
(0, typeorm_1.DeleteDateColumn)(),
|
|
89
|
-
(0, swagger_1.ApiPropertyOptional)(),
|
|
90
|
-
__metadata("design:type", Date)
|
|
91
|
-
], Invitation.prototype, "deletedDate", void 0);
|
|
92
|
-
Invitation = __decorate([
|
|
93
|
-
(0, typeorm_1.Entity)()
|
|
94
|
-
], Invitation);
|
|
95
|
-
exports.Invitation = Invitation;
|
|
96
|
-
//# sourceMappingURL=invitation.entity.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":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,EAAE,QAAQ,CAAC;KAChC,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;AAnDV,UAAU;IADtB,IAAA,gBAAM,GAAE;GACI,UAAU,CAoDtB;AApDY,gCAAU"}
|
|
@@ -1,10 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,61 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,41 +0,0 @@
|
|
|
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
|
-
let InvitationModule = class InvitationModule {
|
|
25
|
-
};
|
|
26
|
-
InvitationModule = __decorate([
|
|
27
|
-
(0, common_1.Module)({
|
|
28
|
-
imports: [
|
|
29
|
-
config_1.ConfigModule.forFeature(InvitationConfigurationVariables_1.default),
|
|
30
|
-
logger_module_1.LoggerModule,
|
|
31
|
-
typeorm_1.TypeOrmModule.forFeature([invitation_entity_1.Invitation]),
|
|
32
|
-
smtp_email_client_module_1.SmtpEmailClientModule,
|
|
33
|
-
organisation_module_1.OrganisationModule,
|
|
34
|
-
],
|
|
35
|
-
controllers: [invitation_controller_1.InvitationController],
|
|
36
|
-
providers: [invitation_service_1.InvitationService, InvitationConfigurationService_1.InvitationsConfigurationService],
|
|
37
|
-
exports: [invitation_service_1.InvitationService],
|
|
38
|
-
})
|
|
39
|
-
], InvitationModule);
|
|
40
|
-
exports.InvitationModule = InvitationModule;
|
|
41
|
-
//# sourceMappingURL=invitation.module.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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;AAc1E,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,CAAC,CAAC;YACtC,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"}
|
|
@@ -1,16 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,96 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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;AAG1E,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAGd;IAEA;IACS;IACA;IANrB,YAEY,oBAA4C,EAE5C,sBAAgD,EACvC,WAA4B,EAC5B,aAA8C;QAJvD,yBAAoB,GAApB,oBAAoB,CAAwB;QAE5C,2BAAsB,GAAtB,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