A document to sign, unified across desktop and mobile backends.

interface DocumentToSign {
    content: string;
    encoding?: "utf-8" | "base64";
    filename?: string;
    mimeType: string;
    xdcParameters?: {
        autoLoadEform?: boolean;
        containerXmlns?:
            | null
            | "http://data.gov.sk/def/container/xmldatacontainer+xml/1.1";
        embedUsedSchemas?: boolean;
        fsFormIdentifier?: string;
        identifier?: string;
        schema?: string;
        schemaIdentifier?: string;
        schemaMimeType?: string;
        transformation?: string;
        transformationIdentifier?: string;
        transformationLanguage?: string;
        transformationMediaDestinationTypeDescription?: | null
        | "XHTML"
        | "HTML"
        | "TXT";
        transformationTargetEnvironment?: string;
    };
}

Properties

content: string
encoding?: "utf-8" | "base64"

How content is encoded. Default "utf-8".

filename?: string
mimeType: string

MIME type of content — without any ";base64" suffix.

xdcParameters?: {
    autoLoadEform?: boolean;
    containerXmlns?:
        | null
        | "http://data.gov.sk/def/container/xmldatacontainer+xml/1.1";
    embedUsedSchemas?: boolean;
    fsFormIdentifier?: string;
    identifier?: string;
    schema?: string;
    schemaIdentifier?: string;
    schemaMimeType?: string;
    transformation?: string;
    transformationIdentifier?: string;
    transformationLanguage?: string;
    transformationMediaDestinationTypeDescription?: | null
    | "XHTML"
    | "HTML"
    | "TXT";
    transformationTargetEnvironment?: string;
}

XML Datacontainer / eForm parameters of this document (Autogram desktop app). Each document of a multi-document request carries its own.

Type declaration

  • OptionalautoLoadEform?: boolean

    Try to find XSD and XSLT for this document's eForm and load them automatically. Useful for visualizing and signing eForms. If true, this document's schema, transformation, containerXmlns, and identifier are ignored. If resources are not found, the response is 422. If the provided document is an ASiC_E container containing XML Datacontainer or it is an XML Datacontainer itself, the XSLT found is used for visualization of the signing document. Also, XSD and XSLT hashes are compared with hashes of XSD and XSLT found in the XML Datacontainer eForm. If they differ, the response is 422. If the provided document is an XML document, Autogram will try to parse xmlns from the root element and find resources based on its value. If successful, XML Datacontainer with xmlns="http://data.gov.sk/def/container/xmldatacontainer+xml/1.1" is created, the document is validated against the XSD and visualized using the XSLT. If XSD validation fails, the response is 422. The XSLT transformation is found based on transformationLanguage (defaults to user preferred), transformationMediaDestinationTypeDescription (default XHTML, then HTML, then TXT), and transformationTargetEnvironment. If multiple transformations meet the criteria, the first one found is used.

    false
    
  • OptionalcontainerXmlns?: null | "http://data.gov.sk/def/container/xmldatacontainer+xml/1.1"

    XML namespace for the XML Datacontainer. Specifies if xmldatacontainer should be created from XML. Doesn't create xmldatacontainer if document.mimeType is application/vnd.gov.sk.xmldatacontainer+xml already. Accepts http://data.gov.sk/def/container/xmldatacontainer+xml/1.1 only. Defaults to null. Is ignored with autoLoadEform true.

    http://data.gov.sk/def/container/xmldatacontainer+xml/1.1
    @enum {string}
  • OptionalembedUsedSchemas?: boolean

    When creating XML Datacontainer, parameter indicates whether to embed XSD and XML or reference them. Practically this should be only used for ORSR EForms in which case (when identifier contains "justice.gov.sk/Forms") this parameter is overridden to true.

    false
    
  • OptionalfsFormIdentifier?: string

    Specific identifier for financnasprava.sk EForms. For example, 792_772 is an identifier of "Danove priznanie - riadne".

    null
    
    792_772
    
  • Optionalidentifier?: string

    Optional identifier of the document template. Required if containerXmlns is http://data.gov.sk/def/container/xmldatacontainer+xml/1.1. Defaults to null. Is ignored with autoLoadEform true.

    https://data.gov.sk/id/egov/eform/App.GeneralAgenda/1.9
    
  • Optionalschema?: string

    Optional XML schema used to validate the signing document and to compute digest used in "UsedXSDReference" in "DigestValue" attribute inside created XML Datacontainer. Format (plaintext or base64) is specified by document.mimeType. Is ignored with autoLoadEform true.

    <?xml version="1.0"?><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"><xs:element name="Document"><xs:complexType><xs:sequence><xs:element name="Title" type="xs:string" /></xs:sequence></xs:complexType></xs:element></xs:schema>
    
  • OptionalschemaIdentifier?: string

    Optional identifier of the XML schema. The value is used in "UsedXSDReference" field inside created XML Datacontainer. If provided with autoLoadEform true, Autogram will try to find such schema. Default value is "http://schemas.gov.sk/form///form.xsd".

    http://schemas.gov.sk/form/App.GeneralAgenda/1.9/form.xsd
    
  • OptionalschemaMimeType?: string

    mimeType of XSD schema and XSLT transformation. Should be either application/xml or application/xml;base64. Is ignored with autoLoadEform true.

    application/xml
    
  • Optionaltransformation?: string

    Optional XML transformation used to present the signing document to user and to compute digest used in "UsedPresentationSchemaReference" in "DigestValue" attribute inside created XML Datacontainer. Format (plaintext or base64) is specified by document.mimeType. Is ignored with autoLoadEform true.

    <?xml version="1.0"?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:template match = "/"><h1><xsl:value-of select="/Document/Title"/></h1></xsl:template></xsl:stylesheet>
    
  • OptionaltransformationIdentifier?: string

    Optional identifier of the XML transformation. If provided with autoLoadEform true, Autogram will try to find such transformation. Default value is "http://schemas.gov.sk/form///form.xslt".

    http://schemas.gov.sk/form/App.GeneralAgenda/1.9/form.xslt
    
  • OptionaltransformationLanguage?: string

    Optional language of the XML transformation. If autoLoadEform is true, Autogram will try to find signing XSLT with this language. Otherwise transformation must be provided. Default value is user preferred or "sk".

    sk
    
  • OptionaltransformationMediaDestinationTypeDescription?: null | "XHTML" | "HTML" | "TXT"

    Optional media destination type description of the XML transformation. If autoLoadEform is true, Autogram will try to find signing XSLT with this type. Otherwise transformation must be provided. Overrides value of the output method in provided or auto-loaded transformation which is used by default.

    HTML
    @enum {string}
  • OptionaltransformationTargetEnvironment?: string

    Optional target environment of the XML transformation. If autoLoadEform is true, Autogram will try to find signing XSLT with this target. Otherwise transformation must be provided. Null and not used by default.

    example-value