export interface CreateContentSourceRequest {
    /**
     * Definition to create a Workplace Search Content Source
     */
    body: {
        /**
         * The human readable display name for this Content Source.
         */
        name: string;
        /**
         * The schema that each document in this Content Source will adhere to.
         */
        schema?: {
            [k: string]: 'text' | 'geolocation' | 'number' | 'date';
        };
        /**
         * The display details which governs which fields will be displayed, and in what order, in the search results.
         */
        display?: {
            title_field: string;
            url_field: string;
            color?: string;
            description_field?: string | null;
            subtitle_field?: string | null;
            type_field?: string | null;
            media_type_field?: string | null;
            created_by_field?: string | null;
            updated_by_field?: string | null;
            detail_fields?: Array<{
                label: string;
                field_name: string;
            }>;
        };
        /**
         * Whether or not this Content Source will be searchable on the search page.
         */
        is_searchable?: boolean;
        /**
         * Rules for indexing the content for this Content Source
         */
        indexing?: {
            enabled?: boolean;
            features?: {
                thumbnails: {
                    enabled: boolean;
                };
                content_extraction: {
                    enabled: boolean;
                };
            };
            default_action: 'include' | 'exclude';
            rules?: Array<{
                exclude?: string;
                include?: string;
                filter_type?: 'object_type' | 'path_template' | 'file_extension';
                fields?: Array<{
                    remote: string;
                    target: string;
                }> | null;
            }>;
            /**
             * Schedule defining when and how often the content source should be synchronized
             */
            schedule?: {
                /**
                 * How often a full data synchronization should be performed, as an ISO-8601 duration
                 */
                full?: string;
                /**
                 * How often to synchronize new changes, as an ISO-8601 duration
                 */
                incremental?: string;
                /**
                 * How often to purge deleted documents, as an ISO-8601 duration
                 */
                delete?: string;
                /**
                 * How often to update user permissions, as an ISO-8601 duration
                 */
                permissions?: string;
                blocked_windows?: Array<{
                    job_type: 'full' | 'incremental' | 'delete' | 'permissions' | 'all';
                    day: 'all' | 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday';
                    /**
                     * The start of the time window, in the format of HH:mm:ssZ
                     */
                    start?: string;
                    /**
                     * The end of the time window, in the format of HH:mm:ssZ
                     */
                    end?: string;
                }>;
            } | null;
        } | null;
        /**
         * Facet customizations
         */
        facets?: {
            overrides: Array<{
                field: string;
                enabled: boolean;
                display_name?: string | null;
                transform?: 'capitalize' | 'titleize' | 'mime_type' | null;
            }>;
        } | null;
        /**
         * Automatic query refinement customizations
         */
        automatic_query_refinement?: {
            overrides: Array<{
                field: string;
                enabled: boolean;
                query_expansion_phrases: string[];
                is_person?: boolean;
            }>;
        } | null;
    };
}
/**
 * Workplace Search Content Source
 */
export interface CreateContentSourceResponse {
    /**
     * The Content Source Identifier.
     */
    id: string;
    /**
     * The Content Source's Service Type. For example, for Google Drive the Service Type is "google_drive".
     */
    service_type: string;
    /**
     * The date/time at which this Content Source was originally created.
     */
    created_at: string;
    /**
     * The date/time at which this Content Source was last updated.
     */
    last_updated_at: string;
    /**
     * Whether or not this Content Source is a "remote" content source. See https://www.elastic.co/guide/en/workplace-search/current/workplace-search-content-sources.html#remote
     */
    is_remote: boolean;
    /**
     * A list of key/value metadata for the Content Source and the account which authenticated/connected it.
     */
    details: Array<{
        [k: string]: unknown;
    }>;
    /**
     * A list of Workplace Search Group names and IDs which have access to this Content Source.
     */
    groups: Array<{
        id: string;
        name: string;
    }>;
    /**
     * The human readable display name of this Content Source.
     */
    name: string;
    /**
     * The schema that each document in this Content Source must adhere to.
     */
    schema?: {
        [k: string]: 'text' | 'geolocation' | 'number' | 'date';
    };
    /**
     * The display details which governs which fields are displayed, and in what order, in the search results.
     */
    display?: {
        title_field: string;
        url_field: string;
        color?: string;
        description_field?: string | null;
        subtitle_field?: string | null;
        type_field?: string | null;
        media_type_field?: string | null;
        created_by_field?: string | null;
        updated_by_field?: string | null;
        detail_fields?: Array<{
            label: string;
            field_name: string;
        }>;
    };
    /**
     * Can be either "organization" or "private." This specifies whether this Content Source is available to groups of users, or a single user.
     */
    context: 'organization' | 'private';
    /**
     * Whether or not this Content Source can currently be searched over on the search page.
     */
    is_searchable: boolean;
    /**
     * Rules for indexing the content for this Content Source
     */
    indexing?: {
        enabled?: boolean;
        features?: {
            thumbnails: {
                enabled: boolean;
            };
            content_extraction: {
                enabled: boolean;
            };
        };
        default_action: 'include' | 'exclude';
        rules?: Array<{
            exclude?: string;
            include?: string;
            filter_type?: 'object_type' | 'path_template' | 'file_extension';
            fields?: Array<{
                remote: string;
                target: string;
            }> | null;
        }>;
        /**
         * Schedule defining when and how often the content source should be synchronized
         */
        schedule?: {
            /**
             * How often a full data synchronization should be performed, as an ISO-8601 duration
             */
            full?: string;
            /**
             * How often to synchronize new changes, as an ISO-8601 duration
             */
            incremental?: string;
            /**
             * How often to purge deleted documents, as an ISO-8601 duration
             */
            delete?: string;
            /**
             * How often to update user permissions, as an ISO-8601 duration
             */
            permissions?: string;
            blocked_windows?: Array<{
                job_type: 'full' | 'incremental' | 'delete' | 'permissions' | 'all';
                day: 'all' | 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday';
                /**
                 * The start of the time window, in the format of HH:mm:ssZ
                 */
                start?: string;
                /**
                 * The end of the time window, in the format of HH:mm:ssZ
                 */
                end?: string;
            }>;
            /**
             * Estimates of when the next sync of each type will be run and average execution time
             */
            estimates?: {
                full?: {
                    /**
                     * The last run time
                     */
                    last_run?: string;
                    /**
                     * The average execution time of the last 5 completed jobs, in ISO-8601 format
                     */
                    duration?: string;
                    /**
                     * The estimated next execution time
                     */
                    next_start?: string;
                };
                incremental?: {
                    /**
                     * The last run time
                     */
                    last_run?: string;
                    /**
                     * The average execution time of the last 5 completed jobs, in ISO-8601 format
                     */
                    duration?: string;
                    /**
                     * The estimated next execution time
                     */
                    next_start?: string;
                };
                delete?: {
                    /**
                     * The last run time
                     */
                    last_run?: string;
                    /**
                     * The average execution time of the last 5 completed jobs, in ISO-8601 format
                     */
                    duration?: string;
                    /**
                     * The estimated next execution time
                     */
                    next_start?: string;
                };
                permissions?: {
                    /**
                     * The last run time
                     */
                    last_run?: string;
                    /**
                     * The average execution time of the last 5 completed jobs, in ISO-8601 format
                     */
                    duration?: string;
                    /**
                     * The estimated next execution time
                     */
                    next_start?: string;
                };
            };
        } | null;
    } | null;
    /**
     * Facet customizations
     */
    facets?: {
        overrides: Array<{
            field: string;
            enabled: boolean;
            display_name?: string | null;
            transform?: 'capitalize' | 'titleize' | 'mime_type' | null;
        }>;
    } | null;
    /**
     * Automatic query refinement customizations
     */
    automatic_query_refinement?: {
        overrides: Array<{
            field: string;
            enabled: boolean;
            query_expansion_phrases: string[];
            is_person?: boolean;
        }>;
    } | null;
    /**
     * How many documents are currently indexed in this Content Source. Note, this field is not applicable to Remote Content Sources.
     */
    document_count?: number;
    /**
     * The date/time when documents were last indexed into this Content Source. This may be "null" if documents have not yet been indexed. Note, this field is not applicable to Remote Content Sources.
     */
    last_indexed_at?: string | null;
}
export interface ListContentSourcesRequest {
    page?: {
        /**
         * Which page of results to request
         */
        current?: number;
        /**
         * The number of results to return in a page
         */
        size?: number;
    };
}
export interface ListContentSourcesResponse {
    meta: {
        page: {
            current: number;
            total_pages: number;
            total_results: number;
            size: number;
        };
    };
    results: Array<{
        /**
         * The Content Source Identifier.
         */
        id: string;
        /**
         * The Content Source's Service Type. For example, for Google Drive the Service Type is "google_drive".
         */
        service_type: string;
        /**
         * The date/time at which this Content Source was originally created.
         */
        created_at: string;
        /**
         * The date/time at which this Content Source was last updated.
         */
        last_updated_at: string;
        /**
         * Whether or not this Content Source is a "remote" content source. See https://www.elastic.co/guide/en/workplace-search/current/workplace-search-content-sources.html#remote
         */
        is_remote: boolean;
        /**
         * A list of key/value metadata for the Content Source and the account which authenticated/connected it.
         */
        details: Array<{
            [k: string]: unknown;
        }>;
        /**
         * A list of Workplace Search Group names and IDs which have access to this Content Source.
         */
        groups: Array<{
            id: string;
            name: string;
        }>;
        /**
         * The human readable display name of this Content Source.
         */
        name: string;
        /**
         * The schema that each document in this Content Source must adhere to.
         */
        schema?: {
            [k: string]: 'text' | 'geolocation' | 'number' | 'date';
        };
        /**
         * The display details which governs which fields are displayed, and in what order, in the search results.
         */
        display?: {
            title_field: string;
            url_field: string;
            color?: string;
            description_field?: string | null;
            subtitle_field?: string | null;
            type_field?: string | null;
            media_type_field?: string | null;
            created_by_field?: string | null;
            updated_by_field?: string | null;
            detail_fields?: Array<{
                label: string;
                field_name: string;
            }>;
        };
        /**
         * Can be either "organization" or "private." This specifies whether this Content Source is available to groups of users, or a single user.
         */
        context: 'organization' | 'private';
        /**
         * Whether or not this Content Source can currently be searched over on the search page.
         */
        is_searchable: boolean;
        /**
         * Rules for indexing the content for this Content Source
         */
        indexing?: {
            enabled?: boolean;
            features?: {
                thumbnails: {
                    enabled: boolean;
                };
                content_extraction: {
                    enabled: boolean;
                };
            };
            default_action: 'include' | 'exclude';
            rules?: Array<{
                exclude?: string;
                include?: string;
                filter_type?: 'object_type' | 'path_template' | 'file_extension';
                fields?: Array<{
                    remote: string;
                    target: string;
                }> | null;
            }>;
            /**
             * Schedule defining when and how often the content source should be synchronized
             */
            schedule?: {
                /**
                 * How often a full data synchronization should be performed, as an ISO-8601 duration
                 */
                full?: string;
                /**
                 * How often to synchronize new changes, as an ISO-8601 duration
                 */
                incremental?: string;
                /**
                 * How often to purge deleted documents, as an ISO-8601 duration
                 */
                delete?: string;
                /**
                 * How often to update user permissions, as an ISO-8601 duration
                 */
                permissions?: string;
                blocked_windows?: Array<{
                    job_type: 'full' | 'incremental' | 'delete' | 'permissions' | 'all';
                    day: 'all' | 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday';
                    /**
                     * The start of the time window, in the format of HH:mm:ssZ
                     */
                    start?: string;
                    /**
                     * The end of the time window, in the format of HH:mm:ssZ
                     */
                    end?: string;
                }>;
                /**
                 * Estimates of when the next sync of each type will be run and average execution time
                 */
                estimates?: {
                    full?: {
                        /**
                         * The last run time
                         */
                        last_run?: string;
                        /**
                         * The average execution time of the last 5 completed jobs, in ISO-8601 format
                         */
                        duration?: string;
                        /**
                         * The estimated next execution time
                         */
                        next_start?: string;
                    };
                    incremental?: {
                        /**
                         * The last run time
                         */
                        last_run?: string;
                        /**
                         * The average execution time of the last 5 completed jobs, in ISO-8601 format
                         */
                        duration?: string;
                        /**
                         * The estimated next execution time
                         */
                        next_start?: string;
                    };
                    delete?: {
                        /**
                         * The last run time
                         */
                        last_run?: string;
                        /**
                         * The average execution time of the last 5 completed jobs, in ISO-8601 format
                         */
                        duration?: string;
                        /**
                         * The estimated next execution time
                         */
                        next_start?: string;
                    };
                    permissions?: {
                        /**
                         * The last run time
                         */
                        last_run?: string;
                        /**
                         * The average execution time of the last 5 completed jobs, in ISO-8601 format
                         */
                        duration?: string;
                        /**
                         * The estimated next execution time
                         */
                        next_start?: string;
                    };
                };
            } | null;
        } | null;
        /**
         * Facet customizations
         */
        facets?: {
            overrides: Array<{
                field: string;
                enabled: boolean;
                display_name?: string | null;
                transform?: 'capitalize' | 'titleize' | 'mime_type' | null;
            }>;
        } | null;
        /**
         * Automatic query refinement customizations
         */
        automatic_query_refinement?: {
            overrides: Array<{
                field: string;
                enabled: boolean;
                query_expansion_phrases: string[];
                is_person?: boolean;
            }>;
        } | null;
        /**
         * How many documents are currently indexed in this Content Source. Note, this field is not applicable to Remote Content Sources.
         */
        document_count?: number;
        /**
         * The date/time when documents were last indexed into this Content Source. This may be "null" if documents have not yet been indexed. Note, this field is not applicable to Remote Content Sources.
         */
        last_indexed_at?: string | null;
    }>;
}
export interface GetContentSourceRequest {
    /**
     * Unique ID for a Custom API source, provided upon creation of a Custom API Source
     */
    content_source_id: string;
}
/**
 * Workplace Search Content Source
 */
export interface GetContentSourceResponse {
    /**
     * The Content Source Identifier.
     */
    id: string;
    /**
     * The Content Source's Service Type. For example, for Google Drive the Service Type is "google_drive".
     */
    service_type: string;
    /**
     * The date/time at which this Content Source was originally created.
     */
    created_at: string;
    /**
     * The date/time at which this Content Source was last updated.
     */
    last_updated_at: string;
    /**
     * Whether or not this Content Source is a "remote" content source. See https://www.elastic.co/guide/en/workplace-search/current/workplace-search-content-sources.html#remote
     */
    is_remote: boolean;
    /**
     * A list of key/value metadata for the Content Source and the account which authenticated/connected it.
     */
    details: Array<{
        [k: string]: unknown;
    }>;
    /**
     * A list of Workplace Search Group names and IDs which have access to this Content Source.
     */
    groups: Array<{
        id: string;
        name: string;
    }>;
    /**
     * The human readable display name of this Content Source.
     */
    name: string;
    /**
     * The schema that each document in this Content Source must adhere to.
     */
    schema?: {
        [k: string]: 'text' | 'geolocation' | 'number' | 'date';
    };
    /**
     * The display details which governs which fields are displayed, and in what order, in the search results.
     */
    display?: {
        title_field: string;
        url_field: string;
        color?: string;
        description_field?: string | null;
        subtitle_field?: string | null;
        type_field?: string | null;
        media_type_field?: string | null;
        created_by_field?: string | null;
        updated_by_field?: string | null;
        detail_fields?: Array<{
            label: string;
            field_name: string;
        }>;
    };
    /**
     * Can be either "organization" or "private." This specifies whether this Content Source is available to groups of users, or a single user.
     */
    context: 'organization' | 'private';
    /**
     * Whether or not this Content Source can currently be searched over on the search page.
     */
    is_searchable: boolean;
    /**
     * Rules for indexing the content for this Content Source
     */
    indexing?: {
        enabled?: boolean;
        features?: {
            thumbnails: {
                enabled: boolean;
            };
            content_extraction: {
                enabled: boolean;
            };
        };
        default_action: 'include' | 'exclude';
        rules?: Array<{
            exclude?: string;
            include?: string;
            filter_type?: 'object_type' | 'path_template' | 'file_extension';
            fields?: Array<{
                remote: string;
                target: string;
            }> | null;
        }>;
        /**
         * Schedule defining when and how often the content source should be synchronized
         */
        schedule?: {
            /**
             * How often a full data synchronization should be performed, as an ISO-8601 duration
             */
            full?: string;
            /**
             * How often to synchronize new changes, as an ISO-8601 duration
             */
            incremental?: string;
            /**
             * How often to purge deleted documents, as an ISO-8601 duration
             */
            delete?: string;
            /**
             * How often to update user permissions, as an ISO-8601 duration
             */
            permissions?: string;
            blocked_windows?: Array<{
                job_type: 'full' | 'incremental' | 'delete' | 'permissions' | 'all';
                day: 'all' | 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday';
                /**
                 * The start of the time window, in the format of HH:mm:ssZ
                 */
                start?: string;
                /**
                 * The end of the time window, in the format of HH:mm:ssZ
                 */
                end?: string;
            }>;
            /**
             * Estimates of when the next sync of each type will be run and average execution time
             */
            estimates?: {
                full?: {
                    /**
                     * The last run time
                     */
                    last_run?: string;
                    /**
                     * The average execution time of the last 5 completed jobs, in ISO-8601 format
                     */
                    duration?: string;
                    /**
                     * The estimated next execution time
                     */
                    next_start?: string;
                };
                incremental?: {
                    /**
                     * The last run time
                     */
                    last_run?: string;
                    /**
                     * The average execution time of the last 5 completed jobs, in ISO-8601 format
                     */
                    duration?: string;
                    /**
                     * The estimated next execution time
                     */
                    next_start?: string;
                };
                delete?: {
                    /**
                     * The last run time
                     */
                    last_run?: string;
                    /**
                     * The average execution time of the last 5 completed jobs, in ISO-8601 format
                     */
                    duration?: string;
                    /**
                     * The estimated next execution time
                     */
                    next_start?: string;
                };
                permissions?: {
                    /**
                     * The last run time
                     */
                    last_run?: string;
                    /**
                     * The average execution time of the last 5 completed jobs, in ISO-8601 format
                     */
                    duration?: string;
                    /**
                     * The estimated next execution time
                     */
                    next_start?: string;
                };
            };
        } | null;
    } | null;
    /**
     * Facet customizations
     */
    facets?: {
        overrides: Array<{
            field: string;
            enabled: boolean;
            display_name?: string | null;
            transform?: 'capitalize' | 'titleize' | 'mime_type' | null;
        }>;
    } | null;
    /**
     * Automatic query refinement customizations
     */
    automatic_query_refinement?: {
        overrides: Array<{
            field: string;
            enabled: boolean;
            query_expansion_phrases: string[];
            is_person?: boolean;
        }>;
    } | null;
    /**
     * How many documents are currently indexed in this Content Source. Note, this field is not applicable to Remote Content Sources.
     */
    document_count?: number;
    /**
     * The date/time when documents were last indexed into this Content Source. This may be "null" if documents have not yet been indexed. Note, this field is not applicable to Remote Content Sources.
     */
    last_indexed_at?: string | null;
}
export interface PutContentSourceRequest {
    /**
     * Unique ID for a Custom API source, provided upon creation of a Custom API Source
     */
    content_source_id: string;
    /**
     * Definition to update a Workplace Search Content Source
     */
    body: {
        /**
         * The human readable display name for this Content Source.
         */
        name: string;
        /**
         * The schema that each document in this Content Source will adhere to.
         */
        schema?: {
            [k: string]: 'text' | 'geolocation' | 'number' | 'date';
        };
        /**
         * The display details which governs which fields will be displayed, and in what order, in the search results.
         */
        display?: {
            title_field: string;
            url_field: string;
            color?: string;
            description_field?: string | null;
            subtitle_field?: string | null;
            type_field?: string | null;
            media_type_field?: string | null;
            created_by_field?: string | null;
            updated_by_field?: string | null;
            detail_fields?: Array<{
                label: string;
                field_name: string;
            }>;
        };
        /**
         * Whether or not this Content Source will be searchable on the search page.
         */
        is_searchable: boolean;
        /**
         * Rules for indexing the content for this Content Source
         */
        indexing?: {
            enabled?: boolean;
            features?: {
                thumbnails: {
                    enabled: boolean;
                };
                content_extraction: {
                    enabled: boolean;
                };
            };
            default_action: 'include' | 'exclude';
            rules?: Array<{
                exclude?: string;
                include?: string;
                filter_type?: 'object_type' | 'path_template' | 'file_extension';
                fields?: Array<{
                    remote: string;
                    target: string;
                }> | null;
            }>;
            /**
             * Schedule defining when and how often the content source should be synchronized
             */
            schedule?: {
                /**
                 * How often a full data synchronization should be performed, as an ISO-8601 duration
                 */
                full?: string;
                /**
                 * How often to synchronize new changes, as an ISO-8601 duration
                 */
                incremental?: string;
                /**
                 * How often to purge deleted documents, as an ISO-8601 duration
                 */
                delete?: string;
                /**
                 * How often to update user permissions, as an ISO-8601 duration
                 */
                permissions?: string;
                blocked_windows?: Array<{
                    job_type: 'full' | 'incremental' | 'delete' | 'permissions' | 'all';
                    day: 'all' | 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday';
                    /**
                     * The start of the time window, in the format of HH:mm:ssZ
                     */
                    start?: string;
                    /**
                     * The end of the time window, in the format of HH:mm:ssZ
                     */
                    end?: string;
                }>;
            } | null;
        } | null;
        /**
         * Facet customizations
         */
        facets?: {
            overrides: Array<{
                field: string;
                enabled: boolean;
                display_name?: string | null;
                transform?: 'capitalize' | 'titleize' | 'mime_type' | null;
            }>;
        } | null;
        /**
         * Automatic query refinement customizations
         */
        automatic_query_refinement?: {
            overrides: Array<{
                field: string;
                enabled: boolean;
                query_expansion_phrases: string[];
                is_person?: boolean;
            }>;
        } | null;
    };
}
/**
 * Workplace Search Content Source
 */
export interface PutContentSourceResponse {
    /**
     * The Content Source Identifier.
     */
    id: string;
    /**
     * The Content Source's Service Type. For example, for Google Drive the Service Type is "google_drive".
     */
    service_type: string;
    /**
     * The date/time at which this Content Source was originally created.
     */
    created_at: string;
    /**
     * The date/time at which this Content Source was last updated.
     */
    last_updated_at: string;
    /**
     * Whether or not this Content Source is a "remote" content source. See https://www.elastic.co/guide/en/workplace-search/current/workplace-search-content-sources.html#remote
     */
    is_remote: boolean;
    /**
     * A list of key/value metadata for the Content Source and the account which authenticated/connected it.
     */
    details: Array<{
        [k: string]: unknown;
    }>;
    /**
     * A list of Workplace Search Group names and IDs which have access to this Content Source.
     */
    groups: Array<{
        id: string;
        name: string;
    }>;
    /**
     * The human readable display name of this Content Source.
     */
    name: string;
    /**
     * The schema that each document in this Content Source must adhere to.
     */
    schema?: {
        [k: string]: 'text' | 'geolocation' | 'number' | 'date';
    };
    /**
     * The display details which governs which fields are displayed, and in what order, in the search results.
     */
    display?: {
        title_field: string;
        url_field: string;
        color?: string;
        description_field?: string | null;
        subtitle_field?: string | null;
        type_field?: string | null;
        media_type_field?: string | null;
        created_by_field?: string | null;
        updated_by_field?: string | null;
        detail_fields?: Array<{
            label: string;
            field_name: string;
        }>;
    };
    /**
     * Can be either "organization" or "private." This specifies whether this Content Source is available to groups of users, or a single user.
     */
    context: 'organization' | 'private';
    /**
     * Whether or not this Content Source can currently be searched over on the search page.
     */
    is_searchable: boolean;
    /**
     * Rules for indexing the content for this Content Source
     */
    indexing?: {
        enabled?: boolean;
        features?: {
            thumbnails: {
                enabled: boolean;
            };
            content_extraction: {
                enabled: boolean;
            };
        };
        default_action: 'include' | 'exclude';
        rules?: Array<{
            exclude?: string;
            include?: string;
            filter_type?: 'object_type' | 'path_template' | 'file_extension';
            fields?: Array<{
                remote: string;
                target: string;
            }> | null;
        }>;
        /**
         * Schedule defining when and how often the content source should be synchronized
         */
        schedule?: {
            /**
             * How often a full data synchronization should be performed, as an ISO-8601 duration
             */
            full?: string;
            /**
             * How often to synchronize new changes, as an ISO-8601 duration
             */
            incremental?: string;
            /**
             * How often to purge deleted documents, as an ISO-8601 duration
             */
            delete?: string;
            /**
             * How often to update user permissions, as an ISO-8601 duration
             */
            permissions?: string;
            blocked_windows?: Array<{
                job_type: 'full' | 'incremental' | 'delete' | 'permissions' | 'all';
                day: 'all' | 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday';
                /**
                 * The start of the time window, in the format of HH:mm:ssZ
                 */
                start?: string;
                /**
                 * The end of the time window, in the format of HH:mm:ssZ
                 */
                end?: string;
            }>;
            /**
             * Estimates of when the next sync of each type will be run and average execution time
             */
            estimates?: {
                full?: {
                    /**
                     * The last run time
                     */
                    last_run?: string;
                    /**
                     * The average execution time of the last 5 completed jobs, in ISO-8601 format
                     */
                    duration?: string;
                    /**
                     * The estimated next execution time
                     */
                    next_start?: string;
                };
                incremental?: {
                    /**
                     * The last run time
                     */
                    last_run?: string;
                    /**
                     * The average execution time of the last 5 completed jobs, in ISO-8601 format
                     */
                    duration?: string;
                    /**
                     * The estimated next execution time
                     */
                    next_start?: string;
                };
                delete?: {
                    /**
                     * The last run time
                     */
                    last_run?: string;
                    /**
                     * The average execution time of the last 5 completed jobs, in ISO-8601 format
                     */
                    duration?: string;
                    /**
                     * The estimated next execution time
                     */
                    next_start?: string;
                };
                permissions?: {
                    /**
                     * The last run time
                     */
                    last_run?: string;
                    /**
                     * The average execution time of the last 5 completed jobs, in ISO-8601 format
                     */
                    duration?: string;
                    /**
                     * The estimated next execution time
                     */
                    next_start?: string;
                };
            };
        } | null;
    } | null;
    /**
     * Facet customizations
     */
    facets?: {
        overrides: Array<{
            field: string;
            enabled: boolean;
            display_name?: string | null;
            transform?: 'capitalize' | 'titleize' | 'mime_type' | null;
        }>;
    } | null;
    /**
     * Automatic query refinement customizations
     */
    automatic_query_refinement?: {
        overrides: Array<{
            field: string;
            enabled: boolean;
            query_expansion_phrases: string[];
            is_person?: boolean;
        }>;
    } | null;
    /**
     * How many documents are currently indexed in this Content Source. Note, this field is not applicable to Remote Content Sources.
     */
    document_count?: number;
    /**
     * The date/time when documents were last indexed into this Content Source. This may be "null" if documents have not yet been indexed. Note, this field is not applicable to Remote Content Sources.
     */
    last_indexed_at?: string | null;
}
export interface DeleteContentSourceRequest {
    /**
     * Unique ID for a Custom API source, provided upon creation of a Custom API Source
     */
    content_source_id: string;
}
export interface DeleteContentSourceResponse {
    deleted: true;
}
export interface PutContentSourceIconsRequest {
    /**
     * Unique ID for a Custom API source, provided upon creation of a Custom API Source
     */
    content_source_id: string;
    /**
     * Definition to upload Workplace Search Custom Source icons
     */
    body: {
        main_icon?: string;
        alt_icon?: string;
    };
}
export interface PutContentSourceIconsResponse {
    results: {
        main_icon?: string;
        alt_icon?: string;
    };
}
export interface DeleteDocumentsByQueryRequest {
    /**
     * Unique ID for a Custom API source, provided upon creation of a Custom API Source
     */
    content_source_id: string;
    /**
     * Definition to delete documents by query in a content source
     */
    body?: {
        filters?: {
            /**
             * The range filter for field last_updated
             */
            last_updated?: {
                /**
                 * The start of the range, inclusive
                 */
                from?: string;
                /**
                 * The end of the range, exclusive
                 */
                to?: string;
            };
        };
    };
}
export interface DeleteDocumentsByQueryResponse {
    total: number;
    deleted: number;
    failures: Array<{
        [k: string]: unknown;
    }>;
}
export interface ListDocumentsRequest {
    /**
     * Unique ID for a Custom API source, provided upon creation of a Custom API Source
     */
    content_source_id: string;
    body?: {
        /**
         * Paging controls for the result set
         */
        page?: {
            size?: number;
            current?: number;
        };
        filters?: {
            [k: string]: ((string | number) | Array<string | number>) | {
                /**
                     * The start of the range, inclusive
                     */
                from?: string | number;
                /**
                     * The end of the range, exclusive
                     */
                to?: string | number;
            } | {
                /**
                     * The base unit of measurement [mm, cm, m (meters), km, in, ft, yd, or mi (miles)]
                     */
                unit: 'm' | 'mi' | 'in' | 'ft' | 'yd' | 'km' | 'cm' | 'mm';
                /**
                     * The mode of the distribution as a "lat, lon" string, "POINT(lon lat)" WKT POINT string, Geohash string, or [lon, lat] array
                     */
                center: string | [number, number];
                /**
                     * Inclusive lower bound of the range. Is required if to is not provided
                     */
                from?: string | number;
                /**
                     * Exclusive upper bound of the range. Is required if from is not provided
                     */
                to?: string | number;
            } | {
                /**
                     * The base unit of measurement [mm, cm, m (meters), km, in, ft, yd, or mi (miles)]
                     */
                unit: 'm' | 'mi' | 'in' | 'ft' | 'yd' | 'km' | 'cm' | 'mm';
                /**
                     * The mode of the distribution as a "lat, lon" string, "POINT(lon lat)" WKT POINT string, Geohash string, or [lon, lat] array
                     */
                center: string | [number, number];
                /**
                     * A number representing the distance unit
                     */
                distance: number;
            };
        };
        sort?: {
            [k: string]: 'asc' | 'desc';
        } | Array<{
            [k: string]: 'asc' | 'desc';
        }>;
        cursor?: string;
    };
}
export interface ListDocumentsResponse {
    meta: {
        page: {
            current: null | number;
            total_pages: number;
            total_results: number;
            size: number;
        };
        cursor: {
            current: null | string;
            next: null | string;
        };
        warnings: string[];
    };
    results: Array<{
        [k: string]: unknown;
    }>;
}
export interface IndexDocumentsRequest {
    /**
     * Unique ID for a Custom API source, provided upon creation of a Custom API Source
     */
    content_source_id: string;
    documents: Array<{
        [k: string]: unknown;
    }>;
}
export interface IndexDocumentsResponse {
    results: Array<{
        id: string;
        errors: string[];
    }>;
}
export interface DeleteDocumentsRequest {
    /**
     * Unique ID for a Custom API source, provided upon creation of a Custom API Source
     */
    content_source_id: string;
    document_ids: string[];
}
export interface DeleteDocumentsResponse {
    results: Array<{
        id: string;
        success: boolean;
    }>;
}
export interface GetDocumentRequest {
    /**
     * Unique ID for a Custom API source, provided upon creation of a Custom API Source
     */
    content_source_id: string;
    /**
     * Unique ID for a content source document. Provided upon or returned at creation.
     */
    document_id: string;
}
export interface GetDocumentResponse {
    [k: string]: unknown;
}
export interface ListExternalIdentitiesRequest {
    /**
     * Unique ID for a Custom API source, provided upon creation of a Custom API Source
     */
    content_source_id: string;
    page?: {
        /**
         * Which page of results to request
         */
        current?: number;
        /**
         * The number of results to return in a page
         */
        size?: number;
    };
}
export interface ListExternalIdentitiesResponse {
    meta: {
        page: {
            current: number;
            total_pages: number;
            total_results: number;
            size: number;
        };
    };
    results: Array<{
        content_source_id: string;
        external_user_id: string;
        /**
         * List of external user properties
         */
        external_user_properties?: Array<{
            attribute_name: '_elasticsearch_username';
            attribute_value: string;
        }>;
        /**
         * List of permissions
         */
        permissions?: string[];
    }>;
}
export interface CreateExternalIdentityRequest {
    /**
     * Unique ID for a Custom API source, provided upon creation of a Custom API Source
     */
    content_source_id: string;
    /**
     * Definition to create Workplace Search External User Identity
     */
    body: {
        external_user_id: string;
        /**
         * A list of external user properties, where each property is an object with an attribute_name and attribute_value.
         */
        external_user_properties: Array<{
            attribute_name: '_elasticsearch_username';
            attribute_value: string;
        }>;
        /**
         * A list of user permissions.
         */
        permissions: string[];
    };
}
export interface CreateExternalIdentityResponse {
    content_source_id: string;
    external_user_id: string;
    /**
     * List of external user properties
     */
    external_user_properties?: Array<{
        attribute_name: '_elasticsearch_username';
        attribute_value: string;
    }>;
    /**
     * List of permissions
     */
    permissions?: string[];
}
export interface GetExternalIdentityRequest {
    /**
     * Unique ID for a Custom API source, provided upon creation of a Custom API Source
     */
    content_source_id: string;
    /**
     * Unique identifier of an external user, such as username or email address.
     */
    external_user_id: string;
}
export interface GetExternalIdentityResponse {
    content_source_id: string;
    external_user_id: string;
    /**
     * List of external user properties
     */
    external_user_properties?: Array<{
        attribute_name: '_elasticsearch_username';
        attribute_value: string;
    }>;
    /**
     * List of permissions
     */
    permissions?: string[];
}
export interface PutExternalIdentityRequest {
    /**
     * Unique ID for a Custom API source, provided upon creation of a Custom API Source
     */
    content_source_id: string;
    /**
     * Unique identifier of an external user, such as username or email address.
     */
    external_user_id: string;
    /**
     * Definition to update Workplace Search External User Identity
     */
    body: {
        external_user_id: string;
        /**
         * A list of external user properties, where each property is an object with an attribute_name and attribute_value.
         */
        external_user_properties?: Array<{
            attribute_name: '_elasticsearch_username';
            attribute_value: string;
        }> | null;
        /**
         * A list of user permissions.
         */
        permissions?: string[] | null;
    };
}
export interface PutExternalIdentityResponse {
    content_source_id: string;
    external_user_id: string;
    /**
     * List of external user properties
     */
    external_user_properties?: Array<{
        attribute_name: '_elasticsearch_username';
        attribute_value: string;
    }>;
    /**
     * List of permissions
     */
    permissions?: string[];
}
export interface DeleteExternalIdentityRequest {
    /**
     * Unique ID for a Custom API source, provided upon creation of a Custom API Source
     */
    content_source_id: string;
    /**
     * Unique identifier of an external user, such as username or email address.
     */
    external_user_id: string;
}
export type DeleteExternalIdentityResponse = 'ok';
export interface CommandSyncJobsRequest {
    /**
     * Unique ID for a Custom API source, provided upon creation of a Custom API Source
     */
    content_source_id: string;
    /**
     * The type of sync job to consider
     */
    job_type?: unknown[];
    body: ({
        [k: string]: unknown;
    } & {
        force_interrupt?: boolean;
        command?: 'start';
    }) | ({
        [k: string]: unknown;
    } & {
        command?: 'interrupt';
    });
}
export interface CommandSyncJobsResponse {
    results: {
        started: Array<{
            id: string;
            job_type: 'full' | 'incremental' | 'delete' | 'permissions';
            status: 'enqueued' | 'running' | 'suspended' | 'failed' | 'complete';
            created_at: string;
            last_updated_at: string;
        }>;
    } | {
        interrupted: Array<{
            id: string;
            job_type: 'full' | 'incremental' | 'delete' | 'permissions';
            status: 'enqueued' | 'running' | 'suspended' | 'failed' | 'complete';
            created_at: string;
            last_updated_at: string;
        }>;
    };
}
export interface GetSynonymSetRequest {
    /**
     * Synonym Set ID
     */
    synonym_set_id: string;
}
/**
 * A representation of a synonym set
 */
export interface GetSynonymSetResponse {
    /**
     * The id of the synonym set
     */
    id?: string;
    /**
     * The synonym terms for the set
     */
    synonyms?: string[];
    /**
     * The timestamp in ISO format when the set was created
     */
    created_at?: string;
    /**
     * The timestamp in ISO format when the set was last updated
     */
    updated_at?: string;
}
export interface PutSynonymSetRequest {
    /**
     * Synonym Set ID
     */
    synonym_set_id: string;
    body: {
        /**
         * A list of terms for this synonym set
         */
        synonyms: string[];
    };
}
/**
 * A representation of a synonym set
 */
export interface PutSynonymSetResponse {
    /**
     * The id of the synonym set
     */
    id?: string;
    /**
     * The synonym terms for the set
     */
    synonyms?: string[];
    /**
     * The timestamp in ISO format when the set was created
     */
    created_at?: string;
    /**
     * The timestamp in ISO format when the set was last updated
     */
    updated_at?: string;
}
export interface DeleteSynonymSetRequest {
    /**
     * Synonym Set ID
     */
    synonym_set_id: string;
}
export interface DeleteSynonymSetResponse {
    deleted: true;
}
export interface ListSynonymSetsRequest {
    body?: {
        /**
         * Paging controls for the result set
         */
        page?: {
            size?: number;
            current?: number;
        };
        /**
         * Field and direction to sort on
         */
        sort?: {
            created_at?: 'asc' | 'desc';
            updated_at?: 'asc' | 'desc';
        };
        /**
         * Filters to apply to the listing
         */
        filter?: {
            terms?: string | string[];
        };
    };
}
/**
 * A list of synonym sets with metadata
 */
export interface ListSynonymSetsResponse {
    meta?: {
        page?: {
            current: number;
            total_pages: number;
            total_results: number;
            size: number;
        };
        /**
         * Filters used for the listing
         */
        filter?: {
            terms?: string | string[];
        };
        /**
         * Any sorting applied to the result set
         */
        sort?: {
            created_at?: 'asc' | 'desc';
            updated_at?: 'asc' | 'desc';
        };
    };
    /**
     * The synonym list results
     */
    results?: Array<{
        /**
         * The id of the synonym set
         */
        id?: string;
        /**
         * The synonym terms for the set
         */
        synonyms?: string[];
        /**
         * The timestamp in ISO format when the set was created
         */
        created_at?: string;
        /**
         * The timestamp in ISO format when the set was last updated
         */
        updated_at?: string;
    }>;
}
export interface CreateBatchSynonymSetsRequest {
    body: {
        [k: string]: unknown;
    };
}
/**
 * Response from a request to create a batch of synonym sets
 */
export interface CreateBatchSynonymSetsResponse {
    /**
     * True if any of the requested synonym sets have errors
     */
    has_errors?: boolean;
    /**
     * The synonym sets requested to be created
     */
    synonym_sets?: Array<{
        /**
         * The id of the created set, or null if invalid
         */
        id?: string;
        /**
         * The synonym terms for the set
         */
        synonyms?: string[];
        /**
         * An optional array of error messages, if any
         */
        errors?: string[];
    }>;
}
export interface GetTriggersBlocklistRequest {
}
export interface GetTriggersBlocklistResponse {
    blocklist: string[];
}
export interface PutTriggersBlocklistRequest {
}
export interface PutTriggersBlocklistResponse {
    blocklist: string[];
}
export interface GetAutoQueryRefinementDetailsRequest {
    /**
     * Unique ID for a Custom API source, provided upon creation of a Custom API Source
     */
    content_source_id: string;
}
export interface GetAutoQueryRefinementDetailsResponse {
    overrides: Array<{
        field: string;
        enabled: boolean;
        query_expansion_phrases: string[];
        is_person?: boolean;
    }>;
    defaults: Array<{
        field: string;
        query_expansion_phrases: string[];
        is_person: boolean;
    }>;
    results: Array<{
        field: string;
        query_expansion_phrases: string[];
        is_person: boolean;
    }>;
}
export interface GetCurrentUserRequest {
}
export interface GetCurrentUserResponse {
    username: string;
    email: string;
    access_token?: string;
}
export interface CreateAnalyticsEventRequest {
    /**
     * Workplace Search analytics event
     */
    body: {
        [k: string]: unknown;
    };
}
export type CreateAnalyticsEventResponse = Record<string, unknown>;
export interface SearchRequest {
    body: {
        /**
         * A string or number used to find related documents
         */
        query?: string;
        /**
         * Set to false to not automatically refine the query by keywords
         */
        automatic_query_refinement?: boolean;
        /**
         * Paging controls for the result set
         */
        page?: {
            size?: number;
            current?: number;
        };
        /**
         * Restrict the fulltext search to only specific fields
         */
        search_fields?: {
            [k: string]: {
                weight?: number;
            };
        };
        /**
         * Restrict the result fields for each item to the specified fields
         */
        result_fields?: {
            [k: string]: {
                raw?: {
                    size?: number;
                };
                snippet?: {
                    size?: number;
                    fallback?: boolean;
                };
            };
        };
        filters?: {
            [k: string]: ((string | number) | Array<string | number>) | {
                /**
                     * The start of the range, inclusive
                     */
                from?: string | number;
                /**
                     * The end of the range, exclusive
                     */
                to?: string | number;
            } | {
                /**
                     * The base unit of measurement [mm, cm, m (meters), km, in, ft, yd, or mi (miles)]
                     */
                unit: 'm' | 'mi' | 'in' | 'ft' | 'yd' | 'km' | 'cm' | 'mm';
                /**
                     * The mode of the distribution as a "lat, lon" string, "POINT(lon lat)" WKT POINT string, Geohash string, or [lon, lat] array
                     */
                center: string | [number, number];
                /**
                     * Inclusive lower bound of the range. Is required if to is not provided
                     */
                from?: string | number;
                /**
                     * Exclusive upper bound of the range. Is required if from is not provided
                     */
                to?: string | number;
            } | {
                /**
                     * The base unit of measurement [mm, cm, m (meters), km, in, ft, yd, or mi (miles)]
                     */
                unit: 'm' | 'mi' | 'in' | 'ft' | 'yd' | 'km' | 'cm' | 'mm';
                /**
                     * The mode of the distribution as a "lat, lon" string, "POINT(lon lat)" WKT POINT string, Geohash string, or [lon, lat] array
                     */
                center: string | [number, number];
                /**
                     * A number representing the distance unit
                     */
                distance: number;
            };
        };
        sort?: {
            [k: string]: 'asc' | 'desc';
        } | Array<{
            [k: string]: 'asc' | 'desc';
        }>;
        facets?: {
            [k: string]: Array<{
                type: 'range';
                name?: string;
                ranges: Array<{
                    [k: string]: unknown;
                } | {
                    [k: string]: unknown;
                }>;
                center?: string | string | string | [number, number];
                unit?: 'm' | 'mi' | 'in' | 'ft' | 'yd' | 'km' | 'cm' | 'mm';
            } | {
                type: 'value';
                name?: string;
                size?: number;
                /**
                         * Facet field to sort on and sort by count and/or value
                         */
                sort?: {
                    count?: 'asc' | 'desc';
                    value?: 'asc' | 'desc';
                };
            }> | ({
                type: 'range';
                name?: string;
                ranges: Array<{
                    [k: string]: unknown;
                } | {
                    [k: string]: unknown;
                }>;
                center?: string | [number, number];
                unit?: 'm' | 'mi' | 'in' | 'ft' | 'yd' | 'km' | 'cm' | 'mm';
            } | {
                type: 'value';
                name?: string;
                size?: number;
                /**
                       * Facet field to sort on and sort by count and/or value
                       */
                sort?: {
                    count?: 'asc' | 'desc';
                    value?: 'asc' | 'desc';
                };
            });
        };
        boosts?: {
            [k: string]: Array<({
                [k: string]: unknown;
            } | {
                [k: string]: unknown;
            }) & ({
                [k: string]: unknown;
            } | {
                function: 'linear' | 'exponential' | 'logarithmic';
                [k: string]: unknown;
            }) & ({
                [k: string]: unknown;
            } | {
                [k: string]: unknown;
            })> | (({
                [k: string]: unknown;
            } | {
                [k: string]: unknown;
            }) & ({
                [k: string]: unknown;
            } | {
                function: 'linear' | 'exponential' | 'logarithmic';
                [k: string]: unknown;
            }) & {
                [k: string]: unknown;
            });
        };
        /**
         * Optional parameter to search standard, remote only, or all available sources
         */
        source_type?: 'standard' | 'remote' | 'all';
        /**
         * Optional timeout in ms for searching remote sources
         */
        timeout?: number;
        /**
         * Optional list of content source ids to only return results from
         */
        content_sources?: string[];
    };
}
export interface SearchResponse {
    meta: {
        page: {
            current: number;
            total_pages: number;
            total_results: number;
            size: number;
        };
        /**
         * Internal request ID for this query instance
         */
        request_id: string;
        /**
         * Any warnings that the query generated
         */
        warnings?: string[];
        /**
         * Metadata regarding automatic refinements made to the query
         */
        query_refinements?: {
            submitted_query: string;
            decorated_query_html: string;
            refinements: Array<{
                /**
                 * The term(s) used for the trigger
                 */
                term?: string;
                /**
                 * The start and end position the term(s) exist in the original query
                 */
                position?: number[];
                /**
                 * The type of trigger created
                 */
                trigger_type?: string;
                /**
                 * The type of filter created from this trigger
                 */
                trigger_filter_type?: string;
                filter?: {
                    [k: string]: ((string | number) | Array<string | number>) | {
                        /**
                             * The start of the range, inclusive
                             */
                        from?: string | number;
                        /**
                             * The end of the range, exclusive
                             */
                        to?: string | number;
                    } | {
                        /**
                             * The base unit of measurement [mm, cm, m (meters), km, in, ft, yd, or mi (miles)]
                             */
                        unit: 'm' | 'mi' | 'in' | 'ft' | 'yd' | 'km' | 'cm' | 'mm';
                        /**
                             * The mode of the distribution as a "lat, lon" string, "POINT(lon lat)" WKT POINT string, Geohash string, or [lon, lat] array
                             */
                        center: string | string | string | [number, number];
                        /**
                             * Inclusive lower bound of the range. Is required if to is not provided
                             */
                        from?: string | number;
                        /**
                             * Exclusive upper bound of the range. Is required if from is not provided
                             */
                        to?: string | number;
                    } | {
                        /**
                             * The base unit of measurement [mm, cm, m (meters), km, in, ft, yd, or mi (miles)]
                             */
                        unit: 'm' | 'mi' | 'in' | 'ft' | 'yd' | 'km' | 'cm' | 'mm';
                        /**
                             * The mode of the distribution as a "lat, lon" string, "POINT(lon lat)" WKT POINT string, Geohash string, or [lon, lat] array
                             */
                        center: string | string | string | [number, number];
                        /**
                             * A number representing the distance unit
                             */
                        distance: number;
                    };
                };
            }>;
        };
        /**
         * content sources used in the search query
         */
        content_sources?: {
            /**
             * a content source used in the search query
             */
            [k: string]: {
                name?: string;
                service_type?: string;
            };
        };
        /**
         * Remote source query timeout value used
         */
        timeout?: number;
    };
    results: Array<{
        [k: string]: unknown;
    }>;
    /**
     * facets returned from the query
     */
    facets?: {
        type?: 'value' | 'range';
        /**
             * array of facets and counts for this field
             */
        data?: Array<{
            value?: string | number;
            count: number;
            key?: string;
            from?: string | number;
            to?: string | number;
        }>;
    } | Array<{
        type?: 'value' | 'range';
        /**
             * array of facets and counts for this field
             */
        data?: Array<{
            value?: string | number;
            count: number;
            key?: string;
            from?: string | number;
            to?: string | number;
        }>;
    }>;
}
