@darraghor/nest-backend-libs 2.13.0 → 2.14.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 (59) hide show
  1. package/dist/authz/index.d.ts +6 -0
  2. package/dist/authz/index.js +14 -0
  3. package/dist/authz/index.js.map +1 -0
  4. package/dist/index.d.ts +6 -12
  5. package/dist/index.js +6 -21
  6. package/dist/index.js.map +1 -1
  7. package/dist/invitations/index.d.ts +4 -0
  8. package/dist/invitations/index.js +12 -0
  9. package/dist/invitations/index.js.map +1 -0
  10. package/dist/invitations/invitation.controller.js +1 -1
  11. package/dist/organisation/entities/organisation.entity.d.ts +2 -0
  12. package/dist/organisation/entities/organisation.entity.js +9 -0
  13. package/dist/organisation/entities/organisation.entity.js.map +1 -1
  14. package/dist/organisation/index.d.ts +1 -0
  15. package/dist/organisation/index.js +6 -0
  16. package/dist/organisation/index.js.map +1 -0
  17. package/dist/organisation/organisation.controller.js +1 -1
  18. package/dist/organisation-memberships/entities/organisation-membership.entity.js +1 -0
  19. package/dist/organisation-memberships/entities/organisation-membership.entity.js.map +1 -1
  20. package/dist/organisation-memberships/index.d.ts +1 -0
  21. package/dist/organisation-memberships/index.js +3 -1
  22. package/dist/organisation-memberships/index.js.map +1 -1
  23. package/dist/organisation-memberships/organisation-memberships.controller.d.ts +1 -0
  24. package/dist/organisation-memberships/organisation-memberships.controller.js +14 -2
  25. package/dist/organisation-memberships/organisation-memberships.controller.js.map +1 -1
  26. package/dist/organisation-memberships/organisation-memberships.service.d.ts +1 -0
  27. package/dist/organisation-memberships/organisation-memberships.service.js +16 -0
  28. package/dist/organisation-memberships/organisation-memberships.service.js.map +1 -1
  29. package/dist/organisation-subscriptions/entities/organisation-subscription.entity.d.ts +12 -0
  30. package/dist/organisation-subscriptions/entities/organisation-subscription.entity.js +80 -0
  31. package/dist/organisation-subscriptions/entities/organisation-subscription.entity.js.map +1 -0
  32. package/dist/organisation-subscriptions/index.d.ts +2 -0
  33. package/dist/organisation-subscriptions/index.js +8 -0
  34. package/dist/organisation-subscriptions/index.js.map +1 -0
  35. package/dist/organisation-subscriptions/organisation-subscriptions.controller.d.ts +8 -0
  36. package/dist/organisation-subscriptions/organisation-subscriptions.controller.js +47 -0
  37. package/dist/organisation-subscriptions/organisation-subscriptions.controller.js.map +1 -0
  38. package/dist/organisation-subscriptions/organisation-subscriptions.module.d.ts +2 -0
  39. package/dist/organisation-subscriptions/organisation-subscriptions.module.js +33 -0
  40. package/dist/organisation-subscriptions/organisation-subscriptions.module.js.map +1 -0
  41. package/dist/organisation-subscriptions/organisation-subscriptions.service.d.ts +10 -0
  42. package/dist/organisation-subscriptions/organisation-subscriptions.service.js +74 -0
  43. package/dist/organisation-subscriptions/organisation-subscriptions.service.js.map +1 -0
  44. package/dist/person/entities/person.entity.js +1 -0
  45. package/dist/person/entities/person.entity.js.map +1 -1
  46. package/dist/person/index.d.ts +3 -0
  47. package/dist/person/index.js +10 -0
  48. package/dist/person/index.js.map +1 -0
  49. package/dist/person/person.controller.js +1 -1
  50. package/dist/smtp-email-client/email.controller.js +1 -1
  51. package/dist/stripe-client/controllers/stripe-checkout-controller.js +1 -1
  52. package/dist/stripe-client/controllers/stripe-customer-portal-controller.js +1 -1
  53. package/dist/stripe-client/controllers/stripe-unauthenticated-checkout-controller.js +1 -1
  54. package/dist/stripe-client/controllers/stripe-webhook-controller.js +1 -1
  55. package/dist/stripe-client/services/stripe-event-handler.js +8 -0
  56. package/dist/stripe-client/services/stripe-event-handler.js.map +1 -1
  57. package/dist/stripe-client/stripe-account.module.js +2 -0
  58. package/dist/stripe-client/stripe-account.module.js.map +1 -1
  59. package/package.json +1 -1
@@ -0,0 +1,6 @@
1
+ export { AuthzModule } from "./authz.module";
2
+ export { JwtStrategy } from "./authzstrategy";
3
+ export { DefaultAuthGuard } from "./DefaultAuthGuard";
4
+ export { RequestWithUser } from "./RequestWithUser";
5
+ export { ClaimsAuthorisationGuard } from "./ClaimsAuthorisationGuard";
6
+ export { MandatoryUserClaims } from "./MandatoryUserClaims.decorator";
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MandatoryUserClaims = exports.ClaimsAuthorisationGuard = exports.DefaultAuthGuard = exports.JwtStrategy = exports.AuthzModule = void 0;
4
+ var authz_module_1 = require("./authz.module");
5
+ Object.defineProperty(exports, "AuthzModule", { enumerable: true, get: function () { return authz_module_1.AuthzModule; } });
6
+ var authzstrategy_1 = require("./authzstrategy");
7
+ Object.defineProperty(exports, "JwtStrategy", { enumerable: true, get: function () { return authzstrategy_1.JwtStrategy; } });
8
+ var DefaultAuthGuard_1 = require("./DefaultAuthGuard");
9
+ Object.defineProperty(exports, "DefaultAuthGuard", { enumerable: true, get: function () { return DefaultAuthGuard_1.DefaultAuthGuard; } });
10
+ var ClaimsAuthorisationGuard_1 = require("./ClaimsAuthorisationGuard");
11
+ Object.defineProperty(exports, "ClaimsAuthorisationGuard", { enumerable: true, get: function () { return ClaimsAuthorisationGuard_1.ClaimsAuthorisationGuard; } });
12
+ var MandatoryUserClaims_decorator_1 = require("./MandatoryUserClaims.decorator");
13
+ Object.defineProperty(exports, "MandatoryUserClaims", { enumerable: true, get: function () { return MandatoryUserClaims_decorator_1.MandatoryUserClaims; } });
14
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/authz/index.ts"],"names":[],"mappings":";;;AAAA,+CAA2C;AAAnC,2GAAA,WAAW,OAAA;AACnB,iDAA4C;AAApC,4GAAA,WAAW,OAAA;AACnB,uDAAoD;AAA5C,oHAAA,gBAAgB,OAAA;AAExB,uEAAoE;AAA5D,oIAAA,wBAAwB,OAAA;AAChC,iFAAoE;AAA5D,oIAAA,mBAAmB,OAAA"}
package/dist/index.d.ts CHANGED
@@ -2,10 +2,6 @@ import { RunningCommandLineModule } from "./runningCommandLine/RunningCommandLin
2
2
  import { TwitterAccountModule } from "./twitter-client/twitter-account.module";
3
3
  import { SmtpEmailClientModule } from "./smtp-email-client/smtp-email-client.module";
4
4
  import { EUploadMimeType } from "twitter-api-v2";
5
- import { AuthzModule } from "./authz/authz.module";
6
- import { JwtStrategy } from "./authz/authzstrategy";
7
- import { DefaultAuthGuard } from "./authz/DefaultAuthGuard";
8
- import { RequestWithUser } from "./authz/RequestWithUser";
9
5
  import { ValidatedConfigurationService } from "./configuration/ValidatedConfigurationService";
10
6
  import { CoreConfigurationService } from "./core-config/CoreConfigurationService";
11
7
  import { PostgresDatabaseModule } from "./database-postgres/PostgresDatabase.module";
@@ -14,18 +10,16 @@ import { SqliteDatabaseModule } from "./database-sqlite/SqliteDatabase.module";
14
10
  import { SqliteDatabaseConfigurationService } from "./database-sqlite/SqliteDatabaseConfigurationService";
15
11
  import { SmtpEmailClient } from "./smtp-email-client/email-client.service";
16
12
  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
13
  import { CoreModule } from "./root-app/core-app.module";
22
14
  import { SwaggerGen } from "./root-app/SwaggerGen";
23
15
  import { TwitterClientService } from "./twitter-client/services/twitter-client.service";
24
16
  import { CoreConfigModule } from "./core-config/CoreConfig.module";
25
17
  import { CliCommandService } from "./runningCommandLine/CliCommandService";
26
- import { ClaimsAuthorisationGuard } from "./authz/ClaimsAuthorisationGuard";
27
- import { MandatoryUserClaims } from "./authz/MandatoryUserClaims.decorator";
28
- import { OrganisationMembershipsModule } from "./organisation-memberships/organisation-memberships.module";
29
- 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, OrganisationMembershipsModule, };
18
+ export { CoreLoggerService, CoreConfigurationService, SmtpEmailClientModule, CoreModule, CoreConfigModule, SwaggerGen, PostgresDatabaseModule as DatabaseModule, PostgresTypeOrmConfigurationProvider as TypeOrmConfigurationProvider, SmtpEmailClient, ValidatedConfigurationService, SqliteDatabaseModule, SqliteDatabaseConfigurationService, TwitterClientService, TwitterAccountModule, EUploadMimeType, RunningCommandLineModule, CliCommandService, };
30
19
  export * from "./stripe-client/index";
31
20
  export * from "./organisation-memberships/index";
21
+ export * from "./organisation-subscriptions/index";
22
+ export * from "./organisation/index";
23
+ export * from "./authz/index";
24
+ export * from "./invitations/index";
25
+ export * from "./person/index";
package/dist/index.js CHANGED
@@ -17,7 +17,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
17
17
  return (mod && mod.__esModule) ? mod : { "default": mod };
18
18
  };
19
19
  Object.defineProperty(exports, "__esModule", { value: true });
20
- exports.OrganisationMembershipsModule = 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;
20
+ exports.CliCommandService = exports.RunningCommandLineModule = exports.EUploadMimeType = exports.TwitterAccountModule = exports.TwitterClientService = exports.SqliteDatabaseConfigurationService = exports.SqliteDatabaseModule = exports.ValidatedConfigurationService = exports.SmtpEmailClient = exports.TypeOrmConfigurationProvider = exports.DatabaseModule = exports.SwaggerGen = exports.CoreConfigModule = exports.CoreModule = exports.SmtpEmailClientModule = exports.CoreConfigurationService = exports.CoreLoggerService = void 0;
21
21
  /* eslint-disable unicorn/prefer-export-from */
22
22
  const RunningCommandLine_module_1 = require("./runningCommandLine/RunningCommandLine.module");
23
23
  Object.defineProperty(exports, "RunningCommandLineModule", { enumerable: true, get: function () { return RunningCommandLine_module_1.RunningCommandLineModule; } });
@@ -27,12 +27,6 @@ const smtp_email_client_module_1 = require("./smtp-email-client/smtp-email-clien
27
27
  Object.defineProperty(exports, "SmtpEmailClientModule", { enumerable: true, get: function () { return smtp_email_client_module_1.SmtpEmailClientModule; } });
28
28
  const twitter_api_v2_1 = require("twitter-api-v2");
29
29
  Object.defineProperty(exports, "EUploadMimeType", { enumerable: true, get: function () { return twitter_api_v2_1.EUploadMimeType; } });
30
- const authz_module_1 = require("./authz/authz.module");
31
- Object.defineProperty(exports, "AuthzModule", { enumerable: true, get: function () { return authz_module_1.AuthzModule; } });
32
- const authzstrategy_1 = require("./authz/authzstrategy");
33
- Object.defineProperty(exports, "JwtStrategy", { enumerable: true, get: function () { return authzstrategy_1.JwtStrategy; } });
34
- const DefaultAuthGuard_1 = require("./authz/DefaultAuthGuard");
35
- Object.defineProperty(exports, "DefaultAuthGuard", { enumerable: true, get: function () { return DefaultAuthGuard_1.DefaultAuthGuard; } });
36
30
  const ValidatedConfigurationService_1 = require("./configuration/ValidatedConfigurationService");
37
31
  Object.defineProperty(exports, "ValidatedConfigurationService", { enumerable: true, get: function () { return ValidatedConfigurationService_1.ValidatedConfigurationService; } });
38
32
  const CoreConfigurationService_1 = require("./core-config/CoreConfigurationService");
@@ -49,14 +43,6 @@ const email_client_service_1 = require("./smtp-email-client/email-client.service
49
43
  Object.defineProperty(exports, "SmtpEmailClient", { enumerable: true, get: function () { return email_client_service_1.SmtpEmailClient; } });
50
44
  const CoreLoggerService_1 = __importDefault(require("./logger/CoreLoggerService"));
51
45
  exports.CoreLoggerService = CoreLoggerService_1.default;
52
- const organisation_module_1 = require("./organisation/organisation.module");
53
- Object.defineProperty(exports, "OrganisationModule", { enumerable: true, get: function () { return organisation_module_1.OrganisationModule; } });
54
- const person_entity_1 = require("./person/entities/person.entity");
55
- Object.defineProperty(exports, "Person", { enumerable: true, get: function () { return person_entity_1.Person; } });
56
- const person_module_1 = require("./person/person.module");
57
- Object.defineProperty(exports, "PersonModule", { enumerable: true, get: function () { return person_module_1.PersonModule; } });
58
- const person_service_1 = require("./person/person.service");
59
- Object.defineProperty(exports, "PersonService", { enumerable: true, get: function () { return person_service_1.PersonService; } });
60
46
  const core_app_module_1 = require("./root-app/core-app.module");
61
47
  Object.defineProperty(exports, "CoreModule", { enumerable: true, get: function () { return core_app_module_1.CoreModule; } });
62
48
  const SwaggerGen_1 = require("./root-app/SwaggerGen");
@@ -67,12 +53,11 @@ const CoreConfig_module_1 = require("./core-config/CoreConfig.module");
67
53
  Object.defineProperty(exports, "CoreConfigModule", { enumerable: true, get: function () { return CoreConfig_module_1.CoreConfigModule; } });
68
54
  const CliCommandService_1 = require("./runningCommandLine/CliCommandService");
69
55
  Object.defineProperty(exports, "CliCommandService", { enumerable: true, get: function () { return CliCommandService_1.CliCommandService; } });
70
- const ClaimsAuthorisationGuard_1 = require("./authz/ClaimsAuthorisationGuard");
71
- Object.defineProperty(exports, "ClaimsAuthorisationGuard", { enumerable: true, get: function () { return ClaimsAuthorisationGuard_1.ClaimsAuthorisationGuard; } });
72
- const MandatoryUserClaims_decorator_1 = require("./authz/MandatoryUserClaims.decorator");
73
- Object.defineProperty(exports, "MandatoryUserClaims", { enumerable: true, get: function () { return MandatoryUserClaims_decorator_1.MandatoryUserClaims; } });
74
- const organisation_memberships_module_1 = require("./organisation-memberships/organisation-memberships.module");
75
- Object.defineProperty(exports, "OrganisationMembershipsModule", { enumerable: true, get: function () { return organisation_memberships_module_1.OrganisationMembershipsModule; } });
76
56
  __exportStar(require("./stripe-client/index"), exports);
77
57
  __exportStar(require("./organisation-memberships/index"), exports);
58
+ __exportStar(require("./organisation-subscriptions/index"), exports);
59
+ __exportStar(require("./organisation/index"), exports);
60
+ __exportStar(require("./authz/index"), exports);
61
+ __exportStar(require("./invitations/index"), exports);
62
+ __exportStar(require("./person/index"), exports);
78
63
  //# 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;AAsDpF,yGAtDI,oDAAwB,OAsDJ;AArD5B,oFAA6E;AAmDzE,qGAnDI,6CAAoB,OAmDJ;AAlDxB,2FAAmF;AA+B/E,sGA/BI,gDAAqB,OA+BJ;AA9BzB,mDAA+C;AAkD3C,gGAlDI,gCAAe,OAkDJ;AAjDnB,uDAAiD;AAoC7C,4FApCI,0BAAW,OAoCJ;AAnCf,yDAAkD;AAkC9C,4FAlCI,2BAAW,OAkCJ;AAjCf,+DAA0D;AA+BtD,iGA/BI,mCAAgB,OA+BJ;AA7BpB,iGAA4F;AAoCxF,8GApCI,6DAA6B,OAoCJ;AAnCjC,qFAAgF;AAuB5E,yGAvBI,mDAAwB,OAuBJ;AAtB5B,yFAAmF;AA4BrD,+FA5BtB,gDAAsB,OA4Bc;AA3B5C,mHAA8G;AA+BlE,6GA/BpC,2EAAoC,OA+B4B;AA9BxE,mFAA6E;AAqCzE,qGArCI,4CAAoB,OAqCJ;AApCxB,6GAAwG;AAqCpG,mHArCI,uEAAkC,OAqCJ;AApCtC,mFAAyE;AA6BrE,gGA7BI,sCAAe,OA6BJ;AA5BnB,mFAA2D;AAgBvD,4BAhBG,2BAAiB,CAgBH;AAfrB,4EAAsE;AA+BlE,mGA/BI,wCAAkB,OA+BJ;AA9BtB,mEAAuD;AAwBnD,uFAxBI,sBAAM,OAwBJ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,4BAAU,OAUJ;AATd,sDAAiD;AAW7C,2FAXI,uBAAU,OAWJ;AAVd,6FAAsF;AAiBlF,qGAjBI,6CAAoB,OAiBJ;AAhBxB,uEAAiE;AAQ7D,iGARI,oCAAgB,OAQJ;AAPpB,8EAAyE;AAmBrE,kGAnBI,qCAAiB,OAmBJ;AAGrB,wDAAsC;AACtC,mEAAiD;AACjD,qEAAmD;AACnD,uDAAqC;AACrC,gDAA8B;AAC9B,sDAAoC;AACpC,iDAA+B"}
@@ -0,0 +1,4 @@
1
+ export { InvitationModule } from "./invitation.module";
2
+ export { InvitationService } from "./invitation.service";
3
+ export { Invitation } from "./entities/invitation.entity";
4
+ export { CreateInvitationDto } from "./dto/create-invitation.dto";
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CreateInvitationDto = exports.Invitation = exports.InvitationService = exports.InvitationModule = void 0;
4
+ var invitation_module_1 = require("./invitation.module");
5
+ Object.defineProperty(exports, "InvitationModule", { enumerable: true, get: function () { return invitation_module_1.InvitationModule; } });
6
+ var invitation_service_1 = require("./invitation.service");
7
+ Object.defineProperty(exports, "InvitationService", { enumerable: true, get: function () { return invitation_service_1.InvitationService; } });
8
+ var invitation_entity_1 = require("./entities/invitation.entity");
9
+ Object.defineProperty(exports, "Invitation", { enumerable: true, get: function () { return invitation_entity_1.Invitation; } });
10
+ var create_invitation_dto_1 = require("./dto/create-invitation.dto");
11
+ Object.defineProperty(exports, "CreateInvitationDto", { enumerable: true, get: function () { return create_invitation_dto_1.CreateInvitationDto; } });
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/invitations/index.ts"],"names":[],"mappings":";;;AAAA,yDAAqD;AAA7C,qHAAA,gBAAgB,OAAA;AACxB,2DAAuD;AAA/C,uHAAA,iBAAiB,OAAA;AACzB,kEAAwD;AAAhD,+GAAA,UAAU,OAAA;AAClB,qEAAgE;AAAxD,4HAAA,mBAAmB,OAAA"}
@@ -54,7 +54,7 @@ InvitationController = __decorate([
54
54
  (0, common_1.UseGuards)((0, passport_1.AuthGuard)("jwt")),
55
55
  (0, swagger_1.ApiBearerAuth)(),
56
56
  (0, common_1.Controller)("organisations/invitations"),
57
- (0, swagger_1.ApiTags)("organisations"),
57
+ (0, swagger_1.ApiTags)("Organisations"),
58
58
  __metadata("design:paramtypes", [invitation_service_1.InvitationService])
59
59
  ], InvitationController);
60
60
  exports.InvitationController = InvitationController;
@@ -1,8 +1,10 @@
1
1
  import { OrganisationMembership } from "../../organisation-memberships/entities/organisation-membership.entity";
2
+ import { OrganisationSubscriptionRecord } from "../../organisation-subscriptions/entities/organisation-subscription.entity";
2
3
  export declare class Organisation {
3
4
  id: number;
4
5
  uuid: string;
5
6
  memberships: OrganisationMembership[];
7
+ subscriptionRecords: OrganisationSubscriptionRecord[];
6
8
  name: string;
7
9
  createdDate: Date;
8
10
  updateDate: Date;
@@ -13,10 +13,12 @@ exports.Organisation = void 0;
13
13
  const swagger_1 = require("@nestjs/swagger");
14
14
  const typeorm_1 = require("typeorm");
15
15
  const organisation_membership_entity_1 = require("../../organisation-memberships/entities/organisation-membership.entity");
16
+ const organisation_subscription_entity_1 = require("../../organisation-subscriptions/entities/organisation-subscription.entity");
16
17
  let Organisation = class Organisation {
17
18
  id;
18
19
  uuid;
19
20
  memberships;
21
+ subscriptionRecords;
20
22
  name;
21
23
  createdDate;
22
24
  updateDate;
@@ -40,6 +42,7 @@ __decorate([
40
42
  }),
41
43
  (0, typeorm_1.Generated)("uuid"),
42
44
  (0, swagger_1.ApiProperty)(),
45
+ (0, typeorm_1.Index)(),
43
46
  __metadata("design:type", String)
44
47
  ], Organisation.prototype, "uuid", void 0);
45
48
  __decorate([
@@ -48,6 +51,12 @@ __decorate([
48
51
  }),
49
52
  __metadata("design:type", Array)
50
53
  ], Organisation.prototype, "memberships", void 0);
54
+ __decorate([
55
+ (0, typeorm_1.OneToMany)(() => organisation_subscription_entity_1.OrganisationSubscriptionRecord, (osr) => osr.organisation, {
56
+ cascade: ["insert", "update"],
57
+ }),
58
+ __metadata("design:type", Array)
59
+ ], Organisation.prototype, "subscriptionRecords", void 0);
51
60
  __decorate([
52
61
  (0, typeorm_1.Column)(),
53
62
  (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,qCAYiB;AACjB,2HAA8G;AAGvG,IAAM,YAAY,GAAlB,MAAM,YAAY;IAGrB,EAAE,CAAU;IAQL,IAAI,CAAU;IAKrB,WAAW,CAA4B;IAIvC,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;AA1CG;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,OAAO,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC;KAChC,CAAC;;iDACqC;AAEvC;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;AA1CQ,YAAY;IADxB,IAAA,gBAAM,GAAE;GACI,YAAY,CA2CxB;AA3CY,oCAAY"}
1
+ {"version":3,"file":"organisation.entity.js","sourceRoot":"","sources":["../../../src/organisation/entities/organisation.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA4C;AAE5C,qCAaiB;AACjB,2HAA8G;AAC9G,iIAA0H;AAGnH,IAAM,YAAY,GAAlB,MAAM,YAAY;IAGrB,EAAE,CAAU;IASL,IAAI,CAAU;IAKrB,WAAW,CAA4B;IASvC,mBAAmB,CAAoC;IAIvD,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;AApDG;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;IACb,IAAA,eAAK,GAAE;;0CACa;AAErB;IAAC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,uDAAsB,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,YAAY,EAAE;QAC9D,OAAO,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC;KAChC,CAAC;;iDACqC;AAEvC;IAAC,IAAA,mBAAS,EACN,GAAG,EAAE,CAAC,iEAA8B,EACpC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,YAAY,EACzB;QACI,OAAO,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC;KAChC,CACJ;;yDACsD;AAEvD;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;AApDQ,YAAY;IADxB,IAAA,gBAAM,GAAE;GACI,YAAY,CAqDxB;AArDY,oCAAY"}
@@ -0,0 +1 @@
1
+ export { OrganisationModule } from "./organisation.module";
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OrganisationModule = void 0;
4
+ var organisation_module_1 = require("./organisation.module");
5
+ Object.defineProperty(exports, "OrganisationModule", { enumerable: true, get: function () { return organisation_module_1.OrganisationModule; } });
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/organisation/index.ts"],"names":[],"mappings":";;;AAAA,6DAAyD;AAAjD,yHAAA,kBAAkB,OAAA"}
@@ -82,7 +82,7 @@ OrganisationController = __decorate([
82
82
  (0, common_1.UseGuards)((0, passport_1.AuthGuard)("jwt")),
83
83
  (0, swagger_1.ApiBearerAuth)(),
84
84
  (0, common_1.Controller)("organisation"),
85
- (0, swagger_1.ApiTags)("organisations"),
85
+ (0, swagger_1.ApiTags)("Organisations"),
86
86
  __metadata("design:paramtypes", [organisation_service_1.OrganisationService])
87
87
  ], OrganisationController);
88
88
  exports.OrganisationController = OrganisationController;
@@ -46,6 +46,7 @@ __decorate([
46
46
  }),
47
47
  (0, typeorm_1.Generated)("uuid"),
48
48
  (0, swagger_1.ApiProperty)(),
49
+ (0, typeorm_1.Index)(),
49
50
  __metadata("design:type", String)
50
51
  ], OrganisationMembership.prototype, "uuid", void 0);
51
52
  __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":"organisation-membership.entity.js","sourceRoot":"","sources":["../../../src/organisation-memberships/entities/organisation-membership.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA4C;AAE5C,qCAciB;AACjB,uFAA8E;AAC9E,yFAA6E;AAC7E,uEAA2D;AAGpD,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IAG/B,EAAE,CAAU;IAQL,IAAI,CAAU;IAMrB,MAAM,CAAU;IAIT,QAAQ,CAAU;IAMzB,YAAY,CAAgB;IAIrB,cAAc,CAAU;IAE/B,+DAA+D;IAK/D,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;AA5DG;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,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GAAE;;;;wDAKb;AA5DQ,sBAAsB;IADlC,IAAA,gBAAM,GAAE;GACI,sBAAsB,CA6DlC;AA7DY,wDAAsB"}
1
+ {"version":3,"file":"organisation-membership.entity.js","sourceRoot":"","sources":["../../../src/organisation-memberships/entities/organisation-membership.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA4C;AAE5C,qCAeiB;AACjB,uFAA8E;AAC9E,yFAA6E;AAC7E,uEAA2D;AAGpD,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IAG/B,EAAE,CAAU;IASL,IAAI,CAAU;IAMrB,MAAM,CAAU;IAIT,QAAQ,CAAU;IAMzB,YAAY,CAAgB;IAIrB,cAAc,CAAU;IAE/B,+DAA+D;IAK/D,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;AA7DG;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;IACb,IAAA,eAAK,GAAE;;oDACa;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;AAEhB;IAAC,IAAA,gBAAM,GAAE;IACR,IAAA,oBAAU,EAAC,CAAC,UAAkC,EAAE,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;;wDAC7C;AAEzB;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;AAE5B;IAAC,IAAA,gBAAM,GAAE;IACR,IAAA,oBAAU,EAAC,CAAC,UAAkC,EAAE,EAAE,CAAC,UAAU,CAAC,YAAY,CAAC;;8DAC7C;AAG/B;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;AA7DQ,sBAAsB;IADlC,IAAA,gBAAM,GAAE;GACI,sBAAsB,CA8DlC;AA9DY,wDAAsB"}
@@ -1 +1,2 @@
1
1
  export { OrganisationMembershipsService } from "./organisation-memberships.service";
2
+ export { OrganisationMembershipsModule } from "./organisation-memberships.module";
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.OrganisationMembershipsService = void 0;
3
+ exports.OrganisationMembershipsModule = exports.OrganisationMembershipsService = void 0;
4
4
  var organisation_memberships_service_1 = require("./organisation-memberships.service");
5
5
  Object.defineProperty(exports, "OrganisationMembershipsService", { enumerable: true, get: function () { return organisation_memberships_service_1.OrganisationMembershipsService; } });
6
+ var organisation_memberships_module_1 = require("./organisation-memberships.module");
7
+ Object.defineProperty(exports, "OrganisationMembershipsModule", { enumerable: true, get: function () { return organisation_memberships_module_1.OrganisationMembershipsModule; } });
6
8
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/organisation-memberships/index.ts"],"names":[],"mappings":";;;AAAA,uFAAkF;AAA1E,kJAAA,8BAA8B,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/organisation-memberships/index.ts"],"names":[],"mappings":";;;AAAA,uFAAkF;AAA1E,kJAAA,8BAA8B,OAAA;AACtC,qFAAgF;AAAxE,gJAAA,6BAA6B,OAAA"}
@@ -5,6 +5,7 @@ import { CreateUpdateMembershipDto } from "./dtos/create-membership-dto";
5
5
  export declare class OrganisationMembershipsController {
6
6
  private readonly omService;
7
7
  constructor(omService: OrganisationMembershipsService);
8
+ findAll(orgUuid: string, request: RequestWithUser): Promise<import("./entities/organisation-membership.entity").OrganisationMembership[]>;
8
9
  createOrUpdate(orgUuid: string, updateOrganisationDto: CreateUpdateMembershipDto, request: RequestWithUser): Promise<Organisation>;
9
10
  remove(orgUuid: string, membershipUuid: string, request: RequestWithUser): Promise<boolean>;
10
11
  }
@@ -24,6 +24,9 @@ let OrganisationMembershipsController = class OrganisationMembershipsController
24
24
  constructor(omService) {
25
25
  this.omService = omService;
26
26
  }
27
+ async findAll(orgUuid, request) {
28
+ return this.omService.findAllForOrgUser(orgUuid, request.user.id);
29
+ }
27
30
  async createOrUpdate(orgUuid, updateOrganisationDto, request) {
28
31
  return this.omService.createOrUpdate(orgUuid, updateOrganisationDto, request.user.id);
29
32
  }
@@ -35,6 +38,15 @@ let OrganisationMembershipsController = class OrganisationMembershipsController
35
38
  deleteResult?.affected > 0);
36
39
  }
37
40
  };
41
+ __decorate([
42
+ (0, common_1.Get)(),
43
+ (0, swagger_1.ApiOkResponse)({ type: [organisation_entity_1.Organisation] }),
44
+ __param(0, (0, common_1.Param)("orgUuid")),
45
+ __param(1, (0, common_1.Request)()),
46
+ __metadata("design:type", Function),
47
+ __metadata("design:paramtypes", [String, Object]),
48
+ __metadata("design:returntype", Promise)
49
+ ], OrganisationMembershipsController.prototype, "findAll", null);
38
50
  __decorate([
39
51
  (0, common_1.Post)(),
40
52
  (0, swagger_1.ApiOkResponse)({ type: organisation_entity_1.Organisation }),
@@ -47,7 +59,7 @@ __decorate([
47
59
  ], OrganisationMembershipsController.prototype, "createOrUpdate", null);
48
60
  __decorate([
49
61
  (0, common_1.Delete)(":membershipUuid"),
50
- (0, swagger_1.ApiOkResponse)({ type: organisation_entity_1.Organisation }),
62
+ (0, swagger_1.ApiOkResponse)({ type: Boolean }),
51
63
  __param(0, (0, common_1.Param)("orgUuid")),
52
64
  __param(1, (0, common_1.Param)("membershipUuid")),
53
65
  __param(2, (0, common_1.Request)()),
@@ -59,7 +71,7 @@ OrganisationMembershipsController = __decorate([
59
71
  (0, common_1.UseGuards)((0, passport_1.AuthGuard)("jwt")),
60
72
  (0, swagger_1.ApiBearerAuth)(),
61
73
  (0, common_1.Controller)("organisation/:orgUuid/memberships"),
62
- (0, swagger_1.ApiTags)("organisations"),
74
+ (0, swagger_1.ApiTags)("Organisations"),
63
75
  __metadata("design:paramtypes", [organisation_memberships_service_1.OrganisationMembershipsService])
64
76
  ], OrganisationMembershipsController);
65
77
  exports.OrganisationMembershipsController = OrganisationMembershipsController;
@@ -1 +1 @@
1
- {"version":3,"file":"organisation-memberships.controller.js","sourceRoot":"","sources":["../../src/organisation-memberships/organisation-memberships.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAQwB;AACxB,6CAAsE;AAEtE,+CAA2C;AAE3C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AnCQ,iCAAiC;IAJ7C,IAAA,kBAAS,EAAC,IAAA,oBAAS,EAAC,KAAK,CAAC,CAAC;IAC3B,IAAA,uBAAa,GAAE;IACf,IAAA,mBAAU,EAAC,mCAAmC,CAAC;IAC/C,IAAA,iBAAO,EAAC,eAAe,CAAC;qCAEmB,iEAA8B;GAD7D,iCAAiC,CAoC7C;AApCY,8EAAiC"}
1
+ {"version":3,"file":"organisation-memberships.controller.js","sourceRoot":"","sources":["../../src/organisation-memberships/organisation-memberships.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CASwB;AACxB,6CAAsE;AACtE,+CAA2C;AAE3C,yFAAkF;AAClF,sFAA0E;AAC1E,wEAAuE;AAMhE,IAAM,iCAAiC,GAAvC,MAAM,iCAAiC;IACb;IAA7B,YAA6B,SAAyC;QAAzC,cAAS,GAAT,SAAS,CAAgC;IAAG,CAAC;IAIpE,AAAN,KAAK,CAAC,OAAO,CACS,OAAe,EACtB,OAAwB;QAEnC,OAAO,IAAI,CAAC,SAAS,CAAC,iBAAiB,CAAC,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACtE,CAAC;IAIK,AAAN,KAAK,CAAC,cAAc,CACE,OAAe,EACzB,qBAAgD,EAC7C,OAAwB;QAEnC,OAAO,IAAI,CAAC,SAAS,CAAC,cAAc,CAChC,OAAO,EACP,qBAAqB,EACrB,OAAO,CAAC,IAAI,CAAC,EAAE,CAClB,CAAC;IACN,CAAC;IAIK,AAAN,KAAK,CAAC,MAAM,CACU,OAAe,EACR,cAAsB,EACpC,OAAwB;QAEnC,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,MAAM,CAC5C,OAAO,EACP,cAAc,EACd,OAAO,CAAC,IAAI,CAAC,EAAE,CAClB,CAAC;QACF,OAAO,CACH,YAAY,KAAK,SAAS;YAC1B,YAAY,CAAC,QAAQ,KAAK,SAAS;YACnC,YAAY,EAAE,QAAQ,KAAK,IAAI;YAC/B,YAAY,EAAE,QAAQ,GAAG,CAAC,CAC7B,CAAC;IACN,CAAC;CACJ,CAAA;AAxCS;IAFL,IAAA,YAAG,GAAE;IACL,IAAA,uBAAa,EAAC,EAAC,IAAI,EAAE,CAAC,kCAAY,CAAC,EAAC,CAAC;IAEjC,WAAA,IAAA,cAAK,EAAC,SAAS,CAAC,CAAA;IAChB,WAAA,IAAA,gBAAO,GAAE,CAAA;;;;gEAGb;AAIK;IAFL,IAAA,aAAI,GAAE;IACN,IAAA,uBAAa,EAAC,EAAC,IAAI,EAAE,kCAAY,EAAC,CAAC;IAE/B,WAAA,IAAA,cAAK,EAAC,SAAS,CAAC,CAAA;IAChB,WAAA,IAAA,aAAI,GAAE,CAAA;IACN,WAAA,IAAA,gBAAO,GAAE,CAAA;;6CADqB,iDAAyB;;uEAQ3D;AAIK;IAFL,IAAA,eAAM,EAAC,iBAAiB,CAAC;IACzB,IAAA,uBAAa,EAAC,EAAC,IAAI,EAAE,OAAO,EAAC,CAAC;IAE1B,WAAA,IAAA,cAAK,EAAC,SAAS,CAAC,CAAA;IAChB,WAAA,IAAA,cAAK,EAAC,gBAAgB,CAAC,CAAA;IACvB,WAAA,IAAA,gBAAO,GAAE,CAAA;;;;+DAab;AA5CQ,iCAAiC;IAJ7C,IAAA,kBAAS,EAAC,IAAA,oBAAS,EAAC,KAAK,CAAC,CAAC;IAC3B,IAAA,uBAAa,GAAE;IACf,IAAA,mBAAU,EAAC,mCAAmC,CAAC;IAC/C,IAAA,iBAAO,EAAC,eAAe,CAAC;qCAEmB,iEAA8B;GAD7D,iCAAiC,CA6C7C;AA7CY,8EAAiC"}
@@ -6,6 +6,7 @@ export declare class OrganisationMembershipsService {
6
6
  private orgRepo;
7
7
  private membershipRepo;
8
8
  constructor(orgRepo: Repository<Organisation>, membershipRepo: Repository<OrganisationMembership>);
9
+ findAllForOrgUser(orgUuid: string, currentUserId: number): Promise<OrganisationMembership[]>;
9
10
  createOrUpdate(orgUuid: string, createOmDto: CreateUpdateMembershipDto, currentUserId: number): Promise<Organisation>;
10
11
  private currentUserIsOwnerGuard;
11
12
  remove(orgUuid: string, membershipUuid: string, currentUserId: number): Promise<DeleteResult>;
@@ -27,6 +27,22 @@ let OrganisationMembershipsService = class OrganisationMembershipsService {
27
27
  this.orgRepo = orgRepo;
28
28
  this.membershipRepo = membershipRepo;
29
29
  }
30
+ async findAllForOrgUser(orgUuid, currentUserId) {
31
+ // no paging here ... yet!
32
+ const memberships = await this.membershipRepo.find({
33
+ where: {
34
+ organisation: {
35
+ uuid: orgUuid,
36
+ },
37
+ },
38
+ });
39
+ // is the person a member of the organisation?
40
+ const isAMember = memberships.some((m) => m.person.id === currentUserId);
41
+ if (!isAMember) {
42
+ throw new Error("You are not a member of this organisation");
43
+ }
44
+ return memberships;
45
+ }
30
46
  async createOrUpdate(orgUuid, createOmDto, currentUserId) {
31
47
  // find the org
32
48
  const org = await this.orgRepo.findOneOrFail({
@@ -1 +1 @@
1
- {"version":3,"file":"organisation-memberships.service.js","sourceRoot":"","sources":["../../src/organisation-memberships/organisation-memberships.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA0C;AAC1C,6CAAiD;AACjD,qCAAiD;AACjD,6DAAoD;AACpD,oFAA2E;AAC3E,sFAA0E;AAE1E,8FAAiF;AAG1E,IAAM,8BAA8B,GAApC,MAAM,8BAA8B;IAG3B;IAEA;IAJZ,YAEY,OAAiC,EAEjC,cAAkD;QAFlD,YAAO,GAAP,OAAO,CAA0B;QAEjC,mBAAc,GAAd,cAAc,CAAoC;IAC3D,CAAC;IAEJ,KAAK,CAAC,cAAc,CAChB,OAAe,EACf,WAAsC,EACtC,aAAqB;QAErB,eAAe;QACf,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC;YACzC,KAAK,EAAE;gBACH,IAAI,EAAE,OAAO;aAChB;YACD,SAAS,EAAE;gBACP,WAAW,EAAE;oBACT,KAAK,EAAE,IAAI;iBAC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AAC;IAC3D,CAAC;CACJ,CAAA;AAzGY,8BAA8B;IAD1C,IAAA,mBAAU,GAAE;IAGJ,WAAA,IAAA,0BAAgB,EAAC,kCAAY,CAAC,CAAA;IAE9B,WAAA,IAAA,0BAAgB,EAAC,uDAAsB,CAAC,CAAA;qCADxB,oBAAU;QAEH,oBAAU;GAL7B,8BAA8B,CAyG1C;AAzGY,wEAA8B"}
1
+ {"version":3,"file":"organisation-memberships.service.js","sourceRoot":"","sources":["../../src/organisation-memberships/organisation-memberships.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA0C;AAC1C,6CAAiD;AACjD,qCAAiD;AACjD,6DAAoD;AACpD,oFAA2E;AAC3E,sFAA0E;AAE1E,8FAAiF;AAG1E,IAAM,8BAA8B,GAApC,MAAM,8BAA8B;IAG3B;IAEA;IAJZ,YAEY,OAAiC,EAEjC,cAAkD;QAFlD,YAAO,GAAP,OAAO,CAA0B;QAEjC,mBAAc,GAAd,cAAc,CAAoC;IAC3D,CAAC;IAEJ,KAAK,CAAC,iBAAiB,CACnB,OAAe,EACf,aAAqB;QAErB,0BAA0B;QAC1B,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC;YAC/C,KAAK,EAAE;gBACH,YAAY,EAAE;oBACV,IAAI,EAAE,OAAO;iBAChB;aACJ;SACJ,CAAC,CAAC;QAEH,8CAA8C;QAC9C,MAAM,SAAS,GAAG,WAAW,CAAC,IAAI,CAC9B,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,KAAK,aAAa,CACvC,CAAC;QAEF,IAAI,CAAC,SAAS,EAAE;YACZ,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAC;SAChE;QACD,OAAO,WAAW,CAAC;IACvB,CAAC;IACD,KAAK,CAAC,cAAc,CAChB,OAAe,EACf,WAAsC,EACtC,aAAqB;QAErB,eAAe;QACf,MAAM,GAAG,GAAG,MAAM,IA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AU,EAAE;YACb,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;SAC3C;QACD,OAAO,MAAM,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;IAC3D,CAAC;CACJ,CAAA;AAhIY,8BAA8B;IAD1C,IAAA,mBAAU,GAAE;IAGJ,WAAA,IAAA,0BAAgB,EAAC,kCAAY,CAAC,CAAA;IAE9B,WAAA,IAAA,0BAAgB,EAAC,uDAAsB,CAAC,CAAA;qCADxB,oBAAU;QAEH,oBAAU;GAL7B,8BAA8B,CAgI1C;AAhIY,wEAA8B"}
@@ -0,0 +1,12 @@
1
+ import { Organisation } from "../../organisation/entities/organisation.entity";
2
+ export declare class OrganisationSubscriptionRecord {
3
+ id: number;
4
+ uuid: string;
5
+ stripeSubscriptionId: string;
6
+ stripeCustomerId: string;
7
+ stripePriceId: string;
8
+ validUntil: string;
9
+ organisation: Organisation;
10
+ organisationId: number;
11
+ createdDate: Date;
12
+ }
@@ -0,0 +1,80 @@
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.OrganisationSubscriptionRecord = 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 OrganisationSubscriptionRecord = class OrganisationSubscriptionRecord {
17
+ id;
18
+ uuid;
19
+ stripeSubscriptionId;
20
+ stripeCustomerId;
21
+ stripePriceId;
22
+ validUntil;
23
+ organisation;
24
+ organisationId;
25
+ createdDate;
26
+ };
27
+ __decorate([
28
+ (0, typeorm_1.PrimaryGeneratedColumn)(),
29
+ (0, swagger_1.ApiProperty)(),
30
+ __metadata("design:type", Number)
31
+ ], OrganisationSubscriptionRecord.prototype, "id", void 0);
32
+ __decorate([
33
+ (0, typeorm_1.Column)("uuid", {
34
+ name: "uuid",
35
+ default: () => "uuid_generate_v4()",
36
+ }),
37
+ (0, typeorm_1.Generated)("uuid"),
38
+ (0, swagger_1.ApiProperty)(),
39
+ (0, typeorm_1.Index)(),
40
+ __metadata("design:type", String)
41
+ ], OrganisationSubscriptionRecord.prototype, "uuid", void 0);
42
+ __decorate([
43
+ (0, typeorm_1.Column)(),
44
+ (0, swagger_1.ApiProperty)(),
45
+ __metadata("design:type", String)
46
+ ], OrganisationSubscriptionRecord.prototype, "stripeSubscriptionId", void 0);
47
+ __decorate([
48
+ (0, typeorm_1.Column)(),
49
+ (0, swagger_1.ApiProperty)(),
50
+ __metadata("design:type", String)
51
+ ], OrganisationSubscriptionRecord.prototype, "stripeCustomerId", void 0);
52
+ __decorate([
53
+ (0, typeorm_1.Column)(),
54
+ (0, swagger_1.ApiProperty)(),
55
+ __metadata("design:type", String)
56
+ ], OrganisationSubscriptionRecord.prototype, "stripePriceId", void 0);
57
+ __decorate([
58
+ (0, typeorm_1.Column)(),
59
+ (0, swagger_1.ApiProperty)(),
60
+ __metadata("design:type", String)
61
+ ], OrganisationSubscriptionRecord.prototype, "validUntil", void 0);
62
+ __decorate([
63
+ (0, typeorm_1.ManyToOne)(() => organisation_entity_1.Organisation, (org) => org.subscriptionRecords, {}),
64
+ __metadata("design:type", organisation_entity_1.Organisation)
65
+ ], OrganisationSubscriptionRecord.prototype, "organisation", void 0);
66
+ __decorate([
67
+ (0, typeorm_1.Column)(),
68
+ (0, typeorm_1.RelationId)((sub) => sub.organisation),
69
+ __metadata("design:type", Number)
70
+ ], OrganisationSubscriptionRecord.prototype, "organisationId", void 0);
71
+ __decorate([
72
+ (0, typeorm_1.CreateDateColumn)(),
73
+ (0, swagger_1.ApiProperty)(),
74
+ __metadata("design:type", Date)
75
+ ], OrganisationSubscriptionRecord.prototype, "createdDate", void 0);
76
+ OrganisationSubscriptionRecord = __decorate([
77
+ (0, typeorm_1.Entity)()
78
+ ], OrganisationSubscriptionRecord);
79
+ exports.OrganisationSubscriptionRecord = OrganisationSubscriptionRecord;
80
+ //# sourceMappingURL=organisation-subscription.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organisation-subscription.entity.js","sourceRoot":"","sources":["../../../src/organisation-subscriptions/entities/organisation-subscription.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA4C;AAE5C,qCASiB;AACjB,yFAA6E;AAGtE,IAAM,8BAA8B,GAApC,MAAM,8BAA8B;IAGvC,EAAE,CAAU;IASL,IAAI,CAAU;IAIrB,oBAAoB,CAAU;IAI9B,gBAAgB,CAAU;IAI1B,aAAa,CAAU;IAIvB,UAAU,CAAU;IAGpB,YAAY,CAAgB;IAIrB,cAAc,CAAU;IAI/B,WAAW,CAAQ;CACtB,CAAA;AAvCG;IAAC,IAAA,gCAAsB,GAAE;IACxB,IAAA,qBAAW,GAAE;;0DACF;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;IACb,IAAA,eAAK,GAAE;;4DACa;AAErB;IAAC,IAAA,gBAAM,GAAE;IACR,IAAA,qBAAW,GAAE;;4EACgB;AAE9B;IAAC,IAAA,gBAAM,GAAE;IACR,IAAA,qBAAW,GAAE;;wEACY;AAE1B;IAAC,IAAA,gBAAM,GAAE;IACR,IAAA,qBAAW,GAAE;;qEACS;AAEvB;IAAC,IAAA,gBAAM,GAAE;IACR,IAAA,qBAAW,GAAE;;kEACM;AAEpB;IAAC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,kCAAY,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,mBAAmB,EAAE,EAAE,CAAC;8BACrD,kCAAY;oEAAC;AAE5B;IAAC,IAAA,gBAAM,GAAE;IACR,IAAA,oBAAU,EAAC,CAAC,GAAmC,EAAE,EAAE,CAAC,GAAG,CAAC,YAAY,CAAC;;sEACvC;AAE/B;IAAC,IAAA,0BAAgB,GAAE;IAClB,IAAA,qBAAW,GAAE;8BACA,IAAI;mEAAC;AAvCV,8BAA8B;IAD1C,IAAA,gBAAM,GAAE;GACI,8BAA8B,CAwC1C;AAxCY,wEAA8B"}
@@ -0,0 +1,2 @@
1
+ export { OrganisationSubscriptionsModule } from "./organisation-subscriptions.module";
2
+ export { OrganisationSubscriptionService } from "./organisation-subscriptions.service";
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OrganisationSubscriptionService = exports.OrganisationSubscriptionsModule = void 0;
4
+ var organisation_subscriptions_module_1 = require("./organisation-subscriptions.module");
5
+ Object.defineProperty(exports, "OrganisationSubscriptionsModule", { enumerable: true, get: function () { return organisation_subscriptions_module_1.OrganisationSubscriptionsModule; } });
6
+ var organisation_subscriptions_service_1 = require("./organisation-subscriptions.service");
7
+ Object.defineProperty(exports, "OrganisationSubscriptionService", { enumerable: true, get: function () { return organisation_subscriptions_service_1.OrganisationSubscriptionService; } });
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/organisation-subscriptions/index.ts"],"names":[],"mappings":";;;AAAA,yFAAoF;AAA5E,oJAAA,+BAA+B,OAAA;AACvC,2FAAqF;AAA7E,qJAAA,+BAA+B,OAAA"}
@@ -0,0 +1,8 @@
1
+ import { RequestWithUser } from "../authz/RequestWithUser";
2
+ import { OrganisationSubscriptionRecord } from "./entities/organisation-subscription.entity";
3
+ import { OrganisationSubscriptionService } from "./organisation-subscriptions.service";
4
+ export declare class OrganisationSubscriptionsController {
5
+ private readonly osrService;
6
+ constructor(osrService: OrganisationSubscriptionService);
7
+ findAll(orgUuid: string, request: RequestWithUser): Promise<OrganisationSubscriptionRecord[]>;
8
+ }
@@ -0,0 +1,47 @@
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.OrganisationSubscriptionsController = 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 organisation_subscription_entity_1 = require("./entities/organisation-subscription.entity");
20
+ const organisation_subscriptions_service_1 = require("./organisation-subscriptions.service");
21
+ let OrganisationSubscriptionsController = class OrganisationSubscriptionsController {
22
+ osrService;
23
+ constructor(osrService) {
24
+ this.osrService = osrService;
25
+ }
26
+ async findAll(orgUuid, request) {
27
+ return this.osrService.findAllForOwnerOfOrg(orgUuid, request.user.id);
28
+ }
29
+ };
30
+ __decorate([
31
+ (0, common_1.Get)(),
32
+ (0, swagger_1.ApiOkResponse)({ type: [organisation_subscription_entity_1.OrganisationSubscriptionRecord] }),
33
+ __param(0, (0, common_1.Param)("orgUuid")),
34
+ __param(1, (0, common_1.Request)()),
35
+ __metadata("design:type", Function),
36
+ __metadata("design:paramtypes", [String, Object]),
37
+ __metadata("design:returntype", Promise)
38
+ ], OrganisationSubscriptionsController.prototype, "findAll", null);
39
+ OrganisationSubscriptionsController = __decorate([
40
+ (0, common_1.UseGuards)((0, passport_1.AuthGuard)("jwt")),
41
+ (0, swagger_1.ApiBearerAuth)(),
42
+ (0, common_1.Controller)("organisation/:orgUuid/subscriptions"),
43
+ (0, swagger_1.ApiTags)("Organisations"),
44
+ __metadata("design:paramtypes", [organisation_subscriptions_service_1.OrganisationSubscriptionService])
45
+ ], OrganisationSubscriptionsController);
46
+ exports.OrganisationSubscriptionsController = OrganisationSubscriptionsController;
47
+ //# sourceMappingURL=organisation-subscriptions.controller.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organisation-subscriptions.controller.js","sourceRoot":"","sources":["../../src/organisation-subscriptions/organisation-subscriptions.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA0E;AAC1E,6CAAsE;AACtE,+CAA2C;AAE3C,kGAA2F;AAC3F,6FAAqF;AAM9E,IAAM,mCAAmC,GAAzC,MAAM,mCAAmC;IACf;IAA7B,YAA6B,UAA2C;QAA3C,eAAU,GAAV,UAAU,CAAiC;IAAG,CAAC;IAItE,AAAN,KAAK,CAAC,OAAO,CACS,OAAe,EACtB,OAAwB;QAEnC,OAAO,IAAI,CAAC,UAAU,CAAC,oBAAoB,CAAC,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC1E,CAAC;CACJ,CAAA;AANS;IAFL,IAAA,YAAG,GAAE;IACL,IAAA,uBAAa,EAAC,EAAC,IAAI,EAAE,CAAC,iEAA8B,CAAC,EAAC,CAAC;IAEnD,WAAA,IAAA,cAAK,EAAC,SAAS,CAAC,CAAA;IAChB,WAAA,IAAA,gBAAO,GAAE,CAAA;;;;kEAGb;AAVQ,mCAAmC;IAJ/C,IAAA,kBAAS,EAAC,IAAA,oBAAS,EAAC,KAAK,CAAC,CAAC;IAC3B,IAAA,uBAAa,GAAE;IACf,IAAA,mBAAU,EAAC,qCAAqC,CAAC;IACjD,IAAA,iBAAO,EAAC,eAAe,CAAC;qCAEoB,oEAA+B;GAD/D,mCAAmC,CAW/C;AAXY,kFAAmC"}
@@ -0,0 +1,2 @@
1
+ export declare class OrganisationSubscriptionsModule {
2
+ }
@@ -0,0 +1,33 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.OrganisationSubscriptionsModule = void 0;
10
+ const common_1 = require("@nestjs/common");
11
+ const logger_module_1 = require("../logger/logger.module");
12
+ const typeorm_1 = require("@nestjs/typeorm");
13
+ const organisation_subscriptions_service_1 = require("./organisation-subscriptions.service");
14
+ const organisation_entity_1 = require("../organisation/entities/organisation.entity");
15
+ const organisation_subscriptions_controller_1 = require("./organisation-subscriptions.controller");
16
+ let OrganisationSubscriptionsModule = class OrganisationSubscriptionsModule {
17
+ };
18
+ OrganisationSubscriptionsModule = __decorate([
19
+ (0, common_1.Module)({
20
+ imports: [
21
+ logger_module_1.LoggerModule,
22
+ typeorm_1.TypeOrmModule.forFeature([
23
+ organisation_entity_1.Organisation,
24
+ organisation_subscriptions_service_1.OrganisationSubscriptionService,
25
+ ]),
26
+ ],
27
+ controllers: [organisation_subscriptions_controller_1.OrganisationSubscriptionsController],
28
+ providers: [organisation_subscriptions_service_1.OrganisationSubscriptionService],
29
+ exports: [organisation_subscriptions_service_1.OrganisationSubscriptionService],
30
+ })
31
+ ], OrganisationSubscriptionsModule);
32
+ exports.OrganisationSubscriptionsModule = OrganisationSubscriptionsModule;
33
+ //# sourceMappingURL=organisation-subscriptions.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organisation-subscriptions.module.js","sourceRoot":"","sources":["../../src/organisation-subscriptions/organisation-subscriptions.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAsC;AACtC,2DAAqD;AACrD,6CAA8C;AAC9C,6FAAqF;AACrF,sFAA0E;AAC1E,mGAA4F;AAcrF,IAAM,+BAA+B,GAArC,MAAM,+BAA+B;CAAG,CAAA;AAAlC,+BAA+B;IAZ3C,IAAA,eAAM,EAAC;QACJ,OAAO,EAAE;YACL,4BAAY;YACZ,uBAAa,CAAC,UAAU,CAAC;gBACrB,kCAAY;gBACZ,oEAA+B;aAClC,CAAC;SACL;QACD,WAAW,EAAE,CAAC,2EAAmC,CAAC;QAClD,SAAS,EAAE,CAAC,oEAA+B,CAAC;QAC5C,OAAO,EAAE,CAAC,oEAA+B,CAAC;KAC7C,CAAC;GACW,+BAA+B,CAAG;AAAlC,0EAA+B"}
@@ -0,0 +1,10 @@
1
+ import { Repository } from "typeorm";
2
+ import { Organisation } from "../organisation/entities/organisation.entity";
3
+ import { OrganisationSubscriptionRecord } from "./entities/organisation-subscription.entity";
4
+ export declare class OrganisationSubscriptionService {
5
+ private orgRepo;
6
+ private orgSubRepository;
7
+ constructor(orgRepo: Repository<Organisation>, orgSubRepository: Repository<OrganisationSubscriptionRecord>);
8
+ findAllForOwnerOfOrg(orgUuid: string, currentUserId: number): Promise<OrganisationSubscriptionRecord[]>;
9
+ create(orgSub: OrganisationSubscriptionRecord, currentUserId: number): Promise<OrganisationSubscriptionRecord>;
10
+ }
@@ -0,0 +1,74 @@
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.OrganisationSubscriptionService = 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 organisation_entity_1 = require("../organisation/entities/organisation.entity");
21
+ const organisation_subscription_entity_1 = require("./entities/organisation-subscription.entity");
22
+ let OrganisationSubscriptionService = class OrganisationSubscriptionService {
23
+ orgRepo;
24
+ orgSubRepository;
25
+ constructor(orgRepo, orgSubRepository) {
26
+ this.orgRepo = orgRepo;
27
+ this.orgSubRepository = orgSubRepository;
28
+ }
29
+ async findAllForOwnerOfOrg(orgUuid, currentUserId) {
30
+ // find the org if the user is owner
31
+ const org = await this.orgRepo.findOneOrFail({
32
+ where: {
33
+ uuid: orgUuid,
34
+ memberships: {
35
+ personId: currentUserId,
36
+ roles: {
37
+ name: RolesEnum_1.Roles.owner,
38
+ },
39
+ },
40
+ },
41
+ relations: {
42
+ subscriptionRecords: true,
43
+ },
44
+ });
45
+ return org.subscriptionRecords;
46
+ }
47
+ async create(orgSub, currentUserId) {
48
+ // find the org
49
+ await this.orgRepo.findOneOrFail({
50
+ where: {
51
+ id: orgSub.organisationId,
52
+ memberships: {
53
+ personId: currentUserId,
54
+ roles: {
55
+ name: RolesEnum_1.Roles.owner,
56
+ },
57
+ },
58
+ },
59
+ relations: {
60
+ subscriptionRecords: true,
61
+ },
62
+ });
63
+ return await this.orgSubRepository.save(orgSub);
64
+ }
65
+ };
66
+ OrganisationSubscriptionService = __decorate([
67
+ (0, common_1.Injectable)(),
68
+ __param(0, (0, typeorm_1.InjectRepository)(organisation_entity_1.Organisation)),
69
+ __param(1, (0, typeorm_1.InjectRepository)(organisation_subscription_entity_1.OrganisationSubscriptionRecord)),
70
+ __metadata("design:paramtypes", [typeorm_2.Repository,
71
+ typeorm_2.Repository])
72
+ ], OrganisationSubscriptionService);
73
+ exports.OrganisationSubscriptionService = OrganisationSubscriptionService;
74
+ //# sourceMappingURL=organisation-subscriptions.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organisation-subscriptions.service.js","sourceRoot":"","sources":["../../src/organisation-subscriptions/organisation-subscriptions.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA0C;AAC1C,6CAAiD;AACjD,qCAAmC;AACnC,6DAAoD;AACpD,sFAA0E;AAC1E,kGAA2F;AAGpF,IAAM,+BAA+B,GAArC,MAAM,+BAA+B;IAG5B;IAEA;IAJZ,YAEY,OAAiC,EAEjC,gBAA4D;QAF5D,YAAO,GAAP,OAAO,CAA0B;QAEjC,qBAAgB,GAAhB,gBAAgB,CAA4C;IACrE,CAAC;IAEJ,KAAK,CAAC,oBAAoB,CACtB,OAAe,EACf,aAAqB;QAErB,oCAAoC;QACpC,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC;YACzC,KAAK,EAAE;gBACH,IAAI,EAAE,OAAO;gBACb,WAAW,EAAE;oBACT,QAAQ,EAAE,aAAa;oBACvB,KAAK,EAAE;wBACH,IAAI,EAAE,iBAAK,CAAC,KAAK;qBACpB;iBACJ;aACJ;YACD,SAAS,EAAE;gBACP,mBAAmB,EAAE,IAAI;aAC5B;SACJ,CAAC,CAAC;QAEH,OAAO,GAAG,CAAC,mBAAmB,CAAC;IACnC,CAAC;IAED,KAAK,CAAC,MAAM,CACR,MAAsC,EACtC,aAAqB;QAErB,eAAe;QAEf,MAAM,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC;YAC7B,KAAK,EAAE;gBACH,EAAE,EAAE,MAAM,CAAC,cAAc;gBACzB,WAAW,EAAE;oBACT,QAAQ,EAAE,aAAa;oBACvB,KAAK,EAAE;wBACH,IAAI,EAAE,iBAAK,CAAC,KAAK;qBACpB;iBACJ;aACJ;YACD,SAAS,EAAE;gBACP,mBAAmB,EAAE,IAAI;aAC5B;SACJ,CAAC,CAAC;QAEH,OAAO,MAAM,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACpD,CAAC;CACJ,CAAA;AAtDY,+BAA+B;IAD3C,IAAA,mBAAU,GAAE;IAGJ,WAAA,IAAA,0BAAgB,EAAC,kCAAY,CAAC,CAAA;IAE9B,WAAA,IAAA,0BAAgB,EAAC,iEAA8B,CAAC,CAAA;qCADhC,oBAAU;QAED,oBAAU;GAL/B,+BAA+B,CAsD3C;AAtDY,0EAA+B"}
@@ -54,6 +54,7 @@ __decorate([
54
54
  }),
55
55
  (0, typeorm_1.Generated)("uuid"),
56
56
  (0, swagger_1.ApiProperty)(),
57
+ (0, typeorm_1.Index)(),
57
58
  __metadata("design:type", String)
58
59
  ], Person.prototype, "uuid", void 0);
59
60
  __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":"person.entity.js","sourceRoot":"","sources":["../../../src/person/entities/person.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CA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,EAAC,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC;;yCACN;AAEnB;IAAC,IAAA,qBAAW,GAAE;IACb,IAAA,gBAAM,GAAE;;uCACQ;AAEjB;IAAC,IAAA,qBAAW,GAAE;IACb,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EAAC,EAAC,MAAM,EAAE,IAAI,EAAC,CAAC;;2CACD;AAErB;IAAC,IAAA,6BAAmB,GAAE;IACrB,IAAA,gBAAM,EAAC,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC;;wCACP;AAElB;IAAC,IAAA,2BAAO,GAAE;IACT,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,uDAAsB,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,MAAM,EAAE;QACxD,OAAO,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC;KAChC,CAAC;;2CACqC;AAEvC;IAAC,IAAA,0BAAgB,GAAE;IAClB,IAAA,qBAAW,GAAE;8BACA,IAAI;2CAAC;AAEnB;IAAC,IAAA,0BAAgB,GAAE;IAClB,IAAA,qBAAW,GAAE;8BACD,IAAI;0CAAC;AAElB;IAAC,IAAA,0BAAgB,GAAE;IAClB,IAAA,qBAAW,GAAE;8BACA,IAAI;2CAAC;AAMb;IAHL,IAAA,mBAAS,GAAE;IACX,IAAA,qBAAW,GAAE;IACb,IAAA,qBAAW,GAAE;;;;wCAKb;AA7EQ,MAAM;IADlB,IAAA,gBAAM,GAAE;GACI,MAAM,CA8ElB;AA9EY,wBAAM"}
@@ -0,0 +1,3 @@
1
+ export { Person } from "./entities/person.entity";
2
+ export { PersonModule } from "./person.module";
3
+ export { PersonService } from "./person.service";
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PersonService = exports.PersonModule = exports.Person = void 0;
4
+ var person_entity_1 = require("./entities/person.entity");
5
+ Object.defineProperty(exports, "Person", { enumerable: true, get: function () { return person_entity_1.Person; } });
6
+ var person_module_1 = require("./person.module");
7
+ Object.defineProperty(exports, "PersonModule", { enumerable: true, get: function () { return person_module_1.PersonModule; } });
8
+ var person_service_1 = require("./person.service");
9
+ Object.defineProperty(exports, "PersonService", { enumerable: true, get: function () { return person_service_1.PersonService; } });
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/person/index.ts"],"names":[],"mappings":";;;AAAA,0DAAgD;AAAxC,uGAAA,MAAM,OAAA;AACd,iDAA6C;AAArC,6GAAA,YAAY,OAAA;AACpB,mDAA+C;AAAvC,+GAAA,aAAa,OAAA"}
@@ -66,7 +66,7 @@ PersonController = __decorate([
66
66
  (0, common_1.UseGuards)((0, passport_1.AuthGuard)("jwt")),
67
67
  (0, swagger_1.ApiBearerAuth)(),
68
68
  (0, common_1.Controller)("person"),
69
- (0, swagger_1.ApiTags)("persons"),
69
+ (0, swagger_1.ApiTags)("Persons"),
70
70
  __metadata("design:paramtypes", [person_service_1.PersonService])
71
71
  ], PersonController);
72
72
  exports.PersonController = PersonController;
@@ -32,7 +32,7 @@ __decorate([
32
32
  ], EmailClientController.prototype, "verify", null);
33
33
  EmailClientController = __decorate([
34
34
  (0, swagger_1.ApiBearerAuth)(),
35
- (0, swagger_1.ApiTags)("email-client"),
35
+ (0, swagger_1.ApiTags)("Email-client"),
36
36
  (0, common_1.UseGuards)((0, passport_1.AuthGuard)("jwt")),
37
37
  (0, common_1.Controller)("email-client"),
38
38
  __metadata("design:paramtypes", [email_client_service_1.SmtpEmailClient])
@@ -51,7 +51,7 @@ __decorate([
51
51
  ], StripeCheckoutController.prototype, "createCheckoutSession", null);
52
52
  StripeCheckoutController = __decorate([
53
53
  (0, common_1.Controller)("payments/stripe"),
54
- (0, swagger_1.ApiTags)("payments")
54
+ (0, swagger_1.ApiTags)("Payments")
55
55
  // eslint-disable-next-line @darraghor/nestjs-typed/injectable-should-be-provided
56
56
  ,
57
57
  __metadata("design:paramtypes", [stripe_checkout_service_1.StripeCheckoutService])
@@ -43,7 +43,7 @@ __decorate([
43
43
  ], StripeCustomerPortalController.prototype, "createCustomerPortalSession", null);
44
44
  StripeCustomerPortalController = __decorate([
45
45
  (0, common_1.Controller)("payments/stripe"),
46
- (0, swagger_1.ApiTags)("payments"),
46
+ (0, swagger_1.ApiTags)("Payments"),
47
47
  __metadata("design:paramtypes", [stripe_checkout_service_1.StripeCheckoutService])
48
48
  ], StripeCustomerPortalController);
49
49
  exports.StripeCustomerPortalController = StripeCustomerPortalController;
@@ -47,7 +47,7 @@ __decorate([
47
47
  ], StripeUnauthenticatedCheckoutController.prototype, "createCheckoutSession", null);
48
48
  StripeUnauthenticatedCheckoutController = __decorate([
49
49
  (0, common_1.Controller)("payments/stripe"),
50
- (0, swagger_1.ApiTags)("payments")
50
+ (0, swagger_1.ApiTags)("Payments")
51
51
  // eslint-disable-next-line @darraghor/nestjs-typed/injectable-should-be-provided
52
52
  ,
53
53
  __metadata("design:paramtypes", [stripe_checkout_service_1.StripeCheckoutService])
@@ -45,7 +45,7 @@ __decorate([
45
45
  ], StripeWebhookController.prototype, "webhookReceiver", null);
46
46
  StripeWebhookController = __decorate([
47
47
  (0, common_1.Controller)("payments/stripe"),
48
- (0, swagger_1.ApiTags)("payments"),
48
+ (0, swagger_1.ApiTags)("Payments"),
49
49
  __metadata("design:paramtypes", [stripe_webhook_handler_service_1.StripeWebhookHandler])
50
50
  ], StripeWebhookController);
51
51
  exports.StripeWebhookController = StripeWebhookController;
@@ -96,6 +96,14 @@ let StripeEventHandler = class StripeEventHandler {
96
96
  // Store the status in your database and check when a user accesses your service.
97
97
  // This approach helps you avoid hitting rate limits.
98
98
  // e.g. set the billing status as paid until the next billing cycle + 1 or 2 days for grace period
99
+ // get the subscription via the invoice.subscription property
100
+ /*
101
+ get an instance of the OrganisationSubscriptionService and save a new record. this will be checked later
102
+
103
+
104
+ use the subscription.current_period_end + 2 days as the next valid to.
105
+ End of the current period that the subscription has been invoiced for. At the end of this period, a new invoice will be created.
106
+ */
99
107
  return;
100
108
  }
101
109
  case "customer.subscription.trial_will_end": {
@@ -1 +1 @@
1
- {"version":3,"file":"stripe-event-handler.js","sourceRoot":"","sources":["../../../src/stripe-client/services/stripe-event-handler.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,mDAAmD;AACnD,2CAA0C;AAC1C,uCAMsB;AAEtB,uFAA+D;AAQxD,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IACE;IAA7B,YAA6B,MAAyB;QAAzB,WAAM,GAAN,MAAM,CAAmB;IAAG,CAAC;IAE1D,OAAO,CAAC,GAAsB,EAAE,KAAY;QACxC,IAAI,CAAC,MAAM,CAAC,KAAK;QACb,0KAA0K;QAC1K,cAAc,GAAG,CAAC,EAAE,YAAY,GAAG,CAAC,IAAI,KAAK,KAAK,CAAC,OAAc,EAAE;QACnE,sEAAsE;QACtE,EAAC,UAAU,EAAE,KAAK,EAAC,CACtB,CAAC;IACN,CAAC;IAGD,0DAA0D;IAC1D,QAAQ,CAAC,GAAsB;QAC3B,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,cAAc,GAAG,CAAC,EAAE,YAAY,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC;IAChE,CAAC;IAGD,0DAA0D;IAC1D,UAAU,CAAC,GAAsB;QAC7B,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,iBAAiB,GAAG,CAAC,EAAE,YAAY,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC;IACnE,CAAC;IAED,4DAA4D;IAE/C,AAAN,KAAK,CAAC,WAAW,CAAC,GAAsB;QAC3C,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC;QAC3B,MAAM,SAAS,GAAG,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC;QAEhC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,sBAAsB,EAAE;YACpC,SAAS;YACT,eAAe,EAAE,GAAG,CAAC,IAAI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vIG;IAAC,IAAA,oBAAa,GAAE;;6CACuB,KAAK;;iDAO3C;AAED;IAAC,IAAA,oBAAa,GAAE;IAChB,0DAA0D;;;;;kDAGzD;AAED;IAAC,IAAA,uBAAgB,GAAE;IACnB,0DAA0D;;;;;oDAGzD;AAIY;IADZ,IAAA,cAAO,GAAE;;;;qDA+GT;AAxIQ,kBAAkB;IAL9B,IAAA,mBAAU,GAAE;IACZ,IAAA,gBAAS,EAAC,eAAe,CAAC;IAC3B,yEAAyE;IACzE,EAAE;IACF,iFAAiF;;qCAExC,2BAAiB;GAD7C,kBAAkB,CAyI9B;AAzIY,gDAAkB"}
1
+ {"version":3,"file":"stripe-event-handler.js","sourceRoot":"","sources":["../../../src/stripe-client/services/stripe-event-handler.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,mDAAmD;AACnD,2CAA0C;AAC1C,uCAMsB;AAEtB,uFAA+D;AAQxD,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IACE;IAA7B,YAA6B,MAAyB;QAAzB,WAAM,GAAN,MAAM,CAAmB;IAAG,CAAC;IAE1D,OAAO,CAAC,GAAsB,EAAE,KAAY;QACxC,IAAI,CAAC,MAAM,CAAC,KAAK;QACb,0KAA0K;QAC1K,cAAc,GAAG,CAAC,EAAE,YAAY,GAAG,CAAC,IAAI,KAAK,KAAK,CAAC,OAAc,EAAE;QACnE,sEAAsE;QACtE,EAAC,UAAU,EAAE,KAAK,EAAC,CACtB,CAAC;IACN,CAAC;IAGD,0DAA0D;IAC1D,QAAQ,CAAC,GAAsB;QAC3B,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,cAAc,GAAG,CAAC,EAAE,YAAY,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC;IAChE,CAAC;IAGD,0DAA0D;IAC1D,UAAU,CAAC,GAAsB;QAC7B,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,iBAAiB,GAAG,CAAC,EAAE,YAAY,GAAG,CAAC,IAAI,EAAE,CAAC,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AAO;aACV;YACD,KAAK,+BAA+B,CAAC,CAAC;gBAClC,6CAA6C;gBAC7C,OAAO;aACV;YACD,KAAK,+BAA+B,CAAC,CAAC;gBAClC;;;;;mBAKG;gBACH,OAAO;aACV;YAED,OAAO,CAAC,CAAC;gBACL,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,mCAAmC,EAAE;oBAClD,SAAS;oBACT,KAAK,EAAE,GAAG,CAAC,IAAI;oBACf,IAAI;iBACP,CAAC,CAAC;aACN;SACJ;IACL,CAAC;CACJ,CAAA;AAhJG;IAAC,IAAA,oBAAa,GAAE;;6CACuB,KAAK;;iDAO3C;AAED;IAAC,IAAA,oBAAa,GAAE;IAChB,0DAA0D;;;;;kDAGzD;AAED;IAAC,IAAA,uBAAgB,GAAE;IACnB,0DAA0D;;;;;oDAGzD;AAIY;IADZ,IAAA,cAAO,GAAE;;;;qDAwHT;AAjJQ,kBAAkB;IAL9B,IAAA,mBAAU,GAAE;IACZ,IAAA,gBAAS,EAAC,eAAe,CAAC;IAC3B,yEAAyE;IACzE,EAAE;IACF,iFAAiF;;qCAExC,2BAAiB;GAD7C,kBAAkB,CAkJ9B;AAlJY,gDAAkB"}
@@ -24,6 +24,7 @@ const stripe_checkout_event_entity_1 = require("./entities/stripe-checkout-event
24
24
  const stripe_webhook_handler_service_1 = require("./services/stripe-webhook-handler.service");
25
25
  const stripe_webhook_controller_1 = require("./controllers/stripe-webhook-controller");
26
26
  const stripe_customer_portal_controller_1 = require("./controllers/stripe-customer-portal-controller");
27
+ const organisation_subscriptions_module_1 = require("../organisation-subscriptions/organisation-subscriptions.module");
27
28
  let StripeAccountModule = class StripeAccountModule {
28
29
  };
29
30
  StripeAccountModule = __decorate([
@@ -32,6 +33,7 @@ StripeAccountModule = __decorate([
32
33
  config_1.ConfigModule.forFeature(StripeConfigurationVariables_1.default),
33
34
  typeorm_1.TypeOrmModule.forFeature([stripe_checkout_event_entity_1.StripeCheckoutEvent]),
34
35
  core_app_module_1.CoreModule,
36
+ organisation_subscriptions_module_1.OrganisationSubscriptionsModule,
35
37
  bull_1.BullModule.registerQueueAsync({
36
38
  name: "stripe-events",
37
39
  }),
@@ -1 +1 @@
1
- {"version":3,"file":"stripe-account.module.js","sourceRoot":"","sources":["../../src/stripe-client/stripe-account.module.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAsC;AACtC,4BAA0B;AAC1B,yFAAoF;AACpF,gFAAyE;AACzE,kGAA6D;AAC7D,2CAA4C;AAC5C,iEAAuD;AACvD,iEAA4D;AAC5D,uCAAwC;AACxC,6CAA8C;AAC9C,0FAA4E;AAC5E,8FAA+E;AAC/E,uFAAgF;AAChF,uGAA+F;AAoBxF,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;CAAG,CAAA;AAAtB,mBAAmB;IAlB/B,IAAA,eAAM,EAAC;QACJ,OAAO,EAAE;YACL,qBAAY,CAAC,UAAU,CAAC,sCAAe,CAAC;YACxC,uBAAa,CAAC,UAAU,CAAC,CAAC,kDAAmB,CAAC,CAAC;YAC/C,4BAAU;YACV,iBAAU,CAAC,kBAAkB,CAAC;gBAC1B,IAAI,EAAE,eAAe;aACxB,CAAC;SACL;QACD,SAAS,EAAE;YACP,2CAAoB;YACpB,mEAAgC;YAChC,+CAAqB;YACrB,qDAAoB;SACvB;QACD,OAAO,EAAE,CAAC,+CAAqB,EAAE,iBAAU,CAAC;QAC5C,WAAW,EAAE,CAAC,mDAAuB,EAAE,kEAA8B,CAAC;KACzE,CAAC;GACW,mBAAmB,CAAG;AAAtB,kDAAmB"}
1
+ {"version":3,"file":"stripe-account.module.js","sourceRoot":"","sources":["../../src/stripe-client/stripe-account.module.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAsC;AACtC,4BAA0B;AAC1B,yFAAoF;AACpF,gFAAyE;AACzE,kGAA6D;AAC7D,2CAA4C;AAC5C,iEAAuD;AACvD,iEAA4D;AAC5D,uCAAwC;AACxC,6CAA8C;AAC9C,0FAA4E;AAC5E,8FAA+E;AAC/E,uFAAgF;AAChF,uGAA+F;AAC/F,uHAAgH;AAqBzG,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;CAAG,CAAA;AAAtB,mBAAmB;IAnB/B,IAAA,eAAM,EAAC;QACJ,OAAO,EAAE;YACL,qBAAY,CAAC,UAAU,CAAC,sCAAe,CAAC;YACxC,uBAAa,CAAC,UAAU,CAAC,CAAC,kDAAmB,CAAC,CAAC;YAC/C,4BAAU;YACV,mEAA+B;YAC/B,iBAAU,CAAC,kBAAkB,CAAC;gBAC1B,IAAI,EAAE,eAAe;aACxB,CAAC;SACL;QACD,SAAS,EAAE;YACP,2CAAoB;YACpB,mEAAgC;YAChC,+CAAqB;YACrB,qDAAoB;SACvB;QACD,OAAO,EAAE,CAAC,+CAAqB,EAAE,iBAAU,CAAC;QAC5C,WAAW,EAAE,CAAC,mDAAuB,EAAE,kEAA8B,CAAC;KACzE,CAAC;GACW,mBAAmB,CAAG;AAAtB,kDAAmB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@darraghor/nest-backend-libs",
3
- "version": "2.13.0",
3
+ "version": "2.14.0",
4
4
  "license": "SEE LICENSE IN LICENSE.md",
5
5
  "description": "Some helpers for personal projects in nestjs",
6
6
  "homepage": "https://github.com/darraghoriordan/nest-backend-libs",