From 40b2396d8c106a3742cc385680533cdad54e4936 Mon Sep 17 00:00:00 2001 From: "workos-sdk-automation[bot]" <255426317+workos-sdk-automation[bot]@users.noreply.github.com> Date: Wed, 14 Oct 2026 21:32:06 +0000 Subject: [PATCH 1/7] feat(pipes)!: Change Pipes API surface --- ..._authorize_url_request_connection_owner.rb | 13 ++++ .../types/data_integration_ownership.rb | 2 +- ..._authorize_url_request_connection_owner.rb | 2 +- ...get_user_token_request_connection_owner.rb | 2 +- ..._credentials_request_2_connection_owner.rb | 9 +++ ...nt_credentials_request_connection_owner.rb | 2 +- ...nd_credentials_request_connection_owner.rb | 2 +- ..._authorize_url_request_connection_owner.rb | 9 +++ ...nt_credentials_request_connection_owner.rb | 9 +++ ...data_integration_authorize_url_request.rbi | 60 ++++++++++++++ .../data_integration_credentials_response.rbi | 4 +- .../data_integration_vended_credential.rbi | 66 ++++++++++++++++ ...data_integration_authorize_url_request.rbi | 6 ++ ...ions_upsert_client_credentials_request.rbi | 18 +++-- ...ns_upsert_client_credentials_request_2.rbi | 72 +++++++++++++++++ ...data_integration_authorize_url_request.rbi | 66 ++++++++++++++++ ...ions_upsert_client_credentials_request.rbi | 78 +++++++++++++++++++ 17 files changed, 407 insertions(+), 13 deletions(-) create mode 100644 lib/workos/types/add_data_integrations_get_data_integration_authorize_url_request_connection_owner.rb create mode 100644 lib/workos/types/data_integrations_upsert_client_credentials_request_2_connection_owner.rb create mode 100644 lib/workos/types/reauthorize_data_integrations_get_data_integration_authorize_url_request_connection_owner.rb create mode 100644 lib/workos/types/reauthorize_data_integrations_upsert_client_credentials_request_connection_owner.rb create mode 100644 rbi/workos/add_data_integrations_get_data_integration_authorize_url_request.rbi create mode 100644 rbi/workos/data_integration_vended_credential.rbi create mode 100644 rbi/workos/data_integrations_upsert_client_credentials_request_2.rbi create mode 100644 rbi/workos/reauthorize_data_integrations_get_data_integration_authorize_url_request.rbi create mode 100644 rbi/workos/reauthorize_data_integrations_upsert_client_credentials_request.rbi diff --git a/lib/workos/types/add_data_integrations_get_data_integration_authorize_url_request_connection_owner.rb b/lib/workos/types/add_data_integrations_get_data_integration_authorize_url_request_connection_owner.rb new file mode 100644 index 00000000..365706a8 --- /dev/null +++ b/lib/workos/types/add_data_integrations_get_data_integration_authorize_url_request_connection_owner.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + module Types + class AddDataIntegrationsGetDataIntegrationAuthorizeUrlRequestConnectionOwner + USER = "user" + ORGANIZATION = "organization" + ALL = [USER, ORGANIZATION].freeze + end + end +end diff --git a/lib/workos/types/data_integration_ownership.rb b/lib/workos/types/data_integration_ownership.rb index 671476aa..a4b5896b 100644 --- a/lib/workos/types/data_integration_ownership.rb +++ b/lib/workos/types/data_integration_ownership.rb @@ -4,6 +4,6 @@ module WorkOS module Types - DataIntegrationOwnership = CreateDataIntegrationOwnership + DataIntegrationOwnership = AddDataIntegrationsGetDataIntegrationAuthorizeUrlRequestConnectionOwner end end diff --git a/lib/workos/types/data_integrations_get_data_integration_authorize_url_request_connection_owner.rb b/lib/workos/types/data_integrations_get_data_integration_authorize_url_request_connection_owner.rb index f401560c..6a00a39b 100644 --- a/lib/workos/types/data_integrations_get_data_integration_authorize_url_request_connection_owner.rb +++ b/lib/workos/types/data_integrations_get_data_integration_authorize_url_request_connection_owner.rb @@ -4,6 +4,6 @@ module WorkOS module Types - DataIntegrationsGetDataIntegrationAuthorizeUrlRequestConnectionOwner = CreateDataIntegrationOwnership + DataIntegrationsGetDataIntegrationAuthorizeUrlRequestConnectionOwner = AddDataIntegrationsGetDataIntegrationAuthorizeUrlRequestConnectionOwner end end diff --git a/lib/workos/types/data_integrations_get_user_token_request_connection_owner.rb b/lib/workos/types/data_integrations_get_user_token_request_connection_owner.rb index 4deb0450..87977117 100644 --- a/lib/workos/types/data_integrations_get_user_token_request_connection_owner.rb +++ b/lib/workos/types/data_integrations_get_user_token_request_connection_owner.rb @@ -4,6 +4,6 @@ module WorkOS module Types - DataIntegrationsGetUserTokenRequestConnectionOwner = CreateDataIntegrationOwnership + DataIntegrationsGetUserTokenRequestConnectionOwner = AddDataIntegrationsGetDataIntegrationAuthorizeUrlRequestConnectionOwner end end diff --git a/lib/workos/types/data_integrations_upsert_client_credentials_request_2_connection_owner.rb b/lib/workos/types/data_integrations_upsert_client_credentials_request_2_connection_owner.rb new file mode 100644 index 00000000..fbcc4274 --- /dev/null +++ b/lib/workos/types/data_integrations_upsert_client_credentials_request_2_connection_owner.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + module Types + DataIntegrationsUpsertClientCredentialsRequest2ConnectionOwner = AddDataIntegrationsGetDataIntegrationAuthorizeUrlRequestConnectionOwner + end +end diff --git a/lib/workos/types/data_integrations_upsert_client_credentials_request_connection_owner.rb b/lib/workos/types/data_integrations_upsert_client_credentials_request_connection_owner.rb index 5e5840e8..84317e3b 100644 --- a/lib/workos/types/data_integrations_upsert_client_credentials_request_connection_owner.rb +++ b/lib/workos/types/data_integrations_upsert_client_credentials_request_connection_owner.rb @@ -4,6 +4,6 @@ module WorkOS module Types - DataIntegrationsUpsertClientCredentialsRequestConnectionOwner = CreateDataIntegrationOwnership + DataIntegrationsUpsertClientCredentialsRequestConnectionOwner = AddDataIntegrationsGetDataIntegrationAuthorizeUrlRequestConnectionOwner end end diff --git a/lib/workos/types/data_integrations_vend_credentials_request_connection_owner.rb b/lib/workos/types/data_integrations_vend_credentials_request_connection_owner.rb index 52a27a16..6f2c6b85 100644 --- a/lib/workos/types/data_integrations_vend_credentials_request_connection_owner.rb +++ b/lib/workos/types/data_integrations_vend_credentials_request_connection_owner.rb @@ -4,6 +4,6 @@ module WorkOS module Types - DataIntegrationsVendCredentialsRequestConnectionOwner = CreateDataIntegrationOwnership + DataIntegrationsVendCredentialsRequestConnectionOwner = AddDataIntegrationsGetDataIntegrationAuthorizeUrlRequestConnectionOwner end end diff --git a/lib/workos/types/reauthorize_data_integrations_get_data_integration_authorize_url_request_connection_owner.rb b/lib/workos/types/reauthorize_data_integrations_get_data_integration_authorize_url_request_connection_owner.rb new file mode 100644 index 00000000..92de7102 --- /dev/null +++ b/lib/workos/types/reauthorize_data_integrations_get_data_integration_authorize_url_request_connection_owner.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + module Types + ReauthorizeDataIntegrationsGetDataIntegrationAuthorizeUrlRequestConnectionOwner = AddDataIntegrationsGetDataIntegrationAuthorizeUrlRequestConnectionOwner + end +end diff --git a/lib/workos/types/reauthorize_data_integrations_upsert_client_credentials_request_connection_owner.rb b/lib/workos/types/reauthorize_data_integrations_upsert_client_credentials_request_connection_owner.rb new file mode 100644 index 00000000..08ca6ac1 --- /dev/null +++ b/lib/workos/types/reauthorize_data_integrations_upsert_client_credentials_request_connection_owner.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + module Types + ReauthorizeDataIntegrationsUpsertClientCredentialsRequestConnectionOwner = AddDataIntegrationsGetDataIntegrationAuthorizeUrlRequestConnectionOwner + end +end diff --git a/rbi/workos/add_data_integrations_get_data_integration_authorize_url_request.rbi b/rbi/workos/add_data_integrations_get_data_integration_authorize_url_request.rbi new file mode 100644 index 00000000..39032113 --- /dev/null +++ b/rbi/workos/add_data_integrations_get_data_integration_authorize_url_request.rbi @@ -0,0 +1,60 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class AddDataIntegrationsGetDataIntegrationAuthorizeUrlRequest + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(T.nilable(String)) } + def account_display_name; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def account_display_name=(value); end + + sig { returns(String) } + def user_id; end + + sig { params(value: String).returns(String) } + def user_id=(value); end + + sig { returns(T.nilable(String)) } + def organization_id; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def organization_id=(value); end + + sig { returns(T.nilable(String)) } + def connection_owner; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def connection_owner=(value); end + + sig { returns(T.nilable(String)) } + def return_to; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def return_to=(value); end + + sig { returns(T.nilable(T::Hash[String, String])) } + def config; end + + sig { params(value: T.nilable(T::Hash[String, String])).returns(T.nilable(T::Hash[String, String])) } + def config=(value); end + + sig { returns(String) } + def connection_intent; end + + sig { params(value: String).returns(String) } + def connection_intent=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/data_integration_credentials_response.rbi b/rbi/workos/data_integration_credentials_response.rbi index 8df29240..ac58bf02 100644 --- a/rbi/workos/data_integration_credentials_response.rbi +++ b/rbi/workos/data_integration_credentials_response.rbi @@ -15,10 +15,10 @@ module WorkOS sig { params(value: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } def active=(value); end - sig { returns(T.nilable(WorkOS::DataIntegrationCredentialsResponseCredential)) } + sig { returns(T.nilable(WorkOS::DataIntegrationVendedCredential)) } def credential; end - sig { params(value: T.nilable(WorkOS::DataIntegrationCredentialsResponseCredential)).returns(T.nilable(WorkOS::DataIntegrationCredentialsResponseCredential)) } + sig { params(value: T.nilable(WorkOS::DataIntegrationVendedCredential)).returns(T.nilable(WorkOS::DataIntegrationVendedCredential)) } def credential=(value); end sig { returns(T.nilable(String)) } diff --git a/rbi/workos/data_integration_vended_credential.rbi b/rbi/workos/data_integration_vended_credential.rbi new file mode 100644 index 00000000..529427ec --- /dev/null +++ b/rbi/workos/data_integration_vended_credential.rbi @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class DataIntegrationVendedCredential + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(T.nilable(String)) } + def object; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def object=(value); end + + sig { returns(T.nilable(String)) } + def auth_method; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def auth_method=(value); end + + sig { returns(T.nilable(String)) } + def value; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def value=(value); end + + sig { returns(T.nilable(String)) } + def expires_at; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def expires_at=(value); end + + sig { returns(T.nilable(T::Array[String])) } + def scopes; end + + sig { params(value: T.nilable(T::Array[String])).returns(T.nilable(T::Array[String])) } + def scopes=(value); end + + sig { returns(T.nilable(T::Array[String])) } + def missing_scopes; end + + sig { params(value: T.nilable(T::Array[String])).returns(T.nilable(T::Array[String])) } + def missing_scopes=(value); end + + sig { returns(T.nilable(T::Hash[String, String])) } + def config; end + + sig { params(value: T.nilable(T::Hash[String, String])).returns(T.nilable(T::Hash[String, String])) } + def config=(value); end + + sig { returns(T.nilable(T::Hash[String, T.untyped])) } + def metadata; end + + sig { params(value: T.nilable(T::Hash[String, T.untyped])).returns(T.nilable(T::Hash[String, T.untyped])) } + def metadata=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/data_integrations_get_data_integration_authorize_url_request.rbi b/rbi/workos/data_integrations_get_data_integration_authorize_url_request.rbi index f77b92d5..0646e598 100644 --- a/rbi/workos/data_integrations_get_data_integration_authorize_url_request.rbi +++ b/rbi/workos/data_integrations_get_data_integration_authorize_url_request.rbi @@ -9,6 +9,12 @@ module WorkOS sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } def initialize(json); end + sig { returns(T.nilable(String)) } + def account_display_name; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def account_display_name=(value); end + sig { returns(String) } def user_id; end diff --git a/rbi/workos/data_integrations_upsert_client_credentials_request.rbi b/rbi/workos/data_integrations_upsert_client_credentials_request.rbi index 009da6ef..ddc5ee5f 100644 --- a/rbi/workos/data_integrations_upsert_client_credentials_request.rbi +++ b/rbi/workos/data_integrations_upsert_client_credentials_request.rbi @@ -9,6 +9,18 @@ module WorkOS sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } def initialize(json); end + sig { returns(T.nilable(String)) } + def account_display_name; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def account_display_name=(value); end + + sig { returns(T.nilable(String)) } + def account_identifier; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def account_identifier=(value); end + sig { returns(String) } def user_id; end @@ -21,12 +33,6 @@ module WorkOS sig { params(value: T.nilable(String)).returns(T.nilable(String)) } def organization_id=(value); end - sig { returns(T.nilable(String)) } - def connected_account_id; end - - sig { params(value: T.nilable(String)).returns(T.nilable(String)) } - def connected_account_id=(value); end - sig { returns(T.nilable(String)) } def connection_owner; end diff --git a/rbi/workos/data_integrations_upsert_client_credentials_request_2.rbi b/rbi/workos/data_integrations_upsert_client_credentials_request_2.rbi new file mode 100644 index 00000000..eaedfd38 --- /dev/null +++ b/rbi/workos/data_integrations_upsert_client_credentials_request_2.rbi @@ -0,0 +1,72 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class DataIntegrationsUpsertClientCredentialsRequest2 + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(T.nilable(String)) } + def account_display_name; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def account_display_name=(value); end + + sig { returns(T.nilable(String)) } + def account_identifier; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def account_identifier=(value); end + + sig { returns(String) } + def user_id; end + + sig { params(value: String).returns(String) } + def user_id=(value); end + + sig { returns(T.nilable(String)) } + def organization_id; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def organization_id=(value); end + + sig { returns(T.nilable(String)) } + def connection_owner; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def connection_owner=(value); end + + sig { returns(String) } + def client_id; end + + sig { params(value: String).returns(String) } + def client_id=(value); end + + sig { returns(String) } + def client_secret; end + + sig { params(value: String).returns(String) } + def client_secret=(value); end + + sig { returns(T.nilable(T::Hash[String, String])) } + def config; end + + sig { params(value: T.nilable(T::Hash[String, String])).returns(T.nilable(T::Hash[String, String])) } + def config=(value); end + + sig { returns(String) } + def connected_account_id; end + + sig { params(value: String).returns(String) } + def connected_account_id=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/reauthorize_data_integrations_get_data_integration_authorize_url_request.rbi b/rbi/workos/reauthorize_data_integrations_get_data_integration_authorize_url_request.rbi new file mode 100644 index 00000000..932ebac1 --- /dev/null +++ b/rbi/workos/reauthorize_data_integrations_get_data_integration_authorize_url_request.rbi @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class ReauthorizeDataIntegrationsGetDataIntegrationAuthorizeUrlRequest + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(T.nilable(String)) } + def account_display_name; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def account_display_name=(value); end + + sig { returns(String) } + def user_id; end + + sig { params(value: String).returns(String) } + def user_id=(value); end + + sig { returns(T.nilable(String)) } + def organization_id; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def organization_id=(value); end + + sig { returns(T.nilable(String)) } + def connection_owner; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def connection_owner=(value); end + + sig { returns(T.nilable(String)) } + def return_to; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def return_to=(value); end + + sig { returns(T.nilable(T::Hash[String, String])) } + def config; end + + sig { params(value: T.nilable(T::Hash[String, String])).returns(T.nilable(T::Hash[String, String])) } + def config=(value); end + + sig { returns(String) } + def connection_intent; end + + sig { params(value: String).returns(String) } + def connection_intent=(value); end + + sig { returns(String) } + def connected_account_id; end + + sig { params(value: String).returns(String) } + def connected_account_id=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/reauthorize_data_integrations_upsert_client_credentials_request.rbi b/rbi/workos/reauthorize_data_integrations_upsert_client_credentials_request.rbi new file mode 100644 index 00000000..b6e0dd83 --- /dev/null +++ b/rbi/workos/reauthorize_data_integrations_upsert_client_credentials_request.rbi @@ -0,0 +1,78 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class ReauthorizeDataIntegrationsUpsertClientCredentialsRequest + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(T.nilable(String)) } + def account_display_name; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def account_display_name=(value); end + + sig { returns(T.nilable(String)) } + def account_identifier; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def account_identifier=(value); end + + sig { returns(String) } + def user_id; end + + sig { params(value: String).returns(String) } + def user_id=(value); end + + sig { returns(T.nilable(String)) } + def organization_id; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def organization_id=(value); end + + sig { returns(T.nilable(String)) } + def connection_owner; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def connection_owner=(value); end + + sig { returns(String) } + def client_id; end + + sig { params(value: String).returns(String) } + def client_id=(value); end + + sig { returns(String) } + def client_secret; end + + sig { params(value: String).returns(String) } + def client_secret=(value); end + + sig { returns(T.nilable(T::Hash[String, String])) } + def config; end + + sig { params(value: T.nilable(T::Hash[String, String])).returns(T.nilable(T::Hash[String, String])) } + def config=(value); end + + sig { returns(String) } + def connection_intent; end + + sig { params(value: String).returns(String) } + def connection_intent=(value); end + + sig { returns(String) } + def connected_account_id; end + + sig { params(value: String).returns(String) } + def connected_account_id=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end From 9b69f447cc5d8de7c411f64bb4786f65a01c9502 Mon Sep 17 00:00:00 2001 From: "workos-sdk-automation[bot]" <255426317+workos-sdk-automation[bot]@users.noreply.github.com> Date: Wed, 14 Oct 2026 21:32:06 +0000 Subject: [PATCH 2/7] feat(admin_portal): Update admin portal API surface --- lib/workos/admin_portal.rb | 27 +++++++++ lib/workos/admin_portal/generate_link.rb | 3 + lib/workos/admin_portal/revoke_link.rb | 22 +++++++ .../agents/agent_blueprints_create_request.rb | 3 + ..._blueprints_create_request_invocable_as.rb | 18 ++++++ .../shared/agent_blueprint_created_data.rb | 3 + ...ent_blueprint_created_data_invocable_as.rb | 18 ++++++ ...reated_data_invocable_as_instance_types.rb | 13 ++++ ...ate_request_invocable_as_instance_types.rb | 9 +++ .../types/agent_instance_created_data_type.rb | 6 +- .../create_data_integration_ownership.rb | 6 +- ...key_connection_request_connection_owner.rb | 9 +++ rbi/workos/admin_portal.rbi | 12 +++- rbi/workos/agent_blueprint_created_data.rbi | 6 ++ ...nt_blueprint_created_data_invocable_as.rbi | 24 ++++++++ .../agent_blueprints_create_request.rbi | 6 ++ ...blueprints_create_request_invocable_as.rbi | 24 ++++++++ ...ions_create_api_key_connection_request.rbi | 60 +++++++++++++++++++ rbi/workos/generate_link.rbi | 6 ++ rbi/workos/revoke_link.rbi | 30 ++++++++++ test/workos/test_admin_portal.rb | 10 +++- .../test_admin_portal_model_round_trip.rb | 14 +++++ 22 files changed, 317 insertions(+), 12 deletions(-) create mode 100644 lib/workos/admin_portal/revoke_link.rb create mode 100644 lib/workos/agents/agent_blueprints_create_request_invocable_as.rb create mode 100644 lib/workos/shared/agent_blueprint_created_data_invocable_as.rb create mode 100644 lib/workos/types/agent_blueprint_created_data_invocable_as_instance_types.rb create mode 100644 lib/workos/types/agent_blueprints_create_request_invocable_as_instance_types.rb create mode 100644 lib/workos/types/data_integrations_create_api_key_connection_request_connection_owner.rb create mode 100644 rbi/workos/agent_blueprint_created_data_invocable_as.rbi create mode 100644 rbi/workos/agent_blueprints_create_request_invocable_as.rbi create mode 100644 rbi/workos/data_integrations_create_api_key_connection_request.rbi create mode 100644 rbi/workos/revoke_link.rbi diff --git a/lib/workos/admin_portal.rb b/lib/workos/admin_portal.rb index aa8f1f66..fdfdb2e0 100644 --- a/lib/workos/admin_portal.rb +++ b/lib/workos/admin_portal.rb @@ -14,6 +14,7 @@ def initialize(client) # @param return_url [String, nil] The URL to go to when an admin clicks on your logo in the Admin Portal. If not specified, the return URL configured on the [Admin Portal](https://dashboard.workos.com/admin-portal) page will be used. # @param success_url [String, nil] The URL to redirect the admin to when they finish setup. If not specified, the success URL configured on the [Admin Portal](https://dashboard.workos.com/admin-portal) page will be used. # @param organization [String] An [Organization](https://workos.com/docs/reference/organization) identifier. + # @param external_user_id [String, nil] The ID of the user in your application the link is generated for. The link and any Admin Portal sessions started from it can later be revoked by this ID, for example when that user is deprovisioned from your application. # @param intent [WorkOS::Types::GenerateLinkIntent, nil] The intent of the Admin Portal. - `sso` - Launch Admin Portal for creating SSO connections - `dsync` - Launch Admin Portal for creating Directory Sync connections - `audit_logs` - Launch Admin Portal for viewing Audit Logs - `log_streams` - Launch Admin Portal for creating Log Streams - `domain_verification` - Launch Admin Portal for Domain Verification - `certificate_renewal` - Launch Admin Portal for renewing SAML Certificates - `bring_your_own_key` - Launch Admin Portal for configuring Bring Your Own Key # @param it_contact_emails [Array, nil] The email addresses of the IT contacts to grant access to the Admin Portal for the given organization. Accepts up to 20 emails. # @param request_options [Hash] (see WorkOS::Types::RequestOptions) @@ -22,6 +23,7 @@ def generate_link( organization:, return_url: nil, success_url: nil, + external_user_id: nil, intent: nil, it_contact_emails: nil, request_options: {} @@ -30,6 +32,7 @@ def generate_link( "return_url" => return_url, "success_url" => success_url, "organization" => organization, + "external_user_id" => external_user_id, "intent" => intent, "it_contact_emails" => it_contact_emails }.compact @@ -44,5 +47,29 @@ def generate_link( result.last_response = WorkOS::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"]) result end + + # Revoke Portal Links + # @param organization [String] An [Organization](https://workos.com/docs/reference/organization) identifier. + # @param external_user_id [String] The `external_user_id` the Portal Links were generated with for this organization. Every matching link is revoked, along with any Admin Portal sessions started from those links. + # @param request_options [Hash] (see WorkOS::Types::RequestOptions) + # @return [void] + def create_revoke_link( + organization:, + external_user_id:, + request_options: {} + ) + body = { + "organization" => organization, + "external_user_id" => external_user_id + } + @client.request( + method: :post, + path: "/portal/revoke_link", + auth: true, + body: body, + request_options: request_options + ) + nil + end end end diff --git a/lib/workos/admin_portal/generate_link.rb b/lib/workos/admin_portal/generate_link.rb index 7098f39a..b66c37c3 100644 --- a/lib/workos/admin_portal/generate_link.rb +++ b/lib/workos/admin_portal/generate_link.rb @@ -8,6 +8,7 @@ class GenerateLink < WorkOS::Types::BaseModel return_url: :return_url, success_url: :success_url, organization: :organization, + external_user_id: :external_user_id, intent: :intent, it_contact_emails: :it_contact_emails }.freeze @@ -16,6 +17,7 @@ class GenerateLink < WorkOS::Types::BaseModel :return_url, :success_url, :organization, + :external_user_id, :intent, :it_contact_emails @@ -24,6 +26,7 @@ def initialize(json) @return_url = hash[:return_url] @success_url = hash[:success_url] @organization = hash[:organization] + @external_user_id = hash[:external_user_id] @intent = hash[:intent] @it_contact_emails = hash[:it_contact_emails] || [] end diff --git a/lib/workos/admin_portal/revoke_link.rb b/lib/workos/admin_portal/revoke_link.rb new file mode 100644 index 00000000..065c655e --- /dev/null +++ b/lib/workos/admin_portal/revoke_link.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class RevokeLink < WorkOS::Types::BaseModel + HASH_ATTRS = { + organization: :organization, + external_user_id: :external_user_id + }.freeze + + attr_accessor \ + :organization, + :external_user_id + + def initialize(json) + hash = self.class.normalize(json) + @organization = hash[:organization] + @external_user_id = hash[:external_user_id] + end + end +end diff --git a/lib/workos/agents/agent_blueprints_create_request.rb b/lib/workos/agents/agent_blueprints_create_request.rb index 2f44b28c..50bca64f 100644 --- a/lib/workos/agents/agent_blueprints_create_request.rb +++ b/lib/workos/agents/agent_blueprints_create_request.rb @@ -9,6 +9,7 @@ class AgentBlueprintsCreateRequest < WorkOS::Types::BaseModel description: :description, permissions: :permissions, invocable_by: :invocable_by, + invocable_as: :invocable_as, session_settings: :session_settings }.freeze @@ -17,6 +18,7 @@ class AgentBlueprintsCreateRequest < WorkOS::Types::BaseModel :description, :permissions, :invocable_by, + :invocable_as, :session_settings def initialize(json) @@ -25,6 +27,7 @@ def initialize(json) @description = hash[:description] @permissions = hash[:permissions] || [] @invocable_by = hash[:invocable_by] ? WorkOS::AgentBlueprintsCreateRequestInvocableBy.new(hash[:invocable_by]) : nil + @invocable_as = hash[:invocable_as] ? WorkOS::AgentBlueprintsCreateRequestInvocableAs.new(hash[:invocable_as]) : nil @session_settings = hash[:session_settings] ? WorkOS::AgentBlueprintsCreateRequestSessionSetting.new(hash[:session_settings]) : nil end end diff --git a/lib/workos/agents/agent_blueprints_create_request_invocable_as.rb b/lib/workos/agents/agent_blueprints_create_request_invocable_as.rb new file mode 100644 index 00000000..821a13b9 --- /dev/null +++ b/lib/workos/agents/agent_blueprints_create_request_invocable_as.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class AgentBlueprintsCreateRequestInvocableAs < WorkOS::Types::BaseModel + HASH_ATTRS = { + instance_types: :instance_types + }.freeze + + attr_accessor :instance_types + + def initialize(json) + hash = self.class.normalize(json) + @instance_types = hash[:instance_types] || [] + end + end +end diff --git a/lib/workos/shared/agent_blueprint_created_data.rb b/lib/workos/shared/agent_blueprint_created_data.rb index 3dfe153e..4f834991 100644 --- a/lib/workos/shared/agent_blueprint_created_data.rb +++ b/lib/workos/shared/agent_blueprint_created_data.rb @@ -11,6 +11,7 @@ class AgentBlueprintCreatedData < WorkOS::Types::BaseModel description: :description, permissions: :permissions, invocable_by: :invocable_by, + invocable_as: :invocable_as, session_settings: :session_settings, created_at: :created_at, updated_at: :updated_at @@ -23,6 +24,7 @@ class AgentBlueprintCreatedData < WorkOS::Types::BaseModel :description, :permissions, :invocable_by, + :invocable_as, :session_settings, :created_at, :updated_at @@ -35,6 +37,7 @@ def initialize(json) @description = hash[:description] @permissions = hash[:permissions] || [] @invocable_by = hash[:invocable_by] ? WorkOS::AgentBlueprintCreatedDataInvocableBy.new(hash[:invocable_by]) : nil + @invocable_as = hash[:invocable_as] ? WorkOS::AgentBlueprintCreatedDataInvocableAs.new(hash[:invocable_as]) : nil @session_settings = hash[:session_settings] ? WorkOS::AgentBlueprintCreatedDataSessionSetting.new(hash[:session_settings]) : nil @created_at = hash[:created_at] @updated_at = hash[:updated_at] diff --git a/lib/workos/shared/agent_blueprint_created_data_invocable_as.rb b/lib/workos/shared/agent_blueprint_created_data_invocable_as.rb new file mode 100644 index 00000000..f3da27c8 --- /dev/null +++ b/lib/workos/shared/agent_blueprint_created_data_invocable_as.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class AgentBlueprintCreatedDataInvocableAs < WorkOS::Types::BaseModel + HASH_ATTRS = { + instance_types: :instance_types + }.freeze + + attr_accessor :instance_types + + def initialize(json) + hash = self.class.normalize(json) + @instance_types = hash[:instance_types] || [] + end + end +end diff --git a/lib/workos/types/agent_blueprint_created_data_invocable_as_instance_types.rb b/lib/workos/types/agent_blueprint_created_data_invocable_as_instance_types.rb new file mode 100644 index 00000000..db1dcf23 --- /dev/null +++ b/lib/workos/types/agent_blueprint_created_data_invocable_as_instance_types.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + module Types + class AgentBlueprintCreatedDataInvocableAsInstanceTypes + DELEGATED = "delegated" + AUTONOMOUS = "autonomous" + ALL = [DELEGATED, AUTONOMOUS].freeze + end + end +end diff --git a/lib/workos/types/agent_blueprints_create_request_invocable_as_instance_types.rb b/lib/workos/types/agent_blueprints_create_request_invocable_as_instance_types.rb new file mode 100644 index 00000000..a240c0e7 --- /dev/null +++ b/lib/workos/types/agent_blueprints_create_request_invocable_as_instance_types.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + module Types + AgentBlueprintsCreateRequestInvocableAsInstanceTypes = AgentBlueprintCreatedDataInvocableAsInstanceTypes + end +end diff --git a/lib/workos/types/agent_instance_created_data_type.rb b/lib/workos/types/agent_instance_created_data_type.rb index 49f1e43e..b0873f6d 100644 --- a/lib/workos/types/agent_instance_created_data_type.rb +++ b/lib/workos/types/agent_instance_created_data_type.rb @@ -4,10 +4,6 @@ module WorkOS module Types - class AgentInstanceCreatedDataType - DELEGATED = "delegated" - AUTONOMOUS = "autonomous" - ALL = [DELEGATED, AUTONOMOUS].freeze - end + AgentInstanceCreatedDataType = AgentBlueprintCreatedDataInvocableAsInstanceTypes end end diff --git a/lib/workos/types/create_data_integration_ownership.rb b/lib/workos/types/create_data_integration_ownership.rb index 6b002b5a..13d52643 100644 --- a/lib/workos/types/create_data_integration_ownership.rb +++ b/lib/workos/types/create_data_integration_ownership.rb @@ -4,10 +4,6 @@ module WorkOS module Types - class CreateDataIntegrationOwnership - USER = "user" - ORGANIZATION = "organization" - ALL = [USER, ORGANIZATION].freeze - end + CreateDataIntegrationOwnership = AddDataIntegrationsGetDataIntegrationAuthorizeUrlRequestConnectionOwner end end diff --git a/lib/workos/types/data_integrations_create_api_key_connection_request_connection_owner.rb b/lib/workos/types/data_integrations_create_api_key_connection_request_connection_owner.rb new file mode 100644 index 00000000..69cb726a --- /dev/null +++ b/lib/workos/types/data_integrations_create_api_key_connection_request_connection_owner.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + module Types + DataIntegrationsCreateApiKeyConnectionRequestConnectionOwner = AddDataIntegrationsGetDataIntegrationAuthorizeUrlRequestConnectionOwner + end +end diff --git a/rbi/workos/admin_portal.rbi b/rbi/workos/admin_portal.rbi index 67352de4..5fc605db 100644 --- a/rbi/workos/admin_portal.rbi +++ b/rbi/workos/admin_portal.rbi @@ -14,12 +14,22 @@ module WorkOS organization: String, return_url: T.nilable(String), success_url: T.nilable(String), + external_user_id: T.nilable(String), intent: T.nilable(String), it_contact_emails: T.nilable(T::Array[String]), request_options: T::Hash[Symbol, T.untyped] ).returns(WorkOS::PortalLinkResponse) end - def generate_link(organization:, return_url:, success_url:, intent:, it_contact_emails:, request_options:); end + def generate_link(organization:, return_url:, success_url:, external_user_id:, intent:, it_contact_emails:, request_options:); end + + sig do + params( + organization: String, + external_user_id: String, + request_options: T::Hash[Symbol, T.untyped] + ).returns(NilClass) + end + def create_revoke_link(organization:, external_user_id:, request_options:); end end end diff --git a/rbi/workos/agent_blueprint_created_data.rbi b/rbi/workos/agent_blueprint_created_data.rbi index 4f57caab..e9574b23 100644 --- a/rbi/workos/agent_blueprint_created_data.rbi +++ b/rbi/workos/agent_blueprint_created_data.rbi @@ -45,6 +45,12 @@ module WorkOS sig { params(value: WorkOS::AgentBlueprintCreatedDataInvocableBy).returns(WorkOS::AgentBlueprintCreatedDataInvocableBy) } def invocable_by=(value); end + sig { returns(WorkOS::AgentBlueprintCreatedDataInvocableAs) } + def invocable_as; end + + sig { params(value: WorkOS::AgentBlueprintCreatedDataInvocableAs).returns(WorkOS::AgentBlueprintCreatedDataInvocableAs) } + def invocable_as=(value); end + sig { returns(WorkOS::AgentBlueprintCreatedDataSessionSetting) } def session_settings; end diff --git a/rbi/workos/agent_blueprint_created_data_invocable_as.rbi b/rbi/workos/agent_blueprint_created_data_invocable_as.rbi new file mode 100644 index 00000000..ce5f5fce --- /dev/null +++ b/rbi/workos/agent_blueprint_created_data_invocable_as.rbi @@ -0,0 +1,24 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class AgentBlueprintCreatedDataInvocableAs + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(T::Array[String]) } + def instance_types; end + + sig { params(value: T::Array[String]).returns(T::Array[String]) } + def instance_types=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/agent_blueprints_create_request.rbi b/rbi/workos/agent_blueprints_create_request.rbi index 6d629fd4..893917fd 100644 --- a/rbi/workos/agent_blueprints_create_request.rbi +++ b/rbi/workos/agent_blueprints_create_request.rbi @@ -33,6 +33,12 @@ module WorkOS sig { params(value: T.nilable(WorkOS::AgentBlueprintsCreateRequestInvocableBy)).returns(T.nilable(WorkOS::AgentBlueprintsCreateRequestInvocableBy)) } def invocable_by=(value); end + sig { returns(T.nilable(WorkOS::AgentBlueprintsCreateRequestInvocableAs)) } + def invocable_as; end + + sig { params(value: T.nilable(WorkOS::AgentBlueprintsCreateRequestInvocableAs)).returns(T.nilable(WorkOS::AgentBlueprintsCreateRequestInvocableAs)) } + def invocable_as=(value); end + sig { returns(T.nilable(WorkOS::AgentBlueprintsCreateRequestSessionSetting)) } def session_settings; end diff --git a/rbi/workos/agent_blueprints_create_request_invocable_as.rbi b/rbi/workos/agent_blueprints_create_request_invocable_as.rbi new file mode 100644 index 00000000..fe8c1c81 --- /dev/null +++ b/rbi/workos/agent_blueprints_create_request_invocable_as.rbi @@ -0,0 +1,24 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class AgentBlueprintsCreateRequestInvocableAs + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(T.nilable(T::Array[String])) } + def instance_types; end + + sig { params(value: T.nilable(T::Array[String])).returns(T.nilable(T::Array[String])) } + def instance_types=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/data_integrations_create_api_key_connection_request.rbi b/rbi/workos/data_integrations_create_api_key_connection_request.rbi new file mode 100644 index 00000000..c4f6beee --- /dev/null +++ b/rbi/workos/data_integrations_create_api_key_connection_request.rbi @@ -0,0 +1,60 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class DataIntegrationsCreateApiKeyConnectionRequest + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(T.nilable(String)) } + def account_display_name; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def account_display_name=(value); end + + sig { returns(T.nilable(String)) } + def account_identifier; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def account_identifier=(value); end + + sig { returns(String) } + def user_id; end + + sig { params(value: String).returns(String) } + def user_id=(value); end + + sig { returns(T.nilable(String)) } + def organization_id; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def organization_id=(value); end + + sig { returns(T.nilable(String)) } + def connection_owner; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def connection_owner=(value); end + + sig { returns(String) } + def secret; end + + sig { params(value: String).returns(String) } + def secret=(value); end + + sig { returns(String) } + def connection_intent; end + + sig { params(value: String).returns(String) } + def connection_intent=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/generate_link.rbi b/rbi/workos/generate_link.rbi index 79e3e916..cb5f5d37 100644 --- a/rbi/workos/generate_link.rbi +++ b/rbi/workos/generate_link.rbi @@ -27,6 +27,12 @@ module WorkOS sig { params(value: String).returns(String) } def organization=(value); end + sig { returns(T.nilable(String)) } + def external_user_id; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def external_user_id=(value); end + sig { returns(T.nilable(String)) } def intent; end diff --git a/rbi/workos/revoke_link.rbi b/rbi/workos/revoke_link.rbi new file mode 100644 index 00000000..31281ad9 --- /dev/null +++ b/rbi/workos/revoke_link.rbi @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class RevokeLink + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(String) } + def organization; end + + sig { params(value: String).returns(String) } + def organization=(value); end + + sig { returns(String) } + def external_user_id; end + + sig { params(value: String).returns(String) } + def external_user_id=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/test/workos/test_admin_portal.rb b/test/workos/test_admin_portal.rb index 77d1f561..6eb8181c 100644 --- a/test/workos/test_admin_portal.rb +++ b/test/workos/test_admin_portal.rb @@ -18,9 +18,17 @@ def test_generate_link_returns_expected_result refute_nil result end + def test_create_revoke_link_returns_expected_result + stub_request(:post, %r{\Ahttps://api\.workos\.com/portal/revoke_link(\?|\z)}) + .to_return(body: "{}", status: 200) + result = @client.admin_portal.create_revoke_link(organization: "stub", external_user_id: "stub") + assert_nil result + end + # Parameterized authentication error tests (one per endpoint). [ - {name: :generate_link, verb: :post, url: %r{\Ahttps://api\.workos\.com/portal/generate_link(\?|\z)}, args: {organization: "stub"}} + {name: :generate_link, verb: :post, url: %r{\Ahttps://api\.workos\.com/portal/generate_link(\?|\z)}, args: {organization: "stub"}}, + {name: :create_revoke_link, verb: :post, url: %r{\Ahttps://api\.workos\.com/portal/revoke_link(\?|\z)}, args: {organization: "stub", external_user_id: "stub"}} ].each do |spec| define_method("test_#{spec[:name]}_raises_authentication_error_on_401") do stub_request(spec[:verb], spec[:url]) diff --git a/test/workos/test_admin_portal_model_round_trip.rb b/test/workos/test_admin_portal_model_round_trip.rb index 0eb48b69..203eb82e 100644 --- a/test/workos/test_admin_portal_model_round_trip.rb +++ b/test/workos/test_admin_portal_model_round_trip.rb @@ -10,6 +10,7 @@ def test_generate_link_round_trip "return_url" => "stub", "success_url" => "stub", "organization" => "stub", + "external_user_id" => "stub", "intent" => "stub", "it_contact_emails" => [] } @@ -20,6 +21,19 @@ def test_generate_link_round_trip fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } end + def test_revoke_link_round_trip + fixture = { + "organization" => "stub", + "external_user_id" => "stub" + } + model = WorkOS::RevokeLink.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + assert_equal fixture["organization"], json[:organization] + assert_equal fixture["external_user_id"], json[:external_user_id] + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + def test_portal_link_response_round_trip fixture = { "link" => "stub" From acb5b01e69babca48cb46e3ae502cfa794d58aa2 Mon Sep 17 00:00:00 2001 From: "workos-sdk-automation[bot]" <255426317+workos-sdk-automation[bot]@users.noreply.github.com> Date: Wed, 14 Oct 2026 21:32:06 +0000 Subject: [PATCH 3/7] feat(audit_logs): Update audit log API surface --- .../data_integrations_list_response_data_connection_owner.rb | 2 +- .../types/resource_export_completed_data_resource_type.rb | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/workos/types/data_integrations_list_response_data_connection_owner.rb b/lib/workos/types/data_integrations_list_response_data_connection_owner.rb index 60ec2fd2..b4a203ba 100644 --- a/lib/workos/types/data_integrations_list_response_data_connection_owner.rb +++ b/lib/workos/types/data_integrations_list_response_data_connection_owner.rb @@ -4,6 +4,6 @@ module WorkOS module Types - DataIntegrationsListResponseDataConnectionOwner = CreateDataIntegrationOwnership + DataIntegrationsListResponseDataConnectionOwner = AddDataIntegrationsGetDataIntegrationAuthorizeUrlRequestConnectionOwner end end diff --git a/lib/workos/types/resource_export_completed_data_resource_type.rb b/lib/workos/types/resource_export_completed_data_resource_type.rb index 9ef4684b..81011f42 100644 --- a/lib/workos/types/resource_export_completed_data_resource_type.rb +++ b/lib/workos/types/resource_export_completed_data_resource_type.rb @@ -12,7 +12,8 @@ class ResourceExportCompletedDataResourceType AUDIT_LOG_EVENTS = "auditLogEvents" CONNECTIONS = "connections" DIRECTORY_USERS = "directoryUsers" - ALL = [USERS, ORGANIZATIONS, EVENTS, SESSIONS, AUDIT_LOG_EVENTS, CONNECTIONS, DIRECTORY_USERS].freeze + SCIM_LOGS = "scimLogs" + ALL = [USERS, ORGANIZATIONS, EVENTS, SESSIONS, AUDIT_LOG_EVENTS, CONNECTIONS, DIRECTORY_USERS, SCIM_LOGS].freeze end end end From c26952c22cb5ecb06f0f720560580f477b80c21d Mon Sep 17 00:00:00 2001 From: "workos-sdk-automation[bot]" <255426317+workos-sdk-automation[bot]@users.noreply.github.com> Date: Wed, 14 Oct 2026 21:32:06 +0000 Subject: [PATCH 4/7] feat(pipes): Update Pipes API surface --- lib/workos/pipes.rb | 223 +++++++++++-- ..._data_integration_authorize_url_request.rb | 37 +++ lib/workos/pipes/connected_account.rb | 6 + lib/workos/pipes/connected_account_input.rb | 6 + .../pipes/connected_account_write_response.rb | 73 +++++ ...onnected_account_write_response_warning.rb | 22 ++ lib/workos/pipes/create_connected_account.rb | 40 +++ .../create_organization_connected_account.rb | 43 +++ .../data_integration_credentials_response.rb | 2 +- .../data_integration_vended_credential.rb | 40 +++ ...tions_create_api_key_connection_request.rb | 37 +++ ...e_client_credentials_connection_request.rb | 43 +++ ..._data_integration_authorize_url_request.rb | 3 + ...ns_list_response_data_connected_account.rb | 6 + ...ata_integrations_upsert_api_key_request.rb | 9 +- ...a_integrations_upsert_api_key_request_2.rb | 37 +++ ...tions_upsert_client_credentials_request.rb | 9 +- ...ons_upsert_client_credentials_request_2.rb | 43 +++ .../pipes/organization_connected_account.rb | 40 +++ ..._data_integration_authorize_url_request.rb | 40 +++ ...ata_integrations_upsert_api_key_request.rb | 40 +++ ...tions_upsert_client_credentials_request.rb | 46 +++ lib/workos/shared/pipe_connected_account.rb | 6 + ...cted_account_write_response_auth_method.rb | 9 + ..._account_write_response_connection_role.rb | 9 + .../connected_account_write_response_state.rb | 9 + .../types/create_connected_account_state.rb | 9 + ...te_organization_connected_account_state.rb | 9 + ...als_connection_request_connection_owner.rb | 9 + .../organization_connected_account_state.rb | 9 + lib/workos/types/pipes_ownership.rb | 2 +- rbi/workos/connected_account.rbi | 12 + rbi/workos/connected_account_input.rbi | 12 + .../connected_account_write_response.rbi | 132 ++++++++ ...nnected_account_write_response_warning.rbi | 30 ++ rbi/workos/create_connected_account.rbi | 66 ++++ .../create_organization_connected_account.rbi | 72 +++++ ..._client_credentials_connection_request.rbi | 72 +++++ ...s_list_response_data_connected_account.rbi | 12 + rbi/workos/organization_connected_account.rbi | 66 ++++ rbi/workos/pipe_connected_account.rbi | 12 + rbi/workos/pipes.rbi | 79 ++++- test/workos/test_pipes.rb | 24 +- test/workos/test_pipes_model_round_trip.rb | 299 +++++++++++++++++- 44 files changed, 1731 insertions(+), 73 deletions(-) create mode 100644 lib/workos/pipes/add_data_integrations_get_data_integration_authorize_url_request.rb create mode 100644 lib/workos/pipes/connected_account_write_response.rb create mode 100644 lib/workos/pipes/connected_account_write_response_warning.rb create mode 100644 lib/workos/pipes/create_connected_account.rb create mode 100644 lib/workos/pipes/create_organization_connected_account.rb create mode 100644 lib/workos/pipes/data_integration_vended_credential.rb create mode 100644 lib/workos/pipes/data_integrations_create_api_key_connection_request.rb create mode 100644 lib/workos/pipes/data_integrations_create_client_credentials_connection_request.rb create mode 100644 lib/workos/pipes/data_integrations_upsert_api_key_request_2.rb create mode 100644 lib/workos/pipes/data_integrations_upsert_client_credentials_request_2.rb create mode 100644 lib/workos/pipes/organization_connected_account.rb create mode 100644 lib/workos/pipes/reauthorize_data_integrations_get_data_integration_authorize_url_request.rb create mode 100644 lib/workos/pipes/reauthorize_data_integrations_upsert_api_key_request.rb create mode 100644 lib/workos/pipes/reauthorize_data_integrations_upsert_client_credentials_request.rb create mode 100644 lib/workos/types/connected_account_write_response_auth_method.rb create mode 100644 lib/workos/types/connected_account_write_response_connection_role.rb create mode 100644 lib/workos/types/connected_account_write_response_state.rb create mode 100644 lib/workos/types/create_connected_account_state.rb create mode 100644 lib/workos/types/create_organization_connected_account_state.rb create mode 100644 lib/workos/types/data_integrations_create_client_credentials_connection_request_connection_owner.rb create mode 100644 lib/workos/types/organization_connected_account_state.rb create mode 100644 rbi/workos/connected_account_write_response.rbi create mode 100644 rbi/workos/connected_account_write_response_warning.rbi create mode 100644 rbi/workos/create_connected_account.rbi create mode 100644 rbi/workos/create_organization_connected_account.rbi create mode 100644 rbi/workos/data_integrations_create_client_credentials_connection_request.rbi create mode 100644 rbi/workos/organization_connected_account.rbi diff --git a/lib/workos/pipes.rb b/lib/workos/pipes.rb index 9c271cdf..c68d1646 100644 --- a/lib/workos/pipes.rb +++ b/lib/workos/pipes.rb @@ -184,31 +184,83 @@ def delete_data_integration( nil end + # Create another API key connected account + # @param slug [String] The identifier of the integration. + # @param account_display_name [String, nil] A mutable, non-unique label. Omit to preserve an existing label; null clears it. Labels are never account identifiers. + # @param account_identifier [String, nil] A developer-attested provider account identifier, never inferred from a label or credential. Omit to preserve an existing identifier; null clears it. + # @param user_id [String] A [User](https://workos.com/docs/reference/authkit/user) identifier. + # @param organization_id [String, nil] An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`. + # @param connection_owner [WorkOS::Types::DataIntegrationsCreateApiKeyConnectionRequestConnectionOwner, nil] Whose connection to create or rotate. `user` (the default) addresses the connection owned by `user_id`. `organization` addresses the connection shared by every member of `organization_id`; `user_id` then identifies the member performing the request and must be an active member of the organization. + # @param secret [String] The API key secret to store for this integration. + # @param connection_intent [String] Must be `add`: this endpoint only creates another connection. The first connection for an owner shape fills the compatibility slot; later connections are standard. Creating an additional connection is not yet available: until it is, `add` succeeds only when the owner has no connection for this integration and otherwise returns 404 `multiple_connections_unavailable`. + # @param request_options [Hash] (see WorkOS::Types::RequestOptions) + # @return [WorkOS::ConnectedAccountWriteResponse] + def create_data_integration_api_key( + slug:, + user_id:, + secret:, + connection_intent:, + account_display_name: WorkOS::OMIT, + account_identifier: WorkOS::OMIT, + organization_id: nil, + connection_owner: nil, + request_options: {} + ) + body = { + "user_id" => user_id, + "organization_id" => organization_id, + "connection_owner" => connection_owner, + "secret" => secret, + "connection_intent" => connection_intent + }.compact + body["account_display_name"] = account_display_name unless account_display_name.equal?(WorkOS::OMIT) + body["account_identifier"] = account_identifier unless account_identifier.equal?(WorkOS::OMIT) + response = @client.request( + method: :post, + path: "/data-integrations/#{WorkOS::Util.encode_path(slug)}/api-key", + auth: true, + body: body, + request_options: request_options + ) + result = WorkOS::ConnectedAccountWriteResponse.new(response.body) + result.last_response = WorkOS::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"]) + result + end + # Upsert an API key for a connected account # @param slug [String] The identifier of the integration. + # @param account_display_name [String, nil] A mutable, non-unique label. Omit to preserve an existing label; null clears it. Labels are never account identifiers. + # @param account_identifier [String, nil] A developer-attested provider account identifier, never inferred from a label or credential. Omit to preserve an existing identifier; null clears it. # @param user_id [String] A [User](https://workos.com/docs/reference/authkit/user) identifier. # @param organization_id [String, nil] An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`. - # @param connected_account_id [String, nil] A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to rotate a specific existing connection. # @param connection_owner [WorkOS::Types::DataIntegrationsUpsertApiKeyRequestConnectionOwner, nil] Whose connection to create or rotate. `user` (the default) addresses the connection owned by `user_id`. `organization` addresses the connection shared by every member of `organization_id`; `user_id` then identifies the member performing the request and must be an active member of the organization. # @param secret [String] The API key secret to store for this integration. + # @param connection_intent [String, nil] Reauthorize exactly the connection named by `connected_account_id`. + # @param connected_account_id [String, nil] The exact connected account to reauthorize. Required with `connection_intent: reauthorize`. # @param request_options [Hash] (see WorkOS::Types::RequestOptions) - # @return [WorkOS::ConnectedAccount] + # @return [WorkOS::ConnectedAccountWriteResponse] def update_data_integration_api_key( slug:, user_id:, secret:, + account_display_name: WorkOS::OMIT, + account_identifier: WorkOS::OMIT, organization_id: nil, - connected_account_id: nil, connection_owner: nil, + connection_intent: nil, + connected_account_id: nil, request_options: {} ) body = { "user_id" => user_id, "organization_id" => organization_id, - "connected_account_id" => connected_account_id, "connection_owner" => connection_owner, - "secret" => secret + "secret" => secret, + "connection_intent" => connection_intent, + "connected_account_id" => connected_account_id }.compact + body["account_display_name"] = account_display_name unless account_display_name.equal?(WorkOS::OMIT) + body["account_identifier"] = account_identifier unless account_identifier.equal?(WorkOS::OMIT) response = @client.request( method: :put, path: "/data-integrations/#{WorkOS::Util.encode_path(slug)}/api-key", @@ -216,27 +268,33 @@ def update_data_integration_api_key( body: body, request_options: request_options ) - result = WorkOS::ConnectedAccount.new(response.body) + result = WorkOS::ConnectedAccountWriteResponse.new(response.body) result.last_response = WorkOS::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"]) result end # Get authorization URL # @param slug [String] The slug identifier of the provider (e.g., `github`, `slack`, `notion`). + # @param account_display_name [String, nil] A mutable, non-unique label. Omit to preserve an existing label; null clears it. Labels are never account identifiers. # @param user_id [String] The ID of the user to authorize. When `connection_owner` is `organization`, this is the user authorizing on behalf of the organization; they must be an active member of the organization and do not become the owner of the resulting connected account. # @param organization_id [String, nil] An organization ID to scope the authorization to a specific organization. Required when `connection_owner` is `organization`. # @param connection_owner [WorkOS::Types::DataIntegrationsGetDataIntegrationAuthorizeUrlRequestConnectionOwner, nil] Who will own the connected account. `user` (the default) connects the user's own account. `organization` connects the organization's shared account and requires `organization_id`. # @param return_to [String, nil] The URL to redirect the user to after authorization. # @param config [Hash{String => String}, nil] Connect-time config values for the provider-declared `installation`-scope fields (e.g. a Zendesk `subdomain`), keyed by the config field. Only fields the provider declares may be supplied, and required fields must be provided unless already pinned on the integration. + # @param connection_intent [String, nil] Create another connection. The first connection for an owner shape fills the compatibility slot; later connections are standard. Creating an additional connection is not yet available: until it is, `add` succeeds only when the owner has no connection for this integration and otherwise returns 404 `multiple_connections_unavailable`. Omit `connection_intent` to use the compatibility connection, or send `reauthorize` with `connected_account_id` to reauthorize one exact connection. + # @param connected_account_id [String, nil] The exact connected account to reauthorize. Required with `connection_intent: reauthorize`. # @param request_options [Hash] (see WorkOS::Types::RequestOptions) # @return [WorkOS::DataIntegrationAuthorizeUrlResponse] def authorize_data_integration( slug:, user_id:, + account_display_name: WorkOS::OMIT, organization_id: nil, connection_owner: nil, return_to: nil, config: nil, + connection_intent: nil, + connected_account_id: nil, request_options: {} ) body = { @@ -244,8 +302,11 @@ def authorize_data_integration( "organization_id" => organization_id, "connection_owner" => connection_owner, "return_to" => return_to, - "config" => config + "config" => config, + "connection_intent" => connection_intent, + "connected_account_id" => connected_account_id }.compact + body["account_display_name"] = account_display_name unless account_display_name.equal?(WorkOS::OMIT) response = @client.request( method: :post, path: "/data-integrations/#{WorkOS::Util.encode_path(slug)}/authorize", @@ -258,37 +319,95 @@ def authorize_data_integration( result end + # Create another client credentials connected account + # @param slug [String] The identifier of the integration. + # @param account_display_name [String, nil] A mutable, non-unique label. Omit to preserve an existing label; null clears it. Labels are never account identifiers. + # @param account_identifier [String, nil] A developer-attested provider account identifier, never inferred from a label or credential. Omit to preserve an existing identifier; null clears it. + # @param user_id [String] A [User](https://workos.com/docs/reference/authkit/user) identifier. + # @param organization_id [String, nil] An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`. + # @param connection_owner [WorkOS::Types::DataIntegrationsCreateClientCredentialsConnectionRequestConnectionOwner, nil] Whose connection to create or rotate. `user` (the default) addresses the connection owned by `user_id`. `organization` addresses the connection shared by every member of `organization_id`; `user_id` then identifies the member performing the request and must be an active member of the organization. + # @param client_id [String] The OAuth client ID to store for this integration. + # @param client_secret [String] The OAuth client secret to store for this integration. + # @param config [Hash{String => String}, nil] Provider-specific configuration values collected for this installation, keyed by the provider's config field descriptors. + # @param connection_intent [String] Must be `add`: this endpoint only creates another connection. The first connection for an owner shape fills the compatibility slot; later connections are standard. Creating an additional connection is not yet available: until it is, `add` succeeds only when the owner has no connection for this integration and otherwise returns 404 `multiple_connections_unavailable`. + # @param request_options [Hash] (see WorkOS::Types::RequestOptions) + # @return [WorkOS::ConnectedAccountWriteResponse] + def create_data_integration_client_credential( + slug:, + user_id:, + client_id:, + client_secret:, + connection_intent:, + account_display_name: WorkOS::OMIT, + account_identifier: WorkOS::OMIT, + organization_id: nil, + connection_owner: nil, + config: nil, + request_options: {} + ) + body = { + "user_id" => user_id, + "organization_id" => organization_id, + "connection_owner" => connection_owner, + "client_id" => client_id, + "client_secret" => client_secret, + "config" => config, + "connection_intent" => connection_intent + }.compact + body["account_display_name"] = account_display_name unless account_display_name.equal?(WorkOS::OMIT) + body["account_identifier"] = account_identifier unless account_identifier.equal?(WorkOS::OMIT) + response = @client.request( + method: :post, + path: "/data-integrations/#{WorkOS::Util.encode_path(slug)}/client-credentials", + auth: true, + body: body, + request_options: request_options + ) + result = WorkOS::ConnectedAccountWriteResponse.new(response.body) + result.last_response = WorkOS::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"]) + result + end + # Upsert client credentials for a connected account # @param slug [String] The identifier of the integration. + # @param account_display_name [String, nil] A mutable, non-unique label. Omit to preserve an existing label; null clears it. Labels are never account identifiers. + # @param account_identifier [String, nil] A developer-attested provider account identifier, never inferred from a label or credential. Omit to preserve an existing identifier; null clears it. # @param user_id [String] A [User](https://workos.com/docs/reference/authkit/user) identifier. # @param organization_id [String, nil] An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`. - # @param connected_account_id [String, nil] A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to rotate a specific existing connection. # @param connection_owner [WorkOS::Types::DataIntegrationsUpsertClientCredentialsRequestConnectionOwner, nil] Whose connection to create or rotate. `user` (the default) addresses the connection owned by `user_id`. `organization` addresses the connection shared by every member of `organization_id`; `user_id` then identifies the member performing the request and must be an active member of the organization. # @param client_id [String] The OAuth client ID to store for this integration. # @param client_secret [String] The OAuth client secret to store for this integration. # @param config [Hash{String => String}, nil] Provider-specific configuration values collected for this installation, keyed by the provider's config field descriptors. + # @param connection_intent [String, nil] Reauthorize exactly the connection named by `connected_account_id`. + # @param connected_account_id [String, nil] The exact connected account to reauthorize. Required with `connection_intent: reauthorize`. # @param request_options [Hash] (see WorkOS::Types::RequestOptions) - # @return [WorkOS::ConnectedAccount] + # @return [WorkOS::ConnectedAccountWriteResponse] def update_data_integration_client_credentials( slug:, user_id:, client_id:, client_secret:, + account_display_name: WorkOS::OMIT, + account_identifier: WorkOS::OMIT, organization_id: nil, - connected_account_id: nil, connection_owner: nil, config: nil, + connection_intent: nil, + connected_account_id: nil, request_options: {} ) body = { "user_id" => user_id, "organization_id" => organization_id, - "connected_account_id" => connected_account_id, "connection_owner" => connection_owner, "client_id" => client_id, "client_secret" => client_secret, - "config" => config + "config" => config, + "connection_intent" => connection_intent, + "connected_account_id" => connected_account_id }.compact + body["account_display_name"] = account_display_name unless account_display_name.equal?(WorkOS::OMIT) + body["account_identifier"] = account_identifier unless account_identifier.equal?(WorkOS::OMIT) response = @client.request( method: :put, path: "/data-integrations/#{WorkOS::Util.encode_path(slug)}/client-credentials", @@ -296,7 +415,7 @@ def update_data_integration_client_credentials( body: body, request_options: request_options ) - result = WorkOS::ConnectedAccount.new(response.body) + result = WorkOS::ConnectedAccountWriteResponse.new(response.body) result.last_response = WorkOS::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"]) result end @@ -484,21 +603,29 @@ def get_organization_connected_account( # Import an organization connected account # @param organization_id [String] An [Organization](https://workos.com/docs/reference/organization) identifier. # @param slug [String] The slug identifier of the provider (e.g., `github`, `slack`, `notion`). + # @param account_display_name [String, nil] A mutable, non-unique connection label; null clears it. Not an account identifier. + # @param account_identifier [String, nil] A developer-attested account identifier; null clears it. # @param access_token [String, nil] The OAuth access token for the connected account. # @param refresh_token [String, nil] The OAuth refresh token for the connected account. # @param expires_at [String, nil] The ISO-8601 timestamp when the access token expires. Required when `access_token` is provided for tokens that expire. # @param scopes [Array, nil] The OAuth scopes granted for this connection. - # @param state [WorkOS::Types::ConnectedAccountInputState, nil] Explicitly set the state of the connected account. When omitted, the state is derived from the token combination provided. + # @param state [WorkOS::Types::CreateOrganizationConnectedAccountState, nil] Explicitly set the state of the connected account. When omitted, the state is derived from the token combination provided. + # @param user_id [String] The [User](https://workos.com/docs/reference/authkit/user) identifier of the organization member on whose behalf the connected account is being imported or updated. The user must be an active member of the organization. + # @param connection_intent [String, nil] Set to `add` to create another connected account. Omit this field for permanent compatibility behavior. Creating an additional connection is not yet available: until it is, `add` succeeds only when the owner has no connection for this integration, which creates the compatibility connection, and otherwise returns 404 `multiple_connections_unavailable`. # @param request_options [Hash] (see WorkOS::Types::RequestOptions) - # @return [WorkOS::ConnectedAccount] + # @return [WorkOS::ConnectedAccountWriteResponse] def create_organization_connected_account( organization_id:, slug:, + user_id:, + account_display_name: WorkOS::OMIT, + account_identifier: WorkOS::OMIT, access_token: nil, refresh_token: nil, expires_at: nil, scopes: nil, state: nil, + connection_intent: nil, request_options: {} ) body = { @@ -506,8 +633,12 @@ def create_organization_connected_account( "refresh_token" => refresh_token, "expires_at" => expires_at, "scopes" => scopes, - "state" => state + "state" => state, + "user_id" => user_id, + "connection_intent" => connection_intent }.compact + body["account_display_name"] = account_display_name unless account_display_name.equal?(WorkOS::OMIT) + body["account_identifier"] = account_identifier unless account_identifier.equal?(WorkOS::OMIT) response = @client.request( method: :post, path: "/organizations/#{WorkOS::Util.encode_path(organization_id)}/connected_accounts/#{WorkOS::Util.encode_path(slug)}", @@ -515,7 +646,7 @@ def create_organization_connected_account( body: body, request_options: request_options ) - result = WorkOS::ConnectedAccount.new(response.body) + result = WorkOS::ConnectedAccountWriteResponse.new(response.body) result.last_response = WorkOS::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"]) result end @@ -523,18 +654,25 @@ def create_organization_connected_account( # Update an organization connected account # @param organization_id [String] An [Organization](https://workos.com/docs/reference/organization) identifier. # @param slug [String] The slug identifier of the provider (e.g., `github`, `slack`, `notion`). + # @param account_display_name [String, nil] A mutable, non-unique connection label; null clears it. Not an account identifier. + # @param account_identifier [String, nil] A developer-attested account identifier; null clears it. # @param access_token [String, nil] The OAuth access token for the connected account. # @param refresh_token [String, nil] The OAuth refresh token for the connected account. # @param expires_at [String, nil] The ISO-8601 timestamp when the access token expires. Required when `access_token` is provided for tokens that expire. # @param scopes [Array, nil] The OAuth scopes granted for this connection. - # @param state [WorkOS::Types::ConnectedAccountInputState, nil] Explicitly set the state of the connected account. When omitted, the state is derived from the token combination provided. - # @param supports_multiple_connections [Boolean, nil] Set to `true` to use the plural connection contract. When omitted or `false`, only the compatibility connection is considered. + # @param state [WorkOS::Types::OrganizationConnectedAccountState, nil] Explicitly set the state of the connected account. When omitted, the state is derived from the token combination provided. + # @param user_id [String] The [User](https://workos.com/docs/reference/authkit/user) identifier of the organization member on whose behalf the connected account is being imported or updated. The user must be an active member of the organization. + # @param supports_multiple_connections [Boolean, nil] Accepted for compatibility; does not change update targeting. Omit intent and selector to update the compatibility connection, or supply `connected_account_id` to update an exact connection. # @param connected_account_id [String, nil] A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select the connection to update. + # @param connection_intent [String, nil] Set to `reauthorize` with `connected_account_id` to update one exact connection. The intent may be omitted when supplying an ID. Omit both for permanent compatibility behavior. # @param request_options [Hash] (see WorkOS::Types::RequestOptions) - # @return [WorkOS::ConnectedAccount] + # @return [WorkOS::ConnectedAccountWriteResponse] def update_organization_connected_account( organization_id:, slug:, + user_id:, + account_display_name: WorkOS::OMIT, + account_identifier: WorkOS::OMIT, access_token: nil, refresh_token: nil, expires_at: nil, @@ -542,19 +680,24 @@ def update_organization_connected_account( state: nil, supports_multiple_connections: nil, connected_account_id: nil, + connection_intent: nil, request_options: {} ) params = { "supports_multiple_connections" => supports_multiple_connections, - "connected_account_id" => connected_account_id + "connected_account_id" => connected_account_id, + "connection_intent" => connection_intent }.compact body = { "access_token" => access_token, "refresh_token" => refresh_token, "expires_at" => expires_at, "scopes" => scopes, - "state" => state + "state" => state, + "user_id" => user_id }.compact + body["account_display_name"] = account_display_name unless account_display_name.equal?(WorkOS::OMIT) + body["account_identifier"] = account_identifier unless account_identifier.equal?(WorkOS::OMIT) response = @client.request( method: :put, path: "/organizations/#{WorkOS::Util.encode_path(organization_id)}/connected_accounts/#{WorkOS::Util.encode_path(slug)}", @@ -563,7 +706,7 @@ def update_organization_connected_account( body: body, request_options: request_options ) - result = WorkOS::ConnectedAccount.new(response.body) + result = WorkOS::ConnectedAccountWriteResponse.new(response.body) result.last_response = WorkOS::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"]) result end @@ -657,22 +800,28 @@ def get_user_connected_account( # Import a connected account # @param user_id [String] A [User](https://workos.com/docs/reference/authkit/user) identifier. # @param slug [String] The slug identifier of the provider (e.g., `github`, `slack`, `notion`). + # @param account_display_name [String, nil] A mutable, non-unique connection label; null clears it. Not an account identifier. + # @param account_identifier [String, nil] A developer-attested account identifier; null clears it. # @param access_token [String, nil] The OAuth access token for the connected account. # @param refresh_token [String, nil] The OAuth refresh token for the connected account. # @param expires_at [String, nil] The ISO-8601 timestamp when the access token expires. Required when `access_token` is provided for tokens that expire. # @param scopes [Array, nil] The OAuth scopes granted for this connection. - # @param state [WorkOS::Types::ConnectedAccountInputState, nil] Explicitly set the state of the connected account. When omitted, the state is derived from the token combination provided. + # @param state [WorkOS::Types::CreateConnectedAccountState, nil] Explicitly set the state of the connected account. When omitted, the state is derived from the token combination provided. + # @param connection_intent [String, nil] Set to `add` to create another connected account. Omit this field for permanent compatibility behavior. Creating an additional connection is not yet available: until it is, `add` succeeds only when the owner has no connection for this integration, which creates the compatibility connection, and otherwise returns 404 `multiple_connections_unavailable`. # @param organization_id [String, nil] An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter if the connection is scoped to an organization. # @param request_options [Hash] (see WorkOS::Types::RequestOptions) - # @return [WorkOS::ConnectedAccount] + # @return [WorkOS::ConnectedAccountWriteResponse] def create_user_connected_account( user_id:, slug:, + account_display_name: WorkOS::OMIT, + account_identifier: WorkOS::OMIT, access_token: nil, refresh_token: nil, expires_at: nil, scopes: nil, state: nil, + connection_intent: nil, organization_id: nil, request_options: {} ) @@ -684,8 +833,11 @@ def create_user_connected_account( "refresh_token" => refresh_token, "expires_at" => expires_at, "scopes" => scopes, - "state" => state + "state" => state, + "connection_intent" => connection_intent }.compact + body["account_display_name"] = account_display_name unless account_display_name.equal?(WorkOS::OMIT) + body["account_identifier"] = account_identifier unless account_identifier.equal?(WorkOS::OMIT) response = @client.request( method: :post, path: "/user_management/users/#{WorkOS::Util.encode_path(user_id)}/connected_accounts/#{WorkOS::Util.encode_path(slug)}", @@ -694,7 +846,7 @@ def create_user_connected_account( body: body, request_options: request_options ) - result = WorkOS::ConnectedAccount.new(response.body) + result = WorkOS::ConnectedAccountWriteResponse.new(response.body) result.last_response = WorkOS::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"]) result end @@ -702,19 +854,24 @@ def create_user_connected_account( # Update a connected account # @param user_id [String] A [User](https://workos.com/docs/reference/authkit/user) identifier. # @param slug [String] The slug identifier of the provider (e.g., `github`, `slack`, `notion`). + # @param account_display_name [String, nil] A mutable, non-unique connection label; null clears it. Not an account identifier. + # @param account_identifier [String, nil] A developer-attested account identifier; null clears it. # @param access_token [String, nil] The OAuth access token for the connected account. # @param refresh_token [String, nil] The OAuth refresh token for the connected account. # @param expires_at [String, nil] The ISO-8601 timestamp when the access token expires. Required when `access_token` is provided for tokens that expire. # @param scopes [Array, nil] The OAuth scopes granted for this connection. # @param state [WorkOS::Types::ConnectedAccountInputState, nil] Explicitly set the state of the connected account. When omitted, the state is derived from the token combination provided. # @param organization_id [String, nil] An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter if the connection is scoped to an organization. - # @param supports_multiple_connections [Boolean, nil] Set to `true` to use the plural connection contract. When omitted or `false`, only the compatibility connection is considered. + # @param supports_multiple_connections [Boolean, nil] Accepted for compatibility; does not change update targeting. Omit intent and selector to update the compatibility connection, or supply `connected_account_id` to update an exact connection. # @param connected_account_id [String, nil] A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select the connection to update. + # @param connection_intent [String, nil] Set to `reauthorize` with `connected_account_id` to update one exact connection. The intent may be omitted when supplying an ID. Omit both for permanent compatibility behavior. # @param request_options [Hash] (see WorkOS::Types::RequestOptions) - # @return [WorkOS::ConnectedAccount] + # @return [WorkOS::ConnectedAccountWriteResponse] def update_user_connected_account( user_id:, slug:, + account_display_name: WorkOS::OMIT, + account_identifier: WorkOS::OMIT, access_token: nil, refresh_token: nil, expires_at: nil, @@ -723,12 +880,14 @@ def update_user_connected_account( organization_id: nil, supports_multiple_connections: nil, connected_account_id: nil, + connection_intent: nil, request_options: {} ) params = { "organization_id" => organization_id, "supports_multiple_connections" => supports_multiple_connections, - "connected_account_id" => connected_account_id + "connected_account_id" => connected_account_id, + "connection_intent" => connection_intent }.compact body = { "access_token" => access_token, @@ -737,6 +896,8 @@ def update_user_connected_account( "scopes" => scopes, "state" => state }.compact + body["account_display_name"] = account_display_name unless account_display_name.equal?(WorkOS::OMIT) + body["account_identifier"] = account_identifier unless account_identifier.equal?(WorkOS::OMIT) response = @client.request( method: :put, path: "/user_management/users/#{WorkOS::Util.encode_path(user_id)}/connected_accounts/#{WorkOS::Util.encode_path(slug)}", @@ -745,7 +906,7 @@ def update_user_connected_account( body: body, request_options: request_options ) - result = WorkOS::ConnectedAccount.new(response.body) + result = WorkOS::ConnectedAccountWriteResponse.new(response.body) result.last_response = WorkOS::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"]) result end diff --git a/lib/workos/pipes/add_data_integrations_get_data_integration_authorize_url_request.rb b/lib/workos/pipes/add_data_integrations_get_data_integration_authorize_url_request.rb new file mode 100644 index 00000000..4017aa01 --- /dev/null +++ b/lib/workos/pipes/add_data_integrations_get_data_integration_authorize_url_request.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class AddDataIntegrationsGetDataIntegrationAuthorizeUrlRequest < WorkOS::Types::BaseModel + HASH_ATTRS = { + account_display_name: :account_display_name, + user_id: :user_id, + organization_id: :organization_id, + connection_owner: :connection_owner, + return_to: :return_to, + config: :config, + connection_intent: :connection_intent + }.freeze + + attr_accessor \ + :account_display_name, + :user_id, + :organization_id, + :connection_owner, + :return_to, + :config, + :connection_intent + + def initialize(json) + hash = self.class.normalize(json) + @account_display_name = hash[:account_display_name] + @user_id = hash[:user_id] + @organization_id = hash[:organization_id] + @connection_owner = hash[:connection_owner] + @return_to = hash[:return_to] + @config = hash[:config] || {} + @connection_intent = hash[:connection_intent] + end + end +end diff --git a/lib/workos/pipes/connected_account.rb b/lib/workos/pipes/connected_account.rb index 789684be..0f6ebc5e 100644 --- a/lib/workos/pipes/connected_account.rb +++ b/lib/workos/pipes/connected_account.rb @@ -19,6 +19,8 @@ class ConnectedAccount < WorkOS::Types::BaseModel client_secret_last_4: :client_secret_last_4, config: :config, state: :state, + established_by_user_id: :established_by_user_id, + state_reason: :state_reason, created_at: :created_at, updated_at: :updated_at }.freeze @@ -38,6 +40,8 @@ class ConnectedAccount < WorkOS::Types::BaseModel :client_secret_last_4, :config, :state, + :established_by_user_id, + :state_reason, :created_at, :updated_at @@ -57,6 +61,8 @@ def initialize(json) @client_secret_last_4 = hash[:client_secret_last_4] @config = hash[:config] || {} @state = hash[:state] + @established_by_user_id = hash[:established_by_user_id] + @state_reason = hash[:state_reason] @created_at = hash[:created_at] @updated_at = hash[:updated_at] end diff --git a/lib/workos/pipes/connected_account_input.rb b/lib/workos/pipes/connected_account_input.rb index 83533cff..18e4f127 100644 --- a/lib/workos/pipes/connected_account_input.rb +++ b/lib/workos/pipes/connected_account_input.rb @@ -5,6 +5,8 @@ module WorkOS class ConnectedAccountInput < WorkOS::Types::BaseModel HASH_ATTRS = { + account_display_name: :account_display_name, + account_identifier: :account_identifier, access_token: :access_token, refresh_token: :refresh_token, expires_at: :expires_at, @@ -13,6 +15,8 @@ class ConnectedAccountInput < WorkOS::Types::BaseModel }.freeze attr_accessor \ + :account_display_name, + :account_identifier, :access_token, :refresh_token, :expires_at, @@ -21,6 +25,8 @@ class ConnectedAccountInput < WorkOS::Types::BaseModel def initialize(json) hash = self.class.normalize(json) + @account_display_name = hash[:account_display_name] + @account_identifier = hash[:account_identifier] @access_token = hash[:access_token] @refresh_token = hash[:refresh_token] @expires_at = hash[:expires_at] diff --git a/lib/workos/pipes/connected_account_write_response.rb b/lib/workos/pipes/connected_account_write_response.rb new file mode 100644 index 00000000..2a8e1a65 --- /dev/null +++ b/lib/workos/pipes/connected_account_write_response.rb @@ -0,0 +1,73 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class ConnectedAccountWriteResponse < WorkOS::Types::BaseModel + HASH_ATTRS = { + object: :object, + id: :id, + connection_role: :connection_role, + account_identifier: :account_identifier, + account_display_name: :account_display_name, + user_id: :user_id, + organization_id: :organization_id, + scopes: :scopes, + auth_method: :auth_method, + api_key_last_4: :api_key_last_4, + client_id: :client_id, + client_secret_last_4: :client_secret_last_4, + config: :config, + state: :state, + established_by_user_id: :established_by_user_id, + state_reason: :state_reason, + created_at: :created_at, + updated_at: :updated_at, + warnings: :warnings + }.freeze + + attr_accessor \ + :object, + :id, + :connection_role, + :account_identifier, + :account_display_name, + :user_id, + :organization_id, + :scopes, + :auth_method, + :api_key_last_4, + :client_id, + :client_secret_last_4, + :config, + :state, + :established_by_user_id, + :state_reason, + :created_at, + :updated_at, + :warnings + + def initialize(json) + hash = self.class.normalize(json) + @object = hash[:object] + @id = hash[:id] + @connection_role = hash[:connection_role] + @account_identifier = hash[:account_identifier] + @account_display_name = hash[:account_display_name] + @user_id = hash[:user_id] + @organization_id = hash[:organization_id] + @scopes = hash[:scopes] || [] + @auth_method = hash[:auth_method] + @api_key_last_4 = hash[:api_key_last_4] + @client_id = hash[:client_id] + @client_secret_last_4 = hash[:client_secret_last_4] + @config = hash[:config] || {} + @state = hash[:state] + @established_by_user_id = hash[:established_by_user_id] + @state_reason = hash[:state_reason] + @created_at = hash[:created_at] + @updated_at = hash[:updated_at] + @warnings = (hash[:warnings] || []).map { |item| item ? WorkOS::ConnectedAccountWriteResponseWarning.new(item) : nil } + end + end +end diff --git a/lib/workos/pipes/connected_account_write_response_warning.rb b/lib/workos/pipes/connected_account_write_response_warning.rb new file mode 100644 index 00000000..282fd30e --- /dev/null +++ b/lib/workos/pipes/connected_account_write_response_warning.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class ConnectedAccountWriteResponseWarning < WorkOS::Types::BaseModel + HASH_ATTRS = { + code: :code, + message: :message + }.freeze + + attr_accessor \ + :code, + :message + + def initialize(json) + hash = self.class.normalize(json) + @code = hash[:code] + @message = hash[:message] + end + end +end diff --git a/lib/workos/pipes/create_connected_account.rb b/lib/workos/pipes/create_connected_account.rb new file mode 100644 index 00000000..9520535d --- /dev/null +++ b/lib/workos/pipes/create_connected_account.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class CreateConnectedAccount < WorkOS::Types::BaseModel + HASH_ATTRS = { + account_display_name: :account_display_name, + account_identifier: :account_identifier, + access_token: :access_token, + refresh_token: :refresh_token, + expires_at: :expires_at, + scopes: :scopes, + state: :state, + connection_intent: :connection_intent + }.freeze + + attr_accessor \ + :account_display_name, + :account_identifier, + :access_token, + :refresh_token, + :expires_at, + :scopes, + :state, + :connection_intent + + def initialize(json) + hash = self.class.normalize(json) + @account_display_name = hash[:account_display_name] + @account_identifier = hash[:account_identifier] + @access_token = hash[:access_token] + @refresh_token = hash[:refresh_token] + @expires_at = hash[:expires_at] + @scopes = hash[:scopes] || [] + @state = hash[:state] + @connection_intent = hash[:connection_intent] + end + end +end diff --git a/lib/workos/pipes/create_organization_connected_account.rb b/lib/workos/pipes/create_organization_connected_account.rb new file mode 100644 index 00000000..2e15c243 --- /dev/null +++ b/lib/workos/pipes/create_organization_connected_account.rb @@ -0,0 +1,43 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class CreateOrganizationConnectedAccount < WorkOS::Types::BaseModel + HASH_ATTRS = { + account_display_name: :account_display_name, + account_identifier: :account_identifier, + access_token: :access_token, + refresh_token: :refresh_token, + expires_at: :expires_at, + scopes: :scopes, + state: :state, + user_id: :user_id, + connection_intent: :connection_intent + }.freeze + + attr_accessor \ + :account_display_name, + :account_identifier, + :access_token, + :refresh_token, + :expires_at, + :scopes, + :state, + :user_id, + :connection_intent + + def initialize(json) + hash = self.class.normalize(json) + @account_display_name = hash[:account_display_name] + @account_identifier = hash[:account_identifier] + @access_token = hash[:access_token] + @refresh_token = hash[:refresh_token] + @expires_at = hash[:expires_at] + @scopes = hash[:scopes] || [] + @state = hash[:state] + @user_id = hash[:user_id] + @connection_intent = hash[:connection_intent] + end + end +end diff --git a/lib/workos/pipes/data_integration_credentials_response.rb b/lib/workos/pipes/data_integration_credentials_response.rb index 97e5fd12..c5aa0d17 100644 --- a/lib/workos/pipes/data_integration_credentials_response.rb +++ b/lib/workos/pipes/data_integration_credentials_response.rb @@ -18,7 +18,7 @@ class DataIntegrationCredentialsResponse < WorkOS::Types::BaseModel def initialize(json) hash = self.class.normalize(json) @active = hash[:active] - @credential = hash[:credential] ? WorkOS::DataIntegrationCredentialsResponseCredential.new(hash[:credential]) : nil + @credential = hash[:credential] ? WorkOS::DataIntegrationVendedCredential.new(hash[:credential]) : nil @error = hash[:error] end end diff --git a/lib/workos/pipes/data_integration_vended_credential.rb b/lib/workos/pipes/data_integration_vended_credential.rb new file mode 100644 index 00000000..e29645cd --- /dev/null +++ b/lib/workos/pipes/data_integration_vended_credential.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class DataIntegrationVendedCredential < WorkOS::Types::BaseModel + HASH_ATTRS = { + object: :object, + auth_method: :auth_method, + value: :value, + expires_at: :expires_at, + scopes: :scopes, + missing_scopes: :missing_scopes, + config: :config, + metadata: :metadata + }.freeze + + attr_accessor \ + :object, + :auth_method, + :value, + :expires_at, + :scopes, + :missing_scopes, + :config, + :metadata + + def initialize(json) + hash = self.class.normalize(json) + @object = hash[:object] + @auth_method = hash[:auth_method] + @value = hash[:value] + @expires_at = hash[:expires_at] + @scopes = hash[:scopes] || [] + @missing_scopes = hash[:missing_scopes] || [] + @config = hash[:config] || {} + @metadata = hash[:metadata] || {} + end + end +end diff --git a/lib/workos/pipes/data_integrations_create_api_key_connection_request.rb b/lib/workos/pipes/data_integrations_create_api_key_connection_request.rb new file mode 100644 index 00000000..36bf6a0e --- /dev/null +++ b/lib/workos/pipes/data_integrations_create_api_key_connection_request.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class DataIntegrationsCreateApiKeyConnectionRequest < WorkOS::Types::BaseModel + HASH_ATTRS = { + account_display_name: :account_display_name, + account_identifier: :account_identifier, + user_id: :user_id, + organization_id: :organization_id, + connection_owner: :connection_owner, + secret: :secret, + connection_intent: :connection_intent + }.freeze + + attr_accessor \ + :account_display_name, + :account_identifier, + :user_id, + :organization_id, + :connection_owner, + :secret, + :connection_intent + + def initialize(json) + hash = self.class.normalize(json) + @account_display_name = hash[:account_display_name] + @account_identifier = hash[:account_identifier] + @user_id = hash[:user_id] + @organization_id = hash[:organization_id] + @connection_owner = hash[:connection_owner] + @secret = hash[:secret] + @connection_intent = hash[:connection_intent] + end + end +end diff --git a/lib/workos/pipes/data_integrations_create_client_credentials_connection_request.rb b/lib/workos/pipes/data_integrations_create_client_credentials_connection_request.rb new file mode 100644 index 00000000..336ef1dc --- /dev/null +++ b/lib/workos/pipes/data_integrations_create_client_credentials_connection_request.rb @@ -0,0 +1,43 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class DataIntegrationsCreateClientCredentialsConnectionRequest < WorkOS::Types::BaseModel + HASH_ATTRS = { + account_display_name: :account_display_name, + account_identifier: :account_identifier, + user_id: :user_id, + organization_id: :organization_id, + connection_owner: :connection_owner, + client_id: :client_id, + client_secret: :client_secret, + config: :config, + connection_intent: :connection_intent + }.freeze + + attr_accessor \ + :account_display_name, + :account_identifier, + :user_id, + :organization_id, + :connection_owner, + :client_id, + :client_secret, + :config, + :connection_intent + + def initialize(json) + hash = self.class.normalize(json) + @account_display_name = hash[:account_display_name] + @account_identifier = hash[:account_identifier] + @user_id = hash[:user_id] + @organization_id = hash[:organization_id] + @connection_owner = hash[:connection_owner] + @client_id = hash[:client_id] + @client_secret = hash[:client_secret] + @config = hash[:config] || {} + @connection_intent = hash[:connection_intent] + end + end +end diff --git a/lib/workos/pipes/data_integrations_get_data_integration_authorize_url_request.rb b/lib/workos/pipes/data_integrations_get_data_integration_authorize_url_request.rb index 7572fe04..e5c4c1ee 100644 --- a/lib/workos/pipes/data_integrations_get_data_integration_authorize_url_request.rb +++ b/lib/workos/pipes/data_integrations_get_data_integration_authorize_url_request.rb @@ -5,6 +5,7 @@ module WorkOS class DataIntegrationsGetDataIntegrationAuthorizeUrlRequest < WorkOS::Types::BaseModel HASH_ATTRS = { + account_display_name: :account_display_name, user_id: :user_id, organization_id: :organization_id, connection_owner: :connection_owner, @@ -13,6 +14,7 @@ class DataIntegrationsGetDataIntegrationAuthorizeUrlRequest < WorkOS::Types::Bas }.freeze attr_accessor \ + :account_display_name, :user_id, :organization_id, :connection_owner, @@ -21,6 +23,7 @@ class DataIntegrationsGetDataIntegrationAuthorizeUrlRequest < WorkOS::Types::Bas def initialize(json) hash = self.class.normalize(json) + @account_display_name = hash[:account_display_name] @user_id = hash[:user_id] @organization_id = hash[:organization_id] @connection_owner = hash[:connection_owner] diff --git a/lib/workos/pipes/data_integrations_list_response_data_connected_account.rb b/lib/workos/pipes/data_integrations_list_response_data_connected_account.rb index df078128..99703c5b 100644 --- a/lib/workos/pipes/data_integrations_list_response_data_connected_account.rb +++ b/lib/workos/pipes/data_integrations_list_response_data_connected_account.rb @@ -19,6 +19,8 @@ class DataIntegrationsListResponseDataConnectedAccount < WorkOS::Types::BaseMode client_secret_last_4: :client_secret_last_4, config: :config, state: :state, + established_by_user_id: :established_by_user_id, + state_reason: :state_reason, created_at: :created_at, updated_at: :updated_at, userlandUserId: :userland_user_id @@ -42,6 +44,8 @@ class DataIntegrationsListResponseDataConnectedAccount < WorkOS::Types::BaseMode :client_secret_last_4, :config, :state, + :established_by_user_id, + :state_reason, :created_at, :updated_at @@ -68,6 +72,8 @@ def initialize(json) @client_secret_last_4 = hash[:client_secret_last_4] @config = hash[:config] || {} @state = hash[:state] + @established_by_user_id = hash[:established_by_user_id] + @state_reason = hash[:state_reason] @created_at = hash[:created_at] @updated_at = hash[:updated_at] @userland_user_id = hash[:userlandUserId] diff --git a/lib/workos/pipes/data_integrations_upsert_api_key_request.rb b/lib/workos/pipes/data_integrations_upsert_api_key_request.rb index eb5d2d71..3092a697 100644 --- a/lib/workos/pipes/data_integrations_upsert_api_key_request.rb +++ b/lib/workos/pipes/data_integrations_upsert_api_key_request.rb @@ -5,25 +5,28 @@ module WorkOS class DataIntegrationsUpsertApiKeyRequest < WorkOS::Types::BaseModel HASH_ATTRS = { + account_display_name: :account_display_name, + account_identifier: :account_identifier, user_id: :user_id, organization_id: :organization_id, - connected_account_id: :connected_account_id, connection_owner: :connection_owner, secret: :secret }.freeze attr_accessor \ + :account_display_name, + :account_identifier, :user_id, :organization_id, - :connected_account_id, :connection_owner, :secret def initialize(json) hash = self.class.normalize(json) + @account_display_name = hash[:account_display_name] + @account_identifier = hash[:account_identifier] @user_id = hash[:user_id] @organization_id = hash[:organization_id] - @connected_account_id = hash[:connected_account_id] @connection_owner = hash[:connection_owner] @secret = hash[:secret] end diff --git a/lib/workos/pipes/data_integrations_upsert_api_key_request_2.rb b/lib/workos/pipes/data_integrations_upsert_api_key_request_2.rb new file mode 100644 index 00000000..f8eff913 --- /dev/null +++ b/lib/workos/pipes/data_integrations_upsert_api_key_request_2.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class DataIntegrationsUpsertApiKeyRequest2 < WorkOS::Types::BaseModel + HASH_ATTRS = { + account_display_name: :account_display_name, + account_identifier: :account_identifier, + user_id: :user_id, + organization_id: :organization_id, + connection_owner: :connection_owner, + secret: :secret, + connected_account_id: :connected_account_id + }.freeze + + attr_accessor \ + :account_display_name, + :account_identifier, + :user_id, + :organization_id, + :connection_owner, + :secret, + :connected_account_id + + def initialize(json) + hash = self.class.normalize(json) + @account_display_name = hash[:account_display_name] + @account_identifier = hash[:account_identifier] + @user_id = hash[:user_id] + @organization_id = hash[:organization_id] + @connection_owner = hash[:connection_owner] + @secret = hash[:secret] + @connected_account_id = hash[:connected_account_id] + end + end +end diff --git a/lib/workos/pipes/data_integrations_upsert_client_credentials_request.rb b/lib/workos/pipes/data_integrations_upsert_client_credentials_request.rb index 1291389e..a8442377 100644 --- a/lib/workos/pipes/data_integrations_upsert_client_credentials_request.rb +++ b/lib/workos/pipes/data_integrations_upsert_client_credentials_request.rb @@ -5,9 +5,10 @@ module WorkOS class DataIntegrationsUpsertClientCredentialsRequest < WorkOS::Types::BaseModel HASH_ATTRS = { + account_display_name: :account_display_name, + account_identifier: :account_identifier, user_id: :user_id, organization_id: :organization_id, - connected_account_id: :connected_account_id, connection_owner: :connection_owner, client_id: :client_id, client_secret: :client_secret, @@ -15,9 +16,10 @@ class DataIntegrationsUpsertClientCredentialsRequest < WorkOS::Types::BaseModel }.freeze attr_accessor \ + :account_display_name, + :account_identifier, :user_id, :organization_id, - :connected_account_id, :connection_owner, :client_id, :client_secret, @@ -25,9 +27,10 @@ class DataIntegrationsUpsertClientCredentialsRequest < WorkOS::Types::BaseModel def initialize(json) hash = self.class.normalize(json) + @account_display_name = hash[:account_display_name] + @account_identifier = hash[:account_identifier] @user_id = hash[:user_id] @organization_id = hash[:organization_id] - @connected_account_id = hash[:connected_account_id] @connection_owner = hash[:connection_owner] @client_id = hash[:client_id] @client_secret = hash[:client_secret] diff --git a/lib/workos/pipes/data_integrations_upsert_client_credentials_request_2.rb b/lib/workos/pipes/data_integrations_upsert_client_credentials_request_2.rb new file mode 100644 index 00000000..139ed7dd --- /dev/null +++ b/lib/workos/pipes/data_integrations_upsert_client_credentials_request_2.rb @@ -0,0 +1,43 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class DataIntegrationsUpsertClientCredentialsRequest2 < WorkOS::Types::BaseModel + HASH_ATTRS = { + account_display_name: :account_display_name, + account_identifier: :account_identifier, + user_id: :user_id, + organization_id: :organization_id, + connection_owner: :connection_owner, + client_id: :client_id, + client_secret: :client_secret, + config: :config, + connected_account_id: :connected_account_id + }.freeze + + attr_accessor \ + :account_display_name, + :account_identifier, + :user_id, + :organization_id, + :connection_owner, + :client_id, + :client_secret, + :config, + :connected_account_id + + def initialize(json) + hash = self.class.normalize(json) + @account_display_name = hash[:account_display_name] + @account_identifier = hash[:account_identifier] + @user_id = hash[:user_id] + @organization_id = hash[:organization_id] + @connection_owner = hash[:connection_owner] + @client_id = hash[:client_id] + @client_secret = hash[:client_secret] + @config = hash[:config] || {} + @connected_account_id = hash[:connected_account_id] + end + end +end diff --git a/lib/workos/pipes/organization_connected_account.rb b/lib/workos/pipes/organization_connected_account.rb new file mode 100644 index 00000000..eb8b485e --- /dev/null +++ b/lib/workos/pipes/organization_connected_account.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class OrganizationConnectedAccount < WorkOS::Types::BaseModel + HASH_ATTRS = { + account_display_name: :account_display_name, + account_identifier: :account_identifier, + access_token: :access_token, + refresh_token: :refresh_token, + expires_at: :expires_at, + scopes: :scopes, + state: :state, + user_id: :user_id + }.freeze + + attr_accessor \ + :account_display_name, + :account_identifier, + :access_token, + :refresh_token, + :expires_at, + :scopes, + :state, + :user_id + + def initialize(json) + hash = self.class.normalize(json) + @account_display_name = hash[:account_display_name] + @account_identifier = hash[:account_identifier] + @access_token = hash[:access_token] + @refresh_token = hash[:refresh_token] + @expires_at = hash[:expires_at] + @scopes = hash[:scopes] || [] + @state = hash[:state] + @user_id = hash[:user_id] + end + end +end diff --git a/lib/workos/pipes/reauthorize_data_integrations_get_data_integration_authorize_url_request.rb b/lib/workos/pipes/reauthorize_data_integrations_get_data_integration_authorize_url_request.rb new file mode 100644 index 00000000..a5a0ae02 --- /dev/null +++ b/lib/workos/pipes/reauthorize_data_integrations_get_data_integration_authorize_url_request.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class ReauthorizeDataIntegrationsGetDataIntegrationAuthorizeUrlRequest < WorkOS::Types::BaseModel + HASH_ATTRS = { + account_display_name: :account_display_name, + user_id: :user_id, + organization_id: :organization_id, + connection_owner: :connection_owner, + return_to: :return_to, + config: :config, + connection_intent: :connection_intent, + connected_account_id: :connected_account_id + }.freeze + + attr_accessor \ + :account_display_name, + :user_id, + :organization_id, + :connection_owner, + :return_to, + :config, + :connection_intent, + :connected_account_id + + def initialize(json) + hash = self.class.normalize(json) + @account_display_name = hash[:account_display_name] + @user_id = hash[:user_id] + @organization_id = hash[:organization_id] + @connection_owner = hash[:connection_owner] + @return_to = hash[:return_to] + @config = hash[:config] || {} + @connection_intent = hash[:connection_intent] + @connected_account_id = hash[:connected_account_id] + end + end +end diff --git a/lib/workos/pipes/reauthorize_data_integrations_upsert_api_key_request.rb b/lib/workos/pipes/reauthorize_data_integrations_upsert_api_key_request.rb new file mode 100644 index 00000000..0bc78f1c --- /dev/null +++ b/lib/workos/pipes/reauthorize_data_integrations_upsert_api_key_request.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class ReauthorizeDataIntegrationsUpsertApiKeyRequest < WorkOS::Types::BaseModel + HASH_ATTRS = { + account_display_name: :account_display_name, + account_identifier: :account_identifier, + user_id: :user_id, + organization_id: :organization_id, + connection_owner: :connection_owner, + secret: :secret, + connection_intent: :connection_intent, + connected_account_id: :connected_account_id + }.freeze + + attr_accessor \ + :account_display_name, + :account_identifier, + :user_id, + :organization_id, + :connection_owner, + :secret, + :connection_intent, + :connected_account_id + + def initialize(json) + hash = self.class.normalize(json) + @account_display_name = hash[:account_display_name] + @account_identifier = hash[:account_identifier] + @user_id = hash[:user_id] + @organization_id = hash[:organization_id] + @connection_owner = hash[:connection_owner] + @secret = hash[:secret] + @connection_intent = hash[:connection_intent] + @connected_account_id = hash[:connected_account_id] + end + end +end diff --git a/lib/workos/pipes/reauthorize_data_integrations_upsert_client_credentials_request.rb b/lib/workos/pipes/reauthorize_data_integrations_upsert_client_credentials_request.rb new file mode 100644 index 00000000..fa145648 --- /dev/null +++ b/lib/workos/pipes/reauthorize_data_integrations_upsert_client_credentials_request.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class ReauthorizeDataIntegrationsUpsertClientCredentialsRequest < WorkOS::Types::BaseModel + HASH_ATTRS = { + account_display_name: :account_display_name, + account_identifier: :account_identifier, + user_id: :user_id, + organization_id: :organization_id, + connection_owner: :connection_owner, + client_id: :client_id, + client_secret: :client_secret, + config: :config, + connection_intent: :connection_intent, + connected_account_id: :connected_account_id + }.freeze + + attr_accessor \ + :account_display_name, + :account_identifier, + :user_id, + :organization_id, + :connection_owner, + :client_id, + :client_secret, + :config, + :connection_intent, + :connected_account_id + + def initialize(json) + hash = self.class.normalize(json) + @account_display_name = hash[:account_display_name] + @account_identifier = hash[:account_identifier] + @user_id = hash[:user_id] + @organization_id = hash[:organization_id] + @connection_owner = hash[:connection_owner] + @client_id = hash[:client_id] + @client_secret = hash[:client_secret] + @config = hash[:config] || {} + @connection_intent = hash[:connection_intent] + @connected_account_id = hash[:connected_account_id] + end + end +end diff --git a/lib/workos/shared/pipe_connected_account.rb b/lib/workos/shared/pipe_connected_account.rb index fbe1a629..f4b8d1e7 100644 --- a/lib/workos/shared/pipe_connected_account.rb +++ b/lib/workos/shared/pipe_connected_account.rb @@ -18,6 +18,8 @@ class PipeConnectedAccount < WorkOS::Types::BaseModel auth_method: :auth_method, api_key_last_4: :api_key_last_4, state: :state, + established_by_user_id: :established_by_user_id, + state_reason: :state_reason, created_at: :created_at, updated_at: :updated_at }.freeze @@ -36,6 +38,8 @@ class PipeConnectedAccount < WorkOS::Types::BaseModel :auth_method, :api_key_last_4, :state, + :established_by_user_id, + :state_reason, :created_at, :updated_at @@ -54,6 +58,8 @@ def initialize(json) @auth_method = hash[:auth_method] @api_key_last_4 = hash[:api_key_last_4] @state = hash[:state] + @established_by_user_id = hash[:established_by_user_id] + @state_reason = hash[:state_reason] @created_at = hash[:created_at] @updated_at = hash[:updated_at] end diff --git a/lib/workos/types/connected_account_write_response_auth_method.rb b/lib/workos/types/connected_account_write_response_auth_method.rb new file mode 100644 index 00000000..9d9a11ff --- /dev/null +++ b/lib/workos/types/connected_account_write_response_auth_method.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + module Types + ConnectedAccountWriteResponseAuthMethod = ConnectedAccountAuthMethod + end +end diff --git a/lib/workos/types/connected_account_write_response_connection_role.rb b/lib/workos/types/connected_account_write_response_connection_role.rb new file mode 100644 index 00000000..15736bfb --- /dev/null +++ b/lib/workos/types/connected_account_write_response_connection_role.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + module Types + ConnectedAccountWriteResponseConnectionRole = ConnectedAccountConnectionRole + end +end diff --git a/lib/workos/types/connected_account_write_response_state.rb b/lib/workos/types/connected_account_write_response_state.rb new file mode 100644 index 00000000..a09c9eef --- /dev/null +++ b/lib/workos/types/connected_account_write_response_state.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + module Types + ConnectedAccountWriteResponseState = ConnectedAccountState + end +end diff --git a/lib/workos/types/create_connected_account_state.rb b/lib/workos/types/create_connected_account_state.rb new file mode 100644 index 00000000..8827478e --- /dev/null +++ b/lib/workos/types/create_connected_account_state.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + module Types + CreateConnectedAccountState = ConnectedAccountInputState + end +end diff --git a/lib/workos/types/create_organization_connected_account_state.rb b/lib/workos/types/create_organization_connected_account_state.rb new file mode 100644 index 00000000..f27aca38 --- /dev/null +++ b/lib/workos/types/create_organization_connected_account_state.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + module Types + CreateOrganizationConnectedAccountState = ConnectedAccountInputState + end +end diff --git a/lib/workos/types/data_integrations_create_client_credentials_connection_request_connection_owner.rb b/lib/workos/types/data_integrations_create_client_credentials_connection_request_connection_owner.rb new file mode 100644 index 00000000..357dd3cf --- /dev/null +++ b/lib/workos/types/data_integrations_create_client_credentials_connection_request_connection_owner.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + module Types + DataIntegrationsCreateClientCredentialsConnectionRequestConnectionOwner = AddDataIntegrationsGetDataIntegrationAuthorizeUrlRequestConnectionOwner + end +end diff --git a/lib/workos/types/organization_connected_account_state.rb b/lib/workos/types/organization_connected_account_state.rb new file mode 100644 index 00000000..a38dde27 --- /dev/null +++ b/lib/workos/types/organization_connected_account_state.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + module Types + OrganizationConnectedAccountState = ConnectedAccountInputState + end +end diff --git a/lib/workos/types/pipes_ownership.rb b/lib/workos/types/pipes_ownership.rb index 32344d84..406eebd3 100644 --- a/lib/workos/types/pipes_ownership.rb +++ b/lib/workos/types/pipes_ownership.rb @@ -4,6 +4,6 @@ module WorkOS module Types - PipesOwnership = CreateDataIntegrationOwnership + PipesOwnership = AddDataIntegrationsGetDataIntegrationAuthorizeUrlRequestConnectionOwner end end diff --git a/rbi/workos/connected_account.rbi b/rbi/workos/connected_account.rbi index b6612b62..458debd2 100644 --- a/rbi/workos/connected_account.rbi +++ b/rbi/workos/connected_account.rbi @@ -93,6 +93,18 @@ module WorkOS sig { params(value: String).returns(String) } def state=(value); end + sig { returns(T.nilable(String)) } + def established_by_user_id; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def established_by_user_id=(value); end + + sig { returns(T.nilable(String)) } + def state_reason; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def state_reason=(value); end + sig { returns(String) } def created_at; end diff --git a/rbi/workos/connected_account_input.rbi b/rbi/workos/connected_account_input.rbi index 479c55f2..2ab7b988 100644 --- a/rbi/workos/connected_account_input.rbi +++ b/rbi/workos/connected_account_input.rbi @@ -9,6 +9,18 @@ module WorkOS sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } def initialize(json); end + sig { returns(T.nilable(String)) } + def account_display_name; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def account_display_name=(value); end + + sig { returns(T.nilable(String)) } + def account_identifier; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def account_identifier=(value); end + sig { returns(T.nilable(String)) } def access_token; end diff --git a/rbi/workos/connected_account_write_response.rbi b/rbi/workos/connected_account_write_response.rbi new file mode 100644 index 00000000..9bb18f30 --- /dev/null +++ b/rbi/workos/connected_account_write_response.rbi @@ -0,0 +1,132 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class ConnectedAccountWriteResponse + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(String) } + def object; end + + sig { params(value: String).returns(String) } + def object=(value); end + + sig { returns(String) } + def id; end + + sig { params(value: String).returns(String) } + def id=(value); end + + sig { returns(String) } + def connection_role; end + + sig { params(value: String).returns(String) } + def connection_role=(value); end + + sig { returns(T.nilable(String)) } + def account_identifier; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def account_identifier=(value); end + + sig { returns(T.nilable(String)) } + def account_display_name; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def account_display_name=(value); end + + sig { returns(T.nilable(String)) } + def user_id; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def user_id=(value); end + + sig { returns(T.nilable(String)) } + def organization_id; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def organization_id=(value); end + + sig { returns(T::Array[String]) } + def scopes; end + + sig { params(value: T::Array[String]).returns(T::Array[String]) } + def scopes=(value); end + + sig { returns(T.nilable(String)) } + def auth_method; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def auth_method=(value); end + + sig { returns(T.nilable(String)) } + def api_key_last_4; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def api_key_last_4=(value); end + + sig { returns(T.nilable(String)) } + def client_id; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def client_id=(value); end + + sig { returns(T.nilable(String)) } + def client_secret_last_4; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def client_secret_last_4=(value); end + + sig { returns(T.nilable(T::Hash[String, String])) } + def config; end + + sig { params(value: T.nilable(T::Hash[String, String])).returns(T.nilable(T::Hash[String, String])) } + def config=(value); end + + sig { returns(String) } + def state; end + + sig { params(value: String).returns(String) } + def state=(value); end + + sig { returns(T.nilable(String)) } + def established_by_user_id; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def established_by_user_id=(value); end + + sig { returns(T.nilable(String)) } + def state_reason; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def state_reason=(value); end + + sig { returns(String) } + def created_at; end + + sig { params(value: String).returns(String) } + def created_at=(value); end + + sig { returns(String) } + def updated_at; end + + sig { params(value: String).returns(String) } + def updated_at=(value); end + + sig { returns(T.nilable(T::Array[WorkOS::ConnectedAccountWriteResponseWarning])) } + def warnings; end + + sig { params(value: T.nilable(T::Array[WorkOS::ConnectedAccountWriteResponseWarning])).returns(T.nilable(T::Array[WorkOS::ConnectedAccountWriteResponseWarning])) } + def warnings=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/connected_account_write_response_warning.rbi b/rbi/workos/connected_account_write_response_warning.rbi new file mode 100644 index 00000000..897081ee --- /dev/null +++ b/rbi/workos/connected_account_write_response_warning.rbi @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class ConnectedAccountWriteResponseWarning + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(String) } + def code; end + + sig { params(value: String).returns(String) } + def code=(value); end + + sig { returns(String) } + def message; end + + sig { params(value: String).returns(String) } + def message=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/create_connected_account.rbi b/rbi/workos/create_connected_account.rbi new file mode 100644 index 00000000..852aa737 --- /dev/null +++ b/rbi/workos/create_connected_account.rbi @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class CreateConnectedAccount + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(T.nilable(String)) } + def account_display_name; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def account_display_name=(value); end + + sig { returns(T.nilable(String)) } + def account_identifier; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def account_identifier=(value); end + + sig { returns(T.nilable(String)) } + def access_token; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def access_token=(value); end + + sig { returns(T.nilable(String)) } + def refresh_token; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def refresh_token=(value); end + + sig { returns(T.nilable(String)) } + def expires_at; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def expires_at=(value); end + + sig { returns(T.nilable(T::Array[String])) } + def scopes; end + + sig { params(value: T.nilable(T::Array[String])).returns(T.nilable(T::Array[String])) } + def scopes=(value); end + + sig { returns(T.nilable(String)) } + def state; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def state=(value); end + + sig { returns(T.nilable(String)) } + def connection_intent; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def connection_intent=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/create_organization_connected_account.rbi b/rbi/workos/create_organization_connected_account.rbi new file mode 100644 index 00000000..f831b70a --- /dev/null +++ b/rbi/workos/create_organization_connected_account.rbi @@ -0,0 +1,72 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class CreateOrganizationConnectedAccount + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(T.nilable(String)) } + def account_display_name; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def account_display_name=(value); end + + sig { returns(T.nilable(String)) } + def account_identifier; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def account_identifier=(value); end + + sig { returns(T.nilable(String)) } + def access_token; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def access_token=(value); end + + sig { returns(T.nilable(String)) } + def refresh_token; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def refresh_token=(value); end + + sig { returns(T.nilable(String)) } + def expires_at; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def expires_at=(value); end + + sig { returns(T.nilable(T::Array[String])) } + def scopes; end + + sig { params(value: T.nilable(T::Array[String])).returns(T.nilable(T::Array[String])) } + def scopes=(value); end + + sig { returns(T.nilable(String)) } + def state; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def state=(value); end + + sig { returns(String) } + def user_id; end + + sig { params(value: String).returns(String) } + def user_id=(value); end + + sig { returns(T.nilable(String)) } + def connection_intent; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def connection_intent=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/data_integrations_create_client_credentials_connection_request.rbi b/rbi/workos/data_integrations_create_client_credentials_connection_request.rbi new file mode 100644 index 00000000..039388d1 --- /dev/null +++ b/rbi/workos/data_integrations_create_client_credentials_connection_request.rbi @@ -0,0 +1,72 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class DataIntegrationsCreateClientCredentialsConnectionRequest + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(T.nilable(String)) } + def account_display_name; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def account_display_name=(value); end + + sig { returns(T.nilable(String)) } + def account_identifier; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def account_identifier=(value); end + + sig { returns(String) } + def user_id; end + + sig { params(value: String).returns(String) } + def user_id=(value); end + + sig { returns(T.nilable(String)) } + def organization_id; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def organization_id=(value); end + + sig { returns(T.nilable(String)) } + def connection_owner; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def connection_owner=(value); end + + sig { returns(String) } + def client_id; end + + sig { params(value: String).returns(String) } + def client_id=(value); end + + sig { returns(String) } + def client_secret; end + + sig { params(value: String).returns(String) } + def client_secret=(value); end + + sig { returns(T.nilable(T::Hash[String, String])) } + def config; end + + sig { params(value: T.nilable(T::Hash[String, String])).returns(T.nilable(T::Hash[String, String])) } + def config=(value); end + + sig { returns(String) } + def connection_intent; end + + sig { params(value: String).returns(String) } + def connection_intent=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/data_integrations_list_response_data_connected_account.rbi b/rbi/workos/data_integrations_list_response_data_connected_account.rbi index bc3a622e..040b9e44 100644 --- a/rbi/workos/data_integrations_list_response_data_connected_account.rbi +++ b/rbi/workos/data_integrations_list_response_data_connected_account.rbi @@ -93,6 +93,18 @@ module WorkOS sig { params(value: String).returns(String) } def state=(value); end + sig { returns(T.nilable(String)) } + def established_by_user_id; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def established_by_user_id=(value); end + + sig { returns(T.nilable(String)) } + def state_reason; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def state_reason=(value); end + sig { returns(String) } def created_at; end diff --git a/rbi/workos/organization_connected_account.rbi b/rbi/workos/organization_connected_account.rbi new file mode 100644 index 00000000..046d1419 --- /dev/null +++ b/rbi/workos/organization_connected_account.rbi @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class OrganizationConnectedAccount + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(T.nilable(String)) } + def account_display_name; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def account_display_name=(value); end + + sig { returns(T.nilable(String)) } + def account_identifier; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def account_identifier=(value); end + + sig { returns(T.nilable(String)) } + def access_token; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def access_token=(value); end + + sig { returns(T.nilable(String)) } + def refresh_token; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def refresh_token=(value); end + + sig { returns(T.nilable(String)) } + def expires_at; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def expires_at=(value); end + + sig { returns(T.nilable(T::Array[String])) } + def scopes; end + + sig { params(value: T.nilable(T::Array[String])).returns(T.nilable(T::Array[String])) } + def scopes=(value); end + + sig { returns(T.nilable(String)) } + def state; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def state=(value); end + + sig { returns(String) } + def user_id; end + + sig { params(value: String).returns(String) } + def user_id=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/pipe_connected_account.rbi b/rbi/workos/pipe_connected_account.rbi index 5aa131f6..598ed250 100644 --- a/rbi/workos/pipe_connected_account.rbi +++ b/rbi/workos/pipe_connected_account.rbi @@ -87,6 +87,18 @@ module WorkOS sig { params(value: String).returns(String) } def state=(value); end + sig { returns(T.nilable(String)) } + def established_by_user_id; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def established_by_user_id=(value); end + + sig { returns(T.nilable(String)) } + def state_reason; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def state_reason=(value); end + sig { returns(String) } def created_at; end diff --git a/rbi/workos/pipes.rbi b/rbi/workos/pipes.rbi index 14d132c6..72c26cfc 100644 --- a/rbi/workos/pipes.rbi +++ b/rbi/workos/pipes.rbi @@ -73,18 +73,35 @@ module WorkOS slug: String, user_id: String, secret: String, + connection_intent: String, + account_display_name: T.nilable(String), + account_identifier: T.nilable(String), organization_id: T.nilable(String), - connected_account_id: T.nilable(String), connection_owner: T.nilable(String), request_options: T::Hash[Symbol, T.untyped] - ).returns(WorkOS::ConnectedAccount) + ).returns(WorkOS::ConnectedAccountWriteResponse) + end + def create_data_integration_api_key(slug:, user_id:, secret:, connection_intent:, account_display_name:, account_identifier:, organization_id:, connection_owner:, request_options:); end + + sig do + params( + slug: String, + user_id: String, + secret: String, + account_display_name: T.nilable(String), + account_identifier: T.nilable(String), + organization_id: T.nilable(String), + connection_owner: T.nilable(String), + request_options: T::Hash[Symbol, T.untyped] + ).returns(WorkOS::ConnectedAccountWriteResponse) end - def update_data_integration_api_key(slug:, user_id:, secret:, organization_id:, connected_account_id:, connection_owner:, request_options:); end + def update_data_integration_api_key(slug:, user_id:, secret:, account_display_name:, account_identifier:, organization_id:, connection_owner:, request_options:); end sig do params( slug: String, user_id: String, + account_display_name: T.nilable(String), organization_id: T.nilable(String), connection_owner: T.nilable(String), return_to: T.nilable(String), @@ -92,7 +109,7 @@ module WorkOS request_options: T::Hash[Symbol, T.untyped] ).returns(WorkOS::DataIntegrationAuthorizeUrlResponse) end - def authorize_data_integration(slug:, user_id:, organization_id:, connection_owner:, return_to:, config:, request_options:); end + def authorize_data_integration(slug:, user_id:, account_display_name:, organization_id:, connection_owner:, return_to:, config:, request_options:); end sig do params( @@ -100,14 +117,32 @@ module WorkOS user_id: String, client_id: String, client_secret: String, + connection_intent: String, + account_display_name: T.nilable(String), + account_identifier: T.nilable(String), organization_id: T.nilable(String), - connected_account_id: T.nilable(String), connection_owner: T.nilable(String), config: T.nilable(T::Hash[String, String]), request_options: T::Hash[Symbol, T.untyped] - ).returns(WorkOS::ConnectedAccount) + ).returns(WorkOS::ConnectedAccountWriteResponse) + end + def create_data_integration_client_credential(slug:, user_id:, client_id:, client_secret:, connection_intent:, account_display_name:, account_identifier:, organization_id:, connection_owner:, config:, request_options:); end + + sig do + params( + slug: String, + user_id: String, + client_id: String, + client_secret: String, + account_display_name: T.nilable(String), + account_identifier: T.nilable(String), + organization_id: T.nilable(String), + connection_owner: T.nilable(String), + config: T.nilable(T::Hash[String, String]), + request_options: T::Hash[Symbol, T.untyped] + ).returns(WorkOS::ConnectedAccountWriteResponse) end - def update_data_integration_client_credentials(slug:, user_id:, client_id:, client_secret:, organization_id:, connected_account_id:, connection_owner:, config:, request_options:); end + def update_data_integration_client_credentials(slug:, user_id:, client_id:, client_secret:, account_display_name:, account_identifier:, organization_id:, connection_owner:, config:, request_options:); end sig do params( @@ -180,20 +215,27 @@ module WorkOS params( organization_id: String, slug: String, + user_id: String, + account_display_name: T.nilable(String), + account_identifier: T.nilable(String), access_token: T.nilable(String), refresh_token: T.nilable(String), expires_at: T.nilable(String), scopes: T.nilable(T::Array[String]), state: T.nilable(String), + connection_intent: T.nilable(String), request_options: T::Hash[Symbol, T.untyped] - ).returns(WorkOS::ConnectedAccount) + ).returns(WorkOS::ConnectedAccountWriteResponse) end - def create_organization_connected_account(organization_id:, slug:, access_token:, refresh_token:, expires_at:, scopes:, state:, request_options:); end + def create_organization_connected_account(organization_id:, slug:, user_id:, account_display_name:, account_identifier:, access_token:, refresh_token:, expires_at:, scopes:, state:, connection_intent:, request_options:); end sig do params( organization_id: String, slug: String, + user_id: String, + account_display_name: T.nilable(String), + account_identifier: T.nilable(String), access_token: T.nilable(String), refresh_token: T.nilable(String), expires_at: T.nilable(String), @@ -201,10 +243,11 @@ module WorkOS state: T.nilable(String), supports_multiple_connections: T.nilable(T::Boolean), connected_account_id: T.nilable(String), + connection_intent: T.nilable(String), request_options: T::Hash[Symbol, T.untyped] - ).returns(WorkOS::ConnectedAccount) + ).returns(WorkOS::ConnectedAccountWriteResponse) end - def update_organization_connected_account(organization_id:, slug:, access_token:, refresh_token:, expires_at:, scopes:, state:, supports_multiple_connections:, connected_account_id:, request_options:); end + def update_organization_connected_account(organization_id:, slug:, user_id:, account_display_name:, account_identifier:, access_token:, refresh_token:, expires_at:, scopes:, state:, supports_multiple_connections:, connected_account_id:, connection_intent:, request_options:); end sig do params( @@ -242,21 +285,26 @@ module WorkOS params( user_id: String, slug: String, + account_display_name: T.nilable(String), + account_identifier: T.nilable(String), access_token: T.nilable(String), refresh_token: T.nilable(String), expires_at: T.nilable(String), scopes: T.nilable(T::Array[String]), state: T.nilable(String), + connection_intent: T.nilable(String), organization_id: T.nilable(String), request_options: T::Hash[Symbol, T.untyped] - ).returns(WorkOS::ConnectedAccount) + ).returns(WorkOS::ConnectedAccountWriteResponse) end - def create_user_connected_account(user_id:, slug:, access_token:, refresh_token:, expires_at:, scopes:, state:, organization_id:, request_options:); end + def create_user_connected_account(user_id:, slug:, account_display_name:, account_identifier:, access_token:, refresh_token:, expires_at:, scopes:, state:, connection_intent:, organization_id:, request_options:); end sig do params( user_id: String, slug: String, + account_display_name: T.nilable(String), + account_identifier: T.nilable(String), access_token: T.nilable(String), refresh_token: T.nilable(String), expires_at: T.nilable(String), @@ -265,10 +313,11 @@ module WorkOS organization_id: T.nilable(String), supports_multiple_connections: T.nilable(T::Boolean), connected_account_id: T.nilable(String), + connection_intent: T.nilable(String), request_options: T::Hash[Symbol, T.untyped] - ).returns(WorkOS::ConnectedAccount) + ).returns(WorkOS::ConnectedAccountWriteResponse) end - def update_user_connected_account(user_id:, slug:, access_token:, refresh_token:, expires_at:, scopes:, state:, organization_id:, supports_multiple_connections:, connected_account_id:, request_options:); end + def update_user_connected_account(user_id:, slug:, account_display_name:, account_identifier:, access_token:, refresh_token:, expires_at:, scopes:, state:, organization_id:, supports_multiple_connections:, connected_account_id:, connection_intent:, request_options:); end sig do params( diff --git a/test/workos/test_pipes.rb b/test/workos/test_pipes.rb index a59c761c..d9282cf9 100644 --- a/test/workos/test_pipes.rb +++ b/test/workos/test_pipes.rb @@ -46,6 +46,13 @@ def test_delete_data_integration_returns_expected_result assert_nil result end + def test_create_data_integration_api_key_returns_expected_result + stub_request(:post, %r{\Ahttps://api\.workos\.com/data-integrations/stub/api-key(\?|\z)}) + .to_return(body: "{}", status: 200) + result = @client.pipes.create_data_integration_api_key(slug: "stub", user_id: "stub", secret: "stub", connection_intent: "add") + refute_nil result + end + def test_update_data_integration_api_key_returns_expected_result stub_request(:put, %r{\Ahttps://api\.workos\.com/data-integrations/stub/api-key(\?|\z)}) .to_return(body: "{}", status: 200) @@ -60,6 +67,13 @@ def test_authorize_data_integration_returns_expected_result refute_nil result end + def test_create_data_integration_client_credential_returns_expected_result + stub_request(:post, %r{\Ahttps://api\.workos\.com/data-integrations/stub/client-credentials(\?|\z)}) + .to_return(body: "{}", status: 200) + result = @client.pipes.create_data_integration_client_credential(slug: "stub", user_id: "stub", client_id: "stub", client_secret: "stub", connection_intent: "add") + refute_nil result + end + def test_update_data_integration_client_credentials_returns_expected_result stub_request(:put, %r{\Ahttps://api\.workos\.com/data-integrations/stub/client-credentials(\?|\z)}) .to_return(body: "{}", status: 200) @@ -112,14 +126,14 @@ def test_get_organization_connected_account_returns_expected_result def test_create_organization_connected_account_returns_expected_result stub_request(:post, %r{\Ahttps://api\.workos\.com/organizations/stub/connected_accounts/stub(\?|\z)}) .to_return(body: "{}", status: 200) - result = @client.pipes.create_organization_connected_account(organization_id: "stub", slug: "stub") + result = @client.pipes.create_organization_connected_account(organization_id: "stub", slug: "stub", user_id: "stub") refute_nil result end def test_update_organization_connected_account_returns_expected_result stub_request(:put, %r{\Ahttps://api\.workos\.com/organizations/stub/connected_accounts/stub(\?|\z)}) .to_return(body: "{}", status: 200) - result = @client.pipes.update_organization_connected_account(organization_id: "stub", slug: "stub") + result = @client.pipes.update_organization_connected_account(organization_id: "stub", slug: "stub", user_id: "stub") refute_nil result end @@ -179,8 +193,10 @@ def test_list_user_data_providers_returns_expected_result {name: :get_data_integration, verb: :get, url: %r{\Ahttps://api\.workos\.com/data-integrations/stub(\?|\z)}, args: {slug: "stub"}}, {name: :update_data_integration, verb: :put, url: %r{\Ahttps://api\.workos\.com/data-integrations/stub(\?|\z)}, args: {slug: "stub"}}, {name: :delete_data_integration, verb: :delete, url: %r{\Ahttps://api\.workos\.com/data-integrations/stub(\?|\z)}, args: {slug: "stub"}}, + {name: :create_data_integration_api_key, verb: :post, url: %r{\Ahttps://api\.workos\.com/data-integrations/stub/api-key(\?|\z)}, args: {slug: "stub", user_id: "stub", secret: "stub", connection_intent: "add"}}, {name: :update_data_integration_api_key, verb: :put, url: %r{\Ahttps://api\.workos\.com/data-integrations/stub/api-key(\?|\z)}, args: {slug: "stub", user_id: "stub", secret: "stub"}}, {name: :authorize_data_integration, verb: :post, url: %r{\Ahttps://api\.workos\.com/data-integrations/stub/authorize(\?|\z)}, args: {slug: "stub", user_id: "stub"}}, + {name: :create_data_integration_client_credential, verb: :post, url: %r{\Ahttps://api\.workos\.com/data-integrations/stub/client-credentials(\?|\z)}, args: {slug: "stub", user_id: "stub", client_id: "stub", client_secret: "stub", connection_intent: "add"}}, {name: :update_data_integration_client_credentials, verb: :put, url: %r{\Ahttps://api\.workos\.com/data-integrations/stub/client-credentials(\?|\z)}, args: {slug: "stub", user_id: "stub", client_id: "stub", client_secret: "stub"}}, {name: :create_data_integration_credential, verb: :post, url: %r{\Ahttps://api\.workos\.com/data-integrations/stub/credentials(\?|\z)}, args: {slug: "stub", user_id: "stub"}}, {name: :list_data_integration_organization, verb: :get, url: %r{\Ahttps://api\.workos\.com/data-integrations/stub/organization(\?|\z)}, args: {slug: "stub"}}, @@ -188,8 +204,8 @@ def test_list_user_data_providers_returns_expected_result {name: :delete_data_integration_organization, verb: :delete, url: %r{\Ahttps://api\.workos\.com/data-integrations/stub/organization(\?|\z)}, args: {slug: "stub"}}, {name: :get_access_token, verb: :post, url: %r{\Ahttps://api\.workos\.com/data-integrations/stub/token(\?|\z)}, args: {provider: "stub", user_id: "stub"}}, {name: :get_organization_connected_account, verb: :get, url: %r{\Ahttps://api\.workos\.com/organizations/stub/connected_accounts/stub(\?|\z)}, args: {organization_id: "stub", slug: "stub"}}, - {name: :create_organization_connected_account, verb: :post, url: %r{\Ahttps://api\.workos\.com/organizations/stub/connected_accounts/stub(\?|\z)}, args: {organization_id: "stub", slug: "stub"}}, - {name: :update_organization_connected_account, verb: :put, url: %r{\Ahttps://api\.workos\.com/organizations/stub/connected_accounts/stub(\?|\z)}, args: {organization_id: "stub", slug: "stub"}}, + {name: :create_organization_connected_account, verb: :post, url: %r{\Ahttps://api\.workos\.com/organizations/stub/connected_accounts/stub(\?|\z)}, args: {organization_id: "stub", slug: "stub", user_id: "stub"}}, + {name: :update_organization_connected_account, verb: :put, url: %r{\Ahttps://api\.workos\.com/organizations/stub/connected_accounts/stub(\?|\z)}, args: {organization_id: "stub", slug: "stub", user_id: "stub"}}, {name: :delete_organization_connected_account, verb: :delete, url: %r{\Ahttps://api\.workos\.com/organizations/stub/connected_accounts/stub(\?|\z)}, args: {organization_id: "stub", slug: "stub"}}, {name: :list_organization_data_providers, verb: :get, url: %r{\Ahttps://api\.workos\.com/organizations/stub/data_providers(\?|\z)}, args: {organization_id: "stub"}}, {name: :get_user_connected_account, verb: :get, url: %r{\Ahttps://api\.workos\.com/user_management/users/stub/connected_accounts/stub(\?|\z)}, args: {user_id: "stub", slug: "stub"}}, diff --git a/test/workos/test_pipes_model_round_trip.rb b/test/workos/test_pipes_model_round_trip.rb index cd051116..23279217 100644 --- a/test/workos/test_pipes_model_round_trip.rb +++ b/test/workos/test_pipes_model_round_trip.rb @@ -107,8 +107,64 @@ def test_update_data_integration_round_trip fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } end + def test_create_organization_connected_account_round_trip + fixture = { + "account_display_name" => nil, + "account_identifier" => nil, + "access_token" => "stub", + "refresh_token" => "stub", + "expires_at" => "stub", + "scopes" => [], + "state" => "stub", + "user_id" => "stub", + "connection_intent" => "add" + } + model = WorkOS::CreateOrganizationConnectedAccount.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + assert_equal fixture["user_id"], json[:user_id] + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + + def test_organization_connected_account_round_trip + fixture = { + "account_display_name" => nil, + "account_identifier" => nil, + "access_token" => "stub", + "refresh_token" => "stub", + "expires_at" => "stub", + "scopes" => [], + "state" => "stub", + "user_id" => "stub" + } + model = WorkOS::OrganizationConnectedAccount.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + assert_equal fixture["user_id"], json[:user_id] + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + + def test_create_connected_account_round_trip + fixture = { + "account_display_name" => nil, + "account_identifier" => nil, + "access_token" => "stub", + "refresh_token" => "stub", + "expires_at" => "stub", + "scopes" => [], + "state" => "stub", + "connection_intent" => "add" + } + model = WorkOS::CreateConnectedAccount.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + def test_connected_account_input_round_trip fixture = { + "account_display_name" => nil, + "account_identifier" => nil, "access_token" => "stub", "refresh_token" => "stub", "expires_at" => "stub", @@ -178,6 +234,23 @@ def test_data_integration_access_token_response_round_trip fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } end + def test_data_integration_vended_credential_round_trip + fixture = { + "object" => "credential", + "auth_method" => "oauth", + "value" => "stub", + "expires_at" => nil, + "scopes" => [], + "missing_scopes" => [], + "config" => {}, + "metadata" => {} + } + model = WorkOS::DataIntegrationVendedCredential.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + def test_data_integration_credentials_response_round_trip fixture = { "active" => true, @@ -190,7 +263,7 @@ def test_data_integration_credentials_response_round_trip fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } end - def test_connected_account_round_trip + def test_connected_account_write_response_round_trip fixture = { "object" => "connected_account", "id" => "stub", @@ -206,10 +279,13 @@ def test_connected_account_round_trip "client_secret_last_4" => nil, "config" => {}, "state" => "stub", + "established_by_user_id" => nil, + "state_reason" => nil, "created_at" => "stub", - "updated_at" => "stub" + "updated_at" => "stub", + "warnings" => [] } - model = WorkOS::ConnectedAccount.new(fixture.to_json) + model = WorkOS::ConnectedAccountWriteResponse.new(fixture.to_json) json = model.to_h assert_kind_of Hash, json assert_equal fixture["id"], json[:id] @@ -233,6 +309,40 @@ def test_data_integrations_list_response_round_trip fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } end + def test_connected_account_round_trip + fixture = { + "object" => "connected_account", + "id" => "stub", + "connection_role" => "stub", + "account_identifier" => nil, + "account_display_name" => nil, + "user_id" => nil, + "organization_id" => nil, + "scopes" => [], + "auth_method" => "stub", + "api_key_last_4" => nil, + "client_id" => nil, + "client_secret_last_4" => nil, + "config" => {}, + "state" => "stub", + "established_by_user_id" => nil, + "state_reason" => nil, + "created_at" => "stub", + "updated_at" => "stub" + } + model = WorkOS::ConnectedAccount.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + assert_equal fixture["id"], json[:id] + assert_nil json[:account_identifier] + assert_nil json[:account_display_name] + assert_nil json[:user_id] + assert_nil json[:organization_id] + assert_equal fixture["created_at"], json[:created_at] + assert_equal fixture["updated_at"], json[:updated_at] + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + def test_data_integrations_list_response_data_round_trip fixture = { "object" => "data_provider", @@ -265,20 +375,15 @@ def test_data_integrations_list_response_data_round_trip fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } end - def test_data_integration_credentials_response_credential_round_trip + def test_connected_account_write_response_warning_round_trip fixture = { - "object" => "credential", - "auth_method" => "oauth", - "value" => "stub", - "expires_at" => nil, - "scopes" => [], - "missing_scopes" => [] + "code" => "duplicate_account_display_name", + "message" => "stub" } - model = WorkOS::DataIntegrationCredentialsResponseCredential.new(fixture.to_json) + model = WorkOS::ConnectedAccountWriteResponseWarning.new(fixture.to_json) json = model.to_h assert_kind_of Hash, json - assert_equal fixture["value"], json[:value] - assert_nil json[:expires_at] + assert_equal fixture["message"], json[:message] fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } end @@ -363,11 +468,30 @@ def test_data_integration_custom_provider_round_trip fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } end + def test_data_integrations_create_api_key_connection_request_round_trip + fixture = { + "account_display_name" => nil, + "account_identifier" => nil, + "user_id" => "stub", + "organization_id" => "stub", + "connection_owner" => "stub", + "secret" => "stub", + "connection_intent" => "add" + } + model = WorkOS::DataIntegrationsCreateApiKeyConnectionRequest.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + assert_equal fixture["user_id"], json[:user_id] + assert_equal fixture["secret"], json[:secret] + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + def test_data_integrations_upsert_api_key_request_round_trip fixture = { + "account_display_name" => nil, + "account_identifier" => nil, "user_id" => "stub", "organization_id" => "stub", - "connected_account_id" => "stub", "connection_owner" => "stub", "secret" => "stub" } @@ -379,8 +503,48 @@ def test_data_integrations_upsert_api_key_request_round_trip fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } end + def test_reauthorize_data_integrations_upsert_api_key_request_round_trip + fixture = { + "account_display_name" => nil, + "account_identifier" => nil, + "user_id" => "stub", + "organization_id" => "stub", + "connection_owner" => "stub", + "secret" => "stub", + "connection_intent" => "reauthorize", + "connected_account_id" => "stub" + } + model = WorkOS::ReauthorizeDataIntegrationsUpsertApiKeyRequest.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + assert_equal fixture["user_id"], json[:user_id] + assert_equal fixture["secret"], json[:secret] + assert_equal fixture["connected_account_id"], json[:connected_account_id] + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + + def test_data_integrations_upsert_api_key_request_2_round_trip + fixture = { + "account_display_name" => nil, + "account_identifier" => nil, + "user_id" => "stub", + "organization_id" => "stub", + "connection_owner" => "stub", + "secret" => "stub", + "connected_account_id" => "stub" + } + model = WorkOS::DataIntegrationsUpsertApiKeyRequest2.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + assert_equal fixture["user_id"], json[:user_id] + assert_equal fixture["secret"], json[:secret] + assert_equal fixture["connected_account_id"], json[:connected_account_id] + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + def test_data_integrations_get_data_integration_authorize_url_request_round_trip fixture = { + "account_display_name" => nil, "user_id" => "stub", "organization_id" => "stub", "connection_owner" => "stub", @@ -394,11 +558,69 @@ def test_data_integrations_get_data_integration_authorize_url_request_round_trip fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } end + def test_add_data_integrations_get_data_integration_authorize_url_request_round_trip + fixture = { + "account_display_name" => nil, + "user_id" => "stub", + "organization_id" => "stub", + "connection_owner" => "stub", + "return_to" => "stub", + "config" => {}, + "connection_intent" => "add" + } + model = WorkOS::AddDataIntegrationsGetDataIntegrationAuthorizeUrlRequest.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + assert_equal fixture["user_id"], json[:user_id] + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + + def test_reauthorize_data_integrations_get_data_integration_authorize_url_request_round_trip + fixture = { + "account_display_name" => nil, + "user_id" => "stub", + "organization_id" => "stub", + "connection_owner" => "stub", + "return_to" => "stub", + "config" => {}, + "connection_intent" => "reauthorize", + "connected_account_id" => "stub" + } + model = WorkOS::ReauthorizeDataIntegrationsGetDataIntegrationAuthorizeUrlRequest.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + assert_equal fixture["user_id"], json[:user_id] + assert_equal fixture["connected_account_id"], json[:connected_account_id] + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + + def test_data_integrations_create_client_credentials_connection_request_round_trip + fixture = { + "account_display_name" => nil, + "account_identifier" => nil, + "user_id" => "stub", + "organization_id" => "stub", + "connection_owner" => "stub", + "client_id" => "stub", + "client_secret" => "stub", + "config" => {}, + "connection_intent" => "add" + } + model = WorkOS::DataIntegrationsCreateClientCredentialsConnectionRequest.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + assert_equal fixture["user_id"], json[:user_id] + assert_equal fixture["client_id"], json[:client_id] + assert_equal fixture["client_secret"], json[:client_secret] + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + def test_data_integrations_upsert_client_credentials_request_round_trip fixture = { + "account_display_name" => nil, + "account_identifier" => nil, "user_id" => "stub", "organization_id" => "stub", - "connected_account_id" => "stub", "connection_owner" => "stub", "client_id" => "stub", "client_secret" => "stub", @@ -413,6 +635,51 @@ def test_data_integrations_upsert_client_credentials_request_round_trip fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } end + def test_reauthorize_data_integrations_upsert_client_credentials_request_round_trip + fixture = { + "account_display_name" => nil, + "account_identifier" => nil, + "user_id" => "stub", + "organization_id" => "stub", + "connection_owner" => "stub", + "client_id" => "stub", + "client_secret" => "stub", + "config" => {}, + "connection_intent" => "reauthorize", + "connected_account_id" => "stub" + } + model = WorkOS::ReauthorizeDataIntegrationsUpsertClientCredentialsRequest.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + assert_equal fixture["user_id"], json[:user_id] + assert_equal fixture["client_id"], json[:client_id] + assert_equal fixture["client_secret"], json[:client_secret] + assert_equal fixture["connected_account_id"], json[:connected_account_id] + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + + def test_data_integrations_upsert_client_credentials_request_2_round_trip + fixture = { + "account_display_name" => nil, + "account_identifier" => nil, + "user_id" => "stub", + "organization_id" => "stub", + "connection_owner" => "stub", + "client_id" => "stub", + "client_secret" => "stub", + "config" => {}, + "connected_account_id" => "stub" + } + model = WorkOS::DataIntegrationsUpsertClientCredentialsRequest2.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + assert_equal fixture["user_id"], json[:user_id] + assert_equal fixture["client_id"], json[:client_id] + assert_equal fixture["client_secret"], json[:client_secret] + assert_equal fixture["connected_account_id"], json[:connected_account_id] + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + def test_data_integrations_vend_credentials_request_round_trip fixture = { "user_id" => "stub", @@ -459,6 +726,8 @@ def test_data_integrations_list_response_data_connected_account_round_trip "client_secret_last_4" => nil, "config" => {}, "state" => "stub", + "established_by_user_id" => nil, + "state_reason" => nil, "created_at" => "stub", "updated_at" => "stub", "userlandUserId" => nil From 0cffbab49cfb077e7a353b188b37e3ed20e5b8c6 Mon Sep 17 00:00:00 2001 From: "workos-sdk-automation[bot]" <255426317+workos-sdk-automation[bot]@users.noreply.github.com> Date: Wed, 14 Oct 2026 21:32:06 +0000 Subject: [PATCH 5/7] feat(user_management): Update user management API surface --- lib/workos/user_management.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/workos/user_management.rb b/lib/workos/user_management.rb index 4b5ac1f9..9080f245 100644 --- a/lib/workos/user_management.rb +++ b/lib/workos/user_management.rb @@ -1003,7 +1003,7 @@ def list_users( end # Create a user - # @param email [String] The email address of the user. + # @param email [String] The email address of the user. WorkOS trims whitespace and converts the address to lowercase before storing it. # @param first_name [String, nil] The first name of the user. # @param last_name [String, nil] The last name of the user. # @param name [String, nil] The user's full name. From c9e83560281dc3717a4abc5253eabf4d7a799e44 Mon Sep 17 00:00:00 2001 From: "workos-sdk-automation[bot]" <255426317+workos-sdk-automation[bot]@users.noreply.github.com> Date: Wed, 14 Oct 2026 21:32:06 +0000 Subject: [PATCH 6/7] chore(generated): regenerate shared files for AdminPortal, Agents, ApiKeys, AuditLogs, Authorization, ClientApi, Connect, DirectorySync, Events, FeatureFlags, Groups, MultiFactorAuth, OrganizationDomains, OrganizationMembership, Organizations, Pipes, PipesProvider, PlatformTeams, Radar, SSO, UserManagement, Vault, Webhooks, Widgets --- .last-synced-sha | 2 +- .oagen-manifest.json | 86 ++++++++++++++++++- lib/workos/agents.rb | 6 ++ lib/workos/agents/agent_blueprint.rb | 3 + .../agents/agent_blueprint_invocable_as.rb | 18 ++++ .../agents/agent_blueprints_update_request.rb | 3 + ..._blueprints_update_request_invocable_as.rb | 18 ++++ lib/workos/directory_sync.rb | 19 ++++ .../directory_sync_rate_limit_error.rb | 25 ++++++ .../directory_sync/directory_sync_response.rb | 18 ++++ ...gration_credentials_response_credential.rb | 34 -------- .../shared/agent_blueprint_updated_data.rb | 41 ++++++++- ...ent_blueprint_updated_data_invocable_as.rb | 18 ++++ lib/workos/sso.rb | 3 + lib/workos/sso/token_query.rb | 3 + ...t_blueprint_invocable_as_instance_types.rb | 9 ++ ...pdated_data_invocable_as_instance_types.rb | 9 ++ ...ate_request_invocable_as_instance_types.rb | 9 ++ .../types/agent_instance_deleted_data_type.rb | 2 +- lib/workos/types/agent_instance_type.rb | 2 +- ...sert_api_key_request_2_connection_owner.rb | 9 ++ ...upsert_api_key_request_connection_owner.rb | 2 +- ...upsert_api_key_request_connection_owner.rb | 9 ++ .../vault_dek_rekeyed_data_actor_source.rb | 9 ++ lib/workos/vault/vault_dek_rekeyed.rb | 34 ++++++++ lib/workos/vault/vault_dek_rekeyed_data.rb | 31 +++++++ rbi/workos/agent_blueprint.rbi | 6 ++ rbi/workos/agent_blueprint_invocable_as.rbi | 24 ++++++ rbi/workos/agent_blueprint_updated_data.rbi | 6 ++ ...nt_blueprint_updated_data_invocable_as.rbi | 24 ++++++ .../agent_blueprints_update_request.rbi | 6 ++ ...blueprints_update_request_invocable_as.rbi | 24 ++++++ rbi/workos/agents.rbi | 6 +- ...ta_integrations_upsert_api_key_request.rbi | 18 ++-- ..._integrations_upsert_api_key_request_2.rbi | 60 +++++++++++++ rbi/workos/directory_sync.rbi | 8 ++ .../directory_sync_rate_limit_error.rbi | 36 ++++++++ rbi/workos/directory_sync_response.rbi | 24 ++++++ ...ta_integrations_upsert_api_key_request.rbi | 66 ++++++++++++++ rbi/workos/sso.rbi | 3 +- rbi/workos/token_query.rbi | 6 ++ rbi/workos/vault_dek_rekeyed.rbi | 54 ++++++++++++ ...dential.rbi => vault_dek_rekeyed_data.rbi} | 32 +++---- test/workos/test_agents_model_round_trip.rb | 33 +++++++ test/workos/test_directory_sync.rb | 8 ++ .../test_directory_sync_model_round_trip.rb | 24 ++++++ test/workos/test_shared_model_round_trip.rb | 36 ++++++-- test/workos/test_sso_model_round_trip.rb | 1 + test/workos/test_vault_model_round_trip.rb | 33 +++++++ 49 files changed, 885 insertions(+), 75 deletions(-) create mode 100644 lib/workos/agents/agent_blueprint_invocable_as.rb create mode 100644 lib/workos/agents/agent_blueprints_update_request_invocable_as.rb create mode 100644 lib/workos/directory_sync/directory_sync_rate_limit_error.rb create mode 100644 lib/workos/directory_sync/directory_sync_response.rb delete mode 100644 lib/workos/pipes/data_integration_credentials_response_credential.rb create mode 100644 lib/workos/shared/agent_blueprint_updated_data_invocable_as.rb create mode 100644 lib/workos/types/agent_blueprint_invocable_as_instance_types.rb create mode 100644 lib/workos/types/agent_blueprint_updated_data_invocable_as_instance_types.rb create mode 100644 lib/workos/types/agent_blueprints_update_request_invocable_as_instance_types.rb create mode 100644 lib/workos/types/data_integrations_upsert_api_key_request_2_connection_owner.rb create mode 100644 lib/workos/types/reauthorize_data_integrations_upsert_api_key_request_connection_owner.rb create mode 100644 lib/workos/types/vault_dek_rekeyed_data_actor_source.rb create mode 100644 lib/workos/vault/vault_dek_rekeyed.rb create mode 100644 lib/workos/vault/vault_dek_rekeyed_data.rb create mode 100644 rbi/workos/agent_blueprint_invocable_as.rbi create mode 100644 rbi/workos/agent_blueprint_updated_data_invocable_as.rbi create mode 100644 rbi/workos/agent_blueprints_update_request_invocable_as.rbi create mode 100644 rbi/workos/data_integrations_upsert_api_key_request_2.rbi create mode 100644 rbi/workos/directory_sync_rate_limit_error.rbi create mode 100644 rbi/workos/directory_sync_response.rbi create mode 100644 rbi/workos/reauthorize_data_integrations_upsert_api_key_request.rbi create mode 100644 rbi/workos/vault_dek_rekeyed.rbi rename rbi/workos/{data_integration_credentials_response_credential.rbi => vault_dek_rekeyed_data.rbi} (55%) diff --git a/.last-synced-sha b/.last-synced-sha index 89fbe35a..90399c99 100644 --- a/.last-synced-sha +++ b/.last-synced-sha @@ -1 +1 @@ -6f037208ce812063908f97744b4aaf4fdf570351 +81a34a1dfa516c1987aff4038af330436b53e151 diff --git a/.oagen-manifest.json b/.oagen-manifest.json index ade3f514..3c7b2139 100644 --- a/.oagen-manifest.json +++ b/.oagen-manifest.json @@ -6,19 +6,23 @@ "lib/workos/admin_portal.rb", "lib/workos/admin_portal/generate_link.rb", "lib/workos/admin_portal/portal_link_response.rb", + "lib/workos/admin_portal/revoke_link.rb", "lib/workos/agents.rb", "lib/workos/agents/agent_admin_link_claim_attempt_to_external_user_request.rb", "lib/workos/agents/agent_admin_link_claim_attempt_to_external_user_request_user.rb", "lib/workos/agents/agent_admin_validate_credential_request.rb", "lib/workos/agents/agent_blueprint.rb", + "lib/workos/agents/agent_blueprint_invocable_as.rb", "lib/workos/agents/agent_blueprint_invocable_by.rb", "lib/workos/agents/agent_blueprint_session_setting.rb", "lib/workos/agents/agent_blueprints_create_request.rb", + "lib/workos/agents/agent_blueprints_create_request_invocable_as.rb", "lib/workos/agents/agent_blueprints_create_request_invocable_by.rb", "lib/workos/agents/agent_blueprints_create_request_session_setting.rb", "lib/workos/agents/agent_blueprints_token_mint_token_request.rb", "lib/workos/agents/agent_blueprints_token_validate_token_request.rb", "lib/workos/agents/agent_blueprints_update_request.rb", + "lib/workos/agents/agent_blueprints_update_request_invocable_as.rb", "lib/workos/agents/agent_blueprints_update_request_invocable_by.rb", "lib/workos/agents/agent_blueprints_update_request_session_setting.rb", "lib/workos/agents/agent_credential_validation.rb", @@ -137,6 +141,8 @@ "lib/workos/directory_sync/directory_group.rb", "lib/workos/directory_sync/directory_metadata.rb", "lib/workos/directory_sync/directory_metadata_user.rb", + "lib/workos/directory_sync/directory_sync_rate_limit_error.rb", + "lib/workos/directory_sync/directory_sync_response.rb", "lib/workos/directory_sync/directory_user.rb", "lib/workos/directory_sync/directory_user_email.rb", "lib/workos/directory_sync/directory_user_with_groups.rb", @@ -278,10 +284,15 @@ "lib/workos/organizations/update_audit_logs_retention.rb", "lib/workos/organizations/update_organization.rb", "lib/workos/pipes.rb", + "lib/workos/pipes/add_data_integrations_get_data_integration_authorize_url_request.rb", "lib/workos/pipes/api_key_installation.rb", "lib/workos/pipes/connected_account.rb", "lib/workos/pipes/connected_account_input.rb", + "lib/workos/pipes/connected_account_write_response.rb", + "lib/workos/pipes/connected_account_write_response_warning.rb", + "lib/workos/pipes/create_connected_account.rb", "lib/workos/pipes/create_data_integration.rb", + "lib/workos/pipes/create_organization_connected_account.rb", "lib/workos/pipes/custom_provider_definition.rb", "lib/workos/pipes/data_integration.rb", "lib/workos/pipes/data_integration_access_token_response.rb", @@ -290,17 +301,25 @@ "lib/workos/pipes/data_integration_credential.rb", "lib/workos/pipes/data_integration_credentials_input.rb", "lib/workos/pipes/data_integration_credentials_response.rb", - "lib/workos/pipes/data_integration_credentials_response_credential.rb", "lib/workos/pipes/data_integration_custom_provider.rb", "lib/workos/pipes/data_integration_installation.rb", + "lib/workos/pipes/data_integration_vended_credential.rb", + "lib/workos/pipes/data_integrations_create_api_key_connection_request.rb", + "lib/workos/pipes/data_integrations_create_client_credentials_connection_request.rb", "lib/workos/pipes/data_integrations_get_data_integration_authorize_url_request.rb", "lib/workos/pipes/data_integrations_get_user_token_request.rb", "lib/workos/pipes/data_integrations_list_response.rb", "lib/workos/pipes/data_integrations_list_response_data.rb", "lib/workos/pipes/data_integrations_list_response_data_connected_account.rb", "lib/workos/pipes/data_integrations_upsert_api_key_request.rb", + "lib/workos/pipes/data_integrations_upsert_api_key_request_2.rb", "lib/workos/pipes/data_integrations_upsert_client_credentials_request.rb", + "lib/workos/pipes/data_integrations_upsert_client_credentials_request_2.rb", "lib/workos/pipes/data_integrations_vend_credentials_request.rb", + "lib/workos/pipes/organization_connected_account.rb", + "lib/workos/pipes/reauthorize_data_integrations_get_data_integration_authorize_url_request.rb", + "lib/workos/pipes/reauthorize_data_integrations_upsert_api_key_request.rb", + "lib/workos/pipes/reauthorize_data_integrations_upsert_client_credentials_request.rb", "lib/workos/pipes/update_custom_provider_definition.rb", "lib/workos/pipes/update_data_integration.rb", "lib/workos/pipes_provider.rb", @@ -322,12 +341,14 @@ "lib/workos/shared/account_selection_required_error.rb", "lib/workos/shared/agent_blueprint_created.rb", "lib/workos/shared/agent_blueprint_created_data.rb", + "lib/workos/shared/agent_blueprint_created_data_invocable_as.rb", "lib/workos/shared/agent_blueprint_created_data_invocable_by.rb", "lib/workos/shared/agent_blueprint_created_data_session_setting.rb", "lib/workos/shared/agent_blueprint_deleted.rb", "lib/workos/shared/agent_blueprint_deleted_data.rb", "lib/workos/shared/agent_blueprint_updated.rb", "lib/workos/shared/agent_blueprint_updated_data.rb", + "lib/workos/shared/agent_blueprint_updated_data_invocable_as.rb", "lib/workos/shared/agent_blueprint_updated_data_invocable_by.rb", "lib/workos/shared/agent_blueprint_updated_data_session_setting.rb", "lib/workos/shared/agent_instance_created.rb", @@ -444,8 +465,14 @@ "lib/workos/sso/sso_token_response.rb", "lib/workos/sso/sso_token_response_oauth_token.rb", "lib/workos/sso/token_query.rb", + "lib/workos/types/add_data_integrations_get_data_integration_authorize_url_request_connection_owner.rb", "lib/workos/types/agent_admin_validate_credential_request_type.rb", + "lib/workos/types/agent_blueprint_created_data_invocable_as_instance_types.rb", + "lib/workos/types/agent_blueprint_invocable_as_instance_types.rb", + "lib/workos/types/agent_blueprint_updated_data_invocable_as_instance_types.rb", + "lib/workos/types/agent_blueprints_create_request_invocable_as_instance_types.rb", "lib/workos/types/agent_blueprints_token_mint_token_request_type.rb", + "lib/workos/types/agent_blueprints_update_request_invocable_as_instance_types.rb", "lib/workos/types/agent_instance_created_data_type.rb", "lib/workos/types/agent_instance_deleted_data_type.rb", "lib/workos/types/agent_instance_session_status.rb", @@ -471,6 +498,9 @@ "lib/workos/types/connected_account_connection_role.rb", "lib/workos/types/connected_account_input_state.rb", "lib/workos/types/connected_account_state.rb", + "lib/workos/types/connected_account_write_response_auth_method.rb", + "lib/workos/types/connected_account_write_response_connection_role.rb", + "lib/workos/types/connected_account_write_response_state.rb", "lib/workos/types/connection_activated_data_connection_type.rb", "lib/workos/types/connection_activated_data_state.rb", "lib/workos/types/connection_activated_data_status.rb", @@ -485,10 +515,12 @@ "lib/workos/types/connection_status.rb", "lib/workos/types/connection_type.rb", "lib/workos/types/connections_connection_type.rb", + "lib/workos/types/create_connected_account_state.rb", "lib/workos/types/create_connection_oidc_options_id_token_signature_algorithm.rb", "lib/workos/types/create_connection_oidc_options_token_authentication_method.rb", "lib/workos/types/create_data_integration_auth_methods.rb", "lib/workos/types/create_data_integration_ownership.rb", + "lib/workos/types/create_organization_connected_account_state.rb", "lib/workos/types/create_user_invite_options_locale.rb", "lib/workos/types/create_user_password_hash_type.rb", "lib/workos/types/create_user_password_salt_position.rb", @@ -504,6 +536,8 @@ "lib/workos/types/data_integration_installation_connection_role.rb", "lib/workos/types/data_integration_ownership.rb", "lib/workos/types/data_integration_state.rb", + "lib/workos/types/data_integrations_create_api_key_connection_request_connection_owner.rb", + "lib/workos/types/data_integrations_create_client_credentials_connection_request_connection_owner.rb", "lib/workos/types/data_integrations_get_data_integration_authorize_url_request_connection_owner.rb", "lib/workos/types/data_integrations_get_user_token_request_connection_owner.rb", "lib/workos/types/data_integrations_list_response_data_auth_methods.rb", @@ -512,7 +546,9 @@ "lib/workos/types/data_integrations_list_response_data_connected_account_state.rb", "lib/workos/types/data_integrations_list_response_data_connection_owner.rb", "lib/workos/types/data_integrations_list_response_data_ownership.rb", + "lib/workos/types/data_integrations_upsert_api_key_request_2_connection_owner.rb", "lib/workos/types/data_integrations_upsert_api_key_request_connection_owner.rb", + "lib/workos/types/data_integrations_upsert_client_credentials_request_2_connection_owner.rb", "lib/workos/types/data_integrations_upsert_client_credentials_request_connection_owner.rb", "lib/workos/types/data_integrations_vend_credentials_request_connection_owner.rb", "lib/workos/types/directory_state.rb", @@ -538,6 +574,7 @@ "lib/workos/types/invitation_revoked_data_state.rb", "lib/workos/types/invitation_state.rb", "lib/workos/types/invite_it_contact_intents.rb", + "lib/workos/types/organization_connected_account_state.rb", "lib/workos/types/organization_created_data_domain_state.rb", "lib/workos/types/organization_created_data_domain_verification_strategy.rb", "lib/workos/types/organization_deleted_data_domain_state.rb", @@ -577,6 +614,9 @@ "lib/workos/types/radar_standalone_response_blocklist_type.rb", "lib/workos/types/radar_standalone_response_control.rb", "lib/workos/types/radar_standalone_response_verdict.rb", + "lib/workos/types/reauthorize_data_integrations_get_data_integration_authorize_url_request_connection_owner.rb", + "lib/workos/types/reauthorize_data_integrations_upsert_api_key_request_connection_owner.rb", + "lib/workos/types/reauthorize_data_integrations_upsert_client_credentials_request_connection_owner.rb", "lib/workos/types/resend_user_invite_options_locale.rb", "lib/workos/types/resource_export_completed_data_resource_type.rb", "lib/workos/types/resource_export_created_data_resource_type.rb", @@ -615,6 +655,7 @@ "lib/workos/types/vault_data_updated_data_actor_source.rb", "lib/workos/types/vault_dek_decrypted_data_actor_source.rb", "lib/workos/types/vault_dek_read_data_actor_source.rb", + "lib/workos/types/vault_dek_rekeyed_data_actor_source.rb", "lib/workos/types/vault_kek_created_data_actor_source.rb", "lib/workos/types/vault_kek_deleted_data_actor_source.rb", "lib/workos/types/vault_metadata_read_data_actor_source.rb", @@ -801,6 +842,8 @@ "lib/workos/vault/vault_dek_decrypted_data.rb", "lib/workos/vault/vault_dek_read.rb", "lib/workos/vault/vault_dek_read_data.rb", + "lib/workos/vault/vault_dek_rekeyed.rb", + "lib/workos/vault/vault_dek_rekeyed_data.rb", "lib/workos/vault/vault_kek_created.rb", "lib/workos/vault/vault_kek_created_data.rb", "lib/workos/vault/vault_kek_deleted.rb", @@ -825,6 +868,7 @@ "rbi/workos/action_user_registration_denied.rbi", "rbi/workos/action_user_registration_denied_data.rbi", "rbi/workos/actor.rbi", + "rbi/workos/add_data_integrations_get_data_integration_authorize_url_request.rbi", "rbi/workos/add_role_permission.rbi", "rbi/workos/admin_portal.rbi", "rbi/workos/agent_admin_link_claim_attempt_to_external_user_request.rbi", @@ -833,22 +877,27 @@ "rbi/workos/agent_blueprint.rbi", "rbi/workos/agent_blueprint_created.rbi", "rbi/workos/agent_blueprint_created_data.rbi", + "rbi/workos/agent_blueprint_created_data_invocable_as.rbi", "rbi/workos/agent_blueprint_created_data_invocable_by.rbi", "rbi/workos/agent_blueprint_created_data_session_setting.rbi", "rbi/workos/agent_blueprint_deleted.rbi", "rbi/workos/agent_blueprint_deleted_data.rbi", + "rbi/workos/agent_blueprint_invocable_as.rbi", "rbi/workos/agent_blueprint_invocable_by.rbi", "rbi/workos/agent_blueprint_session_setting.rbi", "rbi/workos/agent_blueprint_updated.rbi", "rbi/workos/agent_blueprint_updated_data.rbi", + "rbi/workos/agent_blueprint_updated_data_invocable_as.rbi", "rbi/workos/agent_blueprint_updated_data_invocable_by.rbi", "rbi/workos/agent_blueprint_updated_data_session_setting.rbi", "rbi/workos/agent_blueprints_create_request.rbi", + "rbi/workos/agent_blueprints_create_request_invocable_as.rbi", "rbi/workos/agent_blueprints_create_request_invocable_by.rbi", "rbi/workos/agent_blueprints_create_request_session_setting.rbi", "rbi/workos/agent_blueprints_token_mint_token_request.rbi", "rbi/workos/agent_blueprints_token_validate_token_request.rbi", "rbi/workos/agent_blueprints_update_request.rbi", + "rbi/workos/agent_blueprints_update_request_invocable_as.rbi", "rbi/workos/agent_blueprints_update_request_invocable_by.rbi", "rbi/workos/agent_blueprints_update_request_session_setting.rbi", "rbi/workos/agent_credential_validation.rbi", @@ -1012,6 +1061,8 @@ "rbi/workos/connect_application_oauth_redirect_uris.rbi", "rbi/workos/connected_account.rbi", "rbi/workos/connected_account_input.rbi", + "rbi/workos/connected_account_write_response.rbi", + "rbi/workos/connected_account_write_response_warning.rbi", "rbi/workos/connection.rbi", "rbi/workos/connection_activated.rbi", "rbi/workos/connection_activated_data.rbi", @@ -1035,6 +1086,7 @@ "rbi/workos/create_authkit_oauth_resource.rbi", "rbi/workos/create_authorization_permission.rbi", "rbi/workos/create_authorization_resource.rbi", + "rbi/workos/create_connected_account.rbi", "rbi/workos/create_connection.rbi", "rbi/workos/create_connection_attribute_maps.rbi", "rbi/workos/create_connection_key_pair.rbi", @@ -1054,6 +1106,7 @@ "rbi/workos/create_oauth_application.rbi", "rbi/workos/create_object_request.rbi", "rbi/workos/create_organization_api_key.rbi", + "rbi/workos/create_organization_connected_account.rbi", "rbi/workos/create_organization_domain.rbi", "rbi/workos/create_organization_role.rbi", "rbi/workos/create_password_reset.rbi", @@ -1079,16 +1132,20 @@ "rbi/workos/data_integration_credentials.rbi", "rbi/workos/data_integration_credentials_input.rbi", "rbi/workos/data_integration_credentials_response.rbi", - "rbi/workos/data_integration_credentials_response_credential.rbi", "rbi/workos/data_integration_custom_provider.rbi", "rbi/workos/data_integration_installation.rbi", + "rbi/workos/data_integration_vended_credential.rbi", + "rbi/workos/data_integrations_create_api_key_connection_request.rbi", + "rbi/workos/data_integrations_create_client_credentials_connection_request.rbi", "rbi/workos/data_integrations_get_data_integration_authorize_url_request.rbi", "rbi/workos/data_integrations_get_user_token_request.rbi", "rbi/workos/data_integrations_list_response.rbi", "rbi/workos/data_integrations_list_response_data.rbi", "rbi/workos/data_integrations_list_response_data_connected_account.rbi", "rbi/workos/data_integrations_upsert_api_key_request.rbi", + "rbi/workos/data_integrations_upsert_api_key_request_2.rbi", "rbi/workos/data_integrations_upsert_client_credentials_request.rbi", + "rbi/workos/data_integrations_upsert_client_credentials_request_2.rbi", "rbi/workos/data_integrations_vend_credentials_request.rbi", "rbi/workos/decrypt_request.rbi", "rbi/workos/decrypt_response.rbi", @@ -1101,6 +1158,8 @@ "rbi/workos/directory_metadata.rbi", "rbi/workos/directory_metadata_user.rbi", "rbi/workos/directory_sync.rbi", + "rbi/workos/directory_sync_rate_limit_error.rbi", + "rbi/workos/directory_sync_response.rbi", "rbi/workos/directory_user.rbi", "rbi/workos/directory_user_email.rbi", "rbi/workos/directory_user_with_groups.rbi", @@ -1225,6 +1284,7 @@ "rbi/workos/organization_api_key_with_value.rbi", "rbi/workos/organization_api_key_with_value_owner.rbi", "rbi/workos/organization_authorized_connect_application_list_data.rbi", + "rbi/workos/organization_connected_account.rbi", "rbi/workos/organization_created.rbi", "rbi/workos/organization_created_data.rbi", "rbi/workos/organization_created_data_domain.rbi", @@ -1313,6 +1373,9 @@ "rbi/workos/radar_standalone_response.rbi", "rbi/workos/radar_standalone_update_radar_attempt_request.rbi", "rbi/workos/radar_standalone_update_radar_list_request.rbi", + "rbi/workos/reauthorize_data_integrations_get_data_integration_authorize_url_request.rbi", + "rbi/workos/reauthorize_data_integrations_upsert_api_key_request.rbi", + "rbi/workos/reauthorize_data_integrations_upsert_client_credentials_request.rbi", "rbi/workos/redirect_uri.rbi", "rbi/workos/redirect_uri_input.rbi", "rbi/workos/refresh_token_session_authenticate_request.rbi", @@ -1330,6 +1393,7 @@ "rbi/workos/resource_export_downloaded_data.rbi", "rbi/workos/resource_export_failed.rbi", "rbi/workos/resource_export_failed_data.rbi", + "rbi/workos/revoke_link.rbi", "rbi/workos/revoke_session.rbi", "rbi/workos/role.rbi", "rbi/workos/role_created.rbi", @@ -1426,6 +1490,8 @@ "rbi/workos/vault_dek_decrypted_data.rbi", "rbi/workos/vault_dek_read.rbi", "rbi/workos/vault_dek_read_data.rbi", + "rbi/workos/vault_dek_rekeyed.rbi", + "rbi/workos/vault_dek_rekeyed_data.rbi", "rbi/workos/vault_kek_created.rbi", "rbi/workos/vault_kek_created_data.rbi", "rbi/workos/vault_kek_deleted.rbi", @@ -1886,6 +1952,10 @@ "sdkMethod": "delete_data_integration", "service": "pipes" }, + "POST /data-integrations/{slug}/api-key": { + "sdkMethod": "create_data_integration_api_key", + "service": "pipes" + }, "PUT /data-integrations/{slug}/api-key": { "sdkMethod": "update_data_integration_api_key", "service": "pipes" @@ -1894,6 +1964,10 @@ "sdkMethod": "authorize_data_integration", "service": "pipes" }, + "POST /data-integrations/{slug}/client-credentials": { + "sdkMethod": "create_data_integration_client_credential", + "service": "pipes" + }, "PUT /data-integrations/{slug}/client-credentials": { "sdkMethod": "update_data_integration_client_credentials", "service": "pipes" @@ -1930,6 +2004,10 @@ "sdkMethod": "delete_directory", "service": "directory_sync" }, + "POST /directories/{id}/sync": { + "sdkMethod": "create_directory_sync", + "service": "directory_sync" + }, "GET /directory_groups": { "sdkMethod": "list_groups", "service": "directory_sync" @@ -2134,6 +2212,10 @@ "sdkMethod": "generate_link", "service": "admin_portal" }, + "POST /portal/revoke_link": { + "sdkMethod": "create_revoke_link", + "service": "admin_portal" + }, "POST /radar/attempts": { "sdkMethod": "create_attempt", "service": "radar" diff --git a/lib/workos/agents.rb b/lib/workos/agents.rb index ce064ab0..7a7a20c0 100644 --- a/lib/workos/agents.rb +++ b/lib/workos/agents.rb @@ -59,6 +59,7 @@ def list_blueprints( # @param description [String, nil] Human-readable description of the agent blueprint. # @param permissions [Array, nil] Permission slugs forming the ceiling on what sessions minted from this blueprint may do. Each slug must exist in the environment. # @param invocable_by [WorkOS::AgentBlueprintsCreateRequestInvocableBy, nil] Who may mint sessions from this blueprint. + # @param invocable_as [WorkOS::AgentBlueprintsCreateRequestInvocableAs, nil] How sessions may be minted from this blueprint. # @param session_settings [WorkOS::AgentBlueprintsCreateRequestSessionSetting, nil] Token and session lifetimes for sessions minted from this blueprint. # @param request_options [Hash] (see WorkOS::Types::RequestOptions) # @return [WorkOS::AgentBlueprint] @@ -67,6 +68,7 @@ def create_blueprint( description: nil, permissions: nil, invocable_by: nil, + invocable_as: nil, session_settings: nil, request_options: {} ) @@ -75,6 +77,7 @@ def create_blueprint( "description" => description, "permissions" => permissions, "invocable_by" => invocable_by, + "invocable_as" => invocable_as, "session_settings" => session_settings }.compact response = @client.request( @@ -114,6 +117,7 @@ def get_blueprint( # @param description [String, nil] Human-readable description of the agent blueprint. Pass `null` to clear it. # @param permissions [Array, nil] Permission slugs forming the ceiling on what sessions minted from this blueprint may do. Each slug must exist in the environment. # @param invocable_by [WorkOS::AgentBlueprintsUpdateRequestInvocableBy, nil] Who may mint sessions from this blueprint. Omitted lists are left unchanged. + # @param invocable_as [WorkOS::AgentBlueprintsUpdateRequestInvocableAs, nil] How sessions may be minted from this blueprint. Omitted lists are left unchanged. # @param session_settings [WorkOS::AgentBlueprintsUpdateRequestSessionSetting, nil] Token and session lifetimes for sessions minted from this blueprint. Omitted fields are left unchanged. # @param request_options [Hash] (see WorkOS::Types::RequestOptions) # @return [WorkOS::AgentBlueprint] @@ -123,6 +127,7 @@ def update_blueprint( description: WorkOS::OMIT, permissions: nil, invocable_by: nil, + invocable_as: nil, session_settings: nil, request_options: {} ) @@ -130,6 +135,7 @@ def update_blueprint( "name" => name, "permissions" => permissions, "invocable_by" => invocable_by, + "invocable_as" => invocable_as, "session_settings" => session_settings }.compact body["description"] = description unless description.equal?(WorkOS::OMIT) diff --git a/lib/workos/agents/agent_blueprint.rb b/lib/workos/agents/agent_blueprint.rb index 017cd5ef..e2a365a2 100644 --- a/lib/workos/agents/agent_blueprint.rb +++ b/lib/workos/agents/agent_blueprint.rb @@ -11,6 +11,7 @@ class AgentBlueprint < WorkOS::Types::BaseModel description: :description, permissions: :permissions, invocable_by: :invocable_by, + invocable_as: :invocable_as, session_settings: :session_settings, created_at: :created_at, updated_at: :updated_at @@ -23,6 +24,7 @@ class AgentBlueprint < WorkOS::Types::BaseModel :description, :permissions, :invocable_by, + :invocable_as, :session_settings, :created_at, :updated_at @@ -35,6 +37,7 @@ def initialize(json) @description = hash[:description] @permissions = hash[:permissions] || [] @invocable_by = hash[:invocable_by] ? WorkOS::AgentBlueprintInvocableBy.new(hash[:invocable_by]) : nil + @invocable_as = hash[:invocable_as] ? WorkOS::AgentBlueprintInvocableAs.new(hash[:invocable_as]) : nil @session_settings = hash[:session_settings] ? WorkOS::AgentBlueprintSessionSetting.new(hash[:session_settings]) : nil @created_at = hash[:created_at] @updated_at = hash[:updated_at] diff --git a/lib/workos/agents/agent_blueprint_invocable_as.rb b/lib/workos/agents/agent_blueprint_invocable_as.rb new file mode 100644 index 00000000..fa03eea9 --- /dev/null +++ b/lib/workos/agents/agent_blueprint_invocable_as.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class AgentBlueprintInvocableAs < WorkOS::Types::BaseModel + HASH_ATTRS = { + instance_types: :instance_types + }.freeze + + attr_accessor :instance_types + + def initialize(json) + hash = self.class.normalize(json) + @instance_types = hash[:instance_types] || [] + end + end +end diff --git a/lib/workos/agents/agent_blueprints_update_request.rb b/lib/workos/agents/agent_blueprints_update_request.rb index 887ffaa2..9ffb1c64 100644 --- a/lib/workos/agents/agent_blueprints_update_request.rb +++ b/lib/workos/agents/agent_blueprints_update_request.rb @@ -9,6 +9,7 @@ class AgentBlueprintsUpdateRequest < WorkOS::Types::BaseModel description: :description, permissions: :permissions, invocable_by: :invocable_by, + invocable_as: :invocable_as, session_settings: :session_settings }.freeze @@ -17,6 +18,7 @@ class AgentBlueprintsUpdateRequest < WorkOS::Types::BaseModel :description, :permissions, :invocable_by, + :invocable_as, :session_settings def initialize(json) @@ -25,6 +27,7 @@ def initialize(json) @description = hash[:description] @permissions = hash[:permissions] || [] @invocable_by = hash[:invocable_by] ? WorkOS::AgentBlueprintsUpdateRequestInvocableBy.new(hash[:invocable_by]) : nil + @invocable_as = hash[:invocable_as] ? WorkOS::AgentBlueprintsUpdateRequestInvocableAs.new(hash[:invocable_as]) : nil @session_settings = hash[:session_settings] ? WorkOS::AgentBlueprintsUpdateRequestSessionSetting.new(hash[:session_settings]) : nil end end diff --git a/lib/workos/agents/agent_blueprints_update_request_invocable_as.rb b/lib/workos/agents/agent_blueprints_update_request_invocable_as.rb new file mode 100644 index 00000000..7698f80e --- /dev/null +++ b/lib/workos/agents/agent_blueprints_update_request_invocable_as.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class AgentBlueprintsUpdateRequestInvocableAs < WorkOS::Types::BaseModel + HASH_ATTRS = { + instance_types: :instance_types + }.freeze + + attr_accessor :instance_types + + def initialize(json) + hash = self.class.normalize(json) + @instance_types = hash[:instance_types] || [] + end + end +end diff --git a/lib/workos/directory_sync.rb b/lib/workos/directory_sync.rb index 3420ba7c..b92faa9b 100644 --- a/lib/workos/directory_sync.rb +++ b/lib/workos/directory_sync.rb @@ -102,6 +102,25 @@ def delete_directory( nil end + # Sync a Directory + # @param id [String] Unique identifier for the Directory. + # @param request_options [Hash] (see WorkOS::Types::RequestOptions) + # @return [WorkOS::DirectorySyncResponse] + def create_directory_sync( + id:, + request_options: {} + ) + response = @client.request( + method: :post, + path: "/directories/#{WorkOS::Util.encode_path(id)}/sync", + auth: true, + request_options: request_options + ) + result = WorkOS::DirectorySyncResponse.new(response.body) + result.last_response = WorkOS::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"]) + result + end + # List Directory Groups # @param before [String, nil] An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `before="obj_123"` to fetch a new batch of objects before `"obj_123"`. # @param after [String, nil] An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `after="obj_123"` to fetch a new batch of objects after `"obj_123"`. diff --git a/lib/workos/directory_sync/directory_sync_rate_limit_error.rb b/lib/workos/directory_sync/directory_sync_rate_limit_error.rb new file mode 100644 index 00000000..4312daf1 --- /dev/null +++ b/lib/workos/directory_sync/directory_sync_rate_limit_error.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class DirectorySyncRateLimitError < WorkOS::Types::BaseModel + HASH_ATTRS = { + code: :code, + message: :message, + retry_after_seconds: :retry_after_seconds + }.freeze + + attr_accessor \ + :code, + :message, + :retry_after_seconds + + def initialize(json) + hash = self.class.normalize(json) + @code = hash[:code] + @message = hash[:message] + @retry_after_seconds = hash[:retry_after_seconds] + end + end +end diff --git a/lib/workos/directory_sync/directory_sync_response.rb b/lib/workos/directory_sync/directory_sync_response.rb new file mode 100644 index 00000000..a543e217 --- /dev/null +++ b/lib/workos/directory_sync/directory_sync_response.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class DirectorySyncResponse < WorkOS::Types::BaseModel + HASH_ATTRS = { + status: :status + }.freeze + + attr_accessor :status + + def initialize(json) + hash = self.class.normalize(json) + @status = hash[:status] + end + end +end diff --git a/lib/workos/pipes/data_integration_credentials_response_credential.rb b/lib/workos/pipes/data_integration_credentials_response_credential.rb deleted file mode 100644 index 08afcc00..00000000 --- a/lib/workos/pipes/data_integration_credentials_response_credential.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# This file is auto-generated by oagen. Do not edit. - -module WorkOS - class DataIntegrationCredentialsResponseCredential < WorkOS::Types::BaseModel - HASH_ATTRS = { - object: :object, - auth_method: :auth_method, - value: :value, - expires_at: :expires_at, - scopes: :scopes, - missing_scopes: :missing_scopes - }.freeze - - attr_accessor \ - :object, - :auth_method, - :value, - :expires_at, - :scopes, - :missing_scopes - - def initialize(json) - hash = self.class.normalize(json) - @object = hash[:object] - @auth_method = hash[:auth_method] - @value = hash[:value] - @expires_at = hash[:expires_at] - @scopes = hash[:scopes] || [] - @missing_scopes = hash[:missing_scopes] || [] - end - end -end diff --git a/lib/workos/shared/agent_blueprint_updated_data.rb b/lib/workos/shared/agent_blueprint_updated_data.rb index afe9ce27..90e630d8 100644 --- a/lib/workos/shared/agent_blueprint_updated_data.rb +++ b/lib/workos/shared/agent_blueprint_updated_data.rb @@ -3,5 +3,44 @@ # This file is auto-generated by oagen. Do not edit. module WorkOS - AgentBlueprintUpdatedData = AgentBlueprintCreatedData + class AgentBlueprintUpdatedData < WorkOS::Types::BaseModel + HASH_ATTRS = { + object: :object, + id: :id, + name: :name, + description: :description, + permissions: :permissions, + invocable_by: :invocable_by, + invocable_as: :invocable_as, + session_settings: :session_settings, + created_at: :created_at, + updated_at: :updated_at + }.freeze + + attr_accessor \ + :object, + :id, + :name, + :description, + :permissions, + :invocable_by, + :invocable_as, + :session_settings, + :created_at, + :updated_at + + def initialize(json) + hash = self.class.normalize(json) + @object = hash[:object] + @id = hash[:id] + @name = hash[:name] + @description = hash[:description] + @permissions = hash[:permissions] || [] + @invocable_by = hash[:invocable_by] ? WorkOS::AgentBlueprintUpdatedDataInvocableBy.new(hash[:invocable_by]) : nil + @invocable_as = hash[:invocable_as] ? WorkOS::AgentBlueprintUpdatedDataInvocableAs.new(hash[:invocable_as]) : nil + @session_settings = hash[:session_settings] ? WorkOS::AgentBlueprintUpdatedDataSessionSetting.new(hash[:session_settings]) : nil + @created_at = hash[:created_at] + @updated_at = hash[:updated_at] + end + end end diff --git a/lib/workos/shared/agent_blueprint_updated_data_invocable_as.rb b/lib/workos/shared/agent_blueprint_updated_data_invocable_as.rb new file mode 100644 index 00000000..d40c1717 --- /dev/null +++ b/lib/workos/shared/agent_blueprint_updated_data_invocable_as.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class AgentBlueprintUpdatedDataInvocableAs < WorkOS::Types::BaseModel + HASH_ATTRS = { + instance_types: :instance_types + }.freeze + + attr_accessor :instance_types + + def initialize(json) + hash = self.class.normalize(json) + @instance_types = hash[:instance_types] || [] + end + end +end diff --git a/lib/workos/sso.rb b/lib/workos/sso.rb index a91f2635..4e4b9c5b 100644 --- a/lib/workos/sso.rb +++ b/lib/workos/sso.rb @@ -507,6 +507,7 @@ def get_profile(request_options: {}) # Get a Profile and Token # @param code [String, nil] The authorization code received from the authorization callback. Required when `grant_type` is `authorization_code`. + # @param code_verifier [String, nil] The PKCE code verifier matching the `code_challenge` sent with the authorization request. Required when the authorization request included a `code_challenge`. Must be sent in the request body. # @param subject_token [String, nil] The OIDC ID token to exchange. Required when `grant_type` is `urn:ietf:params:oauth:grant-type:token-exchange`. Must be sent in the request body. # @param subject_token_type [String, nil] The type of the subject token. Required when `grant_type` is `urn:ietf:params:oauth:grant-type:token-exchange`. Must be sent in the request body. # @param organization_id [String, nil] The ID of the organization whose connection the subject token is validated against. Required when `grant_type` is `urn:ietf:params:oauth:grant-type:token-exchange`. Must be sent in the request body. @@ -514,6 +515,7 @@ def get_profile(request_options: {}) # @return [WorkOS::SSOTokenResponse] def get_profile_and_token( code: nil, + code_verifier: nil, subject_token: nil, subject_token_type: nil, organization_id: nil, @@ -524,6 +526,7 @@ def get_profile_and_token( "client_id" => request_options[:client_id] || @client.client_id, "client_secret" => request_options[:api_key] || @client.api_key, "code" => code, + "code_verifier" => code_verifier, "subject_token" => subject_token, "subject_token_type" => subject_token_type, "organization_id" => organization_id diff --git a/lib/workos/sso/token_query.rb b/lib/workos/sso/token_query.rb index e8d6f4e8..27e6e654 100644 --- a/lib/workos/sso/token_query.rb +++ b/lib/workos/sso/token_query.rb @@ -9,6 +9,7 @@ class TokenQuery < WorkOS::Types::BaseModel client_secret: :client_secret, code: :code, grant_type: :grant_type, + code_verifier: :code_verifier, subject_token: :subject_token, subject_token_type: :subject_token_type, organization_id: :organization_id @@ -19,6 +20,7 @@ class TokenQuery < WorkOS::Types::BaseModel :client_secret, :code, :grant_type, + :code_verifier, :subject_token, :subject_token_type, :organization_id @@ -29,6 +31,7 @@ def initialize(json) @client_secret = hash[:client_secret] @code = hash[:code] @grant_type = hash[:grant_type] + @code_verifier = hash[:code_verifier] @subject_token = hash[:subject_token] @subject_token_type = hash[:subject_token_type] @organization_id = hash[:organization_id] diff --git a/lib/workos/types/agent_blueprint_invocable_as_instance_types.rb b/lib/workos/types/agent_blueprint_invocable_as_instance_types.rb new file mode 100644 index 00000000..8e4f1d58 --- /dev/null +++ b/lib/workos/types/agent_blueprint_invocable_as_instance_types.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + module Types + AgentBlueprintInvocableAsInstanceTypes = AgentBlueprintCreatedDataInvocableAsInstanceTypes + end +end diff --git a/lib/workos/types/agent_blueprint_updated_data_invocable_as_instance_types.rb b/lib/workos/types/agent_blueprint_updated_data_invocable_as_instance_types.rb new file mode 100644 index 00000000..ce1a945f --- /dev/null +++ b/lib/workos/types/agent_blueprint_updated_data_invocable_as_instance_types.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + module Types + AgentBlueprintUpdatedDataInvocableAsInstanceTypes = AgentBlueprintCreatedDataInvocableAsInstanceTypes + end +end diff --git a/lib/workos/types/agent_blueprints_update_request_invocable_as_instance_types.rb b/lib/workos/types/agent_blueprints_update_request_invocable_as_instance_types.rb new file mode 100644 index 00000000..8a915a7d --- /dev/null +++ b/lib/workos/types/agent_blueprints_update_request_invocable_as_instance_types.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + module Types + AgentBlueprintsUpdateRequestInvocableAsInstanceTypes = AgentBlueprintCreatedDataInvocableAsInstanceTypes + end +end diff --git a/lib/workos/types/agent_instance_deleted_data_type.rb b/lib/workos/types/agent_instance_deleted_data_type.rb index d98659d5..8bff179c 100644 --- a/lib/workos/types/agent_instance_deleted_data_type.rb +++ b/lib/workos/types/agent_instance_deleted_data_type.rb @@ -4,6 +4,6 @@ module WorkOS module Types - AgentInstanceDeletedDataType = AgentInstanceCreatedDataType + AgentInstanceDeletedDataType = AgentBlueprintCreatedDataInvocableAsInstanceTypes end end diff --git a/lib/workos/types/agent_instance_type.rb b/lib/workos/types/agent_instance_type.rb index eee12139..afde438d 100644 --- a/lib/workos/types/agent_instance_type.rb +++ b/lib/workos/types/agent_instance_type.rb @@ -4,6 +4,6 @@ module WorkOS module Types - AgentInstanceType = AgentInstanceCreatedDataType + AgentInstanceType = AgentBlueprintCreatedDataInvocableAsInstanceTypes end end diff --git a/lib/workos/types/data_integrations_upsert_api_key_request_2_connection_owner.rb b/lib/workos/types/data_integrations_upsert_api_key_request_2_connection_owner.rb new file mode 100644 index 00000000..9ef8774b --- /dev/null +++ b/lib/workos/types/data_integrations_upsert_api_key_request_2_connection_owner.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + module Types + DataIntegrationsUpsertApiKeyRequest2ConnectionOwner = AddDataIntegrationsGetDataIntegrationAuthorizeUrlRequestConnectionOwner + end +end diff --git a/lib/workos/types/data_integrations_upsert_api_key_request_connection_owner.rb b/lib/workos/types/data_integrations_upsert_api_key_request_connection_owner.rb index 3b81eaac..d0ad8f1b 100644 --- a/lib/workos/types/data_integrations_upsert_api_key_request_connection_owner.rb +++ b/lib/workos/types/data_integrations_upsert_api_key_request_connection_owner.rb @@ -4,6 +4,6 @@ module WorkOS module Types - DataIntegrationsUpsertApiKeyRequestConnectionOwner = CreateDataIntegrationOwnership + DataIntegrationsUpsertApiKeyRequestConnectionOwner = AddDataIntegrationsGetDataIntegrationAuthorizeUrlRequestConnectionOwner end end diff --git a/lib/workos/types/reauthorize_data_integrations_upsert_api_key_request_connection_owner.rb b/lib/workos/types/reauthorize_data_integrations_upsert_api_key_request_connection_owner.rb new file mode 100644 index 00000000..3687cb6c --- /dev/null +++ b/lib/workos/types/reauthorize_data_integrations_upsert_api_key_request_connection_owner.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + module Types + ReauthorizeDataIntegrationsUpsertApiKeyRequestConnectionOwner = AddDataIntegrationsGetDataIntegrationAuthorizeUrlRequestConnectionOwner + end +end diff --git a/lib/workos/types/vault_dek_rekeyed_data_actor_source.rb b/lib/workos/types/vault_dek_rekeyed_data_actor_source.rb new file mode 100644 index 00000000..78e226aa --- /dev/null +++ b/lib/workos/types/vault_dek_rekeyed_data_actor_source.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + module Types + VaultDekRekeyedDataActorSource = VaultDataCreatedDataActorSource + end +end diff --git a/lib/workos/vault/vault_dek_rekeyed.rb b/lib/workos/vault/vault_dek_rekeyed.rb new file mode 100644 index 00000000..e5bcebce --- /dev/null +++ b/lib/workos/vault/vault_dek_rekeyed.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class VaultDekRekeyed < WorkOS::Types::BaseModel + HASH_ATTRS = { + object: :object, + id: :id, + event: :event, + data: :data, + created_at: :created_at, + context: :context + }.freeze + + attr_accessor \ + :object, + :id, + :event, + :data, + :created_at, + :context + + def initialize(json) + hash = self.class.normalize(json) + @object = hash[:object] + @id = hash[:id] + @event = hash[:event] + @data = hash[:data] ? WorkOS::VaultDekRekeyedData.new(hash[:data]) : nil + @created_at = hash[:created_at] + @context = hash[:context] ? WorkOS::EventContext.new(hash[:context]) : nil + end + end +end diff --git a/lib/workos/vault/vault_dek_rekeyed_data.rb b/lib/workos/vault/vault_dek_rekeyed_data.rb new file mode 100644 index 00000000..28963a98 --- /dev/null +++ b/lib/workos/vault/vault_dek_rekeyed_data.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class VaultDekRekeyedData < WorkOS::Types::BaseModel + HASH_ATTRS = { + actor_id: :actor_id, + actor_source: :actor_source, + actor_name: :actor_name, + key_ids: :key_ids, + key_context: :key_context + }.freeze + + attr_accessor \ + :actor_id, + :actor_source, + :actor_name, + :key_ids, + :key_context + + def initialize(json) + hash = self.class.normalize(json) + @actor_id = hash[:actor_id] + @actor_source = hash[:actor_source] + @actor_name = hash[:actor_name] + @key_ids = hash[:key_ids] || [] + @key_context = hash[:key_context] || {} + end + end +end diff --git a/rbi/workos/agent_blueprint.rbi b/rbi/workos/agent_blueprint.rbi index 5c0acbc8..46ca6e14 100644 --- a/rbi/workos/agent_blueprint.rbi +++ b/rbi/workos/agent_blueprint.rbi @@ -45,6 +45,12 @@ module WorkOS sig { params(value: WorkOS::AgentBlueprintInvocableBy).returns(WorkOS::AgentBlueprintInvocableBy) } def invocable_by=(value); end + sig { returns(WorkOS::AgentBlueprintInvocableAs) } + def invocable_as; end + + sig { params(value: WorkOS::AgentBlueprintInvocableAs).returns(WorkOS::AgentBlueprintInvocableAs) } + def invocable_as=(value); end + sig { returns(WorkOS::AgentBlueprintSessionSetting) } def session_settings; end diff --git a/rbi/workos/agent_blueprint_invocable_as.rbi b/rbi/workos/agent_blueprint_invocable_as.rbi new file mode 100644 index 00000000..488a2c1f --- /dev/null +++ b/rbi/workos/agent_blueprint_invocable_as.rbi @@ -0,0 +1,24 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class AgentBlueprintInvocableAs + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(T::Array[String]) } + def instance_types; end + + sig { params(value: T::Array[String]).returns(T::Array[String]) } + def instance_types=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/agent_blueprint_updated_data.rbi b/rbi/workos/agent_blueprint_updated_data.rbi index cd76a86a..3c69d4e6 100644 --- a/rbi/workos/agent_blueprint_updated_data.rbi +++ b/rbi/workos/agent_blueprint_updated_data.rbi @@ -45,6 +45,12 @@ module WorkOS sig { params(value: WorkOS::AgentBlueprintUpdatedDataInvocableBy).returns(WorkOS::AgentBlueprintUpdatedDataInvocableBy) } def invocable_by=(value); end + sig { returns(WorkOS::AgentBlueprintUpdatedDataInvocableAs) } + def invocable_as; end + + sig { params(value: WorkOS::AgentBlueprintUpdatedDataInvocableAs).returns(WorkOS::AgentBlueprintUpdatedDataInvocableAs) } + def invocable_as=(value); end + sig { returns(WorkOS::AgentBlueprintUpdatedDataSessionSetting) } def session_settings; end diff --git a/rbi/workos/agent_blueprint_updated_data_invocable_as.rbi b/rbi/workos/agent_blueprint_updated_data_invocable_as.rbi new file mode 100644 index 00000000..62880109 --- /dev/null +++ b/rbi/workos/agent_blueprint_updated_data_invocable_as.rbi @@ -0,0 +1,24 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class AgentBlueprintUpdatedDataInvocableAs + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(T::Array[String]) } + def instance_types; end + + sig { params(value: T::Array[String]).returns(T::Array[String]) } + def instance_types=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/agent_blueprints_update_request.rbi b/rbi/workos/agent_blueprints_update_request.rbi index c6b453b5..b5bd5d9c 100644 --- a/rbi/workos/agent_blueprints_update_request.rbi +++ b/rbi/workos/agent_blueprints_update_request.rbi @@ -33,6 +33,12 @@ module WorkOS sig { params(value: T.nilable(WorkOS::AgentBlueprintsUpdateRequestInvocableBy)).returns(T.nilable(WorkOS::AgentBlueprintsUpdateRequestInvocableBy)) } def invocable_by=(value); end + sig { returns(T.nilable(WorkOS::AgentBlueprintsUpdateRequestInvocableAs)) } + def invocable_as; end + + sig { params(value: T.nilable(WorkOS::AgentBlueprintsUpdateRequestInvocableAs)).returns(T.nilable(WorkOS::AgentBlueprintsUpdateRequestInvocableAs)) } + def invocable_as=(value); end + sig { returns(T.nilable(WorkOS::AgentBlueprintsUpdateRequestSessionSetting)) } def session_settings; end diff --git a/rbi/workos/agent_blueprints_update_request_invocable_as.rbi b/rbi/workos/agent_blueprints_update_request_invocable_as.rbi new file mode 100644 index 00000000..66a57a3c --- /dev/null +++ b/rbi/workos/agent_blueprints_update_request_invocable_as.rbi @@ -0,0 +1,24 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class AgentBlueprintsUpdateRequestInvocableAs + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(T.nilable(T::Array[String])) } + def instance_types; end + + sig { params(value: T.nilable(T::Array[String])).returns(T.nilable(T::Array[String])) } + def instance_types=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/agents.rbi b/rbi/workos/agents.rbi index 93c1da80..32286d7d 100644 --- a/rbi/workos/agents.rbi +++ b/rbi/workos/agents.rbi @@ -26,11 +26,12 @@ module WorkOS description: T.nilable(String), permissions: T.nilable(T::Array[String]), invocable_by: T.nilable(WorkOS::AgentBlueprintsCreateRequestInvocableBy), + invocable_as: T.nilable(WorkOS::AgentBlueprintsCreateRequestInvocableAs), session_settings: T.nilable(WorkOS::AgentBlueprintsCreateRequestSessionSetting), request_options: T::Hash[Symbol, T.untyped] ).returns(WorkOS::AgentBlueprint) end - def create_blueprint(name:, description:, permissions:, invocable_by:, session_settings:, request_options:); end + def create_blueprint(name:, description:, permissions:, invocable_by:, invocable_as:, session_settings:, request_options:); end sig do params( @@ -47,11 +48,12 @@ module WorkOS description: T.nilable(String), permissions: T.nilable(T::Array[String]), invocable_by: T.nilable(WorkOS::AgentBlueprintsUpdateRequestInvocableBy), + invocable_as: T.nilable(WorkOS::AgentBlueprintsUpdateRequestInvocableAs), session_settings: T.nilable(WorkOS::AgentBlueprintsUpdateRequestSessionSetting), request_options: T::Hash[Symbol, T.untyped] ).returns(WorkOS::AgentBlueprint) end - def update_blueprint(agent_blueprint_id:, name:, description:, permissions:, invocable_by:, session_settings:, request_options:); end + def update_blueprint(agent_blueprint_id:, name:, description:, permissions:, invocable_by:, invocable_as:, session_settings:, request_options:); end sig do params( diff --git a/rbi/workos/data_integrations_upsert_api_key_request.rbi b/rbi/workos/data_integrations_upsert_api_key_request.rbi index b1d54836..b7ab590a 100644 --- a/rbi/workos/data_integrations_upsert_api_key_request.rbi +++ b/rbi/workos/data_integrations_upsert_api_key_request.rbi @@ -9,6 +9,18 @@ module WorkOS sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } def initialize(json); end + sig { returns(T.nilable(String)) } + def account_display_name; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def account_display_name=(value); end + + sig { returns(T.nilable(String)) } + def account_identifier; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def account_identifier=(value); end + sig { returns(String) } def user_id; end @@ -21,12 +33,6 @@ module WorkOS sig { params(value: T.nilable(String)).returns(T.nilable(String)) } def organization_id=(value); end - sig { returns(T.nilable(String)) } - def connected_account_id; end - - sig { params(value: T.nilable(String)).returns(T.nilable(String)) } - def connected_account_id=(value); end - sig { returns(T.nilable(String)) } def connection_owner; end diff --git a/rbi/workos/data_integrations_upsert_api_key_request_2.rbi b/rbi/workos/data_integrations_upsert_api_key_request_2.rbi new file mode 100644 index 00000000..5db9dbc1 --- /dev/null +++ b/rbi/workos/data_integrations_upsert_api_key_request_2.rbi @@ -0,0 +1,60 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class DataIntegrationsUpsertApiKeyRequest2 + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(T.nilable(String)) } + def account_display_name; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def account_display_name=(value); end + + sig { returns(T.nilable(String)) } + def account_identifier; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def account_identifier=(value); end + + sig { returns(String) } + def user_id; end + + sig { params(value: String).returns(String) } + def user_id=(value); end + + sig { returns(T.nilable(String)) } + def organization_id; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def organization_id=(value); end + + sig { returns(T.nilable(String)) } + def connection_owner; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def connection_owner=(value); end + + sig { returns(String) } + def secret; end + + sig { params(value: String).returns(String) } + def secret=(value); end + + sig { returns(String) } + def connected_account_id; end + + sig { params(value: String).returns(String) } + def connected_account_id=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/directory_sync.rbi b/rbi/workos/directory_sync.rbi index 376dffd2..d84d8781 100644 --- a/rbi/workos/directory_sync.rbi +++ b/rbi/workos/directory_sync.rbi @@ -39,6 +39,14 @@ module WorkOS end def delete_directory(id:, request_options:); end + sig do + params( + id: String, + request_options: T::Hash[Symbol, T.untyped] + ).returns(WorkOS::DirectorySyncResponse) + end + def create_directory_sync(id:, request_options:); end + sig do params( before: T.nilable(String), diff --git a/rbi/workos/directory_sync_rate_limit_error.rbi b/rbi/workos/directory_sync_rate_limit_error.rbi new file mode 100644 index 00000000..31dfbc29 --- /dev/null +++ b/rbi/workos/directory_sync_rate_limit_error.rbi @@ -0,0 +1,36 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class DirectorySyncRateLimitError + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(String) } + def code; end + + sig { params(value: String).returns(String) } + def code=(value); end + + sig { returns(String) } + def message; end + + sig { params(value: String).returns(String) } + def message=(value); end + + sig { returns(Integer) } + def retry_after_seconds; end + + sig { params(value: Integer).returns(Integer) } + def retry_after_seconds=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/directory_sync_response.rbi b/rbi/workos/directory_sync_response.rbi new file mode 100644 index 00000000..b08085af --- /dev/null +++ b/rbi/workos/directory_sync_response.rbi @@ -0,0 +1,24 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class DirectorySyncResponse + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(String) } + def status; end + + sig { params(value: String).returns(String) } + def status=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/reauthorize_data_integrations_upsert_api_key_request.rbi b/rbi/workos/reauthorize_data_integrations_upsert_api_key_request.rbi new file mode 100644 index 00000000..1f9b10cd --- /dev/null +++ b/rbi/workos/reauthorize_data_integrations_upsert_api_key_request.rbi @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class ReauthorizeDataIntegrationsUpsertApiKeyRequest + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(T.nilable(String)) } + def account_display_name; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def account_display_name=(value); end + + sig { returns(T.nilable(String)) } + def account_identifier; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def account_identifier=(value); end + + sig { returns(String) } + def user_id; end + + sig { params(value: String).returns(String) } + def user_id=(value); end + + sig { returns(T.nilable(String)) } + def organization_id; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def organization_id=(value); end + + sig { returns(T.nilable(String)) } + def connection_owner; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def connection_owner=(value); end + + sig { returns(String) } + def secret; end + + sig { params(value: String).returns(String) } + def secret=(value); end + + sig { returns(String) } + def connection_intent; end + + sig { params(value: String).returns(String) } + def connection_intent=(value); end + + sig { returns(String) } + def connected_account_id; end + + sig { params(value: String).returns(String) } + def connected_account_id=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/sso.rbi b/rbi/workos/sso.rbi index 67ae7de0..ac4d815f 100644 --- a/rbi/workos/sso.rbi +++ b/rbi/workos/sso.rbi @@ -234,13 +234,14 @@ module WorkOS sig do params( code: T.nilable(String), + code_verifier: T.nilable(String), subject_token: T.nilable(String), subject_token_type: T.nilable(String), organization_id: T.nilable(String), request_options: T::Hash[Symbol, T.untyped] ).returns(WorkOS::SSOTokenResponse) end - def get_profile_and_token(code:, subject_token:, subject_token_type:, organization_id:, request_options:); end + def get_profile_and_token(code:, code_verifier:, subject_token:, subject_token_type:, organization_id:, request_options:); end end end diff --git a/rbi/workos/token_query.rbi b/rbi/workos/token_query.rbi index 0cfc54d0..9ce7d184 100644 --- a/rbi/workos/token_query.rbi +++ b/rbi/workos/token_query.rbi @@ -33,6 +33,12 @@ module WorkOS sig { params(value: String).returns(String) } def grant_type=(value); end + sig { returns(T.nilable(String)) } + def code_verifier; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def code_verifier=(value); end + sig { returns(T.nilable(String)) } def subject_token; end diff --git a/rbi/workos/vault_dek_rekeyed.rbi b/rbi/workos/vault_dek_rekeyed.rbi new file mode 100644 index 00000000..f6256423 --- /dev/null +++ b/rbi/workos/vault_dek_rekeyed.rbi @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class VaultDekRekeyed + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(String) } + def object; end + + sig { params(value: String).returns(String) } + def object=(value); end + + sig { returns(String) } + def id; end + + sig { params(value: String).returns(String) } + def id=(value); end + + sig { returns(String) } + def event; end + + sig { params(value: String).returns(String) } + def event=(value); end + + sig { returns(WorkOS::VaultDekRekeyedData) } + def data; end + + sig { params(value: WorkOS::VaultDekRekeyedData).returns(WorkOS::VaultDekRekeyedData) } + def data=(value); end + + sig { returns(String) } + def created_at; end + + sig { params(value: String).returns(String) } + def created_at=(value); end + + sig { returns(T.nilable(WorkOS::EventContext)) } + def context; end + + sig { params(value: T.nilable(WorkOS::EventContext)).returns(T.nilable(WorkOS::EventContext)) } + def context=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/data_integration_credentials_response_credential.rbi b/rbi/workos/vault_dek_rekeyed_data.rbi similarity index 55% rename from rbi/workos/data_integration_credentials_response_credential.rbi rename to rbi/workos/vault_dek_rekeyed_data.rbi index 56dfb46b..14192628 100644 --- a/rbi/workos/data_integration_credentials_response_credential.rbi +++ b/rbi/workos/vault_dek_rekeyed_data.rbi @@ -5,45 +5,39 @@ # typed: strong module WorkOS - class DataIntegrationCredentialsResponseCredential + class VaultDekRekeyedData sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } def initialize(json); end sig { returns(String) } - def object; end + def actor_id; end sig { params(value: String).returns(String) } - def object=(value); end + def actor_id=(value); end sig { returns(String) } - def auth_method; end + def actor_source; end sig { params(value: String).returns(String) } - def auth_method=(value); end + def actor_source=(value); end sig { returns(String) } - def value; end + def actor_name; end sig { params(value: String).returns(String) } - def value=(value); end - - sig { returns(T.nilable(String)) } - def expires_at; end - - sig { params(value: T.nilable(String)).returns(T.nilable(String)) } - def expires_at=(value); end + def actor_name=(value); end sig { returns(T::Array[String]) } - def scopes; end + def key_ids; end sig { params(value: T::Array[String]).returns(T::Array[String]) } - def scopes=(value); end + def key_ids=(value); end - sig { returns(T::Array[String]) } - def missing_scopes; end + sig { returns(T::Hash[String, String]) } + def key_context; end - sig { params(value: T::Array[String]).returns(T::Array[String]) } - def missing_scopes=(value); end + sig { params(value: T::Hash[String, String]).returns(T::Hash[String, String]) } + def key_context=(value); end sig { returns(T::Hash[Symbol, T.untyped]) } def to_h; end diff --git a/test/workos/test_agents_model_round_trip.rb b/test/workos/test_agents_model_round_trip.rb index 1ce433ae..f6e7498a 100644 --- a/test/workos/test_agents_model_round_trip.rb +++ b/test/workos/test_agents_model_round_trip.rb @@ -64,6 +64,7 @@ def test_agent_blueprint_round_trip "description" => nil, "permissions" => [], "invocable_by" => {}, + "invocable_as" => {}, "session_settings" => {}, "created_at" => "stub", "updated_at" => "stub" @@ -182,6 +183,16 @@ def test_agent_blueprint_invocable_by_round_trip fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } end + def test_agent_blueprint_invocable_as_round_trip + fixture = { + "instance_types" => [] + } + model = WorkOS::AgentBlueprintInvocableAs.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + def test_agent_blueprint_session_setting_round_trip fixture = { "max_age_seconds" => 1, @@ -251,6 +262,7 @@ def test_agent_blueprints_create_request_round_trip "description" => "stub", "permissions" => [], "invocable_by" => {}, + "invocable_as" => {}, "session_settings" => {} } model = WorkOS::AgentBlueprintsCreateRequest.new(fixture.to_json) @@ -271,6 +283,16 @@ def test_agent_blueprints_create_request_invocable_by_round_trip fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } end + def test_agent_blueprints_create_request_invocable_as_round_trip + fixture = { + "instance_types" => [] + } + model = WorkOS::AgentBlueprintsCreateRequestInvocableAs.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + def test_agent_blueprints_create_request_session_setting_round_trip fixture = { "max_age_seconds" => 1, @@ -292,6 +314,7 @@ def test_agent_blueprints_update_request_round_trip "description" => nil, "permissions" => [], "invocable_by" => {}, + "invocable_as" => {}, "session_settings" => {} } model = WorkOS::AgentBlueprintsUpdateRequest.new(fixture.to_json) @@ -311,6 +334,16 @@ def test_agent_blueprints_update_request_invocable_by_round_trip fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } end + def test_agent_blueprints_update_request_invocable_as_round_trip + fixture = { + "instance_types" => [] + } + model = WorkOS::AgentBlueprintsUpdateRequestInvocableAs.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + def test_agent_blueprints_update_request_session_setting_round_trip fixture = { "max_age_seconds" => 1, diff --git a/test/workos/test_directory_sync.rb b/test/workos/test_directory_sync.rb index 574ec0ee..64b3509b 100644 --- a/test/workos/test_directory_sync.rb +++ b/test/workos/test_directory_sync.rb @@ -32,6 +32,13 @@ def test_delete_directory_returns_expected_result assert_nil result end + def test_create_directory_sync_returns_expected_result + stub_request(:post, %r{\Ahttps://api\.workos\.com/directories/stub/sync(\?|\z)}) + .to_return(body: "{}", status: 200) + result = @client.directory_sync.create_directory_sync(id: "stub") + refute_nil result + end + def test_list_groups_returns_expected_result stub_request(:get, %r{\Ahttps://api\.workos\.com/directory_groups(\?|\z)}) .to_return(body: '{"data": [], "list_metadata": {}}', status: 200) @@ -65,6 +72,7 @@ def test_get_user_returns_expected_result {name: :list_directories, verb: :get, url: %r{\Ahttps://api\.workos\.com/directories(\?|\z)}}, {name: :get_directory, verb: :get, url: %r{\Ahttps://api\.workos\.com/directories/stub(\?|\z)}, args: {id: "stub"}}, {name: :delete_directory, verb: :delete, url: %r{\Ahttps://api\.workos\.com/directories/stub(\?|\z)}, args: {id: "stub"}}, + {name: :create_directory_sync, verb: :post, url: %r{\Ahttps://api\.workos\.com/directories/stub/sync(\?|\z)}, args: {id: "stub"}}, {name: :list_groups, verb: :get, url: %r{\Ahttps://api\.workos\.com/directory_groups(\?|\z)}}, {name: :get_group, verb: :get, url: %r{\Ahttps://api\.workos\.com/directory_groups/stub(\?|\z)}, args: {id: "stub"}}, {name: :list_users, verb: :get, url: %r{\Ahttps://api\.workos\.com/directory_users(\?|\z)}}, diff --git a/test/workos/test_directory_sync_model_round_trip.rb b/test/workos/test_directory_sync_model_round_trip.rb index 2f2daea8..d9802f58 100644 --- a/test/workos/test_directory_sync_model_round_trip.rb +++ b/test/workos/test_directory_sync_model_round_trip.rb @@ -31,6 +31,30 @@ def test_directory_round_trip fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } end + def test_directory_sync_response_round_trip + fixture = { + "status" => "queued" + } + model = WorkOS::DirectorySyncResponse.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + + def test_directory_sync_rate_limit_error_round_trip + fixture = { + "code" => "directory_sync_rate_limited", + "message" => "stub", + "retry_after_seconds" => 1 + } + model = WorkOS::DirectorySyncRateLimitError.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + assert_equal fixture["message"], json[:message] + assert_equal fixture["retry_after_seconds"], json[:retry_after_seconds] + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + def test_directory_group_round_trip fixture = { "object" => "directory_group", diff --git a/test/workos/test_shared_model_round_trip.rb b/test/workos/test_shared_model_round_trip.rb index ad62fabd..55f57cc5 100644 --- a/test/workos/test_shared_model_round_trip.rb +++ b/test/workos/test_shared_model_round_trip.rb @@ -163,6 +163,8 @@ def test_pipe_connected_account_round_trip "auth_method" => "stub", "api_key_last_4" => nil, "state" => "stub", + "established_by_user_id" => nil, + "state_reason" => nil, "created_at" => "stub", "updated_at" => "stub" } @@ -245,6 +247,7 @@ def test_agent_blueprint_created_data_round_trip "description" => nil, "permissions" => [], "invocable_by" => {}, + "invocable_as" => {}, "session_settings" => {}, "created_at" => "stub", "updated_at" => "stub" @@ -271,6 +274,16 @@ def test_agent_blueprint_created_data_invocable_by_round_trip fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } end + def test_agent_blueprint_created_data_invocable_as_round_trip + fixture = { + "instance_types" => [] + } + model = WorkOS::AgentBlueprintCreatedDataInvocableAs.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + def test_agent_blueprint_created_data_session_setting_round_trip fixture = { "max_age_seconds" => 1.0, @@ -346,6 +359,7 @@ def test_agent_blueprint_updated_data_round_trip "description" => nil, "permissions" => [], "invocable_by" => {}, + "invocable_as" => {}, "session_settings" => {}, "created_at" => "stub", "updated_at" => "stub" @@ -372,6 +386,16 @@ def test_agent_blueprint_updated_data_invocable_by_round_trip fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } end + def test_agent_blueprint_updated_data_invocable_as_round_trip + fixture = { + "instance_types" => [] + } + model = WorkOS::AgentBlueprintUpdatedDataInvocableAs.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + def test_agent_blueprint_updated_data_session_setting_round_trip fixture = { "max_age_seconds" => 1.0, @@ -1451,24 +1475,24 @@ def test_waitlist_user_denied_round_trip fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } end - def test_account_selection_required_error_round_trip + def test_auth_method_mismatch_error_round_trip fixture = { - "code" => "account_selection_required", + "code" => "auth_method_mismatch", "message" => "stub" } - model = WorkOS::AccountSelectionRequiredError.new(fixture.to_json) + model = WorkOS::AuthMethodMismatchError.new(fixture.to_json) json = model.to_h assert_kind_of Hash, json assert_equal fixture["message"], json[:message] fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } end - def test_auth_method_mismatch_error_round_trip + def test_account_selection_required_error_round_trip fixture = { - "code" => "auth_method_mismatch", + "code" => "account_selection_required", "message" => "stub" } - model = WorkOS::AuthMethodMismatchError.new(fixture.to_json) + model = WorkOS::AccountSelectionRequiredError.new(fixture.to_json) json = model.to_h assert_kind_of Hash, json assert_equal fixture["message"], json[:message] diff --git a/test/workos/test_sso_model_round_trip.rb b/test/workos/test_sso_model_round_trip.rb index 9a36b742..2cd8c4e6 100644 --- a/test/workos/test_sso_model_round_trip.rb +++ b/test/workos/test_sso_model_round_trip.rb @@ -187,6 +187,7 @@ def test_token_query_round_trip "client_secret" => "stub", "code" => "stub", "grant_type" => "stub", + "code_verifier" => "stub", "subject_token" => "stub", "subject_token_type" => "urn:ietf:params:oauth:token-type:id_token", "organization_id" => "stub" diff --git a/test/workos/test_vault_model_round_trip.rb b/test/workos/test_vault_model_round_trip.rb index 401af1a3..f9015e88 100644 --- a/test/workos/test_vault_model_round_trip.rb +++ b/test/workos/test_vault_model_round_trip.rb @@ -435,6 +435,39 @@ def test_vault_dek_read_data_round_trip fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } end + def test_vault_dek_rekeyed_round_trip + fixture = { + "object" => "event", + "id" => "stub", + "event" => "vault.dek.rekeyed", + "data" => {}, + "created_at" => "stub", + "context" => {} + } + model = WorkOS::VaultDekRekeyed.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + assert_equal fixture["id"], json[:id] + assert_equal fixture["created_at"], json[:created_at] + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + + def test_vault_dek_rekeyed_data_round_trip + fixture = { + "actor_id" => "stub", + "actor_source" => "stub", + "actor_name" => "stub", + "key_ids" => [], + "key_context" => {} + } + model = WorkOS::VaultDekRekeyedData.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + assert_equal fixture["actor_id"], json[:actor_id] + assert_equal fixture["actor_name"], json[:actor_name] + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + def test_vault_kek_created_round_trip fixture = { "object" => "event", From 8ac6dff3be9c2c94cb7ce2b83b35c8ac450a82cb Mon Sep 17 00:00:00 2001 From: "workos-sdk-automation[bot]" <255426317+workos-sdk-automation[bot]@users.noreply.github.com> Date: Wed, 14 Oct 2026 21:32:16 +0000 Subject: [PATCH 7/7] chore(generated): add release notes fragment --- ...47ddc7441c12b312c7308b3d470da87d04bf729.md | 186 ++++++++++++++++++ 1 file changed, 186 insertions(+) create mode 100644 .changelog-pending/2026-10-14T21-32-16-247ddc7441c12b312c7308b3d470da87d04bf729.md diff --git a/.changelog-pending/2026-10-14T21-32-16-247ddc7441c12b312c7308b3d470da87d04bf729.md b/.changelog-pending/2026-10-14T21-32-16-247ddc7441c12b312c7308b3d470da87d04bf729.md new file mode 100644 index 00000000..301ec9d6 --- /dev/null +++ b/.changelog-pending/2026-10-14T21-32-16-247ddc7441c12b312c7308b3d470da87d04bf729.md @@ -0,0 +1,186 @@ +* [#562](https://github.com/workos/workos-ruby/pull/562) feat(generated)!: regenerate from spec (9 changes) + + **⚠️ Breaking** + * **[pipes](https://workos.com/docs/reference/pipes)**: + * Removed model `AddDataIntegrationsUpsertApiKeyRequest` + * Removed model `AddDataIntegrationsUpsertClientCredentialsRequest` + * Removed enum `AddDataIntegrationsUpsertApiKeyRequestConnectionOwner` + * Removed enum `AddDataIntegrationsUpsertClientCredentialsRequestConnectionOwner` + + **Features** + * **[admin_portal](https://workos.com/docs/reference/admin-portal)**: + * Added model `RevokeLink` + * Added `external_user_id` to `GenerateLink` + * Added endpoint `POST /portal/revoke_link` + * Changed errors for endpoint `POST /portal/generate_link` + * **[agents](https://workos.com/docs/reference/agents)**: + * Added model `AgentBlueprintInvocableAs` + * Added model `AgentBlueprintsCreateRequestInvocableAs` + * Added model `AgentBlueprintsUpdateRequestInvocableAs` + * Added `invocable_as` to `AgentBlueprint` + * Added `invocable_as` to `AgentBlueprintsCreateRequest` + * Added `invocable_as` to `AgentBlueprintsUpdateRequest` + * Added enum `AgentBlueprintInvocableAsInstanceTypes` + * Added enum `AgentBlueprintsCreateRequestInvocableAsInstanceTypes` + * Added enum `AgentBlueprintsUpdateRequestInvocableAsInstanceTypes` + * **[audit_logs](https://workos.com/docs/reference/audit-logs)**: + * Changed errors for endpoint `GET /audit_logs/actions` + * Changed errors for endpoint `GET /audit_logs/actions/{actionName}/schemas` + * Changed errors for endpoint `POST /audit_logs/actions/{actionName}/schemas` + * Changed errors for endpoint `POST /audit_logs/events` + * Changed errors for endpoint `POST /audit_logs/exports` + * Changed errors for endpoint `GET /audit_logs/exports/{auditLogExportId}` + * **[authorization](https://workos.com/docs/reference/fga)**: + * Changed errors for endpoint `GET /authorization/organization_memberships/{organization_membership_id}/role_assignments` + * Changed errors for endpoint `POST /authorization/groups/{group_id}/role_assignments` + * Changed errors for endpoint `PUT /authorization/groups/{group_id}/role_assignments` + * Changed errors for endpoint `GET /authorization/groups/{group_id}/role_assignments/{role_assignment_id}` + * Changed errors for endpoint `POST /authorization/organization_memberships/{organization_membership_id}/check` + * Changed errors for endpoint `GET /authorization/organization_memberships/{organization_membership_id}/resources` + * Changed errors for endpoint `GET /authorization/organization_memberships/{organization_membership_id}/resources/{resource_id}/permissions` + * Changed errors for endpoint `GET /authorization/organization_memberships/{organization_membership_id}/resources/{resource_type_slug}/{external_id}/permissions` + * Changed errors for endpoint `POST /authorization/organization_memberships/{organization_membership_id}/role_assignments` + * Changed errors for endpoint `GET /authorization/organizations/{organization_id}/resources/{resource_type_slug}/{external_id}` + * Changed errors for endpoint `PATCH /authorization/organizations/{organization_id}/resources/{resource_type_slug}/{external_id}` + * Changed errors for endpoint `GET /authorization/organizations/{organization_id}/resources/{resource_type_slug}/{external_id}/organization_memberships` + * Changed errors for endpoint `GET /authorization/organizations/{organization_id}/resources/{resource_type_slug}/{external_id}/role_assignments` + * Changed errors for endpoint `GET /authorization/resources` + * Changed errors for endpoint `POST /authorization/resources` + * Changed errors for endpoint `GET /authorization/resources/{resource_id}` + * Changed errors for endpoint `PATCH /authorization/resources/{resource_id}` + * Changed errors for endpoint `GET /authorization/resources/{resource_id}/organization_memberships` + * Changed errors for endpoint `GET /authorization/resources/{resource_id}/role_assignments` + * **[directory_sync](https://workos.com/docs/reference/directory-sync)**: + * Added model `DirectorySyncResponse` + * Added model `DirectorySyncRateLimitError` + * Added endpoint `POST /directories/{id}/sync` + * **[feature_flags](https://workos.com/docs/reference/feature-flags)**: + * Changed errors for endpoint `PUT /feature-flags/{slug}/disable` + * Changed errors for endpoint `PUT /feature-flags/{slug}/enable` + * **[organization_membership](https://workos.com/docs/reference/authkit/organization-membership)**: + * Changed errors for endpoint `DELETE /user_management/organization_memberships/{id}` + * **[organizations](https://workos.com/docs/reference/organization)**: + * Changed errors for endpoint `GET /organizations/{id}/audit_logs_retention` + * Changed errors for endpoint `PUT /organizations/{id}/audit_logs_retention` + * Changed errors for endpoint `POST /organizations/{organization_id}/it_contacts/{contact_id}/invite` + * **[pipes](https://workos.com/docs/reference/pipes)**: + * Added `established_by_user_id` to `ConnectedAccountWriteResponse` + * Added `state_reason` to `ConnectedAccountWriteResponse` + * Added `established_by_user_id` to `ConnectedAccount` + * Added `state_reason` to `ConnectedAccount` + * Added `established_by_user_id` to `DataIntegrationsListResponseDataConnectedAccount` + * Added `state_reason` to `DataIntegrationsListResponseDataConnectedAccount` + * Changed idempotency-key contract for endpoint `POST /data-integrations/{slug}/api-key` + * Changed idempotency-key contract for endpoint `POST /data-integrations/{slug}/client-credentials` + * Changed idempotency-key contract for endpoint `POST /organizations/{organization_id}/connected_accounts/{slug}` + * Changed idempotency-key contract for endpoint `POST /user_management/users/{user_id}/connected_accounts/{slug}` + * Added model `ConnectedAccountWriteResponse` + * Added model `ConnectedAccountWriteResponseWarning` + * Added `account_display_name` to `CreateOrganizationConnectedAccount` + * Added `account_identifier` to `CreateOrganizationConnectedAccount` + * Added `account_display_name` to `OrganizationConnectedAccount` + * Added `account_identifier` to `OrganizationConnectedAccount` + * Added `account_display_name` to `CreateConnectedAccount` + * Added `account_identifier` to `CreateConnectedAccount` + * Added `account_display_name` to `ConnectedAccountInput` + * Added `account_identifier` to `ConnectedAccountInput` + * Added `account_display_name` to `DataIntegrationsCreateApiKeyConnectionRequest` + * Added `account_identifier` to `DataIntegrationsCreateApiKeyConnectionRequest` + * Added `account_display_name` to `DataIntegrationsUpsertApiKeyRequest` + * Added `account_identifier` to `DataIntegrationsUpsertApiKeyRequest` + * Added `account_display_name` to `ReauthorizeDataIntegrationsUpsertApiKeyRequest` + * Added `account_identifier` to `ReauthorizeDataIntegrationsUpsertApiKeyRequest` + * Added `account_display_name` to `DataIntegrationsUpsertApiKeyRequest2` + * Added `account_identifier` to `DataIntegrationsUpsertApiKeyRequest2` + * Added `account_display_name` to `DataIntegrationsGetDataIntegrationAuthorizeUrlRequest` + * Added `account_display_name` to `AddDataIntegrationsGetDataIntegrationAuthorizeUrlRequest` + * Added `account_display_name` to `ReauthorizeDataIntegrationsGetDataIntegrationAuthorizeUrlRequest` + * Added `account_display_name` to `DataIntegrationsCreateClientCredentialsConnectionRequest` + * Added `account_identifier` to `DataIntegrationsCreateClientCredentialsConnectionRequest` + * Added `account_display_name` to `DataIntegrationsUpsertClientCredentialsRequest` + * Added `account_identifier` to `DataIntegrationsUpsertClientCredentialsRequest` + * Added `account_display_name` to `ReauthorizeDataIntegrationsUpsertClientCredentialsRequest` + * Added `account_identifier` to `ReauthorizeDataIntegrationsUpsertClientCredentialsRequest` + * Added `account_display_name` to `DataIntegrationsUpsertClientCredentialsRequest2` + * Added `account_identifier` to `DataIntegrationsUpsertClientCredentialsRequest2` + * Added enum `ConnectedAccountWriteResponseConnectionRole` + * Added enum `ConnectedAccountWriteResponseAuthMethod` + * Added enum `ConnectedAccountWriteResponseState` + * Changed errors for endpoint `POST /data-integrations/{slug}/api-key` + * Changed errors for endpoint `POST /data-integrations/{slug}/authorize` + * Changed errors for endpoint `POST /data-integrations/{slug}/client-credentials` + * Added model `AddDataIntegrationsGetDataIntegrationAuthorizeUrlRequest` + * Added model `ReauthorizeDataIntegrationsGetDataIntegrationAuthorizeUrlRequest` + * Added enum `AddDataIntegrationsGetDataIntegrationAuthorizeUrlRequestConnectionOwner` + * Added enum `ReauthorizeDataIntegrationsGetDataIntegrationAuthorizeUrlRequestConnectionOwner` + * Added model `DataIntegrationsCreateApiKeyConnectionRequest` + * Added model `DataIntegrationsCreateClientCredentialsConnectionRequest` + * Added enum `DataIntegrationsCreateApiKeyConnectionRequestConnectionOwner` + * Added enum `DataIntegrationsCreateClientCredentialsConnectionRequestConnectionOwner` + * Added endpoint `POST /data-integrations/{slug}/api-key` + * Added endpoint `POST /data-integrations/{slug}/client-credentials` + * Added `config` to `DataIntegrationVendedCredential` + * Added model `DataIntegrationVendedCredential` + * Added model `CreateOrganizationConnectedAccount` + * Added model `CreateConnectedAccount` + * Added model `AddDataIntegrationsUpsertApiKeyRequest` + * Added model `ReauthorizeDataIntegrationsUpsertApiKeyRequest` + * Added model `DataIntegrationsUpsertApiKeyRequest2` + * Added model `AddDataIntegrationsUpsertClientCredentialsRequest` + * Added model `ReauthorizeDataIntegrationsUpsertClientCredentialsRequest` + * Added model `DataIntegrationsUpsertClientCredentialsRequest2` + * Added enum `CreateOrganizationConnectedAccountState` + * Added enum `CreateConnectedAccountState` + * Added enum `AddDataIntegrationsUpsertApiKeyRequestConnectionOwner` + * Added enum `ReauthorizeDataIntegrationsUpsertApiKeyRequestConnectionOwner` + * Added enum `DataIntegrationsUpsertApiKeyRequest2ConnectionOwner` + * Added enum `AddDataIntegrationsUpsertClientCredentialsRequestConnectionOwner` + * Added enum `ReauthorizeDataIntegrationsUpsertClientCredentialsRequestConnectionOwner` + * Added enum `DataIntegrationsUpsertClientCredentialsRequest2ConnectionOwner` + * Added parameter `OrganizationsDataProviders.updateOrganizationDataInstallation.connection_intent` + * Added parameter `UserManagementDataProviders.updateUserDataInstallation.connection_intent` + * Added model `OrganizationConnectedAccount` + * Added enum `OrganizationConnectedAccountState` + * **[radar](https://workos.com/docs/reference/radar)**: + * Changed errors for endpoint `POST /radar/attempts` + * Changed errors for endpoint `PUT /radar/attempts/{id}` + * Changed errors for endpoint `POST /radar/lists/{type}/{action}` + * **[sso](https://workos.com/docs/reference/sso)**: + * Added `code_verifier` to `TokenQuery` + * **[user_management](https://workos.com/docs/reference/authkit/user)**: + * Changed errors for endpoint `POST /user_management/invitations` + * Changed errors for endpoint `POST /user_management/invitations/{id}/resend` + * Changed errors for endpoint `POST /user_management/waitlist_entries/{id}/approve` + * Changed errors for endpoint `PUT /user_management/users/{id}` + + **Fixes** + * **[agents](https://workos.com/docs/reference/agents)**: + * Changed errors for endpoint `POST /agents/blueprints/{agent_blueprint_id}/tokens` + * **[pipes](https://workos.com/docs/reference/pipes)**: + * Changed response of `Pipes.createApiKeyConnection` from `ConnectedAccount` to `ConnectedAccountWriteResponse` + * Changed response of `Pipes.upsertApiKey` from `ConnectedAccount` to `ConnectedAccountWriteResponse` + * Changed response of `Pipes.createClientCredentialsConnection` from `ConnectedAccount` to `ConnectedAccountWriteResponse` + * Changed response of `Pipes.upsertClientCredentials` from `ConnectedAccount` to `ConnectedAccountWriteResponse` + * Changed response of `OrganizationsDataProviders.createOrganizationDataInstallation` from `ConnectedAccount` to `ConnectedAccountWriteResponse` + * Changed response of `OrganizationsDataProviders.updateOrganizationDataInstallation` from `ConnectedAccount` to `ConnectedAccountWriteResponse` + * Changed response of `UserManagementDataProviders.createUserDataInstallation` from `ConnectedAccount` to `ConnectedAccountWriteResponse` + * Changed response of `UserManagementDataProviders.updateUserDataInstallation` from `ConnectedAccount` to `ConnectedAccountWriteResponse` + * Changed errors for endpoint `POST /organizations/{organization_id}/connected_accounts/{slug}` + * Changed errors for endpoint `POST /user_management/users/{user_id}/connected_accounts/{slug}` + * Changed errors for endpoint `PUT /data-integrations/{slug}/api-key` + * Changed request body for `Pipes.getDataIntegrationAuthorizeUrl` + * Changed errors for endpoint `POST /data-integrations/{slug}/authorize` + * Changed errors for endpoint `PUT /data-integrations/{slug}/client-credentials` + * Changed request body for `Pipes.upsertApiKey` + * Changed request body for `Pipes.upsertClientCredentials` + * Changed the type of `DataIntegrationCredentialsResponse.credential` + * Removed `connected_account_id` from `DataIntegrationsUpsertApiKeyRequest` + * Removed `connected_account_id` from `DataIntegrationsUpsertClientCredentialsRequest` + * Changed request body of `OrganizationsDataProviders.createOrganizationDataInstallation` from `OrganizationConnectedAccount` to `CreateOrganizationConnectedAccount` + * Changed request body of `UserManagementDataProviders.createUserDataInstallation` from `ConnectedAccountInput` to `CreateConnectedAccount` + * Changed request body of `OrganizationsDataProviders.createOrganizationDataInstallation` from `ConnectedAccountInput` to `OrganizationConnectedAccount` + * Changed request body of `OrganizationsDataProviders.updateOrganizationDataInstallation` from `ConnectedAccountInput` to `OrganizationConnectedAccount` + * Changed errors for endpoint `PUT /organizations/{organization_id}/connected_accounts/{slug}` + * **[sso](https://workos.com/docs/reference/sso)**: + * Changed errors for endpoint `POST /connections` + * Changed errors for endpoint `POST /connections/{connectionId}/saml_sp_signing_cert`