Skip to main content

1E SDK

XSD schema

The following XSD can be used to validation Instruction Definition XML files.

XSD schema Expand source

<?xml version="1.0" encoding="utf-8"?>

<xs:schema elementFormDefault="qualified"
           attributeFormDefault="unqualified"
           targetNamespace="http://schemas.1e.com/Tachyon/InstructionDefinition/1.0"
           xmlns="http://schemas.1e.com/Tachyon/InstructionDefinition/1.0"
           xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="InstructionDefinition">
    <xs:complexType>
      <xs:all>
        <xs:element name="Payload" type="xs:string" minOccurs="1" maxOccurs="1" />
        <xs:element name="SchemaJson" type="xs:string" minOccurs="1" maxOccurs="1" />
        <xs:element name="AggregationJson" type="xs:string" minOccurs="0" maxOccurs="1" />
        <xs:element name="ParameterJson" type="xs:string" minOccurs="0" maxOccurs="1" />
        <xs:element name="Workflow" type="xs:string" minOccurs="0" maxOccurs="1" />
        <xs:element name="ResponseTemplateConfiguration" minOccurs="0" maxOccurs="1" />
        <xs:element name="Comments" minOccurs="0" maxOccurs="1" />
        <xs:element name="Resources" minOccurs="0" maxOccurs="1">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Resource" type="resourceType" minOccurs="1" maxOccurs="unbounded" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="TaskGroups" minOccurs="0" maxOccurs="1">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="TaskGroup" type="taskGroupType" minOccurs="1" maxOccurs="unbounded"/>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:all>
      <xs:attribute name="Name" type="xs:string" use="required" />
      <xs:attribute name="InstructionType" use="required">
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:enumeration value="Question" />
            <xs:enumeration value="Action" />
            <xs:enumeration value="EventSubscription" />
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="Description" type="xs:string" use="required" />
      <xs:attribute name="ReadablePayload" type="xs:string" use="required" />
      <xs:attribute name="InstructionTtlMinutes" type="xs:unsignedInt" use="required" />
      <xs:attribute name="ResponseTtlMinutes" type="xs:unsignedInt" use="required" />
      <xs:attribute name="Version" type="xs:string" use="required" />
      <!-- The following attributes end up the in 'Restrictions' field on InstructionDefinition -->
      <xs:attribute name="MinimumInstructionTtlMinutes" type="xs:unsignedInt" use="optional" />
      <xs:attribute name="MaximumInstructionTtlMinutes" type="xs:unsignedInt" use="optional" />
      <xs:attribute name="MinimumResponseTtlMinutes" type="xs:unsignedInt" use="optional" />
      <xs:attribute name="MaximumResponseTtlMinutes" type="xs:unsignedInt" use="optional" />
      <xs:attribute name="Author" type="xs:string" use="optional" />
    </xs:complexType>
  </xs:element>
  <xs:complexType name="resourceType">
    <xs:sequence>
      <xs:element name="Content" type="contentType" minOccurs="1" maxOccurs="unbounded" />
    </xs:sequence>
    <xs:attribute name="Name" use="required"/>
  </xs:complexType>
  <xs:complexType name="contentType">
    <xs:simpleContent>
      <xs:extension base="xs:string">
        <xs:attribute name="Type" type="xs:string" use="required" />
        <xs:attribute name="FileName" type="xs:string" use="required" />
        <xs:attribute name="Size" type="xs:unsignedLong" use="required" />
        <xs:attribute name="Hash" type="xs:string" use="required" />
        <xs:attribute name="Platform" use="required">
          <xs:simpleType>
            <xs:restriction base="xs:string">
              <xs:enumeration value="Windows" />
                            <xs:enumeration value="MacOS" />
              <xs:enumeration value="Linux" />
                          </xs:restriction>
          </xs:simpleType>
        </xs:attribute>
      </xs:extension>
    </xs:simpleContent>
    <!-- Can use this online tool to generate hash - https://md5file.com/calculator -->
  </xs:complexType>
  <xs:complexType name="taskGroupType">
    <xs:attribute name="Name" type="xs:string" use="required" />
  </xs:complexType>
</xs:schema>