@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
|
@@ -1,12 +1,21 @@
|
|
|
1
|
-
import { IProject } from './project.dto';
|
|
2
|
-
|
|
3
|
-
export interface IOrganization {
|
|
4
|
-
id?: string;
|
|
5
|
-
name: string;
|
|
6
|
-
slug: string;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
//
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import { IProject } from './project.dto';
|
|
2
|
+
|
|
3
|
+
export interface IOrganization {
|
|
4
|
+
id?: string;
|
|
5
|
+
name: string;
|
|
6
|
+
slug: string;
|
|
7
|
+
// Mirror of abyss-main Organization.kind. Drives the family default-share
|
|
8
|
+
// permission (family → EDIT, else VIEW). Synced by organization.middleware.ts.
|
|
9
|
+
// Typed as a literal union that mirrors @abyss-project/main's OrganizationKind
|
|
10
|
+
// enum values 1:1 — this published SDK package intentionally does NOT depend on
|
|
11
|
+
// @abyss-project/main, so the enum is referenced by value (the api-side model
|
|
12
|
+
// and middleware narrow this to OrganizationKind, where main IS resolvable).
|
|
13
|
+
kind?: 'standard' | 'family';
|
|
14
|
+
// Last refresh of `kind` from abyss-main; drives the TTL (≤5min) sync gate.
|
|
15
|
+
kindSyncedAt?: string | null;
|
|
16
|
+
updatedAt?: Date;
|
|
17
|
+
createdAt?: Date;
|
|
18
|
+
|
|
19
|
+
// Associations
|
|
20
|
+
projects?: IProject[];
|
|
21
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
IRenewBeamParams,
|
|
3
|
+
IReactivateBeamParams,
|
|
4
|
+
ICreateBeamShareBody,
|
|
5
|
+
IRevokeBeamShareParams,
|
|
6
|
+
} from '../interface/api/requests/beam.request';
|
|
7
|
+
import type {
|
|
8
|
+
IRenewBeamResponse,
|
|
9
|
+
ICreateBeamShareResponse,
|
|
10
|
+
IListBeamSharesResponse,
|
|
11
|
+
} from '../interface/api/responses/beam.response';
|
|
12
|
+
import { ShareTargetType, SharePermission } from '../enum/content-share.enum';
|
|
13
|
+
import { BEAM_MANAGE_TOKEN_HEADER } from '../../constants/beam.constants';
|
|
14
|
+
|
|
15
|
+
describe('beam management SDK types', () => {
|
|
16
|
+
it('compiles renew/share request + response shapes', () => {
|
|
17
|
+
const renew: IRenewBeamParams = { beamId: 'b1' };
|
|
18
|
+
const reactivate: IReactivateBeamParams = { beamId: 'b1' };
|
|
19
|
+
const share: ICreateBeamShareBody = {
|
|
20
|
+
targetType: ShareTargetType.PROJECT,
|
|
21
|
+
targetId: 'p1',
|
|
22
|
+
permission: SharePermission.VIEW,
|
|
23
|
+
};
|
|
24
|
+
const revoke: IRevokeBeamShareParams = { beamId: 'b1', shareId: 's1' };
|
|
25
|
+
const renewResp: IRenewBeamResponse['data'] = { beamTransfer: {} as never };
|
|
26
|
+
const createResp: ICreateBeamShareResponse['data'] = { contentShare: {} as never };
|
|
27
|
+
const listResp: IListBeamSharesResponse['data'] = { contentShares: [] };
|
|
28
|
+
|
|
29
|
+
expect(renew.beamId).toBe('b1');
|
|
30
|
+
expect(reactivate.beamId).toBe('b1');
|
|
31
|
+
expect(share.targetType).toBe(ShareTargetType.PROJECT);
|
|
32
|
+
expect(revoke.shareId).toBe('s1');
|
|
33
|
+
expect(BEAM_MANAGE_TOKEN_HEADER).toBe('x-beam-manage-token');
|
|
34
|
+
expect(renewResp).toBeDefined();
|
|
35
|
+
expect(createResp).toBeDefined();
|
|
36
|
+
expect(listResp.contentShares).toHaveLength(0);
|
|
37
|
+
});
|
|
38
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ShareableContentType, ShareTargetType } from '../enum/content-share.enum';
|
|
2
|
+
|
|
3
|
+
describe('tools content-share mirror — beam sharing members', () => {
|
|
4
|
+
it('exposes ShareableContentType.BEAM matching the abyss-main value', () => {
|
|
5
|
+
expect(ShareableContentType.BEAM).toBe('beam');
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
it('exposes ShareTargetType.PROJECT so beam RESTRICTED grants can target a project', () => {
|
|
9
|
+
expect(ShareTargetType.PROJECT).toBe('PROJECT');
|
|
10
|
+
});
|
|
11
|
+
});
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { BeamVisibility } from '../enum/beam.enum';
|
|
2
|
+
import type { IBeamTransfer, IBeamFile, IBeamRecipient } from '../interface/models/beam.dto';
|
|
3
|
+
|
|
4
|
+
describe('beam DTOs', () => {
|
|
5
|
+
it('exposes the BeamVisibility enum with PUBLIC and RESTRICTED only', () => {
|
|
6
|
+
expect(BeamVisibility.PUBLIC).toBe('PUBLIC');
|
|
7
|
+
expect(BeamVisibility.RESTRICTED).toBe('RESTRICTED');
|
|
8
|
+
expect(Object.values(BeamVisibility).sort()).toEqual(['PUBLIC', 'RESTRICTED']);
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
it('IBeamTransfer carries ownership + transfer fields', () => {
|
|
12
|
+
const transfer: IBeamTransfer = {
|
|
13
|
+
id: 't1',
|
|
14
|
+
slug: 'abcdefghij',
|
|
15
|
+
manageTokenHash: null,
|
|
16
|
+
userId: 'u1',
|
|
17
|
+
organizationId: null,
|
|
18
|
+
projectId: null,
|
|
19
|
+
createdByUserId: 'u1',
|
|
20
|
+
visibility: BeamVisibility.PUBLIC,
|
|
21
|
+
passwordHash: null,
|
|
22
|
+
title: 'My transfer',
|
|
23
|
+
message: null,
|
|
24
|
+
isActive: true,
|
|
25
|
+
expiresAt: null,
|
|
26
|
+
maxDownloads: null,
|
|
27
|
+
downloadCount: 0,
|
|
28
|
+
lastDownloadedAt: null,
|
|
29
|
+
totalSizeOctet: 0,
|
|
30
|
+
fileCount: 0,
|
|
31
|
+
};
|
|
32
|
+
expect(transfer.slug).toHaveLength(10);
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
it('IBeamFile and IBeamRecipient carry their row fields', () => {
|
|
36
|
+
const file: IBeamFile = {
|
|
37
|
+
id: 'f1',
|
|
38
|
+
transferId: 't1',
|
|
39
|
+
storageFileId: 'sf1',
|
|
40
|
+
thumbnailStorageFileId: null,
|
|
41
|
+
name: 'photo.png',
|
|
42
|
+
mimeType: 'image/png',
|
|
43
|
+
sizeOctet: 123,
|
|
44
|
+
isImage: true,
|
|
45
|
+
width: 800,
|
|
46
|
+
height: 600,
|
|
47
|
+
downloadCount: 0,
|
|
48
|
+
position: 0,
|
|
49
|
+
};
|
|
50
|
+
const recipient: IBeamRecipient = {
|
|
51
|
+
id: 'r1',
|
|
52
|
+
transferId: 't1',
|
|
53
|
+
email: 'a@b.dev',
|
|
54
|
+
locale: 'fr',
|
|
55
|
+
sentAt: null,
|
|
56
|
+
firstOpenedAt: null,
|
|
57
|
+
};
|
|
58
|
+
expect(file.isImage).toBe(true);
|
|
59
|
+
expect(recipient.email).toBe('a@b.dev');
|
|
60
|
+
});
|
|
61
|
+
});
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { BeamVisibility } from '../enum/beam.enum';
|
|
2
|
+
import type {
|
|
3
|
+
ICreateBeamBody,
|
|
4
|
+
IUpdateBeamBody,
|
|
5
|
+
IPaginateBeamQuery,
|
|
6
|
+
} from '../interface/api/requests/beam.request';
|
|
7
|
+
import type {
|
|
8
|
+
ICreateBeamResponse,
|
|
9
|
+
IPaginateBeamResponse,
|
|
10
|
+
} from '../interface/api/responses/beam.response';
|
|
11
|
+
|
|
12
|
+
describe('beam request/response types', () => {
|
|
13
|
+
it('ICreateBeamBody accepts the finalize metadata bundle', () => {
|
|
14
|
+
const body: ICreateBeamBody = {
|
|
15
|
+
title: 'Pictures',
|
|
16
|
+
message: 'enjoy',
|
|
17
|
+
visibility: BeamVisibility.PUBLIC,
|
|
18
|
+
expiresInDays: 7,
|
|
19
|
+
password: 'secret',
|
|
20
|
+
maxDownloads: 100,
|
|
21
|
+
};
|
|
22
|
+
expect(body.visibility).toBe(BeamVisibility.PUBLIC);
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
it('IUpdateBeamBody allows nulling expiry and maxDownloads', () => {
|
|
26
|
+
const body: IUpdateBeamBody = { expiresAt: null, maxDownloads: null, isActive: false };
|
|
27
|
+
expect(body.expiresAt).toBeNull();
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
it('IPaginateBeamQuery extends pagination with filters', () => {
|
|
31
|
+
const q: IPaginateBeamQuery = { page: 1, limit: 10, title: 'pic', isActive: true };
|
|
32
|
+
expect(q.page).toBe(1);
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
it('responses wrap the transfer payload', () => {
|
|
36
|
+
const created: ICreateBeamResponse = { data: { beamTransfer: { id: 't1' } as never } };
|
|
37
|
+
const page: IPaginateBeamResponse = {
|
|
38
|
+
data: { maxPages: 1, currentPage: 1, totalItems: 0, data: [] },
|
|
39
|
+
};
|
|
40
|
+
expect(created.data.beamTransfer.id).toBe('t1');
|
|
41
|
+
expect(page.data.totalItems).toBe(0);
|
|
42
|
+
});
|
|
43
|
+
});
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
// ──────────────────────────────────────────────
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
// AbyssTools
|
|
5
|
-
// the raw JSON body using the secret provided at extract time. Receivers
|
|
6
|
-
// compare the X-RCB-Signature header (format `sha256=<hex>`) against the
|
|
7
|
-
// same computation. Constant-time compare prevents timing attacks.
|
|
8
|
-
//
|
|
9
|
-
// Lazy-requires `crypto` so the SDK stays browser-compatible when this
|
|
10
|
-
// utility is never invoked (browsers won't receive webhooks anyway).
|
|
11
|
-
// ──────────────────────────────────────────────
|
|
12
|
-
|
|
13
|
-
export interface
|
|
14
|
-
rawBody: string | Buffer;
|
|
15
|
-
signatureHeader: string | undefined;
|
|
16
|
-
secret: string;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export function
|
|
20
|
-
if (!input.signatureHeader || !input.secret) return false;
|
|
21
|
-
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
22
|
-
const crypto = require('crypto');
|
|
23
|
-
const provided = input.signatureHeader.replace(/^sha256=/, '');
|
|
24
|
-
const computed: string = crypto
|
|
25
|
-
.createHmac('sha256', input.secret)
|
|
26
|
-
.update(input.rawBody)
|
|
27
|
-
.digest('hex');
|
|
28
|
-
if (provided.length !== computed.length) return false;
|
|
29
|
-
return crypto.timingSafeEqual(Buffer.from(provided, 'hex'), Buffer.from(computed, 'hex'));
|
|
30
|
-
}
|
|
1
|
+
// ──────────────────────────────────────────────
|
|
2
|
+
// Extraction webhook signature verification (server-side helper for receivers).
|
|
3
|
+
//
|
|
4
|
+
// AbyssTools extraction queue signs every webhook delivery with HMAC-SHA256 of
|
|
5
|
+
// the raw JSON body using the secret provided at extract time. Receivers
|
|
6
|
+
// compare the X-RCB-Signature header (format `sha256=<hex>`) against the
|
|
7
|
+
// same computation. Constant-time compare prevents timing attacks.
|
|
8
|
+
//
|
|
9
|
+
// Lazy-requires `crypto` so the SDK stays browser-compatible when this
|
|
10
|
+
// utility is never invoked (browsers won't receive webhooks anyway).
|
|
11
|
+
// ──────────────────────────────────────────────
|
|
12
|
+
|
|
13
|
+
export interface VerifyExtractionWebhookInput {
|
|
14
|
+
rawBody: string | Buffer;
|
|
15
|
+
signatureHeader: string | undefined;
|
|
16
|
+
secret: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export function verifyExtractionWebhook(input: VerifyExtractionWebhookInput): boolean {
|
|
20
|
+
if (!input.signatureHeader || !input.secret) return false;
|
|
21
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
22
|
+
const crypto = require('crypto');
|
|
23
|
+
const provided = input.signatureHeader.replace(/^sha256=/, '');
|
|
24
|
+
const computed: string = crypto
|
|
25
|
+
.createHmac('sha256', input.secret)
|
|
26
|
+
.update(input.rawBody)
|
|
27
|
+
.digest('hex');
|
|
28
|
+
if (provided.length !== computed.length) return false;
|
|
29
|
+
return crypto.timingSafeEqual(Buffer.from(provided, 'hex'), Buffer.from(computed, 'hex'));
|
|
30
|
+
}
|
package/src/utils/index.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from './error.utils';
|
|
2
|
-
export * from './board.utils';
|
|
3
|
-
export * from './shape.utils';
|
|
4
|
-
export * from './icons.utils';
|
|
5
|
-
export * from './enum.utils';
|
|
6
|
-
export * from './
|
|
1
|
+
export * from './error.utils';
|
|
2
|
+
export * from './board.utils';
|
|
3
|
+
export * from './shape.utils';
|
|
4
|
+
export * from './icons.utils';
|
|
5
|
+
export * from './enum.utils';
|
|
6
|
+
export * from './extraction-webhook.utils';
|
package/tsconfig.json
CHANGED
|
@@ -1,35 +1,36 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"incremental": false,
|
|
4
|
-
"target": "es2021",
|
|
5
|
-
"lib": [
|
|
6
|
-
"dom",
|
|
7
|
-
"es2021"
|
|
8
|
-
],
|
|
9
|
-
"experimentalDecorators": true,
|
|
10
|
-
"emitDecoratorMetadata": true,
|
|
11
|
-
"module": "commonjs",
|
|
12
|
-
"rootDir": "src",
|
|
13
|
-
"moduleResolution": "node",
|
|
14
|
-
"resolveJsonModule": true,
|
|
15
|
-
"allowJs": true,
|
|
16
|
-
"declaration": true,
|
|
17
|
-
"sourceMap": true,
|
|
18
|
-
"outDir": "./dist",
|
|
19
|
-
"removeComments": true,
|
|
20
|
-
"allowSyntheticDefaultImports": true,
|
|
21
|
-
"esModuleInterop": true,
|
|
22
|
-
"forceConsistentCasingInFileNames": true,
|
|
23
|
-
"strict": true,
|
|
24
|
-
"strictNullChecks": true,
|
|
25
|
-
"strictFunctionTypes": true,
|
|
26
|
-
"strictPropertyInitialization": false,
|
|
27
|
-
"skipLibCheck": true
|
|
28
|
-
},
|
|
29
|
-
"include": [
|
|
30
|
-
"./src"
|
|
31
|
-
],
|
|
32
|
-
"exclude": [
|
|
33
|
-
"./dist/**/*"
|
|
34
|
-
|
|
35
|
-
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"incremental": false,
|
|
4
|
+
"target": "es2021",
|
|
5
|
+
"lib": [
|
|
6
|
+
"dom",
|
|
7
|
+
"es2021"
|
|
8
|
+
],
|
|
9
|
+
"experimentalDecorators": true,
|
|
10
|
+
"emitDecoratorMetadata": true,
|
|
11
|
+
"module": "commonjs",
|
|
12
|
+
"rootDir": "src",
|
|
13
|
+
"moduleResolution": "node",
|
|
14
|
+
"resolveJsonModule": true,
|
|
15
|
+
"allowJs": true,
|
|
16
|
+
"declaration": true,
|
|
17
|
+
"sourceMap": true,
|
|
18
|
+
"outDir": "./dist",
|
|
19
|
+
"removeComments": true,
|
|
20
|
+
"allowSyntheticDefaultImports": true,
|
|
21
|
+
"esModuleInterop": true,
|
|
22
|
+
"forceConsistentCasingInFileNames": true,
|
|
23
|
+
"strict": true,
|
|
24
|
+
"strictNullChecks": true,
|
|
25
|
+
"strictFunctionTypes": true,
|
|
26
|
+
"strictPropertyInitialization": false,
|
|
27
|
+
"skipLibCheck": true
|
|
28
|
+
},
|
|
29
|
+
"include": [
|
|
30
|
+
"./src"
|
|
31
|
+
],
|
|
32
|
+
"exclude": [
|
|
33
|
+
"./dist/**/*",
|
|
34
|
+
"./src/**/*.spec.ts"
|
|
35
|
+
]
|
|
36
|
+
}
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"atlas-page-content.api.js","sourceRoot":"","sources":["../../src/api/atlas-page-content.api.ts"],"names":[],"mappings":""}
|
package/dist/api/pdf.api.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { IAppendPdfOperationsBody, IAppendPdfOperationsResponse, ICreatePdfBody, ICreatePdfResponse, ICreateForOrganizationPdfParams, ICreateForProjectPdfParams, IDeletePdfResponse, IExportPdfBody, IExportPdfResponse, IGetPdfParams, IGetPdfResponse, IGetPdfSourceUrlResponse, IGetPdfUploadUrlResponse, IPaginatePdfQuery, IPaginatePdfResponse, IPaginateOrganizationPdfParams, IPaginateProjectPdfParams, IUpdatePdfBody, IUpdatePdfResponse } from '../types';
|
|
2
|
-
export declare const paginatePdf: (query: IPaginatePdfQuery) => Promise<IPaginatePdfResponse>;
|
|
3
|
-
export declare const getPdf: (params: IGetPdfParams) => Promise<IGetPdfResponse>;
|
|
4
|
-
export declare const createPdf: (body: ICreatePdfBody) => Promise<ICreatePdfResponse>;
|
|
5
|
-
export declare const updatePdf: (params: IGetPdfParams, body: IUpdatePdfBody) => Promise<IUpdatePdfResponse>;
|
|
6
|
-
export declare const appendPdfOperations: (params: IGetPdfParams, body: IAppendPdfOperationsBody) => Promise<IAppendPdfOperationsResponse>;
|
|
7
|
-
export declare const exportPdf: (params: IGetPdfParams, body: IExportPdfBody) => Promise<IExportPdfResponse>;
|
|
8
|
-
export declare const getPdfSourceUrl: (params: IGetPdfParams) => Promise<IGetPdfSourceUrlResponse>;
|
|
9
|
-
export declare const getPdfUploadUrl: () => Promise<IGetPdfUploadUrlResponse>;
|
|
10
|
-
export declare const deletePdf: (params: IGetPdfParams) => Promise<IDeletePdfResponse>;
|
|
11
|
-
export declare const snapshotPdf: (params: IGetPdfParams) => Promise<IAppendPdfOperationsResponse>;
|
|
12
|
-
export declare const paginateProjectPdf: (params: IPaginateProjectPdfParams, query: IPaginatePdfQuery) => Promise<IPaginatePdfResponse>;
|
|
13
|
-
export declare const paginateOrganizationPdf: (params: IPaginateOrganizationPdfParams, query: IPaginatePdfQuery) => Promise<IPaginatePdfResponse>;
|
|
14
|
-
export declare const createForProjectPdf: (params: ICreateForProjectPdfParams, body: ICreatePdfBody) => Promise<ICreatePdfResponse>;
|
|
15
|
-
export declare const createForOrganizationPdf: (params: ICreateForOrganizationPdfParams, body: ICreatePdfBody) => Promise<ICreatePdfResponse>;
|
package/dist/api/pdf.api.js
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createForOrganizationPdf = exports.createForProjectPdf = exports.paginateOrganizationPdf = exports.paginateProjectPdf = exports.snapshotPdf = exports.deletePdf = exports.getPdfUploadUrl = exports.getPdfSourceUrl = exports.exportPdf = exports.appendPdfOperations = exports.updatePdf = exports.createPdf = exports.getPdf = exports.paginatePdf = void 0;
|
|
4
|
-
const __1 = require("..");
|
|
5
|
-
const paginatePdf = async (query) => {
|
|
6
|
-
return (await __1.AbyssToolsCore.axios.get('pdf/paginate', { params: query })).data;
|
|
7
|
-
};
|
|
8
|
-
exports.paginatePdf = paginatePdf;
|
|
9
|
-
const getPdf = async (params) => {
|
|
10
|
-
return (await __1.AbyssToolsCore.axios.get(`pdf/${params.pdfId}`)).data;
|
|
11
|
-
};
|
|
12
|
-
exports.getPdf = getPdf;
|
|
13
|
-
const createPdf = async (body) => {
|
|
14
|
-
return (await __1.AbyssToolsCore.axios.post('pdf', body)).data;
|
|
15
|
-
};
|
|
16
|
-
exports.createPdf = createPdf;
|
|
17
|
-
const updatePdf = async (params, body) => {
|
|
18
|
-
return (await __1.AbyssToolsCore.axios.put(`pdf/${params.pdfId}`, body)).data;
|
|
19
|
-
};
|
|
20
|
-
exports.updatePdf = updatePdf;
|
|
21
|
-
const appendPdfOperations = async (params, body) => {
|
|
22
|
-
return (await __1.AbyssToolsCore.axios.put(`pdf/${params.pdfId}/operations`, body)).data;
|
|
23
|
-
};
|
|
24
|
-
exports.appendPdfOperations = appendPdfOperations;
|
|
25
|
-
const exportPdf = async (params, body) => {
|
|
26
|
-
return (await __1.AbyssToolsCore.axios.post(`pdf/${params.pdfId}/export`, body)).data;
|
|
27
|
-
};
|
|
28
|
-
exports.exportPdf = exportPdf;
|
|
29
|
-
const getPdfSourceUrl = async (params) => {
|
|
30
|
-
return (await __1.AbyssToolsCore.axios.get(`pdf/${params.pdfId}/source-url`)).data;
|
|
31
|
-
};
|
|
32
|
-
exports.getPdfSourceUrl = getPdfSourceUrl;
|
|
33
|
-
const getPdfUploadUrl = async () => {
|
|
34
|
-
return (await __1.AbyssToolsCore.axios.post('pdf/upload-url', {})).data;
|
|
35
|
-
};
|
|
36
|
-
exports.getPdfUploadUrl = getPdfUploadUrl;
|
|
37
|
-
const deletePdf = async (params) => {
|
|
38
|
-
return (await __1.AbyssToolsCore.axios.delete(`pdf/${params.pdfId}`)).data;
|
|
39
|
-
};
|
|
40
|
-
exports.deletePdf = deletePdf;
|
|
41
|
-
const snapshotPdf = async (params) => {
|
|
42
|
-
return (await __1.AbyssToolsCore.axios.post(`pdf/${params.pdfId}/snapshot`)).data;
|
|
43
|
-
};
|
|
44
|
-
exports.snapshotPdf = snapshotPdf;
|
|
45
|
-
const paginateProjectPdf = async (params, query) => {
|
|
46
|
-
return (await __1.AbyssToolsCore.axios.get(`project/${params.projectId}/pdf/paginate`, { params: query })).data;
|
|
47
|
-
};
|
|
48
|
-
exports.paginateProjectPdf = paginateProjectPdf;
|
|
49
|
-
const paginateOrganizationPdf = async (params, query) => {
|
|
50
|
-
return (await __1.AbyssToolsCore.axios.get(`organization/${params.organizationId}/pdf/paginate`, { params: query })).data;
|
|
51
|
-
};
|
|
52
|
-
exports.paginateOrganizationPdf = paginateOrganizationPdf;
|
|
53
|
-
const createForProjectPdf = async (params, body) => {
|
|
54
|
-
return (await __1.AbyssToolsCore.axios.post(`pdf/project/${params.projectId}`, body)).data;
|
|
55
|
-
};
|
|
56
|
-
exports.createForProjectPdf = createForProjectPdf;
|
|
57
|
-
const createForOrganizationPdf = async (params, body) => {
|
|
58
|
-
return (await __1.AbyssToolsCore.axios.post(`pdf/organization/${params.organizationId}`, body)).data;
|
|
59
|
-
};
|
|
60
|
-
exports.createForOrganizationPdf = createForOrganizationPdf;
|
|
61
|
-
//# sourceMappingURL=pdf.api.js.map
|
package/dist/api/pdf.api.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pdf.api.js","sourceRoot":"","sources":["../../src/api/pdf.api.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ICreatePdfPublicBody, ICreatePdfPublicResponse, IGetPdfPublicParams, IGetPdfPublicResponse, IGetPdfPublicSourceUrlResponse, IGetPdfPublicUploadUrlResponse, IUpdatePdfPublicBody, IUpdatePdfPublicResponse, IAppendPdfPublicOperationsBody, IAppendPdfPublicOperationsResponse, IExportPdfPublicBody, IExportPdfPublicResponse } from '../types';
|
|
2
|
-
export declare const createPdfPublic: (body: ICreatePdfPublicBody) => Promise<ICreatePdfPublicResponse>;
|
|
3
|
-
export declare const getPdfPublic: (params: IGetPdfPublicParams) => Promise<IGetPdfPublicResponse>;
|
|
4
|
-
export declare const updatePdfPublic: (params: IGetPdfPublicParams, body: IUpdatePdfPublicBody) => Promise<IUpdatePdfPublicResponse>;
|
|
5
|
-
export declare const appendPdfPublicOperations: (params: IGetPdfPublicParams, body: IAppendPdfPublicOperationsBody) => Promise<IAppendPdfPublicOperationsResponse>;
|
|
6
|
-
export declare const exportPdfPublic: (params: IGetPdfPublicParams, body: IExportPdfPublicBody) => Promise<IExportPdfPublicResponse>;
|
|
7
|
-
export declare const getPdfPublicSourceUrl: (params: IGetPdfPublicParams) => Promise<IGetPdfPublicSourceUrlResponse>;
|
|
8
|
-
export declare const getPdfPublicUploadUrl: () => Promise<IGetPdfPublicUploadUrlResponse>;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getPdfPublicUploadUrl = exports.getPdfPublicSourceUrl = exports.exportPdfPublic = exports.appendPdfPublicOperations = exports.updatePdfPublic = exports.getPdfPublic = exports.createPdfPublic = void 0;
|
|
4
|
-
const __1 = require("..");
|
|
5
|
-
const createPdfPublic = async (body) => {
|
|
6
|
-
return (await __1.AbyssToolsCore.axios.post('pdf/public', body)).data;
|
|
7
|
-
};
|
|
8
|
-
exports.createPdfPublic = createPdfPublic;
|
|
9
|
-
const getPdfPublic = async (params) => {
|
|
10
|
-
return (await __1.AbyssToolsCore.axios.get(`pdf/public/${params.publicAccessToken}`)).data;
|
|
11
|
-
};
|
|
12
|
-
exports.getPdfPublic = getPdfPublic;
|
|
13
|
-
const updatePdfPublic = async (params, body) => {
|
|
14
|
-
return (await __1.AbyssToolsCore.axios.put(`pdf/public/${params.publicAccessToken}`, body)).data;
|
|
15
|
-
};
|
|
16
|
-
exports.updatePdfPublic = updatePdfPublic;
|
|
17
|
-
const appendPdfPublicOperations = async (params, body) => {
|
|
18
|
-
return (await __1.AbyssToolsCore.axios.put(`pdf/public/${params.publicAccessToken}/operations`, body)).data;
|
|
19
|
-
};
|
|
20
|
-
exports.appendPdfPublicOperations = appendPdfPublicOperations;
|
|
21
|
-
const exportPdfPublic = async (params, body) => {
|
|
22
|
-
return (await __1.AbyssToolsCore.axios.post(`pdf/public/${params.publicAccessToken}/export`, body)).data;
|
|
23
|
-
};
|
|
24
|
-
exports.exportPdfPublic = exportPdfPublic;
|
|
25
|
-
const getPdfPublicSourceUrl = async (params) => {
|
|
26
|
-
return (await __1.AbyssToolsCore.axios.get(`pdf/public/${params.publicAccessToken}/source-url`)).data;
|
|
27
|
-
};
|
|
28
|
-
exports.getPdfPublicSourceUrl = getPdfPublicSourceUrl;
|
|
29
|
-
const getPdfPublicUploadUrl = async () => {
|
|
30
|
-
return (await __1.AbyssToolsCore.axios.post('pdf/public/upload-url', {})).data;
|
|
31
|
-
};
|
|
32
|
-
exports.getPdfPublicUploadUrl = getPdfPublicUploadUrl;
|
|
33
|
-
//# sourceMappingURL=pdf.public.api.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pdf.public.api.js","sourceRoot":"","sources":["../../src/api/pdf.public.api.ts"],"names":[],"mappings":";;;AAAA,0BAAoC;AAgB7B,MAAM,eAAe,GAAG,KAAK,EAClC,IAA0B,EACS,EAAE;IACrC,OAAO,CAAC,MAAM,kBAAc,CAAC,KAAK,CAAC,IAAI,CAA2B,YAAY,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;AAC9F,CAAC,CAAC;AAJW,QAAA,eAAe,mBAI1B;AAEK,MAAM,YAAY,GAAG,KAAK,EAC/B,MAA2B,EACK,EAAE;IAClC,OAAO,CACL,MAAM,kBAAc,CAAC,KAAK,CAAC,GAAG,CAC5B,cAAc,MAAM,CAAC,iBAAiB,EAAE,CACzC,CACF,CAAC,IAAI,CAAC;AACT,CAAC,CAAC;AARW,QAAA,YAAY,gBAQvB;AAEK,MAAM,eAAe,GAAG,KAAK,EAClC,MAA2B,EAC3B,IAA0B,EACS,EAAE;IACrC,OAAO,CACL,MAAM,kBAAc,CAAC,KAAK,CAAC,GAAG,CAC5B,cAAc,MAAM,CAAC,iBAAiB,EAAE,EACxC,IAAI,CACL,CACF,CAAC,IAAI,CAAC;AACT,CAAC,CAAC;AAVW,QAAA,eAAe,mBAU1B;AAEK,MAAM,yBAAyB,GAAG,KAAK,EAC5C,MAA2B,EAC3B,IAAoC,EACS,EAAE;IAC/C,OAAO,CACL,MAAM,kBAAc,CAAC,KAAK,CAAC,GAAG,CAC5B,cAAc,MAAM,CAAC,iBAAiB,aAAa,EACnD,IAAI,CACL,CACF,CAAC,IAAI,CAAC;AACT,CAAC,CAAC;AAVW,QAAA,yBAAyB,6BAUpC;AAEK,MAAM,eAAe,GAAG,KAAK,EAClC,MAA2B,EAC3B,IAA0B,EACS,EAAE;IACrC,OAAO,CACL,MAAM,kBAAc,CAAC,KAAK,CAAC,IAAI,CAC7B,cAAc,MAAM,CAAC,iBAAiB,SAAS,EAC/C,IAAI,CACL,CACF,CAAC,IAAI,CAAC;AACT,CAAC,CAAC;AAVW,QAAA,eAAe,mBAU1B;AAEK,MAAM,qBAAqB,GAAG,KAAK,EACxC,MAA2B,EACc,EAAE;IAC3C,OAAO,CACL,MAAM,kBAAc,CAAC,KAAK,CAAC,GAAG,CAC5B,cAAc,MAAM,CAAC,iBAAiB,aAAa,CACpD,CACF,CAAC,IAAI,CAAC;AACT,CAAC,CAAC;AARW,QAAA,qBAAqB,yBAQhC;AAEK,MAAM,qBAAqB,GAAG,KAAK,IAA6C,EAAE;IACvF,OAAO,CACL,MAAM,kBAAc,CAAC,KAAK,CAAC,IAAI,CAAiC,uBAAuB,EAAE,EAAE,CAAC,CAC7F,CAAC,IAAI,CAAC;AACT,CAAC,CAAC;AAJW,QAAA,qBAAqB,yBAIhC"}
|
package/dist/api/rcb.api.d.ts
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
|
-
import { IExtractRcbBody, IExtractBulkRcbBody, IDetectBulkRcbBody, IListFilesRcbQuery, IPatchFileRcbBody, IPatchExtractionRcbBody, ISearchExtractionRecordsRcbQuery, IExportExtractionRcbQuery, IAsyncExportExtractionRcbBody, IListUsageRcbQuery, ISummaryUsageRcbQuery, IListWebhookDeliveriesRcbQuery, IReplayWebhookDeliveryRcbBody, IMintShareExtractionRcbBody } from '../types';
|
|
4
|
-
import { IExtractSyncRcbResponse, IExtractQueueRcbResponse, IExtractBulkRcbResponse, IDetectRcbResponse, IDetectBulkRcbResponse, IListFilesRcbResponse, IGetFileRcbResponse, IListFileExtractionsRcbResponse, IGetExtractionRcbResponse, ISearchExtractionRecordsRcbResponse, IDiffExtractionsRcbResponse, IAsyncExportRcbResponse, IGetExportJobRcbResponse, ICreateTemplateRcbResponse, IUpdateTemplateRcbResponse, IListTemplatesRcbResponse, IGetTemplateRcbResponse, IListTemplateVersionsRcbResponse, IRcbTemplateCollection, IImportTemplateCollectionRcbResponse, IGetJobRcbResponse, ICreateFeedbackRcbResponse, IListFeedbackRcbResponse, IGetFeedbackRcbResponse, IHealthRcbResponse, IStatsRcbResponse, ISummaryUsageRcbResponse, IGetQuotaRcbResponse, IListWebhookDeliveriesRcbResponse, IGetWebhookDeliveryRcbResponse, IGetSharedExtractionRcbResponse, IMintShareExtractionRcbResponse, IChangelogRcbResponse } from '../types';
|
|
5
|
-
import { ICreateTemplateRcbBody, IUpdateTemplateRcbBody, IPatchTemplateMetaRcbBody, ICreateFeedbackRcbBody, IPatchFeedbackRcbBody, IListFeedbackRcbQuery, IListSharedFilesRcbQuery, IPaginateRcbWebhookQuery, ICreateRcbWebhookBody, IUpdateRcbWebhookBody, IRcbWebhookScopeQuery } from '../types';
|
|
6
|
-
import type { IPaginateRcbWebhookResponse, IGetRcbWebhookResponse, ICreateRcbWebhookResponse, IUpdateRcbWebhookResponse, IDeleteRcbWebhookResponse, IResetSecretRcbWebhookResponse } from '../types';
|
|
7
|
-
export interface ExtractCallOptions {
|
|
8
|
-
idempotencyKey?: string;
|
|
9
|
-
}
|
|
10
|
-
export declare const extractSyncRcb: (body: IExtractRcbBody, apiKey?: string, opts?: ExtractCallOptions) => Promise<IExtractSyncRcbResponse>;
|
|
11
|
-
export declare const extractQueueRcb: (body: IExtractRcbBody, apiKey?: string, opts?: ExtractCallOptions) => Promise<IExtractQueueRcbResponse>;
|
|
12
|
-
export declare const extractBulkRcb: (body: IExtractBulkRcbBody, apiKey?: string) => Promise<IExtractBulkRcbResponse>;
|
|
13
|
-
export declare const detectRcb: (pdf: Buffer | Uint8Array, pdfFilename?: string, apiKey?: string) => Promise<IDetectRcbResponse>;
|
|
14
|
-
export declare const detectBulkRcb: (body: IDetectBulkRcbBody, apiKey?: string) => Promise<IDetectBulkRcbResponse>;
|
|
15
|
-
export declare const listFilesRcb: (query?: IListFilesRcbQuery, apiKey?: string) => Promise<IListFilesRcbResponse>;
|
|
16
|
-
export declare const getFileRcb: (fileId: string, apiKey?: string) => Promise<IGetFileRcbResponse>;
|
|
17
|
-
export declare const listFileExtractionsRcb: (fileId: string, query?: {
|
|
18
|
-
limit?: number;
|
|
19
|
-
offset?: number;
|
|
20
|
-
}, apiKey?: string) => Promise<IListFileExtractionsRcbResponse>;
|
|
21
|
-
export declare const patchFileRcb: (fileId: string, body: IPatchFileRcbBody, apiKey?: string) => Promise<IGetFileRcbResponse>;
|
|
22
|
-
export declare const downloadFileBundleRcb: (fileId: string, query?: {
|
|
23
|
-
format?: 'csv' | 'json';
|
|
24
|
-
}, apiKey?: string) => Promise<Buffer>;
|
|
25
|
-
export declare const getExtractionRcb: (extractionId: string, apiKey?: string) => Promise<IGetExtractionRcbResponse>;
|
|
26
|
-
export declare const patchExtractionRcb: (extractionId: string, body: IPatchExtractionRcbBody, apiKey?: string) => Promise<IGetExtractionRcbResponse>;
|
|
27
|
-
export declare const searchExtractionRecordsRcb: (extractionId: string, query?: ISearchExtractionRecordsRcbQuery, apiKey?: string) => Promise<ISearchExtractionRecordsRcbResponse>;
|
|
28
|
-
export declare const exportExtractionRcb: (extractionId: string, query: IExportExtractionRcbQuery, apiKey?: string) => Promise<{
|
|
29
|
-
body: string;
|
|
30
|
-
contentType: string;
|
|
31
|
-
}>;
|
|
32
|
-
export declare const asyncExportExtractionRcb: (extractionId: string, body: IAsyncExportExtractionRcbBody, apiKey?: string) => Promise<IAsyncExportRcbResponse>;
|
|
33
|
-
export declare const getExportJobRcb: (jobId: string, apiKey?: string) => Promise<IGetExportJobRcbResponse>;
|
|
34
|
-
export declare const diffExtractionsRcb: (extractionId: string, otherId: string, apiKey?: string) => Promise<IDiffExtractionsRcbResponse>;
|
|
35
|
-
export declare const listTemplatesRcb: (apiKey?: string) => Promise<IListTemplatesRcbResponse>;
|
|
36
|
-
export declare const createTemplateRcb: (body: ICreateTemplateRcbBody, apiKey?: string) => Promise<ICreateTemplateRcbResponse>;
|
|
37
|
-
export declare const getTemplateRcb: (templateId: string, apiKey?: string) => Promise<IGetTemplateRcbResponse>;
|
|
38
|
-
export declare const updateTemplateRcb: (templateId: string, body: IUpdateTemplateRcbBody, apiKey?: string) => Promise<IUpdateTemplateRcbResponse>;
|
|
39
|
-
export declare const patchTemplateMetaRcb: (templateId: string, body: IPatchTemplateMetaRcbBody, apiKey?: string) => Promise<void>;
|
|
40
|
-
export declare const deleteTemplateRcb: (templateId: string, apiKey?: string) => Promise<void>;
|
|
41
|
-
export declare const listTemplateVersionsRcb: (templateId: string, apiKey?: string) => Promise<IListTemplateVersionsRcbResponse>;
|
|
42
|
-
export declare const exportTemplateCollectionRcb: (ids: string[] | null, apiKey?: string) => Promise<IRcbTemplateCollection>;
|
|
43
|
-
export declare const importTemplateCollectionRcb: (doc: IRcbTemplateCollection, apiKey?: string) => Promise<IImportTemplateCollectionRcbResponse>;
|
|
44
|
-
export declare const getJobRcb: (jobId: string, apiKey?: string) => Promise<IGetJobRcbResponse>;
|
|
45
|
-
export declare const retryJobRcb: (jobId: string, apiKey?: string) => Promise<void>;
|
|
46
|
-
export declare const cancelJobRcb: (jobId: string, apiKey?: string) => Promise<void>;
|
|
47
|
-
export declare const submitFeedbackRcb: (body: ICreateFeedbackRcbBody, apiKey?: string) => Promise<ICreateFeedbackRcbResponse>;
|
|
48
|
-
export declare const listFeedbackRcb: (query?: IListFeedbackRcbQuery, apiKey?: string) => Promise<IListFeedbackRcbResponse>;
|
|
49
|
-
export declare const getFeedbackRcb: (feedbackId: string, apiKey?: string) => Promise<IGetFeedbackRcbResponse>;
|
|
50
|
-
export declare const patchFeedbackRcb: (feedbackId: string, body: IPatchFeedbackRcbBody, apiKey?: string) => Promise<IGetFeedbackRcbResponse>;
|
|
51
|
-
export declare const healthRcb: (apiKey?: string) => Promise<IHealthRcbResponse>;
|
|
52
|
-
export declare const statsRcb: (apiKey?: string) => Promise<IStatsRcbResponse>;
|
|
53
|
-
export declare const listUsageRcb: (query?: IListUsageRcbQuery, apiKey?: string) => Promise<{
|
|
54
|
-
data: unknown[];
|
|
55
|
-
total?: number;
|
|
56
|
-
}>;
|
|
57
|
-
export declare const summaryUsageRcb: (query?: ISummaryUsageRcbQuery, apiKey?: string) => Promise<ISummaryUsageRcbResponse>;
|
|
58
|
-
export declare const getQuotaRcb: (apiKey?: string) => Promise<IGetQuotaRcbResponse>;
|
|
59
|
-
export declare const listSharedFilesRcb: (query?: IListSharedFilesRcbQuery, apiKey?: string) => Promise<IListFilesRcbResponse>;
|
|
60
|
-
export declare const listWebhookDeliveriesRcb: (query?: IListWebhookDeliveriesRcbQuery, apiKey?: string) => Promise<IListWebhookDeliveriesRcbResponse>;
|
|
61
|
-
export declare const getWebhookDeliveryRcb: (deliveryId: string, apiKey?: string) => Promise<IGetWebhookDeliveryRcbResponse>;
|
|
62
|
-
export declare const replayWebhookDeliveryRcb: (deliveryId: string, body?: IReplayWebhookDeliveryRcbBody, apiKey?: string) => Promise<IGetWebhookDeliveryRcbResponse>;
|
|
63
|
-
export declare const paginateRcbWebhook: (query?: IPaginateRcbWebhookQuery, apiKey?: string) => Promise<IPaginateRcbWebhookResponse>;
|
|
64
|
-
export declare const getRcbWebhook: (webhookId: string, scope?: IRcbWebhookScopeQuery, apiKey?: string) => Promise<IGetRcbWebhookResponse>;
|
|
65
|
-
export declare const createRcbWebhook: (body: ICreateRcbWebhookBody, scope?: IRcbWebhookScopeQuery, apiKey?: string) => Promise<ICreateRcbWebhookResponse>;
|
|
66
|
-
export declare const updateRcbWebhook: (webhookId: string, body: IUpdateRcbWebhookBody, scope?: IRcbWebhookScopeQuery, apiKey?: string) => Promise<IUpdateRcbWebhookResponse>;
|
|
67
|
-
export declare const deleteRcbWebhook: (webhookId: string, scope?: IRcbWebhookScopeQuery, apiKey?: string) => Promise<IDeleteRcbWebhookResponse>;
|
|
68
|
-
export declare const resetSecretRcbWebhook: (webhookId: string, scope?: IRcbWebhookScopeQuery, apiKey?: string) => Promise<IResetSecretRcbWebhookResponse>;
|
|
69
|
-
export declare const mintShareExtractionRcb: (extractionId: string, body?: IMintShareExtractionRcbBody, apiKey?: string) => Promise<IMintShareExtractionRcbResponse>;
|
|
70
|
-
export declare const revokeShareExtractionRcb: (extractionId: string, apiKey?: string) => Promise<void>;
|
|
71
|
-
export declare const getSharedExtractionRcbPublic: (token: string) => Promise<IGetSharedExtractionRcbResponse>;
|
|
72
|
-
export declare const changelogRcb: (apiKey?: string) => Promise<IChangelogRcbResponse>;
|