Skip to content

Adding new URL params to Connector API endpoints + new type to Connector types #3549

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jan 22, 2025

Conversation

mattnowzari
Copy link
Contributor

Adding new URL param include_deleted to

  • connector.get
  • connector.list

Also adding new URL param hard to

  • connector.delete

And finally, a new boolean value deleted to theconnector type

Link to issue thread can be found here!

This comment was marked as outdated.

@mattnowzari mattnowzari added the skip-backport This pull request should not be backported label Jan 17, 2025

This comment was marked as outdated.

1 similar comment
Copy link
Contributor

Following you can find the validation results for the APIs you have changed.

API Status Request Response
connector.check_in 🟢 3/3 3/3
connector.delete 🟢 29/29 29/29
connector.get 🟢 64/64 64/64
connector.last_sync 🟢 7/7 7/7
connector.list 🟢 31/31 31/31
connector.post 🟢 7/7 7/7
connector.put 🟢 20/20 20/20
connector.secret_delete 🟠 Missing type Missing type
connector.secret_get 🟠 Missing type Missing type
connector.secret_post 🟠 Missing type Missing type
connector.secret_put 🟠 Missing type Missing type
connector.sync_job_cancel 🟢 3/3 3/3
connector.sync_job_check_in 🟢 3/3 3/3
connector.sync_job_claim 🟢 3/3 3/3
connector.sync_job_delete 🟢 4/4 4/4
connector.sync_job_error 🟢 1/1 1/1
connector.sync_job_get 🟢 22/22 22/22
connector.sync_job_list 🟢 12/12 12/12
connector.sync_job_post 🟢 50/50 50/50
connector.sync_job_update_stats 🟢 5/5 5/5
connector.update_active_filtering 🟢 1/1 1/1
connector.update_api_key_id 🟢 4/4 4/4
connector.update_configuration 🟢 8/8 8/8
connector.update_error 🟢 4/4 4/4
connector.update_features 🟢 4/4 4/4
connector.update_filtering_validation 🟢 3/3 3/3
connector.update_filtering 🟢 12/12 12/12
connector.update_index_name 🟢 5/5 5/5
connector.update_name 🟢 4/4 4/4
connector.update_native 🟢 4/4 4/4
connector.update_pipeline 🟢 3/3 3/3
connector.update_scheduling 🟢 3/3 3/3
connector.update_service_type 🟢 2/2 2/2
connector.update_status 🟢 3/3 3/3

You can validate these APIs yourself by using the make validate target.

@mattnowzari mattnowzari marked this pull request as ready for review January 17, 2025 17:12
@mattnowzari mattnowzari requested a review from a team as a code owner January 17, 2025 17:12
@mattnowzari mattnowzari requested a review from l-trotta January 17, 2025 17:14
Copy link
Member

@pquentin pquentin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the contribution! Only small details left to fix.

@@ -254,6 +254,7 @@ export interface Connector {
api_key_secret_id?: string
configuration: ConnectorConfiguration
custom_scheduling: ConnectorCustomScheduling
deleted?: boolean
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reading elastic/elasticsearch#118669 it looks like deleted is always set.

Suggested change
deleted?: boolean
deleted: boolean

Comment on lines 52 to 55
/**
* A flag indicating if the connector should be hard deleted. Defaults to false.
*/
hard?: boolean
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have specific syntax for default values:

Suggested change
/**
* A flag indicating if the connector should be hard deleted. Defaults to false.
*/
hard?: boolean
/**
* A flag indicating if the connector should be hard deleted.
* @server_default false
*/
hard?: boolean

Comment on lines 44 to 49
query_parameters: {
/**
* A flag to indicate if the desired connector should be fetched even if it was soft-deleted
*/
include_deleted?: boolean
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
query_parameters: {
/**
* A flag to indicate if the desired connector should be fetched even if it was soft-deleted
*/
include_deleted?: boolean
}
query_parameters: {
/**
* A flag to indicate if the desired connector should be fetched even if it was soft-deleted
* @server_default false
*/
include_deleted?: boolean
}

Comment on lines 60 to 63
/**
* A flag to indicate if the desired connector should be fetched even if it was solf-deleted"
*/
include_deleted?: boolean
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/**
* A flag to indicate if the desired connector should be fetched even if it was solf-deleted"
*/
include_deleted?: boolean
/**
* A flag to indicate if the desired connector should be fetched even if it was solf-deleted"
* @server_default false
*/
include_deleted?: boolean

Copy link
Contributor

Following you can find the validation results for the APIs you have changed.

API Status Request Response
connector.check_in 🟢 3/3 3/3
connector.delete 🟢 29/29 29/29
connector.get 🟢 64/64 64/64
connector.last_sync 🟢 7/7 7/7
connector.list 🟢 31/31 31/31
connector.post 🟢 7/7 7/7
connector.put 🟢 20/20 20/20
connector.secret_delete 🟠 Missing type Missing type
connector.secret_get 🟠 Missing type Missing type
connector.secret_post 🟠 Missing type Missing type
connector.secret_put 🟠 Missing type Missing type
connector.sync_job_cancel 🟢 3/3 3/3
connector.sync_job_check_in 🟢 3/3 3/3
connector.sync_job_claim 🟢 3/3 3/3
connector.sync_job_delete 🟢 4/4 4/4
connector.sync_job_error 🟢 1/1 1/1
connector.sync_job_get 🟢 22/22 22/22
connector.sync_job_list 🟢 12/12 12/12
connector.sync_job_post 🟢 50/50 50/50
connector.sync_job_update_stats 🟢 5/5 5/5
connector.update_active_filtering 🟢 1/1 1/1
connector.update_api_key_id 🟢 4/4 4/4
connector.update_configuration 🟢 8/8 8/8
connector.update_error 🟢 4/4 4/4
connector.update_features 🟢 4/4 4/4
connector.update_filtering_validation 🟢 3/3 3/3
connector.update_filtering 🟢 12/12 12/12
connector.update_index_name 🟢 5/5 5/5
connector.update_name 🟢 4/4 4/4
connector.update_native 🟢 4/4 4/4
connector.update_pipeline 🟢 3/3 3/3
connector.update_scheduling 🟢 3/3 3/3
connector.update_service_type 🟢 2/2 2/2
connector.update_status 🟢 3/3 3/3

You can validate these APIs yourself by using the make validate target.

Copy link
Contributor

Following you can find the validation results for the APIs you have changed.

API Status Request Response
connector.check_in 🟢 3/3 3/3
connector.delete 🟢 29/29 29/29
connector.get 🟢 64/64 64/64
connector.last_sync 🟢 7/7 7/7
connector.list 🟢 31/31 31/31
connector.post 🟢 7/7 7/7
connector.put 🟢 20/20 20/20
connector.secret_delete 🟠 Missing type Missing type
connector.secret_get 🟠 Missing type Missing type
connector.secret_post 🟠 Missing type Missing type
connector.secret_put 🟠 Missing type Missing type
connector.sync_job_cancel 🟢 3/3 3/3
connector.sync_job_check_in 🟢 3/3 3/3
connector.sync_job_claim 🟢 3/3 3/3
connector.sync_job_delete 🟢 4/4 4/4
connector.sync_job_error 🟢 1/1 1/1
connector.sync_job_get 🟢 22/22 22/22
connector.sync_job_list 🟢 12/12 12/12
connector.sync_job_post 🟢 50/50 50/50
connector.sync_job_update_stats 🟢 5/5 5/5
connector.update_active_filtering 🟢 1/1 1/1
connector.update_api_key_id 🟢 4/4 4/4
connector.update_configuration 🟢 8/8 8/8
connector.update_error 🟢 4/4 4/4
connector.update_features 🟢 4/4 4/4
connector.update_filtering_validation 🟢 3/3 3/3
connector.update_filtering 🟢 12/12 12/12
connector.update_index_name 🟢 5/5 5/5
connector.update_name 🟢 4/4 4/4
connector.update_native 🟢 4/4 4/4
connector.update_pipeline 🟢 3/3 3/3
connector.update_scheduling 🟢 3/3 3/3
connector.update_service_type 🟢 2/2 2/2
connector.update_status 🟢 3/3 3/3

You can validate these APIs yourself by using the make validate target.

@mattnowzari mattnowzari requested a review from pquentin January 21, 2025 13:36
Copy link
Member

@pquentin pquentin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! LGTM.

@pquentin pquentin merged commit fe8ec47 into main Jan 22, 2025
8 checks passed
@pquentin pquentin deleted the connectors-api-client-new-params branch January 22, 2025 05:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-backport This pull request should not be backported specification
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants