workos 9.5.0 → 10.0.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/block-generated-edits.yml +13 -0
- data/.github/workflows/ci.yml +1 -1
- data/.github/workflows/docs.yml +1 -1
- data/.github/workflows/lint.yml +1 -1
- data/.github/workflows/release-please.yml +7 -1
- data/.github/workflows/release.yml +1 -1
- data/.last-synced-sha +1 -1
- data/.oagen-manifest.json +197 -75
- data/.release-please-manifest.json +1 -1
- data/CHANGELOG.md +87 -0
- data/Gemfile.lock +2 -2
- data/README.md +15 -14
- data/lib/workos/agents/agent_admin_link_claim_attempt_to_external_user_request.rb +28 -0
- data/lib/workos/agents/agent_admin_link_claim_attempt_to_external_user_request_user.rb +22 -0
- data/lib/workos/agents/agent_admin_validate_credential_request.rb +25 -0
- data/lib/workos/agents/agent_credential_validation.rb +25 -0
- data/lib/workos/agents/agent_registration.rb +40 -0
- data/lib/workos/agents/agent_registration_agent_identity.rb +28 -0
- data/lib/workos/agents/agent_registration_claim.rb +31 -0
- data/lib/workos/agents/agent_registration_claim_claim_completion.rb +31 -0
- data/lib/workos/agents/claim_view_response.rb +28 -0
- data/lib/workos/agents/claim_view_response_organization.rb +7 -0
- data/lib/workos/agents.rb +93 -0
- data/lib/workos/api_keys/api_key_validation_response.rb +6 -2
- data/lib/workos/api_keys.rb +3 -4
- data/lib/workos/authorization/permission_created_data.rb +1 -34
- data/lib/workos/authorization/permission_deleted_data.rb +1 -1
- data/lib/workos/authorization/permission_updated_data.rb +1 -1
- data/lib/workos/authorization.rb +24 -24
- data/lib/workos/base_client.rb +4 -4
- data/lib/workos/client.rb +4 -0
- data/lib/workos/connect.rb +23 -19
- data/lib/workos/directory_sync.rb +10 -2
- data/lib/workos/groups.rb +7 -7
- data/lib/workos/inflections.rb +0 -1
- data/lib/workos/organization_domains.rb +4 -4
- data/lib/workos/organizations/organization_authorized_connect_application_list_data.rb +34 -0
- data/lib/workos/organizations.rb +57 -10
- data/lib/workos/pipes/api_key_installation.rb +25 -0
- data/lib/workos/pipes/{connected_account_dto.rb → connected_account_input.rb} +1 -1
- data/lib/workos/pipes/create_data_integration.rb +7 -1
- data/lib/workos/pipes/data_integration.rb +6 -0
- data/lib/workos/pipes/{data_integration_credentials_dto.rb → data_integration_credentials_input.rb} +1 -1
- data/lib/workos/pipes/data_integration_installation.rb +28 -0
- data/lib/workos/pipes/data_integrations_upsert_api_key_request.rb +1 -19
- data/lib/workos/pipes/update_data_integration.rb +4 -1
- data/lib/workos/pipes.rb +25 -16
- data/lib/workos/pipes_provider.rb +2 -2
- data/lib/workos/shared/access_token_agent_registration_credential_issued_data_detail.rb +25 -0
- data/lib/workos/shared/agent_registration_claim_attempt_created.rb +34 -0
- data/lib/workos/shared/agent_registration_claim_attempt_created_data.rb +40 -0
- data/lib/workos/shared/agent_registration_claim_completed.rb +34 -0
- data/lib/workos/shared/agent_registration_claim_completed_data.rb +40 -0
- data/lib/workos/shared/agent_registration_claim_completed_data_claimed_by.rb +22 -0
- data/lib/workos/shared/agent_registration_created.rb +34 -0
- data/lib/workos/{organization_domains/organization_domain_stand_alone.rb → shared/agent_registration_created_data.rb} +13 -16
- data/lib/workos/shared/agent_registration_created_data_agent_identity.rb +25 -0
- data/lib/workos/shared/agent_registration_credential_issued.rb +34 -0
- data/lib/workos/shared/agent_registration_credential_issued_data.rb +34 -0
- data/lib/workos/shared/agent_registration_credential_issued_data_detail.rb +22 -0
- data/lib/workos/shared/agent_registration_deleted.rb +34 -0
- data/lib/workos/shared/agent_registration_deleted_data.rb +18 -0
- data/lib/workos/shared/agent_registration_expired.rb +34 -0
- data/lib/workos/shared/agent_registration_expired_data.rb +7 -0
- data/lib/workos/shared/agent_registration_organization_switched.rb +34 -0
- data/lib/workos/shared/agent_registration_organization_switched_data.rb +25 -0
- data/lib/workos/shared/agent_registration_revoked.rb +34 -0
- data/lib/workos/shared/agent_registration_revoked_data.rb +7 -0
- data/lib/workos/shared/pipes_connected_account_connection_failed.rb +34 -0
- data/lib/workos/shared/pipes_connected_account_connection_failed_data.rb +46 -0
- data/lib/workos/shared/radar_challenge_created.rb +34 -0
- data/lib/workos/shared/radar_challenge_created_data.rb +28 -0
- data/lib/workos/sso/connection.rb +3 -3
- data/lib/workos/types/agent_admin_validate_credential_request_type.rb +13 -0
- data/lib/workos/types/agent_registration_created_data_kind.rb +14 -0
- data/lib/workos/types/agent_registration_created_data_method.rb +14 -0
- data/lib/workos/types/agent_registration_created_data_status.rb +15 -0
- data/lib/workos/types/{data_integration_credentials_type.rb → agent_registration_kind.rb} +1 -1
- data/lib/workos/types/{organization_domain_stand_alone_state.rb → agent_registration_status.rb} +1 -1
- data/lib/workos/types/applications_registration_types.rb +13 -0
- data/lib/workos/types/{organization_domain_stand_alone_verification_strategy.rb → claim_view_response_status.rb} +1 -1
- data/lib/workos/types/connected_account_input_state.rb +13 -0
- data/lib/workos/types/connected_account_state.rb +2 -1
- data/lib/workos/types/create_data_integration_auth_methods.rb +9 -0
- data/lib/workos/types/create_user_password_hash_type.rb +2 -1
- data/lib/workos/types/create_webhook_endpoint_events.rb +5 -1
- data/lib/workos/types/data_integration_auth_methods.rb +9 -0
- data/lib/workos/types/data_integration_credentials_input_type.rb +9 -0
- data/lib/workos/types/data_integrations_list_response_data_connected_account_state.rb +1 -6
- data/lib/workos/types/pipe_connected_account_state.rb +1 -5
- data/lib/workos/types/vault_kek_deleted_data_actor_source.rb +9 -0
- data/lib/workos/user_management/authentication_reauthentication_succeeded.rb +34 -0
- data/lib/workos/user_management/authentication_reauthentication_succeeded_data.rb +34 -0
- data/lib/workos/user_management/radar_challenge.rb +43 -0
- data/lib/workos/user_management.rb +59 -23
- data/lib/workos/vault/vault_kek_deleted.rb +34 -0
- data/lib/workos/vault/vault_kek_deleted_data.rb +31 -0
- data/lib/workos/vault.rb +4 -4
- data/lib/workos/version.rb +1 -1
- data/lib/workos/widgets.rb +2 -2
- data/lib/workos.rb +11 -0
- data/rbi/workos/access_token_agent_registration_credential_issued_data_detail.rbi +36 -0
- data/rbi/workos/agent_admin_link_claim_attempt_to_external_user_request.rbi +42 -0
- data/rbi/workos/agent_admin_link_claim_attempt_to_external_user_request_user.rbi +30 -0
- data/rbi/workos/agent_admin_validate_credential_request.rbi +36 -0
- data/rbi/workos/{sso_intent_options.rbi → agent_credential_validation.rbi} +11 -5
- data/rbi/workos/agent_registration.rbi +66 -0
- data/rbi/workos/agent_registration_agent_identity.rbi +42 -0
- data/rbi/workos/agent_registration_claim.rbi +48 -0
- data/rbi/workos/agent_registration_claim_attempt_created.rbi +54 -0
- data/rbi/workos/agent_registration_claim_attempt_created_data.rbi +66 -0
- data/rbi/workos/agent_registration_claim_claim_completion.rbi +48 -0
- data/rbi/workos/agent_registration_claim_completed.rbi +54 -0
- data/rbi/workos/agent_registration_claim_completed_data.rbi +66 -0
- data/rbi/workos/agent_registration_claim_completed_data_claimed_by.rbi +30 -0
- data/rbi/workos/agent_registration_created.rbi +54 -0
- data/rbi/workos/agent_registration_created_data.rbi +72 -0
- data/rbi/workos/agent_registration_created_data_agent_identity.rbi +36 -0
- data/rbi/workos/agent_registration_credential_issued.rbi +54 -0
- data/rbi/workos/agent_registration_credential_issued_data.rbi +54 -0
- data/rbi/workos/agent_registration_credential_issued_data_detail.rbi +30 -0
- data/rbi/workos/agent_registration_deleted.rbi +54 -0
- data/rbi/workos/{connection_option.rbi → agent_registration_deleted_data.rbi} +5 -5
- data/rbi/workos/agent_registration_expired.rbi +54 -0
- data/rbi/workos/{domain_verification_intent_options.rbi → agent_registration_expired_data.rbi} +5 -5
- data/rbi/workos/agent_registration_organization_switched.rbi +54 -0
- data/rbi/workos/agent_registration_organization_switched_data.rbi +36 -0
- data/rbi/workos/agent_registration_revoked.rbi +54 -0
- data/rbi/workos/agent_registration_revoked_data.rbi +24 -0
- data/rbi/workos/agents.rbi +42 -0
- data/rbi/workos/api_key_installation.rbi +36 -0
- data/rbi/workos/api_key_validation_response.rbi +6 -0
- data/rbi/workos/authentication_reauthentication_succeeded.rbi +54 -0
- data/rbi/workos/authentication_reauthentication_succeeded_data.rbi +54 -0
- data/rbi/workos/claim_view_response.rbi +42 -0
- data/rbi/workos/claim_view_response_organization.rbi +30 -0
- data/rbi/workos/client.rbi +3 -0
- data/rbi/workos/connect.rbi +2 -1
- data/rbi/workos/{connected_account_dto.rbi → connected_account_input.rbi} +1 -1
- data/rbi/workos/connection.rbi +4 -4
- data/rbi/workos/create_data_integration.rbi +14 -2
- data/rbi/workos/data_integration.rbi +12 -0
- data/rbi/workos/{data_integration_credentials_dto.rbi → data_integration_credentials_input.rbi} +1 -1
- data/rbi/workos/data_integration_installation.rbi +42 -0
- data/rbi/workos/directory_sync.rbi +3 -1
- data/rbi/workos/organization_authorized_connect_application_list_data.rbi +54 -0
- data/rbi/workos/organization_domains.rbi +2 -2
- data/rbi/workos/organizations.rbi +12 -0
- data/rbi/workos/permission_created_data.rbi +6 -0
- data/rbi/workos/permission_deleted_data.rbi +6 -0
- data/rbi/workos/permission_updated_data.rbi +6 -0
- data/rbi/workos/pipes.rbi +7 -4
- data/rbi/workos/pipes_connected_account_connection_failed.rbi +54 -0
- data/rbi/workos/{organization_domain_stand_alone.rbi → pipes_connected_account_connection_failed_data.rbi} +23 -23
- data/rbi/workos/radar_challenge.rbi +72 -0
- data/rbi/workos/radar_challenge_created.rbi +54 -0
- data/rbi/workos/radar_challenge_created_data.rbi +42 -0
- data/rbi/workos/update_data_integration.rbi +8 -2
- data/rbi/workos/user_management.rbi +16 -0
- data/rbi/workos/vault_kek_deleted.rbi +54 -0
- data/rbi/workos/vault_kek_deleted_data.rbi +48 -0
- data/rbi/workos/widget_session_token.rbi +2 -2
- data/rbi/workos/widgets.rbi +1 -1
- data/test/workos/test_agents.rb +49 -0
- data/test/workos/test_agents_model_round_trip.rb +165 -0
- data/test/workos/test_api_keys_model_round_trip.rb +307 -0
- data/test/workos/test_authorization_model_round_trip.rb +237 -0
- data/test/workos/test_base_client.rb +27 -0
- data/test/workos/test_client_api_model_round_trip.rb +31 -0
- data/test/workos/test_connect_model_round_trip.rb +175 -0
- data/test/workos/test_directory_sync_model_round_trip.rb +579 -0
- data/test/workos/test_feature_flags_model_round_trip.rb +580 -0
- data/test/workos/test_groups_model_round_trip.rb +56 -0
- data/test/workos/test_multi_factor_auth_model_round_trip.rb +192 -0
- data/test/workos/test_organization_domains_model_round_trip.rb +260 -0
- data/test/workos/test_organization_membership_model_round_trip.rb +89 -0
- data/test/workos/test_organizations.rb +9 -1
- data/test/workos/test_organizations_model_round_trip.rb +602 -0
- data/test/workos/test_pipes_model_round_trip.rb +40 -4
- data/test/workos/test_pipes_provider_model_round_trip.rb +75 -0
- data/test/workos/test_shared_model_round_trip.rb +787 -0
- data/test/workos/test_sso_model_round_trip.rb +422 -0
- data/test/workos/test_user_management.rb +16 -0
- data/test/workos/test_user_management_model_round_trip.rb +1501 -0
- data/test/workos/test_vault_model_round_trip.rb +571 -0
- data/test/workos/test_widgets.rb +2 -2
- data/test/workos/test_widgets_model_round_trip.rb +30 -0
- metadata +118 -19
- data/lib/workos/admin_portal/domain_verification_intent_options.rb +0 -18
- data/lib/workos/admin_portal/intent_options.rb +0 -22
- data/lib/workos/admin_portal/sso_intent_options.rb +0 -22
- data/lib/workos/sso/connection_option.rb +0 -18
- data/rbi/workos/intent_options.rbi +0 -30
- data/test/workos/test_model_round_trip.rb +0 -6
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
module WorkOS
|
|
6
|
+
class DataIntegrationInstallation < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
id: :id,
|
|
9
|
+
user_id: :user_id,
|
|
10
|
+
organization_id: :organization_id,
|
|
11
|
+
api_key_last_4: :api_key_last_4
|
|
12
|
+
}.freeze
|
|
13
|
+
|
|
14
|
+
attr_accessor \
|
|
15
|
+
:id,
|
|
16
|
+
:user_id,
|
|
17
|
+
:organization_id,
|
|
18
|
+
:api_key_last_4
|
|
19
|
+
|
|
20
|
+
def initialize(json)
|
|
21
|
+
hash = self.class.normalize(json)
|
|
22
|
+
@id = hash[:id]
|
|
23
|
+
@user_id = hash[:user_id]
|
|
24
|
+
@organization_id = hash[:organization_id]
|
|
25
|
+
@api_key_last_4 = hash[:api_key_last_4]
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -3,23 +3,5 @@
|
|
|
3
3
|
# This file is auto-generated by oagen. Do not edit.
|
|
4
4
|
|
|
5
5
|
module WorkOS
|
|
6
|
-
|
|
7
|
-
HASH_ATTRS = {
|
|
8
|
-
user_id: :user_id,
|
|
9
|
-
organization_id: :organization_id,
|
|
10
|
-
secret: :secret
|
|
11
|
-
}.freeze
|
|
12
|
-
|
|
13
|
-
attr_accessor \
|
|
14
|
-
:user_id,
|
|
15
|
-
:organization_id,
|
|
16
|
-
:secret
|
|
17
|
-
|
|
18
|
-
def initialize(json)
|
|
19
|
-
hash = self.class.normalize(json)
|
|
20
|
-
@user_id = hash[:user_id]
|
|
21
|
-
@organization_id = hash[:organization_id]
|
|
22
|
-
@secret = hash[:secret]
|
|
23
|
-
end
|
|
24
|
-
end
|
|
6
|
+
DataIntegrationsUpsertApiKeyRequest = ApiKeyInstallation
|
|
25
7
|
end
|
|
@@ -9,6 +9,7 @@ module WorkOS
|
|
|
9
9
|
enabled: :enabled,
|
|
10
10
|
scopes: :scopes,
|
|
11
11
|
credentials: :credentials,
|
|
12
|
+
api_key: :api_key,
|
|
12
13
|
custom_provider: :custom_provider
|
|
13
14
|
}.freeze
|
|
14
15
|
|
|
@@ -17,6 +18,7 @@ module WorkOS
|
|
|
17
18
|
:enabled,
|
|
18
19
|
:scopes,
|
|
19
20
|
:credentials,
|
|
21
|
+
:api_key,
|
|
20
22
|
:custom_provider
|
|
21
23
|
|
|
22
24
|
def initialize(json)
|
|
@@ -24,7 +26,8 @@ module WorkOS
|
|
|
24
26
|
@description = hash[:description]
|
|
25
27
|
@enabled = hash[:enabled]
|
|
26
28
|
@scopes = hash[:scopes] || []
|
|
27
|
-
@credentials = hash[:credentials] ? WorkOS::
|
|
29
|
+
@credentials = hash[:credentials] ? WorkOS::DataIntegrationCredentialsInput.new(hash[:credentials]) : nil
|
|
30
|
+
@api_key = hash[:api_key] ? WorkOS::ApiKeyInstallation.new(hash[:api_key]) : nil
|
|
28
31
|
@custom_provider = hash[:custom_provider] ? WorkOS::UpdateCustomProviderDefinition.new(hash[:custom_provider]) : nil
|
|
29
32
|
end
|
|
30
33
|
end
|
data/lib/workos/pipes.rb
CHANGED
|
@@ -59,27 +59,33 @@ module WorkOS
|
|
|
59
59
|
# @param description [String, nil] An optional description of the Data Integration.
|
|
60
60
|
# @param enabled [Boolean, nil] Whether the Data Integration is enabled. Defaults to `false`.
|
|
61
61
|
# @param scopes [Array<String>, nil] The OAuth scopes to request for the Data Integration. Defaults to the provider's configured scopes when omitted.
|
|
62
|
-
# @param
|
|
62
|
+
# @param auth_methods [Array<WorkOS::Types::CreateDataIntegrationAuthMethods>, nil] How accounts authenticate with the provider. Defaults to `["oauth"]`. Use `["api_key"]` to declare an API key integration; `credentials` is then not required and keys are supplied per-tenant (optionally via `api_key` on this request).
|
|
63
|
+
# @param credentials [WorkOS::DataIntegrationCredentialsInput, nil] The OAuth credentials to configure for the Data Integration. Required for OAuth integrations; omit when `auth_methods` is `["api_key"]`.
|
|
64
|
+
# @param api_key [WorkOS::ApiKeyInstallation, nil] An optional API key to install for the first tenant on an `api_key` integration. Omit to declare a keyless integration; tenants can be added later via the per-installation API key path.
|
|
63
65
|
# @param custom_provider [WorkOS::CustomProviderDefinition, nil] The OAuth definition for a custom provider. Supply this to define a custom provider; omit it to create an integration for a built-in provider.
|
|
64
66
|
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
65
67
|
# @return [WorkOS::DataIntegration]
|
|
66
68
|
def create_data_integration(
|
|
67
69
|
provider:,
|
|
68
|
-
description:
|
|
70
|
+
description: WorkOS::OMIT,
|
|
69
71
|
enabled: nil,
|
|
70
|
-
scopes:
|
|
72
|
+
scopes: WorkOS::OMIT,
|
|
73
|
+
auth_methods: nil,
|
|
71
74
|
credentials: nil,
|
|
75
|
+
api_key: nil,
|
|
72
76
|
custom_provider: nil,
|
|
73
77
|
request_options: {}
|
|
74
78
|
)
|
|
75
79
|
body = {
|
|
76
80
|
"provider" => provider,
|
|
77
|
-
"description" => description,
|
|
78
81
|
"enabled" => enabled,
|
|
79
|
-
"
|
|
82
|
+
"auth_methods" => auth_methods,
|
|
80
83
|
"credentials" => credentials,
|
|
84
|
+
"api_key" => api_key,
|
|
81
85
|
"custom_provider" => custom_provider
|
|
82
86
|
}.compact
|
|
87
|
+
body["description"] = description unless description.equal?(WorkOS::OMIT)
|
|
88
|
+
body["scopes"] = scopes unless scopes.equal?(WorkOS::OMIT)
|
|
83
89
|
response = @client.request(
|
|
84
90
|
method: :post,
|
|
85
91
|
path: "/data-integrations",
|
|
@@ -116,26 +122,29 @@ module WorkOS
|
|
|
116
122
|
# @param description [String, nil] An optional description of the Data Integration.
|
|
117
123
|
# @param enabled [Boolean, nil] Whether the Data Integration is enabled.
|
|
118
124
|
# @param scopes [Array<String>, nil] The OAuth scopes to request for the Data Integration. Pass `null` to reset to the provider's configured scopes.
|
|
119
|
-
# @param credentials [WorkOS::
|
|
125
|
+
# @param credentials [WorkOS::DataIntegrationCredentialsInput, nil] New OAuth credentials for the Data Integration. When provided, rotates the stored client secret. Mutually exclusive with `api_key`.
|
|
126
|
+
# @param api_key [WorkOS::ApiKeyInstallation, nil] An API key to install or rotate for a tenant on an `api_key` integration. Upserts the tenant installation identified by `user_id` (and optional `organization_id`).
|
|
120
127
|
# @param custom_provider [WorkOS::UpdateCustomProviderDefinition, nil] Updates to a custom provider's OAuth definition. Only valid for custom-provider integrations.
|
|
121
128
|
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
122
129
|
# @return [WorkOS::DataIntegration]
|
|
123
130
|
def update_data_integration(
|
|
124
131
|
slug:,
|
|
125
|
-
description:
|
|
132
|
+
description: WorkOS::OMIT,
|
|
126
133
|
enabled: nil,
|
|
127
|
-
scopes:
|
|
134
|
+
scopes: WorkOS::OMIT,
|
|
128
135
|
credentials: nil,
|
|
136
|
+
api_key: nil,
|
|
129
137
|
custom_provider: nil,
|
|
130
138
|
request_options: {}
|
|
131
139
|
)
|
|
132
140
|
body = {
|
|
133
|
-
"description" => description,
|
|
134
141
|
"enabled" => enabled,
|
|
135
|
-
"scopes" => scopes,
|
|
136
142
|
"credentials" => credentials,
|
|
143
|
+
"api_key" => api_key,
|
|
137
144
|
"custom_provider" => custom_provider
|
|
138
145
|
}.compact
|
|
146
|
+
body["description"] = description unless description.equal?(WorkOS::OMIT)
|
|
147
|
+
body["scopes"] = scopes unless scopes.equal?(WorkOS::OMIT)
|
|
139
148
|
response = @client.request(
|
|
140
149
|
method: :put,
|
|
141
150
|
path: "/data-integrations/#{WorkOS::Util.encode_path(slug)}",
|
|
@@ -264,13 +273,13 @@ module WorkOS
|
|
|
264
273
|
def get_access_token(
|
|
265
274
|
provider:,
|
|
266
275
|
user_id:,
|
|
267
|
-
organization_id:
|
|
276
|
+
organization_id: WorkOS::OMIT,
|
|
268
277
|
request_options: {}
|
|
269
278
|
)
|
|
270
279
|
body = {
|
|
271
|
-
"user_id" => user_id
|
|
272
|
-
|
|
273
|
-
|
|
280
|
+
"user_id" => user_id
|
|
281
|
+
}
|
|
282
|
+
body["organization_id"] = organization_id unless organization_id.equal?(WorkOS::OMIT)
|
|
274
283
|
response = @client.request(
|
|
275
284
|
method: :post,
|
|
276
285
|
path: "/data-integrations/#{WorkOS::Util.encode_path(provider)}/token",
|
|
@@ -317,7 +326,7 @@ module WorkOS
|
|
|
317
326
|
# @param refresh_token [String, nil] The OAuth refresh token for the connected account.
|
|
318
327
|
# @param expires_at [String, nil] The ISO-8601 timestamp when the access token expires. Required when `access_token` is provided for tokens that expire.
|
|
319
328
|
# @param scopes [Array<String>, nil] The OAuth scopes granted for this connection.
|
|
320
|
-
# @param state [WorkOS::Types::
|
|
329
|
+
# @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.
|
|
321
330
|
# @param organization_id [String, nil] An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter if the connection is scoped to an organization.
|
|
322
331
|
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
323
332
|
# @return [WorkOS::ConnectedAccount]
|
|
@@ -362,7 +371,7 @@ module WorkOS
|
|
|
362
371
|
# @param refresh_token [String, nil] The OAuth refresh token for the connected account.
|
|
363
372
|
# @param expires_at [String, nil] The ISO-8601 timestamp when the access token expires. Required when `access_token` is provided for tokens that expire.
|
|
364
373
|
# @param scopes [Array<String>, nil] The OAuth scopes granted for this connection.
|
|
365
|
-
# @param state [WorkOS::Types::
|
|
374
|
+
# @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.
|
|
366
375
|
# @param organization_id [String, nil] An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter if the connection is scoped to an organization.
|
|
367
376
|
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
368
377
|
# @return [WorkOS::ConnectedAccount]
|
|
@@ -42,17 +42,17 @@ module WorkOS
|
|
|
42
42
|
organization_id:,
|
|
43
43
|
slug:,
|
|
44
44
|
enabled: nil,
|
|
45
|
-
scopes:
|
|
45
|
+
scopes: WorkOS::OMIT,
|
|
46
46
|
client_id: nil,
|
|
47
47
|
client_secret: nil,
|
|
48
48
|
request_options: {}
|
|
49
49
|
)
|
|
50
50
|
body = {
|
|
51
51
|
"enabled" => enabled,
|
|
52
|
-
"scopes" => scopes,
|
|
53
52
|
"client_id" => client_id,
|
|
54
53
|
"client_secret" => client_secret
|
|
55
54
|
}.compact
|
|
55
|
+
body["scopes"] = scopes unless scopes.equal?(WorkOS::OMIT)
|
|
56
56
|
response = @client.request(
|
|
57
57
|
method: :put,
|
|
58
58
|
path: "/organizations/#{WorkOS::Util.encode_path(organization_id)}/data_integration_configurations/#{WorkOS::Util.encode_path(slug)}",
|
|
@@ -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 AccessTokenAgentRegistrationCredentialIssuedDataDetail < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
kind: :kind,
|
|
9
|
+
jti: :jti,
|
|
10
|
+
expires_at: :expires_at
|
|
11
|
+
}.freeze
|
|
12
|
+
|
|
13
|
+
attr_accessor \
|
|
14
|
+
:kind,
|
|
15
|
+
:jti,
|
|
16
|
+
:expires_at
|
|
17
|
+
|
|
18
|
+
def initialize(json)
|
|
19
|
+
hash = self.class.normalize(json)
|
|
20
|
+
@kind = hash[:kind]
|
|
21
|
+
@jti = hash[:jti]
|
|
22
|
+
@expires_at = hash[:expires_at]
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
module WorkOS
|
|
6
|
+
class AgentRegistrationClaimAttemptCreated < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
object: :object,
|
|
9
|
+
id: :id,
|
|
10
|
+
event: :event,
|
|
11
|
+
data: :data,
|
|
12
|
+
created_at: :created_at,
|
|
13
|
+
context: :context
|
|
14
|
+
}.freeze
|
|
15
|
+
|
|
16
|
+
attr_accessor \
|
|
17
|
+
:object,
|
|
18
|
+
:id,
|
|
19
|
+
:event,
|
|
20
|
+
:data,
|
|
21
|
+
:created_at,
|
|
22
|
+
:context
|
|
23
|
+
|
|
24
|
+
def initialize(json)
|
|
25
|
+
hash = self.class.normalize(json)
|
|
26
|
+
@object = hash[:object]
|
|
27
|
+
@id = hash[:id]
|
|
28
|
+
@event = hash[:event]
|
|
29
|
+
@data = hash[:data] ? WorkOS::AgentRegistrationClaimAttemptCreatedData.new(hash[:data]) : nil
|
|
30
|
+
@created_at = hash[:created_at]
|
|
31
|
+
@context = hash[:context] ? WorkOS::EventContext.new(hash[:context]) : nil
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
module WorkOS
|
|
6
|
+
class AgentRegistrationClaimAttemptCreatedData < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
object: :object,
|
|
9
|
+
id: :id,
|
|
10
|
+
agent_registration_id: :agent_registration_id,
|
|
11
|
+
agent_registration_claim_id: :agent_registration_claim_id,
|
|
12
|
+
login_hint: :login_hint,
|
|
13
|
+
expires_at: :expires_at,
|
|
14
|
+
created_at: :created_at,
|
|
15
|
+
updated_at: :updated_at
|
|
16
|
+
}.freeze
|
|
17
|
+
|
|
18
|
+
attr_accessor \
|
|
19
|
+
:object,
|
|
20
|
+
:id,
|
|
21
|
+
:agent_registration_id,
|
|
22
|
+
:agent_registration_claim_id,
|
|
23
|
+
:login_hint,
|
|
24
|
+
:expires_at,
|
|
25
|
+
:created_at,
|
|
26
|
+
:updated_at
|
|
27
|
+
|
|
28
|
+
def initialize(json)
|
|
29
|
+
hash = self.class.normalize(json)
|
|
30
|
+
@object = hash[:object]
|
|
31
|
+
@id = hash[:id]
|
|
32
|
+
@agent_registration_id = hash[:agent_registration_id]
|
|
33
|
+
@agent_registration_claim_id = hash[:agent_registration_claim_id]
|
|
34
|
+
@login_hint = hash[:login_hint]
|
|
35
|
+
@expires_at = hash[:expires_at]
|
|
36
|
+
@created_at = hash[:created_at]
|
|
37
|
+
@updated_at = hash[:updated_at]
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
module WorkOS
|
|
6
|
+
class AgentRegistrationClaimCompleted < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
object: :object,
|
|
9
|
+
id: :id,
|
|
10
|
+
event: :event,
|
|
11
|
+
data: :data,
|
|
12
|
+
created_at: :created_at,
|
|
13
|
+
context: :context
|
|
14
|
+
}.freeze
|
|
15
|
+
|
|
16
|
+
attr_accessor \
|
|
17
|
+
:object,
|
|
18
|
+
:id,
|
|
19
|
+
:event,
|
|
20
|
+
:data,
|
|
21
|
+
:created_at,
|
|
22
|
+
:context
|
|
23
|
+
|
|
24
|
+
def initialize(json)
|
|
25
|
+
hash = self.class.normalize(json)
|
|
26
|
+
@object = hash[:object]
|
|
27
|
+
@id = hash[:id]
|
|
28
|
+
@event = hash[:event]
|
|
29
|
+
@data = hash[:data] ? WorkOS::AgentRegistrationClaimCompletedData.new(hash[:data]) : nil
|
|
30
|
+
@created_at = hash[:created_at]
|
|
31
|
+
@context = hash[:context] ? WorkOS::EventContext.new(hash[:context]) : nil
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
module WorkOS
|
|
6
|
+
class AgentRegistrationClaimCompletedData < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
object: :object,
|
|
9
|
+
id: :id,
|
|
10
|
+
agent_registration_id: :agent_registration_id,
|
|
11
|
+
completed_by_attempt_id: :completed_by_attempt_id,
|
|
12
|
+
claimed_by: :claimed_by,
|
|
13
|
+
completed_at: :completed_at,
|
|
14
|
+
created_at: :created_at,
|
|
15
|
+
updated_at: :updated_at
|
|
16
|
+
}.freeze
|
|
17
|
+
|
|
18
|
+
attr_accessor \
|
|
19
|
+
:object,
|
|
20
|
+
:id,
|
|
21
|
+
:agent_registration_id,
|
|
22
|
+
:completed_by_attempt_id,
|
|
23
|
+
:claimed_by,
|
|
24
|
+
:completed_at,
|
|
25
|
+
:created_at,
|
|
26
|
+
:updated_at
|
|
27
|
+
|
|
28
|
+
def initialize(json)
|
|
29
|
+
hash = self.class.normalize(json)
|
|
30
|
+
@object = hash[:object]
|
|
31
|
+
@id = hash[:id]
|
|
32
|
+
@agent_registration_id = hash[:agent_registration_id]
|
|
33
|
+
@completed_by_attempt_id = hash[:completed_by_attempt_id]
|
|
34
|
+
@claimed_by = hash[:claimed_by] ? WorkOS::AgentRegistrationClaimCompletedDataClaimedBy.new(hash[:claimed_by]) : nil
|
|
35
|
+
@completed_at = hash[:completed_at]
|
|
36
|
+
@created_at = hash[:created_at]
|
|
37
|
+
@updated_at = hash[:updated_at]
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
module WorkOS
|
|
6
|
+
class AgentRegistrationClaimCompletedDataClaimedBy < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
user_id: :user_id,
|
|
9
|
+
organization_id: :organization_id
|
|
10
|
+
}.freeze
|
|
11
|
+
|
|
12
|
+
attr_accessor \
|
|
13
|
+
:user_id,
|
|
14
|
+
:organization_id
|
|
15
|
+
|
|
16
|
+
def initialize(json)
|
|
17
|
+
hash = self.class.normalize(json)
|
|
18
|
+
@user_id = hash[:user_id]
|
|
19
|
+
@organization_id = hash[:organization_id]
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
module WorkOS
|
|
6
|
+
class AgentRegistrationCreated < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
object: :object,
|
|
9
|
+
id: :id,
|
|
10
|
+
event: :event,
|
|
11
|
+
data: :data,
|
|
12
|
+
created_at: :created_at,
|
|
13
|
+
context: :context
|
|
14
|
+
}.freeze
|
|
15
|
+
|
|
16
|
+
attr_accessor \
|
|
17
|
+
:object,
|
|
18
|
+
:id,
|
|
19
|
+
:event,
|
|
20
|
+
:data,
|
|
21
|
+
:created_at,
|
|
22
|
+
:context
|
|
23
|
+
|
|
24
|
+
def initialize(json)
|
|
25
|
+
hash = self.class.normalize(json)
|
|
26
|
+
@object = hash[:object]
|
|
27
|
+
@id = hash[:id]
|
|
28
|
+
@event = hash[:event]
|
|
29
|
+
@data = hash[:data] ? WorkOS::AgentRegistrationCreatedData.new(hash[:data]) : nil
|
|
30
|
+
@created_at = hash[:created_at]
|
|
31
|
+
@context = hash[:context] ? WorkOS::EventContext.new(hash[:context]) : nil
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -3,16 +3,15 @@
|
|
|
3
3
|
# This file is auto-generated by oagen. Do not edit.
|
|
4
4
|
|
|
5
5
|
module WorkOS
|
|
6
|
-
class
|
|
6
|
+
class AgentRegistrationCreatedData < WorkOS::Types::BaseModel
|
|
7
7
|
HASH_ATTRS = {
|
|
8
8
|
object: :object,
|
|
9
9
|
id: :id,
|
|
10
|
+
agent_identity: :agent_identity,
|
|
10
11
|
organization_id: :organization_id,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
verification_token: :verification_token,
|
|
15
|
-
verification_strategy: :verification_strategy,
|
|
12
|
+
status: :status,
|
|
13
|
+
kind: :kind,
|
|
14
|
+
method: :method,
|
|
16
15
|
created_at: :created_at,
|
|
17
16
|
updated_at: :updated_at
|
|
18
17
|
}.freeze
|
|
@@ -20,12 +19,11 @@ module WorkOS
|
|
|
20
19
|
attr_accessor \
|
|
21
20
|
:object,
|
|
22
21
|
:id,
|
|
22
|
+
:agent_identity,
|
|
23
23
|
:organization_id,
|
|
24
|
-
:
|
|
25
|
-
:
|
|
26
|
-
:
|
|
27
|
-
:verification_token,
|
|
28
|
-
:verification_strategy,
|
|
24
|
+
:status,
|
|
25
|
+
:kind,
|
|
26
|
+
:method,
|
|
29
27
|
:created_at,
|
|
30
28
|
:updated_at
|
|
31
29
|
|
|
@@ -33,12 +31,11 @@ module WorkOS
|
|
|
33
31
|
hash = self.class.normalize(json)
|
|
34
32
|
@object = hash[:object]
|
|
35
33
|
@id = hash[:id]
|
|
34
|
+
@agent_identity = hash[:agent_identity] ? WorkOS::AgentRegistrationCreatedDataAgentIdentity.new(hash[:agent_identity]) : nil
|
|
36
35
|
@organization_id = hash[:organization_id]
|
|
37
|
-
@
|
|
38
|
-
@
|
|
39
|
-
@
|
|
40
|
-
@verification_token = hash[:verification_token]
|
|
41
|
-
@verification_strategy = hash[:verification_strategy]
|
|
36
|
+
@status = hash[:status]
|
|
37
|
+
@kind = hash[:kind]
|
|
38
|
+
@method = hash[:method]
|
|
42
39
|
@created_at = hash[:created_at]
|
|
43
40
|
@updated_at = hash[:updated_at]
|
|
44
41
|
end
|
|
@@ -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 AgentRegistrationCreatedDataAgentIdentity < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
object: :object,
|
|
9
|
+
id: :id,
|
|
10
|
+
userland_user_id: :userland_user_id
|
|
11
|
+
}.freeze
|
|
12
|
+
|
|
13
|
+
attr_accessor \
|
|
14
|
+
:object,
|
|
15
|
+
:id,
|
|
16
|
+
:userland_user_id
|
|
17
|
+
|
|
18
|
+
def initialize(json)
|
|
19
|
+
hash = self.class.normalize(json)
|
|
20
|
+
@object = hash[:object]
|
|
21
|
+
@id = hash[:id]
|
|
22
|
+
@userland_user_id = hash[:userland_user_id]
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
module WorkOS
|
|
6
|
+
class AgentRegistrationCredentialIssued < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
object: :object,
|
|
9
|
+
id: :id,
|
|
10
|
+
event: :event,
|
|
11
|
+
data: :data,
|
|
12
|
+
created_at: :created_at,
|
|
13
|
+
context: :context
|
|
14
|
+
}.freeze
|
|
15
|
+
|
|
16
|
+
attr_accessor \
|
|
17
|
+
:object,
|
|
18
|
+
:id,
|
|
19
|
+
:event,
|
|
20
|
+
:data,
|
|
21
|
+
:created_at,
|
|
22
|
+
:context
|
|
23
|
+
|
|
24
|
+
def initialize(json)
|
|
25
|
+
hash = self.class.normalize(json)
|
|
26
|
+
@object = hash[:object]
|
|
27
|
+
@id = hash[:id]
|
|
28
|
+
@event = hash[:event]
|
|
29
|
+
@data = hash[:data] ? WorkOS::AgentRegistrationCredentialIssuedData.new(hash[:data]) : nil
|
|
30
|
+
@created_at = hash[:created_at]
|
|
31
|
+
@context = hash[:context] ? WorkOS::EventContext.new(hash[:context]) : nil
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
module WorkOS
|
|
6
|
+
class AgentRegistrationCredentialIssuedData < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
object: :object,
|
|
9
|
+
id: :id,
|
|
10
|
+
agent_registration_id: :agent_registration_id,
|
|
11
|
+
detail: :detail,
|
|
12
|
+
created_at: :created_at,
|
|
13
|
+
updated_at: :updated_at
|
|
14
|
+
}.freeze
|
|
15
|
+
|
|
16
|
+
attr_accessor \
|
|
17
|
+
:object,
|
|
18
|
+
:id,
|
|
19
|
+
:agent_registration_id,
|
|
20
|
+
:detail,
|
|
21
|
+
:created_at,
|
|
22
|
+
:updated_at
|
|
23
|
+
|
|
24
|
+
def initialize(json)
|
|
25
|
+
hash = self.class.normalize(json)
|
|
26
|
+
@object = hash[:object]
|
|
27
|
+
@id = hash[:id]
|
|
28
|
+
@agent_registration_id = hash[:agent_registration_id]
|
|
29
|
+
@detail = hash[:detail] ? (case hash[:detail][:kind] when "api_key" then WorkOS::AgentRegistrationCredentialIssuedDataDetail.new(hash[:detail]) when "access_token" then WorkOS::AccessTokenAgentRegistrationCredentialIssuedDataDetail.new(hash[:detail]) else hash[:detail] end) : nil
|
|
30
|
+
@created_at = hash[:created_at]
|
|
31
|
+
@updated_at = hash[:updated_at]
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
module WorkOS
|
|
6
|
+
class AgentRegistrationCredentialIssuedDataDetail < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
kind: :kind,
|
|
9
|
+
api_key_id: :api_key_id
|
|
10
|
+
}.freeze
|
|
11
|
+
|
|
12
|
+
attr_accessor \
|
|
13
|
+
:kind,
|
|
14
|
+
:api_key_id
|
|
15
|
+
|
|
16
|
+
def initialize(json)
|
|
17
|
+
hash = self.class.normalize(json)
|
|
18
|
+
@kind = hash[:kind]
|
|
19
|
+
@api_key_id = hash[:api_key_id]
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
module WorkOS
|
|
6
|
+
class AgentRegistrationDeleted < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
object: :object,
|
|
9
|
+
id: :id,
|
|
10
|
+
event: :event,
|
|
11
|
+
data: :data,
|
|
12
|
+
created_at: :created_at,
|
|
13
|
+
context: :context
|
|
14
|
+
}.freeze
|
|
15
|
+
|
|
16
|
+
attr_accessor \
|
|
17
|
+
:object,
|
|
18
|
+
:id,
|
|
19
|
+
:event,
|
|
20
|
+
:data,
|
|
21
|
+
:created_at,
|
|
22
|
+
:context
|
|
23
|
+
|
|
24
|
+
def initialize(json)
|
|
25
|
+
hash = self.class.normalize(json)
|
|
26
|
+
@object = hash[:object]
|
|
27
|
+
@id = hash[:id]
|
|
28
|
+
@event = hash[:event]
|
|
29
|
+
@data = hash[:data] ? WorkOS::AgentRegistrationDeletedData.new(hash[:data]) : nil
|
|
30
|
+
@created_at = hash[:created_at]
|
|
31
|
+
@context = hash[:context] ? WorkOS::EventContext.new(hash[:context]) : nil
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|