@arbidocs/react 0.5.19 → 0.5.21
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/{ProductionDialog.d-CttHqQAh.d.ts → ProductionDialog.d-BDJwBSzj.d.ts} +1 -1
- package/dist/{ProductionDialog.d-BD1osHeq.d.cts → ProductionDialog.d-DjRQFmQw.d.cts} +1 -1
- package/dist/annotations/freeze/index.cjs +15 -15
- package/dist/annotations/freeze/index.d.cts +1 -1
- package/dist/annotations/freeze/index.d.ts +1 -1
- package/dist/annotations/freeze/index.js +3 -3
- package/dist/annotations/index.cjs +56 -56
- package/dist/annotations/index.d.cts +5 -5
- package/dist/annotations/index.d.ts +5 -5
- package/dist/annotations/index.js +2 -2
- package/dist/artifacts/index.cjs +11 -11
- package/dist/artifacts/index.js +4 -4
- package/dist/bundle-DCWPYNGD.cjs +14 -0
- package/dist/{bundle-B5AN4B7H.cjs.map → bundle-DCWPYNGD.cjs.map} +1 -1
- package/dist/bundle-JCKKGEJE.js +5 -0
- package/dist/{bundle-4TKU5WEQ.js.map → bundle-JCKKGEJE.js.map} +1 -1
- package/dist/calls/livekit/index.cjs +43 -43
- package/dist/calls/livekit/index.js +4 -4
- package/dist/{chunk-YWYCEEBF.js → chunk-2HVCNYFH.js} +32 -3
- package/dist/chunk-2HVCNYFH.js.map +1 -0
- package/dist/{chunk-NSSGDZSL.cjs → chunk-2IJP73ZG.cjs} +2 -2
- package/dist/{chunk-NSSGDZSL.cjs.map → chunk-2IJP73ZG.cjs.map} +1 -1
- package/dist/{chunk-KFFH2JJM.cjs → chunk-4UDIA47U.cjs} +32 -32
- package/dist/{chunk-KFFH2JJM.cjs.map → chunk-4UDIA47U.cjs.map} +1 -1
- package/dist/{chunk-D63FAYES.js → chunk-A2XSLTIP.js} +5 -5
- package/dist/chunk-A2XSLTIP.js.map +1 -0
- package/dist/{chunk-EYOXZHXM.cjs → chunk-B6I2HRRF.cjs} +9 -9
- package/dist/chunk-B6I2HRRF.cjs.map +1 -0
- package/dist/{chunk-2M4B4FFA.cjs → chunk-CZP7FF3E.cjs} +31 -2
- package/dist/chunk-CZP7FF3E.cjs.map +1 -0
- package/dist/{chunk-GUCQMP6G.js → chunk-EEJHABLB.js} +5 -5
- package/dist/chunk-EEJHABLB.js.map +1 -0
- package/dist/{chunk-CNRF5SLZ.cjs → chunk-FLAZSNC5.cjs} +33 -33
- package/dist/{chunk-CNRF5SLZ.cjs.map → chunk-FLAZSNC5.cjs.map} +1 -1
- package/dist/{chunk-J2GERLMU.js → chunk-LYGJVSNM.js} +3 -3
- package/dist/{chunk-J2GERLMU.js.map → chunk-LYGJVSNM.js.map} +1 -1
- package/dist/{chunk-GN33GLHR.js → chunk-MQ7LZWGP.js} +3 -3
- package/dist/{chunk-GN33GLHR.js.map → chunk-MQ7LZWGP.js.map} +1 -1
- package/dist/{chunk-RG2ZE7DF.js → chunk-PBXJFMES.js} +5 -2
- package/dist/chunk-PBXJFMES.js.map +1 -0
- package/dist/{chunk-4VQ3XHAQ.cjs → chunk-RB23E45O.cjs} +42 -42
- package/dist/chunk-RB23E45O.cjs.map +1 -0
- package/dist/{chunk-H4FGDXYB.cjs → chunk-RRWAX52L.cjs} +5 -2
- package/dist/chunk-RRWAX52L.cjs.map +1 -0
- package/dist/{chunk-ALLWAYMB.cjs → chunk-SUZORMAB.cjs} +157 -65
- package/dist/chunk-SUZORMAB.cjs.map +1 -0
- package/dist/{chunk-XTWUMTCQ.js → chunk-T3USOSVN.js} +2 -2
- package/dist/{chunk-XTWUMTCQ.js.map → chunk-T3USOSVN.js.map} +1 -1
- package/dist/{chunk-2XMHFQ7M.js → chunk-T4CLW3DN.js} +141 -49
- package/dist/chunk-T4CLW3DN.js.map +1 -0
- package/dist/document-tools/index.cjs +174 -69
- package/dist/document-tools/index.cjs.map +1 -1
- package/dist/document-tools/index.d.cts +99 -6
- package/dist/document-tools/index.d.ts +99 -6
- package/dist/document-tools/index.js +107 -10
- package/dist/document-tools/index.js.map +1 -1
- package/dist/index.cjs +856 -747
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +75 -8
- package/dist/index.d.ts +75 -8
- package/dist/index.js +119 -13
- package/dist/index.js.map +1 -1
- package/dist/{model.d-D63gedpb.d.cts → model.d-CNtRWKVK.d.cts} +1 -1
- package/dist/{model.d-D63gedpb.d.ts → model.d-CNtRWKVK.d.ts} +1 -1
- package/dist/{query-keys.d-ClYiYNBR.d.cts → query-keys.d-DM2N5pzN.d.cts} +3 -0
- package/dist/{query-keys.d-ClYiYNBR.d.ts → query-keys.d-DM2N5pzN.d.ts} +3 -0
- package/package.json +3 -3
- package/dist/bundle-4TKU5WEQ.js +0 -5
- package/dist/bundle-B5AN4B7H.cjs +0 -14
- package/dist/chunk-2M4B4FFA.cjs.map +0 -1
- package/dist/chunk-2XMHFQ7M.js.map +0 -1
- package/dist/chunk-4VQ3XHAQ.cjs.map +0 -1
- package/dist/chunk-ALLWAYMB.cjs.map +0 -1
- package/dist/chunk-D63FAYES.js.map +0 -1
- package/dist/chunk-EYOXZHXM.cjs.map +0 -1
- package/dist/chunk-GUCQMP6G.js.map +0 -1
- package/dist/chunk-H4FGDXYB.cjs.map +0 -1
- package/dist/chunk-RG2ZE7DF.js.map +0 -1
- package/dist/chunk-YWYCEEBF.js.map +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import { ArbiClient, operations, components, KeyPair } from '@arbidocs/client';
|
|
4
|
-
import { P as ProductionChoices, A as AnnotationStore } from '../ProductionDialog.d-
|
|
4
|
+
import { P as ProductionChoices, A as AnnotationStore } from '../ProductionDialog.d-DjRQFmQw.cjs';
|
|
5
5
|
import { a as BundleFile, b as BundleIndexEntry } from '../bundle.d-BnCSbHy2.cjs';
|
|
6
|
-
import { A as Annotation, b as AnnotationLayer } from '../model.d-
|
|
6
|
+
import { A as Annotation, b as AnnotationLayer } from '../model.d-CNtRWKVK.cjs';
|
|
7
7
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
8
|
-
import { D as DocumentBytesKind } from '../query-keys.d-
|
|
9
|
-
export { f as documentBytesKey } from '../query-keys.d-
|
|
8
|
+
import { D as DocumentBytesKind } from '../query-keys.d-DM2N5pzN.cjs';
|
|
9
|
+
export { f as documentBytesKey } from '../query-keys.d-DM2N5pzN.cjs';
|
|
10
10
|
import '@arbidocs/sdk/browser';
|
|
11
11
|
|
|
12
12
|
type DocumentToolsClient = ArbiClient['fetch'];
|
|
@@ -90,6 +90,8 @@ interface DocumentToolsEnvironment {
|
|
|
90
90
|
}
|
|
91
91
|
/** The environment with every default filled in. */
|
|
92
92
|
interface ResolvedDocumentToolsEnvironment extends DocumentToolsEnvironment {
|
|
93
|
+
prepareFileShare: (documentId: string) => Promise<void>;
|
|
94
|
+
registerBeforeFileShare: (documentId: string, flush: () => Promise<void>) => () => void;
|
|
93
95
|
notify: DocumentToolsNotify;
|
|
94
96
|
saveFile: (blob: Blob, fileName: string) => void;
|
|
95
97
|
uploadDocument: (request: DocumentUploadRequest) => Promise<{
|
|
@@ -912,7 +914,7 @@ interface SavedSignature {
|
|
|
912
914
|
initials_png: string;
|
|
913
915
|
}
|
|
914
916
|
/** The one line shown wherever a saved signature is placed by hand. */
|
|
915
|
-
declare const INFORMAL_SIGNATURE_NOTE = "
|
|
917
|
+
declare const INFORMAL_SIGNATURE_NOTE = "Your saved signature or initials are placed as an image on the document.";
|
|
916
918
|
/** The user's own keypair (the session's); a host or a test may pass another. */
|
|
917
919
|
type KeypairSource = () => Promise<KeyPair | null>;
|
|
918
920
|
/** The saved signature, opened with the user's own key; null when none is saved. */
|
|
@@ -932,4 +934,95 @@ declare function pngSize(base64: string): {
|
|
|
932
934
|
height: number;
|
|
933
935
|
};
|
|
934
936
|
|
|
935
|
-
|
|
937
|
+
type FileShare = components['schemas']['FileShareResponse'];
|
|
938
|
+
type CreateFileShare = components['schemas']['CreateFileShare'];
|
|
939
|
+
declare function createFileShare(client: DocumentToolsClient, documentId: string, body: CreateFileShare): Promise<{
|
|
940
|
+
external_id: string;
|
|
941
|
+
document_ext_id: string;
|
|
942
|
+
version: number;
|
|
943
|
+
file_name: string;
|
|
944
|
+
status: string;
|
|
945
|
+
source_sha256: string;
|
|
946
|
+
fields: {
|
|
947
|
+
id: string;
|
|
948
|
+
type: "signature" | "initials" | "date" | "name";
|
|
949
|
+
page: number;
|
|
950
|
+
x: number;
|
|
951
|
+
y: number;
|
|
952
|
+
width: number;
|
|
953
|
+
height: number;
|
|
954
|
+
signer: string;
|
|
955
|
+
required: boolean;
|
|
956
|
+
}[];
|
|
957
|
+
message: string;
|
|
958
|
+
owner: boolean;
|
|
959
|
+
can_sign: boolean;
|
|
960
|
+
can_preview: boolean;
|
|
961
|
+
recipients: {
|
|
962
|
+
email: string;
|
|
963
|
+
permission: string;
|
|
964
|
+
status: string;
|
|
965
|
+
expires_at: string | null;
|
|
966
|
+
delivery_status: string;
|
|
967
|
+
reference?: string | null | undefined;
|
|
968
|
+
}[];
|
|
969
|
+
published_version?: number | null | undefined;
|
|
970
|
+
owner_workspace_ext_id?: string | null | undefined;
|
|
971
|
+
}>;
|
|
972
|
+
declare function getFileShare(client: DocumentToolsClient, id: string): Promise<FileShare>;
|
|
973
|
+
declare function fileShareBytes(client: DocumentToolsClient, id: string, kind: 'view' | 'original' | 'signed'): Promise<Blob>;
|
|
974
|
+
/** Adapt only the guided viewer's presentation data; sharing uses its own authorization endpoints. */
|
|
975
|
+
declare function fileShareSigningRequest(share: FileShare): SignatureRequest;
|
|
976
|
+
declare function signFileShare(client: DocumentToolsClient, domain: string, vars: SignRequestVars): Promise<SignRequestSignResponse>;
|
|
977
|
+
declare function useFileShare(client: DocumentToolsClient, shareId: string, signing: boolean): _tanstack_react_query.UseQueryResult<NoInfer<{
|
|
978
|
+
external_id: string;
|
|
979
|
+
document_ext_id: string;
|
|
980
|
+
version: number;
|
|
981
|
+
file_name: string;
|
|
982
|
+
status: string;
|
|
983
|
+
source_sha256: string;
|
|
984
|
+
fields: components["schemas"]["SignatureField"][];
|
|
985
|
+
message: string;
|
|
986
|
+
owner: boolean;
|
|
987
|
+
can_sign: boolean;
|
|
988
|
+
can_preview: boolean;
|
|
989
|
+
recipients: components["schemas"]["FileShareRecipientResponse"][];
|
|
990
|
+
published_version?: number | null;
|
|
991
|
+
owner_workspace_ext_id?: string | null;
|
|
992
|
+
}>, Error>;
|
|
993
|
+
declare function useFileSharePdf(client: DocumentToolsClient, shareId: string, share?: FileShare): _tanstack_react_query.UseQueryResult<NoInfer<Blob>, Error>;
|
|
994
|
+
declare function useFileShares(client: DocumentToolsClient): _tanstack_react_query.UseQueryResult<NoInfer<{
|
|
995
|
+
external_id: string;
|
|
996
|
+
document_ext_id: string;
|
|
997
|
+
version: number;
|
|
998
|
+
file_name: string;
|
|
999
|
+
status: string;
|
|
1000
|
+
source_sha256: string;
|
|
1001
|
+
fields: {
|
|
1002
|
+
id: string;
|
|
1003
|
+
type: "signature" | "initials" | "date" | "name";
|
|
1004
|
+
page: number;
|
|
1005
|
+
x: number;
|
|
1006
|
+
y: number;
|
|
1007
|
+
width: number;
|
|
1008
|
+
height: number;
|
|
1009
|
+
signer: string;
|
|
1010
|
+
required: boolean;
|
|
1011
|
+
}[];
|
|
1012
|
+
message: string;
|
|
1013
|
+
owner: boolean;
|
|
1014
|
+
can_sign: boolean;
|
|
1015
|
+
can_preview: boolean;
|
|
1016
|
+
recipients: {
|
|
1017
|
+
email: string;
|
|
1018
|
+
permission: string;
|
|
1019
|
+
status: string;
|
|
1020
|
+
expires_at: string | null;
|
|
1021
|
+
delivery_status: string;
|
|
1022
|
+
reference?: string | null | undefined;
|
|
1023
|
+
}[];
|
|
1024
|
+
published_version?: number | null | undefined;
|
|
1025
|
+
owner_workspace_ext_id?: string | null | undefined;
|
|
1026
|
+
}[]>, Error>;
|
|
1027
|
+
|
|
1028
|
+
export { type AdoptedSignature, type AnnotatableState, type BuildProductionOptions, type BuiltProduction, type CopyMatch, type CreateFileShare, DEFAULT_FIELD_SIZE, DocumentBytesKind, type DocumentChange, DocumentFetchError, type DocumentFetchOptions, type DocumentToolsClient, type DocumentToolsEnvironment, type DocumentToolsNoticeKind, type DocumentToolsNoticeOptions, type DocumentToolsNotify, DocumentToolsProvider, type DocumentToolsProviderProps, type DocumentToolsUser, type DocumentUploadQuery, type DocumentUploadRequest, FIELD_TYPE_LABELS, type FileShare, type FrozenCopySource, INFORMAL_SIGNATURE_NOTE, type KeypairSource, LEGACY_LAYER_PREFIX, type LegacyPrompt, MARK_FIELD_TYPES, MAX_MERGE_ATTEMPTS, type MarkupDocument, MarkupDownloadError, type MarkupSnapshot, type MarkupStore, MarkupStoreError, type MarkupStoreOptions, type NamedSigner, type OlderMarkupNote, PRODUCTIONS_FOLDER, type ProductionSource, type ProductionUpload, type ResolvedDocumentToolsEnvironment, SIGNATURE_FIELD_TYPES, SIGNED_LOCKED_REASON, SIGNED_UNCHANGED, SIGNER_PROGRESS_LABELS, type SaveSignatureRequestVars, type SavedSignature, type SignDocumentResponse, type SignDocumentVars, type SignRequestSignResponse, type SignRequestVars, type SignatureAppearance, type SignatureField, type SignatureFieldSuggestions, type SignatureFieldType, type SignatureRecord, type SignatureRequest, type SignatureRequestSigner, type SignatureStatusResponse, type SignatureVerification, SignatureVerificationError, type SignerCandidate, type SignerDetails, type SignerProgress, SigningError, type SigningErrorReason, type SuggestedSignatureField, type UseDocumentBytesOptions, VERIFY_PATH, type VerifiedSignature, type VersionInfo, addToMarkup, buildProduction, canAnnotate, certificateLink, clientUpload, contentDispositionFileName, copyOpenThreads, createFileShare, createMarkupStore, currentHasMarkup, defaultCertificateUrl, deleteSavedSignature, downloadBlob, fetchDocumentFile, fetchDocumentPdf, fetchDocumentSignatureRequests, fetchDocumentSignatures, fetchMarkupPdf, fetchProductionPdf, fetchSavedSignature, fetchSignatureVerification, fieldsFromSuggestions, fieldsInSigningOrder, fileShareBytes, fileShareSigningRequest, forgetLegacyLayer, frozenCopyName, getFileShare, hasNoRendition, initialsOf, intentText, inviteSigners, isEmailSigner, isLegibleSignatureBox, isPdfDocument, isSignatureReference, isSignedVersion, marksByVersion, matchSignedCopy, migrateLegacyLayer, newFieldId, openThreadsOf, pngBytes, pngSize, productionDocumentName, productionFileName, productionFolder, productionIndexCsv, productionTitle, readLegacyLayer, redactionLogName, saveProductionFiles, saveSignatureRequest, sendBlocker, sha256Hex, signDocument, signFileShare, signSignatureRequest, signatureFieldSuggestions, splitSuggestions, storeSavedSignature, suggestSignatureFields, toAppearance, uploadFrozenCopy, uploadQueryString, useDeclineSignatureRequest, useDeleteSavedSignature, useDocumentBytes, useDocumentMarkup, useDocumentSignatureRequests, useDocumentSignatures, useDocumentTools, useFileShare, useFileSharePdf, useFileShares, useInviteSigners, useIsOnline, useOptionalDocumentTools, useSaveSignatureRequest, useSavedSignature, useSignDocument, useSignSignatureRequest, useSignatureRequest, useSignatureRequestsAwaitingMe, useSignatureVerification, useSignerCandidates, useStoreSavedSignature, useVoidSignatureRequest, versionsWithMarkup };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import { ArbiClient, operations, components, KeyPair } from '@arbidocs/client';
|
|
4
|
-
import { P as ProductionChoices, A as AnnotationStore } from '../ProductionDialog.d-
|
|
4
|
+
import { P as ProductionChoices, A as AnnotationStore } from '../ProductionDialog.d-BDJwBSzj.js';
|
|
5
5
|
import { a as BundleFile, b as BundleIndexEntry } from '../bundle.d-BnCSbHy2.js';
|
|
6
|
-
import { A as Annotation, b as AnnotationLayer } from '../model.d-
|
|
6
|
+
import { A as Annotation, b as AnnotationLayer } from '../model.d-CNtRWKVK.js';
|
|
7
7
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
8
|
-
import { D as DocumentBytesKind } from '../query-keys.d-
|
|
9
|
-
export { f as documentBytesKey } from '../query-keys.d-
|
|
8
|
+
import { D as DocumentBytesKind } from '../query-keys.d-DM2N5pzN.js';
|
|
9
|
+
export { f as documentBytesKey } from '../query-keys.d-DM2N5pzN.js';
|
|
10
10
|
import '@arbidocs/sdk/browser';
|
|
11
11
|
|
|
12
12
|
type DocumentToolsClient = ArbiClient['fetch'];
|
|
@@ -90,6 +90,8 @@ interface DocumentToolsEnvironment {
|
|
|
90
90
|
}
|
|
91
91
|
/** The environment with every default filled in. */
|
|
92
92
|
interface ResolvedDocumentToolsEnvironment extends DocumentToolsEnvironment {
|
|
93
|
+
prepareFileShare: (documentId: string) => Promise<void>;
|
|
94
|
+
registerBeforeFileShare: (documentId: string, flush: () => Promise<void>) => () => void;
|
|
93
95
|
notify: DocumentToolsNotify;
|
|
94
96
|
saveFile: (blob: Blob, fileName: string) => void;
|
|
95
97
|
uploadDocument: (request: DocumentUploadRequest) => Promise<{
|
|
@@ -912,7 +914,7 @@ interface SavedSignature {
|
|
|
912
914
|
initials_png: string;
|
|
913
915
|
}
|
|
914
916
|
/** The one line shown wherever a saved signature is placed by hand. */
|
|
915
|
-
declare const INFORMAL_SIGNATURE_NOTE = "
|
|
917
|
+
declare const INFORMAL_SIGNATURE_NOTE = "Your saved signature or initials are placed as an image on the document.";
|
|
916
918
|
/** The user's own keypair (the session's); a host or a test may pass another. */
|
|
917
919
|
type KeypairSource = () => Promise<KeyPair | null>;
|
|
918
920
|
/** The saved signature, opened with the user's own key; null when none is saved. */
|
|
@@ -932,4 +934,95 @@ declare function pngSize(base64: string): {
|
|
|
932
934
|
height: number;
|
|
933
935
|
};
|
|
934
936
|
|
|
935
|
-
|
|
937
|
+
type FileShare = components['schemas']['FileShareResponse'];
|
|
938
|
+
type CreateFileShare = components['schemas']['CreateFileShare'];
|
|
939
|
+
declare function createFileShare(client: DocumentToolsClient, documentId: string, body: CreateFileShare): Promise<{
|
|
940
|
+
external_id: string;
|
|
941
|
+
document_ext_id: string;
|
|
942
|
+
version: number;
|
|
943
|
+
file_name: string;
|
|
944
|
+
status: string;
|
|
945
|
+
source_sha256: string;
|
|
946
|
+
fields: {
|
|
947
|
+
id: string;
|
|
948
|
+
type: "signature" | "initials" | "date" | "name";
|
|
949
|
+
page: number;
|
|
950
|
+
x: number;
|
|
951
|
+
y: number;
|
|
952
|
+
width: number;
|
|
953
|
+
height: number;
|
|
954
|
+
signer: string;
|
|
955
|
+
required: boolean;
|
|
956
|
+
}[];
|
|
957
|
+
message: string;
|
|
958
|
+
owner: boolean;
|
|
959
|
+
can_sign: boolean;
|
|
960
|
+
can_preview: boolean;
|
|
961
|
+
recipients: {
|
|
962
|
+
email: string;
|
|
963
|
+
permission: string;
|
|
964
|
+
status: string;
|
|
965
|
+
expires_at: string | null;
|
|
966
|
+
delivery_status: string;
|
|
967
|
+
reference?: string | null | undefined;
|
|
968
|
+
}[];
|
|
969
|
+
published_version?: number | null | undefined;
|
|
970
|
+
owner_workspace_ext_id?: string | null | undefined;
|
|
971
|
+
}>;
|
|
972
|
+
declare function getFileShare(client: DocumentToolsClient, id: string): Promise<FileShare>;
|
|
973
|
+
declare function fileShareBytes(client: DocumentToolsClient, id: string, kind: 'view' | 'original' | 'signed'): Promise<Blob>;
|
|
974
|
+
/** Adapt only the guided viewer's presentation data; sharing uses its own authorization endpoints. */
|
|
975
|
+
declare function fileShareSigningRequest(share: FileShare): SignatureRequest;
|
|
976
|
+
declare function signFileShare(client: DocumentToolsClient, domain: string, vars: SignRequestVars): Promise<SignRequestSignResponse>;
|
|
977
|
+
declare function useFileShare(client: DocumentToolsClient, shareId: string, signing: boolean): _tanstack_react_query.UseQueryResult<NoInfer<{
|
|
978
|
+
external_id: string;
|
|
979
|
+
document_ext_id: string;
|
|
980
|
+
version: number;
|
|
981
|
+
file_name: string;
|
|
982
|
+
status: string;
|
|
983
|
+
source_sha256: string;
|
|
984
|
+
fields: components["schemas"]["SignatureField"][];
|
|
985
|
+
message: string;
|
|
986
|
+
owner: boolean;
|
|
987
|
+
can_sign: boolean;
|
|
988
|
+
can_preview: boolean;
|
|
989
|
+
recipients: components["schemas"]["FileShareRecipientResponse"][];
|
|
990
|
+
published_version?: number | null;
|
|
991
|
+
owner_workspace_ext_id?: string | null;
|
|
992
|
+
}>, Error>;
|
|
993
|
+
declare function useFileSharePdf(client: DocumentToolsClient, shareId: string, share?: FileShare): _tanstack_react_query.UseQueryResult<NoInfer<Blob>, Error>;
|
|
994
|
+
declare function useFileShares(client: DocumentToolsClient): _tanstack_react_query.UseQueryResult<NoInfer<{
|
|
995
|
+
external_id: string;
|
|
996
|
+
document_ext_id: string;
|
|
997
|
+
version: number;
|
|
998
|
+
file_name: string;
|
|
999
|
+
status: string;
|
|
1000
|
+
source_sha256: string;
|
|
1001
|
+
fields: {
|
|
1002
|
+
id: string;
|
|
1003
|
+
type: "signature" | "initials" | "date" | "name";
|
|
1004
|
+
page: number;
|
|
1005
|
+
x: number;
|
|
1006
|
+
y: number;
|
|
1007
|
+
width: number;
|
|
1008
|
+
height: number;
|
|
1009
|
+
signer: string;
|
|
1010
|
+
required: boolean;
|
|
1011
|
+
}[];
|
|
1012
|
+
message: string;
|
|
1013
|
+
owner: boolean;
|
|
1014
|
+
can_sign: boolean;
|
|
1015
|
+
can_preview: boolean;
|
|
1016
|
+
recipients: {
|
|
1017
|
+
email: string;
|
|
1018
|
+
permission: string;
|
|
1019
|
+
status: string;
|
|
1020
|
+
expires_at: string | null;
|
|
1021
|
+
delivery_status: string;
|
|
1022
|
+
reference?: string | null | undefined;
|
|
1023
|
+
}[];
|
|
1024
|
+
published_version?: number | null | undefined;
|
|
1025
|
+
owner_workspace_ext_id?: string | null | undefined;
|
|
1026
|
+
}[]>, Error>;
|
|
1027
|
+
|
|
1028
|
+
export { type AdoptedSignature, type AnnotatableState, type BuildProductionOptions, type BuiltProduction, type CopyMatch, type CreateFileShare, DEFAULT_FIELD_SIZE, DocumentBytesKind, type DocumentChange, DocumentFetchError, type DocumentFetchOptions, type DocumentToolsClient, type DocumentToolsEnvironment, type DocumentToolsNoticeKind, type DocumentToolsNoticeOptions, type DocumentToolsNotify, DocumentToolsProvider, type DocumentToolsProviderProps, type DocumentToolsUser, type DocumentUploadQuery, type DocumentUploadRequest, FIELD_TYPE_LABELS, type FileShare, type FrozenCopySource, INFORMAL_SIGNATURE_NOTE, type KeypairSource, LEGACY_LAYER_PREFIX, type LegacyPrompt, MARK_FIELD_TYPES, MAX_MERGE_ATTEMPTS, type MarkupDocument, MarkupDownloadError, type MarkupSnapshot, type MarkupStore, MarkupStoreError, type MarkupStoreOptions, type NamedSigner, type OlderMarkupNote, PRODUCTIONS_FOLDER, type ProductionSource, type ProductionUpload, type ResolvedDocumentToolsEnvironment, SIGNATURE_FIELD_TYPES, SIGNED_LOCKED_REASON, SIGNED_UNCHANGED, SIGNER_PROGRESS_LABELS, type SaveSignatureRequestVars, type SavedSignature, type SignDocumentResponse, type SignDocumentVars, type SignRequestSignResponse, type SignRequestVars, type SignatureAppearance, type SignatureField, type SignatureFieldSuggestions, type SignatureFieldType, type SignatureRecord, type SignatureRequest, type SignatureRequestSigner, type SignatureStatusResponse, type SignatureVerification, SignatureVerificationError, type SignerCandidate, type SignerDetails, type SignerProgress, SigningError, type SigningErrorReason, type SuggestedSignatureField, type UseDocumentBytesOptions, VERIFY_PATH, type VerifiedSignature, type VersionInfo, addToMarkup, buildProduction, canAnnotate, certificateLink, clientUpload, contentDispositionFileName, copyOpenThreads, createFileShare, createMarkupStore, currentHasMarkup, defaultCertificateUrl, deleteSavedSignature, downloadBlob, fetchDocumentFile, fetchDocumentPdf, fetchDocumentSignatureRequests, fetchDocumentSignatures, fetchMarkupPdf, fetchProductionPdf, fetchSavedSignature, fetchSignatureVerification, fieldsFromSuggestions, fieldsInSigningOrder, fileShareBytes, fileShareSigningRequest, forgetLegacyLayer, frozenCopyName, getFileShare, hasNoRendition, initialsOf, intentText, inviteSigners, isEmailSigner, isLegibleSignatureBox, isPdfDocument, isSignatureReference, isSignedVersion, marksByVersion, matchSignedCopy, migrateLegacyLayer, newFieldId, openThreadsOf, pngBytes, pngSize, productionDocumentName, productionFileName, productionFolder, productionIndexCsv, productionTitle, readLegacyLayer, redactionLogName, saveProductionFiles, saveSignatureRequest, sendBlocker, sha256Hex, signDocument, signFileShare, signSignatureRequest, signatureFieldSuggestions, splitSuggestions, storeSavedSignature, suggestSignatureFields, toAppearance, uploadFrozenCopy, uploadQueryString, useDeclineSignatureRequest, useDeleteSavedSignature, useDocumentBytes, useDocumentMarkup, useDocumentSignatureRequests, useDocumentSignatures, useDocumentTools, useFileShare, useFileSharePdf, useFileShares, useInviteSigners, useIsOnline, useOptionalDocumentTools, useSaveSignatureRequest, useSavedSignature, useSignDocument, useSignSignatureRequest, useSignatureRequest, useSignatureRequestsAwaitingMe, useSignatureVerification, useSignerCandidates, useStoreSavedSignature, useVoidSignatureRequest, versionsWithMarkup };
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { fetchDocumentFile, fetchDocumentPdf, DocumentFetchError, useDocumentTools, SIGNED_LOCKED_REASON, fetchMarkupPdf } from '../chunk-
|
|
2
|
-
export { DocumentFetchError, DocumentToolsProvider, MarkupDownloadError, SIGNED_LOCKED_REASON, certificateLink, clientUpload, contentDispositionFileName, currentHasMarkup, defaultCertificateUrl, downloadBlob, fetchDocumentFile, fetchDocumentPdf, fetchMarkupPdf, isSignedVersion, uploadQueryString, useDocumentTools, useOptionalDocumentTools } from '../chunk-
|
|
3
|
-
import { mergeLayers, AnnotationStoreOfflineError } from '../chunk-
|
|
4
|
-
import { parseLayer, emptyLayer, LAYER_SCHEMA_VERSION } from '../chunk-
|
|
5
|
-
import { documentBytesKey, arbiQueryKeys } from '../chunk-
|
|
6
|
-
export { documentBytesKey } from '../chunk-
|
|
1
|
+
import { fetchDocumentFile, fetchDocumentPdf, DocumentFetchError, useDocumentTools, SIGNED_LOCKED_REASON, fetchMarkupPdf } from '../chunk-2HVCNYFH.js';
|
|
2
|
+
export { DocumentFetchError, DocumentToolsProvider, MarkupDownloadError, SIGNED_LOCKED_REASON, certificateLink, clientUpload, contentDispositionFileName, currentHasMarkup, defaultCertificateUrl, downloadBlob, fetchDocumentFile, fetchDocumentPdf, fetchMarkupPdf, isSignedVersion, uploadQueryString, useDocumentTools, useOptionalDocumentTools } from '../chunk-2HVCNYFH.js';
|
|
3
|
+
import { mergeLayers, AnnotationStoreOfflineError } from '../chunk-T4CLW3DN.js';
|
|
4
|
+
import { parseLayer, emptyLayer, LAYER_SCHEMA_VERSION } from '../chunk-T3USOSVN.js';
|
|
5
|
+
import { documentBytesKey, arbiQueryKeys } from '../chunk-PBXJFMES.js';
|
|
6
|
+
export { documentBytesKey } from '../chunk-PBXJFMES.js';
|
|
7
7
|
import { parseVersionRef } from '../chunk-NNWMHMEC.js';
|
|
8
8
|
import '../chunk-WUTL62MC.js';
|
|
9
|
+
import '../chunk-KGCGA452.js';
|
|
9
10
|
import '../chunk-YNNAJJ5Z.js';
|
|
10
11
|
import '../chunk-47CCGUWR.js';
|
|
11
12
|
import '../chunk-QRCMKEE6.js';
|
|
12
13
|
import '../chunk-SN5YV6FF.js';
|
|
13
|
-
import '../chunk-KGCGA452.js';
|
|
14
14
|
import '../chunk-CPZ36AQS.js';
|
|
15
15
|
import { useMemo, useState, useCallback, useEffect, useSyncExternalStore } from 'react';
|
|
16
16
|
import { onlineManager, useQuery, useQueryClient, useMutation } from '@tanstack/react-query';
|
|
@@ -107,7 +107,7 @@ async function buildProduction(client, documents, choices, options) {
|
|
|
107
107
|
if (items.length === 0) {
|
|
108
108
|
throw new Error("None of these documents has a PDF version to number yet.");
|
|
109
109
|
}
|
|
110
|
-
const { buildBundle } = await import('../bundle-
|
|
110
|
+
const { buildBundle } = await import('../bundle-JCKKGEJE.js');
|
|
111
111
|
const result = await buildBundle(items, {
|
|
112
112
|
layout: choices.layout,
|
|
113
113
|
bates: {
|
|
@@ -1001,7 +1001,7 @@ function useInviteSigners() {
|
|
|
1001
1001
|
}
|
|
1002
1002
|
});
|
|
1003
1003
|
}
|
|
1004
|
-
var INFORMAL_SIGNATURE_NOTE = "
|
|
1004
|
+
var INFORMAL_SIGNATURE_NOTE = "Your saved signature or initials are placed as an image on the document.";
|
|
1005
1005
|
async function keypair(source = getUserEncryptionKeypair) {
|
|
1006
1006
|
await initSodium();
|
|
1007
1007
|
const pair = await source();
|
|
@@ -1070,7 +1070,104 @@ function pngSize(base64) {
|
|
|
1070
1070
|
const view = new DataView(bytes.buffer);
|
|
1071
1071
|
return { width: view.getUint32(16), height: view.getUint32(20) };
|
|
1072
1072
|
}
|
|
1073
|
+
function failure(error) {
|
|
1074
|
+
const detail3 = error?.detail;
|
|
1075
|
+
return new Error(typeof detail3 === "string" ? detail3 : "The shared file request failed");
|
|
1076
|
+
}
|
|
1077
|
+
async function createFileShare(client, documentId, body) {
|
|
1078
|
+
const result = await client.POST("/v1/document/{document_ext_id}/file-shares", {
|
|
1079
|
+
params: { path: { document_ext_id: documentId } },
|
|
1080
|
+
body
|
|
1081
|
+
});
|
|
1082
|
+
if (!result.data) throw failure(result.error);
|
|
1083
|
+
return result.data;
|
|
1084
|
+
}
|
|
1085
|
+
async function getFileShare(client, id) {
|
|
1086
|
+
const result = await client.GET("/v1/file-shares/{share_id}", {
|
|
1087
|
+
params: { path: { share_id: id } }
|
|
1088
|
+
});
|
|
1089
|
+
if (!result.data) throw failure(result.error);
|
|
1090
|
+
return result.data;
|
|
1091
|
+
}
|
|
1092
|
+
async function fileShareBytes(client, id, kind) {
|
|
1093
|
+
const result = await client.GET("/v1/file-shares/{share_id}/file", {
|
|
1094
|
+
params: { path: { share_id: id }, query: { kind } },
|
|
1095
|
+
parseAs: "blob"
|
|
1096
|
+
});
|
|
1097
|
+
if (!result.data) throw failure(result.error);
|
|
1098
|
+
return result.data;
|
|
1099
|
+
}
|
|
1100
|
+
function fileShareSigningRequest(share) {
|
|
1101
|
+
return {
|
|
1102
|
+
external_id: share.external_id,
|
|
1103
|
+
doc_ext_id: share.document_ext_id,
|
|
1104
|
+
version: share.version,
|
|
1105
|
+
source_sha256: share.source_sha256,
|
|
1106
|
+
fields: share.fields,
|
|
1107
|
+
message: share.message,
|
|
1108
|
+
status: share.status === "signing" ? "sent" : share.status === "completed" ? "completed" : "voided",
|
|
1109
|
+
signers: share.recipients.filter((r) => r.permission === "sign").map((r) => ({
|
|
1110
|
+
external_id: r.email,
|
|
1111
|
+
email: r.email,
|
|
1112
|
+
name: r.email,
|
|
1113
|
+
status: r.status === "signed" ? "signed" : "pending",
|
|
1114
|
+
progress: r.status === "signed" ? "signed" : "registered",
|
|
1115
|
+
fields: share.fields.filter((f) => f.signer === r.email).length
|
|
1116
|
+
})),
|
|
1117
|
+
created_at: (/* @__PURE__ */ new Date(0)).toISOString(),
|
|
1118
|
+
stale: false
|
|
1119
|
+
};
|
|
1120
|
+
}
|
|
1121
|
+
async function signFileShare(client, domain, vars) {
|
|
1122
|
+
const path = { share_id: vars.request.external_id };
|
|
1123
|
+
const body = { adopted: vars.adopted, fields: vars.fields };
|
|
1124
|
+
const prepared = await client.POST("/v1/file-shares/{share_id}/sign/prepare", {
|
|
1125
|
+
params: { path },
|
|
1126
|
+
body
|
|
1127
|
+
});
|
|
1128
|
+
if (!prepared.data) throw failure(prepared.error);
|
|
1129
|
+
const { statement, timestamp, source_sha256, intent } = prepared.data;
|
|
1130
|
+
if (source_sha256 !== vars.request.source_sha256 || await sha256Hex(vars.pdfBlob) !== source_sha256)
|
|
1131
|
+
throw new Error("The shared file changed. Ask the sender for a new request.");
|
|
1132
|
+
if (intent !== intentText({ name: vars.adopted.name }))
|
|
1133
|
+
throw new Error("Signing statement mismatch");
|
|
1134
|
+
const identity = await unlockIdentityWithPassword(vars.email, vars.password, domain);
|
|
1135
|
+
const result = await client.POST("/v1/file-shares/{share_id}/sign", {
|
|
1136
|
+
params: { path },
|
|
1137
|
+
body: { ...body, timestamp, signature: signMessage(statement, identity) }
|
|
1138
|
+
});
|
|
1139
|
+
if (!result.data) throw failure(result.error);
|
|
1140
|
+
return {
|
|
1141
|
+
request: fileShareSigningRequest(result.data),
|
|
1142
|
+
completed: result.data.status === "completed"
|
|
1143
|
+
};
|
|
1144
|
+
}
|
|
1145
|
+
function useFileShare(client, shareId, signing) {
|
|
1146
|
+
return useQuery({
|
|
1147
|
+
queryKey: arbiQueryKeys.fileShare(shareId),
|
|
1148
|
+
queryFn: () => getFileShare(client, shareId),
|
|
1149
|
+
refetchInterval: signing ? false : 5e3
|
|
1150
|
+
});
|
|
1151
|
+
}
|
|
1152
|
+
function useFileSharePdf(client, shareId, share) {
|
|
1153
|
+
return useQuery({
|
|
1154
|
+
queryKey: arbiQueryKeys.fileSharePdf(shareId, share?.status),
|
|
1155
|
+
queryFn: () => fileShareBytes(client, shareId, share?.status === "completed" ? "signed" : "view"),
|
|
1156
|
+
enabled: !!share?.can_preview,
|
|
1157
|
+
staleTime: Infinity
|
|
1158
|
+
});
|
|
1159
|
+
}
|
|
1160
|
+
function useFileShares(client) {
|
|
1161
|
+
return useQuery({
|
|
1162
|
+
queryKey: arbiQueryKeys.fileShares(),
|
|
1163
|
+
queryFn: async () => {
|
|
1164
|
+
const result = await client.GET("/v1/file-shares");
|
|
1165
|
+
if (!result.data) throw new Error("Could not load shared files");
|
|
1166
|
+
return result.data;
|
|
1167
|
+
}
|
|
1168
|
+
});
|
|
1169
|
+
}
|
|
1073
1170
|
|
|
1074
|
-
export { DEFAULT_FIELD_SIZE, FIELD_TYPE_LABELS, INFORMAL_SIGNATURE_NOTE, LEGACY_LAYER_PREFIX, MARK_FIELD_TYPES, MAX_MERGE_ATTEMPTS, MarkupStoreError, PRODUCTIONS_FOLDER, SIGNATURE_FIELD_TYPES, SIGNED_UNCHANGED, SIGNER_PROGRESS_LABELS, SignatureVerificationError, SigningError, VERIFY_PATH, addToMarkup, buildProduction, canAnnotate, copyOpenThreads, createMarkupStore, deleteSavedSignature, fetchDocumentSignatureRequests, fetchDocumentSignatures, fetchProductionPdf, fetchSavedSignature, fetchSignatureVerification, fieldsFromSuggestions, fieldsInSigningOrder, forgetLegacyLayer, frozenCopyName, hasNoRendition, initialsOf, intentText, inviteSigners, isEmailSigner, isLegibleSignatureBox, isPdfDocument, isSignatureReference, marksByVersion, matchSignedCopy, migrateLegacyLayer, newFieldId, openThreadsOf, pngBytes, pngSize, productionDocumentName, productionFileName, productionFolder, productionIndexCsv, productionTitle, readLegacyLayer, redactionLogName, saveProductionFiles, saveSignatureRequest, sendBlocker, sha256Hex, signDocument, signSignatureRequest, signatureFieldSuggestions, splitSuggestions, storeSavedSignature, suggestSignatureFields, toAppearance, uploadFrozenCopy, useDeclineSignatureRequest, useDeleteSavedSignature, useDocumentBytes, useDocumentMarkup, useDocumentSignatureRequests, useDocumentSignatures, useInviteSigners, useIsOnline, useSaveSignatureRequest, useSavedSignature, useSignDocument, useSignSignatureRequest, useSignatureRequest, useSignatureRequestsAwaitingMe, useSignatureVerification, useSignerCandidates, useStoreSavedSignature, useVoidSignatureRequest, versionsWithMarkup };
|
|
1171
|
+
export { DEFAULT_FIELD_SIZE, FIELD_TYPE_LABELS, INFORMAL_SIGNATURE_NOTE, LEGACY_LAYER_PREFIX, MARK_FIELD_TYPES, MAX_MERGE_ATTEMPTS, MarkupStoreError, PRODUCTIONS_FOLDER, SIGNATURE_FIELD_TYPES, SIGNED_UNCHANGED, SIGNER_PROGRESS_LABELS, SignatureVerificationError, SigningError, VERIFY_PATH, addToMarkup, buildProduction, canAnnotate, copyOpenThreads, createFileShare, createMarkupStore, deleteSavedSignature, fetchDocumentSignatureRequests, fetchDocumentSignatures, fetchProductionPdf, fetchSavedSignature, fetchSignatureVerification, fieldsFromSuggestions, fieldsInSigningOrder, fileShareBytes, fileShareSigningRequest, forgetLegacyLayer, frozenCopyName, getFileShare, hasNoRendition, initialsOf, intentText, inviteSigners, isEmailSigner, isLegibleSignatureBox, isPdfDocument, isSignatureReference, marksByVersion, matchSignedCopy, migrateLegacyLayer, newFieldId, openThreadsOf, pngBytes, pngSize, productionDocumentName, productionFileName, productionFolder, productionIndexCsv, productionTitle, readLegacyLayer, redactionLogName, saveProductionFiles, saveSignatureRequest, sendBlocker, sha256Hex, signDocument, signFileShare, signSignatureRequest, signatureFieldSuggestions, splitSuggestions, storeSavedSignature, suggestSignatureFields, toAppearance, uploadFrozenCopy, useDeclineSignatureRequest, useDeleteSavedSignature, useDocumentBytes, useDocumentMarkup, useDocumentSignatureRequests, useDocumentSignatures, useFileShare, useFileSharePdf, useFileShares, useInviteSigners, useIsOnline, useSaveSignatureRequest, useSavedSignature, useSignDocument, useSignSignatureRequest, useSignatureRequest, useSignatureRequestsAwaitingMe, useSignatureVerification, useSignerCandidates, useStoreSavedSignature, useVoidSignatureRequest, versionsWithMarkup };
|
|
1075
1172
|
//# sourceMappingURL=index.js.map
|
|
1076
1173
|
//# sourceMappingURL=index.js.map
|