@darraghor/nest-backend-libs 2.7.0 → 2.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/authz/AccessToken.js +1 -2
- package/dist/authz/AuthConfigurationService.js +12 -15
- package/dist/authz/AuthConfigurationService.js.map +1 -1
- package/dist/authz/AuthConfigurationVariables.js +2 -4
- package/dist/authz/AuthConfigurationVariables.js.map +1 -1
- package/dist/authz/ClaimsAuthorisationGuard.js +7 -13
- package/dist/authz/ClaimsAuthorisationGuard.js.map +1 -1
- package/dist/authz/DefaultAuthGuard.js +5 -8
- package/dist/authz/DefaultAuthGuard.js.map +1 -1
- package/dist/authz/MandatoryUserClaims.decorator.js +2 -6
- package/dist/authz/MandatoryUserClaims.decorator.js.map +1 -1
- package/dist/authz/RequestWithUser.js +1 -2
- package/dist/authz/authz.module.js +17 -23
- package/dist/authz/authz.module.js.map +1 -1
- package/dist/authz/authzstrategy.js +16 -22
- package/dist/authz/authzstrategy.js.map +1 -1
- package/dist/authzclient/AuthClientConfigurationService.js +10 -13
- package/dist/authzclient/AuthClientConfigurationService.js.map +1 -1
- package/dist/authzclient/AuthClientConfigurationVariables.js +2 -4
- package/dist/authzclient/AuthClientConfigurationVariables.js.map +1 -1
- package/dist/authzclient/AuthzClientProvider.js +5 -8
- package/dist/authzclient/AuthzClientProvider.js.map +1 -1
- package/dist/authzclient/UserProfile.dto.js +1 -5
- package/dist/authzclient/UserProfile.dto.js.map +1 -1
- package/dist/authzclient/authz-client.module.js +13 -19
- package/dist/authzclient/authz-client.module.js.map +1 -1
- package/dist/authzclient/authz.service.js +8 -14
- package/dist/authzclient/authz.service.js.map +1 -1
- package/dist/cli/cli.js +7 -12
- package/dist/cli/cli.js.map +1 -1
- package/dist/cli/commands/WriteApiClientCommand.d.ts +3 -0
- package/dist/cli/commands/WriteApiClientCommand.js +17 -14
- package/dist/cli/commands/WriteApiClientCommand.js.map +1 -1
- package/dist/cli/commands/WriteTypeOrmConfigCommand.js +11 -18
- package/dist/cli/commands/WriteTypeOrmConfigCommand.js.map +1 -1
- package/dist/configuration/ValidatedConfigurationService.js +5 -8
- package/dist/configuration/ValidatedConfigurationService.js.map +1 -1
- package/dist/core-config/CoreConfig.module.js +9 -15
- package/dist/core-config/CoreConfig.module.js.map +1 -1
- package/dist/core-config/CoreConfigurationService.js +22 -25
- package/dist/core-config/CoreConfigurationService.js.map +1 -1
- package/dist/core-config/CoreConfigurationVariables.js +2 -4
- package/dist/core-config/CoreConfigurationVariables.js.map +1 -1
- package/dist/database-postgres/PostgresDatabase.module.js +11 -14
- package/dist/database-postgres/PostgresDatabase.module.js.map +1 -1
- package/dist/database-postgres/PostgresDatabaseConfigurationService.js +5 -8
- package/dist/database-postgres/PostgresDatabaseConfigurationService.js.map +1 -1
- package/dist/database-postgres/PostgresTypeOrmConfigurationProvider.js +5 -12
- package/dist/database-postgres/PostgresTypeOrmConfigurationProvider.js.map +1 -1
- package/dist/database-sqlite/SqliteDatabase.module.js +11 -14
- package/dist/database-sqlite/SqliteDatabase.module.js.map +1 -1
- package/dist/database-sqlite/SqliteDatabaseConfigurationService.js +5 -8
- package/dist/database-sqlite/SqliteDatabaseConfigurationService.js.map +1 -1
- package/dist/database-sqlite/SqliteTypeOrmConfigurationProvider.js +5 -12
- package/dist/database-sqlite/SqliteTypeOrmConfigurationProvider.js.map +1 -1
- package/dist/index.js +30 -64
- package/dist/index.js.map +1 -1
- package/dist/invitations/InvitationConfigurationService.js +10 -13
- package/dist/invitations/InvitationConfigurationService.js.map +1 -1
- package/dist/invitations/InvitationConfigurationVariables.js +2 -4
- package/dist/invitations/InvitationConfigurationVariables.js.map +1 -1
- package/dist/invitations/dto/create-invitation.dto.js +5 -9
- package/dist/invitations/dto/create-invitation.dto.js.map +1 -1
- package/dist/invitations/entities/invitation.entity.js +30 -33
- package/dist/invitations/entities/invitation.entity.js.map +1 -1
- package/dist/invitations/invitation.controller.js +21 -24
- package/dist/invitations/invitation.controller.js.map +1 -1
- package/dist/invitations/invitation.module.js +21 -27
- package/dist/invitations/invitation.module.js.map +1 -1
- package/dist/invitations/invitation.service.js +18 -21
- package/dist/invitations/invitation.service.js.map +1 -1
- package/dist/logger/CoreLoggerService.js +7 -9
- package/dist/logger/CoreLoggerService.js.map +1 -1
- package/dist/logger/LoggingConfigurationService.js +12 -15
- package/dist/logger/LoggingConfigurationService.js.map +1 -1
- package/dist/logger/LoggingConfigurationVariables.js +2 -4
- package/dist/logger/LoggingConfigurationVariables.js.map +1 -1
- package/dist/logger/LoggingInterceptor.js +7 -13
- package/dist/logger/LoggingInterceptor.js.map +1 -1
- package/dist/logger/logger.module.js +14 -20
- package/dist/logger/logger.module.js.map +1 -1
- package/dist/organisation/dto/RolesEnum.js +2 -5
- package/dist/organisation/dto/RolesEnum.js.map +1 -1
- package/dist/organisation/dto/create-organisation.dto.js +7 -11
- package/dist/organisation/dto/create-organisation.dto.js.map +1 -1
- package/dist/organisation/dto/update-organisation.dto.js +3 -7
- package/dist/organisation/dto/update-organisation.dto.js.map +1 -1
- package/dist/organisation/entities/member-role.entity.js +20 -23
- package/dist/organisation/entities/member-role.entity.js.map +1 -1
- package/dist/organisation/entities/organisation-membership.entity.js +37 -40
- package/dist/organisation/entities/organisation-membership.entity.js.map +1 -1
- package/dist/organisation/entities/organisation.entity.js +26 -29
- package/dist/organisation/entities/organisation.entity.js.map +1 -1
- package/dist/organisation/organisation.controller.js +29 -32
- package/dist/organisation/organisation.controller.js.map +1 -1
- package/dist/organisation/organisation.module.js +12 -15
- package/dist/organisation/organisation.module.js.map +1 -1
- package/dist/organisation/organisation.service.js +20 -23
- package/dist/organisation/organisation.service.js.map +1 -1
- package/dist/person/dto/create-person.dto.js +1 -5
- package/dist/person/dto/create-person.dto.js.map +1 -1
- package/dist/person/dto/update-person.dto.js +3 -7
- package/dist/person/dto/update-person.dto.js.map +1 -1
- package/dist/person/entities/person.entity.js +41 -44
- package/dist/person/entities/person.entity.js.map +1 -1
- package/dist/person/person.controller.js +25 -28
- package/dist/person/person.controller.js.map +1 -1
- package/dist/person/person.module.js +15 -18
- package/dist/person/person.module.js.map +1 -1
- package/dist/person/person.service.js +22 -28
- package/dist/person/person.service.js.map +1 -1
- package/dist/root-app/SwaggerGen.js +15 -21
- package/dist/root-app/SwaggerGen.js.map +1 -1
- package/dist/root-app/app.controller.js +17 -23
- package/dist/root-app/app.controller.js.map +1 -1
- package/dist/root-app/app.service.js +3 -6
- package/dist/root-app/app.service.js.map +1 -1
- package/dist/root-app/core-app.module.js +26 -32
- package/dist/root-app/core-app.module.js.map +1 -1
- package/dist/root-app/notfound.interceptor.js +6 -9
- package/dist/root-app/notfound.interceptor.js.map +1 -1
- package/dist/runningCommandLine/CliCommandService.js +8 -14
- package/dist/runningCommandLine/CliCommandService.js.map +1 -1
- package/dist/runningCommandLine/RunningCommandLine.module.js +9 -12
- package/dist/runningCommandLine/RunningCommandLine.module.js.map +1 -1
- package/dist/smtp-email-client/EmailClientProvider.js +5 -8
- package/dist/smtp-email-client/EmailClientProvider.js.map +1 -1
- package/dist/smtp-email-client/EmailConfigurationService.js +24 -27
- package/dist/smtp-email-client/EmailConfigurationService.js.map +1 -1
- package/dist/smtp-email-client/EmailConfigurationVariables.js +2 -4
- package/dist/smtp-email-client/EmailConfigurationVariables.js.map +1 -1
- package/dist/smtp-email-client/email-client.service.js +15 -21
- package/dist/smtp-email-client/email-client.service.js.map +1 -1
- package/dist/smtp-email-client/email.controller.js +12 -15
- package/dist/smtp-email-client/email.controller.js.map +1 -1
- package/dist/smtp-email-client/email.entity.js +32 -35
- package/dist/smtp-email-client/email.entity.js.map +1 -1
- package/dist/smtp-email-client/smtp-email-client.module.js +26 -32
- package/dist/smtp-email-client/smtp-email-client.module.js.map +1 -1
- package/dist/smtp-email-client/smtp-email-handler.js +15 -21
- package/dist/smtp-email-client/smtp-email-handler.js.map +1 -1
- package/dist/stripe-client/StripeClientConfigurationService.js +14 -17
- package/dist/stripe-client/StripeClientConfigurationService.js.map +1 -1
- package/dist/stripe-client/StripeClientProvider.js +5 -11
- package/dist/stripe-client/StripeClientProvider.js.map +1 -1
- package/dist/stripe-client/StripeConfigurationVariables.js +2 -4
- package/dist/stripe-client/StripeConfigurationVariables.js.map +1 -1
- package/dist/stripe-client/models/StripeCheckoutSessionParams.js +19 -24
- package/dist/stripe-client/models/StripeCheckoutSessionParams.js.map +1 -1
- package/dist/stripe-client/services/stripe-checkout.service.js +10 -16
- package/dist/stripe-client/services/stripe-checkout.service.js.map +1 -1
- package/dist/stripe-client/services/stripe-event-handler.js +12 -18
- package/dist/stripe-client/services/stripe-event-handler.js.map +1 -1
- package/dist/stripe-client/services/stripe-webhook-handler.service.js +13 -19
- package/dist/stripe-client/services/stripe-webhook-handler.service.js.map +1 -1
- package/dist/stripe-client/stripe-account.module.js +22 -28
- package/dist/stripe-client/stripe-account.module.js.map +1 -1
- package/dist/stripe-client/stripe-controller.js +27 -30
- package/dist/stripe-client/stripe-controller.js.map +1 -1
- package/dist/testing/preRun.js +1 -3
- package/dist/testing/preRun.js.map +1 -1
- package/dist/twitter-client/TwitterClientConfigurationService.js +16 -19
- package/dist/twitter-client/TwitterClientConfigurationService.js.map +1 -1
- package/dist/twitter-client/TwitterClientProvider.js +5 -8
- package/dist/twitter-client/TwitterClientProvider.js.map +1 -1
- package/dist/twitter-client/TwitterConfigurationVariables.js +2 -4
- package/dist/twitter-client/TwitterConfigurationVariables.js.map +1 -1
- package/dist/twitter-client/services/twitter-client.service.js +8 -14
- package/dist/twitter-client/services/twitter-client.service.js.map +1 -1
- package/dist/twitter-client/twitter-account.module.js +15 -21
- package/dist/twitter-client/twitter-account.module.js.map +1 -1
- package/package.json +1 -1
- package/dist/database-postgres/write-typeorm-config.d.ts +0 -2
- package/dist/database-postgres/write-typeorm-config.js +0 -14
- package/dist/database-postgres/write-typeorm-config.js.map +0 -1
- package/dist/database-sqlite/write-typeorm-config.d.ts +0 -1
- package/dist/database-sqlite/write-typeorm-config.js +0 -13
- package/dist/database-sqlite/write-typeorm-config.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SqliteTypeOrmConfigurationProvider.js","sourceRoot":"","sources":["../../src/database-sqlite/SqliteTypeOrmConfigurationProvider.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SqliteTypeOrmConfigurationProvider.js","sourceRoot":"","sources":["../../src/database-sqlite/SqliteTypeOrmConfigurationProvider.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAG1C,OAAO,IAAI,MAAM,MAAM,CAAC;AAGxB,MAAM,OAAO,kCAAkC;IAC3C;;;;OAIG;IACI,MAAM,CAAC,gBAAgB;QAC1B,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;QAClC,MAAM,kBAAkB,GAAG,IAAI,CAAC,IAAI,CAChC,SAAS,EACT,OAAO,CAAC,GAAG,CAAC,uBAAuB,IAAI,IAAI,EAC3C,IAAI,EACJ,kBAAkB,CACrB,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,yBAAyB,EAAE,kBAAkB,CAAC,CAAC;QAE3D,MAAM,aAAa,GAAG,IAAI,CAAC,IAAI,CAC3B,SAAS,EACT,OAAO,CAAC,GAAG,CAAC,sBAAsB;YAC9B,kCAAkC,EACtC,IAAI,EACJ,kBAAkB,CACrB,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,gCAAgC,EAAE,aAAa,CAAC,CAAC;QAE7D,MAAM,cAAc,GAAG,IAAI,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,uBAAuB,EAAE,cAAc,CAAC,CAAC;QAErD,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;CACJ"}
|
package/dist/index.js
CHANGED
|
@@ -1,66 +1,32 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.StripeEventHandler = exports.StripeAccountModule = exports.InvitationModule = 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
1
|
/* eslint-disable unicorn/prefer-export-from */
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
const organisation_module_1 = require("./organisation/organisation.module");
|
|
39
|
-
Object.defineProperty(exports, "OrganisationModule", { enumerable: true, get: function () { return organisation_module_1.OrganisationModule; } });
|
|
40
|
-
const person_entity_1 = require("./person/entities/person.entity");
|
|
41
|
-
Object.defineProperty(exports, "Person", { enumerable: true, get: function () { return person_entity_1.Person; } });
|
|
42
|
-
const person_module_1 = require("./person/person.module");
|
|
43
|
-
Object.defineProperty(exports, "PersonModule", { enumerable: true, get: function () { return person_module_1.PersonModule; } });
|
|
44
|
-
const person_service_1 = require("./person/person.service");
|
|
45
|
-
Object.defineProperty(exports, "PersonService", { enumerable: true, get: function () { return person_service_1.PersonService; } });
|
|
46
|
-
const core_app_module_1 = require("./root-app/core-app.module");
|
|
47
|
-
Object.defineProperty(exports, "CoreModule", { enumerable: true, get: function () { return core_app_module_1.CoreModule; } });
|
|
48
|
-
const SwaggerGen_1 = require("./root-app/SwaggerGen");
|
|
49
|
-
Object.defineProperty(exports, "SwaggerGen", { enumerable: true, get: function () { return SwaggerGen_1.SwaggerGen; } });
|
|
50
|
-
const twitter_client_service_1 = require("./twitter-client/services/twitter-client.service");
|
|
51
|
-
Object.defineProperty(exports, "TwitterClientService", { enumerable: true, get: function () { return twitter_client_service_1.TwitterClientService; } });
|
|
52
|
-
const CoreConfig_module_1 = require("./core-config/CoreConfig.module");
|
|
53
|
-
Object.defineProperty(exports, "CoreConfigModule", { enumerable: true, get: function () { return CoreConfig_module_1.CoreConfigModule; } });
|
|
54
|
-
const CliCommandService_1 = require("./runningCommandLine/CliCommandService");
|
|
55
|
-
Object.defineProperty(exports, "CliCommandService", { enumerable: true, get: function () { return CliCommandService_1.CliCommandService; } });
|
|
56
|
-
const ClaimsAuthorisationGuard_1 = require("./authz/ClaimsAuthorisationGuard");
|
|
57
|
-
Object.defineProperty(exports, "ClaimsAuthorisationGuard", { enumerable: true, get: function () { return ClaimsAuthorisationGuard_1.ClaimsAuthorisationGuard; } });
|
|
58
|
-
const MandatoryUserClaims_decorator_1 = require("./authz/MandatoryUserClaims.decorator");
|
|
59
|
-
Object.defineProperty(exports, "MandatoryUserClaims", { enumerable: true, get: function () { return MandatoryUserClaims_decorator_1.MandatoryUserClaims; } });
|
|
60
|
-
const invitation_module_1 = require("./invitations/invitation.module");
|
|
61
|
-
Object.defineProperty(exports, "InvitationModule", { enumerable: true, get: function () { return invitation_module_1.InvitationModule; } });
|
|
62
|
-
const stripe_account_module_1 = require("./stripe-client/stripe-account.module");
|
|
63
|
-
Object.defineProperty(exports, "StripeAccountModule", { enumerable: true, get: function () { return stripe_account_module_1.StripeAccountModule; } });
|
|
64
|
-
const stripe_event_handler_1 = require("./stripe-client/services/stripe-event-handler");
|
|
65
|
-
Object.defineProperty(exports, "StripeEventHandler", { enumerable: true, get: function () { return stripe_event_handler_1.StripeEventHandler; } });
|
|
2
|
+
import { RunningCommandLineModule } from "./runningCommandLine/RunningCommandLine.module";
|
|
3
|
+
import { TwitterAccountModule } from "./twitter-client/twitter-account.module";
|
|
4
|
+
import { SmtpEmailClientModule } from "./smtp-email-client/smtp-email-client.module";
|
|
5
|
+
import { EUploadMimeType } from "twitter-api-v2";
|
|
6
|
+
import { AuthzModule } from "./authz/authz.module";
|
|
7
|
+
import { JwtStrategy } from "./authz/authzstrategy";
|
|
8
|
+
import { DefaultAuthGuard } from "./authz/DefaultAuthGuard";
|
|
9
|
+
import { ValidatedConfigurationService } from "./configuration/ValidatedConfigurationService";
|
|
10
|
+
import { CoreConfigurationService } from "./core-config/CoreConfigurationService";
|
|
11
|
+
import { PostgresDatabaseModule } from "./database-postgres/PostgresDatabase.module";
|
|
12
|
+
import { PostgresTypeOrmConfigurationProvider } from "./database-postgres/PostgresTypeOrmConfigurationProvider";
|
|
13
|
+
import { SqliteDatabaseModule } from "./database-sqlite/SqliteDatabase.module";
|
|
14
|
+
import { SqliteDatabaseConfigurationService } from "./database-sqlite/SqliteDatabaseConfigurationService";
|
|
15
|
+
import { SmtpEmailClient } from "./smtp-email-client/email-client.service";
|
|
16
|
+
import CoreLoggerService from "./logger/CoreLoggerService";
|
|
17
|
+
import { OrganisationModule } from "./organisation/organisation.module";
|
|
18
|
+
import { Person } from "./person/entities/person.entity";
|
|
19
|
+
import { PersonModule } from "./person/person.module";
|
|
20
|
+
import { PersonService } from "./person/person.service";
|
|
21
|
+
import { CoreModule } from "./root-app/core-app.module";
|
|
22
|
+
import { SwaggerGen } from "./root-app/SwaggerGen";
|
|
23
|
+
import { TwitterClientService } from "./twitter-client/services/twitter-client.service";
|
|
24
|
+
import { CoreConfigModule } from "./core-config/CoreConfig.module";
|
|
25
|
+
import { CliCommandService } from "./runningCommandLine/CliCommandService";
|
|
26
|
+
import { ClaimsAuthorisationGuard } from "./authz/ClaimsAuthorisationGuard";
|
|
27
|
+
import { MandatoryUserClaims } from "./authz/MandatoryUserClaims.decorator";
|
|
28
|
+
import { InvitationModule } from "./invitations/invitation.module";
|
|
29
|
+
import { StripeAccountModule } from "./stripe-client/stripe-account.module";
|
|
30
|
+
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, PersonModule, OrganisationModule, PersonService, SqliteDatabaseModule, SqliteDatabaseConfigurationService, TwitterClientService, TwitterAccountModule, EUploadMimeType, RunningCommandLineModule, CliCommandService, ClaimsAuthorisationGuard, MandatoryUserClaims, InvitationModule, StripeAccountModule, StripeEventHandler, };
|
|
66
32
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index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AAkD,CAAC;AACtF,OAAO,EAAC,gBAAgB,EAAC,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAC,iBAAiB,EAAC,MAAM,wCAAwC,CAAC;AACzE,OAAO,EAAC,wBAAwB,EAAC,MAAM,kCAAkC,CAAC;AAC1E,OAAO,EAAC,mBAAmB,EAAC,MAAM,uCAAuC,CAAC;AAC1E,OAAO,EAAC,gBAAgB,EAAC,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAC,mBAAmB,EAAC,MAAM,uCAAuC,CAAC;AAC1E,OAAO,EAAC,kBAAkB,EAAC,MAAM,+CAA+C,CAAC;AAEjF,OAAO,EACH,iBAAiB,EACjB,wBAAwB,EACxB,qBAAqB,EACrB,UAAU,EACV,gBAAgB,EAChB,UAAU,EACV,gBAAgB,EAChB,sBAAsB,IAAI,cAAc,EACxC,WAAW,EACX,WAAW,EACX,MAAM,EACN,oCAAoC,IAAI,4BAA4B,EACpE,eAAe,EACf,6BAA6B,EAE7B,YAAY,EACZ,kBAAkB,EAClB,aAAa,EACb,oBAAoB,EACpB,kCAAkC,EAClC,oBAAoB,EACpB,oBAAoB,EACpB,eAAe,EACf,wBAAwB,EACxB,iBAAiB,EACjB,wBAAwB,EACxB,mBAAmB,EACnB,gBAAgB,EAChB,mBAAmB,EACnB,kBAAkB,GACrB,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
2
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
3
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -8,14 +7,12 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
9
|
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.InvitationsConfigurationService = void 0;
|
|
13
10
|
/* eslint-disable @typescript-eslint/no-non-null-assertion */
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
let InvitationsConfigurationService = class InvitationsConfigurationService extends
|
|
11
|
+
import { Injectable } from "@nestjs/common";
|
|
12
|
+
import { ConfigService } from "@nestjs/config";
|
|
13
|
+
import { IsDefined, IsString } from "class-validator";
|
|
14
|
+
import { ValidatedConfigurationService } from "../configuration/ValidatedConfigurationService";
|
|
15
|
+
let InvitationsConfigurationService = class InvitationsConfigurationService extends ValidatedConfigurationService {
|
|
19
16
|
configService;
|
|
20
17
|
constructor(configService) {
|
|
21
18
|
super();
|
|
@@ -26,14 +23,14 @@ let InvitationsConfigurationService = class InvitationsConfigurationService exte
|
|
|
26
23
|
}
|
|
27
24
|
};
|
|
28
25
|
__decorate([
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
IsDefined(),
|
|
27
|
+
IsString(),
|
|
31
28
|
__metadata("design:type", String),
|
|
32
29
|
__metadata("design:paramtypes", [])
|
|
33
30
|
], InvitationsConfigurationService.prototype, "baseUrl", null);
|
|
34
31
|
InvitationsConfigurationService = __decorate([
|
|
35
|
-
|
|
36
|
-
__metadata("design:paramtypes", [
|
|
32
|
+
Injectable(),
|
|
33
|
+
__metadata("design:paramtypes", [ConfigService])
|
|
37
34
|
], InvitationsConfigurationService);
|
|
38
|
-
|
|
35
|
+
export { InvitationsConfigurationService };
|
|
39
36
|
//# sourceMappingURL=InvitationConfigurationService.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InvitationConfigurationService.js","sourceRoot":"","sources":["../../src/invitations/InvitationConfigurationService.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"InvitationConfigurationService.js","sourceRoot":"","sources":["../../src/invitations/InvitationConfigurationService.ts"],"names":[],"mappings":";;;;;;;;;AAAA,6DAA6D;AAC7D,OAAO,EAAC,UAAU,EAAC,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAC,aAAa,EAAC,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAC,SAAS,EAAE,QAAQ,EAAC,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAC,6BAA6B,EAAC,MAAM,gDAAgD,CAAC;AAGtF,IAAM,+BAA+B,GAArC,MAAM,+BAAgC,SAAQ,6BAA6B;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,SAAS,EAAE;IACX,QAAQ,EAAE;;;8DAGV;AATQ,+BAA+B;IAD3C,UAAU,EAAE;qCAE0B,aAAa;GADvC,+BAA+B,CAU3C;SAVY,+BAA+B"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const config_1 = require("@nestjs/config");
|
|
4
|
-
exports.default = (0, config_1.registerAs)("invitations", () => ({
|
|
1
|
+
import { registerAs } from "@nestjs/config";
|
|
2
|
+
export default registerAs("invitations", () => ({
|
|
5
3
|
baseUrl: process.env.INVITATION_URLS_BASE_URL,
|
|
6
4
|
}));
|
|
7
5
|
//# sourceMappingURL=InvitationConfigurationVariables.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InvitationConfigurationVariables.js","sourceRoot":"","sources":["../../src/invitations/InvitationConfigurationVariables.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"InvitationConfigurationVariables.js","sourceRoot":"","sources":["../../src/invitations/InvitationConfigurationVariables.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,gBAAgB,CAAC;AAE1C,eAAe,UAAU,CAAC,aAAa,EAAE,GAAG,EAAE,CAAC,CAAC;IAC5C,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,wBAAwB;CAChD,CAAC,CAAC,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
2
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
3
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -8,25 +7,22 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
9
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
-
class CreateInvitationDto {
|
|
10
|
+
import { ApiProperty } from "@nestjs/swagger";
|
|
11
|
+
export class CreateInvitationDto {
|
|
15
12
|
givenName;
|
|
16
13
|
emailAddress;
|
|
17
14
|
organisationId;
|
|
18
15
|
}
|
|
19
16
|
__decorate([
|
|
20
|
-
|
|
17
|
+
ApiProperty(),
|
|
21
18
|
__metadata("design:type", String)
|
|
22
19
|
], CreateInvitationDto.prototype, "givenName", void 0);
|
|
23
20
|
__decorate([
|
|
24
|
-
|
|
21
|
+
ApiProperty(),
|
|
25
22
|
__metadata("design:type", String)
|
|
26
23
|
], CreateInvitationDto.prototype, "emailAddress", void 0);
|
|
27
24
|
__decorate([
|
|
28
|
-
|
|
25
|
+
ApiProperty(),
|
|
29
26
|
__metadata("design:type", Number)
|
|
30
27
|
], CreateInvitationDto.prototype, "organisationId", void 0);
|
|
31
|
-
exports.CreateInvitationDto = CreateInvitationDto;
|
|
32
28
|
//# sourceMappingURL=create-invitation.dto.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-invitation.dto.js","sourceRoot":"","sources":["../../../src/invitations/dto/create-invitation.dto.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"create-invitation.dto.js","sourceRoot":"","sources":["../../../src/invitations/dto/create-invitation.dto.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,iBAAiB,CAAC;AAE5C,MAAM,OAAO,mBAAmB;IAE5B,SAAS,CAAU;IAGnB,YAAY,CAAU;IAGtB,cAAc,CAAU;CAC3B;AARG;IAAC,WAAW,EAAE;;sDACK;AAEnB;IAAC,WAAW,EAAE;;yDACQ;AAEtB;IAAC,WAAW,EAAE;;2DACU"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
2
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
3
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -8,11 +7,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
9
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const typeorm_1 = require("typeorm");
|
|
15
|
-
const organisation_entity_1 = require("../../organisation/entities/organisation.entity");
|
|
10
|
+
import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger";
|
|
11
|
+
import { Column, CreateDateColumn, DeleteDateColumn, Entity, Generated, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn, } from "typeorm";
|
|
12
|
+
import { Organisation } from "../../organisation/entities/organisation.entity";
|
|
16
13
|
let Invitation = class Invitation {
|
|
17
14
|
id;
|
|
18
15
|
uuid;
|
|
@@ -27,70 +24,70 @@ let Invitation = class Invitation {
|
|
|
27
24
|
deletedDate;
|
|
28
25
|
};
|
|
29
26
|
__decorate([
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
PrimaryGeneratedColumn(),
|
|
28
|
+
ApiProperty(),
|
|
32
29
|
__metadata("design:type", Number)
|
|
33
30
|
], Invitation.prototype, "id", void 0);
|
|
34
31
|
__decorate([
|
|
35
|
-
|
|
32
|
+
Column("uuid", {
|
|
36
33
|
name: "uuid",
|
|
37
34
|
default: () => "uuid_generate_v4()",
|
|
38
35
|
}),
|
|
39
|
-
|
|
40
|
-
|
|
36
|
+
Generated("uuid"),
|
|
37
|
+
ApiProperty(),
|
|
41
38
|
__metadata("design:type", String)
|
|
42
39
|
], Invitation.prototype, "uuid", void 0);
|
|
43
40
|
__decorate([
|
|
44
|
-
|
|
45
|
-
|
|
41
|
+
Column(),
|
|
42
|
+
ApiProperty(),
|
|
46
43
|
__metadata("design:type", String)
|
|
47
44
|
], Invitation.prototype, "givenName", void 0);
|
|
48
45
|
__decorate([
|
|
49
|
-
|
|
50
|
-
|
|
46
|
+
Column(),
|
|
47
|
+
ApiProperty(),
|
|
51
48
|
__metadata("design:type", String)
|
|
52
49
|
], Invitation.prototype, "emailAddress", void 0);
|
|
53
50
|
__decorate([
|
|
54
|
-
|
|
55
|
-
|
|
51
|
+
Column(),
|
|
52
|
+
ApiProperty(),
|
|
56
53
|
__metadata("design:type", Date)
|
|
57
54
|
], Invitation.prototype, "notificationSent", void 0);
|
|
58
55
|
__decorate([
|
|
59
|
-
|
|
60
|
-
|
|
56
|
+
Column(),
|
|
57
|
+
ApiProperty(),
|
|
61
58
|
__metadata("design:type", Date)
|
|
62
59
|
], Invitation.prototype, "expiresOn", void 0);
|
|
63
60
|
__decorate([
|
|
64
|
-
|
|
65
|
-
|
|
61
|
+
Column(),
|
|
62
|
+
ApiPropertyOptional(),
|
|
66
63
|
__metadata("design:type", Date)
|
|
67
64
|
], Invitation.prototype, "acceptedOn", void 0);
|
|
68
65
|
__decorate([
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
66
|
+
Column(),
|
|
67
|
+
ApiProperty(),
|
|
68
|
+
ManyToOne(() => Organisation, (org) => org.invitations, {
|
|
72
69
|
eager: true,
|
|
73
70
|
cascade: ["insert", "update"],
|
|
74
71
|
}),
|
|
75
|
-
__metadata("design:type",
|
|
72
|
+
__metadata("design:type", Organisation)
|
|
76
73
|
], Invitation.prototype, "organisation", void 0);
|
|
77
74
|
__decorate([
|
|
78
|
-
|
|
79
|
-
|
|
75
|
+
CreateDateColumn(),
|
|
76
|
+
ApiProperty(),
|
|
80
77
|
__metadata("design:type", Date)
|
|
81
78
|
], Invitation.prototype, "createdDate", void 0);
|
|
82
79
|
__decorate([
|
|
83
|
-
|
|
84
|
-
|
|
80
|
+
UpdateDateColumn(),
|
|
81
|
+
ApiProperty(),
|
|
85
82
|
__metadata("design:type", Date)
|
|
86
83
|
], Invitation.prototype, "updateDate", void 0);
|
|
87
84
|
__decorate([
|
|
88
|
-
|
|
89
|
-
|
|
85
|
+
DeleteDateColumn(),
|
|
86
|
+
ApiPropertyOptional(),
|
|
90
87
|
__metadata("design:type", Date)
|
|
91
88
|
], Invitation.prototype, "deletedDate", void 0);
|
|
92
89
|
Invitation = __decorate([
|
|
93
|
-
|
|
90
|
+
Entity()
|
|
94
91
|
], Invitation);
|
|
95
|
-
|
|
92
|
+
export { Invitation };
|
|
96
93
|
//# sourceMappingURL=invitation.entity.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invitation.entity.js","sourceRoot":"","sources":["../../../src/invitations/entities/invitation.entity.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"invitation.entity.js","sourceRoot":"","sources":["../../../src/invitations/entities/invitation.entity.ts"],"names":[],"mappings":";;;;;;;;;AAAA,O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CAAC;KAChC,CAAC;8BACa,YAAY;gDAAC;AAE5B;IAAC,gBAAgB,EAAE;IAClB,WAAW,EAAE;8BACA,IAAI;+CAAC;AAEnB;IAAC,gBAAgB,EAAE;IAClB,WAAW,EAAE;8BACD,IAAI;8CAAC;AAElB;IAAC,gBAAgB,EAAE;IAClB,mBAAmB,EAAE;8BACR,IAAI;+CAAC;AAnDV,UAAU;IADtB,MAAM,EAAE;GACI,UAAU,CAoDtB;SApDY,UAAU"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
2
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
3
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -11,14 +10,12 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
10
|
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
11
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
12
|
};
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
const invitation_service_1 = require("./invitation.service");
|
|
21
|
-
const create_invitation_dto_1 = require("./dto/create-invitation.dto");
|
|
13
|
+
import { Controller, Request, Body, Param, Delete, UseGuards, Post, } from "@nestjs/common";
|
|
14
|
+
import { ApiBearerAuth, ApiOkResponse, ApiTags } from "@nestjs/swagger";
|
|
15
|
+
import { AuthGuard } from "@nestjs/passport";
|
|
16
|
+
import { Invitation } from "./entities/invitation.entity";
|
|
17
|
+
import { InvitationService } from "./invitation.service";
|
|
18
|
+
import { CreateInvitationDto } from "./dto/create-invitation.dto";
|
|
22
19
|
let InvitationController = class InvitationController {
|
|
23
20
|
invitationService;
|
|
24
21
|
constructor(invitationService) {
|
|
@@ -33,29 +30,29 @@ let InvitationController = class InvitationController {
|
|
|
33
30
|
}
|
|
34
31
|
};
|
|
35
32
|
__decorate([
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
__param(0,
|
|
39
|
-
__param(1,
|
|
33
|
+
Post(),
|
|
34
|
+
ApiOkResponse({ type: Invitation }),
|
|
35
|
+
__param(0, Body()),
|
|
36
|
+
__param(1, Request()),
|
|
40
37
|
__metadata("design:type", Function),
|
|
41
|
-
__metadata("design:paramtypes", [
|
|
38
|
+
__metadata("design:paramtypes", [CreateInvitationDto, Object]),
|
|
42
39
|
__metadata("design:returntype", Promise)
|
|
43
40
|
], InvitationController.prototype, "create", null);
|
|
44
41
|
__decorate([
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
__param(0,
|
|
48
|
-
__param(1,
|
|
42
|
+
Delete(":uuid"),
|
|
43
|
+
ApiOkResponse({ type: Invitation }),
|
|
44
|
+
__param(0, Param("uuid")),
|
|
45
|
+
__param(1, Request()),
|
|
49
46
|
__metadata("design:type", Function),
|
|
50
47
|
__metadata("design:paramtypes", [String, Object]),
|
|
51
48
|
__metadata("design:returntype", Promise)
|
|
52
49
|
], InvitationController.prototype, "remove", null);
|
|
53
50
|
InvitationController = __decorate([
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
__metadata("design:paramtypes", [
|
|
51
|
+
UseGuards(AuthGuard("jwt")),
|
|
52
|
+
ApiBearerAuth(),
|
|
53
|
+
Controller("invitations"),
|
|
54
|
+
ApiTags("organisations"),
|
|
55
|
+
__metadata("design:paramtypes", [InvitationService])
|
|
59
56
|
], InvitationController);
|
|
60
|
-
|
|
57
|
+
export { InvitationController };
|
|
61
58
|
//# sourceMappingURL=invitation.controller.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invitation.controller.js","sourceRoot":"","sources":["../../src/invitations/invitation.controller.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"invitation.controller.js","sourceRoot":"","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CAAC;IAE7B,WAAA,KAAK,CAAC,MAAM,CAAC,CAAA;IACb,WAAA,OAAO,EAAE,CAAA;;;;kDAQb;AAxBQ,oBAAoB;IAJhC,SAAS,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IAC3B,aAAa,EAAE;IACf,UAAU,CAAC,aAAa,CAAC;IACzB,OAAO,CAAC,eAAe,CAAC;qCAE2B,iBAAiB;GADxD,oBAAoB,CAyBhC;SAzBY,oBAAoB"}
|
|
@@ -1,41 +1,35 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
2
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
3
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
4
|
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
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
6
|
};
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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");
|
|
7
|
+
import { Module } from "@nestjs/common";
|
|
8
|
+
import { LoggerModule } from "../logger/logger.module";
|
|
9
|
+
import { TypeOrmModule } from "@nestjs/typeorm";
|
|
10
|
+
import { Invitation } from "./entities/invitation.entity";
|
|
11
|
+
import { InvitationController } from "./invitation.controller";
|
|
12
|
+
import { InvitationService } from "./invitation.service";
|
|
13
|
+
import { SmtpEmailClientModule } from "../smtp-email-client/smtp-email-client.module";
|
|
14
|
+
import { OrganisationModule } from "../organisation/organisation.module";
|
|
15
|
+
import { ConfigModule } from "@nestjs/config";
|
|
16
|
+
import configVariables from "./InvitationConfigurationVariables";
|
|
17
|
+
import { InvitationsConfigurationService } from "./InvitationConfigurationService";
|
|
24
18
|
let InvitationModule = class InvitationModule {
|
|
25
19
|
};
|
|
26
20
|
InvitationModule = __decorate([
|
|
27
|
-
|
|
21
|
+
Module({
|
|
28
22
|
imports: [
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
23
|
+
ConfigModule.forFeature(configVariables),
|
|
24
|
+
LoggerModule,
|
|
25
|
+
TypeOrmModule.forFeature([Invitation]),
|
|
26
|
+
SmtpEmailClientModule,
|
|
27
|
+
OrganisationModule,
|
|
34
28
|
],
|
|
35
|
-
controllers: [
|
|
36
|
-
providers: [
|
|
37
|
-
exports: [
|
|
29
|
+
controllers: [InvitationController],
|
|
30
|
+
providers: [InvitationService, InvitationsConfigurationService],
|
|
31
|
+
exports: [InvitationService],
|
|
38
32
|
})
|
|
39
33
|
], InvitationModule);
|
|
40
|
-
|
|
34
|
+
export { InvitationModule };
|
|
41
35
|
//# sourceMappingURL=invitation.module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invitation.module.js","sourceRoot":"","sources":["../../src/invitations/invitation.module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"invitation.module.js","sourceRoot":"","sources":["../../src/invitations/invitation.module.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAC,YAAY,EAAC,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAC,UAAU,EAAC,MAAM,8BAA8B,CAAC;AACxD,OAAO,EAAC,oBAAoB,EAAC,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAC,iBAAiB,EAAC,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAC,qBAAqB,EAAC,MAAM,+CAA+C,CAAC;AACpF,OAAO,EAAC,kBAAkB,EAAC,MAAM,qCAAqC,CAAC;AACvE,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAC5C,OAAO,eAAe,MAAM,oCAAoC,CAAC;AACjE,OAAO,EAAC,+BAA+B,EAAC,MAAM,kCAAkC,CAAC;AAc1E,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;CAAG,CAAA;AAAnB,gBAAgB;IAZ5B,MAAM,CAAC;QACJ,OAAO,EAAE;YACL,YAAY,CAAC,UAAU,CAAC,eAAe,CAAC;YACxC,YAAY;YACZ,aAAa,CAAC,UAAU,CAAC,CAAC,UAAU,CAAC,CAAC;YACtC,qBAAqB;YACrB,kBAAkB;SACrB;QACD,WAAW,EAAE,CAAC,oBAAoB,CAAC;QACnC,SAAS,EAAE,CAAC,iBAAiB,EAAE,+BAA+B,CAAC;QAC/D,OAAO,EAAE,CAAC,iBAAiB,CAAC;KAC/B,CAAC;GACW,gBAAgB,CAAG;SAAnB,gBAAgB"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
2
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
3
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -11,16 +10,14 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
10
|
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
11
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
12
|
};
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
const organisation_entity_1 = require("../organisation/entities/organisation.entity");
|
|
23
|
-
const InvitationConfigurationService_1 = require("./InvitationConfigurationService");
|
|
13
|
+
import { Injectable } from "@nestjs/common";
|
|
14
|
+
import { InjectRepository } from "@nestjs/typeorm";
|
|
15
|
+
import { Repository } from "typeorm";
|
|
16
|
+
import { Roles } from "../organisation/dto/RolesEnum";
|
|
17
|
+
import { Invitation } from "./entities/invitation.entity";
|
|
18
|
+
import { SmtpEmailClient } from "../smtp-email-client/email-client.service";
|
|
19
|
+
import { Organisation } from "../organisation/entities/organisation.entity";
|
|
20
|
+
import { InvitationsConfigurationService } from "./InvitationConfigurationService";
|
|
24
21
|
let InvitationService = class InvitationService {
|
|
25
22
|
invitationRepository;
|
|
26
23
|
organisationRepository;
|
|
@@ -46,7 +43,7 @@ let InvitationService = class InvitationService {
|
|
|
46
43
|
throw new Error("An valid invitation already exists for this email address for this organisation");
|
|
47
44
|
}
|
|
48
45
|
// otherwise, create a new invitation
|
|
49
|
-
const unsavedInvitation = new
|
|
46
|
+
const unsavedInvitation = new Invitation();
|
|
50
47
|
unsavedInvitation.emailAddress = createDto.emailAddress;
|
|
51
48
|
unsavedInvitation.expiresOn = new Date();
|
|
52
49
|
unsavedInvitation.expiresOn.setDate(unsavedInvitation.expiresOn.getDate() + 1);
|
|
@@ -74,7 +71,7 @@ let InvitationService = class InvitationService {
|
|
|
74
71
|
id: currentUserId,
|
|
75
72
|
},
|
|
76
73
|
roles: {
|
|
77
|
-
name:
|
|
74
|
+
name: Roles.owner,
|
|
78
75
|
},
|
|
79
76
|
},
|
|
80
77
|
},
|
|
@@ -84,13 +81,13 @@ let InvitationService = class InvitationService {
|
|
|
84
81
|
}
|
|
85
82
|
};
|
|
86
83
|
InvitationService = __decorate([
|
|
87
|
-
|
|
88
|
-
__param(0,
|
|
89
|
-
__param(1,
|
|
90
|
-
__metadata("design:paramtypes", [
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
84
|
+
Injectable(),
|
|
85
|
+
__param(0, InjectRepository(Invitation)),
|
|
86
|
+
__param(1, InjectRepository(Organisation)),
|
|
87
|
+
__metadata("design:paramtypes", [Repository,
|
|
88
|
+
Repository,
|
|
89
|
+
SmtpEmailClient,
|
|
90
|
+
InvitationsConfigurationService])
|
|
94
91
|
], InvitationService);
|
|
95
|
-
|
|
92
|
+
export { InvitationService };
|
|
96
93
|
//# sourceMappingURL=invitation.service.js.map
|