@darraghor/nest-backend-libs 1.49.1 → 2.1.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.
Files changed (103) hide show
  1. package/dist/core-config/CoreConfigurationService.d.ts +1 -2
  2. package/dist/core-config/CoreConfigurationService.js +3 -12
  3. package/dist/core-config/CoreConfigurationService.js.map +1 -1
  4. package/dist/core-config/CoreConfigurationVariables.d.ts +2 -4
  5. package/dist/core-config/CoreConfigurationVariables.js +1 -2
  6. package/dist/core-config/CoreConfigurationVariables.js.map +1 -1
  7. package/dist/database-postgres/PostgresDatabaseConfigurationService.d.ts +0 -2
  8. package/dist/database-postgres/PostgresDatabaseConfigurationService.js +0 -2
  9. package/dist/database-postgres/PostgresDatabaseConfigurationService.js.map +1 -1
  10. package/dist/index.d.ts +4 -1
  11. package/dist/index.js +7 -1
  12. package/dist/index.js.map +1 -1
  13. package/dist/invitations/InvitationConfigurationService.d.ts +7 -0
  14. package/dist/invitations/InvitationConfigurationService.js +38 -0
  15. package/dist/invitations/InvitationConfigurationService.js.map +1 -0
  16. package/dist/invitations/InvitationConfigurationVariables.d.ts +6 -0
  17. package/dist/invitations/InvitationConfigurationVariables.js +7 -0
  18. package/dist/invitations/InvitationConfigurationVariables.js.map +1 -0
  19. package/dist/invitations/dto/create-invitation.dto.d.ts +5 -0
  20. package/dist/invitations/dto/create-invitation.dto.js +29 -0
  21. package/dist/invitations/dto/create-invitation.dto.js.map +1 -0
  22. package/dist/invitations/entities/invitation.entity.d.ts +14 -0
  23. package/dist/invitations/entities/invitation.entity.js +85 -0
  24. package/dist/invitations/entities/invitation.entity.js.map +1 -0
  25. package/dist/invitations/invitation.controller.d.ts +10 -0
  26. package/dist/invitations/invitation.controller.js +60 -0
  27. package/dist/invitations/invitation.controller.js.map +1 -0
  28. package/dist/invitations/invitation.module.d.ts +2 -0
  29. package/dist/invitations/invitation.module.js +41 -0
  30. package/dist/invitations/invitation.module.js.map +1 -0
  31. package/dist/invitations/invitation.service.d.ts +16 -0
  32. package/dist/invitations/invitation.service.js +92 -0
  33. package/dist/invitations/invitation.service.js.map +1 -0
  34. package/dist/organisation/dto/RolesEnum.d.ts +4 -0
  35. package/dist/organisation/dto/RolesEnum.js +10 -0
  36. package/dist/organisation/dto/RolesEnum.js.map +1 -0
  37. package/dist/organisation/entities/member-role.entity.d.ts +10 -0
  38. package/dist/organisation/entities/member-role.entity.js +60 -0
  39. package/dist/organisation/entities/member-role.entity.js.map +1 -0
  40. package/dist/organisation/entities/organisation-membership.entity.d.ts +16 -0
  41. package/dist/organisation/entities/organisation-membership.entity.js +105 -0
  42. package/dist/organisation/entities/organisation-membership.entity.js.map +1 -0
  43. package/dist/organisation/entities/organisation.entity.d.ts +4 -4
  44. package/dist/organisation/entities/organisation.entity.js +12 -19
  45. package/dist/organisation/entities/organisation.entity.js.map +1 -1
  46. package/dist/organisation/organisation.service.js +73 -17
  47. package/dist/organisation/organisation.service.js.map +1 -1
  48. package/dist/person/entities/person.entity.d.ts +2 -3
  49. package/dist/person/entities/person.entity.js +6 -17
  50. package/dist/person/entities/person.entity.js.map +1 -1
  51. package/dist/person/person.service.js +33 -11
  52. package/dist/person/person.service.js.map +1 -1
  53. package/dist/root-app/core-app.module.js +4 -2
  54. package/dist/root-app/core-app.module.js.map +1 -1
  55. package/dist/smtp-email-client/EmailClientProvider.d.ts +1 -1
  56. package/dist/smtp-email-client/EmailClientProvider.js +3 -3
  57. package/dist/smtp-email-client/EmailClientProvider.js.map +1 -1
  58. package/dist/smtp-email-client/EmailConfigurationService.d.ts +1 -1
  59. package/dist/smtp-email-client/EmailConfigurationService.js +3 -3
  60. package/dist/smtp-email-client/EmailConfigurationService.js.map +1 -1
  61. package/dist/smtp-email-client/EmailConfigurationVariables.d.ts +2 -2
  62. package/dist/smtp-email-client/EmailConfigurationVariables.js +1 -1
  63. package/dist/smtp-email-client/EmailConfigurationVariables.js.map +1 -1
  64. package/dist/smtp-email-client/email-client.service.d.ts +4 -2
  65. package/dist/smtp-email-client/email-client.service.js +20 -26
  66. package/dist/smtp-email-client/email-client.service.js.map +1 -1
  67. package/dist/smtp-email-client/email.entity.d.ts +3 -1
  68. package/dist/smtp-email-client/email.entity.js +12 -2
  69. package/dist/smtp-email-client/email.entity.js.map +1 -1
  70. package/dist/smtp-email-client/smtp-email-client.module.d.ts +1 -0
  71. package/dist/smtp-email-client/smtp-email-client.module.js +9 -2
  72. package/dist/smtp-email-client/smtp-email-client.module.js.map +1 -1
  73. package/dist/smtp-email-client/smtp-email-handler.d.ts +17 -0
  74. package/dist/smtp-email-client/smtp-email-handler.js +108 -0
  75. package/dist/smtp-email-client/smtp-email-handler.js.map +1 -0
  76. package/dist/stripe-client/StripeClientConfigurationService.d.ts +9 -0
  77. package/dist/stripe-client/StripeClientConfigurationService.js +56 -0
  78. package/dist/stripe-client/StripeClientConfigurationService.js.map +1 -0
  79. package/dist/stripe-client/StripeClientProvider.d.ts +7 -0
  80. package/dist/stripe-client/StripeClientProvider.js +22 -0
  81. package/dist/stripe-client/StripeClientProvider.js.map +1 -0
  82. package/dist/stripe-client/StripeConfigurationVariables.d.ts +10 -0
  83. package/dist/stripe-client/StripeConfigurationVariables.js +9 -0
  84. package/dist/stripe-client/StripeConfigurationVariables.js.map +1 -0
  85. package/dist/stripe-client/models/StripeCheckoutSessionParams.d.ts +11 -0
  86. package/dist/stripe-client/models/StripeCheckoutSessionParams.js +63 -0
  87. package/dist/stripe-client/models/StripeCheckoutSessionParams.js.map +1 -0
  88. package/dist/stripe-client/services/stripe-checkout.service.d.ts +15 -0
  89. package/dist/stripe-client/services/stripe-checkout.service.js +65 -0
  90. package/dist/stripe-client/services/stripe-checkout.service.js.map +1 -0
  91. package/dist/stripe-client/services/stripe-event-handler.d.ts +11 -0
  92. package/dist/stripe-client/services/stripe-event-handler.js +148 -0
  93. package/dist/stripe-client/services/stripe-event-handler.js.map +1 -0
  94. package/dist/stripe-client/services/stripe-webhook-handler.service.d.ts +14 -0
  95. package/dist/stripe-client/services/stripe-webhook-handler.service.js +56 -0
  96. package/dist/stripe-client/services/stripe-webhook-handler.service.js.map +1 -0
  97. package/dist/stripe-client/stripe-account.module.d.ts +4 -0
  98. package/dist/stripe-client/stripe-account.module.js +45 -0
  99. package/dist/stripe-client/stripe-account.module.js.map +1 -0
  100. package/dist/stripe-client/stripe-controller.d.ts +14 -0
  101. package/dist/stripe-client/stripe-controller.js +86 -0
  102. package/dist/stripe-client/stripe-controller.js.map +1 -0
  103. package/package.json +20 -17
@@ -7,8 +7,7 @@ export declare class CoreConfigurationService extends ValidatedConfigurationServ
7
7
  get shouldAutomaticallyInstallApiModels(): boolean;
8
8
  get shouldUseNestCors(): boolean;
9
9
  get webPort(): number;
10
- get clientCorsUrl(): string;
11
10
  get appTitle(): string;
12
- get appEnvironmentSpecificUrl(): string;
11
+ get frontEndAppUrl(): string;
13
12
  get nodeEnv(): string;
14
13
  }
@@ -33,14 +33,11 @@ let CoreConfigurationService = class CoreConfigurationService extends ValidatedC
33
33
  get webPort() {
34
34
  return Number.parseInt(this.configService.get("core.webPort"), 10);
35
35
  }
36
- get clientCorsUrl() {
37
- return this.configService.get("core.clientCorsUrl");
38
- }
39
36
  get appTitle() {
40
37
  return this.configService.get("core.appTitle");
41
38
  }
42
- get appEnvironmentSpecificUrl() {
43
- return this.configService.get("core.appEnvironmentSpecificUrl");
39
+ get frontEndAppUrl() {
40
+ return this.configService.get("core.frontEndAppUrl");
44
41
  }
45
42
  get nodeEnv() {
46
43
  return this.configService.get("core.nodeEnv");
@@ -70,12 +67,6 @@ __decorate([
70
67
  __metadata("design:type", Number),
71
68
  __metadata("design:paramtypes", [])
72
69
  ], CoreConfigurationService.prototype, "webPort", null);
73
- __decorate([
74
- (0, class_validator_1.IsDefined)(),
75
- (0, class_validator_1.IsString)(),
76
- __metadata("design:type", String),
77
- __metadata("design:paramtypes", [])
78
- ], CoreConfigurationService.prototype, "clientCorsUrl", null);
79
70
  __decorate([
80
71
  (0, class_validator_1.IsDefined)(),
81
72
  (0, class_validator_1.IsString)(),
@@ -87,7 +78,7 @@ __decorate([
87
78
  (0, class_validator_1.IsString)(),
88
79
  __metadata("design:type", String),
89
80
  __metadata("design:paramtypes", [])
90
- ], CoreConfigurationService.prototype, "appEnvironmentSpecificUrl", null);
81
+ ], CoreConfigurationService.prototype, "frontEndAppUrl", null);
91
82
  __decorate([
92
83
  (0, class_validator_1.IsDefined)(),
93
84
  (0, class_validator_1.IsString)(),
@@ -1 +1 @@
1
- {"version":3,"file":"CoreConfigurationService.js","sourceRoot":"","sources":["../../src/core-config/CoreConfigurationService.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6DAA6D;AAC7D,2CAA0C;AAC1C,2CAA6C;AAC7C,qDAAsE;AACtE,kGAA6F;AAGtF,IAAM,wBAAwB,GAA9B,MAAM,wBAAyB,SAAQ,6DAA6B;IACvE,YAAoB,aAA4B;QAC5C,KAAK,EAAE,CAAC;QADQ,kBAAa,GAAb,aAAa,CAAe;IAEhD,CAAC;IAED,IAEI,qBAAqB;QACrB,OAAO,CACH,IAAI,CAAC,aAAa,CAAC,GAAG,CAAS,4BAA4B,CAAC;YAC5D,MAAM,CACT,CAAC;IACN,CAAC;IAED,IAEI,mCAAmC;QACnC,OAAO,CACH,IAAI,CAAC,aAAa,CAAC,GAAG,CAClB,0CAA0C,CAC7C,KAAK,MAAM,CACf,CAAC;IACN,CAAC;IAED,IAEI,iBAAiB;QACjB,OAAO,CACH,IAAI,CAAC,aAAa,CAAC,GAAG,CAAS,wBAAwB,CAAC,KAAK,MAAM,CACtE,CAAC;IACN,CAAC;IAED,IAEI,OAAO;QACP,OAAO,MAAM,CAAC,QAAQ,CAClB,IAAI,CAAC,aAAa,CAAC,GAAG,CAAS,cAAc,CAAE,EAC/C,EAAE,CACL,CAAC;IACN,CAAC;IAED,IAEI,aAAa;QACb,OAAO,IAAI,CAAC,aAAa,CAAC,GAAG,CAAS,oBAAoB,CAAE,CAAC;IACjE,CAAC;IAED,IAEI,QAAQ;QACR,OAAO,IAAI,CAAC,aAAa,CAAC,GAAG,CAAS,eAAe,CAAE,CAAC;IAC5D,CAAC;IAED,IAEI,yBAAyB;QACzB,OAAO,IAAI,CAAC,aAAa,CAAC,GAAG,CACzB,gCAAgC,CAClC,CAAC;IACP,CAAC;IAED,IAEI,OAAO;QACP,OAAO,IAAI,CAAC,aAAa,CAAC,GAAG,CAAS,cAAc,CAAE,CAAC;IAC3D,CAAC;CACJ,CAAA;AA7DG;IAAC,IAAA,2BAAS,GAAE;IACX,IAAA,2BAAS,GAAE;;;qEAMX;AAED;IAAC,IAAA,2BAAS,GAAE;IACX,IAAA,2BAAS,GAAE;;;mFAOX;AAED;IAAC,IAAA,2BAAS,GAAE;IACX,IAAA,2BAAS,GAAE;;;iEAKX;AAED;IAAC,IAAA,2BAAS,GAAE;IACX,IAAA,uBAAK,GAAE;;;uDAMP;AAED;IAAC,IAAA,2BAAS,GAAE;IACX,IAAA,0BAAQ,GAAE;;;6DAGV;AAED;IAAC,IAAA,2BAAS,GAAE;IACX,IAAA,0BAAQ,GAAE;;;wDAGV;AAED;IAAC,IAAA,2BAAS,GAAE;IACX,IAAA,0BAAQ,GAAE;;;yEAKV;AAED;IAAC,IAAA,2BAAS,GAAE;IACX,IAAA,0BAAQ,GAAE;;;uDAGV;AAjEQ,wBAAwB;IADpC,IAAA,mBAAU,GAAE;qCAE0B,sBAAa;GADvC,wBAAwB,CAkEpC;AAlEY,4DAAwB"}
1
+ {"version":3,"file":"CoreConfigurationService.js","sourceRoot":"","sources":["../../src/core-config/CoreConfigurationService.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6DAA6D;AAC7D,2CAA0C;AAC1C,2CAA6C;AAC7C,qDAAsE;AACtE,kGAA6F;AAGtF,IAAM,wBAAwB,GAA9B,MAAM,wBAAyB,SAAQ,6DAA6B;IACvE,YAAoB,aAA4B;QAC5C,KAAK,EAAE,CAAC;QADQ,kBAAa,GAAb,aAAa,CAAe;IAEhD,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,0BAAQ,GAAE;;;uDAGV;AAzDQ,wBAAwB;IADpC,IAAA,mBAAU,GAAE;qCAE0B,sBAAa;GADvC,wBAAwB,CA0DpC;AA1DY,4DAAwB"}
@@ -3,8 +3,7 @@ declare const _default: (() => {
3
3
  shouldGenerateSwagger: string | undefined;
4
4
  webPort: string | undefined;
5
5
  nodeEnv: string | undefined;
6
- clientCorsUrl: string | undefined;
7
- appEnvironmentSpecificUrl: string | undefined;
6
+ frontEndAppUrl: string | undefined;
8
7
  shouldUseNestCors: string | undefined;
9
8
  shouldAutomaticallyInstallApiModels: string | undefined;
10
9
  appTitle: string | undefined;
@@ -13,8 +12,7 @@ declare const _default: (() => {
13
12
  shouldGenerateSwagger: string | undefined;
14
13
  webPort: string | undefined;
15
14
  nodeEnv: string | undefined;
16
- clientCorsUrl: string | undefined;
17
- appEnvironmentSpecificUrl: string | undefined;
15
+ frontEndAppUrl: string | undefined;
18
16
  shouldUseNestCors: string | undefined;
19
17
  shouldAutomaticallyInstallApiModels: string | undefined;
20
18
  appTitle: string | undefined;
@@ -6,8 +6,7 @@ exports.default = (0, config_1.registerAs)("core", () => ({
6
6
  shouldGenerateSwagger: process.env.GENERATE_SWAGGER,
7
7
  webPort: process.env.WEB_PORT,
8
8
  nodeEnv: process.env.NODE_ENV,
9
- clientCorsUrl: process.env.CLIENT_CORS_URL,
10
- appEnvironmentSpecificUrl: process.env.APP_ENVIRONMENT_SPECIFIC_URL,
9
+ frontEndAppUrl: process.env.FRONTEND_APP_URL,
11
10
  shouldUseNestCors: process.env.ENABLE_NEST_CORS,
12
11
  shouldAutomaticallyInstallApiModels: process.env.AUTO_INSTALL_API_MODELS,
13
12
  appTitle: process.env.APP_TITLE,
@@ -1 +1 @@
1
- {"version":3,"file":"CoreConfigurationVariables.js","sourceRoot":"","sources":["../../src/core-config/CoreConfigurationVariables.ts"],"names":[],"mappings":";;AAAA,2CAA0C;AAE1C,kBAAe,IAAA,mBAAU,EAAC,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC;IACrC,UAAU,EAAE,OAAO,CAAC,GAAG,CAAC,WAAW;IACnC,qBAAqB,EAAE,OAAO,CAAC,GAAG,CAAC,gBAAgB;IACnD,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,QAAQ;IAC7B,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,QAAQ;IAC7B,aAAa,EAAE,OAAO,CAAC,GAAG,CAAC,eAAe;IAC1C,yBAAyB,EAAE,OAAO,CAAC,GAAG,CAAC,4BAA4B;IACnE,iBAAiB,EAAE,OAAO,CAAC,GAAG,CAAC,gBAAgB;IAC/C,mCAAmC,EAAE,OAAO,CAAC,GAAG,CAAC,uBAAuB;IACxE,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,SAAS;CAClC,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"CoreConfigurationVariables.js","sourceRoot":"","sources":["../../src/core-config/CoreConfigurationVariables.ts"],"names":[],"mappings":";;AAAA,2CAA0C;AAE1C,kBAAe,IAAA,mBAAU,EAAC,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC;IACrC,UAAU,EAAE,OAAO,CAAC,GAAG,CAAC,WAAW;IACnC,qBAAqB,EAAE,OAAO,CAAC,GAAG,CAAC,gBAAgB;IACnD,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,QAAQ;IAC7B,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,QAAQ;IAC7B,cAAc,EAAE,OAAO,CAAC,GAAG,CAAC,gBAAgB;IAC5C,iBAAiB,EAAE,OAAO,CAAC,GAAG,CAAC,gBAAgB;IAC/C,mCAAmC,EAAE,OAAO,CAAC,GAAG,CAAC,uBAAuB;IACxE,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,SAAS;CAClC,CAAC,CAAC,CAAC"}
@@ -1,8 +1,6 @@
1
1
  import { TypeOrmModuleOptions } from "@nestjs/typeorm";
2
2
  export declare class DatabaseConfigurationService {
3
3
  /**
4
- * This method uses process.env directly because it is also used in a node script that doesn't have access
5
- * to NestJS injection.
6
4
  * @returns {TypeOrmModuleOptions} Database config for the current env
7
5
  */
8
6
  getTypeOrmConfig(): TypeOrmModuleOptions;
@@ -11,8 +11,6 @@ const common_1 = require("@nestjs/common");
11
11
  const PostgresTypeOrmConfigurationProvider_1 = require("./PostgresTypeOrmConfigurationProvider");
12
12
  let DatabaseConfigurationService = class DatabaseConfigurationService {
13
13
  /**
14
- * This method uses process.env directly because it is also used in a node script that doesn't have access
15
- * to NestJS injection.
16
14
  * @returns {TypeOrmModuleOptions} Database config for the current env
17
15
  */
18
16
  getTypeOrmConfig() {
@@ -1 +1 @@
1
- {"version":3,"file":"PostgresDatabaseConfigurationService.js","sourceRoot":"","sources":["../../src/database-postgres/PostgresDatabaseConfigurationService.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA0C;AAE1C,iGAA4F;AAGrF,IAAM,4BAA4B,GAAlC,MAAM,4BAA4B;IACrC;;;;OAIG;IACI,gBAAgB;QACnB,OAAO,2EAAoC,CAAC,gBAAgB,EAAE,CAAC;IACnE,CAAC;CACJ,CAAA;AATY,4BAA4B;IADxC,IAAA,mBAAU,GAAE;GACA,4BAA4B,CASxC;AATY,oEAA4B"}
1
+ {"version":3,"file":"PostgresDatabaseConfigurationService.js","sourceRoot":"","sources":["../../src/database-postgres/PostgresDatabaseConfigurationService.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA0C;AAE1C,iGAA4F;AAGrF,IAAM,4BAA4B,GAAlC,MAAM,4BAA4B;IACrC;;OAEG;IACI,gBAAgB;QACnB,OAAO,2EAAoC,CAAC,gBAAgB,EAAE,CAAC;IACnE,CAAC;CACJ,CAAA;AAPY,4BAA4B;IADxC,IAAA,mBAAU,GAAE;GACA,4BAA4B,CAOxC;AAPY,oEAA4B"}
package/dist/index.d.ts CHANGED
@@ -25,4 +25,7 @@ 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
- 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, };
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, RequestWithUser, PersonModule, OrganisationModule, PersonService, SqliteDatabaseModule, SqliteDatabaseConfigurationService, TwitterClientService, TwitterAccountModule, EUploadMimeType, RunningCommandLineModule, CliCommandService, ClaimsAuthorisationGuard, MandatoryUserClaims, InvitationModule, 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.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;
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
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,4 +57,10 @@ 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
+ 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; } });
60
66
  //# sourceMappingURL=index.js.map
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;AAoDpF,yGApDI,oDAAwB,OAoDJ;AAnD5B,oFAA6E;AAiDzE,qGAjDI,6CAAoB,OAiDJ;AAhDxB,2FAAmF;AA6B/E,sGA7BI,gDAAqB,OA6BJ;AA5BzB,mDAA+C;AAgD3C,gGAhDI,gCAAe,OAgDJ;AA/CnB,uDAAiD;AAkC7C,4FAlCI,0BAAW,OAkCJ;AAjCf,yDAAkD;AAgC9C,4FAhCI,2BAAW,OAgCJ;AA/Bf,+DAA0D;AA6BtD,iGA7BI,mCAAgB,OA6BJ;AA3BpB,iGAA4F;AAkCxF,8GAlCI,6DAA6B,OAkCJ;AAjCjC,qFAAgF;AAqB5E,yGArBI,mDAAwB,OAqBJ;AApB5B,yFAAmF;AA0BrD,+FA1BtB,gDAAsB,OA0Bc;AAzB5C,mHAA8G;AA6BlE,6GA7BpC,2EAAoC,OA6B4B;AA5BxE,mFAA6E;AAmCzE,qGAnCI,4CAAoB,OAmCJ;AAlCxB,6GAAwG;AAmCpG,mHAnCI,uEAAkC,OAmCJ;AAlCtC,mFAAyE;AA2BrE,gGA3BI,sCAAe,OA2BJ;AA1BnB,mFAA2D;AAcvD,4BAdG,2BAAiB,CAcH;AAbrB,4EAAsE;AA6BlE,mGA7BI,wCAAkB,OA6BJ;AA5Bt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,sCAAe,OA8BJ;AA7BnB,mFAA2D;AAiBvD,4BAjBG,2BAAiB,CAiBH;AAhBrB,4EAAsE;AAgClE,mGAhCI,wCAAkB,OAgCJ;AA/BtB,mEAAuD;AAyBnD,uFAzBI,sBAAM,OAyBJ;AAxBV,0DAAoD;AA6BhD,6FA7BI,4BAAY,OA6BJ;AA5BhB,4DAAsD;AA8BlD,8FA9BI,8BAAa,OA8BJ;AA7BjB,gEAAsD;AAelD,2FAfI,4BAAU,OAeJ;AAdd,sDAAiD;AAgB7C,2FAhBI,uBAAU,OAgBJ;AAfd,6FAAsF;AA8BlF,qGA9BI,6CAAoB,OA8BJ;AA7BxB,uEAAiE;AAa7D,iGAbI,oCAAgB,OAaJ;AAZpB,8EAAyE;AAgCrE,kGAhCI,qCAAiB,OAgCJ;AA/BrB,+EAA0E;AAgCtE,yGAhCI,mDAAwB,OAgCJ;AA/B5B,yFAA0E;AAgCtE,oGAhCI,mDAAmB,OAgCJ;AA/BvB,uEAAiE;AAgC7D,iGAhCI,oCAAgB,OAgCJ;AA/BpB,iFAA0E;AAgCtE,oGAhCI,2CAAmB,OAgCJ;AA/BvB,wFAAiF;AAgC7E,mGAhCI,yCAAkB,OAgCJ"}
@@ -0,0 +1,7 @@
1
+ import { ConfigService } from "@nestjs/config";
2
+ import { ValidatedConfigurationService } from "../configuration/ValidatedConfigurationService";
3
+ export declare class InvitationsConfigurationService extends ValidatedConfigurationService {
4
+ private configService;
5
+ constructor(configService: ConfigService);
6
+ get baseUrl(): string;
7
+ }
@@ -0,0 +1,38 @@
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
+ constructor(configService) {
20
+ super();
21
+ this.configService = configService;
22
+ }
23
+ get baseUrl() {
24
+ return this.configService.get("invitations.baseUrl");
25
+ }
26
+ };
27
+ __decorate([
28
+ (0, class_validator_1.IsDefined)(),
29
+ (0, class_validator_1.IsString)(),
30
+ __metadata("design:type", String),
31
+ __metadata("design:paramtypes", [])
32
+ ], InvitationsConfigurationService.prototype, "baseUrl", null);
33
+ InvitationsConfigurationService = __decorate([
34
+ (0, common_1.Injectable)(),
35
+ __metadata("design:paramtypes", [config_1.ConfigService])
36
+ ], InvitationsConfigurationService);
37
+ exports.InvitationsConfigurationService = InvitationsConfigurationService;
38
+ //# sourceMappingURL=InvitationConfigurationService.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InvitationConfigurationService.js","sourceRoot":"","sources":["../../src/invitations/InvitationConfigurationService.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6DAA6D;AAC7D,2CAA0C;AAC1C,2CAA6C;AAC7C,qDAAoD;AACpD,kGAA6F;AAGtF,IAAM,+BAA+B,GAArC,MAAM,+BAAgC,SAAQ,6DAA6B;IAC9E,YAAoB,aAA4B;QAC5C,KAAK,EAAE,CAAC;QADQ,kBAAa,GAAb,aAAa,CAAe;IAEhD,CAAC;IAED,IAEI,OAAO;QACP,OAAO,IAAI,CAAC,aAAa,CAAC,GAAG,CAAS,qBAAqB,CAAE,CAAC;IAClE,CAAC;CACJ,CAAA;AALG;IAAC,IAAA,2BAAS,GAAE;IACX,IAAA,0BAAQ,GAAE;;;8DAGV;AATQ,+BAA+B;IAD3C,IAAA,mBAAU,GAAE;qCAE0B,sBAAa;GADvC,+BAA+B,CAU3C;AAVY,0EAA+B"}
@@ -0,0 +1,6 @@
1
+ declare const _default: (() => {
2
+ baseUrl: string | undefined;
3
+ }) & import("@nestjs/config").ConfigFactoryKeyHost<{
4
+ baseUrl: string | undefined;
5
+ }>;
6
+ export default _default;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const config_1 = require("@nestjs/config");
4
+ exports.default = (0, config_1.registerAs)("invitations", () => ({
5
+ baseUrl: process.env.INVITATION_URLS_BASE_URL,
6
+ }));
7
+ //# sourceMappingURL=InvitationConfigurationVariables.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InvitationConfigurationVariables.js","sourceRoot":"","sources":["../../src/invitations/InvitationConfigurationVariables.ts"],"names":[],"mappings":";;AAAA,2CAA0C;AAE1C,kBAAe,IAAA,mBAAU,EAAC,aAAa,EAAE,GAAG,EAAE,CAAC,CAAC;IAC5C,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,wBAAwB;CAChD,CAAC,CAAC,CAAC"}
@@ -0,0 +1,5 @@
1
+ export declare class CreateInvitationDto {
2
+ givenName: string;
3
+ emailAddress: string;
4
+ organisationId: number;
5
+ }
@@ -0,0 +1,29 @@
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
+ }
16
+ __decorate([
17
+ (0, swagger_1.ApiProperty)(),
18
+ __metadata("design:type", String)
19
+ ], CreateInvitationDto.prototype, "givenName", void 0);
20
+ __decorate([
21
+ (0, swagger_1.ApiProperty)(),
22
+ __metadata("design:type", String)
23
+ ], CreateInvitationDto.prototype, "emailAddress", void 0);
24
+ __decorate([
25
+ (0, swagger_1.ApiProperty)(),
26
+ __metadata("design:type", Number)
27
+ ], CreateInvitationDto.prototype, "organisationId", void 0);
28
+ exports.CreateInvitationDto = CreateInvitationDto;
29
+ //# sourceMappingURL=create-invitation.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-invitation.dto.js","sourceRoot":"","sources":["../../../src/invitations/dto/create-invitation.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA4C;AAE5C,MAAa,mBAAmB;CAS/B;AARG;IAAC,IAAA,qBAAW,GAAE;;sDACK;AAEnB;IAAC,IAAA,qBAAW,GAAE;;yDACQ;AAEtB;IAAC,IAAA,qBAAW,GAAE;;2DACU;AAR5B,kDASC"}
@@ -0,0 +1,14 @@
1
+ import { Organisation } from "../../organisation/entities/organisation.entity";
2
+ export declare class Invitation {
3
+ id: number;
4
+ uuid: string;
5
+ givenName: string;
6
+ emailAddress: string;
7
+ notificationSent: Date;
8
+ expiresOn: Date;
9
+ acceptedOn?: Date;
10
+ organisation: Organisation;
11
+ createdDate: Date;
12
+ updateDate: Date;
13
+ deletedDate?: Date;
14
+ }
@@ -0,0 +1,85 @@
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
+ };
18
+ __decorate([
19
+ (0, typeorm_1.PrimaryGeneratedColumn)(),
20
+ (0, swagger_1.ApiProperty)(),
21
+ __metadata("design:type", Number)
22
+ ], Invitation.prototype, "id", void 0);
23
+ __decorate([
24
+ (0, typeorm_1.Column)("uuid", {
25
+ name: "uuid",
26
+ default: () => "uuid_generate_v4()",
27
+ }),
28
+ (0, typeorm_1.Generated)("uuid"),
29
+ (0, swagger_1.ApiProperty)(),
30
+ __metadata("design:type", String)
31
+ ], Invitation.prototype, "uuid", void 0);
32
+ __decorate([
33
+ (0, typeorm_1.Column)(),
34
+ (0, swagger_1.ApiProperty)(),
35
+ __metadata("design:type", String)
36
+ ], Invitation.prototype, "givenName", void 0);
37
+ __decorate([
38
+ (0, typeorm_1.Column)(),
39
+ (0, swagger_1.ApiProperty)(),
40
+ __metadata("design:type", String)
41
+ ], Invitation.prototype, "emailAddress", void 0);
42
+ __decorate([
43
+ (0, typeorm_1.Column)(),
44
+ (0, swagger_1.ApiProperty)(),
45
+ __metadata("design:type", Date)
46
+ ], Invitation.prototype, "notificationSent", void 0);
47
+ __decorate([
48
+ (0, typeorm_1.Column)(),
49
+ (0, swagger_1.ApiProperty)(),
50
+ __metadata("design:type", Date)
51
+ ], Invitation.prototype, "expiresOn", void 0);
52
+ __decorate([
53
+ (0, typeorm_1.Column)(),
54
+ (0, swagger_1.ApiPropertyOptional)(),
55
+ __metadata("design:type", Date)
56
+ ], Invitation.prototype, "acceptedOn", void 0);
57
+ __decorate([
58
+ (0, typeorm_1.Column)(),
59
+ (0, swagger_1.ApiProperty)(),
60
+ (0, typeorm_1.ManyToOne)(() => organisation_entity_1.Organisation, (org) => org.invitations, {
61
+ eager: true,
62
+ cascade: ["insert", "update"],
63
+ }),
64
+ __metadata("design:type", organisation_entity_1.Organisation)
65
+ ], Invitation.prototype, "organisation", void 0);
66
+ __decorate([
67
+ (0, typeorm_1.CreateDateColumn)(),
68
+ (0, swagger_1.ApiProperty)(),
69
+ __metadata("design:type", Date)
70
+ ], Invitation.prototype, "createdDate", void 0);
71
+ __decorate([
72
+ (0, typeorm_1.UpdateDateColumn)(),
73
+ (0, swagger_1.ApiProperty)(),
74
+ __metadata("design:type", Date)
75
+ ], Invitation.prototype, "updateDate", void 0);
76
+ __decorate([
77
+ (0, typeorm_1.DeleteDateColumn)(),
78
+ (0, swagger_1.ApiPropertyOptional)(),
79
+ __metadata("design:type", Date)
80
+ ], Invitation.prototype, "deletedDate", void 0);
81
+ Invitation = __decorate([
82
+ (0, typeorm_1.Entity)()
83
+ ], Invitation);
84
+ exports.Invitation = Invitation;
85
+ //# sourceMappingURL=invitation.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"invitation.entity.js","sourceRoot":"","sources":["../../../src/invitations/entities/invitation.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAiE;AAEjE,qCASiB;AACjB,yFAA6E;AAGtE,IAAM,UAAU,GAAhB,MAAM,UAAU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 import { RequestWithUser } from "../authz/RequestWithUser";
2
+ import { Invitation } from "./entities/invitation.entity";
3
+ import { InvitationService } from "./invitation.service";
4
+ import { CreateInvitationDto } from "./dto/create-invitation.dto";
5
+ export declare class InvitationController {
6
+ private readonly invitationService;
7
+ constructor(invitationService: InvitationService);
8
+ create(createDto: CreateInvitationDto, request: RequestWithUser): Promise<Invitation>;
9
+ remove(uuid: string, request: RequestWithUser): Promise<boolean>;
10
+ }
@@ -0,0 +1,60 @@
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
+ constructor(invitationService) {
24
+ this.invitationService = invitationService;
25
+ }
26
+ async create(createDto, request) {
27
+ return this.invitationService.create(createDto, request.user);
28
+ }
29
+ async remove(uuid, request) {
30
+ const deleteResult = await this.invitationService.remove(uuid, request.user.id);
31
+ return deleteResult.deletedDate !== undefined;
32
+ }
33
+ };
34
+ __decorate([
35
+ (0, common_1.Post)(),
36
+ (0, swagger_1.ApiOkResponse)({ type: invitation_entity_1.Invitation }),
37
+ __param(0, (0, common_1.Body)()),
38
+ __param(1, (0, common_1.Request)()),
39
+ __metadata("design:type", Function),
40
+ __metadata("design:paramtypes", [create_invitation_dto_1.CreateInvitationDto, Object]),
41
+ __metadata("design:returntype", Promise)
42
+ ], InvitationController.prototype, "create", null);
43
+ __decorate([
44
+ (0, common_1.Delete)(":uuid"),
45
+ (0, swagger_1.ApiOkResponse)({ type: invitation_entity_1.Invitation }),
46
+ __param(0, (0, common_1.Param)("uuid")),
47
+ __param(1, (0, common_1.Request)()),
48
+ __metadata("design:type", Function),
49
+ __metadata("design:paramtypes", [String, Object]),
50
+ __metadata("design:returntype", Promise)
51
+ ], InvitationController.prototype, "remove", null);
52
+ InvitationController = __decorate([
53
+ (0, common_1.UseGuards)((0, passport_1.AuthGuard)("jwt")),
54
+ (0, swagger_1.ApiBearerAuth)(),
55
+ (0, common_1.Controller)("invitations"),
56
+ (0, swagger_1.ApiTags)("organisations"),
57
+ __metadata("design:paramtypes", [invitation_service_1.InvitationService])
58
+ ], InvitationController);
59
+ exports.InvitationController = InvitationController;
60
+ //# sourceMappingURL=invitation.controller.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"invitation.controller.js","sourceRoot":"","sources":["../../src/invitations/invitation.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAQwB;AAExB,6CAAsE;AAEtE,+CAA2C;AAE3C,oEAAwD;AACxD,6DAAuD;AACvD,uEAAgE;AAMzD,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAC7B,YAA6B,iBAAoC;QAApC,sBAAiB,GAAjB,iBAAiB,CAAmB;IAAG,CAAC;IAI/D,AAAN,KAAK,CAAC,MAAM,CACA,SAA8B,EAC3B,OAAwB;QAEnC,OAAO,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IAClE,CAAC;IAIK,AAAN,KAAK,CAAC,MAAM,CACO,IAAY,EAChB,OAAwB;QAEnC,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,iBAAiB,CAAC,MAAM,CACpD,IAAI,EACJ,OAAO,CAAC,IAAI,CAAC,EAAE,CAClB,CAAC;QAEF,OAAO,YAAY,CAAC,WAAW,KAAK,SAAS,CAAC;IAClD,CAAC;CACJ,CAAA;AApBS;IAFL,IAAA,aAAI,GAAE;IACN,IAAA,uBAAa,EAAC,EAAC,IAAI,EAAE,8BAAU,EAAC,CAAC;IAE7B,WAAA,IAAA,aAAI,GAAE,CAAA;IACN,WAAA,IAAA,gBAAO,GAAE,CAAA;;qCADS,2CAAmB;;kDAIzC;AAIK;IAFL,IAAA,eAAM,EAAC,OAAO,CAAC;IACf,IAAA,uBAAa,EAAC,EAAC,IAAI,EAAE,8BAAU,EAAC,CAAC;IAE7B,WAAA,IAAA,cAAK,EAAC,MAAM,CAAC,CAAA;IACb,WAAA,IAAA,gBAAO,GAAE,CAAA;;;;kDAQb;AAxBQ,oBAAoB;IAJhC,IAAA,kBAAS,EAAC,IAAA,oBAAS,EAAC,KAAK,CAAC,CAAC;IAC3B,IAAA,uBAAa,GAAE;IACf,IAAA,mBAAU,EAAC,aAAa,CAAC;IACzB,IAAA,iBAAO,EAAC,eAAe,CAAC;qCAE2B,sCAAiB;GADxD,oBAAoB,CAyBhC;AAzBY,oDAAoB"}
@@ -0,0 +1,2 @@
1
+ export declare class InvitationModule {
2
+ }
@@ -0,0 +1,41 @@
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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"invitation.module.js","sourceRoot":"","sources":["../../src/invitations/invitation.module.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAsC;AACtC,2DAAqD;AACrD,6CAA8C;AAC9C,oEAAwD;AACxD,mEAA6D;AAC7D,6DAAuD;AACvD,4FAAoF;AACpF,6EAAuE;AACvE,2CAA4C;AAC5C,0GAAiE;AACjE,qFAAiF;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"}
@@ -0,0 +1,16 @@
1
+ import { Repository } from "typeorm";
2
+ import { CreateInvitationDto } from "./dto/create-invitation.dto";
3
+ import { Invitation } from "./entities/invitation.entity";
4
+ import { SmtpEmailClient } from "../smtp-email-client/email-client.service";
5
+ import { Person } from "../person/entities/person.entity";
6
+ import { Organisation } from "../organisation/entities/organisation.entity";
7
+ import { InvitationsConfigurationService } from "./InvitationConfigurationService";
8
+ export declare class InvitationService {
9
+ private invitationRepository;
10
+ private organisationRepository;
11
+ private readonly emailClient;
12
+ private readonly configService;
13
+ constructor(invitationRepository: Repository<Invitation>, organisationRepository: Repository<Organisation>, emailClient: SmtpEmailClient, configService: InvitationsConfigurationService);
14
+ create(createDto: CreateInvitationDto, createdBy: Omit<Person, "nullChecks">): Promise<Invitation>;
15
+ remove(uuid: string, currentUserId: number): Promise<Invitation>;
16
+ }