@arbidocs/react 0.4.166 → 0.4.167
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/document-tools/index.cjs +6 -2
- package/dist/document-tools/index.cjs.map +1 -1
- package/dist/document-tools/index.d.cts +16 -1
- package/dist/document-tools/index.d.ts +16 -1
- package/dist/document-tools/index.js +6 -3
- package/dist/document-tools/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -737,6 +737,21 @@ declare function useSignatureRequest(requestId: string | null | undefined): _tan
|
|
|
737
737
|
signed_version?: number | null | undefined;
|
|
738
738
|
stale: boolean;
|
|
739
739
|
}>, Error>;
|
|
740
|
+
/** A signer the Word document's placed fields name, with the name they give. */
|
|
741
|
+
interface NamedSigner {
|
|
742
|
+
email: string;
|
|
743
|
+
name: string;
|
|
744
|
+
}
|
|
745
|
+
/** What a document asks to be signed: the fields found, and the signers its Word fields name. */
|
|
746
|
+
interface SignatureFieldSuggestions {
|
|
747
|
+
fields: SuggestedSignatureField[];
|
|
748
|
+
/**
|
|
749
|
+
* Named even when the PDF shows none of the Word fields' anchors (the fields are then placed by
|
|
750
|
+
* hand): who each email belongs to. Empty from a server that does not report them.
|
|
751
|
+
*/
|
|
752
|
+
signers: NamedSigner[];
|
|
753
|
+
}
|
|
754
|
+
declare function signatureFieldSuggestions(client: DocumentToolsClient, documentId: string, version?: number): Promise<SignatureFieldSuggestions>;
|
|
740
755
|
declare function suggestSignatureFields(client: DocumentToolsClient, documentId: string, version?: number): Promise<SuggestedSignatureField[]>;
|
|
741
756
|
interface SaveSignatureRequestVars {
|
|
742
757
|
documentId: string;
|
|
@@ -918,4 +933,4 @@ declare function pngSize(base64: string): {
|
|
|
918
933
|
height: number;
|
|
919
934
|
};
|
|
920
935
|
|
|
921
|
-
export { type AdoptedSignature, type AnnotatableState, type BuildProductionOptions, type BuiltProduction, type CopyMatch, DEFAULT_FIELD_SIZE, type 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 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 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 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, createMarkupStore, currentHasMarkup, defaultCertificateUrl, deleteSavedSignature, documentBytesKey, downloadBlob, fetchDocumentFile, fetchDocumentPdf, fetchDocumentSignatureRequests, fetchDocumentSignatures, fetchMarkupPdf, fetchProductionPdf, fetchSavedSignature, fetchSignatureVerification, fieldsFromSuggestions, fieldsInSigningOrder, forgetLegacyLayer, frozenCopyName, 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, signSignatureRequest, splitSuggestions, storeSavedSignature, suggestSignatureFields, toAppearance, uploadFrozenCopy, uploadQueryString, useDeclineSignatureRequest, useDeleteSavedSignature, useDocumentBytes, useDocumentMarkup, useDocumentSignatureRequests, useDocumentSignatures, useDocumentTools, useInviteSigners, useIsOnline, useOptionalDocumentTools, useSaveSignatureRequest, useSavedSignature, useSignDocument, useSignSignatureRequest, useSignatureRequest, useSignatureRequestsAwaitingMe, useSignatureVerification, useSignerCandidates, useStoreSavedSignature, useVoidSignatureRequest, versionsWithMarkup };
|
|
936
|
+
export { type AdoptedSignature, type AnnotatableState, type BuildProductionOptions, type BuiltProduction, type CopyMatch, DEFAULT_FIELD_SIZE, type 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 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, createMarkupStore, currentHasMarkup, defaultCertificateUrl, deleteSavedSignature, documentBytesKey, downloadBlob, fetchDocumentFile, fetchDocumentPdf, fetchDocumentSignatureRequests, fetchDocumentSignatures, fetchMarkupPdf, fetchProductionPdf, fetchSavedSignature, fetchSignatureVerification, fieldsFromSuggestions, fieldsInSigningOrder, forgetLegacyLayer, frozenCopyName, 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, signSignatureRequest, signatureFieldSuggestions, splitSuggestions, storeSavedSignature, suggestSignatureFields, toAppearance, uploadFrozenCopy, uploadQueryString, useDeclineSignatureRequest, useDeleteSavedSignature, useDocumentBytes, useDocumentMarkup, useDocumentSignatureRequests, useDocumentSignatures, useDocumentTools, useInviteSigners, useIsOnline, useOptionalDocumentTools, useSaveSignatureRequest, useSavedSignature, useSignDocument, useSignSignatureRequest, useSignatureRequest, useSignatureRequestsAwaitingMe, useSignatureVerification, useSignerCandidates, useStoreSavedSignature, useVoidSignatureRequest, versionsWithMarkup };
|
|
@@ -737,6 +737,21 @@ declare function useSignatureRequest(requestId: string | null | undefined): _tan
|
|
|
737
737
|
signed_version?: number | null | undefined;
|
|
738
738
|
stale: boolean;
|
|
739
739
|
}>, Error>;
|
|
740
|
+
/** A signer the Word document's placed fields name, with the name they give. */
|
|
741
|
+
interface NamedSigner {
|
|
742
|
+
email: string;
|
|
743
|
+
name: string;
|
|
744
|
+
}
|
|
745
|
+
/** What a document asks to be signed: the fields found, and the signers its Word fields name. */
|
|
746
|
+
interface SignatureFieldSuggestions {
|
|
747
|
+
fields: SuggestedSignatureField[];
|
|
748
|
+
/**
|
|
749
|
+
* Named even when the PDF shows none of the Word fields' anchors (the fields are then placed by
|
|
750
|
+
* hand): who each email belongs to. Empty from a server that does not report them.
|
|
751
|
+
*/
|
|
752
|
+
signers: NamedSigner[];
|
|
753
|
+
}
|
|
754
|
+
declare function signatureFieldSuggestions(client: DocumentToolsClient, documentId: string, version?: number): Promise<SignatureFieldSuggestions>;
|
|
740
755
|
declare function suggestSignatureFields(client: DocumentToolsClient, documentId: string, version?: number): Promise<SuggestedSignatureField[]>;
|
|
741
756
|
interface SaveSignatureRequestVars {
|
|
742
757
|
documentId: string;
|
|
@@ -918,4 +933,4 @@ declare function pngSize(base64: string): {
|
|
|
918
933
|
height: number;
|
|
919
934
|
};
|
|
920
935
|
|
|
921
|
-
export { type AdoptedSignature, type AnnotatableState, type BuildProductionOptions, type BuiltProduction, type CopyMatch, DEFAULT_FIELD_SIZE, type 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 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 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 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, createMarkupStore, currentHasMarkup, defaultCertificateUrl, deleteSavedSignature, documentBytesKey, downloadBlob, fetchDocumentFile, fetchDocumentPdf, fetchDocumentSignatureRequests, fetchDocumentSignatures, fetchMarkupPdf, fetchProductionPdf, fetchSavedSignature, fetchSignatureVerification, fieldsFromSuggestions, fieldsInSigningOrder, forgetLegacyLayer, frozenCopyName, 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, signSignatureRequest, splitSuggestions, storeSavedSignature, suggestSignatureFields, toAppearance, uploadFrozenCopy, uploadQueryString, useDeclineSignatureRequest, useDeleteSavedSignature, useDocumentBytes, useDocumentMarkup, useDocumentSignatureRequests, useDocumentSignatures, useDocumentTools, useInviteSigners, useIsOnline, useOptionalDocumentTools, useSaveSignatureRequest, useSavedSignature, useSignDocument, useSignSignatureRequest, useSignatureRequest, useSignatureRequestsAwaitingMe, useSignatureVerification, useSignerCandidates, useStoreSavedSignature, useVoidSignatureRequest, versionsWithMarkup };
|
|
936
|
+
export { type AdoptedSignature, type AnnotatableState, type BuildProductionOptions, type BuiltProduction, type CopyMatch, DEFAULT_FIELD_SIZE, type 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 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, createMarkupStore, currentHasMarkup, defaultCertificateUrl, deleteSavedSignature, documentBytesKey, downloadBlob, fetchDocumentFile, fetchDocumentPdf, fetchDocumentSignatureRequests, fetchDocumentSignatures, fetchMarkupPdf, fetchProductionPdf, fetchSavedSignature, fetchSignatureVerification, fieldsFromSuggestions, fieldsInSigningOrder, forgetLegacyLayer, frozenCopyName, 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, signSignatureRequest, signatureFieldSuggestions, splitSuggestions, storeSavedSignature, suggestSignatureFields, toAppearance, uploadFrozenCopy, uploadQueryString, useDeclineSignatureRequest, useDeleteSavedSignature, useDocumentBytes, useDocumentMarkup, useDocumentSignatureRequests, useDocumentSignatures, useDocumentTools, useInviteSigners, useIsOnline, useOptionalDocumentTools, useSaveSignatureRequest, useSavedSignature, useSignDocument, useSignSignatureRequest, useSignatureRequest, useSignatureRequestsAwaitingMe, useSignatureVerification, useSignerCandidates, useStoreSavedSignature, useVoidSignatureRequest, versionsWithMarkup };
|
|
@@ -872,7 +872,7 @@ function useSignatureRequest(requestId) {
|
|
|
872
872
|
enabled: !!requestId
|
|
873
873
|
});
|
|
874
874
|
}
|
|
875
|
-
async function
|
|
875
|
+
async function signatureFieldSuggestions(client, documentId, version) {
|
|
876
876
|
const { data, error } = await client.GET(
|
|
877
877
|
"/v1/document/{document_ext_id}/signature-fields/suggest",
|
|
878
878
|
{
|
|
@@ -880,7 +880,10 @@ async function suggestSignatureFields(client, documentId, version) {
|
|
|
880
880
|
}
|
|
881
881
|
);
|
|
882
882
|
if (!data) throw new Error(detail(error, "Signature blocks could not be read"));
|
|
883
|
-
return data.fields;
|
|
883
|
+
return { fields: data.fields, signers: data.signers ?? [] };
|
|
884
|
+
}
|
|
885
|
+
async function suggestSignatureFields(client, documentId, version) {
|
|
886
|
+
return (await signatureFieldSuggestions(client, documentId, version)).fields;
|
|
884
887
|
}
|
|
885
888
|
async function saveSignatureRequest(client, { documentId, version, fields, message, requestId, send }) {
|
|
886
889
|
if (!requestId) {
|
|
@@ -1113,6 +1116,6 @@ function pngSize(base64) {
|
|
|
1113
1116
|
return { width: view.getUint32(16), height: view.getUint32(20) };
|
|
1114
1117
|
}
|
|
1115
1118
|
|
|
1116
|
-
export { DEFAULT_FIELD_SIZE, FIELD_TYPE_LABELS, INFORMAL_SIGNATURE_NOTE, LEGACY_LAYER_PREFIX, MARK_FIELD_TYPES, MAX_MERGE_ATTEMPTS, MarkupDownloadError, MarkupStoreError, PRODUCTIONS_FOLDER, SIGNATURE_FIELD_TYPES, SIGNED_LOCKED_REASON, SIGNED_UNCHANGED, SIGNER_PROGRESS_LABELS, SignatureVerificationError, SigningError, VERIFY_PATH, addToMarkup, buildProduction, canAnnotate, copyOpenThreads, createMarkupStore, currentHasMarkup, deleteSavedSignature, documentBytesKey, fetchDocumentSignatureRequests, fetchDocumentSignatures, fetchMarkupPdf, fetchProductionPdf, fetchSavedSignature, fetchSignatureVerification, fieldsFromSuggestions, fieldsInSigningOrder, forgetLegacyLayer, frozenCopyName, 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, signSignatureRequest, splitSuggestions, storeSavedSignature, suggestSignatureFields, toAppearance, uploadFrozenCopy, useDeclineSignatureRequest, useDeleteSavedSignature, useDocumentBytes, useDocumentMarkup, useDocumentSignatureRequests, useDocumentSignatures, useInviteSigners, useIsOnline, useSaveSignatureRequest, useSavedSignature, useSignDocument, useSignSignatureRequest, useSignatureRequest, useSignatureRequestsAwaitingMe, useSignatureVerification, useSignerCandidates, useStoreSavedSignature, useVoidSignatureRequest, versionsWithMarkup };
|
|
1119
|
+
export { DEFAULT_FIELD_SIZE, FIELD_TYPE_LABELS, INFORMAL_SIGNATURE_NOTE, LEGACY_LAYER_PREFIX, MARK_FIELD_TYPES, MAX_MERGE_ATTEMPTS, MarkupDownloadError, MarkupStoreError, PRODUCTIONS_FOLDER, SIGNATURE_FIELD_TYPES, SIGNED_LOCKED_REASON, SIGNED_UNCHANGED, SIGNER_PROGRESS_LABELS, SignatureVerificationError, SigningError, VERIFY_PATH, addToMarkup, buildProduction, canAnnotate, copyOpenThreads, createMarkupStore, currentHasMarkup, deleteSavedSignature, documentBytesKey, fetchDocumentSignatureRequests, fetchDocumentSignatures, fetchMarkupPdf, fetchProductionPdf, fetchSavedSignature, fetchSignatureVerification, fieldsFromSuggestions, fieldsInSigningOrder, forgetLegacyLayer, frozenCopyName, 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, 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 };
|
|
1117
1120
|
//# sourceMappingURL=index.js.map
|
|
1118
1121
|
//# sourceMappingURL=index.js.map
|