@abyss-project/tools 1.0.3 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/abyss.admin.api.d.ts +0 -3
- package/dist/api/abyss.admin.api.js +1 -13
- package/dist/api/abyss.admin.api.js.map +1 -1
- package/dist/api/beam.api.d.ts +48 -0
- package/dist/api/beam.api.js +104 -0
- package/dist/api/beam.api.js.map +1 -0
- package/dist/api/extraction-plan-preset.api.d.ts +9 -0
- package/dist/api/extraction-plan-preset.api.js +23 -0
- package/dist/api/extraction-plan-preset.api.js.map +1 -0
- package/dist/api/extraction-plan-preset.api.test.d.ts +1 -0
- package/dist/api/extraction-plan-preset.api.test.js +41 -0
- package/dist/api/extraction-plan-preset.api.test.js.map +1 -0
- package/dist/api/extraction-settings.api.d.ts +4 -0
- package/dist/api/extraction-settings.api.js +22 -0
- package/dist/api/extraction-settings.api.js.map +1 -0
- package/dist/api/extraction.api.d.ts +74 -0
- package/dist/api/extraction.api.js +416 -0
- package/dist/api/extraction.api.js.map +1 -0
- package/dist/api/index.d.ts +5 -1
- package/dist/api/index.js +5 -1
- package/dist/api/index.js.map +1 -1
- package/dist/api/monitor.api.d.ts +2 -0
- package/dist/api/monitor.api.js +9 -0
- package/dist/api/monitor.api.js.map +1 -0
- package/dist/constants/beam.constants.d.ts +1 -0
- package/dist/constants/beam.constants.js +5 -0
- package/dist/constants/beam.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 +111 -61
- package/dist/index.js +109 -61
- package/dist/index.js.map +1 -1
- package/dist/types/enum/beam.enum.d.ts +12 -0
- package/dist/types/enum/beam.enum.js +18 -0
- package/dist/types/enum/beam.enum.js.map +1 -0
- package/dist/types/enum/combine-strategy.enum.d.ts +5 -0
- package/dist/types/enum/combine-strategy.enum.js +10 -0
- package/dist/types/enum/combine-strategy.enum.js.map +1 -0
- package/dist/types/enum/content-share.enum.d.ts +3 -1
- package/dist/types/enum/content-share.enum.js +2 -0
- package/dist/types/enum/content-share.enum.js.map +1 -1
- package/dist/types/enum/document-type.enum.d.ts +9 -0
- package/dist/types/enum/document-type.enum.js +14 -0
- package/dist/types/enum/document-type.enum.js.map +1 -0
- package/dist/types/enum/extraction-feedback-issue-type.enum.d.ts +8 -0
- package/dist/types/enum/extraction-feedback-issue-type.enum.js +13 -0
- package/dist/types/enum/extraction-feedback-issue-type.enum.js.map +1 -0
- package/dist/types/enum/extraction-warning.enum.d.ts +7 -0
- package/dist/types/enum/extraction-warning.enum.js +12 -0
- package/dist/types/enum/extraction-warning.enum.js.map +1 -0
- package/dist/types/enum/index.d.ts +7 -0
- package/dist/types/enum/index.js +7 -0
- package/dist/types/enum/index.js.map +1 -1
- package/dist/types/enum/interpreter-kind.enum.d.ts +5 -0
- package/dist/types/enum/interpreter-kind.enum.js +10 -0
- package/dist/types/enum/interpreter-kind.enum.js.map +1 -0
- package/dist/types/enum/provider-kind.enum.d.ts +10 -0
- package/dist/types/enum/provider-kind.enum.js +16 -0
- package/dist/types/enum/provider-kind.enum.js.map +1 -0
- package/dist/types/interface/api/requests/beam.request.d.ts +122 -0
- package/dist/types/interface/api/{responses/pdf.response.js → requests/beam.request.js} +1 -1
- package/dist/types/interface/api/requests/beam.request.js.map +1 -0
- package/dist/types/interface/api/requests/{rcb.request.d.ts → extraction.request.d.ts} +81 -52
- package/dist/types/interface/api/requests/{pdf.public.request.js → extraction.request.js} +1 -1
- package/dist/types/interface/api/requests/extraction.request.js.map +1 -0
- package/dist/types/interface/api/requests/index.d.ts +2 -1
- package/dist/types/interface/api/requests/index.js +2 -1
- package/dist/types/interface/api/requests/index.js.map +1 -1
- package/dist/types/interface/api/responses/beam.response.d.ts +92 -0
- package/dist/types/interface/api/responses/{rcb.response.js → beam.response.js} +1 -1
- package/dist/types/interface/api/responses/beam.response.js.map +1 -0
- package/dist/types/interface/api/responses/extraction.response.d.ts +403 -0
- package/dist/types/interface/api/{requests/rcb.request.js → responses/extraction.response.js} +1 -1
- package/dist/types/interface/api/responses/extraction.response.js.map +1 -0
- package/dist/types/interface/api/responses/index.d.ts +3 -1
- package/dist/types/interface/api/responses/index.js +3 -1
- package/dist/types/interface/api/responses/index.js.map +1 -1
- package/dist/types/interface/api/responses/monitor.response.d.ts +7 -0
- package/dist/types/interface/api/{requests/user-tag.request.js → responses/monitor.response.js} +1 -1
- package/dist/types/interface/api/responses/monitor.response.js.map +1 -0
- package/dist/types/interface/models/beam.dto.d.ts +58 -0
- package/dist/types/interface/{api/requests/pdf.request.js → models/beam.dto.js} +1 -1
- package/dist/types/interface/models/beam.dto.js.map +1 -0
- package/dist/types/interface/models/extraction-fetched-provenance.dto.test.d.ts +1 -0
- package/dist/types/interface/models/extraction-fetched-provenance.dto.test.js +159 -0
- package/dist/types/interface/models/extraction-fetched-provenance.dto.test.js.map +1 -0
- package/dist/types/interface/models/extraction-plan.dto.d.ts +163 -0
- package/dist/types/interface/models/extraction-plan.dto.js +11 -0
- package/dist/types/interface/models/extraction-plan.dto.js.map +1 -0
- package/dist/types/interface/models/extraction-plan.dto.test.d.ts +1 -0
- package/dist/types/interface/models/extraction-plan.dto.test.js +35 -0
- package/dist/types/interface/models/extraction-plan.dto.test.js.map +1 -0
- package/dist/types/interface/models/extraction-spatial-template.dto.d.ts +37 -0
- package/dist/types/interface/models/extraction-spatial-template.dto.js +3 -0
- package/dist/types/interface/models/extraction-spatial-template.dto.js.map +1 -0
- package/dist/types/interface/models/extraction-spatial-template.dto.test.d.ts +1 -0
- package/dist/types/interface/models/extraction-spatial-template.dto.test.js +15 -0
- package/dist/types/interface/models/extraction-spatial-template.dto.test.js.map +1 -0
- package/dist/types/interface/models/{rcb.dto.d.ts → extraction.dto.d.ts} +64 -48
- package/dist/types/interface/models/extraction.dto.js +28 -0
- package/dist/types/interface/models/extraction.dto.js.map +1 -0
- package/dist/types/interface/models/index.d.ts +4 -1
- package/dist/types/interface/models/index.js +4 -1
- package/dist/types/interface/models/index.js.map +1 -1
- package/dist/types/interface/models/organization.dto.d.ts +2 -0
- package/dist/utils/{rcb-webhook.utils.d.ts → extraction-webhook.utils.d.ts} +2 -2
- package/dist/utils/{rcb-webhook.utils.js → extraction-webhook.utils.js} +4 -4
- package/dist/utils/extraction-webhook.utils.js.map +1 -0
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/utils/index.js.map +1 -1
- package/package.json +1 -1
- package/src/api/abyss.admin.api.ts +0 -18
- package/src/api/beam.api.ts +300 -0
- package/src/api/extraction-plan-preset.api.test.ts +24 -0
- package/src/api/extraction-plan-preset.api.ts +51 -0
- package/src/api/extraction-settings.api.ts +59 -0
- package/src/api/extraction.api.ts +899 -0
- package/src/api/index.ts +56 -48
- package/src/api/monitor.api.ts +6 -0
- package/src/api/tests/beam.api.spec.ts +42 -0
- package/src/constants/beam.constants.ts +4 -0
- package/src/constants/index.ts +6 -5
- package/src/index.ts +840 -746
- package/src/types/enum/beam.enum.ts +24 -0
- package/src/types/enum/combine-strategy.enum.ts +7 -0
- package/src/types/enum/content-share.enum.ts +38 -36
- package/src/types/enum/document-type.enum.ts +10 -0
- package/src/types/enum/extraction-feedback-issue-type.enum.ts +10 -0
- package/src/types/enum/extraction-warning.enum.ts +21 -0
- package/src/types/enum/index.ts +13 -6
- package/src/types/enum/interpreter-kind.enum.ts +7 -0
- package/src/types/enum/provider-kind.enum.ts +13 -0
- package/src/types/interface/api/requests/beam.request.ts +152 -0
- package/src/types/interface/api/requests/extraction.request.ts +366 -0
- package/src/types/interface/api/requests/index.ts +29 -28
- package/src/types/interface/api/responses/beam.response.ts +122 -0
- package/src/types/interface/api/responses/extraction.response.ts +454 -0
- package/src/types/interface/api/responses/index.ts +33 -31
- package/src/types/interface/api/responses/monitor.response.ts +8 -0
- package/src/types/interface/models/beam.dto.ts +67 -0
- package/src/types/interface/models/extraction-fetched-provenance.dto.test.ts +193 -0
- package/src/types/interface/models/extraction-plan.dto.test.ts +47 -0
- package/src/types/interface/models/extraction-plan.dto.ts +241 -0
- package/src/types/interface/models/extraction-spatial-template.dto.test.ts +27 -0
- package/src/types/interface/models/extraction-spatial-template.dto.ts +48 -0
- package/src/types/interface/models/{rcb.dto.ts → extraction.dto.ts} +317 -267
- package/src/types/interface/models/index.ts +34 -31
- package/src/types/interface/models/organization.dto.ts +21 -12
- package/src/types/tests/beam-management-types.spec.ts +38 -0
- package/src/types/tests/beam-share-enums.spec.ts +11 -0
- package/src/types/tests/beam.dto.spec.ts +61 -0
- package/src/types/tests/beam.request-response.spec.ts +43 -0
- package/src/utils/{rcb-webhook.utils.ts → extraction-webhook.utils.ts} +30 -30
- package/src/utils/index.ts +6 -6
- package/tsconfig.json +36 -35
- package/dist/api/atlas-page-content.api.d.ts +0 -0
- package/dist/api/atlas-page-content.api.js +0 -2
- package/dist/api/atlas-page-content.api.js.map +0 -1
- package/dist/api/pdf.api.d.ts +0 -15
- package/dist/api/pdf.api.js +0 -61
- package/dist/api/pdf.api.js.map +0 -1
- package/dist/api/pdf.public.api.d.ts +0 -8
- package/dist/api/pdf.public.api.js +0 -33
- package/dist/api/pdf.public.api.js.map +0 -1
- package/dist/api/rcb.api.d.ts +0 -72
- package/dist/api/rcb.api.js +0 -400
- package/dist/api/rcb.api.js.map +0 -1
- package/dist/api/user-tag.api.d.ts +0 -9
- package/dist/api/user-tag.api.js +0 -37
- package/dist/api/user-tag.api.js.map +0 -1
- package/dist/constants/user-tag.constants.d.ts +0 -3
- package/dist/constants/user-tag.constants.js +0 -7
- package/dist/constants/user-tag.constants.js.map +0 -1
- package/dist/types/enum/pdf-session.enum.d.ts +0 -10
- package/dist/types/enum/pdf-session.enum.js +0 -16
- package/dist/types/enum/pdf-session.enum.js.map +0 -1
- package/dist/types/interface/api/requests/pdf.public.request.d.ts +0 -19
- package/dist/types/interface/api/requests/pdf.public.request.js.map +0 -1
- package/dist/types/interface/api/requests/pdf.request.d.ts +0 -50
- package/dist/types/interface/api/requests/pdf.request.js.map +0 -1
- package/dist/types/interface/api/requests/rcb.request.js.map +0 -1
- package/dist/types/interface/api/requests/user-tag.request.d.ts +0 -44
- package/dist/types/interface/api/requests/user-tag.request.js.map +0 -1
- package/dist/types/interface/api/responses/pdf.public.response.d.ts +0 -33
- package/dist/types/interface/api/responses/pdf.public.response.js +0 -3
- package/dist/types/interface/api/responses/pdf.public.response.js.map +0 -1
- package/dist/types/interface/api/responses/pdf.response.d.ts +0 -35
- package/dist/types/interface/api/responses/pdf.response.js.map +0 -1
- package/dist/types/interface/api/responses/rcb.response.d.ts +0 -376
- package/dist/types/interface/api/responses/rcb.response.js.map +0 -1
- package/dist/types/interface/api/responses/user-tag.response.d.ts +0 -32
- package/dist/types/interface/api/responses/user-tag.response.js +0 -3
- package/dist/types/interface/api/responses/user-tag.response.js.map +0 -1
- package/dist/types/interface/models/pdf-session.dto.d.ts +0 -28
- package/dist/types/interface/models/pdf-session.dto.js +0 -3
- package/dist/types/interface/models/pdf-session.dto.js.map +0 -1
- package/dist/types/interface/models/rcb.dto.js +0 -26
- package/dist/types/interface/models/rcb.dto.js.map +0 -1
- package/dist/types/interface/models/user-tag.dto.d.ts +0 -22
- package/dist/types/interface/models/user-tag.dto.js +0 -3
- package/dist/types/interface/models/user-tag.dto.js.map +0 -1
- package/dist/utils/rcb-webhook.utils.js.map +0 -1
- package/src/api/rcb.api.ts +0 -829
- package/src/types/interface/api/requests/rcb.request.ts +0 -267
- package/src/types/interface/api/responses/rcb.response.ts +0 -399
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// AbyssBeam transfer visibility (design D7). PUBLIC = a contentShare LINK so the
|
|
2
|
+
// /b/:slug link works for anyone until expiry; RESTRICTED = USER/ORG/TEAM/PROJECT
|
|
3
|
+
// grants resolved via contentShare.resolveAccess (>= VIEW). Password is an
|
|
4
|
+
// independent second factor, NOT a visibility level.
|
|
5
|
+
export enum BeamVisibility {
|
|
6
|
+
PUBLIC = 'PUBLIC',
|
|
7
|
+
RESTRICTED = 'RESTRICTED',
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
// Machine-readable denial reason returned on the public serving discovery path
|
|
11
|
+
// (GET /b/:slug) so the front renders the correct state from the reason code
|
|
12
|
+
// rather than inferring it from the bare HTTP status (spec §17.1). Mirrors the
|
|
13
|
+
// backend `BeamServeDenyReason`; only the non-password discovery denials are
|
|
14
|
+
// surfaced here (PASSWORD_REQUIRED is not a VIEW denial — the metadata is still
|
|
15
|
+
// returned with isLocked=true). Byte endpoints (/file, /raw, /thumb, /zip) stay
|
|
16
|
+
// bare-status by design (CDN-visible), so this reason is a VIEW-only signal.
|
|
17
|
+
export enum BeamServeDenyReasonCode {
|
|
18
|
+
NOT_FOUND = 'not_found',
|
|
19
|
+
EXPIRED = 'expired',
|
|
20
|
+
FORBIDDEN_VISIBILITY = 'forbidden_visibility',
|
|
21
|
+
MAX_DOWNLOADS = 'max_downloads',
|
|
22
|
+
SCAN_PENDING = 'scan_pending',
|
|
23
|
+
SCAN_INFECTED = 'scan_infected',
|
|
24
|
+
}
|
|
@@ -1,36 +1,38 @@
|
|
|
1
|
-
export enum ShareableContentType {
|
|
2
|
-
DRAW = 'draw',
|
|
3
|
-
BOARD = 'board',
|
|
4
|
-
MEMO = 'memo',
|
|
5
|
-
ATLAS = 'atlas',
|
|
6
|
-
RETROSPECTIVE = 'retrospective',
|
|
7
|
-
SHORT_LINK = 'short_link',
|
|
8
|
-
CLOUD_FILE = 'cloud_file',
|
|
9
|
-
CLOUD_FOLDER = 'cloud_folder',
|
|
10
|
-
CLOUD_GALLERY = 'cloud_gallery',
|
|
11
|
-
FORM = 'form',
|
|
12
|
-
SPOTLIGHT_PROJECT = 'spotlight_project',
|
|
13
|
-
EVENT = 'event',
|
|
14
|
-
REPORT = 'report',
|
|
15
|
-
PDF = 'pdf',
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
1
|
+
export enum ShareableContentType {
|
|
2
|
+
DRAW = 'draw',
|
|
3
|
+
BOARD = 'board',
|
|
4
|
+
MEMO = 'memo',
|
|
5
|
+
ATLAS = 'atlas',
|
|
6
|
+
RETROSPECTIVE = 'retrospective',
|
|
7
|
+
SHORT_LINK = 'short_link',
|
|
8
|
+
CLOUD_FILE = 'cloud_file',
|
|
9
|
+
CLOUD_FOLDER = 'cloud_folder',
|
|
10
|
+
CLOUD_GALLERY = 'cloud_gallery',
|
|
11
|
+
FORM = 'form',
|
|
12
|
+
SPOTLIGHT_PROJECT = 'spotlight_project',
|
|
13
|
+
EVENT = 'event',
|
|
14
|
+
REPORT = 'report',
|
|
15
|
+
PDF = 'pdf',
|
|
16
|
+
BEAM = 'beam',
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export enum ShareTargetType {
|
|
20
|
+
USER = 'USER',
|
|
21
|
+
TEAM = 'TEAM',
|
|
22
|
+
ORGANIZATION = 'ORGANIZATION',
|
|
23
|
+
PROJECT = 'PROJECT',
|
|
24
|
+
LINK = 'LINK',
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export enum SharePermission {
|
|
28
|
+
VIEW = 'VIEW',
|
|
29
|
+
EDIT = 'EDIT',
|
|
30
|
+
MANAGE = 'MANAGE',
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export enum ContentShareScope {
|
|
34
|
+
ORGANIZATION = 'ORGANIZATION',
|
|
35
|
+
ORG_USER = 'ORG_USER',
|
|
36
|
+
ORG_TEAM = 'ORG_TEAM',
|
|
37
|
+
ORG_PROJECT = 'ORG_PROJECT',
|
|
38
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Document types supported by AbyssExtract. bank_statement is the legacy RCB profile.
|
|
2
|
+
export enum DocumentType {
|
|
3
|
+
BANK_STATEMENT = 'bank_statement',
|
|
4
|
+
INVOICE = 'invoice',
|
|
5
|
+
RECEIPT = 'receipt',
|
|
6
|
+
ID_CARD = 'id_card',
|
|
7
|
+
RIB = 'rib',
|
|
8
|
+
FINANCIAL_STATEMENT = 'financial_statement',
|
|
9
|
+
GENERIC = 'generic',
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Global, document-type-agnostic feedback issue taxonomy for AbyssExtract.
|
|
2
|
+
// fieldKey localizes the issue to a specific extracted field when relevant.
|
|
3
|
+
export enum ExtractionFeedbackIssueType {
|
|
4
|
+
WRONG_VALUE = 'WRONG_VALUE',
|
|
5
|
+
MISSING_FIELD = 'MISSING_FIELD',
|
|
6
|
+
WRONG_DOCUMENT_TYPE = 'WRONG_DOCUMENT_TYPE',
|
|
7
|
+
EXTRA_RECORD = 'EXTRA_RECORD',
|
|
8
|
+
WRONG_RECORD = 'WRONG_RECORD',
|
|
9
|
+
OTHER = 'OTHER',
|
|
10
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// ──────────────────────────────────────────────
|
|
2
|
+
// ExtractionWarningCode — structured warning codes emitted by the extraction
|
|
3
|
+
// orchestrator. The `code` is the i18n key suffix; `data` carries numeric/
|
|
4
|
+
// string values the UI formats locally (currencies, dates, etc.).
|
|
5
|
+
// ──────────────────────────────────────────────
|
|
6
|
+
|
|
7
|
+
export enum ExtractionWarningCode {
|
|
8
|
+
NO_RECORDS = 'no_records',
|
|
9
|
+
NO_IBAN = 'no_iban',
|
|
10
|
+
NO_BALANCES = 'no_balances',
|
|
11
|
+
BALANCE_MISMATCH = 'balance_mismatch',
|
|
12
|
+
/**
|
|
13
|
+
* A coherence validation error produced by an adapter's `validate()` call.
|
|
14
|
+
* `data.type` carries the adapter-specific error/warning type (e.g.
|
|
15
|
+
* `ACTIF_PASSIF_MISMATCH`, `TOTAL_MISMATCH`, `MRZ_INVALID`) and
|
|
16
|
+
* `data.message` carries the human-readable explanation. This allows
|
|
17
|
+
* arbitrary adapter validation results to surface without extending the
|
|
18
|
+
* enum for each domain-specific rule.
|
|
19
|
+
*/
|
|
20
|
+
ADAPTER_VALIDATION_ERROR = 'adapter_validation_error',
|
|
21
|
+
}
|
package/src/types/enum/index.ts
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
|
-
export * from './api-error.enum';
|
|
2
|
-
export * from './board-activity.enum';
|
|
3
|
-
export * from './board-column-type.enum';
|
|
4
|
-
export * from './content-share.enum';
|
|
5
|
-
export * from './
|
|
6
|
-
export * from './
|
|
1
|
+
export * from './api-error.enum';
|
|
2
|
+
export * from './board-activity.enum';
|
|
3
|
+
export * from './board-column-type.enum';
|
|
4
|
+
export * from './content-share.enum';
|
|
5
|
+
export * from './beam.enum';
|
|
6
|
+
export * from './document-type.enum';
|
|
7
|
+
export * from './pdf-operation.enum';
|
|
8
|
+
export * from './rcb-bank.enum';
|
|
9
|
+
export * from './extraction-warning.enum';
|
|
10
|
+
export * from './extraction-feedback-issue-type.enum';
|
|
11
|
+
export * from './provider-kind.enum';
|
|
12
|
+
export * from './interpreter-kind.enum';
|
|
13
|
+
export * from './combine-strategy.enum';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Provider kind and cost tier enums — mirror apps/api provider.interface.ts exactly.
|
|
2
|
+
|
|
3
|
+
export enum ProviderKind {
|
|
4
|
+
TEXT = 'text',
|
|
5
|
+
OCR = 'ocr',
|
|
6
|
+
AI = 'ai',
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export enum CostTier {
|
|
10
|
+
CHEAP = 'cheap',
|
|
11
|
+
MEDIUM = 'medium',
|
|
12
|
+
EXPENSIVE = 'expensive',
|
|
13
|
+
}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import { ContentShareScope } from '../../../enum';
|
|
2
|
+
import { ShareTargetType, SharePermission } from '../../../enum/content-share.enum';
|
|
3
|
+
import { BeamVisibility } from '../../../enum/beam.enum';
|
|
4
|
+
import { QueryPaginate } from '../type-message/base-paginate';
|
|
5
|
+
|
|
6
|
+
export type IGetBeamParams = {
|
|
7
|
+
beamId: string;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export type IGetBeamBySlugParams = {
|
|
11
|
+
slug: string;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export type IPaginateBeamQuery = {
|
|
15
|
+
title?: string;
|
|
16
|
+
isActive?: boolean;
|
|
17
|
+
scope?: ContentShareScope;
|
|
18
|
+
teamId?: string;
|
|
19
|
+
projectId?: string;
|
|
20
|
+
adminView?: boolean;
|
|
21
|
+
sharedWithMe?: boolean;
|
|
22
|
+
} & QueryPaginate;
|
|
23
|
+
|
|
24
|
+
export type IPaginateProjectBeamParams = {
|
|
25
|
+
projectId: string;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export type IPaginateOrganizationBeamParams = {
|
|
29
|
+
organizationId: string;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
// Draft-creation metadata bundle (design §4 step 1). Files are attached
|
|
33
|
+
// afterwards (B2) and the transfer is sealed at finalize (B5).
|
|
34
|
+
export type ICreateBeamBody = {
|
|
35
|
+
title?: string;
|
|
36
|
+
message?: string;
|
|
37
|
+
visibility?: BeamVisibility;
|
|
38
|
+
expiresInDays?: number;
|
|
39
|
+
password?: string;
|
|
40
|
+
maxDownloads?: number;
|
|
41
|
+
recipients?: { email: string; locale?: string }[];
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
// Anonymous draft creation (POST /beam/public). Same metadata as the owned
|
|
45
|
+
// create minus expiresInDays — anonymous TTL is fixed at 7 days by createDraft.
|
|
46
|
+
export type ICreateBeamPublicBody = {
|
|
47
|
+
title?: string;
|
|
48
|
+
message?: string;
|
|
49
|
+
visibility?: BeamVisibility;
|
|
50
|
+
password?: string;
|
|
51
|
+
maxDownloads?: number;
|
|
52
|
+
recipients?: { email: string; locale?: string }[];
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
export interface IAddBeamFilesParams {
|
|
56
|
+
beamId: string;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export interface IAddBeamFilesBody {
|
|
60
|
+
files: { storageFileId: string }[];
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export interface IImportCloudBeamFilesParams {
|
|
64
|
+
beamId: string;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export interface IImportCloudBeamFilesBody {
|
|
68
|
+
cloudFileIds: string[];
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export interface IFinalizeBeamParams {
|
|
72
|
+
beamId: string;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export type IFinalizeBeamBody = Record<string, never>;
|
|
76
|
+
|
|
77
|
+
export type ICreateForOrganizationBeamParams = {
|
|
78
|
+
organizationId: string;
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
export type IUpdateBeamParams = {
|
|
82
|
+
beamId: string;
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
export type IUpdateBeamBody = {
|
|
86
|
+
title?: string;
|
|
87
|
+
message?: string;
|
|
88
|
+
visibility?: BeamVisibility;
|
|
89
|
+
isActive?: boolean;
|
|
90
|
+
expiresAt?: Date | null;
|
|
91
|
+
maxDownloads?: number | null;
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
export type IDeleteBeamParams = {
|
|
95
|
+
beamId: string;
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
// Public serving (B3): unlock a password-protected transfer to obtain a
|
|
99
|
+
// short-lived unlock token used by the byte-serving endpoints.
|
|
100
|
+
export interface IUnlockBeamPublicParams {
|
|
101
|
+
slug: string;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export interface IUnlockBeamPublicBody {
|
|
105
|
+
password: string;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// Management lifecycle (B4): renew/reactivate take only the transfer id. Both
|
|
109
|
+
// push expiresAt forward and reactivate the transfer server-side.
|
|
110
|
+
export interface IRenewBeamParams {
|
|
111
|
+
beamId: string;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export interface IReactivateBeamParams {
|
|
115
|
+
beamId: string;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// Sharing (B4): a MANAGE holder grants a content_share (BEAM content type) on the
|
|
119
|
+
// transfer. targetId is null for a LINK share, otherwise the user/team/org/project id.
|
|
120
|
+
export interface ICreateBeamShareParams {
|
|
121
|
+
beamId: string;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export interface ICreateBeamShareBody {
|
|
125
|
+
targetType: ShareTargetType;
|
|
126
|
+
targetId?: string | null;
|
|
127
|
+
permission: SharePermission;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export interface IListBeamSharesParams {
|
|
131
|
+
beamId: string;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export interface IRevokeBeamShareParams {
|
|
135
|
+
beamId: string;
|
|
136
|
+
shareId: string;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
// Recipients (B5): add extra recipients to a transfer (explicit add path,
|
|
140
|
+
// distinct from the recipients recorded at draft time). Capped at
|
|
141
|
+
// MAX_BEAM_RECIPIENTS on the API side.
|
|
142
|
+
export interface IAddRecipientsBeamParams {
|
|
143
|
+
beamId: string;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export interface IAddRecipientsBeamBody {
|
|
147
|
+
recipients: { email: string; locale?: string | null }[];
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export interface IListRecipientsBeamParams {
|
|
151
|
+
beamId: string;
|
|
152
|
+
}
|