diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index b90fa3ebee..7389a8e330 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -2495,10 +2495,10 @@ "$ref": "#/components/schemas/_types:Id" }, "job_type": { - "$ref": "#/components/schemas/_types:Name" + "$ref": "#/components/schemas/connector._types:SyncJobType" }, "trigger_method": { - "$ref": "#/components/schemas/_types:Name" + "$ref": "#/components/schemas/connector._types:SyncJobTriggerMethod" } }, "required": [ @@ -50222,7 +50222,7 @@ "type": "number" }, "trigger_method": { - "$ref": "#/components/schemas/connector._types:TriggerMethod" + "$ref": "#/components/schemas/connector._types:SyncJobTriggerMethod" }, "worker_hostname": { "type": "string" @@ -50283,7 +50283,7 @@ "access_control" ] }, - "connector._types:TriggerMethod": { + "connector._types:SyncJobTriggerMethod": { "type": "string", "enum": [ "on_demand", diff --git a/output/schema/schema.json b/output/schema/schema.json index 1a3303620f..530c7876c7 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -106650,7 +106650,7 @@ "type": { "kind": "instance_of", "type": { - "name": "TriggerMethod", + "name": "SyncJobTriggerMethod", "namespace": "connector._types" } } @@ -107628,6 +107628,22 @@ ], "specLocation": "connector/_types/SyncJob.ts#L31-L39" }, + { + "kind": "enum", + "members": [ + { + "name": "on_demand" + }, + { + "name": "scheduled" + } + ], + "name": { + "name": "SyncJobTriggerMethod", + "namespace": "connector._types" + }, + "specLocation": "connector/_types/SyncJob.ts#L47-L50" + }, { "kind": "enum", "members": [ @@ -107710,22 +107726,6 @@ }, "specLocation": "connector/_types/Connector.ts#L137-L145" }, - { - "kind": "enum", - "members": [ - { - "name": "on_demand" - }, - { - "name": "scheduled" - } - ], - "name": { - "name": "TriggerMethod", - "namespace": "connector._types" - }, - "specLocation": "connector/_types/SyncJob.ts#L47-L50" - }, { "kind": "type_alias", "name": { @@ -108866,8 +108866,8 @@ "type": { "kind": "instance_of", "type": { - "name": "Name", - "namespace": "_types" + "name": "SyncJobType", + "namespace": "connector._types" } } }, @@ -108877,8 +108877,8 @@ "type": { "kind": "instance_of", "type": { - "name": "Name", - "namespace": "_types" + "name": "SyncJobTriggerMethod", + "namespace": "connector._types" } } } @@ -108898,7 +108898,7 @@ }, "path": [], "query": [], - "specLocation": "connector/sync_job_post/SyncJobPostRequest.ts#L22-L42" + "specLocation": "connector/sync_job_post/SyncJobPostRequest.ts#L23-L43" }, { "body": { diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 8eb824e158..6b0007c957 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -9157,7 +9157,7 @@ export interface ConnectorConnectorSyncJob { started_at?: DateTime status: ConnectorSyncStatus total_document_count: long - trigger_method: ConnectorTriggerMethod + trigger_method: ConnectorSyncJobTriggerMethod worker_hostname?: string } @@ -9286,6 +9286,8 @@ export interface ConnectorSyncJobConnectorReference { service_type: string } +export type ConnectorSyncJobTriggerMethod = 'on_demand' | 'scheduled' + export type ConnectorSyncJobType = 'full' | 'incremental' | 'access_control' export interface ConnectorSyncRulesFeature { @@ -9295,8 +9297,6 @@ export interface ConnectorSyncRulesFeature { export type ConnectorSyncStatus = 'canceling' | 'canceled' | 'completed' | 'error' | 'in_progress' | 'pending' | 'suspended' -export type ConnectorTriggerMethod = 'on_demand' | 'scheduled' - export type ConnectorValidation = ConnectorLessThanValidation | ConnectorGreaterThanValidation | ConnectorListTypeValidation | ConnectorIncludedInValidation | ConnectorRegexValidation export interface ConnectorCheckInRequest extends RequestBase { @@ -9421,8 +9421,8 @@ export interface ConnectorSyncJobListResponse { export interface ConnectorSyncJobPostRequest extends RequestBase { body?: { id: Id - job_type?: Name - trigger_method?: Name + job_type?: ConnectorSyncJobType + trigger_method?: ConnectorSyncJobTriggerMethod } } diff --git a/specification/connector/_types/SyncJob.ts b/specification/connector/_types/SyncJob.ts index 525536a9e7..c8ac3deed2 100644 --- a/specification/connector/_types/SyncJob.ts +++ b/specification/connector/_types/SyncJob.ts @@ -38,13 +38,13 @@ interface SyncJobConnectorReference { service_type: string } -enum SyncJobType { +export enum SyncJobType { full, incremental, access_control } -enum TriggerMethod { +export enum SyncJobTriggerMethod { on_demand, scheduled } @@ -66,6 +66,6 @@ export interface ConnectorSyncJob { started_at?: DateTime status: SyncStatus total_document_count: long - trigger_method: TriggerMethod + trigger_method: SyncJobTriggerMethod worker_hostname?: string } diff --git a/specification/connector/sync_job_post/SyncJobPostRequest.ts b/specification/connector/sync_job_post/SyncJobPostRequest.ts index 5c22d62c34..cccc2e59a8 100644 --- a/specification/connector/sync_job_post/SyncJobPostRequest.ts +++ b/specification/connector/sync_job_post/SyncJobPostRequest.ts @@ -17,7 +17,8 @@ * under the License. */ import { RequestBase } from '@_types/Base' -import { Id, Name } from '@_types/common' +import { Id } from '@_types/common' +import { SyncJobType, SyncJobTriggerMethod } from '../_types/SyncJob' /** * Creates a connector sync job. @@ -36,7 +37,7 @@ export interface Request extends RequestBase { * The id of the associated connector */ id: Id - job_type?: Name - trigger_method?: Name + job_type?: SyncJobType + trigger_method?: SyncJobTriggerMethod } }