<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:tns="https://schemas.rutdev.se/xsd/exchange/tenant-snapshot/types/exchange-types-1.0.xsd"
    targetNamespace="https://schemas.rutdev.se/xsd/exchange/tenant-snapshot/types/exchange-types-1.0.xsd"
    elementFormDefault="qualified"
    version="1.0">

    <!--
      Tns Types Schema

      Description: Tns type definitions
      Version: 1.0
      Generated: 2026-04-22T06:56:44Z
      Source: specs/types/tns/1.0/
    -->

    <!-- Non-empty identifier token for the tenant sending the snapshot -->
    <xsd:simpleType name="TenantId">
        <xsd:restriction base="xsd:token">
            <xsd:minLength value="1"/>
        </xsd:restriction>
    </xsd:simpleType>

    <!-- Non-empty short name of the sending system (1-255 characters) -->
    <xsd:simpleType name="SystemName">
        <xsd:restriction base="xsd:string">
            <xsd:minLength value="1"/>
            <xsd:maxLength value="255"/>
            <xsd:whiteSpace value="collapse"/>
        </xsd:restriction>
    </xsd:simpleType>

    <!-- Metadata for a complete data snapshot transfer from a tenant system -->
    <xsd:complexType name="Meta">
        <xsd:sequence>
            <xsd:element name="extractedAt" type="xsd:dateTime"/>
            <xsd:element name="tenantId" type="tns:TenantId"/>
            <xsd:element name="systemName" type="tns:SystemName"/>
        </xsd:sequence>
    </xsd:complexType>

</xsd:schema>