@carlonicora/nestjs-neo4jsonapi 4.17.3 → 4.18.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 (68) hide show
  1. package/dist/bootstrap/bootstrap.d.ts.map +1 -1
  2. package/dist/bootstrap/bootstrap.js +5 -25
  3. package/dist/bootstrap/bootstrap.js.map +1 -1
  4. package/dist/bootstrap/defaults.d.ts +1 -0
  5. package/dist/bootstrap/defaults.d.ts.map +1 -1
  6. package/dist/bootstrap/defaults.js +3 -0
  7. package/dist/bootstrap/defaults.js.map +1 -1
  8. package/dist/bootstrap/graceful-shutdown.d.ts +25 -0
  9. package/dist/bootstrap/graceful-shutdown.d.ts.map +1 -0
  10. package/dist/bootstrap/graceful-shutdown.js +72 -0
  11. package/dist/bootstrap/graceful-shutdown.js.map +1 -0
  12. package/dist/bootstrap/raw-body.config.d.ts +13 -0
  13. package/dist/bootstrap/raw-body.config.d.ts.map +1 -1
  14. package/dist/bootstrap/raw-body.config.js +26 -1
  15. package/dist/bootstrap/raw-body.config.js.map +1 -1
  16. package/dist/config/base.config.d.ts.map +1 -1
  17. package/dist/config/base.config.js +7 -0
  18. package/dist/config/base.config.js.map +1 -1
  19. package/dist/config/interfaces/config.s3.interface.d.ts +11 -0
  20. package/dist/config/interfaces/config.s3.interface.d.ts.map +1 -1
  21. package/dist/core/health/indicators/s3.health.d.ts.map +1 -1
  22. package/dist/core/health/indicators/s3.health.js +8 -38
  23. package/dist/core/health/indicators/s3.health.js.map +1 -1
  24. package/dist/core/llm/services/ai-connection-resolver.service.d.ts +8 -2
  25. package/dist/core/llm/services/ai-connection-resolver.service.d.ts.map +1 -1
  26. package/dist/core/llm/services/ai-connection-resolver.service.js +9 -0
  27. package/dist/core/llm/services/ai-connection-resolver.service.js.map +1 -1
  28. package/dist/foundations/chunker/services/chunker.service.d.ts +12 -4
  29. package/dist/foundations/chunker/services/chunker.service.d.ts.map +1 -1
  30. package/dist/foundations/chunker/services/chunker.service.js +22 -14
  31. package/dist/foundations/chunker/services/chunker.service.js.map +1 -1
  32. package/dist/foundations/s3/cipher/index.d.ts +2 -0
  33. package/dist/foundations/s3/cipher/index.d.ts.map +1 -0
  34. package/dist/foundations/s3/cipher/index.js +18 -0
  35. package/dist/foundations/s3/cipher/index.js.map +1 -0
  36. package/dist/foundations/s3/cipher/s3-cipher.core.d.ts +85 -0
  37. package/dist/foundations/s3/cipher/s3-cipher.core.d.ts.map +1 -0
  38. package/dist/foundations/s3/cipher/s3-cipher.core.js +359 -0
  39. package/dist/foundations/s3/cipher/s3-cipher.core.js.map +1 -0
  40. package/dist/foundations/s3/controllers/s3.controller.d.ts +25 -1
  41. package/dist/foundations/s3/controllers/s3.controller.d.ts.map +1 -1
  42. package/dist/foundations/s3/controllers/s3.controller.js +143 -4
  43. package/dist/foundations/s3/controllers/s3.controller.js.map +1 -1
  44. package/dist/foundations/s3/entities/s3.meta.d.ts +2 -0
  45. package/dist/foundations/s3/entities/s3.meta.d.ts.map +1 -1
  46. package/dist/foundations/s3/entities/s3.meta.js +3 -1
  47. package/dist/foundations/s3/entities/s3.meta.js.map +1 -1
  48. package/dist/foundations/s3/index.d.ts +3 -0
  49. package/dist/foundations/s3/index.d.ts.map +1 -1
  50. package/dist/foundations/s3/index.js +3 -0
  51. package/dist/foundations/s3/index.js.map +1 -1
  52. package/dist/foundations/s3/s3.service.module.d.ts +1 -1
  53. package/dist/foundations/s3/s3.service.module.d.ts.map +1 -1
  54. package/dist/foundations/s3/s3.service.module.js +4 -3
  55. package/dist/foundations/s3/s3.service.module.js.map +1 -1
  56. package/dist/foundations/s3/services/s3-cipher.service.d.ts +33 -0
  57. package/dist/foundations/s3/services/s3-cipher.service.d.ts.map +1 -0
  58. package/dist/foundations/s3/services/s3-cipher.service.js +66 -0
  59. package/dist/foundations/s3/services/s3-cipher.service.js.map +1 -0
  60. package/dist/foundations/s3/services/s3.service.d.ts +37 -5
  61. package/dist/foundations/s3/services/s3.service.d.ts.map +1 -1
  62. package/dist/foundations/s3/services/s3.service.js +274 -207
  63. package/dist/foundations/s3/services/s3.service.js.map +1 -1
  64. package/dist/foundations/s3/storage-client.d.ts +8 -0
  65. package/dist/foundations/s3/storage-client.d.ts.map +1 -0
  66. package/dist/foundations/s3/storage-client.js +45 -0
  67. package/dist/foundations/s3/storage-client.js.map +1 -0
  68. package/package.json +2 -1
@@ -1,10 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.s3Meta = void 0;
3
+ exports.S3_OBJECTS_SEGMENT = exports.s3Meta = void 0;
4
4
  exports.s3Meta = {
5
5
  type: "s3",
6
6
  endpoint: "s3",
7
7
  nodeName: "s3",
8
8
  labelName: "S3",
9
9
  };
10
+ /** Path segment of the token-verified object routes: `${s3Meta.endpoint}/${S3_OBJECTS_SEGMENT}/:token`. */
11
+ exports.S3_OBJECTS_SEGMENT = "objects";
10
12
  //# sourceMappingURL=s3.meta.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"s3.meta.js","sourceRoot":"","sources":["../../../../src/foundations/s3/entities/s3.meta.ts"],"names":[],"mappings":";;;AAEa,QAAA,MAAM,GAAa;IAC9B,IAAI,EAAE,IAAI;IACV,QAAQ,EAAE,IAAI;IACd,QAAQ,EAAE,IAAI;IACd,SAAS,EAAE,IAAI;CAChB,CAAC"}
1
+ {"version":3,"file":"s3.meta.js","sourceRoot":"","sources":["../../../../src/foundations/s3/entities/s3.meta.ts"],"names":[],"mappings":";;;AAEa,QAAA,MAAM,GAAa;IAC9B,IAAI,EAAE,IAAI;IACV,QAAQ,EAAE,IAAI;IACd,QAAQ,EAAE,IAAI;IACd,SAAS,EAAE,IAAI;CAChB,CAAC;AAEF,2GAA2G;AAC9F,QAAA,kBAAkB,GAAG,SAAS,CAAC"}
@@ -1,10 +1,13 @@
1
1
  export * from "./s3.module";
2
2
  export * from "./s3.service.module";
3
3
  export * from "./services/s3.service";
4
+ export * from "./services/s3-cipher.service";
5
+ export * from "./cipher";
4
6
  export * from "./serialisers/s3.serialiser";
5
7
  export * from "./controllers/s3.controller";
6
8
  export * from "./entities/s3.entity";
7
9
  export * from "./entities/s3.meta";
8
10
  export * from "./entities/s3.model";
9
11
  export * from "./entities/s3.map";
12
+ export * from "./storage-client";
10
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/foundations/s3/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/foundations/s3/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,UAAU,CAAC;AACzB,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC"}
@@ -17,10 +17,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./s3.module"), exports);
18
18
  __exportStar(require("./s3.service.module"), exports);
19
19
  __exportStar(require("./services/s3.service"), exports);
20
+ __exportStar(require("./services/s3-cipher.service"), exports);
21
+ __exportStar(require("./cipher"), exports);
20
22
  __exportStar(require("./serialisers/s3.serialiser"), exports);
21
23
  __exportStar(require("./controllers/s3.controller"), exports);
22
24
  __exportStar(require("./entities/s3.entity"), exports);
23
25
  __exportStar(require("./entities/s3.meta"), exports);
24
26
  __exportStar(require("./entities/s3.model"), exports);
25
27
  __exportStar(require("./entities/s3.map"), exports);
28
+ __exportStar(require("./storage-client"), exports);
26
29
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/foundations/s3/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,sDAAoC;AACpC,wDAAsC;AACtC,8DAA4C;AAC5C,8DAA4C;AAC5C,uDAAqC;AACrC,qDAAmC;AACnC,sDAAoC;AACpC,oDAAkC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/foundations/s3/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,sDAAoC;AACpC,wDAAsC;AACtC,+DAA6C;AAC7C,2CAAyB;AACzB,8DAA4C;AAC5C,8DAA4C;AAC5C,uDAAqC;AACrC,qDAAmC;AACnC,sDAAoC;AACpC,oDAAkC;AAClC,mDAAiC"}
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * S3 Service Module
3
3
  *
4
- * Provides S3Service and NOTHING else — no controller, no serialiser.
4
+ * Provides S3Service (and the S3CipherService it depends on) and NOTHING else — no controller, no serialiser.
5
5
  *
6
6
  * WHY THIS EXISTS: S3Service used to be registered TWICE — once by S3Module,
7
7
  * and once directly in MigratorModule's `providers` (so the migrator could
@@ -1 +1 @@
1
- {"version":3,"file":"s3.service.module.d.ts","sourceRoot":"","sources":["../../../src/foundations/s3/s3.service.module.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,qBAIa,eAAe;CAAG"}
1
+ {"version":3,"file":"s3.service.module.d.ts","sourceRoot":"","sources":["../../../src/foundations/s3/s3.service.module.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,qBAIa,eAAe;CAAG"}
@@ -8,11 +8,12 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.S3ServiceModule = void 0;
10
10
  const common_1 = require("@nestjs/common");
11
+ const s3_cipher_service_1 = require("./services/s3-cipher.service");
11
12
  const s3_service_1 = require("./services/s3.service");
12
13
  /**
13
14
  * S3 Service Module
14
15
  *
15
- * Provides S3Service and NOTHING else — no controller, no serialiser.
16
+ * Provides S3Service (and the S3CipherService it depends on) and NOTHING else — no controller, no serialiser.
16
17
  *
17
18
  * WHY THIS EXISTS: S3Service used to be registered TWICE — once by S3Module,
18
19
  * and once directly in MigratorModule's `providers` (so the migrator could
@@ -41,8 +42,8 @@ let S3ServiceModule = class S3ServiceModule {
41
42
  exports.S3ServiceModule = S3ServiceModule;
42
43
  exports.S3ServiceModule = S3ServiceModule = __decorate([
43
44
  (0, common_1.Module)({
44
- providers: [s3_service_1.S3Service],
45
- exports: [s3_service_1.S3Service],
45
+ providers: [s3_service_1.S3Service, s3_cipher_service_1.S3CipherService],
46
+ exports: [s3_service_1.S3Service, s3_cipher_service_1.S3CipherService],
46
47
  })
47
48
  ], S3ServiceModule);
48
49
  //# sourceMappingURL=s3.service.module.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"s3.service.module.js","sourceRoot":"","sources":["../../../src/foundations/s3/s3.service.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,sDAAkD;AAElD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAKI,IAAM,eAAe,GAArB,MAAM,eAAe;CAAG,CAAA;AAAlB,0CAAe;0BAAf,eAAe;IAJ3B,IAAA,eAAM,EAAC;QACN,SAAS,EAAE,CAAC,sBAAS,CAAC;QACtB,OAAO,EAAE,CAAC,sBAAS,CAAC;KACrB,CAAC;GACW,eAAe,CAAG"}
1
+ {"version":3,"file":"s3.service.module.js","sourceRoot":"","sources":["../../../src/foundations/s3/s3.service.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,oEAA+D;AAC/D,sDAAkD;AAElD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAKI,IAAM,eAAe,GAArB,MAAM,eAAe;CAAG,CAAA;AAAlB,0CAAe;0BAAf,eAAe;IAJ3B,IAAA,eAAM,EAAC;QACN,SAAS,EAAE,CAAC,sBAAS,EAAE,mCAAe,CAAC;QACvC,OAAO,EAAE,CAAC,sBAAS,EAAE,mCAAe,CAAC;KACtC,CAAC;GACW,eAAe,CAAG"}
@@ -0,0 +1,33 @@
1
+ import { ConfigService } from "@nestjs/config";
2
+ import { Duplex } from "stream";
3
+ import { BaseConfigInterface } from "../../../config/interfaces/base.config.interface";
4
+ import { S3ObjectTokenOp, S3ObjectTokenPayload } from "../cipher/s3-cipher.core";
5
+ /**
6
+ * Nest wrapper around the Nest-free {@link S3Cipher}. Delegation only.
7
+ *
8
+ * Builds the cipher from `s3.encryption`; a malformed key (or encryption enabled
9
+ * without one) throws here, so the app fails at boot on first injection.
10
+ */
11
+ export declare class S3CipherService {
12
+ private readonly configService;
13
+ readonly uploadMaxBytes: number;
14
+ private readonly cipher;
15
+ constructor(configService: ConfigService<BaseConfigInterface>);
16
+ get enabled(): boolean;
17
+ get canDecrypt(): boolean;
18
+ shouldEncrypt(key: string): boolean;
19
+ encrypt(plaintext: Buffer): Promise<Buffer>;
20
+ decrypt(ciphertext: Buffer): Promise<Buffer>;
21
+ encryptStream(): Duplex;
22
+ decryptStream(): Duplex;
23
+ signObjectToken(input: {
24
+ op: S3ObjectTokenOp;
25
+ key: string;
26
+ contentType?: string;
27
+ filename?: string;
28
+ expiresInSeconds?: number;
29
+ expiresAt?: number;
30
+ }): string;
31
+ verifyObjectToken(token: string, op: S3ObjectTokenOp): S3ObjectTokenPayload;
32
+ }
33
+ //# sourceMappingURL=s3-cipher.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"s3-cipher.service.d.ts","sourceRoot":"","sources":["../../../../src/foundations/s3/services/s3-cipher.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,mBAAmB,EAAE,MAAM,kDAAkD,CAAC;AAGvF,OAAO,EAAkC,eAAe,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAIjH;;;;;GAKG;AACH,qBACa,eAAe;IAId,OAAO,CAAC,QAAQ,CAAC,aAAa;IAH1C,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAW;gBAEL,aAAa,EAAE,aAAa,CAAC,mBAAmB,CAAC;IAS9E,IAAI,OAAO,IAAI,OAAO,CAErB;IAED,IAAI,UAAU,IAAI,OAAO,CAExB;IAED,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAInC,OAAO,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAI3C,OAAO,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAI5C,aAAa,IAAI,MAAM;IAIvB,aAAa,IAAI,MAAM;IAIvB,eAAe,CAAC,KAAK,EAAE;QACrB,EAAE,EAAE,eAAe,CAAC;QACpB,GAAG,EAAE,MAAM,CAAC;QACZ,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,GAAG,MAAM;IAIV,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,eAAe,GAAG,oBAAoB;CAG5E"}
@@ -0,0 +1,66 @@
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.S3CipherService = void 0;
13
+ const common_1 = require("@nestjs/common");
14
+ const config_1 = require("@nestjs/config");
15
+ const s3_cipher_core_1 = require("../cipher/s3-cipher.core");
16
+ const DEFAULT_UPLOAD_MAX_BYTES = 104857600;
17
+ /**
18
+ * Nest wrapper around the Nest-free {@link S3Cipher}. Delegation only.
19
+ *
20
+ * Builds the cipher from `s3.encryption`; a malformed key (or encryption enabled
21
+ * without one) throws here, so the app fails at boot on first injection.
22
+ */
23
+ let S3CipherService = class S3CipherService {
24
+ constructor(configService) {
25
+ this.configService = configService;
26
+ const s3 = this.configService.get("s3");
27
+ this.cipher = new s3_cipher_core_1.S3Cipher({
28
+ ...(0, s3_cipher_core_1.parseS3CipherOptions)(s3?.encryption ?? { enabled: false, key: "", retiredKeys: "", plaintextPrefixes: "" }),
29
+ fallbackSigningSecret: this.configService.get("jwt")?.secret || undefined,
30
+ });
31
+ this.uploadMaxBytes = s3?.uploadMaxBytes || DEFAULT_UPLOAD_MAX_BYTES;
32
+ }
33
+ get enabled() {
34
+ return this.cipher.enabled;
35
+ }
36
+ get canDecrypt() {
37
+ return this.cipher.canDecrypt;
38
+ }
39
+ shouldEncrypt(key) {
40
+ return this.cipher.shouldEncrypt(key);
41
+ }
42
+ encrypt(plaintext) {
43
+ return this.cipher.encrypt(plaintext);
44
+ }
45
+ decrypt(ciphertext) {
46
+ return this.cipher.decrypt(ciphertext);
47
+ }
48
+ encryptStream() {
49
+ return this.cipher.encryptStream();
50
+ }
51
+ decryptStream() {
52
+ return this.cipher.decryptStream();
53
+ }
54
+ signObjectToken(input) {
55
+ return this.cipher.signObjectToken(input);
56
+ }
57
+ verifyObjectToken(token, op) {
58
+ return this.cipher.verifyObjectToken(token, op);
59
+ }
60
+ };
61
+ exports.S3CipherService = S3CipherService;
62
+ exports.S3CipherService = S3CipherService = __decorate([
63
+ (0, common_1.Injectable)(),
64
+ __metadata("design:paramtypes", [config_1.ConfigService])
65
+ ], S3CipherService);
66
+ //# sourceMappingURL=s3-cipher.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"s3-cipher.service.js","sourceRoot":"","sources":["../../../../src/foundations/s3/services/s3-cipher.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,2CAA+C;AAK/C,6DAAiH;AAEjH,MAAM,wBAAwB,GAAG,SAAS,CAAC;AAE3C;;;;;GAKG;AAEI,IAAM,eAAe,GAArB,MAAM,eAAe;IAI1B,YAA6B,aAAiD;QAAjD,kBAAa,GAAb,aAAa,CAAoC;QAC5E,MAAM,EAAE,GAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAoB,IAAI,CAAC,CAAC;QAC3D,IAAI,CAAC,MAAM,GAAG,IAAI,yBAAQ,CAAC;YACzB,GAAG,IAAA,qCAAoB,EAAC,EAAE,EAAE,UAAU,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE,iBAAiB,EAAE,EAAE,EAAE,CAAC;YAC9G,qBAAqB,EAAE,IAAI,CAAC,aAAa,CAAC,GAAG,CAAqB,KAAK,CAAC,EAAE,MAAM,IAAI,SAAS;SAC9F,CAAC,CAAC;QACH,IAAI,CAAC,cAAc,GAAG,EAAE,EAAE,cAAc,IAAI,wBAAwB,CAAC;IACvE,CAAC;IAED,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC;IAC7B,CAAC;IAED,IAAI,UAAU;QACZ,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC;IAChC,CAAC;IAED,aAAa,CAAC,GAAW;QACvB,OAAO,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;IACxC,CAAC;IAED,OAAO,CAAC,SAAiB;QACvB,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACxC,CAAC;IAED,OAAO,CAAC,UAAkB;QACxB,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IACzC,CAAC;IAED,aAAa;QACX,OAAO,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,CAAC;IACrC,CAAC;IAED,aAAa;QACX,OAAO,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,CAAC;IACrC,CAAC;IAED,eAAe,CAAC,KAOf;QACC,OAAO,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;IAC5C,CAAC;IAED,iBAAiB,CAAC,KAAa,EAAE,EAAmB;QAClD,OAAO,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IAClD,CAAC;CACF,CAAA;AAvDY,0CAAe;0BAAf,eAAe;IAD3B,IAAA,mBAAU,GAAE;qCAKiC,sBAAa;GAJ9C,eAAe,CAuD3B"}
@@ -5,22 +5,43 @@ import { BaseConfigInterface } from "../../../config/interfaces";
5
5
  import { JsonApiDataInterface } from "../../../core/jsonapi/interfaces/jsonapi.data.interface";
6
6
  import { JsonApiService } from "../../../core/jsonapi/services/jsonapi.service";
7
7
  import { AppLoggingService } from "../../../core/logging/services/logging.service";
8
+ import { S3CipherService } from "./s3-cipher.service";
8
9
  export declare class S3Service {
9
10
  private readonly builder;
10
11
  private readonly clsService;
11
12
  private readonly configService;
12
13
  private readonly logger;
14
+ private readonly cipher;
13
15
  private s3Client;
14
16
  private blobServiceClient;
15
17
  private containerClient;
16
18
  private _bucket;
17
19
  private _endpoint;
18
20
  private _storageType;
19
- constructor(builder: JsonApiService, clsService: ClsService, configService: ConfigService<BaseConfigInterface>, logger: AppLoggingService);
21
+ constructor(builder: JsonApiService, clsService: ClsService, configService: ConfigService<BaseConfigInterface>, logger: AppLoggingService, cipher: S3CipherService);
20
22
  private get s3Config();
23
+ /** Token-verified api URL served by S3Controller: `${api.url}s3/objects/<token>`. */
24
+ private _apiObjectUrl;
25
+ /** Object metadata flag for an encrypted write, or undefined when the key is stored as plaintext. */
26
+ private _metadataFor;
27
+ /** Body and metadata to write for `key`: ciphertext plus the flag when encrypting, the buffer untouched otherwise. */
28
+ private _prepareBody;
29
+ /** Throws when a flagged object cannot be opened: ciphertext is never returned to a caller. */
30
+ private _assertCanDecrypt;
31
+ /** The cipher does not know the storage key; name it in a missing-key error. */
32
+ private _withObjectKey;
33
+ /** Decrypts the stored bytes when the object metadata (S3 `Metadata` / Azure `metadata`) carries the flag. */
34
+ private _readBody;
35
+ /** Streaming counterpart of `_readBody`: a flagged object is piped through the cipher's decrypt stream. */
36
+ private _readStream;
37
+ /**
38
+ * `_readStream`, but for a flagged object it waits for the first decrypted chunk (or the end), so a
39
+ * failure before any byte (a key that is not configured) rejects here, before a response starts,
40
+ * instead of breaking a response that is already under way.
41
+ */
42
+ private _readStreamReady;
43
+ private _streamToBuffer;
21
44
  private _loadConfiguration;
22
- private _prepareUrl;
23
- private _prepareAzureUrl;
24
45
  generatePresignedUrl(params: {
25
46
  key: string;
26
47
  contentType: string;
@@ -40,7 +61,7 @@ export declare class S3Service {
40
61
  * characters that would break the header (quotes, path separators, control chars) while
41
62
  * `filename*` carries the original UTF-8 name for browsers that support it.
42
63
  */
43
- private _contentDispositionAttachment;
64
+ contentDispositionAttachment(filename: string): string;
44
65
  findSignedUrl(params: {
45
66
  key: string;
46
67
  isPublic?: boolean;
@@ -52,7 +73,8 @@ export declare class S3Service {
52
73
  isPublic?: boolean;
53
74
  filename?: string;
54
75
  }): Promise<string>;
55
- private _generateAzureSignedUrl;
76
+ /** Unix seconds: start of the current signing window + ttl + window (`s3.signingWindowSeconds`, default 3600). */
77
+ private _windowedExpiry;
56
78
  uploadFile(params: {
57
79
  buffer: Buffer;
58
80
  key: string;
@@ -168,6 +190,16 @@ export declare class S3Service {
168
190
  downloadFileAsStream(params: {
169
191
  key: string;
170
192
  }): Promise<Readable | null>;
193
+ /**
194
+ * Stream an object for the token-verified api route. Returns null when the object does not exist;
195
+ * a flagged object comes back decrypted, and throws when no configured key can open it.
196
+ */
197
+ downloadObject(params: {
198
+ key: string;
199
+ }): Promise<{
200
+ stream: Readable;
201
+ contentType?: string;
202
+ } | null>;
171
203
  private _downloadAzureFileAsStream;
172
204
  /**
173
205
  * Upload a buffer with an exact key — NO extension appending.
@@ -1 +1 @@
1
- {"version":3,"file":"s3.service.d.ts","sourceRoot":"","sources":["../../../../src/foundations/s3/services/s3.service.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAUlC,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,mBAAmB,EAAqB,MAAM,4BAA4B,CAAC;AACpF,OAAO,EAAE,oBAAoB,EAAE,MAAM,yDAAyD,CAAC;AAC/F,OAAO,EAAE,cAAc,EAAE,MAAM,gDAAgD,CAAC;AAChF,OAAO,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAC;AAGnF,qBACa,SAAS;IASlB,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,aAAa;IAC9B,OAAO,CAAC,QAAQ,CAAC,MAAM;IAXzB,OAAO,CAAC,QAAQ,CAAW;IAC3B,OAAO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