signature index (incremented after each signature)
Signs one or more documents. The result keeps every signer and the MIME type of the signed artifact.
Pass an array to sign multiple documents together into a single ASiC_E
container with one signature ("spoločná autorizácia dokumentov"). This
needs the Autogram desktop app 2.8.0 or newer, so the method chooser is
skipped; on mobile devices it fails with not-supported.
Callers holding legacy POST /sign-shaped input (level, XDC fields in
the parameters, payloadMimeType) can convert it with
fromLegacySignArgs() / fromLegacySignatureParameters().
document(s) to sign, each with its own
mimeType/encoding and optional xdcParameters
Optionalparameters: {how to sign (form, profile, container, …)
OptionalcheckPDFACompliance?: booleanOptionalcheckPDFEmbeddedAttachments?: booleanOptionalcontainer?: null | "ASiC_E"OptionaldigestAlgorithm?: null | "SHA256" | "SHA384" | "SHA512"Optionalform?: null | "XAdES" | "PAdES" | "CAdES"OptionalinfoCanonicalization?: OptionalkeyInfoCanonicalization?: Optionalpackaging?: null | "ENVELOPED" | "ENVELOPING"Optional form of packaging used with XML. ENVELOPED adds the signature as a child of the root element while ENVELOPING wraps the XML in a new element. Only applies to XAdES signatures. Must be ENVELOPING when used without ASiC container and with non XML documents. For a document with xdcParameters.autoLoadEform=true, this value can be overridden by the resolved eForm requirements.
Optionalprofile?: null | "BASELINE_B" | "BASELINE_T"OptionalpropertiesCanonicalization?: Optionalen319132?: booleanOptionalrequireQualifiedCertificate?: booleanOptionaloptions: ClientSignOptionsAutogramError — always carries a machine-readable code;
classify with AutogramError.is() rather than instanceof. Codes
that can surface here:
user-cancelled — the user actively cancelled the signing flowaborted — the operation was aborted programmatically (dialog
closed, AbortSignal, page close)timeout — the signing operation did not finish in timeapp-not-installed — the Autogram desktop app could not be launchedapp-version-too-low — the desktop app is too old for the request
(multiple documents, v1-only checks)not-supported — the chosen signing method cannot fulfil the
request (multiple documents on a mobile device, v1-only checks with
Autogram v mobile)connection-failed — a network request to a signing backend failedprotocol-error — an unexpected response shape or bridge failureserver-error — a signing backend reported an errorunknown — anything that cannot be classified more preciselyStaticinitWe have to use async factory function because we have to wait for the UI to be created
OptionalclientMobileIntegration: AutogramVMobileIntegrationInterfaceStatefulOptionalresetSignRequestCallback: () => voidPrefer createAutogramClient (options object).
reset sign request, so callbacks and signature index are reset