@darraghor/nest-backend-libs 3.7.0 → 3.8.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.
@@ -1,10 +1,10 @@
1
1
  import { RequestWithUser } from "../authorization/models/RequestWithUser.js";
2
- import { AppService } from "./app.service.js";
2
+ import { AppService, HealthResponse } from "./app.service.js";
3
3
  export declare class AppController {
4
4
  private readonly appService;
5
5
  private readonly logger;
6
6
  constructor(appService: AppService);
7
- getHello(): string;
8
- getHelloAuthorized(request: RequestWithUser): string;
9
- getHelloSuperAdmin(request: RequestWithUser): string;
7
+ getHello(): HealthResponse;
8
+ getHelloAuthorized(request: RequestWithUser): HealthResponse;
9
+ getHelloSuperAdmin(request: RequestWithUser): HealthResponse;
10
10
  }
@@ -17,7 +17,7 @@ import { ApiBearerAuth, ApiOkResponse, ApiOperation, ApiTags, } from "@nestjs/sw
17
17
  import { ClaimsAuthorisationGuard } from "../authorization/guards/ClaimsAuthorisationGuard.js";
18
18
  import { DefaultAuthGuard } from "../authorization/guards/DefaultAuthGuard.js";
19
19
  import { MandatoryUserClaims } from "../index.js";
20
- import { AppService } from "./app.service.js";
20
+ import { AppService, HealthResponse } from "./app.service.js";
21
21
  let AppController = AppController_1 = class AppController {
22
22
  appService;
23
23
  logger = new Logger(AppController_1.name);
@@ -42,20 +42,20 @@ let AppController = AppController_1 = class AppController {
42
42
  };
43
43
  __decorate([
44
44
  Get(),
45
- ApiOkResponse({ type: String }),
45
+ ApiOkResponse({ type: HealthResponse }),
46
46
  __metadata("design:type", Function),
47
47
  __metadata("design:paramtypes", []),
48
- __metadata("design:returntype", String)
48
+ __metadata("design:returntype", void 0)
49
49
  ], AppController.prototype, "getHello", null);
50
50
  __decorate([
51
51
  UseGuards(DefaultAuthGuard),
52
52
  ApiBearerAuth(),
53
53
  Get("is-authorised"),
54
- ApiOkResponse({ type: String }),
54
+ ApiOkResponse({ type: HealthResponse }),
55
55
  __param(0, Request()),
56
56
  __metadata("design:type", Function),
57
57
  __metadata("design:paramtypes", [Object]),
58
- __metadata("design:returntype", String)
58
+ __metadata("design:returntype", void 0)
59
59
  ], AppController.prototype, "getHelloAuthorized", null);
60
60
  __decorate([
61
61
  UseGuards(DefaultAuthGuard, ClaimsAuthorisationGuard),
@@ -63,11 +63,11 @@ __decorate([
63
63
  MandatoryUserClaims("read:all"),
64
64
  ApiOperation({ tags: ["SuperPower"] }),
65
65
  Get("is-super-admin"),
66
- ApiOkResponse({ type: String }),
66
+ ApiOkResponse({ type: HealthResponse }),
67
67
  __param(0, Request()),
68
68
  __metadata("design:type", Function),
69
69
  __metadata("design:paramtypes", [Object]),
70
- __metadata("design:returntype", String)
70
+ __metadata("design:returntype", void 0)
71
71
  ], AppController.prototype, "getHelloSuperAdmin", null);
72
72
  AppController = AppController_1 = __decorate([
73
73
  Controller(),
@@ -1 +1 @@
1
- {"version":3,"file":"app.controller.js","sourceRoot":"","sources":["../../src/root-app/app.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mDAAmD;AACnD,OAAO,EAAC,UAAU,EAAE,GAAG,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAC,MAAM,gBAAgB,CAAC;AAC3E,OAAO,EACH,aAAa,EACb,aAAa,EACb,YAAY,EACZ,OAAO,GACV,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAC,wBAAwB,EAAC,MAAM,qDAAqD,CAAC;AAC7F,OAAO,EAAC,gBAAgB,EAAC,MAAM,6CAA6C,CAAC;AAE7E,OAAO,EAAC,mBAAmB,EAAC,MAAM,aAAa,CAAC;AAChD,OAAO,EAAC,UAAU,EAAC,MAAM,kBAAkB,CAAC;AAIrC,IAAM,aAAa,qBAAnB,MAAM,aAAa;IAEO;IADZ,MAAM,GAAG,IAAI,MAAM,CAAC,eAAa,CAAC,IAAI,CAAC,CAAC;IACzD,YAA6B,UAAsB;QAAtB,eAAU,GAAV,UAAU,CAAY;IAAG,CAAC;IAIvD,QAAQ;QAC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C,MAAM,aAAa,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACnD,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,cAAc,EAAE,aAAa,CAAC,CAAC;QAC/C,OAAO,UAAU,CAAC;IACtB,CAAC;CACJ,CAAA;AA3BG;IAFC,GAAG,EAAE;IACL,aAAa,CAAC,EAAC,IAAI,EAAE,cAAc,EAAC,CAAC;;;;6CAGrC;AAMD;IAJC,SAAS,CAAC,gBAAgB,CAAC;IAC3B,aAAa,EAAE;IACf,GAAG,CAAC,eAAe,CAAC;IACpB,aAAa,CAAC,EAAC,IAAI,EAAE,cAAc,EAAC,CAAC;IAClB,WAAA,OAAO,EAAE,CAAA;;;;uDAK5B;AAQD;IANC,SAAS,CAAC,gBAAgB,EAAE,wBAAwB,CAAC;IACrD,aAAa,EAAE;IACf,mBAAmB,CAAC,UAAU,CAAC;IAC/B,YAAY,CAAC,EAAC,IAAI,EAAE,CAAC,YAAY,CAAC,EAAC,CAAC;IACpC,GAAG,CAAC,gBAAgB,CAAC;IACrB,aAAa,CAAC,EAAC,IAAI,EAAE,cAAc,EAAC,CAAC;IAClB,WAAA,OAAO,EAAE,CAAA;;;;uDAK5B;AAhCQ,aAAa;IAFzB,UAAU,EAAE;IACZ,OAAO,CAAC,qBAAqB,CAAC;qCAGc,UAAU;GAF1C,aAAa,CAiCzB"}
@@ -1,3 +1,6 @@
1
+ export declare class HealthResponse {
2
+ result: string;
3
+ }
1
4
  export declare class AppService {
2
- getHello(): string;
5
+ getHello(): HealthResponse;
3
6
  }
@@ -4,10 +4,21 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
4
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;
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
7
10
  import { Injectable } from "@nestjs/common";
11
+ import { ApiProperty } from "@nestjs/swagger";
12
+ export class HealthResponse {
13
+ result;
14
+ }
15
+ __decorate([
16
+ ApiProperty(),
17
+ __metadata("design:type", String)
18
+ ], HealthResponse.prototype, "result", void 0);
8
19
  let AppService = class AppService {
9
20
  getHello() {
10
- return '{result: "Healthy and running"}';
21
+ return { result: "Healthy and running" };
11
22
  }
12
23
  };
13
24
  AppService = __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":"app.service.js","sourceRoot":"","sources":["../../src/root-app/app.service.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,gBAAgB,CAAC;AAGnC,IAAM,UAAU,GAAhB,MAAM,UAAU;IACnB,QAAQ;QACJ,OAAO,iCAAiC,CAAC;IAC7C,CAAC;CACJ,CAAA;AAJY,UAAU;IADtB,UAAU,EAAE;GACA,UAAU,CAItB"}
1
+ {"version":3,"file":"app.service.js","sourceRoot":"","sources":["../../src/root-app/app.service.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAC,WAAW,EAAC,MAAM,iBAAiB,CAAC;AAE5C,MAAM,OAAO,cAAc;IAEvB,MAAM,CAAU;CACnB;AADG;IADC,WAAW,EAAE;;8CACE;AAGb,IAAM,UAAU,GAAhB,MAAM,UAAU;IACnB,QAAQ;QACJ,OAAO,EAAC,MAAM,EAAE,qBAAqB,EAAC,CAAC;IAC3C,CAAC;CACJ,CAAA;AAJY,UAAU;IADtB,UAAU,EAAE;GACA,UAAU,CAItB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@darraghor/nest-backend-libs",
3
- "version": "3.7.0",
3
+ "version": "3.8.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",