@darraghor/nest-backend-libs 2.28.0 → 2.30.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/authorization/strategies/authzstrategy.js +3 -0
- package/dist/authorization/strategies/authzstrategy.js.map +1 -1
- package/dist/organisation-subscriptions/organisation-subscriptions.controller.js +4 -1
- package/dist/organisation-subscriptions/organisation-subscriptions.controller.js.map +1 -1
- package/dist/root-app/core-app.module.js +6 -2
- package/dist/root-app/core-app.module.js.map +1 -1
- package/dist/super-powers/{dosabled-super-powers.service.js → disabled-super-powers.service.js} +1 -1
- package/dist/super-powers/{dosabled-super-powers.service.js.map → disabled-super-powers.service.js.map} +1 -1
- package/dist/super-powers/spService.provider.d.ts +1 -1
- package/dist/super-powers/spService.provider.js +1 -1
- package/dist/user-api-key/user-apikey.controller.js +8 -1
- package/dist/user-api-key/user-apikey.controller.js.map +1 -1
- package/package.json +1 -1
- /package/dist/super-powers/{dosabled-super-powers.service.d.ts → disabled-super-powers.service.d.ts} +0 -0
|
@@ -42,6 +42,9 @@ let JwtStrategy = JwtStrategy_1 = class JwtStrategy extends PassportStrategy(Str
|
|
|
42
42
|
}
|
|
43
43
|
const invitationId = request.query.invitationId;
|
|
44
44
|
const userResult = await this.userValidationService.validateUser(payload, rawAccessToken, invitationId);
|
|
45
|
+
if (!userResult?.id) {
|
|
46
|
+
throw new Error("Unable to authenticate and register a valid user with this auth0 user");
|
|
47
|
+
}
|
|
45
48
|
const withPermissions = { permissions: payload.permissions || [] };
|
|
46
49
|
// eslint-disable-next-line sonarjs/prefer-immediate-return
|
|
47
50
|
const rp = { ...userResult, ...withPermissions };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authzstrategy.js","sourceRoot":"","sources":["../../../src/authorization/strategies/authzstrategy.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,OAAO,EAAC,UAAU,EAAE,MAAM,EAAC,MAAM,gBAAgB,CAAC;AAClD,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CAAC,QAAQ,CACV,OAAgB,EAChB,OAAoB;QAEpB,MAAM,cAAc,GAChB,UAAU,CAAC,2BAA2B,EAAE,CAAC,OAAO,CAAC,CAAC;QACtD,IAAI,cAAc,KAAK,SAAS,IAAI,cAAc,KAAK,IAAI,EAAE;YACzD,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,mCAAmC,CAAC,CAAC;YACvD,OAAO;SACV;QAED,MAAM,YAAY,GAAG,OAAO,CAAC,KAAK,CAAC,YAAsB,CAAC;QAE1D,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,YAAY,CAC5D,OAAO,EACP,cAAc,EACd,YAAY,CACf,CAAC;QACF,IAAI,CAAC,UAAU,EAAE,EAAE,EAAE;YACjB,MAAM,IAAI,KAAK,CACX,uEAAuE,CAC1E,CAAC;SACL;QAED,MAAM,eAAe,GAAG,EAAC,WAAW,EAAE,OAAO,CAAC,WAAW,IAAI,EAAE,EAAC,CAAC;QACjE,2DAA2D;QAC3D,MAAM,EAAE,GAAG,EAAC,GAAG,UAAU,EAAE,GAAG,eAAe,EAAgB,CAAC;QAC9D,OAAO,EAAE,CAAC;IACd,CAAC;CACJ,CAAA;AAnDY,WAAW;IADvB,UAAU,EAAE;qCAImC,qBAAqB;QACrD,wBAAwB;GAJ3B,WAAW,CAmDvB;SAnDY,WAAW"}
|
|
@@ -11,13 +11,15 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
11
11
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
12
|
};
|
|
13
13
|
/* eslint-disable sonarjs/no-duplicate-string */
|
|
14
|
-
import { Controller, Request, Param, Get, Post, Body, Delete, } from "@nestjs/common";
|
|
14
|
+
import { Controller, Request, Param, Get, Post, Body, Delete, UseGuards, } from "@nestjs/common";
|
|
15
15
|
import { ApiBearerAuth, ApiOkResponse, ApiTags } from "@nestjs/swagger";
|
|
16
16
|
import { OrganisationSubscriptionRecord } from "./entities/organisation-subscription.entity.js";
|
|
17
17
|
import { OrganisationSubscriptionService } from "./organisation-subscriptions.service.js";
|
|
18
18
|
import { SaveOrganisationSubscriptionRecordDto } from "./models/fulfillSubscriptionDto.js";
|
|
19
19
|
import { BooleanResult } from "../root-app/models/boolean-result.js";
|
|
20
20
|
import { MandatoryUserClaims } from "../authorization/guards/MandatoryUserClaims.decorator.js";
|
|
21
|
+
import { DefaultAuthGuard } from "../authorization/guards/DefaultAuthGuard.js";
|
|
22
|
+
import { ClaimsAuthorisationGuard } from "../authorization/guards/ClaimsAuthorisationGuard.js";
|
|
21
23
|
let OrganisationSubscriptionsController = class OrganisationSubscriptionsController {
|
|
22
24
|
osrService;
|
|
23
25
|
constructor(osrService) {
|
|
@@ -65,6 +67,7 @@ __decorate([
|
|
|
65
67
|
], OrganisationSubscriptionsController.prototype, "deleteSubscription", null);
|
|
66
68
|
OrganisationSubscriptionsController = __decorate([
|
|
67
69
|
ApiBearerAuth(),
|
|
70
|
+
UseGuards(DefaultAuthGuard, ClaimsAuthorisationGuard),
|
|
68
71
|
Controller("organisation/:orgId/subscriptions"),
|
|
69
72
|
ApiTags("Organisation Subscriptions"),
|
|
70
73
|
__metadata("design:paramtypes", [OrganisationSubscriptionService])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organisation-subscriptions.controller.js","sourceRoot":"","sources":["../../src/organisation-subscriptions/organisation-subscriptions.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,gDAAgD;AAChD,OAAO,EACH,UAAU,EACV,OAAO,EACP,KAAK,EACL,GAAG,EACH,IAAI,EACJ,IAAI,EACJ,MAAM,
|
|
1
|
+
{"version":3,"file":"organisation-subscriptions.controller.js","sourceRoot":"","sources":["../../src/organisation-subscriptions/organisation-subscriptions.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,gDAAgD;AAChD,OAAO,EACH,UAAU,EACV,OAAO,EACP,KAAK,EACL,GAAG,EACH,IAAI,EACJ,IAAI,EACJ,MAAM,EACN,S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AEnD,WAAA,KAAK,CAAC,OAAO,CAAC,CAAA;IACd,WAAA,OAAO,EAAE,CAAA;;;;kEAGb;AAKK;IAHL,mBAAmB,CAAC,YAAY,CAAC;IACjC,IAAI,EAAE;IACN,aAAa,CAAC,EAAC,IAAI,EAAE,CAAC,8BAA8B,CAAC,EAAC,CAAC;IAEnD,WAAA,KAAK,CAAC,OAAO,CAAC,CAAA;IACd,WAAA,IAAI,EAAE,CAAA;;6CAAO,qCAAqC;;0EAGtD;AAKK;IAHL,mBAAmB,CAAC,YAAY,CAAC;IACjC,MAAM,CAAC,OAAO,CAAC;IACf,aAAa,CAAC,EAAC,IAAI,EAAE,aAAa,EAAC,CAAC;IAEhC,WAAA,KAAK,CAAC,OAAO,CAAC,CAAA;IACd,WAAA,KAAK,CAAC,MAAM,CAAC,CAAA;;;;6EAIjB;AA/BQ,mCAAmC;IAJ/C,aAAa,EAAE;IACf,SAAS,CAAC,gBAAgB,EAAE,wBAAwB,CAAC;IACrD,UAAU,CAAC,mCAAmC,CAAC;IAC/C,OAAO,CAAC,4BAA4B,CAAC;qCAEO,+BAA+B;GAD/D,mCAAmC,CAgC/C;SAhCY,mCAAmC"}
|
|
@@ -35,14 +35,18 @@ let CoreModule = class CoreModule {
|
|
|
35
35
|
bodyParser: true,
|
|
36
36
|
rawBody: true,
|
|
37
37
|
bufferLogs: true,
|
|
38
|
-
snapshot: true,
|
|
39
38
|
});
|
|
40
39
|
const loggerService = app.get(Logger);
|
|
41
40
|
const configService = app.get(CoreConfigurationService);
|
|
42
41
|
app.useLogger(loggerService);
|
|
43
42
|
app.flushLogs();
|
|
44
43
|
app.use(helmet());
|
|
45
|
-
app.enableCors({
|
|
44
|
+
app.enableCors({
|
|
45
|
+
origin: [
|
|
46
|
+
configService.frontEndAppUrl,
|
|
47
|
+
configService.marketingAppUrl,
|
|
48
|
+
],
|
|
49
|
+
});
|
|
46
50
|
app.useGlobalPipes(new ValidationPipe({
|
|
47
51
|
transform: true,
|
|
48
52
|
skipMissingProperties: false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-app.module.js","sourceRoot":"","sources":["../../src/root-app/core-app.module.ts"],"names":[],"mappings":";;;;;;AAAA,sDAAsD;AACtD,+DAA+D;AAC/D,4DAA4D;AAC5D,OAAO,kBAAkB,CAAC;AAC1B,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EACH,0BAA0B,EAE1B,MAAM,EAEN,cAAc,GACjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAC,MAAM,EAAE,YAAY,EAAC,MAAM,aAAa,CAAC;AACjD,OAAO,EAAC,aAAa,EAAC,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAC,UAAU,EAAC,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAC,UAAU,EAAC,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAC,WAAW,EAAE,SAAS,EAAC,MAAM,cAAc,CAAC;AACpD,OAAO,EAAC,wBAAwB,EAAC,MAAM,4CAA4C,CAAC;AACpF,OAAO,EAAC,gBAAgB,EAAC,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AACxC,OAAO,EAAC,YAAY,EAAC,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAC,YAAY,IAAI,mBAAmB,EAAC,MAAM,4BAA4B,CAAC;AAC/E,OAAO,EAAC,2BAA2B,EAAC,MAAM,0CAA0C,CAAC;AACrF,OAAO,EAAC,WAAW,EAAC,MAAM,kCAAkC,CAAC;AAmDtD,IAAM,UAAU,GAAhB,MAAM,UAAU;IACZ,MAAM,CAAC,eAAe;IACzB,gHAAgH;IAChH,UAAe,EACf,QAA+D;IAC/D,6DAA6D;IAC7D,OAAgC;QAEhC,KAAK,CAAC,KAAK,IAAI,EAAE;YACb,IAAI;gBACA,MAAM,GAAG,GAAG,MAAM,WAAW,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C,QAAQ,CAAC,IAAI,CAAC;4BAC3B,QAAQ,EAAE,QAAQ,CAAC,QAAQ;4BAC3B,oBAAoB,EAAE,CAAC;yBAC1B;qBACJ,CAAC;gBACN,CAAC;gBACD,MAAM,EAAE,CAAC,wBAAwB,CAAC;aACrC,CAAC;YACF,YAAY;YACZ,WAAW;SACd;QACD,WAAW,EAAE,CAAC,aAAa,CAAC;QAC5B,SAAS,EAAE,CAAC,UAAU,EAAE,UAAU,CAAC;QACnC,OAAO,EAAE,CAAC,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,CAAC;KAC/D,CAAC;GACW,UAAU,CA8DtB;SA9DY,UAAU"}
|
package/dist/super-powers/{dosabled-super-powers.service.js → disabled-super-powers.service.js}
RENAMED
|
@@ -16,4 +16,4 @@ DisabledSuperPowersService = __decorate([
|
|
|
16
16
|
// eslint-disable-next-line @darraghor/nestjs-typed/injectable-should-be-provided
|
|
17
17
|
], DisabledSuperPowersService);
|
|
18
18
|
export { DisabledSuperPowersService };
|
|
19
|
-
//# sourceMappingURL=
|
|
19
|
+
//# sourceMappingURL=disabled-super-powers.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"
|
|
1
|
+
{"version":3,"file":"disabled-super-powers.service.js","sourceRoot":"","sources":["../../src/super-powers/disabled-super-powers.service.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAC,eAAe,EAAC,MAAM,uBAAuB,CAAC;AAI/C,IAAM,0BAA0B,GAAhC,MAAM,0BAA0B;IACnC,aAAa;QACT,MAAM,IAAI,eAAe,CAAC,2BAA2B,CAAC,CAAC;IAC3D,CAAC;CACJ,CAAA;AAJY,0BAA0B;IAFtC,UAAU,EAAE;IACb,iFAAiF;GACpE,0BAA0B,CAItC;SAJY,0BAA0B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DisabledSuperPowersService } from "./
|
|
1
|
+
import { DisabledSuperPowersService } from "./disabled-super-powers.service.js";
|
|
2
2
|
import { SuperPowersService } from "./super-powers.service.js";
|
|
3
3
|
export declare const SpServiceProvider: {
|
|
4
4
|
provide: typeof SuperPowersService;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DisabledSuperPowersService } from "./
|
|
1
|
+
import { DisabledSuperPowersService } from "./disabled-super-powers.service.js";
|
|
2
2
|
import { SuperPowersService } from "./super-powers.service.js";
|
|
3
3
|
// not going to use config service just for this
|
|
4
4
|
// should consider changing some of these to
|
|
@@ -18,6 +18,7 @@ import { UserApiKeyService } from "./user-apikey.service.js";
|
|
|
18
18
|
import CreateApiKeyDto from "./CreateApiKeyDto.js";
|
|
19
19
|
import { ClaimsAuthorisationGuard } from "../authorization/guards/ClaimsAuthorisationGuard.js";
|
|
20
20
|
import { DefaultAuthGuard } from "../authorization/guards/DefaultAuthGuard.js";
|
|
21
|
+
import { MandatoryUserClaims } from "../authorization/guards/MandatoryUserClaims.decorator.js";
|
|
21
22
|
let UserApiKeyController = class UserApiKeyController {
|
|
22
23
|
apiKeyService;
|
|
23
24
|
constructor(apiKeyService) {
|
|
@@ -39,6 +40,7 @@ let UserApiKeyController = class UserApiKeyController {
|
|
|
39
40
|
};
|
|
40
41
|
__decorate([
|
|
41
42
|
Get(),
|
|
43
|
+
MandatoryUserClaims("read:all"),
|
|
42
44
|
ApiOkResponse({ type: UserApiKey, isArray: true }),
|
|
43
45
|
__param(0, Request()),
|
|
44
46
|
__metadata("design:type", Function),
|
|
@@ -46,7 +48,10 @@ __decorate([
|
|
|
46
48
|
__metadata("design:returntype", Promise)
|
|
47
49
|
], UserApiKeyController.prototype, "getAllForUser", null);
|
|
48
50
|
__decorate([
|
|
49
|
-
Put(":uuid")
|
|
51
|
+
Put(":uuid")
|
|
52
|
+
// eslint-disable-next-line sonarjs/no-duplicate-string
|
|
53
|
+
,
|
|
54
|
+
MandatoryUserClaims("modify:all"),
|
|
50
55
|
ApiOkResponse({ type: UserApiKey }),
|
|
51
56
|
__param(0, Param("uuid")),
|
|
52
57
|
__param(1, Request()),
|
|
@@ -56,6 +61,7 @@ __decorate([
|
|
|
56
61
|
], UserApiKeyController.prototype, "generateNewKey", null);
|
|
57
62
|
__decorate([
|
|
58
63
|
Post(),
|
|
64
|
+
MandatoryUserClaims("modify:all"),
|
|
59
65
|
ApiOkResponse({ type: UserApiKey }),
|
|
60
66
|
__param(0, Body()),
|
|
61
67
|
__param(1, Request()),
|
|
@@ -65,6 +71,7 @@ __decorate([
|
|
|
65
71
|
], UserApiKeyController.prototype, "update", null);
|
|
66
72
|
__decorate([
|
|
67
73
|
Delete(":uuid"),
|
|
74
|
+
MandatoryUserClaims("modify:all"),
|
|
68
75
|
ApiOkResponse({ type: BooleanResult }),
|
|
69
76
|
__param(0, Param("uuid")),
|
|
70
77
|
__param(1, Request()),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-apikey.controller.js","sourceRoot":"","sources":["../../src/user-api-key/user-apikey.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EACH,UAAU,EACV,OAAO,EACP,IAAI,EACJ,KAAK,EACL,MAAM,EACN,SAAS,EACT,GAAG,EACH,IAAI,EACJ,GAAG,GACN,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAC,aAAa,EAAE,aAAa,EAAE,OAAO,EAAC,MAAM,iBAAiB,CAAC;AAEtE,OAAO,EAAC,aAAa,EAAC,MAAM,sCAAsC,CAAC;AACnE,OAAO,EAAC,UAAU,EAAC,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAC,iBAAiB,EAAC,MAAM,0BAA0B,CAAC;AAC3D,OAAO,eAAe,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAC,wBAAwB,EAAC,MAAM,qDAAqD,CAAC;AAC7F,OAAO,EAAC,gBAAgB,EAAC,MAAM,6CAA6C,CAAC;
|
|
1
|
+
{"version":3,"file":"user-apikey.controller.js","sourceRoot":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pD,oBAAoB,CAoDhC;SApDY,oBAAoB"}
|
package/package.json
CHANGED
/package/dist/super-powers/{dosabled-super-powers.service.d.ts → disabled-super-powers.service.d.ts}
RENAMED
|
File without changes
|