query paginationConceptTypeIE($limit: Int! = 0, $offset: Int!) {
    pagination: paginationConceptTypeInternal(
        limit: $limit
        offset: $offset
        filterSettings: {}
    ) {
        total
        list: listConceptType {
            id
            name
        }
    }
}

query paginationDocumentTypeIE($limit: Int! = 0, $offset: Int!) {
    pagination: paginationDocumentTypeInternal(
        limit: $limit
        offset: $offset
        filterSettings: {}
    ) {
        total
        list: listDocumentType {
            id
            name
        }
    }
}

query paginationValueTypeIE($limit: Int! = 0, $offset: Int!) {
    pagination: paginationConceptPropertyValueTypeInternal(
        limit: $limit
        offset: $offset
        filterSettings: {}
    ) {
        total
        list: listConceptPropertyValueType {
            id
            name
            valueType
            valueRestriction
        }
    }
}

query paginationCompositeValueTypeIE($limit: Int! = 0, $offset: Int!) {
    pagination: paginationCompositePropertyValueTemplateInternal(
        limit: $limit
        offset: $offset
        filterSettings: {}
    ) {
        total
        list: listCompositePropertyValueTemplate {
            id
            name
            componentValueTypes {
                id
                name
                isRequired
                valueType {
                    id
                }
            }
        }
    }
}


query paginationRelationTypeIE($limit: Int! = 0, $offset: Int!) {
    pagination: paginationConceptLinkTypeInternal(
        limit: $limit
        offset: $offset
        filterSettings: {}
    ) {
        total
        list: listConceptLinkType {
            id
            name
            source: conceptFromType {
                id
            }
            target: conceptToType {
                id
            }
            isDirected
        }
    }
}


query paginationConceptPropertyTypeIE($limit: Int! = 0, $offset: Int!) {
    pagination: paginationConceptPropertyTypeInternal(
        limit: $limit
        offset: $offset
        filterSettings: {}
    ) {
        total
        list: listConceptPropertyType {
            id
            name
            isIdentifying
            source: parentConceptType {
                id
            }
            target: valueType {
                ... on ConceptPropertyValueType {
                    id
                }
                ... on CompositePropertyValueTemplate {
                    id
                }
            }
        }
    }
}


query paginationRelationPropertyTypeIE($limit: Int! = 0, $offset: Int!) {
    pagination: paginationConceptLinkPropertyTypeInternal(
        limit: $limit
        offset: $offset
        filterSettings: {}
    ) {
        total
        list: listConceptPropertyType {
            id
            name
            source: parentConceptLinkType{
                id
            }
            target: valueType {
                ... on ConceptPropertyValueType {
                    id
                }
                ... on CompositePropertyValueTemplate {
                    id
                }
            }
        }
    }
}


fragment PretrainedRelExtModels on RelExtModel {
    relation_type: relationType
    invert_direction: invertDirection
}

query propertyTypeExtrasIE(
    $source_type_id: ID!
    $name: String!
    $offset: Int = 0
    $limit: Int = 1
) {
    result: paginationConceptPropertyTypeInternal(
        filterSettings: { conceptTypeId: $source_type_id, name: $name }
        offset: $offset
        limit: $limit
    ) {
        total
        list: listConceptPropertyType {
            id
            pretrained_models: pretrainedRelExtModels {
                ...PretrainedRelExtModels
            }
        }
    }
}

query relationPropertyTypeExtrasIE(
    $source_type_id: ID!
    $name: String!
    $offset: Int = 0
    $limit: Int = 1
) {
    result: paginationConceptLinkPropertyTypeInternal(
        filterSettings: { conceptLinkTypeId: $source_type_id, name: $name }
        offset: $offset
        limit: $limit
    ) {
        total
        list: listConceptPropertyType {
            id
            pretrained_models: pretrainedRelExtModels {
                ...PretrainedRelExtModels
            }
        }
    }
}

query relationTypeExtrasIE(
    $source_type_id: ID!
    $name: String!
    $offset: Int = 0
    $limit: Int = 1
) {
    result: paginationConceptLinkTypeInternal(
        filterSettings: { conceptFromTypeId: $source_type_id, name: $name }
        offset: $offset
        limit: $limit
    ) {
        total
        list: listConceptLinkType {
            id
            pretrained_models: pretrainedRelExtModels {
                ...PretrainedRelExtModels
            }
        }
    }
}

fragment NERCRegexp on NERCRegexp {
    regexp
    context_regexp: contextRegexp
    auto_create: autoCreate
}

query conceptTypeExtrasIE(
    $name: String!
    $offset: Int = 0
    $limit: Int = 1
    $regexp: Boolean = false
    $black_regexp: Boolean = false
    $pretrained_models: Boolean = false
    $dictionary: Boolean = false
    $black_list: Boolean = false
) {
    result: paginationConceptTypeInternal(
        filterSettings: { name: $name }
        offset: $offset
        limit: $limit
    ) {
        total
        list: listConceptType {
            id
            regexp: listWhiteRegexp @include(if: $regexp) {
                ...NERCRegexp
            }
            black_regexp: listBlackRegexp @include(if: $black_regexp) {
                ...NERCRegexp
            }
            pretrained_models: pretrainedNERCModels @include(if: $pretrained_models)
            dictionary: listWhiteDictionary @include(if: $dictionary)
            names_dictionary: listNamesDictionary @include(if: $dictionary)
            black_list: listBlackDictionary @include(if: $black_list)
        }
    }
}

query documentTypeExtrasIE(
    $name: String!
    $offset: Int = 0
    $limit: Int = 1
    $regexp: Boolean = false
    $black_regexp: Boolean = false
    $pretrained_models: Boolean = false
    $dictionary: Boolean = false
    $black_list: Boolean = false
) {
    result: paginationDocumentTypeInternal(
        filterSettings: { name: $name }
        offset: $offset
        limit: $limit
    ) {
        total
        list: listDocumentType {
            id
            regexp: listWhiteRegexp @include(if: $regexp) {
                ...NERCRegexp
            }
            black_regexp: listBlackRegexp @include(if: $black_regexp) {
                ...NERCRegexp
            }
            pretrained_models: pretrainedNERCModels @include(if: $pretrained_models)
            dictionary: listWhiteDictionary @include(if: $dictionary)
            names_dictionary: listNamesDictionary @include(if: $dictionary)
            black_list: listBlackDictionary @include(if: $black_list)
        }
    }
}

query valueTypeExtrasIE(
    $name: String!
    $offset: Int = 0
    $limit: Int = 1
    $regexp: Boolean = false
    $black_regexp: Boolean = false
    $pretrained_models: Boolean = false
    $dictionary: Boolean = false
    $black_list: Boolean = false
) {
    result: paginationConceptPropertyValueTypeInternal(
        filterSettings: { name: $name }
        offset: $offset
        limit: $limit
    ) {
        total
        list: listConceptPropertyValueType {
            id
            regexp: listWhiteRegexp @include(if: $regexp) {
                ...NERCRegexp
            }
            black_regexp: listBlackRegexp @include(if: $black_regexp) {
                ...NERCRegexp
            }
            pretrained_models: pretrainedNERCModels @include(if: $pretrained_models)
            dictionary: listWhiteDictionary @include(if: $dictionary)
            black_list: listBlackDictionary @include(if: $black_list)
        }
    }
}

query domainUpdateInfoIE{
    info: domainUpdateInfoInternal{
        name updateDate
    }
}