@abyss-project/tools 3.0.0 → 3.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.
- package/.eslintrc.js +1 -2
- package/README.md +1 -1
- package/dist/api/atlas-document.api.d.ts +2 -1
- package/dist/api/atlas-document.api.js +5 -1
- package/dist/api/atlas-document.api.js.map +1 -1
- package/dist/api/atlas-group.api.js.map +1 -1
- package/dist/api/atlas-page.api.js.map +1 -1
- package/dist/api/atlas.api.js +3 -3
- package/dist/api/atlas.api.js.map +1 -1
- package/dist/api/atlas.public.api.js.map +1 -1
- package/dist/api/board-card.api.js.map +1 -1
- package/dist/api/board-column.api.js.map +1 -1
- package/dist/api/board-label.api.js +1 -2
- package/dist/api/board-label.api.js.map +1 -1
- package/dist/api/board.api.js +7 -5
- package/dist/api/board.api.js.map +1 -1
- package/dist/api/draw.api.js +1 -2
- package/dist/api/draw.api.js.map +1 -1
- package/dist/api/draw.public.api.js.map +1 -1
- package/dist/api/extraction-plan-preset.api.js +19 -6
- package/dist/api/extraction-plan-preset.api.js.map +1 -1
- package/dist/api/extraction-plan-preset.api.test.js +17 -7
- package/dist/api/extraction-plan-preset.api.test.js.map +1 -1
- package/dist/api/extraction-settings.api.js.map +1 -1
- package/dist/api/extraction.api.d.ts +3 -4
- package/dist/api/extraction.api.js +41 -80
- package/dist/api/extraction.api.js.map +1 -1
- package/dist/api/extraction.application.api.d.ts +4 -0
- package/dist/api/extraction.application.api.js +23 -0
- package/dist/api/extraction.application.api.js.map +1 -0
- package/dist/api/extraction.application.api.test.d.ts +1 -0
- package/dist/api/extraction.application.api.test.js +69 -0
- package/dist/api/extraction.application.api.test.js.map +1 -0
- package/dist/api/index.d.ts +1 -0
- package/dist/api/index.js +1 -0
- package/dist/api/index.js.map +1 -1
- package/dist/api/probe-scan.api.d.ts +4 -11
- package/dist/api/probe-scan.api.js +18 -28
- package/dist/api/probe-scan.api.js.map +1 -1
- package/dist/api/probe-scan.api.test.js +27 -7
- package/dist/api/probe-scan.api.test.js.map +1 -1
- package/dist/api/probe-scan.application.api.d.ts +4 -4
- package/dist/api/probe-scan.application.api.js +2 -2
- package/dist/api/probe-scan.application.api.js.map +1 -1
- package/dist/api/probe-scan.application.api.test.js +21 -7
- package/dist/api/probe-scan.application.api.test.js.map +1 -1
- package/dist/api/probe-webhook.api.test.js +17 -7
- package/dist/api/probe-webhook.api.test.js.map +1 -1
- package/dist/api/probe-webhook.application.api.d.ts +1 -1
- package/dist/api/probe-webhook.application.api.test.js +17 -7
- package/dist/api/probe-webhook.application.api.test.js.map +1 -1
- package/dist/api/retrospective.api.js +2 -1
- package/dist/api/retrospective.api.js.map +1 -1
- package/dist/api/short-link.admin.api.js.map +1 -1
- package/dist/api/short-link.api.js.map +1 -1
- package/dist/api/short-link.public.api.js.map +1 -1
- package/dist/api/tag.api.js.map +1 -1
- package/dist/constants/atlas.constants.js +1 -1
- package/dist/constants/atlas.constants.js.map +1 -1
- package/dist/constants/extract.constants.d.ts +4 -0
- package/dist/constants/extract.constants.js +91 -0
- package/dist/constants/extract.constants.js.map +1 -0
- package/dist/constants/index.d.ts +1 -0
- package/dist/constants/index.js +1 -0
- package/dist/constants/index.js.map +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.js +22 -7
- package/dist/index.js.map +1 -1
- package/dist/server-sent-events/server-sent-events.manager.d.ts +1 -2
- package/dist/server-sent-events/server-sent-events.manager.js +1 -2
- package/dist/server-sent-events/server-sent-events.manager.js.map +1 -1
- package/dist/types/enum/document-type.enum.d.ts +1 -0
- package/dist/types/enum/document-type.enum.js +1 -0
- package/dist/types/enum/document-type.enum.js.map +1 -1
- package/dist/types/enum/extract-field-format.enum.d.ts +7 -0
- package/dist/types/enum/extract-field-format.enum.js +12 -0
- package/dist/types/enum/extract-field-format.enum.js.map +1 -0
- package/dist/types/enum/extract-field-key.enum.d.ts +59 -0
- package/dist/types/enum/extract-field-key.enum.js +64 -0
- package/dist/types/enum/extract-field-key.enum.js.map +1 -0
- package/dist/types/enum/extraction-warning.enum.d.ts +4 -1
- package/dist/types/enum/extraction-warning.enum.js +3 -0
- package/dist/types/enum/extraction-warning.enum.js.map +1 -1
- package/dist/types/enum/index.d.ts +2 -0
- package/dist/types/enum/index.js +2 -0
- package/dist/types/enum/index.js.map +1 -1
- package/dist/types/enum/rcb-bank.enum.js +255 -39
- package/dist/types/enum/rcb-bank.enum.js.map +1 -1
- package/dist/types/interface/api/requests/abyss.admin.request.d.ts +1 -1
- package/dist/types/interface/api/requests/atlas-document.request.d.ts +6 -0
- package/dist/types/interface/api/requests/board-card-document.request.d.ts +1 -0
- package/dist/types/interface/api/requests/extraction.request.d.ts +12 -2
- package/dist/types/interface/api/responses/atlas-document.response.d.ts +6 -4
- package/dist/types/interface/api/responses/board-card-document.response.d.ts +2 -4
- package/dist/types/interface/api/responses/draw.public.response.d.ts +2 -0
- package/dist/types/interface/models/extraction-fetched-provenance.dto.test.js +8 -2
- package/dist/types/interface/models/extraction-fetched-provenance.dto.test.js.map +1 -1
- package/dist/types/interface/models/extraction-plan.dto.test.js +6 -1
- package/dist/types/interface/models/extraction-plan.dto.test.js.map +1 -1
- package/dist/types/interface/models/extraction-spatial-template.dto.test.js +20 -3
- package/dist/types/interface/models/extraction-spatial-template.dto.test.js.map +1 -1
- package/dist/types/interface/models/extraction.dto.d.ts +13 -0
- package/dist/types/interface/models/extraction.dto.js.map +1 -1
- package/dist/types/interface/models/index.d.ts +1 -0
- package/dist/types/interface/models/index.js +1 -0
- package/dist/types/interface/models/index.js.map +1 -1
- package/dist/types/interface/models/project.dto.d.ts +1 -1
- package/dist/types/interface/models/short-link.dto.d.ts +8 -0
- package/dist/types/interface/models/upload-session.dto.d.ts +8 -0
- package/dist/types/interface/models/upload-session.dto.js +3 -0
- package/dist/types/interface/models/upload-session.dto.js.map +1 -0
- package/dist/types/interface/models/user.dto.d.ts +1 -0
- package/dist/utils/extraction-webhook.utils.d.ts +0 -2
- package/dist/utils/extraction-webhook.utils.js +1 -2
- package/dist/utils/extraction-webhook.utils.js.map +1 -1
- package/dist/utils/probe-scan-cost.utils.d.ts +1 -1
- package/dist/utils/probe-webhook-signature.utils.d.ts +0 -2
- package/dist/utils/probe-webhook-signature.utils.js +1 -2
- package/dist/utils/probe-webhook-signature.utils.js.map +1 -1
- package/package.json +16 -18
- package/src/api/atlas-document.api.ts +20 -3
- package/src/api/atlas-group.api.ts +4 -1
- package/src/api/atlas-page.api.ts +12 -6
- package/src/api/atlas.api.ts +12 -7
- package/src/api/atlas.public.api.ts +3 -1
- package/src/api/board-card.api.ts +6 -3
- package/src/api/board-column.api.ts +4 -1
- package/src/api/board-label.api.ts +7 -3
- package/src/api/board.api.ts +19 -10
- package/src/api/draw.api.ts +16 -12
- package/src/api/draw.public.api.ts +3 -1
- package/src/api/extraction-plan-preset.api.ts +64 -18
- package/src/api/extraction-settings.api.ts +2 -8
- package/src/api/extraction.api.ts +82 -84
- package/src/api/extraction.application.api.test.ts +55 -0
- package/src/api/extraction.application.api.ts +73 -0
- package/src/api/index.ts +1 -0
- package/src/api/probe-scan.api.test.ts +26 -0
- package/src/api/probe-scan.api.ts +66 -54
- package/src/api/probe-scan.application.api.test.ts +14 -0
- package/src/api/probe-scan.application.api.ts +5 -5
- package/src/api/retrospective.api.ts +8 -5
- package/src/api/short-link.admin.api.ts +14 -4
- package/src/api/short-link.api.ts +39 -17
- package/src/api/short-link.public.api.ts +25 -11
- package/src/api/tag.api.ts +3 -1
- package/src/constants/atlas.constants.ts +1 -1
- package/src/constants/extract.constants.ts +109 -0
- package/src/constants/index.ts +1 -0
- package/src/index.ts +19 -0
- package/src/server-sent-events/server-sent-events.manager.ts +5 -3
- package/src/types/enum/document-type.enum.ts +1 -0
- package/src/types/enum/extract-field-format.enum.ts +16 -0
- package/src/types/enum/extract-field-key.enum.ts +77 -0
- package/src/types/enum/extraction-warning.enum.ts +57 -0
- package/src/types/enum/index.ts +2 -0
- package/src/types/enum/rcb-bank.enum.ts +255 -41
- package/src/types/interface/api/requests/abyss.admin.request.ts +2 -1
- package/src/types/interface/api/requests/atlas-document.request.ts +14 -0
- package/src/types/interface/api/requests/board-card-document.request.ts +5 -0
- package/src/types/interface/api/requests/extraction.request.ts +23 -0
- package/src/types/interface/api/requests/probe-scan.request.ts +5 -1
- package/src/types/interface/api/responses/atlas-document.response.ts +12 -4
- package/src/types/interface/api/responses/atlas-group.response.ts +1 -0
- package/src/types/interface/api/responses/atlas-page.response.ts +1 -0
- package/src/types/interface/api/responses/atlas.response.ts +1 -0
- package/src/types/interface/api/responses/beam.response.ts +2 -0
- package/src/types/interface/api/responses/board-card-checklist.response.ts +3 -0
- package/src/types/interface/api/responses/board-card-comment.response.ts +1 -0
- package/src/types/interface/api/responses/board-card-document.response.ts +6 -4
- package/src/types/interface/api/responses/board-card.response.ts +3 -0
- package/src/types/interface/api/responses/board-column.response.ts +1 -0
- package/src/types/interface/api/responses/board-label.response.ts +3 -0
- package/src/types/interface/api/responses/board.response.ts +1 -0
- package/src/types/interface/api/responses/draw.public.response.ts +3 -0
- package/src/types/interface/api/responses/draw.response.ts +1 -0
- package/src/types/interface/api/responses/retrospective-card.response.ts +1 -0
- package/src/types/interface/api/responses/retrospective-section.response.ts +1 -0
- package/src/types/interface/api/responses/retrospective.response.ts +3 -1
- package/src/types/interface/api/responses/short-link.admin.response.ts +1 -0
- package/src/types/interface/api/responses/short-link.response.ts +1 -0
- package/src/types/interface/api/responses/tag.response.ts +2 -0
- package/src/types/interface/models/content-share.dto.ts +5 -1
- package/src/types/interface/models/extraction-fetched-provenance.dto.test.ts +20 -9
- package/src/types/interface/models/extraction-plan.dto.test.ts +17 -4
- package/src/types/interface/models/extraction-spatial-template.dto.test.ts +26 -5
- package/src/types/interface/models/extraction.dto.ts +35 -0
- package/src/types/interface/models/index.ts +1 -0
- package/src/types/interface/models/probe-webhook.dto.ts +3 -4
- package/src/types/interface/models/project.dto.ts +2 -1
- package/src/types/interface/models/short-link.dto.ts +2 -0
- package/src/types/interface/models/upload-session.dto.ts +24 -0
- package/src/types/interface/models/user.dto.ts +3 -0
- package/src/utils/extraction-webhook.utils.ts +1 -1
- package/src/utils/probe-webhook-signature.utils.ts +1 -1
- package/tsconfig.check.json +15 -0
|
@@ -57,6 +57,14 @@ export interface IShortLinkWithStats extends IShortLink {
|
|
|
57
57
|
utmSource: string;
|
|
58
58
|
clicks: number;
|
|
59
59
|
}[];
|
|
60
|
+
clicksByUtmMedium: {
|
|
61
|
+
utmMedium: string;
|
|
62
|
+
clicks: number;
|
|
63
|
+
}[];
|
|
64
|
+
clicksByUtmCampaign: {
|
|
65
|
+
utmCampaign: string;
|
|
66
|
+
clicks: number;
|
|
67
|
+
}[];
|
|
60
68
|
clicksByLanguage: {
|
|
61
69
|
language: string;
|
|
62
70
|
clicks: number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upload-session.dto.js","sourceRoot":"","sources":["../../../../src/types/interface/models/upload-session.dto.ts"],"names":[],"mappings":""}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.verifyExtractionWebhook =
|
|
3
|
+
exports.verifyExtractionWebhook = verifyExtractionWebhook;
|
|
4
4
|
function verifyExtractionWebhook(input) {
|
|
5
5
|
if (!input.signatureHeader || !input.secret)
|
|
6
6
|
return false;
|
|
@@ -14,5 +14,4 @@ function verifyExtractionWebhook(input) {
|
|
|
14
14
|
return false;
|
|
15
15
|
return crypto.timingSafeEqual(Buffer.from(provided, 'hex'), Buffer.from(computed, 'hex'));
|
|
16
16
|
}
|
|
17
|
-
exports.verifyExtractionWebhook = verifyExtractionWebhook;
|
|
18
17
|
//# sourceMappingURL=extraction-webhook.utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extraction-webhook.utils.js","sourceRoot":"","sources":["../../src/utils/extraction-webhook.utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"extraction-webhook.utils.js","sourceRoot":"","sources":["../../src/utils/extraction-webhook.utils.ts"],"names":[],"mappings":";;AAkBA,0DAWC;AAXD,SAAgB,uBAAuB,CAAC,KAAmC;IACzE,IAAI,CAAC,KAAK,CAAC,eAAe,IAAI,CAAC,KAAK,CAAC,MAAM;QAAE,OAAO,KAAK,CAAC;IAE1D,MAAM,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;IACjC,MAAM,QAAQ,GAAG,KAAK,CAAC,eAAe,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;IAC/D,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;IACjB,IAAI,QAAQ,CAAC,MAAM,KAAK,QAAQ,CAAC,MAAM;QAAE,OAAO,KAAK,CAAC;IACtD,OAAO,MAAM,CAAC,eAAe,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC;AAC5F,CAAC"}
|
|
@@ -2,4 +2,4 @@ import { ProbeScanMode } from '../types';
|
|
|
2
2
|
export declare const PROBE_SCAN_COST_BASE = 1;
|
|
3
3
|
export declare const PROBE_SCAN_COST_K_MB = 1;
|
|
4
4
|
export declare const PROBE_SCAN_COST_MODE_WEIGHT: Record<ProbeScanMode, number>;
|
|
5
|
-
export declare const estimateProbeScanCost: (sizeOctet: number, mode: ProbeScanMode |
|
|
5
|
+
export declare const estimateProbeScanCost: (sizeOctet: number, mode: ProbeScanMode | "sync" | "async") => number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.verifyProbeWebhookSignature =
|
|
3
|
+
exports.verifyProbeWebhookSignature = verifyProbeWebhookSignature;
|
|
4
4
|
function verifyProbeWebhookSignature(input) {
|
|
5
5
|
if (!input.signatureHeader || !input.secret)
|
|
6
6
|
return false;
|
|
@@ -18,5 +18,4 @@ function verifyProbeWebhookSignature(input) {
|
|
|
18
18
|
return false;
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
-
exports.verifyProbeWebhookSignature = verifyProbeWebhookSignature;
|
|
22
21
|
//# sourceMappingURL=probe-webhook-signature.utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"probe-webhook-signature.utils.js","sourceRoot":"","sources":["../../src/utils/probe-webhook-signature.utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"probe-webhook-signature.utils.js","sourceRoot":"","sources":["../../src/utils/probe-webhook-signature.utils.ts"],"names":[],"mappings":";;AAiCA,kEAsBC;AAtBD,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"}
|
package/package.json
CHANGED
|
@@ -1,21 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abyss-project/tools",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.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",
|
|
7
|
-
"publishConfig": {
|
|
8
|
-
"main": "dist/index.js",
|
|
9
|
-
"types": "dist/index.d.ts"
|
|
10
|
-
},
|
|
11
|
-
"scripts": {
|
|
12
|
-
"lint": "eslint \"{src,apps,libs,test,core}/**/*.ts\" --fix",
|
|
13
|
-
"lint:check": "eslint \"{src,apps,libs,test,core}/**/*.ts\" --max-warnings 0",
|
|
14
|
-
"tsc": "tsc",
|
|
15
|
-
"build": "tsc",
|
|
16
|
-
"prepublishOnly": "tsc",
|
|
17
|
-
"dev": "tsc --watch"
|
|
18
|
-
},
|
|
19
7
|
"repository": {
|
|
20
8
|
"type": "git",
|
|
21
9
|
"url": "https://gitlab.com/abyss-group"
|
|
@@ -23,6 +11,9 @@
|
|
|
23
11
|
"keywords": [],
|
|
24
12
|
"author": "scylla",
|
|
25
13
|
"license": "ISC",
|
|
14
|
+
"engines": {
|
|
15
|
+
"node": ">=19.8"
|
|
16
|
+
},
|
|
26
17
|
"dependencies": {
|
|
27
18
|
"axios": "^1.6.0",
|
|
28
19
|
"axios-retry": "^4.5.0",
|
|
@@ -39,9 +30,9 @@
|
|
|
39
30
|
"@types/jsonwebtoken": "^8.5.0",
|
|
40
31
|
"@types/node": "^20.11.0",
|
|
41
32
|
"@types/uuid": "^8.3.0",
|
|
42
|
-
"@typescript-eslint/eslint-plugin": "
|
|
43
|
-
"@typescript-eslint/parser": "
|
|
44
|
-
"eslint": "^
|
|
33
|
+
"@typescript-eslint/eslint-plugin": "8.71.0",
|
|
34
|
+
"@typescript-eslint/parser": "8.71.0",
|
|
35
|
+
"eslint": "^8.57.1",
|
|
45
36
|
"eslint-config-airbnb-base": "^14.2.1",
|
|
46
37
|
"eslint-config-prettier": "^8.3.0",
|
|
47
38
|
"eslint-config-standard": "^16.0.3",
|
|
@@ -52,6 +43,13 @@
|
|
|
52
43
|
"eslint-plugin-promise": "^5.1.0",
|
|
53
44
|
"prettier": "2.3.1",
|
|
54
45
|
"tsc-watch": "^4.6.2",
|
|
55
|
-
"typescript": "5.
|
|
46
|
+
"typescript": "5.9.3"
|
|
47
|
+
},
|
|
48
|
+
"scripts": {
|
|
49
|
+
"lint": "eslint \"{src,apps,libs,test,core}/**/*.ts\" --fix",
|
|
50
|
+
"lint:check": "eslint \"{src,apps,libs,test,core}/**/*.ts\" --max-warnings 0",
|
|
51
|
+
"tsc": "tsc",
|
|
52
|
+
"build": "tsc",
|
|
53
|
+
"dev": "tsc --watch"
|
|
56
54
|
}
|
|
57
|
-
}
|
|
55
|
+
}
|
|
@@ -12,6 +12,8 @@ import {
|
|
|
12
12
|
IPaginateAtlasDocumentResponse,
|
|
13
13
|
IListAtlasDocumentParams,
|
|
14
14
|
IListAtlasDocumentResponse,
|
|
15
|
+
IGetPublicAccessIdAtlasDocumentParams,
|
|
16
|
+
IGetPublicAccessIdAtlasDocumentResponse,
|
|
15
17
|
} from '../types';
|
|
16
18
|
|
|
17
19
|
export const getAtlasDocument = async (
|
|
@@ -51,9 +53,12 @@ export const paginateAtlasDocument = async (
|
|
|
51
53
|
query?: IPaginateAtlasDocumentQuery,
|
|
52
54
|
): Promise<IPaginateAtlasDocumentResponse> => {
|
|
53
55
|
return (
|
|
54
|
-
await AbyssToolsCore.axios.get<IPaginateAtlasDocumentResponse>(
|
|
55
|
-
params
|
|
56
|
-
|
|
56
|
+
await AbyssToolsCore.axios.get<IPaginateAtlasDocumentResponse>(
|
|
57
|
+
`atlas/${params.atlasId}/document`,
|
|
58
|
+
{
|
|
59
|
+
params: query,
|
|
60
|
+
},
|
|
61
|
+
)
|
|
57
62
|
).data;
|
|
58
63
|
};
|
|
59
64
|
|
|
@@ -66,3 +71,15 @@ export const listAtlasDocument = async (
|
|
|
66
71
|
)
|
|
67
72
|
).data;
|
|
68
73
|
};
|
|
74
|
+
|
|
75
|
+
// IDOR fix — scoped server-side resolve of an AtlasDocument's storage
|
|
76
|
+
// publicAccessId, replacing an unscoped front→storage applicationFile.get.
|
|
77
|
+
export const getPublicAccessIdAtlasDocument = async (
|
|
78
|
+
params: IGetPublicAccessIdAtlasDocumentParams,
|
|
79
|
+
): Promise<IGetPublicAccessIdAtlasDocumentResponse> => {
|
|
80
|
+
return (
|
|
81
|
+
await AbyssToolsCore.axios.get<IGetPublicAccessIdAtlasDocumentResponse>(
|
|
82
|
+
`atlas/${params.atlasId}/document/page/${params.atlasPageId}/public-access/${params.storageFileId}`,
|
|
83
|
+
)
|
|
84
|
+
).data;
|
|
85
|
+
};
|
|
@@ -64,6 +64,9 @@ export const createAtlasGroup = async (
|
|
|
64
64
|
body: ICreateAtlasGroupBody,
|
|
65
65
|
): Promise<ICreateAtlasGroupResponse> => {
|
|
66
66
|
return (
|
|
67
|
-
await AbyssToolsCore.axios.post<ICreateAtlasGroupResponse>(
|
|
67
|
+
await AbyssToolsCore.axios.post<ICreateAtlasGroupResponse>(
|
|
68
|
+
`atlas/${params.atlasId}/group`,
|
|
69
|
+
body,
|
|
70
|
+
)
|
|
68
71
|
).data;
|
|
69
72
|
};
|
|
@@ -31,9 +31,12 @@ export const paginateAtlasPage = async (
|
|
|
31
31
|
query: IPaginateAtlasPageQuery,
|
|
32
32
|
): Promise<IPaginateAtlasPageResponse> => {
|
|
33
33
|
return (
|
|
34
|
-
await AbyssToolsCore.axios.get<IPaginateAtlasPageResponse>(
|
|
35
|
-
params
|
|
36
|
-
|
|
34
|
+
await AbyssToolsCore.axios.get<IPaginateAtlasPageResponse>(
|
|
35
|
+
`atlas/${params.atlasId}/page/paginate`,
|
|
36
|
+
{
|
|
37
|
+
params: query,
|
|
38
|
+
},
|
|
39
|
+
)
|
|
37
40
|
).data;
|
|
38
41
|
};
|
|
39
42
|
|
|
@@ -93,9 +96,12 @@ export const searchAtlasContent = async (
|
|
|
93
96
|
query: ISearchAtlasContentQuery,
|
|
94
97
|
): Promise<ISearchAtlasContentResponse> => {
|
|
95
98
|
return (
|
|
96
|
-
await AbyssToolsCore.axios.get<ISearchAtlasContentResponse>(
|
|
97
|
-
params
|
|
98
|
-
|
|
99
|
+
await AbyssToolsCore.axios.get<ISearchAtlasContentResponse>(
|
|
100
|
+
`atlas/${params.atlasId}/page/search`,
|
|
101
|
+
{
|
|
102
|
+
params: query,
|
|
103
|
+
},
|
|
104
|
+
)
|
|
99
105
|
).data;
|
|
100
106
|
};
|
|
101
107
|
|
package/src/api/atlas.api.ts
CHANGED
|
@@ -22,8 +22,9 @@ import {
|
|
|
22
22
|
export const paginateAtlas = async (
|
|
23
23
|
query: IPaginateAtlasQuery,
|
|
24
24
|
): Promise<IPaginateAtlasResponse> => {
|
|
25
|
-
return (
|
|
26
|
-
.
|
|
25
|
+
return (
|
|
26
|
+
await AbyssToolsCore.axios.get<IPaginateAtlasResponse>(`atlas/paginate`, { params: query })
|
|
27
|
+
).data;
|
|
27
28
|
};
|
|
28
29
|
|
|
29
30
|
export const paginateProjectAtlas = async (
|
|
@@ -52,7 +53,8 @@ export const updateAtlas = async (
|
|
|
52
53
|
params: IUpdateAtlasParams,
|
|
53
54
|
body: IUpdateAtlasBody,
|
|
54
55
|
): Promise<IUpdateAtlasResponse> => {
|
|
55
|
-
return (await AbyssToolsCore.axios.put<IUpdateAtlasResponse>(`atlas/${params.atlasId}`, body))
|
|
56
|
+
return (await AbyssToolsCore.axios.put<IUpdateAtlasResponse>(`atlas/${params.atlasId}`, body))
|
|
57
|
+
.data;
|
|
56
58
|
};
|
|
57
59
|
|
|
58
60
|
export const createAtlas = async (body: ICreateAtlasBody): Promise<ICreateAtlasResponse> => {
|
|
@@ -64,7 +66,10 @@ export const createForOrganizationAtlas = async (
|
|
|
64
66
|
body: ICreateAtlasBody,
|
|
65
67
|
): Promise<ICreateAtlasResponse> => {
|
|
66
68
|
return (
|
|
67
|
-
await AbyssToolsCore.axios.post<ICreateAtlasResponse>(
|
|
69
|
+
await AbyssToolsCore.axios.post<ICreateAtlasResponse>(
|
|
70
|
+
`atlas/organization/${params.organizationId}`,
|
|
71
|
+
body,
|
|
72
|
+
)
|
|
68
73
|
).data;
|
|
69
74
|
};
|
|
70
75
|
|
|
@@ -92,9 +97,9 @@ export const transferAtlas = async (
|
|
|
92
97
|
).data;
|
|
93
98
|
};
|
|
94
99
|
|
|
95
|
-
export const countOrganizationAtlas = async (
|
|
96
|
-
|
|
97
|
-
): Promise<ICountOrganizationResponse> => {
|
|
100
|
+
export const countOrganizationAtlas = async (params: {
|
|
101
|
+
organizationId: string;
|
|
102
|
+
}): Promise<ICountOrganizationResponse> => {
|
|
98
103
|
return (
|
|
99
104
|
await AbyssToolsCore.axios.get<ICountOrganizationResponse>(
|
|
100
105
|
`atlas/organization/${params.organizationId}/count`,
|
|
@@ -13,7 +13,9 @@ export const getAtlasPublic = async (
|
|
|
13
13
|
params: IGetAtlasPublicParams,
|
|
14
14
|
): Promise<IGetAtlasPublicResponse> => {
|
|
15
15
|
return (
|
|
16
|
-
await AbyssToolsCore.axios.get<IGetAtlasPublicResponse>(
|
|
16
|
+
await AbyssToolsCore.axios.get<IGetAtlasPublicResponse>(
|
|
17
|
+
`atlas/public/${params.publicAccessToken}`,
|
|
18
|
+
)
|
|
17
19
|
).data;
|
|
18
20
|
};
|
|
19
21
|
|
|
@@ -130,8 +130,11 @@ export const searchBoardCard = async (
|
|
|
130
130
|
query: ISearchBoardCardQuery,
|
|
131
131
|
): Promise<ISearchBoardCardResponse> => {
|
|
132
132
|
return (
|
|
133
|
-
await AbyssToolsCore.axios.get<ISearchBoardCardResponse>(
|
|
134
|
-
params
|
|
135
|
-
|
|
133
|
+
await AbyssToolsCore.axios.get<ISearchBoardCardResponse>(
|
|
134
|
+
`board/${params.boardId}/card/search`,
|
|
135
|
+
{
|
|
136
|
+
params: query,
|
|
137
|
+
},
|
|
138
|
+
)
|
|
136
139
|
).data;
|
|
137
140
|
};
|
|
@@ -49,6 +49,9 @@ export const createBoardColumn = async (
|
|
|
49
49
|
body: ICreateBoardColumnBody,
|
|
50
50
|
): Promise<ICreateBoardColumnResponse> => {
|
|
51
51
|
return (
|
|
52
|
-
await AbyssToolsCore.axios.post<ICreateBoardColumnResponse>(
|
|
52
|
+
await AbyssToolsCore.axios.post<ICreateBoardColumnResponse>(
|
|
53
|
+
`board/${params.boardId}/column`,
|
|
54
|
+
body,
|
|
55
|
+
)
|
|
53
56
|
).data;
|
|
54
57
|
};
|
|
@@ -55,7 +55,10 @@ export const createBoardLabel = async (
|
|
|
55
55
|
body: ICreateBoardLabelBody,
|
|
56
56
|
): Promise<ICreateBoardLabelResponse> => {
|
|
57
57
|
return (
|
|
58
|
-
await AbyssToolsCore.axios.post<ICreateBoardLabelResponse>(
|
|
58
|
+
await AbyssToolsCore.axios.post<ICreateBoardLabelResponse>(
|
|
59
|
+
`board/${params.boardId}/label`,
|
|
60
|
+
body,
|
|
61
|
+
)
|
|
59
62
|
).data;
|
|
60
63
|
};
|
|
61
64
|
|
|
@@ -82,6 +85,7 @@ export const removeBoardLabel = async (
|
|
|
82
85
|
export const listBoardLabels = async (
|
|
83
86
|
params: IListBoardLabelParams,
|
|
84
87
|
): Promise<IListBoardLabelResponse> => {
|
|
85
|
-
return (
|
|
86
|
-
.
|
|
88
|
+
return (
|
|
89
|
+
await AbyssToolsCore.axios.get<IListBoardLabelResponse>(`board/${params.boardId}/label/list`)
|
|
90
|
+
).data;
|
|
87
91
|
};
|
package/src/api/board.api.ts
CHANGED
|
@@ -31,7 +31,8 @@ export const getBoard = async (params: IGetBoardParams): Promise<IGetBoardRespon
|
|
|
31
31
|
export const getBySlugBoard = async (
|
|
32
32
|
params: IGetBySlugBoardParams,
|
|
33
33
|
): Promise<IGetBySlugBoardResponse> => {
|
|
34
|
-
return (await AbyssToolsCore.axios.get<IGetBySlugBoardResponse>(`board/slug/${params.slug}`))
|
|
34
|
+
return (await AbyssToolsCore.axios.get<IGetBySlugBoardResponse>(`board/slug/${params.slug}`))
|
|
35
|
+
.data;
|
|
35
36
|
};
|
|
36
37
|
|
|
37
38
|
export const deleteBoard = async (params: IDeleteBoardParams): Promise<IDeleteBoardResponse> => {
|
|
@@ -42,7 +43,8 @@ export const updateBoard = async (
|
|
|
42
43
|
params: IUpdateBoardParams,
|
|
43
44
|
body: IUpdateBoardBody,
|
|
44
45
|
): Promise<IUpdateBoardResponse> => {
|
|
45
|
-
return (await AbyssToolsCore.axios.put<IUpdateBoardResponse>(`board/${params.boardId}`, body))
|
|
46
|
+
return (await AbyssToolsCore.axios.put<IUpdateBoardResponse>(`board/${params.boardId}`, body))
|
|
47
|
+
.data;
|
|
46
48
|
};
|
|
47
49
|
|
|
48
50
|
export const createBoard = async (body: ICreateBoardBody): Promise<ICreateBoardResponse> => {
|
|
@@ -54,12 +56,18 @@ export const createForOrganizationBoard = async (
|
|
|
54
56
|
body: ICreateBoardBody,
|
|
55
57
|
): Promise<ICreateBoardResponse> => {
|
|
56
58
|
return (
|
|
57
|
-
await AbyssToolsCore.axios.post<ICreateBoardResponse>(
|
|
59
|
+
await AbyssToolsCore.axios.post<ICreateBoardResponse>(
|
|
60
|
+
`board/organization/${params.organizationId}`,
|
|
61
|
+
body,
|
|
62
|
+
)
|
|
58
63
|
).data;
|
|
59
64
|
};
|
|
60
65
|
|
|
61
|
-
export const listBoard = async (query?: {
|
|
62
|
-
|
|
66
|
+
export const listBoard = async (query?: {
|
|
67
|
+
sharedWithMe?: boolean;
|
|
68
|
+
}): Promise<IListBoardUserResponse> => {
|
|
69
|
+
return (await AbyssToolsCore.axios.get<IListBoardUserResponse>('board/list', { params: query }))
|
|
70
|
+
.data;
|
|
63
71
|
};
|
|
64
72
|
|
|
65
73
|
export const listBoardProject = async (params: {
|
|
@@ -71,8 +79,9 @@ export const listBoardProject = async (params: {
|
|
|
71
79
|
};
|
|
72
80
|
|
|
73
81
|
export const getNextCardPreviewBoard = async (): Promise<IGetNextCardPreviewBoardResponse> => {
|
|
74
|
-
return (
|
|
75
|
-
.
|
|
82
|
+
return (
|
|
83
|
+
await AbyssToolsCore.axios.post<IGetNextCardPreviewBoardResponse>(`board/next-card-preview`)
|
|
84
|
+
).data;
|
|
76
85
|
};
|
|
77
86
|
|
|
78
87
|
export const listBoardOrganization = async (
|
|
@@ -111,9 +120,9 @@ export const transferBoard = async (
|
|
|
111
120
|
).data;
|
|
112
121
|
};
|
|
113
122
|
|
|
114
|
-
export const countOrganizationBoard = async (
|
|
115
|
-
|
|
116
|
-
): Promise<ICountOrganizationResponse> => {
|
|
123
|
+
export const countOrganizationBoard = async (params: {
|
|
124
|
+
organizationId: string;
|
|
125
|
+
}): Promise<ICountOrganizationResponse> => {
|
|
117
126
|
return (
|
|
118
127
|
await AbyssToolsCore.axios.get<ICountOrganizationResponse>(
|
|
119
128
|
`board/organization/${params.organizationId}/count`,
|
package/src/api/draw.api.ts
CHANGED
|
@@ -29,9 +29,12 @@ export const paginateProjectDraw = async (
|
|
|
29
29
|
query: IPaginateDrawQuery,
|
|
30
30
|
): Promise<IPaginateDrawResponse> => {
|
|
31
31
|
return (
|
|
32
|
-
await AbyssToolsCore.axios.get<IPaginateDrawResponse>(
|
|
33
|
-
params
|
|
34
|
-
|
|
32
|
+
await AbyssToolsCore.axios.get<IPaginateDrawResponse>(
|
|
33
|
+
`project/${params.projectId}/draw/paginate`,
|
|
34
|
+
{
|
|
35
|
+
params: query,
|
|
36
|
+
},
|
|
37
|
+
)
|
|
35
38
|
).data;
|
|
36
39
|
};
|
|
37
40
|
|
|
@@ -58,8 +61,12 @@ export const createForOrganizationDraw = async (
|
|
|
58
61
|
params: ICreateForOrganizationDrawParams,
|
|
59
62
|
body: ICreateDrawBody,
|
|
60
63
|
): Promise<ICreateDrawResponse> => {
|
|
61
|
-
return (
|
|
62
|
-
.
|
|
64
|
+
return (
|
|
65
|
+
await AbyssToolsCore.axios.post<ICreateDrawResponse>(
|
|
66
|
+
`draw/organization/${params.organizationId}`,
|
|
67
|
+
body,
|
|
68
|
+
)
|
|
69
|
+
).data;
|
|
63
70
|
};
|
|
64
71
|
|
|
65
72
|
export const paginateOrganizationDraw = async (
|
|
@@ -79,16 +86,13 @@ export const transferDraw = async (
|
|
|
79
86
|
body: ITransferContentBody,
|
|
80
87
|
): Promise<ITransferDrawResponse> => {
|
|
81
88
|
return (
|
|
82
|
-
await AbyssToolsCore.axios.post<ITransferDrawResponse>(
|
|
83
|
-
`draw/${params.drawId}/transfer`,
|
|
84
|
-
body,
|
|
85
|
-
)
|
|
89
|
+
await AbyssToolsCore.axios.post<ITransferDrawResponse>(`draw/${params.drawId}/transfer`, body)
|
|
86
90
|
).data;
|
|
87
91
|
};
|
|
88
92
|
|
|
89
|
-
export const countOrganizationDraw = async (
|
|
90
|
-
|
|
91
|
-
): Promise<ICountOrganizationResponse> => {
|
|
93
|
+
export const countOrganizationDraw = async (params: {
|
|
94
|
+
organizationId: string;
|
|
95
|
+
}): Promise<ICountOrganizationResponse> => {
|
|
92
96
|
return (
|
|
93
97
|
await AbyssToolsCore.axios.get<ICountOrganizationResponse>(
|
|
94
98
|
`draw/organization/${params.organizationId}/count`,
|
|
@@ -15,7 +15,9 @@ export const getDrawPublic = async (
|
|
|
15
15
|
params: IGetDrawPublicParams,
|
|
16
16
|
): Promise<IGetDrawPublicResponse> => {
|
|
17
17
|
return (
|
|
18
|
-
await AbyssToolsCore.axios.get<IGetDrawPublicResponse>(
|
|
18
|
+
await AbyssToolsCore.axios.get<IGetDrawPublicResponse>(
|
|
19
|
+
`draw/public/${params.publicAccessToken}`,
|
|
20
|
+
)
|
|
19
21
|
).data;
|
|
20
22
|
};
|
|
21
23
|
|
|
@@ -11,11 +11,7 @@
|
|
|
11
11
|
// ──────────────────────────────────────────────
|
|
12
12
|
|
|
13
13
|
import { AbyssToolsCore } from '..';
|
|
14
|
-
import type {
|
|
15
|
-
ICreatePlanPresetBody,
|
|
16
|
-
IUpdatePlanPresetBody,
|
|
17
|
-
IListPlanPresetQuery,
|
|
18
|
-
} from '../types';
|
|
14
|
+
import type { ICreatePlanPresetBody, IUpdatePlanPresetBody, IListPlanPresetQuery } from '../types';
|
|
19
15
|
import type {
|
|
20
16
|
IListModesResponse,
|
|
21
17
|
IListPlanPresetsResponse,
|
|
@@ -30,22 +26,72 @@ function authHeader(apiKey?: string): Record<string, string> {
|
|
|
30
26
|
}
|
|
31
27
|
|
|
32
28
|
export const listModes = async (apiKey?: string): Promise<IListModesResponse> =>
|
|
33
|
-
(
|
|
29
|
+
(
|
|
30
|
+
await AbyssToolsCore.axios.get<IListModesResponse>(`extract/modes`, {
|
|
31
|
+
headers: authHeader(apiKey),
|
|
32
|
+
})
|
|
33
|
+
).data;
|
|
34
34
|
|
|
35
|
-
export const listExtractionPlanPresets = async (
|
|
36
|
-
|
|
35
|
+
export const listExtractionPlanPresets = async (
|
|
36
|
+
query: IListPlanPresetQuery = {},
|
|
37
|
+
apiKey?: string,
|
|
38
|
+
): Promise<IListPlanPresetsResponse> =>
|
|
39
|
+
(
|
|
40
|
+
await AbyssToolsCore.axios.get<IListPlanPresetsResponse>(`extract/plans`, {
|
|
41
|
+
params: query,
|
|
42
|
+
headers: authHeader(apiKey),
|
|
43
|
+
})
|
|
44
|
+
).data;
|
|
37
45
|
|
|
38
|
-
export const getExtractionPlanPreset = async (
|
|
39
|
-
|
|
46
|
+
export const getExtractionPlanPreset = async (
|
|
47
|
+
id: string,
|
|
48
|
+
apiKey?: string,
|
|
49
|
+
): Promise<IGetPlanPresetResponse> =>
|
|
50
|
+
(
|
|
51
|
+
await AbyssToolsCore.axios.get<IGetPlanPresetResponse>(`extract/plans/${id}`, {
|
|
52
|
+
headers: authHeader(apiKey),
|
|
53
|
+
})
|
|
54
|
+
).data;
|
|
40
55
|
|
|
41
|
-
export const createExtractionPlanPreset = async (
|
|
42
|
-
|
|
56
|
+
export const createExtractionPlanPreset = async (
|
|
57
|
+
body: ICreatePlanPresetBody,
|
|
58
|
+
apiKey?: string,
|
|
59
|
+
): Promise<IGetPlanPresetResponse> =>
|
|
60
|
+
(
|
|
61
|
+
await AbyssToolsCore.axios.post<IGetPlanPresetResponse>(`extract/plans`, body, {
|
|
62
|
+
headers: authHeader(apiKey),
|
|
63
|
+
})
|
|
64
|
+
).data;
|
|
43
65
|
|
|
44
|
-
export const updateExtractionPlanPreset = async (
|
|
45
|
-
|
|
66
|
+
export const updateExtractionPlanPreset = async (
|
|
67
|
+
id: string,
|
|
68
|
+
body: IUpdatePlanPresetBody,
|
|
69
|
+
apiKey?: string,
|
|
70
|
+
): Promise<IGetPlanPresetResponse> =>
|
|
71
|
+
(
|
|
72
|
+
await AbyssToolsCore.axios.put<IGetPlanPresetResponse>(`extract/plans/${id}`, body, {
|
|
73
|
+
headers: authHeader(apiKey),
|
|
74
|
+
})
|
|
75
|
+
).data;
|
|
46
76
|
|
|
47
|
-
export const deleteExtractionPlanPreset = async (
|
|
48
|
-
|
|
77
|
+
export const deleteExtractionPlanPreset = async (
|
|
78
|
+
id: string,
|
|
79
|
+
apiKey?: string,
|
|
80
|
+
): Promise<IDeletePlanPresetResponse> =>
|
|
81
|
+
(
|
|
82
|
+
await AbyssToolsCore.axios.delete<IDeletePlanPresetResponse>(`extract/plans/${id}`, {
|
|
83
|
+
headers: authHeader(apiKey),
|
|
84
|
+
})
|
|
85
|
+
).data;
|
|
49
86
|
|
|
50
|
-
export const setDefaultExtractionPlanPreset = async (
|
|
51
|
-
|
|
87
|
+
export const setDefaultExtractionPlanPreset = async (
|
|
88
|
+
id: string,
|
|
89
|
+
apiKey?: string,
|
|
90
|
+
): Promise<IGetPlanPresetResponse> =>
|
|
91
|
+
(
|
|
92
|
+
await AbyssToolsCore.axios.post<IGetPlanPresetResponse>(
|
|
93
|
+
`extract/plans/${id}/default`,
|
|
94
|
+
{},
|
|
95
|
+
{ headers: authHeader(apiKey) },
|
|
96
|
+
)
|
|
97
|
+
).data;
|
|
@@ -9,14 +9,8 @@
|
|
|
9
9
|
// ──────────────────────────────────────────────
|
|
10
10
|
|
|
11
11
|
import { AbyssToolsCore } from '..';
|
|
12
|
-
import type {
|
|
13
|
-
|
|
14
|
-
IUpsertExtractionSettingsBody,
|
|
15
|
-
} from '../types';
|
|
16
|
-
import type {
|
|
17
|
-
IGetExtractionSettingsResponse,
|
|
18
|
-
IUpsertExtractionSettingsResponse,
|
|
19
|
-
} from '../types';
|
|
12
|
+
import type { IGetExtractionSettingsQuery, IUpsertExtractionSettingsBody } from '../types';
|
|
13
|
+
import type { IGetExtractionSettingsResponse, IUpsertExtractionSettingsResponse } from '../types';
|
|
20
14
|
|
|
21
15
|
const DEFAULT_API_KEY_HEADER = 'abyss-api-key';
|
|
22
16
|
|