|
| 1 | +/* |
| 2 | + * Licensed to Elasticsearch B.V. under one or more contributor |
| 3 | + * license agreements. See the NOTICE file distributed with |
| 4 | + * this work for additional information regarding copyright |
| 5 | + * ownership. Elasticsearch B.V. licenses this file to you under |
| 6 | + * the Apache License, Version 2.0 (the "License"); you may |
| 7 | + * not use this file except in compliance with the License. |
| 8 | + * You may obtain a copy of the License at |
| 9 | + * |
| 10 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | + * |
| 12 | + * Unless required by applicable law or agreed to in writing, |
| 13 | + * software distributed under the License is distributed on an |
| 14 | + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 15 | + * KIND, either express or implied. See the License for the |
| 16 | + * specific language governing permissions and limitations |
| 17 | + * under the License. |
| 18 | + */ |
| 19 | +import { Dictionary } from '@spec_utils/Dictionary' |
| 20 | +import { UserDefinedValue } from '@spec_utils/UserDefinedValue' |
| 21 | +import { RequestBase } from '@_types/Base' |
| 22 | +import { Id } from '@_types/common' |
| 23 | +import { integer } from '@_types/Numeric' |
| 24 | + |
| 25 | +/** |
| 26 | + * Set the connector sync job stats. |
| 27 | + * Stats include: `deleted_document_count`, `indexed_document_count`, `indexed_document_volume`, and `total_document_count`. |
| 28 | + * You can also update `last_seen`. |
| 29 | + * This API is mainly used by the connector service for updating sync job information. |
| 30 | + * |
| 31 | + * To sync data using self-managed connectors, you need to deploy the Elastic connector service on your own infrastructure. |
| 32 | + * This service runs automatically on Elastic Cloud for Elastic managed connectors. |
| 33 | + * @rest_spec_name connector.sync_job_update_stats |
| 34 | + * @availability stack stability=experimental visibility=public |
| 35 | + * @doc_id connector-sync-job-stats |
| 36 | + */ |
| 37 | +export interface Request extends RequestBase { |
| 38 | + /** |
| 39 | + * The sync job to be created |
| 40 | + */ |
| 41 | + path_parts: { |
| 42 | + /** |
| 43 | + * The unique identifier of the connector sync job. |
| 44 | + */ |
| 45 | + connector_sync_job_id: Id |
| 46 | + } |
| 47 | + body: { |
| 48 | + /** |
| 49 | + * The number of documents the sync job deleted. |
| 50 | + */ |
| 51 | + deleted_document_count: integer |
| 52 | + /** |
| 53 | + * The number of documents the sync job indexed. |
| 54 | + */ |
| 55 | + indexed_document_count: integer |
| 56 | + /** |
| 57 | + * The total size of the data (in MiB) the sync job indexed. |
| 58 | + */ |
| 59 | + indexed_document_volume: integer |
| 60 | + /** |
| 61 | + * The timestamp to use in the `last_seen` property for the connector sync job. |
| 62 | + */ |
| 63 | + last_seen?: integer |
| 64 | + /** |
| 65 | + * The connector-specific metadata. |
| 66 | + */ |
| 67 | + metadata?: Dictionary<string, UserDefinedValue> |
| 68 | + /** |
| 69 | + * The total number of documents in the target index after the sync job finished. |
| 70 | + */ |
| 71 | + total_document_count?: integer |
| 72 | + } |
| 73 | +} |
0 commit comments