From 06c6fc01df9373c2d1d8b892854cc3eca394f99c Mon Sep 17 00:00:00 2001 From: mattnowzari Date: Fri, 17 Jan 2025 10:47:09 -0500 Subject: [PATCH 1/3] Adding new URL params to Connector API endpoints + new type to Connector types --- output/schema/schema.json | 58 +++++++++++++++++-- output/typescript/types.ts | 4 ++ .../_json_spec/connector.delete.json | 5 ++ specification/_json_spec/connector.get.json | 7 +++ specification/_json_spec/connector.list.json | 5 ++ specification/connector/_types/Connector.ts | 1 + .../delete/ConnectorDeleteRequest.ts | 4 ++ .../connector/get/ConnectorGetRequest.ts | 6 ++ .../connector/list/ConnectorListRequest.ts | 4 ++ 9 files changed, 89 insertions(+), 5 deletions(-) diff --git a/output/schema/schema.json b/output/schema/schema.json index 27d034d1ea..d0a1d1ab02 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -114325,6 +114325,17 @@ } } }, + { + "name": "deleted", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + }, { "name": "description", "required": false, @@ -114635,7 +114646,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L252-L283" + "specLocation": "connector/_types/Connector.ts#L252-L284" }, { "kind": "interface", @@ -116448,9 +116459,21 @@ "namespace": "_builtins" } } + }, + { + "description": "A flag indicating if the connector should be hard deleted. Defaults to false.", + "name": "hard", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } } ], - "specLocation": "connector/delete/ConnectorDeleteRequest.ts#L22-L53" + "specLocation": "connector/delete/ConnectorDeleteRequest.ts#L22-L57" }, { "kind": "response", @@ -116503,8 +116526,21 @@ } } ], - "query": [], - "specLocation": "connector/get/ConnectorGetRequest.ts#L22-L44" + "query": [ + { + "description": "A flag to indicate if the desired connector should be fetched even if it was soft-deleted", + "name": "include_deleted", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + } + ], + "specLocation": "connector/get/ConnectorGetRequest.ts#L22-L50" }, { "kind": "response", @@ -116795,6 +116831,18 @@ } } }, + { + "description": "A flag to indicate if the desired connector should be fetched even if it was solf-deleted\"", + "name": "include_deleted", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + }, { "description": "A wildcard query string that filters connectors with matching name, description or index name", "name": "query", @@ -116808,7 +116856,7 @@ } } ], - "specLocation": "connector/list/ConnectorListRequest.ts#L23-L65" + "specLocation": "connector/list/ConnectorListRequest.ts#L23-L69" }, { "kind": "response", diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 9e61a16e60..e37b92812f 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -9714,6 +9714,7 @@ export interface ConnectorConnector { api_key_secret_id?: string configuration: ConnectorConnectorConfiguration custom_scheduling: ConnectorConnectorCustomScheduling + deleted?: boolean description?: string error?: string | null features?: ConnectorConnectorFeatures @@ -9951,12 +9952,14 @@ export interface ConnectorCheckInResponse { export interface ConnectorDeleteRequest extends RequestBase { connector_id: Id delete_sync_jobs?: boolean + hard?: boolean } export type ConnectorDeleteResponse = AcknowledgedResponseBase export interface ConnectorGetRequest extends RequestBase { connector_id: Id + include_deleted?: boolean } export type ConnectorGetResponse = ConnectorConnector @@ -9989,6 +9992,7 @@ export interface ConnectorListRequest extends RequestBase { index_name?: Indices connector_name?: Names service_type?: Names + include_deleted?: boolean query?: string } diff --git a/specification/_json_spec/connector.delete.json b/specification/_json_spec/connector.delete.json index 4b542d15da..595e6ce775 100644 --- a/specification/_json_spec/connector.delete.json +++ b/specification/_json_spec/connector.delete.json @@ -28,6 +28,11 @@ "type": "boolean", "default": false, "description": "Determines whether associated sync jobs are also deleted." + }, + "hard": { + "type": "boolean", + "default": false, + "description": "A flag indicating if this should be a hard delete. Defaults to false." } } } diff --git a/specification/_json_spec/connector.get.json b/specification/_json_spec/connector.get.json index 372267f8d6..64b7ec1ef0 100644 --- a/specification/_json_spec/connector.get.json +++ b/specification/_json_spec/connector.get.json @@ -22,6 +22,13 @@ } } ] + }, + "params": { + "include_deleted": { + "type": "boolean", + "default": false, + "description": "A flag to indicate if the desired connector should be fetched even if it was soft-deleted" + } } } } diff --git a/specification/_json_spec/connector.list.json b/specification/_json_spec/connector.list.json index 26670cb8e7..3d97ce5d85 100644 --- a/specification/_json_spec/connector.list.json +++ b/specification/_json_spec/connector.list.json @@ -43,6 +43,11 @@ "query": { "type": "string", "description": "A search string for querying connectors, filtering results by matching against connector names, descriptions, and index names" + }, + "include_deleted": { + "type": "boolean", + "default": false, + "description": "A flag that indicates whether a soft-deleted connectors will be fetched" } } } diff --git a/specification/connector/_types/Connector.ts b/specification/connector/_types/Connector.ts index 88df329997..43feebfb04 100644 --- a/specification/connector/_types/Connector.ts +++ b/specification/connector/_types/Connector.ts @@ -254,6 +254,7 @@ export interface Connector { api_key_secret_id?: string configuration: ConnectorConfiguration custom_scheduling: ConnectorCustomScheduling + deleted?: boolean description?: string error?: string | null features?: ConnectorFeatures diff --git a/specification/connector/delete/ConnectorDeleteRequest.ts b/specification/connector/delete/ConnectorDeleteRequest.ts index dde7258838..b9068bd52c 100644 --- a/specification/connector/delete/ConnectorDeleteRequest.ts +++ b/specification/connector/delete/ConnectorDeleteRequest.ts @@ -49,5 +49,9 @@ export interface Request extends RequestBase { * A flag indicating if associated sync jobs should be also removed. Defaults to false. */ delete_sync_jobs?: boolean + /** + * A flag indicating if the connector should be hard deleted. Defaults to false. + */ + hard?: boolean } } diff --git a/specification/connector/get/ConnectorGetRequest.ts b/specification/connector/get/ConnectorGetRequest.ts index 1a529a6d4a..e4dbbbae46 100644 --- a/specification/connector/get/ConnectorGetRequest.ts +++ b/specification/connector/get/ConnectorGetRequest.ts @@ -41,4 +41,10 @@ export interface Request extends RequestBase { */ connector_id: Id } + query_parameters: { + /** + * A flag to indicate if the desired connector should be fetched even if it was soft-deleted + */ + include_deleted?: boolean + } } diff --git a/specification/connector/list/ConnectorListRequest.ts b/specification/connector/list/ConnectorListRequest.ts index 0e2b300d4f..762bf969fc 100644 --- a/specification/connector/list/ConnectorListRequest.ts +++ b/specification/connector/list/ConnectorListRequest.ts @@ -57,6 +57,10 @@ export interface Request extends RequestBase { * A comma-separated list of connector service types to fetch connector documents for */ service_type?: Names + /** + * A flag to indicate if the desired connector should be fetched even if it was solf-deleted" + */ + include_deleted?: boolean /** * A wildcard query string that filters connectors with matching name, description or index name */ From e2959d8f7a0da937d5509d78bcdab4b779f24975 Mon Sep 17 00:00:00 2001 From: mattnowzari Date: Fri, 17 Jan 2025 12:08:17 -0500 Subject: [PATCH 2/3] Fixed formatting issue --- specification/_json_spec/connector.delete.json | 6 +++--- specification/_json_spec/connector.get.json | 6 +++--- specification/_json_spec/connector.list.json | 6 +++--- specification/connector/list/ConnectorListRequest.ts | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/specification/_json_spec/connector.delete.json b/specification/_json_spec/connector.delete.json index 595e6ce775..4fdbd5f511 100644 --- a/specification/_json_spec/connector.delete.json +++ b/specification/_json_spec/connector.delete.json @@ -30,9 +30,9 @@ "description": "Determines whether associated sync jobs are also deleted." }, "hard": { - "type": "boolean", - "default": false, - "description": "A flag indicating if this should be a hard delete. Defaults to false." + "type": "boolean", + "default": false, + "description": "A flag indicating if this should be a hard delete. Defaults to false." } } } diff --git a/specification/_json_spec/connector.get.json b/specification/_json_spec/connector.get.json index 64b7ec1ef0..3678290745 100644 --- a/specification/_json_spec/connector.get.json +++ b/specification/_json_spec/connector.get.json @@ -25,9 +25,9 @@ }, "params": { "include_deleted": { - "type": "boolean", - "default": false, - "description": "A flag to indicate if the desired connector should be fetched even if it was soft-deleted" + "type": "boolean", + "default": false, + "description": "A flag to indicate if the desired connector should be fetched even if it was soft-deleted" } } } diff --git a/specification/_json_spec/connector.list.json b/specification/_json_spec/connector.list.json index 3d97ce5d85..d8ebeb57a4 100644 --- a/specification/_json_spec/connector.list.json +++ b/specification/_json_spec/connector.list.json @@ -45,9 +45,9 @@ "description": "A search string for querying connectors, filtering results by matching against connector names, descriptions, and index names" }, "include_deleted": { - "type": "boolean", - "default": false, - "description": "A flag that indicates whether a soft-deleted connectors will be fetched" + "type": "boolean", + "default": false, + "description": "A flag that indicates whether a soft-deleted connectors will be fetched" } } } diff --git a/specification/connector/list/ConnectorListRequest.ts b/specification/connector/list/ConnectorListRequest.ts index 762bf969fc..a123263bc0 100644 --- a/specification/connector/list/ConnectorListRequest.ts +++ b/specification/connector/list/ConnectorListRequest.ts @@ -58,7 +58,7 @@ export interface Request extends RequestBase { */ service_type?: Names /** - * A flag to indicate if the desired connector should be fetched even if it was solf-deleted" + * A flag to indicate if the desired connector should be fetched even if it was solf-deleted" */ include_deleted?: boolean /** From 5ea17fb83b03f8bde729b8fff2481ec11658fcb9 Mon Sep 17 00:00:00 2001 From: mattnowzari Date: Tue, 21 Jan 2025 08:31:57 -0500 Subject: [PATCH 3/3] Added @server_default flags, changed hard flag to required, and some typo fixes --- output/schema/schema.json | 17 ++++++++++------- output/typescript/types.ts | 2 +- specification/connector/_types/Connector.ts | 2 +- .../connector/delete/ConnectorDeleteRequest.ts | 3 ++- .../connector/get/ConnectorGetRequest.ts | 3 ++- .../connector/list/ConnectorListRequest.ts | 3 ++- 6 files changed, 18 insertions(+), 12 deletions(-) diff --git a/output/schema/schema.json b/output/schema/schema.json index bba62e7da9..6bbac968fe 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -114381,7 +114381,7 @@ }, { "name": "deleted", - "required": false, + "required": true, "type": { "kind": "instance_of", "type": { @@ -116515,9 +116515,10 @@ } }, { - "description": "A flag indicating if the connector should be hard deleted. Defaults to false.", + "description": "A flag indicating if the connector should be hard deleted.", "name": "hard", "required": false, + "serverDefault": false, "type": { "kind": "instance_of", "type": { @@ -116527,7 +116528,7 @@ } } ], - "specLocation": "connector/delete/ConnectorDeleteRequest.ts#L22-L57" + "specLocation": "connector/delete/ConnectorDeleteRequest.ts#L22-L58" }, { "kind": "response", @@ -116582,9 +116583,10 @@ ], "query": [ { - "description": "A flag to indicate if the desired connector should be fetched even if it was soft-deleted", + "description": "A flag to indicate if the desired connector should be fetched, even if it was soft-deleted.", "name": "include_deleted", "required": false, + "serverDefault": false, "type": { "kind": "instance_of", "type": { @@ -116594,7 +116596,7 @@ } } ], - "specLocation": "connector/get/ConnectorGetRequest.ts#L22-L50" + "specLocation": "connector/get/ConnectorGetRequest.ts#L22-L51" }, { "kind": "response", @@ -116886,9 +116888,10 @@ } }, { - "description": "A flag to indicate if the desired connector should be fetched even if it was solf-deleted\"", + "description": "A flag to indicate if the desired connector should be fetched, even if it was soft-deleted.", "name": "include_deleted", "required": false, + "serverDefault": false, "type": { "kind": "instance_of", "type": { @@ -116910,7 +116913,7 @@ } } ], - "specLocation": "connector/list/ConnectorListRequest.ts#L23-L69" + "specLocation": "connector/list/ConnectorListRequest.ts#L23-L70" }, { "kind": "response", diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 50e4ad0682..6970d5ed55 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -9721,7 +9721,7 @@ export interface ConnectorConnector { api_key_secret_id?: string configuration: ConnectorConnectorConfiguration custom_scheduling: ConnectorConnectorCustomScheduling - deleted?: boolean + deleted: boolean description?: string error?: string | null features?: ConnectorConnectorFeatures diff --git a/specification/connector/_types/Connector.ts b/specification/connector/_types/Connector.ts index 43feebfb04..570c8a213f 100644 --- a/specification/connector/_types/Connector.ts +++ b/specification/connector/_types/Connector.ts @@ -254,7 +254,7 @@ export interface Connector { api_key_secret_id?: string configuration: ConnectorConfiguration custom_scheduling: ConnectorCustomScheduling - deleted?: boolean + deleted: boolean description?: string error?: string | null features?: ConnectorFeatures diff --git a/specification/connector/delete/ConnectorDeleteRequest.ts b/specification/connector/delete/ConnectorDeleteRequest.ts index b9068bd52c..3943378a02 100644 --- a/specification/connector/delete/ConnectorDeleteRequest.ts +++ b/specification/connector/delete/ConnectorDeleteRequest.ts @@ -50,7 +50,8 @@ export interface Request extends RequestBase { */ delete_sync_jobs?: boolean /** - * A flag indicating if the connector should be hard deleted. Defaults to false. + * A flag indicating if the connector should be hard deleted. + * @server_default false */ hard?: boolean } diff --git a/specification/connector/get/ConnectorGetRequest.ts b/specification/connector/get/ConnectorGetRequest.ts index e4dbbbae46..31d1f31ec4 100644 --- a/specification/connector/get/ConnectorGetRequest.ts +++ b/specification/connector/get/ConnectorGetRequest.ts @@ -43,7 +43,8 @@ export interface Request extends RequestBase { } query_parameters: { /** - * A flag to indicate if the desired connector should be fetched even if it was soft-deleted + * A flag to indicate if the desired connector should be fetched, even if it was soft-deleted. + * @server_default false */ include_deleted?: boolean } diff --git a/specification/connector/list/ConnectorListRequest.ts b/specification/connector/list/ConnectorListRequest.ts index a123263bc0..572f2ea338 100644 --- a/specification/connector/list/ConnectorListRequest.ts +++ b/specification/connector/list/ConnectorListRequest.ts @@ -58,7 +58,8 @@ export interface Request extends RequestBase { */ service_type?: Names /** - * A flag to indicate if the desired connector should be fetched even if it was solf-deleted" + * A flag to indicate if the desired connector should be fetched, even if it was soft-deleted. + * @server_default false */ include_deleted?: boolean /**