Skip to content

Commit

Permalink
[Connector APIs] Update existing endpoints for 8.15 (#2675)
Browse files Browse the repository at this point in the history
  • Loading branch information
jedrazb authored and l-trotta committed Jul 26, 2024
1 parent 6ca2397 commit 8ef6ecc
Show file tree
Hide file tree
Showing 17 changed files with 582 additions and 880 deletions.
185 changes: 86 additions & 99 deletions output/openapi/elasticsearch-openapi.json

Large diffs are not rendered by default.

266 changes: 80 additions & 186 deletions output/openapi/elasticsearch-serverless-openapi.json

Large diffs are not rendered by default.

538 changes: 165 additions & 373 deletions output/schema/schema-serverless.json

Large diffs are not rendered by default.

336 changes: 180 additions & 156 deletions output/schema/schema.json

Large diffs are not rendered by default.

18 changes: 6 additions & 12 deletions output/schema/validation-errors.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

49 changes: 27 additions & 22 deletions output/typescript/types.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 12 additions & 11 deletions specification/connector/_types/Connector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import { UserDefinedValue } from '@spec_utils/UserDefinedValue'

interface SelectOption {
label: string
value: string
value: ScalarValue
}

interface Dependency {
Expand Down Expand Up @@ -67,12 +67,12 @@ export interface GreaterThanValidation {

export interface ListTypeValidation {
type: 'list_type'
constraint: ScalarValue[]
constraint: string
}

export interface IncludedInValidation {
type: 'included_in'
constraint: string
constraint: ScalarValue[]
}

export interface RegexValidation {
Expand All @@ -91,11 +91,11 @@ export interface ConnectorConfigProperties {
placeholder?: string
required: boolean
sensitive: boolean
tooltip?: string
tooltip?: string | null
type: ConnectorFieldType
ui_restrictions: string[]
validations: Validation[]
value: ScalarValue
value: UserDefinedValue
}

export type ConnectorConfiguration = Dictionary<
Expand Down Expand Up @@ -208,7 +208,7 @@ export interface FilteringRules {

export interface FilteringConfig {
active: FilteringRules
domain: string
domain?: string
draft: FilteringRules
}

Expand All @@ -223,9 +223,8 @@ interface SyncRulesFeature {

export interface ConnectorFeatures {
document_level_security?: FeatureEnabled
filtering_advanced_config?: boolean
filtering_rules?: boolean
incremental_sync?: FeatureEnabled
native_connector_api_keys?: FeatureEnabled
sync_rules?: SyncRulesFeature
}

Expand All @@ -237,14 +236,15 @@ export interface SchedulingConfiguration {

export interface Connector {
api_key_id?: string
api_key_secret_id?: string
configuration: ConnectorConfiguration
custom_scheduling: ConnectorCustomScheduling
description?: string
error?: string
error?: string | null
features?: ConnectorFeatures
filtering: FilteringConfig[]
id?: Id
index_name?: IndexName
index_name?: IndexName | null
is_native: boolean
language?: string
last_access_control_sync_error?: string
Expand All @@ -261,7 +261,8 @@ export interface Connector {
name?: string
pipeline?: IngestPipelineParams
scheduling: SchedulingConfiguration
service_type: string
service_type?: string
status: ConnectorStatus
sync_cursor?: UserDefinedValue
sync_now: boolean
}
1 change: 1 addition & 0 deletions specification/connector/_types/SyncJob.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ interface SyncJobConnectorReference {
language?: string
pipeline?: IngestPipelineParams
service_type: string
sync_cursor?: UserDefinedValue
}

export enum SyncJobType {
Expand Down
5 changes: 4 additions & 1 deletion specification/connector/delete/ConnectorDeleteRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ export interface Request extends RequestBase {
connector_id: Id
}
query_parameters: {
delete_sync_jobs: boolean
/**
* A flag indicating if associated sync jobs should be also removed. Defaults to false.
*/
delete_sync_jobs?: boolean
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@
*/
import { RequestBase } from '@_types/Base'
import { Id } from '@_types/common'
import { SyncStatus } from '../_types/Connector'
import { long } from '@_types/Numeric'
import { WithNullValue } from '@spec_utils/utils'
import { DateTime } from '@_types/Time'
import { UserDefinedValue } from '@spec_utils/UserDefinedValue'
import { SyncStatus } from '../_types/Connector'

/**
* Updates last sync stats in the connector document
* @rest_spec_name connector.last_sync
* @availability stack since=8.12.0 stability=experimental
* @availability serverless stability=experimental visibility=public
* @availability serverless stability=experimental visibility=private
* @doc_id connector-last-sync
*/
export interface Request extends RequestBase {
Expand All @@ -41,16 +41,17 @@ export interface Request extends RequestBase {
* Connector last sync stats
*/
body: {
last_access_control_sync_error?: WithNullValue<string>
last_access_control_sync_error?: string
last_access_control_sync_scheduled_at?: DateTime
last_access_control_sync_status?: SyncStatus
last_deleted_document_count?: long
last_incremental_sync_scheduled_at?: DateTime
last_indexed_document_count?: long
last_seen?: WithNullValue<DateTime>
last_sync_error?: WithNullValue<string>
last_seen?: DateTime
last_sync_error?: string
last_sync_scheduled_at?: DateTime
last_sync_status?: SyncStatus
last_synced?: DateTime
sync_cursor?: UserDefinedValue
}
}
5 changes: 2 additions & 3 deletions specification/connector/post/ConnectorPostRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
*/
import { RequestBase } from '@_types/Base'
import { IndexName } from '@_types/common'
import { WithNullValue } from '@spec_utils/utils'

/**
* Creates a connector.
Expand All @@ -32,9 +31,9 @@ export interface Request extends RequestBase {
* The connector document to be created
*/
/** @codegen_name connector */
body: {
body?: {
description?: string
index_name: WithNullValue<IndexName>
index_name?: IndexName
is_native?: boolean
language?: string
name?: string
Expand Down
Loading

0 comments on commit 8ef6ecc

Please sign in to comment.