@abyss-project/tools 2.1.0 → 2.2.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 (132) hide show
  1. package/dist/api/index.d.ts +4 -0
  2. package/dist/api/index.js +4 -0
  3. package/dist/api/index.js.map +1 -1
  4. package/dist/api/probe-scan.api.d.ts +15 -0
  5. package/dist/api/probe-scan.api.js +74 -0
  6. package/dist/api/probe-scan.api.js.map +1 -0
  7. package/dist/api/probe-scan.api.test.d.ts +1 -0
  8. package/dist/api/probe-scan.api.test.js +37 -0
  9. package/dist/api/probe-scan.api.test.js.map +1 -0
  10. package/dist/api/probe-scan.application.api.d.ts +7 -0
  11. package/dist/api/probe-scan.application.api.js +40 -0
  12. package/dist/api/probe-scan.application.api.js.map +1 -0
  13. package/dist/api/probe-scan.application.api.test.d.ts +1 -0
  14. package/dist/api/probe-scan.application.api.test.js +37 -0
  15. package/dist/api/probe-scan.application.api.test.js.map +1 -0
  16. package/dist/api/probe-webhook.api.d.ts +4 -0
  17. package/dist/api/probe-webhook.api.js +34 -0
  18. package/dist/api/probe-webhook.api.js.map +1 -0
  19. package/dist/api/probe-webhook.api.test.d.ts +1 -0
  20. package/dist/api/probe-webhook.api.test.js +33 -0
  21. package/dist/api/probe-webhook.api.test.js.map +1 -0
  22. package/dist/api/probe-webhook.application.api.d.ts +4 -0
  23. package/dist/api/probe-webhook.application.api.js +14 -0
  24. package/dist/api/probe-webhook.application.api.js.map +1 -0
  25. package/dist/api/probe-webhook.application.api.test.d.ts +1 -0
  26. package/dist/api/probe-webhook.application.api.test.js +33 -0
  27. package/dist/api/probe-webhook.application.api.test.js.map +1 -0
  28. package/dist/index.d.ts +31 -0
  29. package/dist/index.js +32 -1
  30. package/dist/index.js.map +1 -1
  31. package/dist/types/enum/api-error.enum.d.ts +1 -5
  32. package/dist/types/enum/api-error.enum.js +0 -4
  33. package/dist/types/enum/api-error.enum.js.map +1 -1
  34. package/dist/types/enum/index.d.ts +1 -1
  35. package/dist/types/enum/index.js +1 -1
  36. package/dist/types/enum/index.js.map +1 -1
  37. package/dist/types/enum/probe-scan.enum.d.ts +14 -0
  38. package/dist/types/enum/probe-scan.enum.js +21 -0
  39. package/dist/types/enum/probe-scan.enum.js.map +1 -0
  40. package/dist/types/interface/api/requests/index.d.ts +2 -0
  41. package/dist/types/interface/api/requests/index.js +2 -0
  42. package/dist/types/interface/api/requests/index.js.map +1 -1
  43. package/dist/types/interface/api/requests/probe-scan.request.d.ts +22 -0
  44. package/dist/types/interface/api/{responses/file-scan.response.js → requests/probe-scan.request.js} +1 -1
  45. package/dist/types/interface/api/requests/probe-scan.request.js.map +1 -0
  46. package/dist/types/interface/api/requests/probe-webhook.request.d.ts +6 -0
  47. package/dist/types/{enum/file-scan-status.enum.js → interface/api/requests/probe-webhook.request.js} +1 -1
  48. package/dist/types/interface/api/requests/probe-webhook.request.js.map +1 -0
  49. package/dist/types/interface/api/responses/beam.response.d.ts +1 -3
  50. package/dist/types/interface/api/responses/index.d.ts +2 -0
  51. package/dist/types/interface/api/responses/index.js +2 -0
  52. package/dist/types/interface/api/responses/index.js.map +1 -1
  53. package/dist/types/interface/api/responses/probe-scan.response.d.ts +18 -0
  54. package/dist/types/interface/api/responses/probe-scan.response.js +3 -0
  55. package/dist/types/interface/api/responses/probe-scan.response.js.map +1 -0
  56. package/dist/types/interface/api/responses/probe-webhook.response.d.ts +10 -0
  57. package/dist/types/interface/api/responses/probe-webhook.response.js +3 -0
  58. package/dist/types/interface/api/responses/probe-webhook.response.js.map +1 -0
  59. package/dist/types/interface/models/atlas-document.dto.d.ts +0 -3
  60. package/dist/types/interface/models/beam.dto.d.ts +0 -3
  61. package/dist/types/interface/models/board-card-document.dto.d.ts +0 -3
  62. package/dist/types/interface/models/extraction.dto.d.ts +0 -2
  63. package/dist/types/interface/models/extraction.dto.js.map +1 -1
  64. package/dist/types/interface/models/index.d.ts +3 -0
  65. package/dist/types/interface/models/index.js +3 -0
  66. package/dist/types/interface/models/index.js.map +1 -1
  67. package/dist/types/interface/models/probe-scan.dto.d.ts +22 -0
  68. package/dist/types/interface/models/{file-scan.dto.js → probe-scan.dto.js} +1 -1
  69. package/dist/types/interface/models/probe-scan.dto.js.map +1 -0
  70. package/dist/types/interface/models/probe-webhook-delivery.dto.d.ts +7 -0
  71. package/dist/types/interface/models/probe-webhook-delivery.dto.js +3 -0
  72. package/dist/types/interface/models/probe-webhook-delivery.dto.js.map +1 -0
  73. package/dist/types/interface/models/probe-webhook.dto.d.ts +9 -0
  74. package/dist/types/interface/{api/requests/file-scan.request.js → models/probe-webhook.dto.js} +1 -1
  75. package/dist/types/interface/models/probe-webhook.dto.js.map +1 -0
  76. package/dist/types/tests/probe.dto.test.d.ts +1 -0
  77. package/dist/types/tests/probe.dto.test.js +62 -0
  78. package/dist/types/tests/probe.dto.test.js.map +1 -0
  79. package/dist/utils/index.d.ts +1 -0
  80. package/dist/utils/index.js +1 -0
  81. package/dist/utils/index.js.map +1 -1
  82. package/dist/utils/probe-webhook-signature.utils.d.ts +8 -0
  83. package/dist/utils/probe-webhook-signature.utils.js +22 -0
  84. package/dist/utils/probe-webhook-signature.utils.js.map +1 -0
  85. package/package.json +1 -1
  86. package/src/api/index.ts +6 -0
  87. package/src/api/probe-scan.api.test.ts +21 -0
  88. package/src/api/probe-scan.api.ts +191 -0
  89. package/src/api/probe-scan.application.api.test.ts +21 -0
  90. package/src/api/probe-scan.application.api.ts +157 -0
  91. package/src/api/probe-webhook.api.test.ts +17 -0
  92. package/src/api/probe-webhook.api.ts +81 -0
  93. package/src/api/probe-webhook.application.api.test.ts +18 -0
  94. package/src/api/probe-webhook.application.api.ts +87 -0
  95. package/src/index.ts +86 -0
  96. package/src/types/enum/api-error.enum.ts +0 -25
  97. package/src/types/enum/index.ts +1 -1
  98. package/src/types/enum/probe-scan.enum.ts +44 -0
  99. package/src/types/interface/api/requests/index.ts +2 -0
  100. package/src/types/interface/api/requests/probe-scan.request.ts +50 -0
  101. package/src/types/interface/api/requests/probe-webhook.request.ts +12 -0
  102. package/src/types/interface/api/responses/beam.response.ts +1 -15
  103. package/src/types/interface/api/responses/index.ts +2 -0
  104. package/src/types/interface/api/responses/probe-scan.response.ts +38 -0
  105. package/src/types/interface/api/responses/probe-webhook.response.ts +17 -0
  106. package/src/types/interface/models/atlas-document.dto.ts +0 -18
  107. package/src/types/interface/models/beam.dto.ts +0 -22
  108. package/src/types/interface/models/board-card-document.dto.ts +0 -18
  109. package/src/types/interface/models/extraction.dto.ts +0 -17
  110. package/src/types/interface/models/index.ts +3 -0
  111. package/src/types/interface/models/probe-scan.dto.ts +48 -0
  112. package/src/types/interface/models/probe-webhook-delivery.dto.ts +26 -0
  113. package/src/types/interface/models/probe-webhook.dto.ts +25 -0
  114. package/src/types/tests/beam.dto.spec.ts +0 -2
  115. package/src/types/tests/probe.dto.test.ts +97 -0
  116. package/src/utils/index.ts +1 -0
  117. package/src/utils/probe-webhook-signature.utils.ts +56 -0
  118. package/dist/api/file-scan.api.d.ts +0 -5
  119. package/dist/api/file-scan.api.js +0 -49
  120. package/dist/api/file-scan.api.js.map +0 -1
  121. package/dist/types/enum/analysis-status.enum.d.ts +0 -7
  122. package/dist/types/enum/analysis-status.enum.js +0 -12
  123. package/dist/types/enum/analysis-status.enum.js.map +0 -1
  124. package/dist/types/enum/file-scan-status.enum.d.ts +0 -1
  125. package/dist/types/enum/file-scan-status.enum.js.map +0 -1
  126. package/dist/types/interface/api/requests/file-scan.request.d.ts +0 -3
  127. package/dist/types/interface/api/requests/file-scan.request.js.map +0 -1
  128. package/dist/types/interface/api/responses/file-scan.response.d.ts +0 -7
  129. package/dist/types/interface/api/responses/file-scan.response.js.map +0 -1
  130. package/dist/types/interface/models/file-scan.dto.d.ts +0 -11
  131. package/dist/types/interface/models/file-scan.dto.js.map +0 -1
  132. package/src/types/enum/file-scan-status.enum.ts +0 -23
@@ -23,9 +23,5 @@ var Code;
23
23
  Code["atlasDocumentLimitReached"] = "atlas_document_limit_reached";
24
24
  Code["boardCardDocumentLimitReached"] = "board_card_document_limit_reached";
25
25
  Code["boardCardMoveInvalidDestination"] = "board_card_move_invalid_destination";
26
- Code["boardCardDocumentAnalysing"] = "board_card_document_analysing";
27
- Code["atlasDocumentAnalysing"] = "atlas_document_analysing";
28
- Code["extractionFileAnalysing"] = "extraction_file_analysing";
29
- Code["beamFileNotEnrolled"] = "beam_file_not_enrolled";
30
26
  })(Code || (exports.Code = Code = {}));
31
27
  //# sourceMappingURL=api-error.enum.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"api-error.enum.js","sourceRoot":"","sources":["../../../src/types/enum/api-error.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,SAIX;AAJD,WAAY,SAAS;IACnB,mCAAsB,CAAA;IACtB,+CAAkC,CAAA;IAClC,6CAAgC,CAAA;AAClC,CAAC,EAJW,SAAS,yBAAT,SAAS,QAIpB;AAED,IAAY,IAyCX;AAzCD,WAAY,IAAI;IAEd,qDAA6C,CAAA;IAC7C,oEAA4D,CAAA;IAC5D,+CAAuC,CAAA;IACvC,8BAAsB,CAAA;IACtB,qDAA6C,CAAA;IAC7C,qDAA6C,CAAA;IAC7C,qDAA6C,CAAA;IAC7C,kDAA0C,CAAA;IAC1C,oCAA4B,CAAA;IAC5B,0CAAkC,CAAA;IAClC,sGAA8F,CAAA;IAC9F,kEAA0D,CAAA;IAC1D,2EAAmE,CAAA;IACnE,+EAAuE,CAAA;IAIvE,oEAA4D,CAAA;IAC5D,2DAAmD,CAAA;IAOnD,6DAAqD,CAAA;IAarD,sDAA8C,CAAA;AAChD,CAAC,EAzCW,IAAI,oBAAJ,IAAI,QAyCf"}
1
+ {"version":3,"file":"api-error.enum.js","sourceRoot":"","sources":["../../../src/types/enum/api-error.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,SAIX;AAJD,WAAY,SAAS;IACnB,mCAAsB,CAAA;IACtB,+CAAkC,CAAA;IAClC,6CAAgC,CAAA;AAClC,CAAC,EAJW,SAAS,yBAAT,SAAS,QAIpB;AAED,IAAY,IAgBX;AAhBD,WAAY,IAAI;IAEd,qDAA6C,CAAA;IAC7C,oEAA4D,CAAA;IAC5D,+CAAuC,CAAA;IACvC,8BAAsB,CAAA;IACtB,qDAA6C,CAAA;IAC7C,qDAA6C,CAAA;IAC7C,qDAA6C,CAAA;IAC7C,kDAA0C,CAAA;IAC1C,oCAA4B,CAAA;IAC5B,0CAAkC,CAAA;IAClC,sGAA8F,CAAA;IAC9F,kEAA0D,CAAA;IAC1D,2EAAmE,CAAA;IACnE,+EAAuE,CAAA;AACzE,CAAC,EAhBW,IAAI,oBAAJ,IAAI,QAgBf"}
@@ -11,4 +11,4 @@ export * from './extraction-feedback-issue-type.enum';
11
11
  export * from './provider-kind.enum';
12
12
  export * from './interpreter-kind.enum';
13
13
  export * from './combine-strategy.enum';
14
- export * from './file-scan-status.enum';
14
+ export * from './probe-scan.enum';
@@ -27,5 +27,5 @@ __exportStar(require("./extraction-feedback-issue-type.enum"), exports);
27
27
  __exportStar(require("./provider-kind.enum"), exports);
28
28
  __exportStar(require("./interpreter-kind.enum"), exports);
29
29
  __exportStar(require("./combine-strategy.enum"), exports);
30
- __exportStar(require("./file-scan-status.enum"), exports);
30
+ __exportStar(require("./probe-scan.enum"), exports);
31
31
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/enum/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,wDAAsC;AACtC,2DAAyC;AACzC,uDAAqC;AACrC,8CAA4B;AAC5B,uDAAqC;AACrC,uDAAqC;AACrC,kDAAgC;AAChC,4DAA0C;AAC1C,wEAAsD;AACtD,uDAAqC;AACrC,0DAAwC;AACxC,0DAAwC;AACxC,0DAAwC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/enum/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,wDAAsC;AACtC,2DAAyC;AACzC,uDAAqC;AACrC,8CAA4B;AAC5B,uDAAqC;AACrC,uDAAqC;AACrC,kDAAgC;AAChC,4DAA0C;AAC1C,wEAAsD;AACtD,uDAAqC;AACrC,0DAAwC;AACxC,0DAAwC;AACxC,oDAAkC"}
@@ -0,0 +1,14 @@
1
+ export declare enum ProbeScanVerdict {
2
+ CLEAN = "clean",
3
+ INFECTED = "infected"
4
+ }
5
+ export declare enum ProbeScanMode {
6
+ SYNC = "sync",
7
+ ASYNC = "async"
8
+ }
9
+ export declare enum ProbeScanStatus {
10
+ QUEUED = "queued",
11
+ SCANNING = "scanning",
12
+ DONE = "done",
13
+ ERROR = "error"
14
+ }
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ProbeScanStatus = exports.ProbeScanMode = exports.ProbeScanVerdict = void 0;
4
+ var ProbeScanVerdict;
5
+ (function (ProbeScanVerdict) {
6
+ ProbeScanVerdict["CLEAN"] = "clean";
7
+ ProbeScanVerdict["INFECTED"] = "infected";
8
+ })(ProbeScanVerdict || (exports.ProbeScanVerdict = ProbeScanVerdict = {}));
9
+ var ProbeScanMode;
10
+ (function (ProbeScanMode) {
11
+ ProbeScanMode["SYNC"] = "sync";
12
+ ProbeScanMode["ASYNC"] = "async";
13
+ })(ProbeScanMode || (exports.ProbeScanMode = ProbeScanMode = {}));
14
+ var ProbeScanStatus;
15
+ (function (ProbeScanStatus) {
16
+ ProbeScanStatus["QUEUED"] = "queued";
17
+ ProbeScanStatus["SCANNING"] = "scanning";
18
+ ProbeScanStatus["DONE"] = "done";
19
+ ProbeScanStatus["ERROR"] = "error";
20
+ })(ProbeScanStatus || (exports.ProbeScanStatus = ProbeScanStatus = {}));
21
+ //# sourceMappingURL=probe-scan.enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"probe-scan.enum.js","sourceRoot":"","sources":["../../../src/types/enum/probe-scan.enum.ts"],"names":[],"mappings":";;;AAYA,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,mCAAe,CAAA;IACf,yCAAqB,CAAA;AACvB,CAAC,EAHW,gBAAgB,gCAAhB,gBAAgB,QAG3B;AAQD,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,8BAAa,CAAA;IACb,gCAAe,CAAA;AACjB,CAAC,EAHW,aAAa,6BAAb,aAAa,QAGxB;AAYD,IAAY,eAKX;AALD,WAAY,eAAe;IACzB,oCAAiB,CAAA;IACjB,wCAAqB,CAAA;IACrB,gCAAa,CAAA;IACb,kCAAe,CAAA;AACjB,CAAC,EALW,eAAe,+BAAf,eAAe,QAK1B"}
@@ -27,3 +27,5 @@ export * from './metrics.request';
27
27
  export * from './tag.request';
28
28
  export * from './transfer.request';
29
29
  export * from './extraction.request';
30
+ export * from './probe-scan.request';
31
+ export * from './probe-webhook.request';
@@ -43,4 +43,6 @@ __exportStar(require("./metrics.request"), exports);
43
43
  __exportStar(require("./tag.request"), exports);
44
44
  __exportStar(require("./transfer.request"), exports);
45
45
  __exportStar(require("./extraction.request"), exports);
46
+ __exportStar(require("./probe-scan.request"), exports);
47
+ __exportStar(require("./probe-webhook.request"), exports);
46
48
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/types/interface/api/requests/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAsC;AACtC,kDAAgC;AAChC,yDAAuC;AACvC,2DAAyC;AACzC,wDAAsC;AACtC,uDAAqC;AACrC,kDAAgC;AAChC,uDAAqC;AACrC,iEAA+C;AAC/C,+DAA6C;AAC7C,gEAA8C;AAC9C,yDAAuC;AACvC,wDAAsC;AACtC,iDAA+B;AAC/B,wDAAsC;AACtC,iDAA+B;AAC/B,0DAAwC;AACxC,iEAA+C;AAC/C,+DAA6C;AAC7C,iEAA+C;AAC/C,kEAAgD;AAChD,uDAAqC;AACrC,8DAA4C;AAC5C,6DAA2C;AAC3C,iDAA+B;AAC/B,oDAAkC;AAClC,gDAA8B;AAC9B,qDAAmC;AACnC,uDAAqC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/types/interface/api/requests/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAsC;AACtC,kDAAgC;AAChC,yDAAuC;AACvC,2DAAyC;AACzC,wDAAsC;AACtC,uDAAqC;AACrC,kDAAgC;AAChC,uDAAqC;AACrC,iEAA+C;AAC/C,+DAA6C;AAC7C,gEAA8C;AAC9C,yDAAuC;AACvC,wDAAsC;AACtC,iDAA+B;AAC/B,wDAAsC;AACtC,iDAA+B;AAC/B,0DAAwC;AACxC,iEAA+C;AAC/C,+DAA6C;AAC7C,iEAA+C;AAC/C,kEAAgD;AAChD,uDAAqC;AACrC,8DAA4C;AAC5C,6DAA2C;AAC3C,iDAA+B;AAC/B,oDAAkC;AAClC,gDAA8B;AAC9B,qDAAmC;AACnC,uDAAqC;AACrC,uDAAqC;AACrC,0DAAwC"}
@@ -0,0 +1,22 @@
1
+ import { ProbeScanMode, ProbeScanStatus, ProbeScanVerdict } from '../../../enum';
2
+ export interface IScanOptions {
3
+ mode?: ProbeScanMode;
4
+ organizationId?: string;
5
+ context?: Record<string, unknown>;
6
+ callbackUrl?: string;
7
+ filename?: string;
8
+ mimeType?: string;
9
+ }
10
+ export interface IListScansQuery {
11
+ organizationId?: string;
12
+ verdict?: ProbeScanVerdict;
13
+ mode?: ProbeScanMode;
14
+ status?: ProbeScanStatus;
15
+ from?: Date;
16
+ to?: Date;
17
+ fileName?: string;
18
+ contextKey?: string;
19
+ contextValue?: string;
20
+ page?: number;
21
+ limit?: number;
22
+ }
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=file-scan.response.js.map
3
+ //# sourceMappingURL=probe-scan.request.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"probe-scan.request.js","sourceRoot":"","sources":["../../../../../src/types/interface/api/requests/probe-scan.request.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ export interface IProbeWebhookScopeQuery {
2
+ organizationId?: string;
3
+ }
4
+ export interface ICreateProbeWebhookBody {
5
+ callbackUrl: string;
6
+ }
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=file-scan-status.enum.js.map
3
+ //# sourceMappingURL=probe-webhook.request.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"probe-webhook.request.js","sourceRoot":"","sources":["../../../../../src/types/interface/api/requests/probe-webhook.request.ts"],"names":[],"mappings":""}
@@ -3,7 +3,6 @@ import { IResponse } from '../type-message/response';
3
3
  import { IBeamTransfer, IBeamFile, IBeamRecipient } from '../../models/beam.dto';
4
4
  import { IContentShare } from '../../models/content-share.dto';
5
5
  import { BeamVisibility, BeamServeDenyReasonCode, BeamDownloadKind } from '../../../enum/beam.enum';
6
- import { FileScanStatus } from '../../../enum/file-scan-status.enum';
7
6
  export interface IGetBeamData {
8
7
  beamTransfer: IBeamTransfer;
9
8
  }
@@ -32,7 +31,7 @@ export interface IFinalizeBeamData {
32
31
  }
33
32
  export type IFinalizeBeamResponse = IResponse<IFinalizeBeamData>;
34
33
  export interface IBeamPublicFile {
35
- id: string | null;
34
+ id: string;
36
35
  name: string;
37
36
  sizeOctet: number;
38
37
  mimeType: string | null;
@@ -40,7 +39,6 @@ export interface IBeamPublicFile {
40
39
  hasThumbnail: boolean;
41
40
  width: number | null;
42
41
  height: number | null;
43
- scanStatus: FileScanStatus | null;
44
42
  }
45
43
  export interface IBeamPublicView {
46
44
  slug: string;
@@ -31,3 +31,5 @@ export * from './recent.response';
31
31
  export * from './transfer.response';
32
32
  export * from './extraction.response';
33
33
  export * from './monitor.response';
34
+ export * from './probe-scan.response';
35
+ export * from './probe-webhook.response';
@@ -47,4 +47,6 @@ __exportStar(require("./recent.response"), exports);
47
47
  __exportStar(require("./transfer.response"), exports);
48
48
  __exportStar(require("./extraction.response"), exports);
49
49
  __exportStar(require("./monitor.response"), exports);
50
+ __exportStar(require("./probe-scan.response"), exports);
51
+ __exportStar(require("./probe-webhook.response"), exports);
50
52
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/types/interface/api/responses/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAuC;AACvC,mDAAiC;AACjC,0DAAwC;AACxC,4DAA0C;AAC1C,yDAAuC;AACvC,wDAAsC;AACtC,mDAAiC;AACjC,wDAAsC;AACtC,kEAAgD;AAChD,gEAA8C;AAC9C,iEAA+C;AAC/C,0DAAwC;AACxC,yDAAuC;AACvC,kDAAgC;AAChC,yDAAuC;AACvC,kDAAgC;AAChC,2DAAyC;AACzC,kEAAgD;AAChD,gEAA8C;AAC9C,kEAAgD;AAChD,mEAAiD;AACjD,wDAAsC;AACtC,+DAA6C;AAC7C,8DAA4C;AAC5C,kDAAgC;AAChC,qDAAmC;AACnC,iDAA+B;AAC/B,+DAA6C;AAC7C,mDAAiC;AACjC,oDAAkC;AAClC,sDAAoC;AACpC,wDAAsC;AACtC,qDAAmC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/types/interface/api/responses/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAuC;AACvC,mDAAiC;AACjC,0DAAwC;AACxC,4DAA0C;AAC1C,yDAAuC;AACvC,wDAAsC;AACtC,mDAAiC;AACjC,wDAAsC;AACtC,kEAAgD;AAChD,gEAA8C;AAC9C,iEAA+C;AAC/C,0DAAwC;AACxC,yDAAuC;AACvC,kDAAgC;AAChC,yDAAuC;AACvC,kDAAgC;AAChC,2DAAyC;AACzC,kEAAgD;AAChD,gEAA8C;AAC9C,kEAAgD;AAChD,mEAAiD;AACjD,wDAAsC;AACtC,+DAA6C;AAC7C,8DAA4C;AAC5C,kDAAgC;AAChC,qDAAmC;AACnC,iDAA+B;AAC/B,+DAA6C;AAC7C,mDAAiC;AACjC,oDAAkC;AAClC,sDAAoC;AACpC,wDAAsC;AACtC,qDAAmC;AACnC,wDAAsC;AACtC,2DAAyC"}
@@ -0,0 +1,18 @@
1
+ import { IResponse } from '../type-message/response';
2
+ import { BasePaginate } from '../type-message/base-paginate';
3
+ import { ProbeScanStatus, ProbeScanVerdict } from '../../../enum';
4
+ import { IProbeScanDetail, IProbeScanHistoryItem } from '../../models';
5
+ export interface IScanSyncData {
6
+ scanId: string;
7
+ verdict: ProbeScanVerdict;
8
+ viruses: string[];
9
+ }
10
+ export type IScanSyncResponse = IResponse<IScanSyncData>;
11
+ export interface IScanAsyncData {
12
+ scanId: string;
13
+ status: ProbeScanStatus.QUEUED;
14
+ }
15
+ export type IScanAsyncResponse = IResponse<IScanAsyncData>;
16
+ export type IScanResponse = IScanSyncResponse | IScanAsyncResponse;
17
+ export type IGetScanResponse = IResponse<IProbeScanDetail>;
18
+ export type IPaginateScanResponse = IResponse<BasePaginate<IProbeScanHistoryItem>>;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=probe-scan.response.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"probe-scan.response.js","sourceRoot":"","sources":["../../../../../src/types/interface/api/responses/probe-scan.response.ts"],"names":[],"mappings":""}
@@ -0,0 +1,10 @@
1
+ import { IResponse } from '../type-message/response';
2
+ import { IProbeWebhook, IProbeWebhookCreated } from '../../models';
3
+ export type ICreateProbeWebhookResponse = IResponse<IProbeWebhookCreated>;
4
+ export interface IListProbeWebhookData {
5
+ webhooks: IProbeWebhook[];
6
+ }
7
+ export type IListProbeWebhookResponse = IResponse<IListProbeWebhookData>;
8
+ export type IDeleteProbeWebhookResponse = IResponse<{
9
+ ok: true;
10
+ }>;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=probe-webhook.response.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"probe-webhook.response.js","sourceRoot":"","sources":["../../../../../src/types/interface/api/responses/probe-webhook.response.ts"],"names":[],"mappings":""}
@@ -1,6 +1,5 @@
1
1
  import { IAtlasPage } from './atlas-page.dto';
2
2
  import { IAtlas } from './atlas.dto';
3
- import { FileScanStatus } from '../../enum/file-scan-status.enum';
4
3
  export interface IAtlasDocument {
5
4
  id: string;
6
5
  atlasPageId: string;
@@ -13,8 +12,6 @@ export interface IAtlasDocument {
13
12
  sizeOctet: number;
14
13
  mimeType: string;
15
14
  checksum: string;
16
- scanStatus: FileScanStatus | null;
17
- uploadedByUserId: string | null;
18
15
  createdAt?: Date;
19
16
  updatedAt?: Date;
20
17
  atlasPage?: IAtlasPage;
@@ -2,7 +2,6 @@ import { IOrganization } from './organization.dto';
2
2
  import { IUser } from './user.dto';
3
3
  import { IProject } from './project.dto';
4
4
  import { BeamVisibility, BeamDownloadKind } from '../../enum/beam.enum';
5
- import { FileScanStatus } from '../../enum/file-scan-status.enum';
6
5
  export interface IBeamTransfer {
7
6
  id: string;
8
7
  slug: string;
@@ -45,8 +44,6 @@ export interface IBeamFile {
45
44
  downloadCount: number;
46
45
  position: number;
47
46
  createdAt?: Date;
48
- scanStatus: FileScanStatus | null;
49
- uploadedByUserId: string | null;
50
47
  transfer?: IBeamTransfer;
51
48
  }
52
49
  export interface IBeamRecipient {
@@ -1,6 +1,5 @@
1
1
  import { IBoardCard } from './board-card.dto';
2
2
  import { IBoard } from './board.dto';
3
- import { FileScanStatus } from '../../enum/file-scan-status.enum';
4
3
  export interface IBoardCardDocument {
5
4
  id: string;
6
5
  boardCardId: string;
@@ -13,8 +12,6 @@ export interface IBoardCardDocument {
13
12
  checksum: string;
14
13
  mimeType: string;
15
14
  sizeOctet: number;
16
- scanStatus: FileScanStatus | null;
17
- uploadedByUserId: string | null;
18
15
  updatedAt?: Date;
19
16
  createdAt?: Date;
20
17
  boardCard: IBoardCard;
@@ -1,7 +1,6 @@
1
1
  import { ExtractionWarningCode } from '../../../types/enum/extraction-warning.enum';
2
2
  import { ExtractionFeedbackIssueType } from '../../../types/enum/extraction-feedback-issue-type.enum';
3
3
  import { DocumentType } from '../../../types/enum/document-type.enum';
4
- import { FileScanStatus } from '../../enum/file-scan-status.enum';
5
4
  import type { IFieldValue, IExecutionManifest, IGlobalConfidence } from './extraction-plan.dto';
6
5
  export { ExtractionFeedbackIssueType };
7
6
  export type ExtractionMode = 'auto' | 'hint' | 'template';
@@ -52,7 +51,6 @@ export interface IExtractionFile {
52
51
  detectedIban: string | null;
53
52
  detectedBic: string | null;
54
53
  detectedCurrency: string | null;
55
- scanStatus: FileScanStatus | null;
56
54
  createdAt: string;
57
55
  updatedAt: string;
58
56
  }
@@ -1 +1 @@
1
- {"version":3,"file":"extraction.dto.js","sourceRoot":"","sources":["../../../../src/types/interface/models/extraction.dto.ts"],"names":[],"mappings":";;;AAKA,yFAAoF;AA6F3E,sGA7FA,+CAAqB,OA6FA;AA5F9B,iHAAsG;AAM7F,4GANA,iEAA2B,OAMA;AAoRpC,IAAY,sBAYX;AAZD,WAAY,sBAAsB;IAChC,qEAA2C,CAAA;IAC3C,+DAAqC,CAAA;IACrC,+EAAqD,CAAA;IACrD,uEAA6C,CAAA;IAC7C,6DAAmC,CAAA;IACnC,2DAAiC,CAAA;IACjC,6DAAmC,CAAA;IACnC,uEAA6C,CAAA;IAC7C,uDAA6B,CAAA;IAC7B,mEAAyC,CAAA;IACzC,6DAAmC,CAAA;AACrC,CAAC,EAZW,sBAAsB,sCAAtB,sBAAsB,QAYjC;AAEY,QAAA,yBAAyB,GACpC,MAAM,CAAC,MAAM,CAAC,sBAAsB,CAAC,CAAC;AAuCxC,IAAY,2BAGX;AAHD,WAAY,2BAA2B;IACrC,4CAAa,CAAA;IACb,0CAAW,CAAA;AACb,CAAC,EAHW,2BAA2B,2CAA3B,2BAA2B,QAGtC"}
1
+ {"version":3,"file":"extraction.dto.js","sourceRoot":"","sources":["../../../../src/types/interface/models/extraction.dto.ts"],"names":[],"mappings":";;;AAKA,yFAAoF;AA4E3E,sGA5EA,+CAAqB,OA4EA;AA3E9B,iHAAsG;AAK7F,4GALA,iEAA2B,OAKA;AAoQpC,IAAY,sBAYX;AAZD,WAAY,sBAAsB;IAChC,qEAA2C,CAAA;IAC3C,+DAAqC,CAAA;IACrC,+EAAqD,CAAA;IACrD,uEAA6C,CAAA;IAC7C,6DAAmC,CAAA;IACnC,2DAAiC,CAAA;IACjC,6DAAmC,CAAA;IACnC,uEAA6C,CAAA;IAC7C,uDAA6B,CAAA;IAC7B,mEAAyC,CAAA;IACzC,6DAAmC,CAAA;AACrC,CAAC,EAZW,sBAAsB,sCAAtB,sBAAsB,QAYjC;AAEY,QAAA,yBAAyB,GACpC,MAAM,CAAC,MAAM,CAAC,sBAAsB,CAAC,CAAC;AAuCxC,IAAY,2BAGX;AAHD,WAAY,2BAA2B;IACrC,4CAAa,CAAA;IACb,0CAAW,CAAA;AACb,CAAC,EAHW,2BAA2B,2CAA3B,2BAA2B,QAGtC"}
@@ -32,3 +32,6 @@ export * from './content-share.dto';
32
32
  export * from './extraction.dto';
33
33
  export * from './extraction-plan.dto';
34
34
  export * from './extraction-spatial-template.dto';
35
+ export * from './probe-scan.dto';
36
+ export * from './probe-webhook.dto';
37
+ export * from './probe-webhook-delivery.dto';
@@ -48,4 +48,7 @@ __exportStar(require("./content-share.dto"), exports);
48
48
  __exportStar(require("./extraction.dto"), exports);
49
49
  __exportStar(require("./extraction-plan.dto"), exports);
50
50
  __exportStar(require("./extraction-spatial-template.dto"), exports);
51
+ __exportStar(require("./probe-scan.dto"), exports);
52
+ __exportStar(require("./probe-webhook.dto"), exports);
53
+ __exportStar(require("./probe-webhook-delivery.dto"), exports);
51
54
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/types/interface/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,qDAAmC;AACnC,gDAA8B;AAC9B,8CAA4B;AAC5B,uDAAqC;AACrC,oDAAkC;AAClC,mDAAiC;AACjC,2DAAyC;AACzC,6CAA2B;AAC3B,6CAA2B;AAC3B,sDAAoC;AACpC,8DAA4C;AAC5C,2DAAyC;AACzC,6DAA2C;AAC3C,mDAAiC;AACjC,yDAAuC;AACvC,6CAA2B;AAC3B,8CAA4B;AAC5B,uDAAqC;AACrC,mDAAiC;AACjC,6DAA2C;AAC3C,iEAA+C;AAC/C,2DAAyC;AACzC,4DAA0C;AAC1C,yDAAuC;AACvC,0DAAwC;AACxC,qDAAmC;AACnC,oDAAkC;AAClC,6CAA2B;AAC3B,4CAA0B;AAC1B,sDAAoC;AACpC,mDAAiC;AACjC,wDAAsC;AACtC,oEAAkD"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/types/interface/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,qDAAmC;AACnC,gDAA8B;AAC9B,8CAA4B;AAC5B,uDAAqC;AACrC,oDAAkC;AAClC,mDAAiC;AACjC,2DAAyC;AACzC,6CAA2B;AAC3B,6CAA2B;AAC3B,sDAAoC;AACpC,8DAA4C;AAC5C,2DAAyC;AACzC,6DAA2C;AAC3C,mDAAiC;AACjC,yDAAuC;AACvC,6CAA2B;AAC3B,8CAA4B;AAC5B,uDAAqC;AACrC,mDAAiC;AACjC,6DAA2C;AAC3C,iEAA+C;AAC/C,2DAAyC;AACzC,4DAA0C;AAC1C,yDAAuC;AACvC,0DAAwC;AACxC,qDAAmC;AACnC,oDAAkC;AAClC,6CAA2B;AAC3B,4CAA0B;AAC1B,sDAAoC;AACpC,mDAAiC;AACjC,wDAAsC;AACtC,oEAAkD;AAClD,mDAAiC;AACjC,sDAAoC;AACpC,+DAA6C"}
@@ -0,0 +1,22 @@
1
+ import { ProbeScanMode, ProbeScanStatus, ProbeScanVerdict } from '../../enum';
2
+ export interface IProbeScanDetail {
3
+ scanId: string;
4
+ status: ProbeScanStatus;
5
+ verdict: ProbeScanVerdict | null;
6
+ viruses: string[] | null;
7
+ context: Record<string, unknown> | null;
8
+ }
9
+ export interface IProbeScanHistoryItem {
10
+ scanId: string;
11
+ fileName: string;
12
+ fileSize: number;
13
+ mimeType: string;
14
+ verdict: ProbeScanVerdict | null;
15
+ viruses: string[] | null;
16
+ mode: ProbeScanMode;
17
+ status: ProbeScanStatus;
18
+ context: Record<string, unknown> | null;
19
+ startedAt: Date;
20
+ finishedAt: Date | null;
21
+ createdAt: Date;
22
+ }
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=file-scan.dto.js.map
3
+ //# sourceMappingURL=probe-scan.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"probe-scan.dto.js","sourceRoot":"","sources":["../../../../src/types/interface/models/probe-scan.dto.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ import { ProbeScanVerdict } from '../../enum';
2
+ export interface IProbeWebhookDeliveryPayload {
3
+ scanId: string;
4
+ context: Record<string, unknown> | null;
5
+ verdict: ProbeScanVerdict;
6
+ viruses: string[];
7
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=probe-webhook-delivery.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"probe-webhook-delivery.dto.js","sourceRoot":"","sources":["../../../../src/types/interface/models/probe-webhook-delivery.dto.ts"],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ export interface IProbeWebhook {
2
+ id: string;
3
+ callbackUrl: string;
4
+ active: boolean;
5
+ createdAt: Date;
6
+ }
7
+ export interface IProbeWebhookCreated extends IProbeWebhook {
8
+ secret: string;
9
+ }
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=file-scan.request.js.map
3
+ //# sourceMappingURL=probe-webhook.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"probe-webhook.dto.js","sourceRoot":"","sources":["../../../../src/types/interface/models/probe-webhook.dto.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const __1 = require("..");
4
+ const _verdicts = { clean: true, infected: true };
5
+ const _modes = { sync: true, async: true };
6
+ const _statuses = {
7
+ queued: true,
8
+ scanning: true,
9
+ done: true,
10
+ error: true,
11
+ };
12
+ const _scanDetail = {
13
+ scanId: 's1',
14
+ status: __1.ProbeScanStatus.DONE,
15
+ verdict: __1.ProbeScanVerdict.CLEAN,
16
+ viruses: [],
17
+ context: null,
18
+ };
19
+ const _historyItem = {
20
+ scanId: 's1',
21
+ fileName: 'invoice.pdf',
22
+ fileSize: 1024,
23
+ mimeType: 'application/pdf',
24
+ verdict: __1.ProbeScanVerdict.INFECTED,
25
+ viruses: ['Eicar-Test-Signature'],
26
+ mode: __1.ProbeScanMode.ASYNC,
27
+ status: __1.ProbeScanStatus.DONE,
28
+ context: { applicationFileId: 'af1' },
29
+ startedAt: new Date(),
30
+ finishedAt: new Date(),
31
+ createdAt: new Date(),
32
+ };
33
+ const _scanSyncData = {
34
+ scanId: 's1',
35
+ verdict: __1.ProbeScanVerdict.CLEAN,
36
+ viruses: [],
37
+ };
38
+ const _scanAsyncData = { scanId: 's1', status: __1.ProbeScanStatus.QUEUED };
39
+ const _webhook = {
40
+ id: 'w1',
41
+ callbackUrl: 'https://example.com/hook',
42
+ active: true,
43
+ createdAt: new Date(),
44
+ };
45
+ const _webhookCreated = { ..._webhook, secret: 'shh' };
46
+ const _deliveryPayload = {
47
+ scanId: 's1',
48
+ context: null,
49
+ verdict: __1.ProbeScanVerdict.INFECTED,
50
+ viruses: ['Eicar-Test-Signature'],
51
+ };
52
+ void _verdicts;
53
+ void _modes;
54
+ void _statuses;
55
+ void _scanDetail;
56
+ void _historyItem;
57
+ void _scanSyncData;
58
+ void _scanAsyncData;
59
+ void _webhook;
60
+ void _webhookCreated;
61
+ void _deliveryPayload;
62
+ //# sourceMappingURL=probe.dto.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"probe.dto.test.js","sourceRoot":"","sources":["../../../src/types/tests/probe.dto.test.ts"],"names":[],"mappings":";;AAOA,0BAWY;AAMZ,MAAM,SAAS,GAAmC,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AAClF,MAAM,MAAM,GAAgC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AACxE,MAAM,SAAS,GAAkC;IAC/C,MAAM,EAAE,IAAI;IACZ,QAAQ,EAAE,IAAI;IACd,IAAI,EAAE,IAAI;IACV,KAAK,EAAE,IAAI;CACZ,CAAC;AAGF,MAAM,WAAW,GAAqB;IACpC,MAAM,EAAE,IAAI;IACZ,MAAM,EAAE,mBAAe,CAAC,IAAI;IAC5B,OAAO,EAAE,oBAAgB,CAAC,KAAK;IAC/B,OAAO,EAAE,EAAE;IACX,OAAO,EAAE,IAAI;CACd,CAAC;AAIF,MAAM,YAAY,GAA0B;IAC1C,MAAM,EAAE,IAAI;IACZ,QAAQ,EAAE,aAAa;IACvB,QAAQ,EAAE,IAAI;IACd,QAAQ,EAAE,iBAAiB;IAC3B,OAAO,EAAE,oBAAgB,CAAC,QAAQ;IAClC,OAAO,EAAE,CAAC,sBAAsB,CAAC;IACjC,IAAI,EAAE,iBAAa,CAAC,KAAK;IACzB,MAAM,EAAE,mBAAe,CAAC,IAAI;IAC5B,OAAO,EAAE,EAAE,iBAAiB,EAAE,KAAK,EAAE;IACrC,SAAS,EAAE,IAAI,IAAI,EAAE;IACrB,UAAU,EAAE,IAAI,IAAI,EAAE;IACtB,SAAS,EAAE,IAAI,IAAI,EAAE;CACtB,CAAC;AAGF,MAAM,aAAa,GAAkB;IACnC,MAAM,EAAE,IAAI;IACZ,OAAO,EAAE,oBAAgB,CAAC,KAAK;IAC/B,OAAO,EAAE,EAAE;CACZ,CAAC;AACF,MAAM,cAAc,GAAmB,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,mBAAe,CAAC,MAAM,EAAE,CAAC;AAGxF,MAAM,QAAQ,GAAkB;IAC9B,EAAE,EAAE,IAAI;IACR,WAAW,EAAE,0BAA0B;IACvC,MAAM,EAAE,IAAI;IACZ,SAAS,EAAE,IAAI,IAAI,EAAE;CACtB,CAAC;AACF,MAAM,eAAe,GAAyB,EAAE,GAAG,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;AAI7E,MAAM,gBAAgB,GAAiC;IACrD,MAAM,EAAE,IAAI;IACZ,OAAO,EAAE,IAAI;IACb,OAAO,EAAE,oBAAgB,CAAC,QAAQ;IAClC,OAAO,EAAE,CAAC,sBAAsB,CAAC;CAClC,CAAC;AAEF,KAAK,SAAS,CAAC;AACf,KAAK,MAAM,CAAC;AACZ,KAAK,SAAS,CAAC;AACf,KAAK,WAAW,CAAC;AACjB,KAAK,YAAY,CAAC;AAClB,KAAK,aAAa,CAAC;AACnB,KAAK,cAAc,CAAC;AACpB,KAAK,QAAQ,CAAC;AACd,KAAK,eAAe,CAAC;AACrB,KAAK,gBAAgB,CAAC"}
@@ -4,3 +4,4 @@ export * from './shape.utils';
4
4
  export * from './icons.utils';
5
5
  export * from './enum.utils';
6
6
  export * from './extraction-webhook.utils';
7
+ export * from './probe-webhook-signature.utils';
@@ -20,4 +20,5 @@ __exportStar(require("./shape.utils"), exports);
20
20
  __exportStar(require("./icons.utils"), exports);
21
21
  __exportStar(require("./enum.utils"), exports);
22
22
  __exportStar(require("./extraction-webhook.utils"), exports);
23
+ __exportStar(require("./probe-webhook-signature.utils"), exports);
23
24
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B;AAC9B,gDAA8B;AAC9B,gDAA8B;AAC9B,gDAA8B;AAC9B,+CAA6B;AAC7B,6DAA2C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B;AAC9B,gDAA8B;AAC9B,gDAA8B;AAC9B,gDAA8B;AAC9B,+CAA6B;AAC7B,6DAA2C;AAC3C,kEAAgD"}
@@ -0,0 +1,8 @@
1
+ /// <reference types="node" />
2
+ /// <reference types="node" />
3
+ export interface VerifyProbeWebhookSignatureInput {
4
+ rawBody: string | Buffer;
5
+ signatureHeader: string | undefined;
6
+ secret: string;
7
+ }
8
+ export declare function verifyProbeWebhookSignature(input: VerifyProbeWebhookSignatureInput): boolean;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.verifyProbeWebhookSignature = void 0;
4
+ function verifyProbeWebhookSignature(input) {
5
+ if (!input.signatureHeader || !input.secret)
6
+ return false;
7
+ const crypto = require('crypto');
8
+ const computed = crypto
9
+ .createHmac('sha256', input.secret)
10
+ .update(input.rawBody)
11
+ .digest('hex');
12
+ if (input.signatureHeader.length !== computed.length)
13
+ return false;
14
+ try {
15
+ return crypto.timingSafeEqual(Buffer.from(input.signatureHeader, 'hex'), Buffer.from(computed, 'hex'));
16
+ }
17
+ catch {
18
+ return false;
19
+ }
20
+ }
21
+ exports.verifyProbeWebhookSignature = verifyProbeWebhookSignature;
22
+ //# sourceMappingURL=probe-webhook-signature.utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"probe-webhook-signature.utils.js","sourceRoot":"","sources":["../../src/utils/probe-webhook-signature.utils.ts"],"names":[],"mappings":";;;AAiCA,SAAgB,2BAA2B,CAAC,KAAuC;IACjF,IAAI,CAAC,KAAK,CAAC,eAAe,IAAI,CAAC,KAAK,CAAC,MAAM;QAAE,OAAO,KAAK,CAAC;IAG1D,MAAM,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;IACjC,MAAM,QAAQ,GAAW,MAAM;SAC5B,UAAU,CAAC,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC;SAClC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC;SACrB,MAAM,CAAC,KAAK,CAAC,CAAC;IAEjB,IAAI,KAAK,CAAC,eAAe,CAAC,MAAM,KAAK,QAAQ,CAAC,MAAM;QAAE,OAAO,KAAK,CAAC;IAEnE,IAAI,CAAC;QACH,OAAO,MAAM,CAAC,eAAe,CAC3B,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,eAAe,EAAE,KAAK,CAAC,EACzC,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,KAAK,CAAC,CAC7B,CAAC;IACJ,CAAC;IAAC,MAAM,CAAC;QAGP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAtBD,kEAsBC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abyss-project/tools",
3
- "version": "2.1.0",
3
+ "version": "2.2.0",
4
4
  "description": "Core package to interact with Abyss-Project Tools",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/api/index.ts CHANGED
@@ -54,3 +54,9 @@ export * from './extraction-plan-preset.api';
54
54
 
55
55
  // Monitor (liveness)
56
56
  export * from './monitor.api';
57
+
58
+ // Probe (antivirus scanning)
59
+ export * from './probe-scan.api';
60
+ export * from './probe-webhook.api';
61
+ export * from './probe-scan.application.api';
62
+ export * from './probe-webhook.application.api';
@@ -0,0 +1,21 @@
1
+ // Type-level compile test for the probe-scan api surface.
2
+ // No jest runner in this SDK package; compile guard only (mirrors this
3
+ // package's own extraction-plan-preset.api.test.ts).
4
+ // Run: npx tsc --noEmit (from packages/abyss_tools_core), or `npm run build`.
5
+
6
+ import * as api from './probe-scan.api';
7
+
8
+ // All five functions must be exported with these exact signatures.
9
+ const _scan: typeof api.scan = api.scan;
10
+ const _scanSync: typeof api.scanSync = api.scanSync;
11
+ const _scanAsync: typeof api.scanAsync = api.scanAsync;
12
+ const _getScan: typeof api.getScan = api.getScan;
13
+ const _listScans: typeof api.listScans = api.listScans;
14
+
15
+ void _scan;
16
+ void _scanSync;
17
+ void _scanAsync;
18
+ void _getScan;
19
+ void _listScans;
20
+
21
+ export {};