workos 8.0.1 → 9.1.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 +2 -2
- data/.github/workflows/lint.yml +2 -2
- data/.github/workflows/release-please.yml +199 -4
- data/.github/workflows/release.yml +2 -2
- data/.last-synced-sha +1 -1
- data/.oagen-manifest.json +154 -43
- data/.release-please-manifest.json +1 -1
- data/.ruby-version +1 -1
- data/CHANGELOG.md +92 -0
- data/Gemfile.lock +6 -6
- data/lib/workos/api_keys/api_key.rb +3 -0
- data/lib/workos/api_keys/api_key_created.rb +5 -5
- data/lib/workos/api_keys/api_key_created_data.rb +3 -0
- data/lib/workos/api_keys/api_key_revoked.rb +5 -5
- data/lib/workos/{audit_logs/audit_log_export_json.rb → api_keys/api_key_updated.rb} +10 -10
- data/lib/workos/api_keys/api_key_updated_data.rb +49 -0
- data/lib/workos/{directory_sync/dsync_deactivated_data_domain.rb → api_keys/api_key_updated_data_owner.rb} +1 -1
- data/lib/workos/api_keys/api_key_updated_data_previous_attribute.rb +18 -0
- data/lib/workos/api_keys/create_organization_api_key.rb +5 -2
- data/lib/workos/api_keys/expire_api_key.rb +18 -0
- data/lib/workos/api_keys/organization_api_key.rb +3 -0
- data/lib/workos/api_keys/organization_api_key_with_value.rb +3 -0
- data/lib/workos/api_keys.rb +29 -1
- data/lib/workos/audit_logs/audit_log_action.rb +2 -7
- data/lib/workos/audit_logs/audit_log_export.rb +2 -7
- data/lib/workos/audit_logs/audit_log_schema.rb +11 -2
- data/lib/workos/{types/radar_type.rb → audit_logs/audit_log_schema_actor_input.rb} +1 -3
- data/lib/workos/audit_logs/audit_log_schema_input.rb +25 -0
- data/lib/workos/audit_logs/audit_log_schema_target.rb +16 -1
- data/lib/workos/audit_logs/audit_log_schema_target_input.rb +7 -0
- data/lib/workos/audit_logs.rb +16 -16
- data/lib/workos/authorization/permission_created.rb +5 -5
- data/lib/workos/authorization/permission_deleted.rb +5 -5
- data/lib/workos/authorization/permission_updated.rb +5 -5
- data/lib/workos/authorization/role_created.rb +5 -5
- data/lib/workos/authorization/role_deleted.rb +5 -5
- data/lib/workos/authorization/role_updated.rb +5 -5
- data/lib/workos/authorization.rb +38 -22
- data/lib/workos/base_client.rb +19 -2
- data/lib/workos/client.rb +6 -6
- data/lib/workos/connect/connect_application.rb +12 -0
- data/lib/workos/{audit_logs/audit_log_schema_json_target.rb → connect/connect_application_redirect_uri.rb} +7 -7
- data/lib/workos/connect/user_object.rb +3 -0
- data/lib/workos/connect.rb +1 -1
- data/lib/workos/directory_sync/dsync_activated.rb +5 -5
- data/lib/workos/directory_sync/dsync_deleted.rb +5 -5
- data/lib/workos/directory_sync/dsync_group_created.rb +5 -5
- data/lib/workos/directory_sync/dsync_group_deleted.rb +5 -5
- data/lib/workos/directory_sync/dsync_group_updated.rb +5 -5
- data/lib/workos/directory_sync/dsync_group_user_added.rb +5 -5
- data/lib/workos/directory_sync/dsync_group_user_removed.rb +5 -5
- data/lib/workos/directory_sync/dsync_token_created.rb +34 -0
- data/lib/workos/directory_sync/dsync_token_created_data.rb +34 -0
- data/lib/workos/directory_sync/dsync_token_revoked.rb +34 -0
- data/lib/workos/{audit_logs/audit_log_schema_json_actor.rb → directory_sync/dsync_token_revoked_data.rb} +1 -1
- data/lib/workos/directory_sync/dsync_user_created.rb +5 -5
- data/lib/workos/directory_sync/dsync_user_deleted.rb +5 -5
- data/lib/workos/directory_sync/dsync_user_updated.rb +5 -5
- data/lib/workos/directory_sync.rb +2 -2
- data/lib/workos/events.rb +1 -1
- data/lib/workos/feature_flags/flag_created.rb +5 -5
- data/lib/workos/feature_flags/flag_deleted.rb +5 -5
- data/lib/workos/feature_flags/flag_rule_updated.rb +5 -5
- data/lib/workos/feature_flags/flag_rule_updated_context_configured_target_organization.rb +1 -16
- data/lib/workos/feature_flags/flag_rule_updated_context_previous_attribute_context_configured_target_organization.rb +1 -1
- data/lib/workos/feature_flags/flag_updated.rb +5 -5
- data/lib/workos/groups.rb +2 -2
- data/lib/workos/inflections.rb +3 -1
- data/lib/workos/organization_domains/organization_domain_created.rb +5 -5
- data/lib/workos/organization_domains/organization_domain_deleted.rb +5 -5
- data/lib/workos/organization_domains/organization_domain_updated.rb +5 -5
- data/lib/workos/organization_domains/organization_domain_verification_failed.rb +5 -5
- data/lib/workos/organization_domains/organization_domain_verified.rb +5 -5
- data/lib/workos/organization_membership_service.rb +273 -0
- data/lib/workos/organizations/audit_logs_retention.rb +2 -7
- data/lib/workos/organizations/organization_created.rb +5 -5
- data/lib/workos/organizations/organization_deleted.rb +5 -5
- data/lib/workos/organizations/organization_membership_created.rb +5 -5
- data/lib/workos/organizations/organization_membership_deleted.rb +5 -5
- data/lib/workos/organizations/organization_membership_updated.rb +5 -5
- data/lib/workos/organizations/organization_role_created.rb +5 -5
- data/lib/workos/organizations/organization_role_deleted.rb +5 -5
- data/lib/workos/organizations/organization_role_updated.rb +5 -5
- data/lib/workos/organizations/organization_updated.rb +5 -5
- data/lib/workos/organizations.rb +1 -1
- data/lib/workos/radar/radar_standalone_assess_request.rb +2 -8
- data/lib/workos/radar.rb +6 -12
- data/lib/workos/shared/connect_application_m2m.rb +46 -0
- data/lib/workos/shared/connect_application_oauth.rb +58 -0
- data/lib/workos/shared/connect_application_oauth_redirect_uris.rb +22 -0
- data/lib/workos/shared/error_response.rb +18 -0
- data/lib/workos/shared/group_created.rb +5 -5
- data/lib/workos/shared/group_deleted.rb +5 -5
- data/lib/workos/shared/group_member_added.rb +5 -5
- data/lib/workos/shared/group_member_removed.rb +5 -5
- data/lib/workos/shared/group_updated.rb +5 -5
- data/lib/workos/{directory_sync/dsync_deactivated_data.rb → shared/pipe_connected_account.rb} +15 -15
- data/lib/workos/{directory_sync/dsync_deactivated.rb → shared/pipes_connected_account_connected.rb} +7 -7
- data/lib/workos/shared/pipes_connected_account_disconnected.rb +34 -0
- data/lib/workos/shared/pipes_connected_account_reauthorization_needed.rb +34 -0
- data/lib/workos/shared/waitlist_user_approved.rb +5 -5
- data/lib/workos/shared/waitlist_user_created.rb +5 -5
- data/lib/workos/shared/waitlist_user_denied.rb +5 -5
- data/lib/workos/sso/connection_activated.rb +5 -5
- data/lib/workos/sso/connection_deactivated.rb +5 -5
- data/lib/workos/sso/connection_deleted.rb +5 -5
- data/lib/workos/sso/connection_saml_certificate_renewal_required.rb +5 -5
- data/lib/workos/sso/connection_saml_certificate_renewed.rb +5 -5
- data/lib/workos/types/audit_log_configuration_log_stream_type.rb +2 -1
- data/lib/workos/types/create_webhook_endpoint_events.rb +5 -1
- data/lib/workos/types/pipe_connected_account_state.rb +13 -0
- data/lib/workos/types/{radar_action.rb → radar_list_action.rb} +1 -1
- data/lib/workos/types/radar_list_type.rb +18 -0
- data/lib/workos/types/radar_standalone_assess_request_action.rb +1 -7
- data/lib/workos/types/radar_standalone_response_blocklist_type.rb +1 -10
- data/lib/workos/types/radar_standalone_response_control.rb +1 -4
- data/lib/workos/types/user_management_authentication_screen_hint.rb +1 -5
- data/{rbi/workos/types/request_options.rbi → lib/workos/types/vault_order.rb} +4 -3
- data/lib/workos/types/webhook_endpoint_status.rb +1 -5
- data/lib/workos/user_management/action_authentication_denied.rb +6 -6
- data/lib/workos/user_management/action_user_registration_denied.rb +6 -6
- data/lib/workos/user_management/authentication_email_verification_failed.rb +5 -5
- data/lib/workos/user_management/authentication_email_verification_succeeded.rb +5 -5
- data/lib/workos/user_management/authentication_magic_auth_failed.rb +5 -5
- data/lib/workos/user_management/authentication_magic_auth_succeeded.rb +5 -5
- data/lib/workos/user_management/authentication_mfa_failed.rb +5 -5
- data/lib/workos/user_management/authentication_mfa_succeeded.rb +5 -5
- data/lib/workos/user_management/authentication_oauth_failed.rb +5 -5
- data/lib/workos/user_management/authentication_oauth_succeeded.rb +5 -5
- data/lib/workos/user_management/authentication_passkey_failed.rb +5 -5
- data/lib/workos/user_management/authentication_passkey_succeeded.rb +5 -5
- data/lib/workos/user_management/authentication_password_failed.rb +5 -5
- data/lib/workos/user_management/authentication_password_succeeded.rb +5 -5
- data/lib/workos/user_management/authentication_radar_risk_detected.rb +5 -5
- data/lib/workos/user_management/authentication_sso_failed.rb +5 -5
- data/lib/workos/user_management/authentication_sso_started.rb +5 -5
- data/lib/workos/user_management/authentication_sso_succeeded.rb +5 -5
- data/lib/workos/user_management/authentication_sso_timed_out.rb +5 -5
- data/lib/workos/user_management/create_user.rb +3 -0
- data/lib/workos/user_management/create_user_api_key.rb +5 -2
- data/lib/workos/user_management/email_change_confirmation_user.rb +3 -0
- data/lib/workos/user_management/email_verification_created.rb +5 -5
- data/lib/workos/user_management/invitation_accepted.rb +5 -5
- data/lib/workos/user_management/invitation_created.rb +5 -5
- data/lib/workos/user_management/invitation_resent.rb +5 -5
- data/lib/workos/user_management/invitation_revoked.rb +5 -5
- data/lib/workos/user_management/magic_auth_created.rb +5 -5
- data/lib/workos/user_management/password_reset_created.rb +5 -5
- data/lib/workos/user_management/password_reset_succeeded.rb +5 -5
- data/lib/workos/user_management/revoke_session.rb +2 -6
- data/lib/workos/user_management/session_created.rb +5 -5
- data/lib/workos/user_management/session_revoked.rb +5 -5
- data/lib/workos/user_management/update_user.rb +3 -0
- data/lib/workos/user_management/user_api_key.rb +3 -0
- data/lib/workos/user_management/user_api_key_updated_data_owner.rb +7 -0
- data/lib/workos/user_management/user_api_key_with_value.rb +3 -0
- data/lib/workos/user_management/user_created.rb +5 -5
- data/lib/workos/user_management/user_deleted.rb +5 -5
- data/lib/workos/user_management/user_updated.rb +5 -5
- data/lib/workos/user_management.rb +16 -223
- data/lib/workos/vault/actor.rb +22 -0
- data/lib/workos/vault/create_data_key_request.rb +18 -0
- data/lib/workos/vault/create_data_key_response.rb +28 -0
- data/lib/workos/vault/create_object_request.rb +25 -0
- data/lib/workos/vault/decrypt_request.rb +18 -0
- data/lib/workos/vault/decrypt_response.rb +22 -0
- data/lib/workos/vault/delete_object_response.rb +22 -0
- data/lib/workos/vault/object_metadata.rb +37 -0
- data/lib/workos/{audit_logs/audit_log_action_json.rb → vault/object_summary.rb} +4 -10
- data/lib/workos/vault/object_version.rb +31 -0
- data/lib/workos/vault/object_without_value.rb +25 -0
- data/lib/workos/vault/rekey_request.rb +22 -0
- data/lib/workos/vault/update_object_request.rb +22 -0
- data/lib/workos/vault/vault_byok_key_deleted.rb +5 -5
- data/lib/workos/vault/vault_byok_key_verification_completed.rb +5 -5
- data/lib/workos/vault/vault_data_created.rb +5 -5
- data/lib/workos/vault/vault_data_deleted.rb +5 -5
- data/lib/workos/vault/vault_data_read.rb +5 -5
- data/lib/workos/vault/vault_data_updated.rb +5 -5
- data/lib/workos/vault/vault_dek_decrypted.rb +5 -5
- data/lib/workos/vault/vault_dek_read.rb +5 -5
- data/lib/workos/vault/vault_kek_created.rb +5 -5
- data/lib/workos/vault/vault_metadata_read.rb +5 -5
- data/lib/workos/vault/vault_names_listed.rb +5 -5
- data/lib/workos/vault/vault_object.rb +28 -0
- data/lib/workos/vault/version_list_response.rb +22 -0
- data/lib/workos/vault.rb +273 -139
- data/lib/workos/version.rb +1 -1
- data/lib/workos/webhooks/webhook_endpoint.rb +2 -7
- data/lib/workos/webhooks.rb +8 -9
- data/lib/workos.rb +1 -0
- data/rbi/workos/action_authentication_denied.rbi +10 -10
- data/rbi/workos/action_user_registration_denied.rbi +10 -10
- data/rbi/workos/actor.rbi +30 -0
- data/rbi/workos/api_key.rbi +6 -0
- data/rbi/workos/api_key_created.rbi +6 -6
- data/rbi/workos/api_key_created_data.rbi +6 -0
- data/rbi/workos/api_key_revoked.rbi +6 -6
- data/rbi/workos/api_key_revoked_data.rbi +6 -0
- data/rbi/workos/{dsync_deactivated.rbi → api_key_updated.rbi} +9 -9
- data/rbi/workos/api_key_updated_data.rbi +84 -0
- data/rbi/workos/api_key_updated_data_owner.rbi +30 -0
- data/rbi/workos/{audit_logs_retention_json.rbi → api_key_updated_data_previous_attribute.rbi} +5 -5
- data/rbi/workos/api_keys.rbi +11 -1
- data/rbi/workos/audit_log_action.rbi +1 -0
- data/rbi/workos/audit_log_export.rbi +1 -0
- data/rbi/workos/audit_log_schema.rbi +18 -0
- data/rbi/workos/{audit_log_schema_json_actor.rbi → audit_log_schema_actor_input.rbi} +1 -1
- data/rbi/workos/audit_log_schema_input.rbi +36 -0
- data/rbi/workos/{audit_log_schema_json_target.rbi → audit_log_schema_target_input.rbi} +1 -1
- data/rbi/workos/audit_logs.rbi +9 -9
- data/rbi/workos/audit_logs_retention.rbi +1 -0
- data/rbi/workos/authentication_email_verification_failed.rbi +6 -6
- data/rbi/workos/authentication_email_verification_succeeded.rbi +6 -6
- data/rbi/workos/authentication_magic_auth_failed.rbi +6 -6
- data/rbi/workos/authentication_magic_auth_succeeded.rbi +6 -6
- data/rbi/workos/authentication_mfa_failed.rbi +6 -6
- data/rbi/workos/authentication_mfa_succeeded.rbi +6 -6
- data/rbi/workos/authentication_oauth_failed.rbi +6 -6
- data/rbi/workos/authentication_oauth_succeeded.rbi +6 -6
- data/rbi/workos/authentication_passkey_failed.rbi +6 -6
- data/rbi/workos/authentication_passkey_succeeded.rbi +6 -6
- data/rbi/workos/authentication_password_failed.rbi +6 -6
- data/rbi/workos/authentication_password_succeeded.rbi +6 -6
- data/rbi/workos/authentication_radar_risk_detected.rbi +6 -6
- data/rbi/workos/authentication_sso_failed.rbi +6 -6
- data/rbi/workos/authentication_sso_started.rbi +6 -6
- data/rbi/workos/authentication_sso_succeeded.rbi +6 -6
- data/rbi/workos/authentication_sso_timed_out.rbi +6 -6
- data/rbi/workos/authorization.rbi +9 -5
- data/rbi/workos/client.rbi +6 -3
- data/rbi/workos/connect_application.rbi +0 -12
- data/rbi/workos/{dsync_deactivated_data.rbi → connect_application_m2m.rbi} +19 -19
- data/rbi/workos/connect_application_oauth.rbi +102 -0
- data/rbi/workos/connect_application_oauth_redirect_uris.rbi +30 -0
- data/rbi/workos/connection_activated.rbi +6 -6
- data/rbi/workos/connection_deactivated.rbi +6 -6
- data/rbi/workos/connection_deleted.rbi +6 -6
- data/rbi/workos/connection_saml_certificate_renewal_required.rbi +6 -6
- data/rbi/workos/connection_saml_certificate_renewed.rbi +6 -6
- data/rbi/workos/create_data_key_request.rbi +24 -0
- data/rbi/workos/create_data_key_response.rbi +42 -0
- data/rbi/workos/create_object_request.rbi +36 -0
- data/rbi/workos/create_organization_api_key.rbi +6 -0
- data/rbi/workos/create_user.rbi +6 -0
- data/rbi/workos/create_user_api_key.rbi +6 -0
- data/rbi/workos/decrypt_request.rbi +24 -0
- data/rbi/workos/decrypt_response.rbi +30 -0
- data/rbi/workos/delete_object_response.rbi +30 -0
- data/rbi/workos/dsync_activated.rbi +6 -6
- data/rbi/workos/dsync_deleted.rbi +6 -6
- data/rbi/workos/dsync_group_created.rbi +6 -6
- data/rbi/workos/dsync_group_deleted.rbi +6 -6
- data/rbi/workos/dsync_group_updated.rbi +6 -6
- data/rbi/workos/dsync_group_user_added.rbi +6 -6
- data/rbi/workos/dsync_group_user_removed.rbi +6 -6
- data/rbi/workos/dsync_token_created.rbi +54 -0
- data/rbi/workos/{audit_log_export_json.rbi → dsync_token_created_data.rbi} +9 -9
- data/rbi/workos/dsync_token_revoked.rbi +54 -0
- data/rbi/workos/{audit_log_action_json.rbi → dsync_token_revoked_data.rbi} +17 -11
- data/rbi/workos/dsync_user_created.rbi +6 -6
- data/rbi/workos/dsync_user_deleted.rbi +6 -6
- data/rbi/workos/dsync_user_updated.rbi +6 -6
- data/rbi/workos/email_change_confirmation_user.rbi +6 -0
- data/rbi/workos/email_verification_created.rbi +6 -6
- data/rbi/workos/error_response.rbi +24 -0
- data/rbi/workos/expire_api_key.rbi +24 -0
- data/rbi/workos/flag_created.rbi +6 -6
- data/rbi/workos/flag_deleted.rbi +6 -6
- data/rbi/workos/flag_rule_updated.rbi +6 -6
- data/rbi/workos/flag_updated.rbi +6 -6
- data/rbi/workos/group_created.rbi +6 -6
- data/rbi/workos/group_deleted.rbi +6 -6
- data/rbi/workos/group_member_added.rbi +6 -6
- data/rbi/workos/group_member_removed.rbi +6 -6
- data/rbi/workos/group_updated.rbi +6 -6
- data/rbi/workos/invitation_accepted.rbi +6 -6
- data/rbi/workos/invitation_created.rbi +6 -6
- data/rbi/workos/invitation_resent.rbi +6 -6
- data/rbi/workos/invitation_revoked.rbi +6 -6
- data/rbi/workos/magic_auth_created.rbi +6 -6
- data/rbi/workos/object_metadata.rbi +60 -0
- data/rbi/workos/object_summary.rbi +36 -0
- data/rbi/workos/object_version.rbi +48 -0
- data/rbi/workos/object_without_value.rbi +36 -0
- data/rbi/workos/organization_api_key.rbi +6 -0
- data/rbi/workos/organization_api_key_with_value.rbi +6 -0
- data/rbi/workos/organization_created.rbi +6 -6
- data/rbi/workos/organization_deleted.rbi +6 -6
- data/rbi/workos/organization_domain_created.rbi +6 -6
- data/rbi/workos/organization_domain_deleted.rbi +6 -6
- data/rbi/workos/organization_domain_updated.rbi +6 -6
- data/rbi/workos/organization_domain_verification_failed.rbi +6 -6
- data/rbi/workos/organization_domain_verified.rbi +6 -6
- data/rbi/workos/organization_membership_created.rbi +6 -6
- data/rbi/workos/organization_membership_deleted.rbi +6 -6
- data/rbi/workos/organization_membership_service.rbi +114 -0
- data/rbi/workos/organization_membership_updated.rbi +6 -6
- data/rbi/workos/organization_role_created.rbi +6 -6
- data/rbi/workos/organization_role_deleted.rbi +6 -6
- data/rbi/workos/organization_role_updated.rbi +6 -6
- data/rbi/workos/organization_updated.rbi +6 -6
- data/rbi/workos/password_reset_created.rbi +6 -6
- data/rbi/workos/password_reset_succeeded.rbi +6 -6
- data/rbi/workos/permission_created.rbi +6 -6
- data/rbi/workos/permission_deleted.rbi +6 -6
- data/rbi/workos/permission_updated.rbi +6 -6
- data/rbi/workos/{webhook_endpoint_json.rbi → pipe_connected_account.rbi} +23 -11
- data/rbi/workos/pipes_connected_account_connected.rbi +54 -0
- data/rbi/workos/pipes_connected_account_disconnected.rbi +54 -0
- data/rbi/workos/pipes_connected_account_reauthorization_needed.rbi +54 -0
- data/rbi/workos/radar.rbi +1 -3
- data/rbi/workos/radar_standalone_assess_request.rbi +0 -12
- data/rbi/workos/rekey_request.rbi +30 -0
- data/rbi/workos/revoke_session.rbi +0 -6
- data/rbi/workos/role_created.rbi +6 -6
- data/rbi/workos/role_deleted.rbi +6 -6
- data/rbi/workos/role_updated.rbi +6 -6
- data/rbi/workos/session_created.rbi +6 -6
- data/rbi/workos/session_manager.rbi +1 -1
- data/rbi/workos/session_revoked.rbi +6 -6
- data/rbi/workos/update_object_request.rbi +30 -0
- data/rbi/workos/update_user.rbi +6 -0
- data/rbi/workos/user.rbi +6 -0
- data/rbi/workos/user_api_key.rbi +6 -0
- data/rbi/workos/{dsync_deactivated_data_domain.rbi → user_api_key_updated_data_owner.rbi} +5 -5
- data/rbi/workos/user_api_key_with_value.rbi +6 -0
- data/rbi/workos/user_created.rbi +6 -6
- data/rbi/workos/user_deleted.rbi +6 -6
- data/rbi/workos/user_management.rbi +7 -94
- data/rbi/workos/user_object.rbi +6 -0
- data/rbi/workos/user_updated.rbi +6 -6
- data/rbi/workos/vault.rbi +70 -95
- data/rbi/workos/vault_byok_key_deleted.rbi +6 -6
- data/rbi/workos/vault_byok_key_verification_completed.rbi +6 -6
- data/rbi/workos/vault_data_created.rbi +6 -6
- data/rbi/workos/vault_data_deleted.rbi +6 -6
- data/rbi/workos/vault_data_read.rbi +6 -6
- data/rbi/workos/vault_data_updated.rbi +6 -6
- data/rbi/workos/vault_dek_decrypted.rbi +6 -6
- data/rbi/workos/vault_dek_read.rbi +6 -6
- data/rbi/workos/vault_kek_created.rbi +6 -6
- data/rbi/workos/vault_metadata_read.rbi +6 -6
- data/rbi/workos/vault_names_listed.rbi +6 -6
- data/rbi/workos/vault_object.rbi +42 -0
- data/rbi/workos/waitlist_user_approved.rbi +6 -6
- data/rbi/workos/waitlist_user_created.rbi +6 -6
- data/rbi/workos/waitlist_user_denied.rbi +6 -6
- data/rbi/workos/webhook_endpoint.rbi +1 -0
- data/rbi/workos/webhooks.rbi +2 -2
- data/renovate.json +1 -61
- data/test/workos/test_api_keys.rb +9 -1
- data/test/workos/test_base_client.rb +64 -0
- data/test/workos/test_model_round_trip.rb +740 -261
- data/test/workos/test_organization_membership_service.rb +107 -0
- data/test/workos/test_user_management.rb +0 -74
- data/test/workos/test_vault.rb +91 -88
- metadata +87 -54
- data/lib/workos/audit_logs/audit_log_schema_json.rb +0 -34
- data/lib/workos/organizations/audit_logs_retention_json.rb +0 -18
- data/lib/workos/types/audit_log_export_json_state.rb +0 -14
- data/lib/workos/types/dsync_deactivated_data_state.rb +0 -9
- data/lib/workos/types/dsync_deactivated_data_type.rb +0 -9
- data/lib/workos/types/webhook_endpoint_json_status.rb +0 -9
- data/lib/workos/user_management_organization_membership_groups.rb +0 -60
- data/lib/workos/webhooks/webhook_endpoint_json.rb +0 -40
- data/rbi/workos/actions.rbi +0 -48
- data/rbi/workos/audit_log_schema_json.rbi +0 -54
- data/rbi/workos/base_client.rbi +0 -132
- data/rbi/workos/configuration.rbi +0 -68
- data/rbi/workos/encryptors/aes_gcm.rbi +0 -19
- data/rbi/workos/errors.rbi +0 -43
- data/rbi/workos/hash_provider.rbi +0 -18
- data/rbi/workos/passwordless.rbi +0 -47
- data/rbi/workos/public_client.rbi +0 -12
- data/rbi/workos/session.rbi +0 -43
- data/rbi/workos/types/api_response.rbi +0 -29
- data/rbi/workos/types/base_model.rbi +0 -22
- data/rbi/workos/types/list_struct.rbi +0 -89
- data/rbi/workos/user_management_organization_membership_groups.rbi +0 -25
- data/rbi/workos/util.rbi +0 -12
- data/test/workos/test_user_management_organization_membership_groups.rb +0 -33
- /data/lib/workos/{authorization → groups}/user_organization_membership_base_list_data.rb +0 -0
- /data/lib/workos/{user_management → organization_membership}/create_user_organization_membership.rb +0 -0
- /data/lib/workos/{user_management → organization_membership}/organization_membership.rb +0 -0
- /data/lib/workos/{user_management → organization_membership}/update_user_organization_membership.rb +0 -0
- /data/lib/workos/{user_management → organization_membership}/user_organization_membership.rb +0 -0
|
@@ -20,18 +20,6 @@ module WorkOS
|
|
|
20
20
|
# @return [WorkOS::Types::CreateUserPasswordHashType]
|
|
21
21
|
PasswordHashed = Data.define(:password_hash, :password_hash_type)
|
|
22
22
|
|
|
23
|
-
# Identifies the role (single variant).
|
|
24
|
-
#
|
|
25
|
-
# @!attribute [r] role_slug
|
|
26
|
-
# @return [String]
|
|
27
|
-
RoleSingle = Data.define(:role_slug)
|
|
28
|
-
|
|
29
|
-
# Identifies the role (multiple variant).
|
|
30
|
-
#
|
|
31
|
-
# @!attribute [r] role_slugs
|
|
32
|
-
# @return [Array<String>]
|
|
33
|
-
RoleMultiple = Data.define(:role_slugs)
|
|
34
|
-
|
|
35
23
|
def initialize(client)
|
|
36
24
|
@client = client
|
|
37
25
|
end
|
|
@@ -444,18 +432,15 @@ module WorkOS
|
|
|
444
432
|
|
|
445
433
|
# Revoke Session
|
|
446
434
|
# @param session_id [String] The ID of the session to revoke. This can be extracted from the `sid` claim of the access token.
|
|
447
|
-
# @param return_to [String, nil] The URL to redirect the user to after session revocation.
|
|
448
435
|
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
449
436
|
# @return [void]
|
|
450
437
|
def revoke_session(
|
|
451
438
|
session_id:,
|
|
452
|
-
return_to: nil,
|
|
453
439
|
request_options: {}
|
|
454
440
|
)
|
|
455
441
|
body = {
|
|
456
|
-
"session_id" => session_id
|
|
457
|
-
|
|
458
|
-
}.compact
|
|
442
|
+
"session_id" => session_id
|
|
443
|
+
}
|
|
459
444
|
@client.request(
|
|
460
445
|
method: :post,
|
|
461
446
|
path: "/user_management/sessions/revoke",
|
|
@@ -580,7 +565,7 @@ module WorkOS
|
|
|
580
565
|
# @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"`.
|
|
581
566
|
# @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"`.
|
|
582
567
|
# @param limit [Integer, nil] Upper limit on the number of objects to return, between `1` and `100`.
|
|
583
|
-
# @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).
|
|
568
|
+
# @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).
|
|
584
569
|
# @param organization [String, nil] (deprecated) Filter users by the organization they are a member of. Deprecated in favor of `organization_id`.
|
|
585
570
|
# @param organization_id [String, nil] Filter users by the organization they are a member of.
|
|
586
571
|
# @param email [String, nil] Filter users by their email address.
|
|
@@ -636,6 +621,7 @@ module WorkOS
|
|
|
636
621
|
# @param email [String] The email address of the user.
|
|
637
622
|
# @param first_name [String, nil] The first name of the user.
|
|
638
623
|
# @param last_name [String, nil] The last name of the user.
|
|
624
|
+
# @param name [String, nil] The user's full name.
|
|
639
625
|
# @param email_verified [Boolean, nil] Whether the user's email has been verified.
|
|
640
626
|
# @param metadata [Hash{String => String}, nil] Object containing metadata key/value pairs associated with the user.
|
|
641
627
|
# @param external_id [String, nil] The external ID of the user.
|
|
@@ -646,6 +632,7 @@ module WorkOS
|
|
|
646
632
|
email:,
|
|
647
633
|
first_name: nil,
|
|
648
634
|
last_name: nil,
|
|
635
|
+
name: nil,
|
|
649
636
|
email_verified: nil,
|
|
650
637
|
metadata: nil,
|
|
651
638
|
external_id: nil,
|
|
@@ -656,6 +643,7 @@ module WorkOS
|
|
|
656
643
|
"email" => email,
|
|
657
644
|
"first_name" => first_name,
|
|
658
645
|
"last_name" => last_name,
|
|
646
|
+
"name" => name,
|
|
659
647
|
"email_verified" => email_verified,
|
|
660
648
|
"metadata" => metadata,
|
|
661
649
|
"external_id" => external_id
|
|
@@ -726,6 +714,7 @@ module WorkOS
|
|
|
726
714
|
# @param email [String, nil] The email address of the user.
|
|
727
715
|
# @param first_name [String, nil] The first name of the user.
|
|
728
716
|
# @param last_name [String, nil] The last name of the user.
|
|
717
|
+
# @param name [String, nil] The user's full name.
|
|
729
718
|
# @param email_verified [Boolean, nil] Whether the user's email has been verified.
|
|
730
719
|
# @param metadata [Hash{String => String}, nil] Object containing metadata key/value pairs associated with the user.
|
|
731
720
|
# @param external_id [String, nil] The external ID of the user.
|
|
@@ -738,6 +727,7 @@ module WorkOS
|
|
|
738
727
|
email: nil,
|
|
739
728
|
first_name: nil,
|
|
740
729
|
last_name: nil,
|
|
730
|
+
name: nil,
|
|
741
731
|
email_verified: nil,
|
|
742
732
|
metadata: nil,
|
|
743
733
|
external_id: nil,
|
|
@@ -749,6 +739,7 @@ module WorkOS
|
|
|
749
739
|
"email" => email,
|
|
750
740
|
"first_name" => first_name,
|
|
751
741
|
"last_name" => last_name,
|
|
742
|
+
"name" => name,
|
|
752
743
|
"email_verified" => email_verified,
|
|
753
744
|
"metadata" => metadata,
|
|
754
745
|
"external_id" => external_id,
|
|
@@ -911,7 +902,7 @@ module WorkOS
|
|
|
911
902
|
# @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"`.
|
|
912
903
|
# @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"`.
|
|
913
904
|
# @param limit [Integer, nil] Upper limit on the number of objects to return, between `1` and `100`.
|
|
914
|
-
# @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).
|
|
905
|
+
# @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).
|
|
915
906
|
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
916
907
|
# @return [WorkOS::Types::ListStruct<WorkOS::UserSessionsListItem>]
|
|
917
908
|
def list_sessions(
|
|
@@ -957,7 +948,7 @@ module WorkOS
|
|
|
957
948
|
# @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"`.
|
|
958
949
|
# @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"`.
|
|
959
950
|
# @param limit [Integer, nil] Upper limit on the number of objects to return, between `1` and `100`.
|
|
960
|
-
# @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).
|
|
951
|
+
# @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).
|
|
961
952
|
# @param organization_id [String, nil] The ID of the [organization](https://workos.com/docs/reference/organization) that the recipient will join.
|
|
962
953
|
# @param email [String, nil] The email address of the recipient.
|
|
963
954
|
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
@@ -1227,207 +1218,6 @@ module WorkOS
|
|
|
1227
1218
|
result
|
|
1228
1219
|
end
|
|
1229
1220
|
|
|
1230
|
-
# List organization memberships
|
|
1231
|
-
# @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"`.
|
|
1232
|
-
# @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"`.
|
|
1233
|
-
# @param limit [Integer, nil] Upper limit on the number of objects to return, between `1` and `100`.
|
|
1234
|
-
# @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). Defaults to descending.
|
|
1235
|
-
# @param organization_id [String, nil] The ID of the [organization](https://workos.com/docs/reference/organization) which the user belongs to.
|
|
1236
|
-
# @param statuses [Array<WorkOS::Types::UserManagementOrganizationMembershipStatuses>, nil] Filter by the status of the organization membership. Array including any of `active`, `inactive`, or `pending`.
|
|
1237
|
-
# @param user_id [String, nil] The ID of the [user](https://workos.com/docs/reference/authkit/user).
|
|
1238
|
-
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
1239
|
-
# @return [WorkOS::Types::ListStruct<WorkOS::UserOrganizationMembership>]
|
|
1240
|
-
def list_organization_memberships(
|
|
1241
|
-
before: nil,
|
|
1242
|
-
after: nil,
|
|
1243
|
-
limit: 10,
|
|
1244
|
-
order: "desc",
|
|
1245
|
-
organization_id: nil,
|
|
1246
|
-
statuses: nil,
|
|
1247
|
-
user_id: nil,
|
|
1248
|
-
request_options: {}
|
|
1249
|
-
)
|
|
1250
|
-
params = {
|
|
1251
|
-
"before" => before,
|
|
1252
|
-
"after" => after,
|
|
1253
|
-
"limit" => limit,
|
|
1254
|
-
"order" => order,
|
|
1255
|
-
"organization_id" => organization_id,
|
|
1256
|
-
"statuses" => statuses,
|
|
1257
|
-
"user_id" => user_id
|
|
1258
|
-
}.compact
|
|
1259
|
-
response = @client.request(
|
|
1260
|
-
method: :get,
|
|
1261
|
-
path: "/user_management/organization_memberships",
|
|
1262
|
-
auth: true,
|
|
1263
|
-
params: params,
|
|
1264
|
-
request_options: request_options
|
|
1265
|
-
)
|
|
1266
|
-
fetch_next = ->(cursor) {
|
|
1267
|
-
list_organization_memberships(
|
|
1268
|
-
before: before,
|
|
1269
|
-
after: cursor,
|
|
1270
|
-
limit: limit,
|
|
1271
|
-
order: order,
|
|
1272
|
-
organization_id: organization_id,
|
|
1273
|
-
statuses: statuses,
|
|
1274
|
-
user_id: user_id,
|
|
1275
|
-
request_options: request_options
|
|
1276
|
-
)
|
|
1277
|
-
}
|
|
1278
|
-
WorkOS::Types::ListStruct.from_response(
|
|
1279
|
-
response,
|
|
1280
|
-
model: WorkOS::UserOrganizationMembership,
|
|
1281
|
-
filters: {before: before, limit: limit, order: order, organization_id: organization_id, statuses: statuses, user_id: user_id},
|
|
1282
|
-
fetch_next: fetch_next
|
|
1283
|
-
)
|
|
1284
|
-
end
|
|
1285
|
-
|
|
1286
|
-
# Create an organization membership
|
|
1287
|
-
# @param user_id [String] The ID of the [user](https://workos.com/docs/reference/authkit/user).
|
|
1288
|
-
# @param organization_id [String] The ID of the [organization](https://workos.com/docs/reference/organization) which the user belongs to.
|
|
1289
|
-
# @param role [WorkOS::UserManagement::RoleSingle, WorkOS::UserManagement::RoleMultiple, nil] Identifies the role.
|
|
1290
|
-
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
1291
|
-
# @return [WorkOS::OrganizationMembership]
|
|
1292
|
-
def create_organization_membership(
|
|
1293
|
-
user_id:,
|
|
1294
|
-
organization_id:,
|
|
1295
|
-
role: nil,
|
|
1296
|
-
request_options: {}
|
|
1297
|
-
)
|
|
1298
|
-
body = {
|
|
1299
|
-
"user_id" => user_id,
|
|
1300
|
-
"organization_id" => organization_id
|
|
1301
|
-
}
|
|
1302
|
-
if role
|
|
1303
|
-
case role
|
|
1304
|
-
when WorkOS::UserManagement::RoleSingle
|
|
1305
|
-
body["role_slug"] = role.role_slug
|
|
1306
|
-
when WorkOS::UserManagement::RoleMultiple
|
|
1307
|
-
body["role_slugs"] = role.role_slugs
|
|
1308
|
-
else
|
|
1309
|
-
raise ArgumentError, "expected role to be one of: WorkOS::UserManagement::RoleSingle, WorkOS::UserManagement::RoleMultiple, got #{role.class}"
|
|
1310
|
-
end
|
|
1311
|
-
end
|
|
1312
|
-
response = @client.request(
|
|
1313
|
-
method: :post,
|
|
1314
|
-
path: "/user_management/organization_memberships",
|
|
1315
|
-
auth: true,
|
|
1316
|
-
body: body,
|
|
1317
|
-
request_options: request_options
|
|
1318
|
-
)
|
|
1319
|
-
result = WorkOS::OrganizationMembership.new(response.body)
|
|
1320
|
-
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"])
|
|
1321
|
-
result
|
|
1322
|
-
end
|
|
1323
|
-
|
|
1324
|
-
# Get an organization membership
|
|
1325
|
-
# @param id [String] The unique ID of the organization membership.
|
|
1326
|
-
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
1327
|
-
# @return [WorkOS::UserOrganizationMembership]
|
|
1328
|
-
def get_organization_membership(
|
|
1329
|
-
id:,
|
|
1330
|
-
request_options: {}
|
|
1331
|
-
)
|
|
1332
|
-
response = @client.request(
|
|
1333
|
-
method: :get,
|
|
1334
|
-
path: "/user_management/organization_memberships/#{WorkOS::Util.encode_path(id)}",
|
|
1335
|
-
auth: true,
|
|
1336
|
-
request_options: request_options
|
|
1337
|
-
)
|
|
1338
|
-
result = WorkOS::UserOrganizationMembership.new(response.body)
|
|
1339
|
-
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"])
|
|
1340
|
-
result
|
|
1341
|
-
end
|
|
1342
|
-
|
|
1343
|
-
# Update an organization membership
|
|
1344
|
-
# @param id [String] The unique ID of the organization membership.
|
|
1345
|
-
# @param role [WorkOS::UserManagement::RoleSingle, WorkOS::UserManagement::RoleMultiple, nil] Identifies the role.
|
|
1346
|
-
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
1347
|
-
# @return [WorkOS::UserOrganizationMembership]
|
|
1348
|
-
def update_organization_membership(
|
|
1349
|
-
id:,
|
|
1350
|
-
role: nil,
|
|
1351
|
-
request_options: {}
|
|
1352
|
-
)
|
|
1353
|
-
body = {}
|
|
1354
|
-
if role
|
|
1355
|
-
case role
|
|
1356
|
-
when WorkOS::UserManagement::RoleSingle
|
|
1357
|
-
body["role_slug"] = role.role_slug
|
|
1358
|
-
when WorkOS::UserManagement::RoleMultiple
|
|
1359
|
-
body["role_slugs"] = role.role_slugs
|
|
1360
|
-
else
|
|
1361
|
-
raise ArgumentError, "expected role to be one of: WorkOS::UserManagement::RoleSingle, WorkOS::UserManagement::RoleMultiple, got #{role.class}"
|
|
1362
|
-
end
|
|
1363
|
-
end
|
|
1364
|
-
response = @client.request(
|
|
1365
|
-
method: :put,
|
|
1366
|
-
path: "/user_management/organization_memberships/#{WorkOS::Util.encode_path(id)}",
|
|
1367
|
-
auth: true,
|
|
1368
|
-
body: body,
|
|
1369
|
-
request_options: request_options
|
|
1370
|
-
)
|
|
1371
|
-
result = WorkOS::UserOrganizationMembership.new(response.body)
|
|
1372
|
-
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"])
|
|
1373
|
-
result
|
|
1374
|
-
end
|
|
1375
|
-
|
|
1376
|
-
# Delete an organization membership
|
|
1377
|
-
# @param id [String] The unique ID of the organization membership.
|
|
1378
|
-
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
1379
|
-
# @return [void]
|
|
1380
|
-
def delete_organization_membership(
|
|
1381
|
-
id:,
|
|
1382
|
-
request_options: {}
|
|
1383
|
-
)
|
|
1384
|
-
@client.request(
|
|
1385
|
-
method: :delete,
|
|
1386
|
-
path: "/user_management/organization_memberships/#{WorkOS::Util.encode_path(id)}",
|
|
1387
|
-
auth: true,
|
|
1388
|
-
request_options: request_options
|
|
1389
|
-
)
|
|
1390
|
-
nil
|
|
1391
|
-
end
|
|
1392
|
-
|
|
1393
|
-
# Deactivate an organization membership
|
|
1394
|
-
# @param id [String] The unique ID of the organization membership.
|
|
1395
|
-
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
1396
|
-
# @return [WorkOS::OrganizationMembership]
|
|
1397
|
-
def deactivate_organization_membership(
|
|
1398
|
-
id:,
|
|
1399
|
-
request_options: {}
|
|
1400
|
-
)
|
|
1401
|
-
response = @client.request(
|
|
1402
|
-
method: :put,
|
|
1403
|
-
path: "/user_management/organization_memberships/#{WorkOS::Util.encode_path(id)}/deactivate",
|
|
1404
|
-
auth: true,
|
|
1405
|
-
request_options: request_options
|
|
1406
|
-
)
|
|
1407
|
-
result = WorkOS::OrganizationMembership.new(response.body)
|
|
1408
|
-
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"])
|
|
1409
|
-
result
|
|
1410
|
-
end
|
|
1411
|
-
|
|
1412
|
-
# Reactivate an organization membership
|
|
1413
|
-
# @param id [String] The unique ID of the organization membership.
|
|
1414
|
-
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
1415
|
-
# @return [WorkOS::UserOrganizationMembership]
|
|
1416
|
-
def reactivate_organization_membership(
|
|
1417
|
-
id:,
|
|
1418
|
-
request_options: {}
|
|
1419
|
-
)
|
|
1420
|
-
response = @client.request(
|
|
1421
|
-
method: :put,
|
|
1422
|
-
path: "/user_management/organization_memberships/#{WorkOS::Util.encode_path(id)}/reactivate",
|
|
1423
|
-
auth: true,
|
|
1424
|
-
request_options: request_options
|
|
1425
|
-
)
|
|
1426
|
-
result = WorkOS::UserOrganizationMembership.new(response.body)
|
|
1427
|
-
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"])
|
|
1428
|
-
result
|
|
1429
|
-
end
|
|
1430
|
-
|
|
1431
1221
|
# Create a redirect URI
|
|
1432
1222
|
# @param uri [String] The redirect URI to create.
|
|
1433
1223
|
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
@@ -1456,7 +1246,7 @@ module WorkOS
|
|
|
1456
1246
|
# @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"`.
|
|
1457
1247
|
# @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"`.
|
|
1458
1248
|
# @param limit [Integer, nil] Upper limit on the number of objects to return, between `1` and `100`.
|
|
1459
|
-
# @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).
|
|
1249
|
+
# @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).
|
|
1460
1250
|
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
1461
1251
|
# @return [WorkOS::Types::ListStruct<WorkOS::AuthorizedConnectApplicationListData>]
|
|
1462
1252
|
def list_user_authorized_applications(
|
|
@@ -1573,6 +1363,7 @@ module WorkOS
|
|
|
1573
1363
|
# @param name [String] A descriptive name for the API key.
|
|
1574
1364
|
# @param organization_id [String] The ID of the organization the user API key is associated with. The user must have an active membership in this organization.
|
|
1575
1365
|
# @param permissions [Array<String>, nil] The permission slugs to assign to the API key. Each permission must be enabled for user API keys.
|
|
1366
|
+
# @param expires_at [String, nil] The timestamp when the API key should expire. Must be a future timestamp. If omitted, the key does not expire.
|
|
1576
1367
|
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
1577
1368
|
# @return [WorkOS::UserApiKeyWithValue]
|
|
1578
1369
|
def create_user_api_key(
|
|
@@ -1580,12 +1371,14 @@ module WorkOS
|
|
|
1580
1371
|
name:,
|
|
1581
1372
|
organization_id:,
|
|
1582
1373
|
permissions: nil,
|
|
1374
|
+
expires_at: nil,
|
|
1583
1375
|
request_options: {}
|
|
1584
1376
|
)
|
|
1585
1377
|
body = {
|
|
1586
1378
|
"name" => name,
|
|
1587
1379
|
"organization_id" => organization_id,
|
|
1588
|
-
"permissions" => permissions
|
|
1380
|
+
"permissions" => permissions,
|
|
1381
|
+
"expires_at" => expires_at
|
|
1589
1382
|
}.compact
|
|
1590
1383
|
response = @client.request(
|
|
1591
1384
|
method: :post,
|
|
@@ -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 Actor < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
id: :id,
|
|
9
|
+
name: :name
|
|
10
|
+
}.freeze
|
|
11
|
+
|
|
12
|
+
attr_accessor \
|
|
13
|
+
:id,
|
|
14
|
+
:name
|
|
15
|
+
|
|
16
|
+
def initialize(json)
|
|
17
|
+
hash = self.class.normalize(json)
|
|
18
|
+
@id = hash[:id]
|
|
19
|
+
@name = hash[:name]
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
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 CreateDataKeyRequest < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
context: :context
|
|
9
|
+
}.freeze
|
|
10
|
+
|
|
11
|
+
attr_accessor :context
|
|
12
|
+
|
|
13
|
+
def initialize(json)
|
|
14
|
+
hash = self.class.normalize(json)
|
|
15
|
+
@context = hash[:context] || {}
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -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 CreateDataKeyResponse < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
context: :context,
|
|
9
|
+
data_key: :data_key,
|
|
10
|
+
encrypted_keys: :encrypted_keys,
|
|
11
|
+
id: :id
|
|
12
|
+
}.freeze
|
|
13
|
+
|
|
14
|
+
attr_accessor \
|
|
15
|
+
:context,
|
|
16
|
+
:data_key,
|
|
17
|
+
:encrypted_keys,
|
|
18
|
+
:id
|
|
19
|
+
|
|
20
|
+
def initialize(json)
|
|
21
|
+
hash = self.class.normalize(json)
|
|
22
|
+
@context = hash[:context] || {}
|
|
23
|
+
@data_key = hash[:data_key]
|
|
24
|
+
@encrypted_keys = hash[:encrypted_keys]
|
|
25
|
+
@id = hash[:id]
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
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 CreateObjectRequest < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
key_context: :key_context,
|
|
9
|
+
name: :name,
|
|
10
|
+
value: :value
|
|
11
|
+
}.freeze
|
|
12
|
+
|
|
13
|
+
attr_accessor \
|
|
14
|
+
:key_context,
|
|
15
|
+
:name,
|
|
16
|
+
:value
|
|
17
|
+
|
|
18
|
+
def initialize(json)
|
|
19
|
+
hash = self.class.normalize(json)
|
|
20
|
+
@key_context = hash[:key_context] || {}
|
|
21
|
+
@name = hash[:name]
|
|
22
|
+
@value = hash[:value]
|
|
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 DecryptRequest < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
keys: :keys
|
|
9
|
+
}.freeze
|
|
10
|
+
|
|
11
|
+
attr_accessor :keys
|
|
12
|
+
|
|
13
|
+
def initialize(json)
|
|
14
|
+
hash = self.class.normalize(json)
|
|
15
|
+
@keys = hash[:keys]
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
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 DecryptResponse < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
data_key: :data_key,
|
|
9
|
+
id: :id
|
|
10
|
+
}.freeze
|
|
11
|
+
|
|
12
|
+
attr_accessor \
|
|
13
|
+
:data_key,
|
|
14
|
+
:id
|
|
15
|
+
|
|
16
|
+
def initialize(json)
|
|
17
|
+
hash = self.class.normalize(json)
|
|
18
|
+
@data_key = hash[:data_key]
|
|
19
|
+
@id = hash[:id]
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
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 DeleteObjectResponse < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
name: :name,
|
|
9
|
+
success: :success
|
|
10
|
+
}.freeze
|
|
11
|
+
|
|
12
|
+
attr_accessor \
|
|
13
|
+
:name,
|
|
14
|
+
:success
|
|
15
|
+
|
|
16
|
+
def initialize(json)
|
|
17
|
+
hash = self.class.normalize(json)
|
|
18
|
+
@name = hash[:name]
|
|
19
|
+
@success = hash[:success]
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -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 ObjectMetadata < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
context: :context,
|
|
9
|
+
environment_id: :environment_id,
|
|
10
|
+
id: :id,
|
|
11
|
+
key_id: :key_id,
|
|
12
|
+
updated_at: :updated_at,
|
|
13
|
+
updated_by: :updated_by,
|
|
14
|
+
version_id: :version_id
|
|
15
|
+
}.freeze
|
|
16
|
+
|
|
17
|
+
attr_accessor \
|
|
18
|
+
:context,
|
|
19
|
+
:environment_id,
|
|
20
|
+
:id,
|
|
21
|
+
:key_id,
|
|
22
|
+
:updated_at,
|
|
23
|
+
:updated_by,
|
|
24
|
+
:version_id
|
|
25
|
+
|
|
26
|
+
def initialize(json)
|
|
27
|
+
hash = self.class.normalize(json)
|
|
28
|
+
@context = hash[:context] || {}
|
|
29
|
+
@environment_id = hash[:environment_id]
|
|
30
|
+
@id = hash[:id]
|
|
31
|
+
@key_id = hash[:key_id]
|
|
32
|
+
@updated_at = hash[:updated_at]
|
|
33
|
+
@updated_by = hash[:updated_by] ? WorkOS::Actor.new(hash[:updated_by]) : nil
|
|
34
|
+
@version_id = hash[:version_id]
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
@@ -3,28 +3,22 @@
|
|
|
3
3
|
# This file is auto-generated by oagen. Do not edit.
|
|
4
4
|
|
|
5
5
|
module WorkOS
|
|
6
|
-
class
|
|
6
|
+
class ObjectSummary < WorkOS::Types::BaseModel
|
|
7
7
|
HASH_ATTRS = {
|
|
8
|
-
|
|
8
|
+
id: :id,
|
|
9
9
|
name: :name,
|
|
10
|
-
schema: :schema,
|
|
11
|
-
created_at: :created_at,
|
|
12
10
|
updated_at: :updated_at
|
|
13
11
|
}.freeze
|
|
14
12
|
|
|
15
13
|
attr_accessor \
|
|
16
|
-
:
|
|
14
|
+
:id,
|
|
17
15
|
:name,
|
|
18
|
-
:schema,
|
|
19
|
-
:created_at,
|
|
20
16
|
:updated_at
|
|
21
17
|
|
|
22
18
|
def initialize(json)
|
|
23
19
|
hash = self.class.normalize(json)
|
|
24
|
-
@
|
|
20
|
+
@id = hash[:id]
|
|
25
21
|
@name = hash[:name]
|
|
26
|
-
@schema = hash[:schema] ? WorkOS::AuditLogSchemaJson.new(hash[:schema]) : nil
|
|
27
|
-
@created_at = hash[:created_at]
|
|
28
22
|
@updated_at = hash[:updated_at]
|
|
29
23
|
end
|
|
30
24
|
end
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
module WorkOS
|
|
6
|
+
class ObjectVersion < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
created_at: :created_at,
|
|
9
|
+
current_version: :current_version,
|
|
10
|
+
etag: :etag,
|
|
11
|
+
id: :id,
|
|
12
|
+
size: :size
|
|
13
|
+
}.freeze
|
|
14
|
+
|
|
15
|
+
attr_accessor \
|
|
16
|
+
:created_at,
|
|
17
|
+
:current_version,
|
|
18
|
+
:etag,
|
|
19
|
+
:id,
|
|
20
|
+
:size
|
|
21
|
+
|
|
22
|
+
def initialize(json)
|
|
23
|
+
hash = self.class.normalize(json)
|
|
24
|
+
@created_at = hash[:created_at]
|
|
25
|
+
@current_version = hash[:current_version]
|
|
26
|
+
@etag = hash[:etag]
|
|
27
|
+
@id = hash[:id]
|
|
28
|
+
@size = hash[:size]
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
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 ObjectWithoutValue < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
id: :id,
|
|
9
|
+
metadata: :metadata,
|
|
10
|
+
name: :name
|
|
11
|
+
}.freeze
|
|
12
|
+
|
|
13
|
+
attr_accessor \
|
|
14
|
+
:id,
|
|
15
|
+
:metadata,
|
|
16
|
+
:name
|
|
17
|
+
|
|
18
|
+
def initialize(json)
|
|
19
|
+
hash = self.class.normalize(json)
|
|
20
|
+
@id = hash[:id]
|
|
21
|
+
@metadata = hash[:metadata] ? WorkOS::ObjectMetadata.new(hash[:metadata]) : nil
|
|
22
|
+
@name = hash[:name]
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
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 RekeyRequest < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
context: :context,
|
|
9
|
+
encrypted_keys: :encrypted_keys
|
|
10
|
+
}.freeze
|
|
11
|
+
|
|
12
|
+
attr_accessor \
|
|
13
|
+
:context,
|
|
14
|
+
:encrypted_keys
|
|
15
|
+
|
|
16
|
+
def initialize(json)
|
|
17
|
+
hash = self.class.normalize(json)
|
|
18
|
+
@context = hash[:context] || {}
|
|
19
|
+
@encrypted_keys = hash[:encrypted_keys]
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|