import gql from 'graphql-tag';
import { client } from '@operato/graphql';
export async function queryDataSets() {
    const response = await client.query({
        query: gql `
      query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!], $inherited: InheritedValueType) {
        responses: dataSets(filters: $filters, pagination: $pagination, sortings: $sortings, inherited: $inherited) {
          items {
            id
            name
            description
            active
            summaryPeriod
          }
          total
        }
      }
    `,
        variables: {
            filters: [
                {
                    name: 'active',
                    operator: 'eq',
                    value: true
                }
            ],
            pagination: {},
            sortings: [],
            inherited: 'Include'
        }
    });
    return response.data.responses.items;
}
export async function queryDataKeySets() {
    const response = await client.query({
        query: gql `
      query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
        responses: dataKeySets(filters: $filters, pagination: $pagination, sortings: $sortings) {
          items {
            id
            name
            description
            active
          }
          total
        }
      }
    `,
        variables: {
            filters: [
                {
                    name: 'active',
                    operator: 'eq',
                    value: true
                }
            ],
            pagination: {},
            sortings: []
        }
    });
    return response.data.responses.items;
}
//# sourceMappingURL=query-data-sets.js.map