@darraghor/nest-backend-libs 2.7.0 → 2.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/authz/AccessToken.js +1 -2
- package/dist/authz/AuthConfigurationService.js +12 -15
- package/dist/authz/AuthConfigurationService.js.map +1 -1
- package/dist/authz/AuthConfigurationVariables.js +2 -4
- package/dist/authz/AuthConfigurationVariables.js.map +1 -1
- package/dist/authz/ClaimsAuthorisationGuard.js +7 -13
- package/dist/authz/ClaimsAuthorisationGuard.js.map +1 -1
- package/dist/authz/DefaultAuthGuard.js +5 -8
- package/dist/authz/DefaultAuthGuard.js.map +1 -1
- package/dist/authz/MandatoryUserClaims.decorator.js +2 -6
- package/dist/authz/MandatoryUserClaims.decorator.js.map +1 -1
- package/dist/authz/RequestWithUser.js +1 -2
- package/dist/authz/authz.module.js +17 -23
- package/dist/authz/authz.module.js.map +1 -1
- package/dist/authz/authzstrategy.js +16 -22
- package/dist/authz/authzstrategy.js.map +1 -1
- package/dist/authzclient/AuthClientConfigurationService.js +10 -13
- package/dist/authzclient/AuthClientConfigurationService.js.map +1 -1
- package/dist/authzclient/AuthClientConfigurationVariables.js +2 -4
- package/dist/authzclient/AuthClientConfigurationVariables.js.map +1 -1
- package/dist/authzclient/AuthzClientProvider.js +5 -8
- package/dist/authzclient/AuthzClientProvider.js.map +1 -1
- package/dist/authzclient/UserProfile.dto.js +1 -5
- package/dist/authzclient/UserProfile.dto.js.map +1 -1
- package/dist/authzclient/authz-client.module.js +13 -19
- package/dist/authzclient/authz-client.module.js.map +1 -1
- package/dist/authzclient/authz.service.js +8 -14
- package/dist/authzclient/authz.service.js.map +1 -1
- package/dist/cli/cli.js +7 -12
- package/dist/cli/cli.js.map +1 -1
- package/dist/cli/commands/WriteApiClientCommand.d.ts +3 -0
- package/dist/cli/commands/WriteApiClientCommand.js +17 -14
- package/dist/cli/commands/WriteApiClientCommand.js.map +1 -1
- package/dist/cli/commands/WriteTypeOrmConfigCommand.js +11 -18
- package/dist/cli/commands/WriteTypeOrmConfigCommand.js.map +1 -1
- package/dist/configuration/ValidatedConfigurationService.js +5 -8
- package/dist/configuration/ValidatedConfigurationService.js.map +1 -1
- package/dist/core-config/CoreConfig.module.js +9 -15
- package/dist/core-config/CoreConfig.module.js.map +1 -1
- package/dist/core-config/CoreConfigurationService.js +22 -25
- package/dist/core-config/CoreConfigurationService.js.map +1 -1
- package/dist/core-config/CoreConfigurationVariables.js +2 -4
- package/dist/core-config/CoreConfigurationVariables.js.map +1 -1
- package/dist/database-postgres/PostgresDatabase.module.js +11 -14
- package/dist/database-postgres/PostgresDatabase.module.js.map +1 -1
- package/dist/database-postgres/PostgresDatabaseConfigurationService.js +5 -8
- package/dist/database-postgres/PostgresDatabaseConfigurationService.js.map +1 -1
- package/dist/database-postgres/PostgresTypeOrmConfigurationProvider.js +5 -12
- package/dist/database-postgres/PostgresTypeOrmConfigurationProvider.js.map +1 -1
- package/dist/database-sqlite/SqliteDatabase.module.js +11 -14
- package/dist/database-sqlite/SqliteDatabase.module.js.map +1 -1
- package/dist/database-sqlite/SqliteDatabaseConfigurationService.js +5 -8
- package/dist/database-sqlite/SqliteDatabaseConfigurationService.js.map +1 -1
- package/dist/database-sqlite/SqliteTypeOrmConfigurationProvider.js +5 -12
- package/dist/database-sqlite/SqliteTypeOrmConfigurationProvider.js.map +1 -1
- package/dist/index.js +30 -64
- package/dist/index.js.map +1 -1
- package/dist/invitations/InvitationConfigurationService.js +10 -13
- package/dist/invitations/InvitationConfigurationService.js.map +1 -1
- package/dist/invitations/InvitationConfigurationVariables.js +2 -4
- package/dist/invitations/InvitationConfigurationVariables.js.map +1 -1
- package/dist/invitations/dto/create-invitation.dto.js +5 -9
- package/dist/invitations/dto/create-invitation.dto.js.map +1 -1
- package/dist/invitations/entities/invitation.entity.js +30 -33
- package/dist/invitations/entities/invitation.entity.js.map +1 -1
- package/dist/invitations/invitation.controller.js +21 -24
- package/dist/invitations/invitation.controller.js.map +1 -1
- package/dist/invitations/invitation.module.js +21 -27
- package/dist/invitations/invitation.module.js.map +1 -1
- package/dist/invitations/invitation.service.js +18 -21
- package/dist/invitations/invitation.service.js.map +1 -1
- package/dist/logger/CoreLoggerService.js +7 -9
- package/dist/logger/CoreLoggerService.js.map +1 -1
- package/dist/logger/LoggingConfigurationService.js +12 -15
- package/dist/logger/LoggingConfigurationService.js.map +1 -1
- package/dist/logger/LoggingConfigurationVariables.js +2 -4
- package/dist/logger/LoggingConfigurationVariables.js.map +1 -1
- package/dist/logger/LoggingInterceptor.js +7 -13
- package/dist/logger/LoggingInterceptor.js.map +1 -1
- package/dist/logger/logger.module.js +14 -20
- package/dist/logger/logger.module.js.map +1 -1
- package/dist/organisation/dto/RolesEnum.js +2 -5
- package/dist/organisation/dto/RolesEnum.js.map +1 -1
- package/dist/organisation/dto/create-organisation.dto.js +7 -11
- package/dist/organisation/dto/create-organisation.dto.js.map +1 -1
- package/dist/organisation/dto/update-organisation.dto.js +3 -7
- package/dist/organisation/dto/update-organisation.dto.js.map +1 -1
- package/dist/organisation/entities/member-role.entity.js +20 -23
- package/dist/organisation/entities/member-role.entity.js.map +1 -1
- package/dist/organisation/entities/organisation-membership.entity.js +37 -40
- package/dist/organisation/entities/organisation-membership.entity.js.map +1 -1
- package/dist/organisation/entities/organisation.entity.js +26 -29
- package/dist/organisation/entities/organisation.entity.js.map +1 -1
- package/dist/organisation/organisation.controller.js +29 -32
- package/dist/organisation/organisation.controller.js.map +1 -1
- package/dist/organisation/organisation.module.js +12 -15
- package/dist/organisation/organisation.module.js.map +1 -1
- package/dist/organisation/organisation.service.js +20 -23
- package/dist/organisation/organisation.service.js.map +1 -1
- package/dist/person/dto/create-person.dto.js +1 -5
- package/dist/person/dto/create-person.dto.js.map +1 -1
- package/dist/person/dto/update-person.dto.js +3 -7
- package/dist/person/dto/update-person.dto.js.map +1 -1
- package/dist/person/entities/person.entity.js +41 -44
- package/dist/person/entities/person.entity.js.map +1 -1
- package/dist/person/person.controller.js +25 -28
- package/dist/person/person.controller.js.map +1 -1
- package/dist/person/person.module.js +15 -18
- package/dist/person/person.module.js.map +1 -1
- package/dist/person/person.service.js +22 -28
- package/dist/person/person.service.js.map +1 -1
- package/dist/root-app/SwaggerGen.js +15 -21
- package/dist/root-app/SwaggerGen.js.map +1 -1
- package/dist/root-app/app.controller.js +17 -23
- package/dist/root-app/app.controller.js.map +1 -1
- package/dist/root-app/app.service.js +3 -6
- package/dist/root-app/app.service.js.map +1 -1
- package/dist/root-app/core-app.module.js +26 -32
- package/dist/root-app/core-app.module.js.map +1 -1
- package/dist/root-app/notfound.interceptor.js +6 -9
- package/dist/root-app/notfound.interceptor.js.map +1 -1
- package/dist/runningCommandLine/CliCommandService.js +8 -14
- package/dist/runningCommandLine/CliCommandService.js.map +1 -1
- package/dist/runningCommandLine/RunningCommandLine.module.js +9 -12
- package/dist/runningCommandLine/RunningCommandLine.module.js.map +1 -1
- package/dist/smtp-email-client/EmailClientProvider.js +5 -8
- package/dist/smtp-email-client/EmailClientProvider.js.map +1 -1
- package/dist/smtp-email-client/EmailConfigurationService.js +24 -27
- package/dist/smtp-email-client/EmailConfigurationService.js.map +1 -1
- package/dist/smtp-email-client/EmailConfigurationVariables.js +2 -4
- package/dist/smtp-email-client/EmailConfigurationVariables.js.map +1 -1
- package/dist/smtp-email-client/email-client.service.js +15 -21
- package/dist/smtp-email-client/email-client.service.js.map +1 -1
- package/dist/smtp-email-client/email.controller.js +12 -15
- package/dist/smtp-email-client/email.controller.js.map +1 -1
- package/dist/smtp-email-client/email.entity.js +32 -35
- package/dist/smtp-email-client/email.entity.js.map +1 -1
- package/dist/smtp-email-client/smtp-email-client.module.js +26 -32
- package/dist/smtp-email-client/smtp-email-client.module.js.map +1 -1
- package/dist/smtp-email-client/smtp-email-handler.js +15 -21
- package/dist/smtp-email-client/smtp-email-handler.js.map +1 -1
- package/dist/stripe-client/StripeClientConfigurationService.js +14 -17
- package/dist/stripe-client/StripeClientConfigurationService.js.map +1 -1
- package/dist/stripe-client/StripeClientProvider.js +5 -11
- package/dist/stripe-client/StripeClientProvider.js.map +1 -1
- package/dist/stripe-client/StripeConfigurationVariables.js +2 -4
- package/dist/stripe-client/StripeConfigurationVariables.js.map +1 -1
- package/dist/stripe-client/models/StripeCheckoutSessionParams.js +19 -24
- package/dist/stripe-client/models/StripeCheckoutSessionParams.js.map +1 -1
- package/dist/stripe-client/services/stripe-checkout.service.js +10 -16
- package/dist/stripe-client/services/stripe-checkout.service.js.map +1 -1
- package/dist/stripe-client/services/stripe-event-handler.js +12 -18
- package/dist/stripe-client/services/stripe-event-handler.js.map +1 -1
- package/dist/stripe-client/services/stripe-webhook-handler.service.js +13 -19
- package/dist/stripe-client/services/stripe-webhook-handler.service.js.map +1 -1
- package/dist/stripe-client/stripe-account.module.js +22 -28
- package/dist/stripe-client/stripe-account.module.js.map +1 -1
- package/dist/stripe-client/stripe-controller.js +27 -30
- package/dist/stripe-client/stripe-controller.js.map +1 -1
- package/dist/testing/preRun.js +1 -3
- package/dist/testing/preRun.js.map +1 -1
- package/dist/twitter-client/TwitterClientConfigurationService.js +16 -19
- package/dist/twitter-client/TwitterClientConfigurationService.js.map +1 -1
- package/dist/twitter-client/TwitterClientProvider.js +5 -8
- package/dist/twitter-client/TwitterClientProvider.js.map +1 -1
- package/dist/twitter-client/TwitterConfigurationVariables.js +2 -4
- package/dist/twitter-client/TwitterConfigurationVariables.js.map +1 -1
- package/dist/twitter-client/services/twitter-client.service.js +8 -14
- package/dist/twitter-client/services/twitter-client.service.js.map +1 -1
- package/dist/twitter-client/twitter-account.module.js +15 -21
- package/dist/twitter-client/twitter-account.module.js.map +1 -1
- package/package.json +1 -1
- package/dist/database-postgres/write-typeorm-config.d.ts +0 -2
- package/dist/database-postgres/write-typeorm-config.js +0 -14
- package/dist/database-postgres/write-typeorm-config.js.map +0 -1
- package/dist/database-sqlite/write-typeorm-config.d.ts +0 -1
- package/dist/database-sqlite/write-typeorm-config.js +0 -13
- package/dist/database-sqlite/write-typeorm-config.js.map +0 -1
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
2
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
3
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -8,12 +7,10 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
9
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const invitation_entity_1 = require("../../invitations/entities/invitation.entity");
|
|
16
|
-
const organisation_membership_entity_1 = require("./organisation-membership.entity");
|
|
10
|
+
import { ApiProperty } from "@nestjs/swagger";
|
|
11
|
+
import { AfterInsert, AfterLoad, AfterUpdate, Column, CreateDateColumn, DeleteDateColumn, Entity, Generated, Index, OneToMany, PrimaryGeneratedColumn, UpdateDateColumn, } from "typeorm";
|
|
12
|
+
import { Invitation } from "../../invitations/entities/invitation.entity";
|
|
13
|
+
import { OrganisationMembership } from "./organisation-membership.entity";
|
|
17
14
|
let Organisation = class Organisation {
|
|
18
15
|
id;
|
|
19
16
|
uuid;
|
|
@@ -31,65 +28,65 @@ let Organisation = class Organisation {
|
|
|
31
28
|
}
|
|
32
29
|
};
|
|
33
30
|
__decorate([
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
PrimaryGeneratedColumn(),
|
|
32
|
+
ApiProperty(),
|
|
36
33
|
__metadata("design:type", Number)
|
|
37
34
|
], Organisation.prototype, "id", void 0);
|
|
38
35
|
__decorate([
|
|
39
|
-
|
|
36
|
+
Column("uuid", {
|
|
40
37
|
name: "uuid",
|
|
41
38
|
default: () => "uuid_generate_v4()",
|
|
42
39
|
}),
|
|
43
|
-
|
|
44
|
-
|
|
40
|
+
Generated("uuid"),
|
|
41
|
+
ApiProperty(),
|
|
45
42
|
__metadata("design:type", String)
|
|
46
43
|
], Organisation.prototype, "uuid", void 0);
|
|
47
44
|
__decorate([
|
|
48
|
-
|
|
45
|
+
OneToMany(() => OrganisationMembership, (om) => om.organisation, {
|
|
49
46
|
eager: true,
|
|
50
47
|
cascade: ["insert", "update"],
|
|
51
48
|
}),
|
|
52
|
-
|
|
49
|
+
Index(),
|
|
53
50
|
__metadata("design:type", Array)
|
|
54
51
|
], Organisation.prototype, "memberships", void 0);
|
|
55
52
|
__decorate([
|
|
56
|
-
|
|
53
|
+
OneToMany(() => Invitation, (om) => om.organisation, {
|
|
57
54
|
eager: true,
|
|
58
55
|
cascade: ["insert", "update"],
|
|
59
56
|
}),
|
|
60
|
-
|
|
57
|
+
Index(),
|
|
61
58
|
__metadata("design:type", Array)
|
|
62
59
|
], Organisation.prototype, "invitations", void 0);
|
|
63
60
|
__decorate([
|
|
64
|
-
|
|
65
|
-
|
|
61
|
+
Column(),
|
|
62
|
+
ApiProperty(),
|
|
66
63
|
__metadata("design:type", String)
|
|
67
64
|
], Organisation.prototype, "name", void 0);
|
|
68
65
|
__decorate([
|
|
69
|
-
|
|
70
|
-
|
|
66
|
+
CreateDateColumn(),
|
|
67
|
+
ApiProperty(),
|
|
71
68
|
__metadata("design:type", Date)
|
|
72
69
|
], Organisation.prototype, "createdDate", void 0);
|
|
73
70
|
__decorate([
|
|
74
|
-
|
|
75
|
-
|
|
71
|
+
UpdateDateColumn(),
|
|
72
|
+
ApiProperty(),
|
|
76
73
|
__metadata("design:type", Date)
|
|
77
74
|
], Organisation.prototype, "updateDate", void 0);
|
|
78
75
|
__decorate([
|
|
79
|
-
|
|
80
|
-
|
|
76
|
+
DeleteDateColumn(),
|
|
77
|
+
ApiProperty(),
|
|
81
78
|
__metadata("design:type", Date)
|
|
82
79
|
], Organisation.prototype, "deletedDate", void 0);
|
|
83
80
|
__decorate([
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
81
|
+
AfterLoad(),
|
|
82
|
+
AfterInsert(),
|
|
83
|
+
AfterUpdate(),
|
|
87
84
|
__metadata("design:type", Function),
|
|
88
85
|
__metadata("design:paramtypes", []),
|
|
89
86
|
__metadata("design:returntype", Promise)
|
|
90
87
|
], Organisation.prototype, "nullChecks", null);
|
|
91
88
|
Organisation = __decorate([
|
|
92
|
-
|
|
89
|
+
Entity()
|
|
93
90
|
], Organisation);
|
|
94
|
-
|
|
91
|
+
export { Organisation };
|
|
95
92
|
//# sourceMappingURL=organisation.entity.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organisation.entity.js","sourceRoot":"","sources":["../../../src/organisation/entities/organisation.entity.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"organisation.entity.js","sourceRoot":"","sources":["../../../src/organisation/entities/organisation.entity.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EACH,WAAW,EACX,SAAS,EACT,WAAW,EACX,MAAM,EACN,gBAAgB,EAChB,gBAAgB,EAChB,MAAM,EACN,SAAS,EACT,KAAK,EACL,SAAS,EACT,sBAAsB,EACtB,gBAAgB,GACnB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAC,UAAU,EAAC,MAAM,8CAA8C,CAAC;AACxE,OAAO,EAAC,sBAAsB,EAAC,MAAM,kCAAkC,CAAC;AAGjE,IAAM,YAAY,GAAlB,MAAM,YAAY;IAGrB,EAAE,CAAU;IAQL,IAAI,CAAU;IAOrB,WAAW,CAA4B;IAOvC,WAAW,CAAgB;IAI3B,IAAI,CAAU;IAId,WAAW,CAAQ;IAInB,UAAU,CAAQ;IAIlB,WAAW,CAAQ;IAEnB,4DAA4D;IAItD,AAAN,KAAK,CAAC,UAAU;QACZ,IAAI,CA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key, desc) {
|
|
3
2
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
3
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -11,14 +10,12 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
10
|
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
11
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
12
|
};
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
const organisation_entity_1 = require("./entities/organisation.entity");
|
|
21
|
-
const passport_1 = require("@nestjs/passport");
|
|
13
|
+
import { Controller, Get, Request, Body, Patch, Param, Delete, UseGuards, } from "@nestjs/common";
|
|
14
|
+
import { OrganisationService } from "./organisation.service";
|
|
15
|
+
import { UpdateOrganisationDto } from "./dto/update-organisation.dto";
|
|
16
|
+
import { ApiBearerAuth, ApiOkResponse, ApiTags } from "@nestjs/swagger";
|
|
17
|
+
import { Organisation } from "./entities/organisation.entity";
|
|
18
|
+
import { AuthGuard } from "@nestjs/passport";
|
|
22
19
|
let OrganisationController = class OrganisationController {
|
|
23
20
|
organisationService;
|
|
24
21
|
constructor(organisationService) {
|
|
@@ -43,47 +40,47 @@ let OrganisationController = class OrganisationController {
|
|
|
43
40
|
}
|
|
44
41
|
};
|
|
45
42
|
__decorate([
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
__param(0,
|
|
49
|
-
__param(1,
|
|
43
|
+
Get(":uuid"),
|
|
44
|
+
ApiOkResponse({ type: Organisation }),
|
|
45
|
+
__param(0, Param("uuid")),
|
|
46
|
+
__param(1, Request()),
|
|
50
47
|
__metadata("design:type", Function),
|
|
51
48
|
__metadata("design:paramtypes", [String, Object]),
|
|
52
49
|
__metadata("design:returntype", Promise)
|
|
53
50
|
], OrganisationController.prototype, "findOne", null);
|
|
54
51
|
__decorate([
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
__param(0,
|
|
52
|
+
Get(),
|
|
53
|
+
ApiOkResponse({ type: Organisation, isArray: true }),
|
|
54
|
+
__param(0, Request()),
|
|
58
55
|
__metadata("design:type", Function),
|
|
59
56
|
__metadata("design:paramtypes", [Object]),
|
|
60
57
|
__metadata("design:returntype", Promise)
|
|
61
58
|
], OrganisationController.prototype, "findAllForUser", null);
|
|
62
59
|
__decorate([
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
__param(0,
|
|
66
|
-
__param(1,
|
|
67
|
-
__param(2,
|
|
60
|
+
Patch(":uuid"),
|
|
61
|
+
ApiOkResponse({ type: Organisation }),
|
|
62
|
+
__param(0, Param("uuid")),
|
|
63
|
+
__param(1, Body()),
|
|
64
|
+
__param(2, Request()),
|
|
68
65
|
__metadata("design:type", Function),
|
|
69
|
-
__metadata("design:paramtypes", [String,
|
|
66
|
+
__metadata("design:paramtypes", [String, UpdateOrganisationDto, Object]),
|
|
70
67
|
__metadata("design:returntype", Promise)
|
|
71
68
|
], OrganisationController.prototype, "update", null);
|
|
72
69
|
__decorate([
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
__param(0,
|
|
76
|
-
__param(1,
|
|
70
|
+
Delete(":uuid"),
|
|
71
|
+
ApiOkResponse({ type: Organisation }),
|
|
72
|
+
__param(0, Param("uuid")),
|
|
73
|
+
__param(1, Request()),
|
|
77
74
|
__metadata("design:type", Function),
|
|
78
75
|
__metadata("design:paramtypes", [String, Object]),
|
|
79
76
|
__metadata("design:returntype", Promise)
|
|
80
77
|
], OrganisationController.prototype, "remove", null);
|
|
81
78
|
OrganisationController = __decorate([
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
__metadata("design:paramtypes", [
|
|
79
|
+
UseGuards(AuthGuard("jwt")),
|
|
80
|
+
ApiBearerAuth(),
|
|
81
|
+
Controller("organisation"),
|
|
82
|
+
ApiTags("organisations"),
|
|
83
|
+
__metadata("design:paramtypes", [OrganisationService])
|
|
87
84
|
], OrganisationController);
|
|
88
|
-
|
|
85
|
+
export { OrganisationController };
|
|
89
86
|
//# sourceMappingURL=organisation.controller.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organisation.controller.js","sourceRoot":"","sources":["../../src/organisation/organisation.controller.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"organisation.controller.js","sourceRoot":"","sources":["../../src/organisation/organisation.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EACH,UAAU,EACV,GAAG,EACH,OAAO,EACP,IAAI,EACJ,KAAK,EACL,KAAK,EACL,MAAM,EACN,SAAS,GACZ,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAC,mBAAmB,EAAC,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAC,qBAAqB,EAAC,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAC,aAAa,EAAE,aAAa,EAAE,OAAO,EAAC,MAAM,iBAAiB,CAAC;AACtE,OAAO,EAAC,YAAY,EAAC,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAC,SAAS,EAAC,MAAM,kBAAkB,CAAC;AAOpC,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IACF;IAA7B,YAA6B,mBAAwC;QAAxC,wBAAmB,GAAnB,mBAAmB,CAAqB;IAAG,CAAC;IAInE,AAAN,KAAK,CAAC,OAAO,CACM,IAAY,EAChB,OAAwB;QAEnC,OAAO,IAAI,CAAC,mBAAmB,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACnE,CAAC;IAED,4DAA4D;IAGtD,AAAN,KAAK,CAAC,cAAc,CACL,OAAwB;QAEnC,OAAO,IAAI,CAAC,mBAAmB,CAAC,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpE,CAAC;IAIK,AAAN,KA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AAE,CAAA;;;;oDAYb;AAnDQ,sBAAsB;IAJlC,SAAS,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IAC3B,aAAa,EAAE;IACf,UAAU,CAAC,cAAc,CAAC;IAC1B,OAAO,CAAC,eAAe,CAAC;qCAE6B,mBAAmB;GAD5D,sBAAsB,CAoDlC;SApDY,sBAAsB"}
|
|
@@ -1,27 +1,24 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
2
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
3
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
6
|
};
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const typeorm_1 = require("@nestjs/typeorm");
|
|
15
|
-
const organisation_entity_1 = require("./entities/organisation.entity");
|
|
7
|
+
import { Module } from "@nestjs/common";
|
|
8
|
+
import { OrganisationService } from "./organisation.service";
|
|
9
|
+
import { OrganisationController } from "./organisation.controller";
|
|
10
|
+
import { LoggerModule } from "../logger/logger.module";
|
|
11
|
+
import { TypeOrmModule } from "@nestjs/typeorm";
|
|
12
|
+
import { Organisation } from "./entities/organisation.entity";
|
|
16
13
|
let OrganisationModule = class OrganisationModule {
|
|
17
14
|
};
|
|
18
15
|
OrganisationModule = __decorate([
|
|
19
|
-
|
|
20
|
-
imports: [
|
|
21
|
-
controllers: [
|
|
22
|
-
providers: [
|
|
23
|
-
exports: [
|
|
16
|
+
Module({
|
|
17
|
+
imports: [LoggerModule, TypeOrmModule.forFeature([Organisation])],
|
|
18
|
+
controllers: [OrganisationController],
|
|
19
|
+
providers: [OrganisationService],
|
|
20
|
+
exports: [OrganisationService],
|
|
24
21
|
})
|
|
25
22
|
], OrganisationModule);
|
|
26
|
-
|
|
23
|
+
export { OrganisationModule };
|
|
27
24
|
//# sourceMappingURL=organisation.module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organisation.module.js","sourceRoot":"","sources":["../../src/organisation/organisation.module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"organisation.module.js","sourceRoot":"","sources":["../../src/organisation/organisation.module.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAC,mBAAmB,EAAC,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAC,sBAAsB,EAAC,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAC,YAAY,EAAC,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAC,YAAY,EAAC,MAAM,gCAAgC,CAAC;AAQrD,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;CAAG,CAAA;AAArB,kBAAkB;IAN9B,MAAM,CAAC;QACJ,OAAO,EAAE,CAAC,YAAY,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC;QACjE,WAAW,EAAE,CAAC,sBAAsB,CAAC;QACrC,SAAS,EAAE,CAAC,mBAAmB,CAAC;QAChC,OAAO,EAAE,CAAC,mBAAmB,CAAC;KACjC,CAAC;GACW,kBAAkB,CAAG;SAArB,kBAAkB"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
2
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
3
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -11,15 +10,13 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
10
|
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
11
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
12
|
};
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
const organisation_membership_entity_1 = require("./entities/organisation-membership.entity");
|
|
22
|
-
const organisation_entity_1 = require("./entities/organisation.entity");
|
|
13
|
+
import { Injectable } from "@nestjs/common";
|
|
14
|
+
import { InjectRepository } from "@nestjs/typeorm";
|
|
15
|
+
import { Repository } from "typeorm";
|
|
16
|
+
import { Roles } from "./dto/RolesEnum";
|
|
17
|
+
import { MembershipRole } from "./entities/member-role.entity";
|
|
18
|
+
import { OrganisationMembership } from "./entities/organisation-membership.entity";
|
|
19
|
+
import { Organisation } from "./entities/organisation.entity";
|
|
23
20
|
let OrganisationService = class OrganisationService {
|
|
24
21
|
repository;
|
|
25
22
|
constructor(repository) {
|
|
@@ -27,22 +24,22 @@ let OrganisationService = class OrganisationService {
|
|
|
27
24
|
}
|
|
28
25
|
async create(createOrganisationDto) {
|
|
29
26
|
// create a new organisation
|
|
30
|
-
const unsavedOrganisation = new
|
|
27
|
+
const unsavedOrganisation = new Organisation();
|
|
31
28
|
unsavedOrganisation.name = createOrganisationDto.name;
|
|
32
29
|
unsavedOrganisation.memberships = [];
|
|
33
30
|
// add the owner
|
|
34
|
-
const ownerMembership = new
|
|
31
|
+
const ownerMembership = new OrganisationMembership();
|
|
35
32
|
ownerMembership.person = createOrganisationDto.owner;
|
|
36
|
-
const ownerRole = new
|
|
37
|
-
ownerRole.name =
|
|
33
|
+
const ownerRole = new MembershipRole();
|
|
34
|
+
ownerRole.name = Roles.owner;
|
|
38
35
|
ownerMembership.roles.push(ownerRole);
|
|
39
36
|
unsavedOrganisation.memberships.push(ownerMembership);
|
|
40
37
|
// add all the others
|
|
41
38
|
const normalMemberships = createOrganisationDto.members.map((member) => {
|
|
42
|
-
const membership = new
|
|
39
|
+
const membership = new OrganisationMembership();
|
|
43
40
|
membership.person = member;
|
|
44
|
-
const memberRole = new
|
|
45
|
-
memberRole.name =
|
|
41
|
+
const memberRole = new MembershipRole();
|
|
42
|
+
memberRole.name = Roles.member;
|
|
46
43
|
membership.roles.push(memberRole);
|
|
47
44
|
return membership;
|
|
48
45
|
});
|
|
@@ -81,7 +78,7 @@ let OrganisationService = class OrganisationService {
|
|
|
81
78
|
id: currentUserId,
|
|
82
79
|
},
|
|
83
80
|
roles: {
|
|
84
|
-
name:
|
|
81
|
+
name: Roles.owner,
|
|
85
82
|
},
|
|
86
83
|
},
|
|
87
84
|
},
|
|
@@ -98,7 +95,7 @@ let OrganisationService = class OrganisationService {
|
|
|
98
95
|
id: currentUserId,
|
|
99
96
|
},
|
|
100
97
|
roles: {
|
|
101
|
-
name:
|
|
98
|
+
name: Roles.owner,
|
|
102
99
|
},
|
|
103
100
|
},
|
|
104
101
|
},
|
|
@@ -109,9 +106,9 @@ let OrganisationService = class OrganisationService {
|
|
|
109
106
|
}
|
|
110
107
|
};
|
|
111
108
|
OrganisationService = __decorate([
|
|
112
|
-
|
|
113
|
-
__param(0,
|
|
114
|
-
__metadata("design:paramtypes", [
|
|
109
|
+
Injectable(),
|
|
110
|
+
__param(0, InjectRepository(Organisation)),
|
|
111
|
+
__metadata("design:paramtypes", [Repository])
|
|
115
112
|
], OrganisationService);
|
|
116
|
-
|
|
113
|
+
export { OrganisationService };
|
|
117
114
|
//# sourceMappingURL=organisation.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organisation.service.js","sourceRoot":"","sources":["../../src/organisation/organisation.service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"organisation.service.js","sourceRoot":"","sources":["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,EAAE,qBAAqB,CAAC,CAAC;QAEzD,OAAO,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,EAAE,UAAU,CAAC,CAAC;IAC7D,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,IAAY,EAAE,aAAqB;QAC5C,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC;YACnD,KAAK,EAAE;gBACH,IAAI;gBACJ,WAAW,EAAE;oBACT,MAAM,EAAE;wBACJ,EAAE,EAAE,aAAa;qBACpB;oBACD,KAAK,EAAE;wBACH,IAAI,EAAE,KAAK,CAAC,KAAK;qBACpB;iBACJ;aACJ;SACJ,CAAC,CAAC;QAEH,OAAO,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC;YAC1B,EAAE,EAAE,UAAU,CAAC,EAAE;SACpB,CAAC,CAAC;IACP,CAAC;CACJ,CAAA;AA1GY,mBAAmB;IAD/B,UAAU,EAAE;IAGJ,WAAA,gBAAgB,CAAC,YAAY,CAAC,CAAA;qCACX,UAAU;GAHzB,mBAAmB,CA0G/B;SA1GY,mBAAmB"}
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CreatePersonDto = void 0;
|
|
4
|
-
class CreatePersonDto {
|
|
1
|
+
export class CreatePersonDto {
|
|
5
2
|
}
|
|
6
|
-
exports.CreatePersonDto = CreatePersonDto;
|
|
7
3
|
//# sourceMappingURL=create-person.dto.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-person.dto.js","sourceRoot":"","sources":["../../../src/person/dto/create-person.dto.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"create-person.dto.js","sourceRoot":"","sources":["../../../src/person/dto/create-person.dto.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,eAAe;CAAG"}
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const swagger_1 = require("@nestjs/swagger");
|
|
5
|
-
const create_person_dto_1 = require("./create-person.dto");
|
|
6
|
-
class UpdatePersonDto extends (0, swagger_1.PartialType)(create_person_dto_1.CreatePersonDto) {
|
|
1
|
+
import { PartialType } from "@nestjs/swagger";
|
|
2
|
+
import { CreatePersonDto } from "./create-person.dto";
|
|
3
|
+
export class UpdatePersonDto extends PartialType(CreatePersonDto) {
|
|
7
4
|
}
|
|
8
|
-
exports.UpdatePersonDto = UpdatePersonDto;
|
|
9
5
|
//# sourceMappingURL=update-person.dto.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-person.dto.js","sourceRoot":"","sources":["../../../src/person/dto/update-person.dto.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"update-person.dto.js","sourceRoot":"","sources":["../../../src/person/dto/update-person.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAC,eAAe,EAAC,MAAM,qBAAqB,CAAC;AAEpD,MAAM,OAAO,eAAgB,SAAQ,WAAW,CAAC,eAAe,CAAC;CAAG"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
2
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
3
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -8,12 +7,10 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
9
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const typeorm_1 = require("typeorm");
|
|
16
|
-
const organisation_membership_entity_1 = require("../../organisation/entities/organisation-membership.entity");
|
|
10
|
+
import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger";
|
|
11
|
+
import { Exclude } from "class-transformer";
|
|
12
|
+
import { AfterInsert, AfterLoad, AfterUpdate, Column, CreateDateColumn, DeleteDateColumn, Entity, Generated, Index, OneToMany, PrimaryGeneratedColumn, UpdateDateColumn, } from "typeorm";
|
|
13
|
+
import { OrganisationMembership } from "../../organisation/entities/organisation-membership.entity";
|
|
17
14
|
let Person = class Person {
|
|
18
15
|
id;
|
|
19
16
|
email;
|
|
@@ -38,97 +35,97 @@ let Person = class Person {
|
|
|
38
35
|
}
|
|
39
36
|
};
|
|
40
37
|
__decorate([
|
|
41
|
-
|
|
42
|
-
|
|
38
|
+
PrimaryGeneratedColumn(),
|
|
39
|
+
ApiProperty(),
|
|
43
40
|
__metadata("design:type", Number)
|
|
44
41
|
], Person.prototype, "id", void 0);
|
|
45
42
|
__decorate([
|
|
46
|
-
|
|
47
|
-
|
|
43
|
+
ApiProperty(),
|
|
44
|
+
Column(),
|
|
48
45
|
__metadata("design:type", String)
|
|
49
46
|
], Person.prototype, "email", void 0);
|
|
50
47
|
__decorate([
|
|
51
|
-
|
|
48
|
+
Column("uuid", {
|
|
52
49
|
name: "uuid",
|
|
53
50
|
default: () => "uuid_generate_v4()",
|
|
54
51
|
}),
|
|
55
|
-
|
|
56
|
-
|
|
52
|
+
Generated("uuid"),
|
|
53
|
+
ApiProperty(),
|
|
57
54
|
__metadata("design:type", String)
|
|
58
55
|
], Person.prototype, "uuid", void 0);
|
|
59
56
|
__decorate([
|
|
60
|
-
|
|
61
|
-
|
|
57
|
+
ApiProperty(),
|
|
58
|
+
Column({ default: false }),
|
|
62
59
|
__metadata("design:type", Boolean)
|
|
63
60
|
], Person.prototype, "emailVerified", void 0);
|
|
64
61
|
__decorate([
|
|
65
|
-
|
|
66
|
-
|
|
62
|
+
ApiProperty(),
|
|
63
|
+
Column({ default: false }),
|
|
67
64
|
__metadata("design:type", Boolean)
|
|
68
65
|
], Person.prototype, "blocked", void 0);
|
|
69
66
|
__decorate([
|
|
70
|
-
|
|
71
|
-
|
|
67
|
+
ApiPropertyOptional(),
|
|
68
|
+
Column({ nullable: true }),
|
|
72
69
|
__metadata("design:type", String)
|
|
73
70
|
], Person.prototype, "name", void 0);
|
|
74
71
|
__decorate([
|
|
75
|
-
|
|
76
|
-
|
|
72
|
+
ApiPropertyOptional(),
|
|
73
|
+
Column({ nullable: true }),
|
|
77
74
|
__metadata("design:type", String)
|
|
78
75
|
], Person.prototype, "familyName", void 0);
|
|
79
76
|
__decorate([
|
|
80
|
-
|
|
81
|
-
|
|
77
|
+
ApiPropertyOptional(),
|
|
78
|
+
Column({ nullable: true }),
|
|
82
79
|
__metadata("design:type", String)
|
|
83
80
|
], Person.prototype, "givenName", void 0);
|
|
84
81
|
__decorate([
|
|
85
|
-
|
|
86
|
-
|
|
82
|
+
ApiProperty(),
|
|
83
|
+
Column(),
|
|
87
84
|
__metadata("design:type", String)
|
|
88
85
|
], Person.prototype, "picture", void 0);
|
|
89
86
|
__decorate([
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
87
|
+
ApiProperty(),
|
|
88
|
+
Column(),
|
|
89
|
+
Index({ unique: true }),
|
|
93
90
|
__metadata("design:type", String)
|
|
94
91
|
], Person.prototype, "auth0UserId", void 0);
|
|
95
92
|
__decorate([
|
|
96
|
-
|
|
97
|
-
|
|
93
|
+
ApiPropertyOptional(),
|
|
94
|
+
Column({ nullable: true }),
|
|
98
95
|
__metadata("design:type", String)
|
|
99
96
|
], Person.prototype, "username", void 0);
|
|
100
97
|
__decorate([
|
|
101
|
-
|
|
102
|
-
|
|
98
|
+
Exclude(),
|
|
99
|
+
OneToMany(() => OrganisationMembership, (om) => om.person, {
|
|
103
100
|
cascade: ["insert", "update"],
|
|
104
101
|
}),
|
|
105
102
|
__metadata("design:type", Array)
|
|
106
103
|
], Person.prototype, "memberships", void 0);
|
|
107
104
|
__decorate([
|
|
108
|
-
|
|
109
|
-
|
|
105
|
+
CreateDateColumn(),
|
|
106
|
+
ApiProperty(),
|
|
110
107
|
__metadata("design:type", Date)
|
|
111
108
|
], Person.prototype, "createdDate", void 0);
|
|
112
109
|
__decorate([
|
|
113
|
-
|
|
114
|
-
|
|
110
|
+
UpdateDateColumn(),
|
|
111
|
+
ApiProperty(),
|
|
115
112
|
__metadata("design:type", Date)
|
|
116
113
|
], Person.prototype, "updateDate", void 0);
|
|
117
114
|
__decorate([
|
|
118
|
-
|
|
119
|
-
|
|
115
|
+
DeleteDateColumn(),
|
|
116
|
+
ApiProperty(),
|
|
120
117
|
__metadata("design:type", Date)
|
|
121
118
|
], Person.prototype, "deletedDate", void 0);
|
|
122
119
|
__decorate([
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
120
|
+
AfterLoad(),
|
|
121
|
+
AfterInsert(),
|
|
122
|
+
AfterUpdate(),
|
|
126
123
|
__metadata("design:type", Function),
|
|
127
124
|
__metadata("design:paramtypes", []),
|
|
128
125
|
__metadata("design:returntype", Promise)
|
|
129
126
|
], Person.prototype, "nullChecks", null);
|
|
130
127
|
Person = __decorate([
|
|
131
|
-
|
|
128
|
+
Entity()
|
|
132
129
|
], Person);
|
|
133
|
-
|
|
130
|
+
export { Person };
|
|
134
131
|
//# sourceMappingURL=person.entity.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"person.entity.js","sourceRoot":"","sources":["../../../src/person/entities/person.entity.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"person.entity.js","sourceRoot":"","sources":["../../../src/person/entities/person.entity.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAC,WAAW,EAAE,mBAAmB,EAAC,MAAM,iBAAiB,CAAC;AACjE,OAAO,EAAC,OAAO,EAAC,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EACH,WAAW,E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