﻿<?xml version="1.0" encoding="utf-8" ?>
<schema xmlns:tns="https://webservices.sanctieplatform.nl/event/" elementFormDefault="qualified" targetNamespace="https://webservices.sanctieplatform.nl/event/" xmlns="http://www.w3.org/2001/XMLSchema">
    <simpleType name="EventOrderDirection">
        <restriction base="string">
            <enumeration value="Ascending" />
            <enumeration value="Descending" />
        </restriction>
    </simpleType>
    <complexType name="PagingRequestType">
        <sequence minOccurs="1" maxOccurs="1">
            <element name="PageSize" minOccurs="1" maxOccurs="1" default="100" nillable="false">
                <annotation>
                    <documentation>
                        The number of rows per page.
                        100 (=DEFAULT)
                    </documentation>
                </annotation>
                <simpleType>
                    <restriction base="string">
                        <enumeration value="10" />
                        <enumeration value="50" />
                        <enumeration value="100" />
                    </restriction>
                </simpleType>
            </element>
            <element name="PageNumber" minOccurs="1" maxOccurs="1" default="0" nillable="false">
                <annotation>
                    <documentation>
                        The requested page number
                        0 = The first page (=DEFAULT)
                    </documentation>
                </annotation>
                <simpleType>
                    <restriction base="int">
                        <minInclusive value="0" />
                    </restriction>
                </simpleType>
            </element>
        </sequence>
    </complexType>
    <complexType name="PagingResponseType">
        <sequence minOccurs="1" maxOccurs="1">
            <element name="PageSize" minOccurs="1" maxOccurs="1" default="100" nillable="false">
                <annotation>
                    <documentation>
                        The returned number of rows per page.
                        100 (=DEFAULT)
                    </documentation>
                </annotation>
                <simpleType>
                    <restriction base="string">
                        <enumeration value="10" />
                        <enumeration value="50" />
                        <enumeration value="100" />
                    </restriction>
                </simpleType>
            </element>
            <element name="PageNumber" minOccurs="1" maxOccurs="1" default="0" nillable="false">
                <annotation>
                    <documentation>
                        The returned page
                        0 = The first page (=DEFAULT)
                    </documentation>
                </annotation>
                <simpleType>
                    <restriction base="int">
                        <minInclusive value="0" />
                    </restriction>
                </simpleType>
            </element>
            <element name="Count" minOccurs="1" maxOccurs="1" nillable="false">
                <annotation>
                    <documentation>
                        The total number of search results.
                        Can be used to determine total page number.
                        First page = 0
                    </documentation>
                </annotation>
                <simpleType>
                    <restriction base="int">
                        <minInclusive value="0" />
                    </restriction>
                </simpleType>
            </element>
        </sequence>
    </complexType>
    <complexType name="Event">
        <sequence minOccurs="1" maxOccurs="1">
            <element name="InvestigationId" type="int" minOccurs="0" maxOccurs="1">
                <annotation>
                    <documentation>
                        ID of the investigation
                    </documentation>
                </annotation>
            </element>
            <element name="TaskId" type="int" minOccurs="0" maxOccurs="1">
                <annotation>
                    <documentation>
                        ID of the task, only applicable for UFCTaskDeclined, PossibleHitCreatedAfterUpdateSanctionList and ReactionOnUFCTask.
                    </documentation>
                </annotation>
            </element>
            <element name="EventDateTime" type="dateTime" minOccurs="1" maxOccurs="1">
                <annotation>
                    <documentation>
                        Date/time when the event has occurred.
                    </documentation>
                </annotation>
            </element>
            <element name="EventType" minOccurs="1" maxOccurs="1">
                <annotation>
                    <documentation>
                        Key of the eventtype. Composed as following: {Category}.{ActionType}
                    </documentation>
                </annotation>
                <simpleType>
                    <restriction base="string">
                        <minLength value="0" />
                        <maxLength value="100" />
                    </restriction>
                </simpleType>
            </element>
            <element name="ShareStatus" minOccurs="1" maxOccurs="1">
                <annotation>
                    <documentation>
                        MyOrganisation/SharedWithMyOrganisation
                        Indicates whether this event relates to an investigation/task owned by your organization or a shared investigation.
                    </documentation>
                </annotation>
                <simpleType>
                    <restriction base="string">
                        <enumeration value="MyOrganisation" />
                        <enumeration value="SharedWithMyOrganisation" />
                    </restriction>
                </simpleType>
            </element>
        </sequence>
    </complexType>
    <element name="GetEventsByCriteriaRequest">
        <complexType>
            <sequence minOccurs="1" maxOccurs="1">
                <element name="OnBehalfUserId" minOccurs="1" maxOccurs="1" nillable="false">
                    <annotation>
                        <documentation>see Reference.GetAllUsersInOwnOrganisation and use users with IsActive = TRUE</documentation>
                    </annotation>
                    <simpleType>
                        <restriction base="int">
                            <minInclusive value="1" />
                        </restriction>
                    </simpleType>
                </element>
                <element name="SinceDateTime" type="dateTime" minOccurs="1" maxOccurs="1">
                    <annotation>
                        <documentation>
                            Date/time since when an event has occurred. Events that have occurred after this date/time will be returned.l
                        </documentation>
                    </annotation>
                </element>
                <element name="EventTypes" minOccurs="0" maxOccurs="unbounded">
                    <annotation>
                        <documentation>
                            List of event types that should be returned.
                            If the list is empty or not provided, all types will be returned.
                            The list of types can be retrieved via Reference GetAllEventTypes and should be provided in this request as text (not as an ID).
                        </documentation>
                    </annotation>
                    <simpleType>
                        <restriction base="string">
                            <minLength value="0" />
                            <maxLength value="100" />
                        </restriction>
                    </simpleType>
                </element>
                <element name="OrderBy" type="string" minOccurs="0" maxOccurs="1" nillable="true">
                    <annotation>
                        <documentation>
                            Field to sort on
							EventDateTime (=DEFAULT)
                        </documentation>
                    </annotation>
                </element>
                <element name="OrderDirection" type="tns:EventOrderDirection" minOccurs="0" maxOccurs="1" default="Descending" nillable="true">
                    <annotation>
                        <documentation>
                            Descending (=DEFAULT)
                        </documentation>
                    </annotation>
                </element>
                <element name="Paging" type="tns:PagingRequestType" minOccurs="1" maxOccurs="1" nillable="false" />
            </sequence>
        </complexType>
    </element>
    <element name="GetEventsByCriteriaResponse">
        <complexType>
            <sequence>
                <element name="Events" type="tns:Event" minOccurs="0" maxOccurs="unbounded" />
                <element name="Paging" type="tns:PagingResponseType" minOccurs="1" maxOccurs="1" nillable="false" />
            </sequence>
        </complexType>
    </element>
</schema>
