workos 10.3.0 → 10.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +2 -2
- data/.github/workflows/docs.yml +4 -4
- data/.github/workflows/lint.yml +2 -2
- data/.github/workflows/release-please.yml +3 -3
- data/.github/workflows/release.yml +2 -2
- data/.last-synced-sha +1 -1
- data/.oagen-manifest.json +326 -158
- data/.release-please-manifest.json +1 -1
- data/.ruby-version +1 -1
- data/CHANGELOG.md +388 -0
- data/Gemfile.lock +14 -14
- data/README.md +23 -0
- data/lib/workos/admin_portal/generate_link.rb +3 -0
- data/lib/workos/admin_portal/revoke_link.rb +22 -0
- data/lib/workos/admin_portal.rb +29 -2
- data/lib/workos/agents/agent_blueprint.rb +3 -0
- data/lib/workos/agents/agent_blueprint_invocable_as.rb +18 -0
- data/lib/workos/agents/agent_blueprints_create_request.rb +3 -0
- data/lib/workos/agents/agent_blueprints_create_request_invocable_as.rb +18 -0
- data/lib/workos/agents/agent_blueprints_update_request.rb +3 -0
- data/lib/workos/agents/agent_blueprints_update_request_invocable_as.rb +18 -0
- data/lib/workos/agents/agent_registration.rb +3 -0
- data/lib/workos/agents.rb +30 -1
- data/lib/workos/api_keys/validate_api_key.rb +12 -1
- data/lib/workos/authorization/user_role_assignment_source.rb +5 -2
- data/lib/workos/authorization/user_role_assignment_source_group.rb +7 -0
- data/lib/workos/base_client.rb +6 -2
- data/lib/workos/configuration.rb +3 -2
- data/lib/workos/directory_sync/directory_sync_rate_limit_error.rb +25 -0
- data/lib/workos/directory_sync/directory_sync_response.rb +18 -0
- data/lib/workos/directory_sync.rb +19 -0
- data/lib/workos/feature_flags/flag_updated_context_previous_attribute_data.rb +3 -0
- data/lib/workos/feature_flags/flag_updated_context_previous_attribute_data_owner.rb +7 -0
- data/lib/workos/inflections.rb +2 -0
- data/lib/workos/multi_factor_auth.rb +1 -1
- data/lib/workos/pipes/add_data_integrations_get_data_integration_authorize_url_request.rb +37 -0
- data/lib/workos/pipes/connected_account.rb +15 -0
- data/lib/workos/pipes/connected_account_input.rb +6 -0
- data/lib/workos/pipes/connected_account_write_response.rb +73 -0
- data/lib/workos/pipes/connected_account_write_response_warning.rb +22 -0
- data/lib/workos/pipes/create_connected_account.rb +40 -0
- data/lib/workos/pipes/create_data_integration.rb +3 -0
- data/lib/workos/pipes/create_organization_connected_account.rb +43 -0
- data/lib/workos/pipes/data_integration.rb +3 -0
- data/lib/workos/pipes/data_integration_credentials_response.rb +1 -1
- data/lib/workos/pipes/data_integration_installation.rb +9 -0
- data/lib/workos/pipes/{data_integration_credentials_response_credential.rb → data_integration_vended_credential.rb} +9 -3
- data/lib/workos/pipes/data_integrations_create_api_key_connection_request.rb +37 -0
- data/lib/workos/pipes/data_integrations_create_client_credentials_connection_request.rb +43 -0
- data/lib/workos/pipes/data_integrations_get_data_integration_authorize_url_request.rb +6 -0
- data/lib/workos/pipes/data_integrations_get_user_token_request.rb +11 -2
- data/lib/workos/pipes/data_integrations_list_response_data.rb +18 -3
- data/lib/workos/pipes/data_integrations_list_response_data_connected_account.rb +15 -0
- data/lib/workos/pipes/data_integrations_upsert_api_key_request.rb +28 -1
- data/lib/workos/pipes/data_integrations_upsert_api_key_request_2.rb +37 -0
- data/lib/workos/pipes/data_integrations_upsert_client_credentials_request.rb +9 -0
- data/lib/workos/pipes/data_integrations_upsert_client_credentials_request_2.rb +43 -0
- data/lib/workos/pipes/data_integrations_vend_credentials_request.rb +11 -2
- data/lib/workos/pipes/organization_connected_account.rb +40 -0
- data/lib/workos/pipes/reauthorize_data_integrations_get_data_integration_authorize_url_request.rb +40 -0
- data/lib/workos/pipes/reauthorize_data_integrations_upsert_api_key_request.rb +40 -0
- data/lib/workos/pipes/reauthorize_data_integrations_upsert_client_credentials_request.rb +46 -0
- data/lib/workos/pipes.rb +498 -30
- data/lib/workos/session_manager.rb +11 -6
- data/lib/workos/shared/account_selection_required_error.rb +22 -0
- data/lib/workos/shared/agent_blueprint_created_data.rb +3 -0
- data/lib/workos/shared/agent_blueprint_created_data_invocable_as.rb +18 -0
- data/lib/workos/shared/agent_blueprint_updated_data.rb +40 -1
- data/lib/workos/shared/agent_blueprint_updated_data_invocable_as.rb +18 -0
- data/lib/workos/shared/pipe_connected_account.rb +21 -0
- data/lib/workos/shared/pipes_account_connection_add_failed.rb +34 -0
- data/lib/workos/shared/pipes_account_connection_add_failed_data.rb +49 -0
- data/lib/workos/shared/pipes_account_connection_connected.rb +34 -0
- data/lib/workos/shared/pipes_account_connection_connection_failed.rb +34 -0
- data/lib/workos/shared/pipes_account_connection_connection_failed_data.rb +7 -0
- data/lib/workos/shared/pipes_account_connection_disconnected.rb +34 -0
- data/lib/workos/shared/pipes_account_connection_reauthorization_needed.rb +34 -0
- data/lib/workos/shared/pipes_connected_account_connection_failed_data.rb +1 -40
- data/lib/workos/sso/token_query.rb +3 -0
- data/lib/workos/sso.rb +3 -0
- data/lib/workos/types/add_data_integrations_get_data_integration_authorize_url_request_connection_owner.rb +13 -0
- data/lib/workos/types/agent_blueprint_created_data_invocable_as_instance_types.rb +13 -0
- data/lib/workos/types/agent_blueprint_invocable_as_instance_types.rb +9 -0
- data/lib/workos/types/agent_blueprint_updated_data_invocable_as_instance_types.rb +9 -0
- data/lib/workos/types/agent_blueprints_create_request_invocable_as_instance_types.rb +9 -0
- data/lib/workos/types/agent_blueprints_update_request_invocable_as_instance_types.rb +9 -0
- data/lib/workos/types/agent_instance_created_data_type.rb +1 -5
- data/lib/workos/types/agent_instance_deleted_data_type.rb +1 -1
- data/lib/workos/types/agent_instance_type.rb +1 -1
- data/lib/workos/types/connected_account_connection_role.rb +13 -0
- data/lib/workos/types/connected_account_write_response_auth_method.rb +9 -0
- data/lib/workos/types/connected_account_write_response_connection_role.rb +9 -0
- data/lib/workos/types/connected_account_write_response_state.rb +9 -0
- data/lib/workos/types/create_connected_account_state.rb +9 -0
- data/lib/workos/types/create_data_integration_ownership.rb +9 -0
- data/lib/workos/types/create_organization_connected_account_state.rb +9 -0
- data/lib/workos/types/create_webhook_endpoint_events.rb +6 -1
- data/lib/workos/types/data_integration_installation_connection_role.rb +9 -0
- data/lib/workos/types/data_integration_ownership.rb +9 -0
- data/lib/workos/types/data_integrations_create_api_key_connection_request_connection_owner.rb +9 -0
- data/lib/workos/types/data_integrations_create_client_credentials_connection_request_connection_owner.rb +9 -0
- data/lib/workos/types/data_integrations_get_data_integration_authorize_url_request_connection_owner.rb +9 -0
- data/lib/workos/types/data_integrations_get_user_token_request_connection_owner.rb +9 -0
- data/lib/workos/types/data_integrations_list_response_data_connected_account_connection_role.rb +9 -0
- data/lib/workos/types/data_integrations_list_response_data_connection_owner.rb +9 -0
- data/lib/workos/types/data_integrations_upsert_api_key_request_2_connection_owner.rb +9 -0
- data/lib/workos/types/data_integrations_upsert_api_key_request_connection_owner.rb +9 -0
- data/lib/workos/types/data_integrations_upsert_client_credentials_request_2_connection_owner.rb +9 -0
- data/lib/workos/types/data_integrations_upsert_client_credentials_request_connection_owner.rb +9 -0
- data/lib/workos/types/data_integrations_vend_credentials_request_connection_owner.rb +9 -0
- data/lib/workos/types/organization_connected_account_state.rb +9 -0
- data/lib/workos/types/pipe_connected_account_auth_method.rb +9 -0
- data/lib/workos/types/pipe_connected_account_connection_role.rb +9 -0
- data/lib/workos/types/pipes_ownership.rb +9 -0
- data/lib/workos/types/reauthorize_data_integrations_get_data_integration_authorize_url_request_connection_owner.rb +9 -0
- data/lib/workos/types/reauthorize_data_integrations_upsert_api_key_request_connection_owner.rb +9 -0
- data/lib/workos/types/reauthorize_data_integrations_upsert_client_credentials_request_connection_owner.rb +9 -0
- data/lib/workos/types/resource_export_completed_data_resource_type.rb +4 -1
- data/lib/workos/types/vault_dek_rekeyed_data_actor_source.rb +9 -0
- data/lib/workos/user_management/authkit_oauth_resource.rb +34 -0
- data/lib/workos/user_management/create_authkit_oauth_resource.rb +22 -0
- data/lib/workos/user_management.rb +88 -1
- data/lib/workos/vault/vault_dek_rekeyed.rb +34 -0
- data/lib/workos/vault/vault_dek_rekeyed_data.rb +31 -0
- data/lib/workos/version.rb +1 -1
- data/rbi/workos/account_selection_required_error.rbi +30 -0
- data/rbi/workos/add_data_integrations_get_data_integration_authorize_url_request.rbi +60 -0
- data/rbi/workos/admin_portal.rbi +11 -1
- data/rbi/workos/agent_blueprint.rbi +6 -0
- data/rbi/workos/agent_blueprint_created_data.rbi +6 -0
- data/rbi/workos/agent_blueprint_created_data_invocable_as.rbi +24 -0
- data/rbi/workos/agent_blueprint_invocable_as.rbi +24 -0
- data/rbi/workos/agent_blueprint_updated_data.rbi +6 -0
- data/rbi/workos/agent_blueprint_updated_data_invocable_as.rbi +24 -0
- data/rbi/workos/agent_blueprints_create_request.rbi +6 -0
- data/rbi/workos/agent_blueprints_create_request_invocable_as.rbi +24 -0
- data/rbi/workos/agent_blueprints_update_request.rbi +6 -0
- data/rbi/workos/agent_blueprints_update_request_invocable_as.rbi +24 -0
- data/rbi/workos/agent_registration.rbi +6 -0
- data/rbi/workos/agents.rbi +14 -3
- data/rbi/workos/authkit_oauth_resource.rbi +54 -0
- data/rbi/workos/connected_account.rbi +30 -0
- data/rbi/workos/connected_account_input.rbi +12 -0
- data/rbi/workos/connected_account_write_response.rbi +132 -0
- data/rbi/workos/connected_account_write_response_warning.rbi +30 -0
- data/rbi/workos/create_authkit_oauth_resource.rbi +30 -0
- data/rbi/workos/create_connected_account.rbi +66 -0
- data/rbi/workos/create_data_integration.rbi +6 -0
- data/rbi/workos/create_organization_connected_account.rbi +72 -0
- data/rbi/workos/data_integration.rbi +6 -0
- data/rbi/workos/data_integration_credentials_response.rbi +2 -2
- data/rbi/workos/data_integration_installation.rbi +19 -1
- data/rbi/workos/data_integration_vended_credential.rbi +66 -0
- data/rbi/workos/data_integrations_create_api_key_connection_request.rbi +60 -0
- data/rbi/workos/data_integrations_create_client_credentials_connection_request.rbi +72 -0
- data/rbi/workos/data_integrations_get_data_integration_authorize_url_request.rbi +12 -0
- data/rbi/workos/data_integrations_get_user_token_request.rbi +18 -0
- data/rbi/workos/data_integrations_list_response_data.rbi +12 -0
- data/rbi/workos/data_integrations_list_response_data_connected_account.rbi +30 -0
- data/rbi/workos/data_integrations_upsert_api_key_request.rbi +18 -0
- data/rbi/workos/data_integrations_upsert_api_key_request_2.rbi +60 -0
- data/rbi/workos/data_integrations_upsert_client_credentials_request.rbi +18 -0
- data/rbi/workos/data_integrations_upsert_client_credentials_request_2.rbi +72 -0
- data/rbi/workos/data_integrations_vend_credentials_request.rbi +18 -0
- data/rbi/workos/directory_sync.rbi +8 -0
- data/rbi/workos/directory_sync_rate_limit_error.rbi +36 -0
- data/rbi/workos/directory_sync_response.rbi +24 -0
- data/rbi/workos/flag_updated_context_previous_attribute_data.rbi +6 -0
- data/rbi/workos/flag_updated_context_previous_attribute_data_owner.rbi +36 -0
- data/rbi/workos/generate_link.rbi +6 -0
- data/rbi/workos/organization_connected_account.rbi +66 -0
- data/rbi/workos/pipe_connected_account.rbi +42 -0
- data/rbi/workos/pipes.rbi +176 -16
- data/rbi/workos/pipes_account_connection_add_failed.rbi +54 -0
- data/rbi/workos/pipes_account_connection_add_failed_data.rbi +84 -0
- data/rbi/workos/pipes_account_connection_connected.rbi +54 -0
- data/rbi/workos/pipes_account_connection_connection_failed.rbi +54 -0
- data/rbi/workos/pipes_account_connection_connection_failed_data.rbi +84 -0
- data/rbi/workos/pipes_account_connection_disconnected.rbi +54 -0
- data/rbi/workos/pipes_account_connection_reauthorization_needed.rbi +54 -0
- data/rbi/workos/pipes_connected_account_connection_failed_data.rbi +6 -0
- data/rbi/workos/reauthorize_data_integrations_get_data_integration_authorize_url_request.rbi +66 -0
- data/rbi/workos/reauthorize_data_integrations_upsert_api_key_request.rbi +66 -0
- data/rbi/workos/reauthorize_data_integrations_upsert_client_credentials_request.rbi +78 -0
- data/rbi/workos/revoke_link.rbi +30 -0
- data/rbi/workos/sso.rbi +2 -1
- data/rbi/workos/token_query.rbi +6 -0
- data/rbi/workos/user_management.rbi +28 -0
- data/rbi/workos/user_role_assignment_source.rbi +6 -0
- data/rbi/workos/user_role_assignment_source_group.rbi +30 -0
- data/rbi/workos/vault_dek_rekeyed.rbi +54 -0
- data/rbi/workos/{data_integration_credentials_response_credential.rbi → vault_dek_rekeyed_data.rbi} +13 -19
- data/test/workos/test_admin_portal.rb +9 -1
- data/test/workos/test_admin_portal_model_round_trip.rb +14 -0
- data/test/workos/test_agents.rb +8 -0
- data/test/workos/test_agents_model_round_trip.rb +35 -0
- data/test/workos/test_authorization_model_round_trip.rb +15 -1
- data/test/workos/test_directory_sync.rb +8 -0
- data/test/workos/test_directory_sync_model_round_trip.rb +24 -0
- data/test/workos/test_feature_flags_model_round_trip.rb +16 -0
- data/test/workos/test_pipes.rb +80 -0
- data/test/workos/test_pipes_model_round_trip.rb +317 -18
- data/test/workos/test_session.rb +63 -0
- data/test/workos/test_shared_model_round_trip.rb +185 -0
- data/test/workos/test_sso_model_round_trip.rb +1 -0
- data/test/workos/test_user_management.rb +24 -0
- data/test/workos/test_user_management_model_round_trip.rb +32 -0
- data/test/workos/test_vault_model_round_trip.rb +33 -0
- metadata +107 -3
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
module WorkOS
|
|
6
|
+
class AgentBlueprintInvocableAs < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
instance_types: :instance_types
|
|
9
|
+
}.freeze
|
|
10
|
+
|
|
11
|
+
attr_accessor :instance_types
|
|
12
|
+
|
|
13
|
+
def initialize(json)
|
|
14
|
+
hash = self.class.normalize(json)
|
|
15
|
+
@instance_types = hash[:instance_types] || []
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -9,6 +9,7 @@ module WorkOS
|
|
|
9
9
|
description: :description,
|
|
10
10
|
permissions: :permissions,
|
|
11
11
|
invocable_by: :invocable_by,
|
|
12
|
+
invocable_as: :invocable_as,
|
|
12
13
|
session_settings: :session_settings
|
|
13
14
|
}.freeze
|
|
14
15
|
|
|
@@ -17,6 +18,7 @@ module WorkOS
|
|
|
17
18
|
:description,
|
|
18
19
|
:permissions,
|
|
19
20
|
:invocable_by,
|
|
21
|
+
:invocable_as,
|
|
20
22
|
:session_settings
|
|
21
23
|
|
|
22
24
|
def initialize(json)
|
|
@@ -25,6 +27,7 @@ module WorkOS
|
|
|
25
27
|
@description = hash[:description]
|
|
26
28
|
@permissions = hash[:permissions] || []
|
|
27
29
|
@invocable_by = hash[:invocable_by] ? WorkOS::AgentBlueprintsCreateRequestInvocableBy.new(hash[:invocable_by]) : nil
|
|
30
|
+
@invocable_as = hash[:invocable_as] ? WorkOS::AgentBlueprintsCreateRequestInvocableAs.new(hash[:invocable_as]) : nil
|
|
28
31
|
@session_settings = hash[:session_settings] ? WorkOS::AgentBlueprintsCreateRequestSessionSetting.new(hash[:session_settings]) : nil
|
|
29
32
|
end
|
|
30
33
|
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
module WorkOS
|
|
6
|
+
class AgentBlueprintsCreateRequestInvocableAs < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
instance_types: :instance_types
|
|
9
|
+
}.freeze
|
|
10
|
+
|
|
11
|
+
attr_accessor :instance_types
|
|
12
|
+
|
|
13
|
+
def initialize(json)
|
|
14
|
+
hash = self.class.normalize(json)
|
|
15
|
+
@instance_types = hash[:instance_types] || []
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -9,6 +9,7 @@ module WorkOS
|
|
|
9
9
|
description: :description,
|
|
10
10
|
permissions: :permissions,
|
|
11
11
|
invocable_by: :invocable_by,
|
|
12
|
+
invocable_as: :invocable_as,
|
|
12
13
|
session_settings: :session_settings
|
|
13
14
|
}.freeze
|
|
14
15
|
|
|
@@ -17,6 +18,7 @@ module WorkOS
|
|
|
17
18
|
:description,
|
|
18
19
|
:permissions,
|
|
19
20
|
:invocable_by,
|
|
21
|
+
:invocable_as,
|
|
20
22
|
:session_settings
|
|
21
23
|
|
|
22
24
|
def initialize(json)
|
|
@@ -25,6 +27,7 @@ module WorkOS
|
|
|
25
27
|
@description = hash[:description]
|
|
26
28
|
@permissions = hash[:permissions] || []
|
|
27
29
|
@invocable_by = hash[:invocable_by] ? WorkOS::AgentBlueprintsUpdateRequestInvocableBy.new(hash[:invocable_by]) : nil
|
|
30
|
+
@invocable_as = hash[:invocable_as] ? WorkOS::AgentBlueprintsUpdateRequestInvocableAs.new(hash[:invocable_as]) : nil
|
|
28
31
|
@session_settings = hash[:session_settings] ? WorkOS::AgentBlueprintsUpdateRequestSessionSetting.new(hash[:session_settings]) : nil
|
|
29
32
|
end
|
|
30
33
|
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
module WorkOS
|
|
6
|
+
class AgentBlueprintsUpdateRequestInvocableAs < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
instance_types: :instance_types
|
|
9
|
+
}.freeze
|
|
10
|
+
|
|
11
|
+
attr_accessor :instance_types
|
|
12
|
+
|
|
13
|
+
def initialize(json)
|
|
14
|
+
hash = self.class.normalize(json)
|
|
15
|
+
@instance_types = hash[:instance_types] || []
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -9,6 +9,7 @@ module WorkOS
|
|
|
9
9
|
agent_identity: :agent_identity,
|
|
10
10
|
organization_id: :organization_id,
|
|
11
11
|
status: :status,
|
|
12
|
+
revoked_at: :revoked_at,
|
|
12
13
|
kind: :kind,
|
|
13
14
|
claim: :claim,
|
|
14
15
|
created_at: :created_at,
|
|
@@ -20,6 +21,7 @@ module WorkOS
|
|
|
20
21
|
:agent_identity,
|
|
21
22
|
:organization_id,
|
|
22
23
|
:status,
|
|
24
|
+
:revoked_at,
|
|
23
25
|
:kind,
|
|
24
26
|
:claim,
|
|
25
27
|
:created_at,
|
|
@@ -31,6 +33,7 @@ module WorkOS
|
|
|
31
33
|
@agent_identity = hash[:agent_identity] ? WorkOS::AgentRegistrationAgentIdentity.new(hash[:agent_identity]) : nil
|
|
32
34
|
@organization_id = hash[:organization_id]
|
|
33
35
|
@status = hash[:status]
|
|
36
|
+
@revoked_at = hash[:revoked_at]
|
|
34
37
|
@kind = hash[:kind]
|
|
35
38
|
@claim = hash[:claim] ? WorkOS::AgentRegistrationClaim.new(hash[:claim]) : nil
|
|
36
39
|
@created_at = hash[:created_at]
|
data/lib/workos/agents.rb
CHANGED
|
@@ -59,6 +59,7 @@ module WorkOS
|
|
|
59
59
|
# @param description [String, nil] Human-readable description of the agent blueprint.
|
|
60
60
|
# @param permissions [Array<String>, nil] Permission slugs forming the ceiling on what sessions minted from this blueprint may do. Each slug must exist in the environment.
|
|
61
61
|
# @param invocable_by [WorkOS::AgentBlueprintsCreateRequestInvocableBy, nil] Who may mint sessions from this blueprint.
|
|
62
|
+
# @param invocable_as [WorkOS::AgentBlueprintsCreateRequestInvocableAs, nil] How sessions may be minted from this blueprint.
|
|
62
63
|
# @param session_settings [WorkOS::AgentBlueprintsCreateRequestSessionSetting, nil] Token and session lifetimes for sessions minted from this blueprint.
|
|
63
64
|
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
64
65
|
# @return [WorkOS::AgentBlueprint]
|
|
@@ -67,6 +68,7 @@ module WorkOS
|
|
|
67
68
|
description: nil,
|
|
68
69
|
permissions: nil,
|
|
69
70
|
invocable_by: nil,
|
|
71
|
+
invocable_as: nil,
|
|
70
72
|
session_settings: nil,
|
|
71
73
|
request_options: {}
|
|
72
74
|
)
|
|
@@ -75,6 +77,7 @@ module WorkOS
|
|
|
75
77
|
"description" => description,
|
|
76
78
|
"permissions" => permissions,
|
|
77
79
|
"invocable_by" => invocable_by,
|
|
80
|
+
"invocable_as" => invocable_as,
|
|
78
81
|
"session_settings" => session_settings
|
|
79
82
|
}.compact
|
|
80
83
|
response = @client.request(
|
|
@@ -114,6 +117,7 @@ module WorkOS
|
|
|
114
117
|
# @param description [String, nil] Human-readable description of the agent blueprint. Pass `null` to clear it.
|
|
115
118
|
# @param permissions [Array<String>, nil] Permission slugs forming the ceiling on what sessions minted from this blueprint may do. Each slug must exist in the environment.
|
|
116
119
|
# @param invocable_by [WorkOS::AgentBlueprintsUpdateRequestInvocableBy, nil] Who may mint sessions from this blueprint. Omitted lists are left unchanged.
|
|
120
|
+
# @param invocable_as [WorkOS::AgentBlueprintsUpdateRequestInvocableAs, nil] How sessions may be minted from this blueprint. Omitted lists are left unchanged.
|
|
117
121
|
# @param session_settings [WorkOS::AgentBlueprintsUpdateRequestSessionSetting, nil] Token and session lifetimes for sessions minted from this blueprint. Omitted fields are left unchanged.
|
|
118
122
|
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
119
123
|
# @return [WorkOS::AgentBlueprint]
|
|
@@ -123,6 +127,7 @@ module WorkOS
|
|
|
123
127
|
description: WorkOS::OMIT,
|
|
124
128
|
permissions: nil,
|
|
125
129
|
invocable_by: nil,
|
|
130
|
+
invocable_as: nil,
|
|
126
131
|
session_settings: nil,
|
|
127
132
|
request_options: {}
|
|
128
133
|
)
|
|
@@ -130,6 +135,7 @@ module WorkOS
|
|
|
130
135
|
"name" => name,
|
|
131
136
|
"permissions" => permissions,
|
|
132
137
|
"invocable_by" => invocable_by,
|
|
138
|
+
"invocable_as" => invocable_as,
|
|
133
139
|
"session_settings" => session_settings
|
|
134
140
|
}.compact
|
|
135
141
|
body["description"] = description unless description.equal?(WorkOS::OMIT)
|
|
@@ -307,6 +313,25 @@ module WorkOS
|
|
|
307
313
|
result
|
|
308
314
|
end
|
|
309
315
|
|
|
316
|
+
# Revoke an agent registration
|
|
317
|
+
# @param id [String] The unique ID of the agent registration.
|
|
318
|
+
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
319
|
+
# @return [WorkOS::AgentRegistration]
|
|
320
|
+
def revoke_registration(
|
|
321
|
+
id:,
|
|
322
|
+
request_options: {}
|
|
323
|
+
)
|
|
324
|
+
response = @client.request(
|
|
325
|
+
method: :post,
|
|
326
|
+
path: "/agents/registrations/#{WorkOS::Util.encode_path(id)}/revoke",
|
|
327
|
+
auth: true,
|
|
328
|
+
request_options: request_options
|
|
329
|
+
)
|
|
330
|
+
result = WorkOS::AgentRegistration.new(response.body)
|
|
331
|
+
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"])
|
|
332
|
+
result
|
|
333
|
+
end
|
|
334
|
+
|
|
310
335
|
# List agent instances
|
|
311
336
|
# @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"`.
|
|
312
337
|
# @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"`.
|
|
@@ -400,6 +425,7 @@ module WorkOS
|
|
|
400
425
|
# @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"`.
|
|
401
426
|
# @param limit [Integer, nil] Upper limit on the number of objects to return, between `1` and `100`.
|
|
402
427
|
# @param order [WorkOS::Types::PaginationOrder, nil] Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records).
|
|
428
|
+
# @param organization_id [String, nil] Only return sessions of instances acting within this organization.
|
|
403
429
|
# @param agent_blueprint_id [String, nil] Only return sessions of instances minted from this blueprint.
|
|
404
430
|
# @param agent_instance_id [String, nil] Only return sessions belonging to this agent instance.
|
|
405
431
|
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
@@ -409,6 +435,7 @@ module WorkOS
|
|
|
409
435
|
after: nil,
|
|
410
436
|
limit: 10,
|
|
411
437
|
order: "desc",
|
|
438
|
+
organization_id: nil,
|
|
412
439
|
agent_blueprint_id: nil,
|
|
413
440
|
agent_instance_id: nil,
|
|
414
441
|
request_options: {}
|
|
@@ -418,6 +445,7 @@ module WorkOS
|
|
|
418
445
|
"after" => after,
|
|
419
446
|
"limit" => limit,
|
|
420
447
|
"order" => order,
|
|
448
|
+
"organization_id" => organization_id,
|
|
421
449
|
"agent_blueprint_id" => agent_blueprint_id,
|
|
422
450
|
"agent_instance_id" => agent_instance_id
|
|
423
451
|
}.compact
|
|
@@ -434,6 +462,7 @@ module WorkOS
|
|
|
434
462
|
after: cursor,
|
|
435
463
|
limit: limit,
|
|
436
464
|
order: order,
|
|
465
|
+
organization_id: organization_id,
|
|
437
466
|
agent_blueprint_id: agent_blueprint_id,
|
|
438
467
|
agent_instance_id: agent_instance_id,
|
|
439
468
|
request_options: request_options
|
|
@@ -442,7 +471,7 @@ module WorkOS
|
|
|
442
471
|
WorkOS::Types::ListStruct.from_response(
|
|
443
472
|
response,
|
|
444
473
|
model: WorkOS::AgentInstanceSession,
|
|
445
|
-
filters: {before: before, limit: limit, order: order, agent_blueprint_id: agent_blueprint_id, agent_instance_id: agent_instance_id},
|
|
474
|
+
filters: {before: before, limit: limit, order: order, organization_id: organization_id, agent_blueprint_id: agent_blueprint_id, agent_instance_id: agent_instance_id},
|
|
446
475
|
fetch_next: fetch_next
|
|
447
476
|
)
|
|
448
477
|
end
|
|
@@ -3,5 +3,16 @@
|
|
|
3
3
|
# This file is auto-generated by oagen. Do not edit.
|
|
4
4
|
|
|
5
5
|
module WorkOS
|
|
6
|
-
ValidateApiKey
|
|
6
|
+
class ValidateApiKey < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
value: :value
|
|
9
|
+
}.freeze
|
|
10
|
+
|
|
11
|
+
attr_accessor :value
|
|
12
|
+
|
|
13
|
+
def initialize(json)
|
|
14
|
+
hash = self.class.normalize(json)
|
|
15
|
+
@value = hash[:value]
|
|
16
|
+
end
|
|
17
|
+
end
|
|
7
18
|
end
|
|
@@ -6,17 +6,20 @@ module WorkOS
|
|
|
6
6
|
class UserRoleAssignmentSource < WorkOS::Types::BaseModel
|
|
7
7
|
HASH_ATTRS = {
|
|
8
8
|
type: :type,
|
|
9
|
-
group_role_assignment_id: :group_role_assignment_id
|
|
9
|
+
group_role_assignment_id: :group_role_assignment_id,
|
|
10
|
+
group: :group
|
|
10
11
|
}.freeze
|
|
11
12
|
|
|
12
13
|
attr_accessor \
|
|
13
14
|
:type,
|
|
14
|
-
:group_role_assignment_id
|
|
15
|
+
:group_role_assignment_id,
|
|
16
|
+
:group
|
|
15
17
|
|
|
16
18
|
def initialize(json)
|
|
17
19
|
hash = self.class.normalize(json)
|
|
18
20
|
@type = hash[:type]
|
|
19
21
|
@group_role_assignment_id = hash[:group_role_assignment_id]
|
|
22
|
+
@group = hash[:group] ? WorkOS::UserRoleAssignmentSourceGroup.new(hash[:group]) : nil
|
|
20
23
|
end
|
|
21
24
|
end
|
|
22
25
|
end
|
data/lib/workos/base_client.rb
CHANGED
|
@@ -41,11 +41,14 @@ module WorkOS
|
|
|
41
41
|
"v#{WorkOS::VERSION}"
|
|
42
42
|
].join("; ").freeze
|
|
43
43
|
|
|
44
|
-
attr_reader :api_key, :base_url, :client_id, :timeout, :max_retries, :logger, :log_level
|
|
44
|
+
attr_reader :api_key, :base_url, :client_id, :timeout, :max_retries, :logger, :log_level, :jwt_issuer
|
|
45
45
|
|
|
46
|
+
# @param jwt_issuer [String, Array<String>, nil] Expected `iss` claim of
|
|
47
|
+
# session access tokens (one issuer or a list of accepted issuers).
|
|
48
|
+
# When nil, the issuer is not validated.
|
|
46
49
|
def initialize(api_key: nil, base_url: DEFAULT_BASE_URL, client_id: nil,
|
|
47
50
|
timeout: DEFAULT_TIMEOUT, max_retries: DEFAULT_MAX_RETRIES,
|
|
48
|
-
logger: nil, log_level: nil, random: Random.new)
|
|
51
|
+
logger: nil, log_level: nil, jwt_issuer: nil, random: Random.new)
|
|
49
52
|
@api_key = api_key
|
|
50
53
|
@base_url = base_url
|
|
51
54
|
@client_id = client_id
|
|
@@ -53,6 +56,7 @@ module WorkOS
|
|
|
53
56
|
@max_retries = max_retries
|
|
54
57
|
@logger = logger
|
|
55
58
|
@log_level = log_level
|
|
59
|
+
@jwt_issuer = jwt_issuer
|
|
56
60
|
@random = random
|
|
57
61
|
end
|
|
58
62
|
|
data/lib/workos/configuration.rb
CHANGED
|
@@ -12,7 +12,7 @@ module WorkOS
|
|
|
12
12
|
# config.log_level = :info
|
|
13
13
|
# end
|
|
14
14
|
class Configuration
|
|
15
|
-
attr_accessor :api_key, :base_url, :client_id, :timeout, :max_retries, :logger, :log_level
|
|
15
|
+
attr_accessor :api_key, :base_url, :client_id, :timeout, :max_retries, :logger, :log_level, :jwt_issuer
|
|
16
16
|
|
|
17
17
|
def initialize
|
|
18
18
|
@base_url = WorkOS::BaseClient::DEFAULT_BASE_URL
|
|
@@ -47,7 +47,8 @@ module WorkOS
|
|
|
47
47
|
timeout: configuration.timeout,
|
|
48
48
|
max_retries: configuration.max_retries,
|
|
49
49
|
logger: configuration.logger,
|
|
50
|
-
log_level: configuration.log_level
|
|
50
|
+
log_level: configuration.log_level,
|
|
51
|
+
jwt_issuer: configuration.jwt_issuer
|
|
51
52
|
)
|
|
52
53
|
end
|
|
53
54
|
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
module WorkOS
|
|
6
|
+
class DirectorySyncRateLimitError < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
code: :code,
|
|
9
|
+
message: :message,
|
|
10
|
+
retry_after_seconds: :retry_after_seconds
|
|
11
|
+
}.freeze
|
|
12
|
+
|
|
13
|
+
attr_accessor \
|
|
14
|
+
:code,
|
|
15
|
+
:message,
|
|
16
|
+
:retry_after_seconds
|
|
17
|
+
|
|
18
|
+
def initialize(json)
|
|
19
|
+
hash = self.class.normalize(json)
|
|
20
|
+
@code = hash[:code]
|
|
21
|
+
@message = hash[:message]
|
|
22
|
+
@retry_after_seconds = hash[:retry_after_seconds]
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
module WorkOS
|
|
6
|
+
class DirectorySyncResponse < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
status: :status
|
|
9
|
+
}.freeze
|
|
10
|
+
|
|
11
|
+
attr_accessor :status
|
|
12
|
+
|
|
13
|
+
def initialize(json)
|
|
14
|
+
hash = self.class.normalize(json)
|
|
15
|
+
@status = hash[:status]
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -102,6 +102,25 @@ module WorkOS
|
|
|
102
102
|
nil
|
|
103
103
|
end
|
|
104
104
|
|
|
105
|
+
# Sync a Directory
|
|
106
|
+
# @param id [String] Unique identifier for the Directory.
|
|
107
|
+
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
108
|
+
# @return [WorkOS::DirectorySyncResponse]
|
|
109
|
+
def create_directory_sync(
|
|
110
|
+
id:,
|
|
111
|
+
request_options: {}
|
|
112
|
+
)
|
|
113
|
+
response = @client.request(
|
|
114
|
+
method: :post,
|
|
115
|
+
path: "/directories/#{WorkOS::Util.encode_path(id)}/sync",
|
|
116
|
+
auth: true,
|
|
117
|
+
request_options: request_options
|
|
118
|
+
)
|
|
119
|
+
result = WorkOS::DirectorySyncResponse.new(response.body)
|
|
120
|
+
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"])
|
|
121
|
+
result
|
|
122
|
+
end
|
|
123
|
+
|
|
105
124
|
# List Directory Groups
|
|
106
125
|
# @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"`.
|
|
107
126
|
# @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"`.
|
|
@@ -8,6 +8,7 @@ module WorkOS
|
|
|
8
8
|
name: :name,
|
|
9
9
|
description: :description,
|
|
10
10
|
tags: :tags,
|
|
11
|
+
owner: :owner,
|
|
11
12
|
enabled: :enabled,
|
|
12
13
|
default_value: :default_value
|
|
13
14
|
}.freeze
|
|
@@ -16,6 +17,7 @@ module WorkOS
|
|
|
16
17
|
:name,
|
|
17
18
|
:description,
|
|
18
19
|
:tags,
|
|
20
|
+
:owner,
|
|
19
21
|
:enabled,
|
|
20
22
|
:default_value
|
|
21
23
|
|
|
@@ -24,6 +26,7 @@ module WorkOS
|
|
|
24
26
|
@name = hash[:name]
|
|
25
27
|
@description = hash[:description]
|
|
26
28
|
@tags = hash[:tags] || []
|
|
29
|
+
@owner = hash[:owner] ? WorkOS::FlagUpdatedContextPreviousAttributeDataOwner.new(hash[:owner]) : nil
|
|
27
30
|
@enabled = hash[:enabled]
|
|
28
31
|
@default_value = hash[:default_value]
|
|
29
32
|
end
|
data/lib/workos/inflections.rb
CHANGED
|
@@ -31,6 +31,7 @@ WORKOS_INFLECTIONS = {
|
|
|
31
31
|
"authentication_sso_timed_out_data" => "AuthenticationSSOTimedOutData",
|
|
32
32
|
"authentication_sso_timed_out_data_error" => "AuthenticationSSOTimedOutDataError",
|
|
33
33
|
"authentication_sso_timed_out_data_sso" => "AuthenticationSSOTimedOutDataSSO",
|
|
34
|
+
"authkit_oauth_resource" => "AuthkitOAuthResource",
|
|
34
35
|
"connect_application_m2m" => "ConnectApplicationM2M",
|
|
35
36
|
"connect_application_oauth" => "ConnectApplicationOAuth",
|
|
36
37
|
"connect_application_oauth_redirect_uris" => "ConnectApplicationOAuthRedirectUris",
|
|
@@ -45,6 +46,7 @@ WORKOS_INFLECTIONS = {
|
|
|
45
46
|
"connection_saml_certificate_renewed_data_certificate_certificate_type" => "ConnectionSAMLCertificateRenewedDataCertificateCertificateType",
|
|
46
47
|
"connection_saml_certificate_renewed_data_connection" => "ConnectionSAMLCertificateRenewedDataConnection",
|
|
47
48
|
"cors_origin_response" => "CORSOriginResponse",
|
|
49
|
+
"create_authkit_oauth_resource" => "CreateAuthkitOAuthResource",
|
|
48
50
|
"create_connection_oidc_options" => "CreateConnectionOIDCOptions",
|
|
49
51
|
"create_connection_oidc_options_id_token_signature_algorithm" => "CreateConnectionOIDCOptionsIdTokenSignatureAlgorithm",
|
|
50
52
|
"create_connection_oidc_options_token_authentication_method" => "CreateConnectionOIDCOptionsTokenAuthenticationMethod",
|
|
@@ -108,7 +108,7 @@ module WorkOS
|
|
|
108
108
|
|
|
109
109
|
# Challenge Factor
|
|
110
110
|
# @param id [String] The unique ID of the Authentication Factor to be challenged.
|
|
111
|
-
# @param sms_template [String, nil] A custom template for the SMS message. Use the {{code}} placeholder to include the verification code.
|
|
111
|
+
# @param sms_template [String, nil] A custom template for the SMS message. Use the {{code}} placeholder to include the verification code. Must not contain URLs or domain names.
|
|
112
112
|
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
113
113
|
# @return [WorkOS::AuthenticationChallenge]
|
|
114
114
|
def challenge_factor(
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
module WorkOS
|
|
6
|
+
class AddDataIntegrationsGetDataIntegrationAuthorizeUrlRequest < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
account_display_name: :account_display_name,
|
|
9
|
+
user_id: :user_id,
|
|
10
|
+
organization_id: :organization_id,
|
|
11
|
+
connection_owner: :connection_owner,
|
|
12
|
+
return_to: :return_to,
|
|
13
|
+
config: :config,
|
|
14
|
+
connection_intent: :connection_intent
|
|
15
|
+
}.freeze
|
|
16
|
+
|
|
17
|
+
attr_accessor \
|
|
18
|
+
:account_display_name,
|
|
19
|
+
:user_id,
|
|
20
|
+
:organization_id,
|
|
21
|
+
:connection_owner,
|
|
22
|
+
:return_to,
|
|
23
|
+
:config,
|
|
24
|
+
:connection_intent
|
|
25
|
+
|
|
26
|
+
def initialize(json)
|
|
27
|
+
hash = self.class.normalize(json)
|
|
28
|
+
@account_display_name = hash[:account_display_name]
|
|
29
|
+
@user_id = hash[:user_id]
|
|
30
|
+
@organization_id = hash[:organization_id]
|
|
31
|
+
@connection_owner = hash[:connection_owner]
|
|
32
|
+
@return_to = hash[:return_to]
|
|
33
|
+
@config = hash[:config] || {}
|
|
34
|
+
@connection_intent = hash[:connection_intent]
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
@@ -7,6 +7,9 @@ module WorkOS
|
|
|
7
7
|
HASH_ATTRS = {
|
|
8
8
|
object: :object,
|
|
9
9
|
id: :id,
|
|
10
|
+
connection_role: :connection_role,
|
|
11
|
+
account_identifier: :account_identifier,
|
|
12
|
+
account_display_name: :account_display_name,
|
|
10
13
|
user_id: :user_id,
|
|
11
14
|
organization_id: :organization_id,
|
|
12
15
|
scopes: :scopes,
|
|
@@ -16,6 +19,8 @@ module WorkOS
|
|
|
16
19
|
client_secret_last_4: :client_secret_last_4,
|
|
17
20
|
config: :config,
|
|
18
21
|
state: :state,
|
|
22
|
+
established_by_user_id: :established_by_user_id,
|
|
23
|
+
state_reason: :state_reason,
|
|
19
24
|
created_at: :created_at,
|
|
20
25
|
updated_at: :updated_at
|
|
21
26
|
}.freeze
|
|
@@ -23,6 +28,9 @@ module WorkOS
|
|
|
23
28
|
attr_accessor \
|
|
24
29
|
:object,
|
|
25
30
|
:id,
|
|
31
|
+
:connection_role,
|
|
32
|
+
:account_identifier,
|
|
33
|
+
:account_display_name,
|
|
26
34
|
:user_id,
|
|
27
35
|
:organization_id,
|
|
28
36
|
:scopes,
|
|
@@ -32,6 +40,8 @@ module WorkOS
|
|
|
32
40
|
:client_secret_last_4,
|
|
33
41
|
:config,
|
|
34
42
|
:state,
|
|
43
|
+
:established_by_user_id,
|
|
44
|
+
:state_reason,
|
|
35
45
|
:created_at,
|
|
36
46
|
:updated_at
|
|
37
47
|
|
|
@@ -39,6 +49,9 @@ module WorkOS
|
|
|
39
49
|
hash = self.class.normalize(json)
|
|
40
50
|
@object = hash[:object]
|
|
41
51
|
@id = hash[:id]
|
|
52
|
+
@connection_role = hash[:connection_role]
|
|
53
|
+
@account_identifier = hash[:account_identifier]
|
|
54
|
+
@account_display_name = hash[:account_display_name]
|
|
42
55
|
@user_id = hash[:user_id]
|
|
43
56
|
@organization_id = hash[:organization_id]
|
|
44
57
|
@scopes = hash[:scopes] || []
|
|
@@ -48,6 +61,8 @@ module WorkOS
|
|
|
48
61
|
@client_secret_last_4 = hash[:client_secret_last_4]
|
|
49
62
|
@config = hash[:config] || {}
|
|
50
63
|
@state = hash[:state]
|
|
64
|
+
@established_by_user_id = hash[:established_by_user_id]
|
|
65
|
+
@state_reason = hash[:state_reason]
|
|
51
66
|
@created_at = hash[:created_at]
|
|
52
67
|
@updated_at = hash[:updated_at]
|
|
53
68
|
end
|
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
module WorkOS
|
|
6
6
|
class ConnectedAccountInput < WorkOS::Types::BaseModel
|
|
7
7
|
HASH_ATTRS = {
|
|
8
|
+
account_display_name: :account_display_name,
|
|
9
|
+
account_identifier: :account_identifier,
|
|
8
10
|
access_token: :access_token,
|
|
9
11
|
refresh_token: :refresh_token,
|
|
10
12
|
expires_at: :expires_at,
|
|
@@ -13,6 +15,8 @@ module WorkOS
|
|
|
13
15
|
}.freeze
|
|
14
16
|
|
|
15
17
|
attr_accessor \
|
|
18
|
+
:account_display_name,
|
|
19
|
+
:account_identifier,
|
|
16
20
|
:access_token,
|
|
17
21
|
:refresh_token,
|
|
18
22
|
:expires_at,
|
|
@@ -21,6 +25,8 @@ module WorkOS
|
|
|
21
25
|
|
|
22
26
|
def initialize(json)
|
|
23
27
|
hash = self.class.normalize(json)
|
|
28
|
+
@account_display_name = hash[:account_display_name]
|
|
29
|
+
@account_identifier = hash[:account_identifier]
|
|
24
30
|
@access_token = hash[:access_token]
|
|
25
31
|
@refresh_token = hash[:refresh_token]
|
|
26
32
|
@expires_at = hash[:expires_at]
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
module WorkOS
|
|
6
|
+
class ConnectedAccountWriteResponse < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
object: :object,
|
|
9
|
+
id: :id,
|
|
10
|
+
connection_role: :connection_role,
|
|
11
|
+
account_identifier: :account_identifier,
|
|
12
|
+
account_display_name: :account_display_name,
|
|
13
|
+
user_id: :user_id,
|
|
14
|
+
organization_id: :organization_id,
|
|
15
|
+
scopes: :scopes,
|
|
16
|
+
auth_method: :auth_method,
|
|
17
|
+
api_key_last_4: :api_key_last_4,
|
|
18
|
+
client_id: :client_id,
|
|
19
|
+
client_secret_last_4: :client_secret_last_4,
|
|
20
|
+
config: :config,
|
|
21
|
+
state: :state,
|
|
22
|
+
established_by_user_id: :established_by_user_id,
|
|
23
|
+
state_reason: :state_reason,
|
|
24
|
+
created_at: :created_at,
|
|
25
|
+
updated_at: :updated_at,
|
|
26
|
+
warnings: :warnings
|
|
27
|
+
}.freeze
|
|
28
|
+
|
|
29
|
+
attr_accessor \
|
|
30
|
+
:object,
|
|
31
|
+
:id,
|
|
32
|
+
:connection_role,
|
|
33
|
+
:account_identifier,
|
|
34
|
+
:account_display_name,
|
|
35
|
+
:user_id,
|
|
36
|
+
:organization_id,
|
|
37
|
+
:scopes,
|
|
38
|
+
:auth_method,
|
|
39
|
+
:api_key_last_4,
|
|
40
|
+
:client_id,
|
|
41
|
+
:client_secret_last_4,
|
|
42
|
+
:config,
|
|
43
|
+
:state,
|
|
44
|
+
:established_by_user_id,
|
|
45
|
+
:state_reason,
|
|
46
|
+
:created_at,
|
|
47
|
+
:updated_at,
|
|
48
|
+
:warnings
|
|
49
|
+
|
|
50
|
+
def initialize(json)
|
|
51
|
+
hash = self.class.normalize(json)
|
|
52
|
+
@object = hash[:object]
|
|
53
|
+
@id = hash[:id]
|
|
54
|
+
@connection_role = hash[:connection_role]
|
|
55
|
+
@account_identifier = hash[:account_identifier]
|
|
56
|
+
@account_display_name = hash[:account_display_name]
|
|
57
|
+
@user_id = hash[:user_id]
|
|
58
|
+
@organization_id = hash[:organization_id]
|
|
59
|
+
@scopes = hash[:scopes] || []
|
|
60
|
+
@auth_method = hash[:auth_method]
|
|
61
|
+
@api_key_last_4 = hash[:api_key_last_4]
|
|
62
|
+
@client_id = hash[:client_id]
|
|
63
|
+
@client_secret_last_4 = hash[:client_secret_last_4]
|
|
64
|
+
@config = hash[:config] || {}
|
|
65
|
+
@state = hash[:state]
|
|
66
|
+
@established_by_user_id = hash[:established_by_user_id]
|
|
67
|
+
@state_reason = hash[:state_reason]
|
|
68
|
+
@created_at = hash[:created_at]
|
|
69
|
+
@updated_at = hash[:updated_at]
|
|
70
|
+
@warnings = (hash[:warnings] || []).map { |item| item ? WorkOS::ConnectedAccountWriteResponseWarning.new(item) : nil }
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
end
|