workos 8.0.1 → 9.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/ci.yml +1 -1
- data/.github/workflows/docs.yml +1 -1
- data/.github/workflows/lint.yml +1 -1
- data/.github/workflows/release-please.yml +174 -3
- data/.github/workflows/release.yml +1 -1
- data/.last-synced-sha +1 -1
- data/.oagen-manifest.json +129 -34
- data/.release-please-manifest.json +1 -1
- data/CHANGELOG.md +59 -0
- data/Gemfile.lock +4 -4
- 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/api_keys/create_organization_api_key.rb +5 -2
- 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 +4 -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/audit_logs/{audit_log_schema_json_actor.rb → audit_log_schema_actor_input.rb} +1 -1
- 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/{types/radar_type.rb → audit_logs/audit_log_schema_target_input.rb} +1 -3
- 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 +28 -12
- 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/directory_sync/dsync_activated.rb +5 -5
- data/lib/workos/directory_sync/dsync_deactivated.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_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/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/inflections.rb +4 -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/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/shared/pipe_connected_account.rb +46 -0
- data/lib/workos/{audit_logs/audit_log_export_json.rb → shared/pipes_connected_account_connected.rb} +10 -10
- 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/create_webhook_endpoint_events.rb +4 -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 -3
- 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_api_key.rb +5 -2
- 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/session_created.rb +5 -5
- data/lib/workos/user_management/session_revoked.rb +5 -5
- data/lib/workos/user_management/user_api_key.rb +3 -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 +4 -214
- 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.rb +28 -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/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 +7 -8
- 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/api_keys.rbi +2 -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/{webhook_endpoint_json.rbi → connect_application_m2m.rbi} +23 -11
- 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/{audit_logs_retention_json.rbi → create_data_key_request.rbi} +5 -5
- 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_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_deactivated.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_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_verification_created.rbi +6 -6
- data/rbi/workos/error_response.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.rbi +42 -0
- data/rbi/workos/object_metadata.rbi +60 -0
- data/rbi/workos/object_summary.rbi +36 -0
- data/rbi/workos/{audit_log_action_json.rbi → object_version.rbi} +17 -17
- 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/pipe_connected_account.rbi +78 -0
- data/rbi/workos/{audit_log_export_json.rbi → pipes_connected_account_connected.rbi} +11 -11
- 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/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/user_api_key.rbi +6 -0
- 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 +2 -90
- 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/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 -1
- data/test/workos/test_model_round_trip.rb +577 -212
- 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 -87
- metadata +65 -41
- 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/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/{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
|
@@ -5,30 +5,30 @@
|
|
|
5
5
|
module WorkOS
|
|
6
6
|
class ApiKeyRevoked < WorkOS::Types::BaseModel
|
|
7
7
|
HASH_ATTRS = {
|
|
8
|
+
object: :object,
|
|
8
9
|
id: :id,
|
|
9
10
|
event: :event,
|
|
10
11
|
data: :data,
|
|
11
12
|
created_at: :created_at,
|
|
12
|
-
context: :context
|
|
13
|
-
object: :object
|
|
13
|
+
context: :context
|
|
14
14
|
}.freeze
|
|
15
15
|
|
|
16
16
|
attr_accessor \
|
|
17
|
+
:object,
|
|
17
18
|
:id,
|
|
18
19
|
:event,
|
|
19
20
|
:data,
|
|
20
21
|
:created_at,
|
|
21
|
-
:context
|
|
22
|
-
:object
|
|
22
|
+
:context
|
|
23
23
|
|
|
24
24
|
def initialize(json)
|
|
25
25
|
hash = self.class.normalize(json)
|
|
26
|
+
@object = hash[:object]
|
|
26
27
|
@id = hash[:id]
|
|
27
28
|
@event = hash[:event]
|
|
28
29
|
@data = hash[:data] ? WorkOS::ApiKeyRevokedData.new(hash[:data]) : nil
|
|
29
30
|
@created_at = hash[:created_at]
|
|
30
31
|
@context = hash[:context] ? WorkOS::EventContext.new(hash[:context]) : nil
|
|
31
|
-
@object = hash[:object]
|
|
32
32
|
end
|
|
33
33
|
end
|
|
34
34
|
end
|
|
@@ -6,17 +6,20 @@ module WorkOS
|
|
|
6
6
|
class CreateOrganizationApiKey < WorkOS::Types::BaseModel
|
|
7
7
|
HASH_ATTRS = {
|
|
8
8
|
name: :name,
|
|
9
|
-
permissions: :permissions
|
|
9
|
+
permissions: :permissions,
|
|
10
|
+
expires_at: :expires_at
|
|
10
11
|
}.freeze
|
|
11
12
|
|
|
12
13
|
attr_accessor \
|
|
13
14
|
:name,
|
|
14
|
-
:permissions
|
|
15
|
+
:permissions,
|
|
16
|
+
:expires_at
|
|
15
17
|
|
|
16
18
|
def initialize(json)
|
|
17
19
|
hash = self.class.normalize(json)
|
|
18
20
|
@name = hash[:name]
|
|
19
21
|
@permissions = hash[:permissions] || []
|
|
22
|
+
@expires_at = hash[:expires_at]
|
|
20
23
|
end
|
|
21
24
|
end
|
|
22
25
|
end
|
|
@@ -11,6 +11,7 @@ module WorkOS
|
|
|
11
11
|
name: :name,
|
|
12
12
|
obfuscated_value: :obfuscated_value,
|
|
13
13
|
last_used_at: :last_used_at,
|
|
14
|
+
expires_at: :expires_at,
|
|
14
15
|
permissions: :permissions,
|
|
15
16
|
created_at: :created_at,
|
|
16
17
|
updated_at: :updated_at
|
|
@@ -23,6 +24,7 @@ module WorkOS
|
|
|
23
24
|
:name,
|
|
24
25
|
:obfuscated_value,
|
|
25
26
|
:last_used_at,
|
|
27
|
+
:expires_at,
|
|
26
28
|
:permissions,
|
|
27
29
|
:created_at,
|
|
28
30
|
:updated_at
|
|
@@ -35,6 +37,7 @@ module WorkOS
|
|
|
35
37
|
@name = hash[:name]
|
|
36
38
|
@obfuscated_value = hash[:obfuscated_value]
|
|
37
39
|
@last_used_at = hash[:last_used_at]
|
|
40
|
+
@expires_at = hash[:expires_at]
|
|
38
41
|
@permissions = hash[:permissions] || []
|
|
39
42
|
@created_at = hash[:created_at]
|
|
40
43
|
@updated_at = hash[:updated_at]
|
|
@@ -11,6 +11,7 @@ module WorkOS
|
|
|
11
11
|
name: :name,
|
|
12
12
|
obfuscated_value: :obfuscated_value,
|
|
13
13
|
last_used_at: :last_used_at,
|
|
14
|
+
expires_at: :expires_at,
|
|
14
15
|
permissions: :permissions,
|
|
15
16
|
created_at: :created_at,
|
|
16
17
|
updated_at: :updated_at,
|
|
@@ -24,6 +25,7 @@ module WorkOS
|
|
|
24
25
|
:name,
|
|
25
26
|
:obfuscated_value,
|
|
26
27
|
:last_used_at,
|
|
28
|
+
:expires_at,
|
|
27
29
|
:permissions,
|
|
28
30
|
:created_at,
|
|
29
31
|
:updated_at,
|
|
@@ -37,6 +39,7 @@ module WorkOS
|
|
|
37
39
|
@name = hash[:name]
|
|
38
40
|
@obfuscated_value = hash[:obfuscated_value]
|
|
39
41
|
@last_used_at = hash[:last_used_at]
|
|
42
|
+
@expires_at = hash[:expires_at]
|
|
40
43
|
@permissions = hash[:permissions] || []
|
|
41
44
|
@created_at = hash[:created_at]
|
|
42
45
|
@updated_at = hash[:updated_at]
|
data/lib/workos/api_keys.rb
CHANGED
|
@@ -61,17 +61,20 @@ module WorkOS
|
|
|
61
61
|
# @param organization_id [String] Unique identifier of the Organization.
|
|
62
62
|
# @param name [String] The name for the API key.
|
|
63
63
|
# @param permissions [Array<String>, nil] The permission slugs to assign to the API key.
|
|
64
|
+
# @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.
|
|
64
65
|
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
65
66
|
# @return [WorkOS::OrganizationApiKeyWithValue]
|
|
66
67
|
def create_organization_api_key(
|
|
67
68
|
organization_id:,
|
|
68
69
|
name:,
|
|
69
70
|
permissions: nil,
|
|
71
|
+
expires_at: nil,
|
|
70
72
|
request_options: {}
|
|
71
73
|
)
|
|
72
74
|
body = {
|
|
73
75
|
"name" => name,
|
|
74
|
-
"permissions" => permissions
|
|
76
|
+
"permissions" => permissions,
|
|
77
|
+
"expires_at" => expires_at
|
|
75
78
|
}.compact
|
|
76
79
|
response = @client.request(
|
|
77
80
|
method: :post,
|
|
@@ -2,12 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
# This file is auto-generated by oagen. Do not edit.
|
|
4
4
|
|
|
5
|
-
require "json"
|
|
6
|
-
|
|
7
5
|
module WorkOS
|
|
8
|
-
class AuditLogAction
|
|
9
|
-
include HashProvider
|
|
10
|
-
|
|
6
|
+
class AuditLogAction < WorkOS::Types::BaseModel
|
|
11
7
|
HASH_ATTRS = {
|
|
12
8
|
object: :object,
|
|
13
9
|
name: :name,
|
|
@@ -24,8 +20,7 @@ module WorkOS
|
|
|
24
20
|
:updated_at
|
|
25
21
|
|
|
26
22
|
def initialize(json)
|
|
27
|
-
hash =
|
|
28
|
-
hash = hash.transform_keys(&:to_sym) if hash.keys.first.is_a?(String)
|
|
23
|
+
hash = self.class.normalize(json)
|
|
29
24
|
@object = hash[:object]
|
|
30
25
|
@name = hash[:name]
|
|
31
26
|
@schema = hash[:schema] ? WorkOS::AuditLogSchema.new(hash[:schema]) : nil
|
|
@@ -2,12 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
# This file is auto-generated by oagen. Do not edit.
|
|
4
4
|
|
|
5
|
-
require "json"
|
|
6
|
-
|
|
7
5
|
module WorkOS
|
|
8
|
-
class AuditLogExport
|
|
9
|
-
include HashProvider
|
|
10
|
-
|
|
6
|
+
class AuditLogExport < WorkOS::Types::BaseModel
|
|
11
7
|
HASH_ATTRS = {
|
|
12
8
|
object: :object,
|
|
13
9
|
id: :id,
|
|
@@ -26,8 +22,7 @@ module WorkOS
|
|
|
26
22
|
:updated_at
|
|
27
23
|
|
|
28
24
|
def initialize(json)
|
|
29
|
-
hash =
|
|
30
|
-
hash = hash.transform_keys(&:to_sym) if hash.keys.first.is_a?(String)
|
|
25
|
+
hash = self.class.normalize(json)
|
|
31
26
|
@object = hash[:object]
|
|
32
27
|
@id = hash[:id]
|
|
33
28
|
@state = hash[:state]
|
|
@@ -5,21 +5,30 @@
|
|
|
5
5
|
module WorkOS
|
|
6
6
|
class AuditLogSchema < WorkOS::Types::BaseModel
|
|
7
7
|
HASH_ATTRS = {
|
|
8
|
+
object: :object,
|
|
9
|
+
version: :version,
|
|
8
10
|
actor: :actor,
|
|
9
11
|
targets: :targets,
|
|
10
|
-
metadata: :metadata
|
|
12
|
+
metadata: :metadata,
|
|
13
|
+
created_at: :created_at
|
|
11
14
|
}.freeze
|
|
12
15
|
|
|
13
16
|
attr_accessor \
|
|
17
|
+
:object,
|
|
18
|
+
:version,
|
|
14
19
|
:actor,
|
|
15
20
|
:targets,
|
|
16
|
-
:metadata
|
|
21
|
+
:metadata,
|
|
22
|
+
:created_at
|
|
17
23
|
|
|
18
24
|
def initialize(json)
|
|
19
25
|
hash = self.class.normalize(json)
|
|
26
|
+
@object = hash[:object]
|
|
27
|
+
@version = hash[:version]
|
|
20
28
|
@actor = hash[:actor] ? WorkOS::AuditLogSchemaActor.new(hash[:actor]) : nil
|
|
21
29
|
@targets = (hash[:targets] || []).map { |item| item ? WorkOS::AuditLogSchemaTarget.new(item) : nil }
|
|
22
30
|
@metadata = hash[:metadata] || {}
|
|
31
|
+
@created_at = hash[:created_at]
|
|
23
32
|
end
|
|
24
33
|
end
|
|
25
34
|
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 AuditLogSchemaInput < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
actor: :actor,
|
|
9
|
+
targets: :targets,
|
|
10
|
+
metadata: :metadata
|
|
11
|
+
}.freeze
|
|
12
|
+
|
|
13
|
+
attr_accessor \
|
|
14
|
+
:actor,
|
|
15
|
+
:targets,
|
|
16
|
+
:metadata
|
|
17
|
+
|
|
18
|
+
def initialize(json)
|
|
19
|
+
hash = self.class.normalize(json)
|
|
20
|
+
@actor = hash[:actor] ? WorkOS::AuditLogSchemaActorInput.new(hash[:actor]) : nil
|
|
21
|
+
@targets = (hash[:targets] || []).map { |item| item ? WorkOS::AuditLogSchemaTargetInput.new(item) : nil }
|
|
22
|
+
@metadata = hash[:metadata] || {}
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -3,5 +3,20 @@
|
|
|
3
3
|
# This file is auto-generated by oagen. Do not edit.
|
|
4
4
|
|
|
5
5
|
module WorkOS
|
|
6
|
-
AuditLogSchemaTarget
|
|
6
|
+
class AuditLogSchemaTarget < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
type: :type,
|
|
9
|
+
metadata: :metadata
|
|
10
|
+
}.freeze
|
|
11
|
+
|
|
12
|
+
attr_accessor \
|
|
13
|
+
:type,
|
|
14
|
+
:metadata
|
|
15
|
+
|
|
16
|
+
def initialize(json)
|
|
17
|
+
hash = self.class.normalize(json)
|
|
18
|
+
@type = hash[:type]
|
|
19
|
+
@metadata = hash[:metadata] || {}
|
|
20
|
+
end
|
|
21
|
+
end
|
|
7
22
|
end
|
data/lib/workos/audit_logs.rb
CHANGED
|
@@ -13,7 +13,7 @@ module WorkOS
|
|
|
13
13
|
# Get Retention
|
|
14
14
|
# @param id [String] Unique identifier of the Organization.
|
|
15
15
|
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
16
|
-
# @return [WorkOS::
|
|
16
|
+
# @return [WorkOS::AuditLogsRetention]
|
|
17
17
|
def get_organization_audit_logs_retention(
|
|
18
18
|
id:,
|
|
19
19
|
request_options: {}
|
|
@@ -24,7 +24,7 @@ module WorkOS
|
|
|
24
24
|
auth: true,
|
|
25
25
|
request_options: request_options
|
|
26
26
|
)
|
|
27
|
-
result = WorkOS::
|
|
27
|
+
result = WorkOS::AuditLogsRetention.new(response.body)
|
|
28
28
|
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"])
|
|
29
29
|
result
|
|
30
30
|
end
|
|
@@ -33,7 +33,7 @@ module WorkOS
|
|
|
33
33
|
# @param id [String] Unique identifier of the Organization.
|
|
34
34
|
# @param retention_period_in_days [Integer] The number of days Audit Log events will be retained. Valid values are `30` and `365`.
|
|
35
35
|
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
36
|
-
# @return [WorkOS::
|
|
36
|
+
# @return [WorkOS::AuditLogsRetention]
|
|
37
37
|
def update_organization_audit_logs_retention(
|
|
38
38
|
id:,
|
|
39
39
|
retention_period_in_days:,
|
|
@@ -49,7 +49,7 @@ module WorkOS
|
|
|
49
49
|
body: body,
|
|
50
50
|
request_options: request_options
|
|
51
51
|
)
|
|
52
|
-
result = WorkOS::
|
|
52
|
+
result = WorkOS::AuditLogsRetention.new(response.body)
|
|
53
53
|
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"])
|
|
54
54
|
result
|
|
55
55
|
end
|
|
@@ -60,7 +60,7 @@ module WorkOS
|
|
|
60
60
|
# @param limit [Integer, nil] Upper limit on the number of objects to return, between `1` and `100`.
|
|
61
61
|
# @param order [WorkOS::Types::PaginationOrder, nil] Order the results by the creation time.
|
|
62
62
|
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
63
|
-
# @return [WorkOS::Types::ListStruct<WorkOS::
|
|
63
|
+
# @return [WorkOS::Types::ListStruct<WorkOS::AuditLogAction>]
|
|
64
64
|
def list_actions(
|
|
65
65
|
before: nil,
|
|
66
66
|
after: nil,
|
|
@@ -92,7 +92,7 @@ module WorkOS
|
|
|
92
92
|
}
|
|
93
93
|
WorkOS::Types::ListStruct.from_response(
|
|
94
94
|
response,
|
|
95
|
-
model: WorkOS::
|
|
95
|
+
model: WorkOS::AuditLogAction,
|
|
96
96
|
filters: {before: before, limit: limit, order: order},
|
|
97
97
|
fetch_next: fetch_next
|
|
98
98
|
)
|
|
@@ -105,7 +105,7 @@ module WorkOS
|
|
|
105
105
|
# @param limit [Integer, nil] Upper limit on the number of objects to return, between `1` and `100`.
|
|
106
106
|
# @param order [WorkOS::Types::PaginationOrder, nil] Order the results by the creation time.
|
|
107
107
|
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
108
|
-
# @return [WorkOS::Types::ListStruct<WorkOS::
|
|
108
|
+
# @return [WorkOS::Types::ListStruct<WorkOS::AuditLogSchema>]
|
|
109
109
|
def list_action_schemas(
|
|
110
110
|
action_name:,
|
|
111
111
|
before: nil,
|
|
@@ -139,7 +139,7 @@ module WorkOS
|
|
|
139
139
|
}
|
|
140
140
|
WorkOS::Types::ListStruct.from_response(
|
|
141
141
|
response,
|
|
142
|
-
model: WorkOS::
|
|
142
|
+
model: WorkOS::AuditLogSchema,
|
|
143
143
|
filters: {action_name: action_name, before: before, limit: limit, order: order},
|
|
144
144
|
fetch_next: fetch_next
|
|
145
145
|
)
|
|
@@ -147,11 +147,11 @@ module WorkOS
|
|
|
147
147
|
|
|
148
148
|
# Create Schema
|
|
149
149
|
# @param action_name [String] The name of the Audit Log action.
|
|
150
|
-
# @param actor [WorkOS::
|
|
151
|
-
# @param targets [Array<WorkOS::
|
|
150
|
+
# @param actor [WorkOS::AuditLogSchemaActorInput, nil] The metadata schema for the actor.
|
|
151
|
+
# @param targets [Array<WorkOS::AuditLogSchemaTargetInput>] The list of targets for the schema.
|
|
152
152
|
# @param metadata [Hash{String => Object}, nil] Optional JSON schema for event metadata.
|
|
153
153
|
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
154
|
-
# @return [WorkOS::
|
|
154
|
+
# @return [WorkOS::AuditLogSchema]
|
|
155
155
|
def create_schema(
|
|
156
156
|
action_name:,
|
|
157
157
|
targets:,
|
|
@@ -171,7 +171,7 @@ module WorkOS
|
|
|
171
171
|
body: body,
|
|
172
172
|
request_options: request_options
|
|
173
173
|
)
|
|
174
|
-
result = WorkOS::
|
|
174
|
+
result = WorkOS::AuditLogSchema.new(response.body)
|
|
175
175
|
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"])
|
|
176
176
|
result
|
|
177
177
|
end
|
|
@@ -212,7 +212,7 @@ module WorkOS
|
|
|
212
212
|
# @param actor_ids [Array<String>, nil] List of actor IDs to filter against.
|
|
213
213
|
# @param targets [Array<String>, nil] List of target types to filter against.
|
|
214
214
|
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
215
|
-
# @return [WorkOS::
|
|
215
|
+
# @return [WorkOS::AuditLogExport]
|
|
216
216
|
def create_export(
|
|
217
217
|
organization_id:,
|
|
218
218
|
range_start:,
|
|
@@ -241,7 +241,7 @@ module WorkOS
|
|
|
241
241
|
body: body,
|
|
242
242
|
request_options: request_options
|
|
243
243
|
)
|
|
244
|
-
result = WorkOS::
|
|
244
|
+
result = WorkOS::AuditLogExport.new(response.body)
|
|
245
245
|
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"])
|
|
246
246
|
result
|
|
247
247
|
end
|
|
@@ -249,7 +249,7 @@ module WorkOS
|
|
|
249
249
|
# Get Export
|
|
250
250
|
# @param audit_log_export_id [String] The unique ID of the Audit Log Export.
|
|
251
251
|
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
252
|
-
# @return [WorkOS::
|
|
252
|
+
# @return [WorkOS::AuditLogExport]
|
|
253
253
|
def get_export(
|
|
254
254
|
audit_log_export_id:,
|
|
255
255
|
request_options: {}
|
|
@@ -260,7 +260,7 @@ module WorkOS
|
|
|
260
260
|
auth: true,
|
|
261
261
|
request_options: request_options
|
|
262
262
|
)
|
|
263
|
-
result = WorkOS::
|
|
263
|
+
result = WorkOS::AuditLogExport.new(response.body)
|
|
264
264
|
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"])
|
|
265
265
|
result
|
|
266
266
|
end
|
|
@@ -5,30 +5,30 @@
|
|
|
5
5
|
module WorkOS
|
|
6
6
|
class PermissionCreated < WorkOS::Types::BaseModel
|
|
7
7
|
HASH_ATTRS = {
|
|
8
|
+
object: :object,
|
|
8
9
|
id: :id,
|
|
9
10
|
event: :event,
|
|
10
11
|
data: :data,
|
|
11
12
|
created_at: :created_at,
|
|
12
|
-
context: :context
|
|
13
|
-
object: :object
|
|
13
|
+
context: :context
|
|
14
14
|
}.freeze
|
|
15
15
|
|
|
16
16
|
attr_accessor \
|
|
17
|
+
:object,
|
|
17
18
|
:id,
|
|
18
19
|
:event,
|
|
19
20
|
:data,
|
|
20
21
|
:created_at,
|
|
21
|
-
:context
|
|
22
|
-
:object
|
|
22
|
+
:context
|
|
23
23
|
|
|
24
24
|
def initialize(json)
|
|
25
25
|
hash = self.class.normalize(json)
|
|
26
|
+
@object = hash[:object]
|
|
26
27
|
@id = hash[:id]
|
|
27
28
|
@event = hash[:event]
|
|
28
29
|
@data = hash[:data] ? WorkOS::PermissionCreatedData.new(hash[:data]) : nil
|
|
29
30
|
@created_at = hash[:created_at]
|
|
30
31
|
@context = hash[:context] ? WorkOS::EventContext.new(hash[:context]) : nil
|
|
31
|
-
@object = hash[:object]
|
|
32
32
|
end
|
|
33
33
|
end
|
|
34
34
|
end
|
|
@@ -5,30 +5,30 @@
|
|
|
5
5
|
module WorkOS
|
|
6
6
|
class PermissionDeleted < WorkOS::Types::BaseModel
|
|
7
7
|
HASH_ATTRS = {
|
|
8
|
+
object: :object,
|
|
8
9
|
id: :id,
|
|
9
10
|
event: :event,
|
|
10
11
|
data: :data,
|
|
11
12
|
created_at: :created_at,
|
|
12
|
-
context: :context
|
|
13
|
-
object: :object
|
|
13
|
+
context: :context
|
|
14
14
|
}.freeze
|
|
15
15
|
|
|
16
16
|
attr_accessor \
|
|
17
|
+
:object,
|
|
17
18
|
:id,
|
|
18
19
|
:event,
|
|
19
20
|
:data,
|
|
20
21
|
:created_at,
|
|
21
|
-
:context
|
|
22
|
-
:object
|
|
22
|
+
:context
|
|
23
23
|
|
|
24
24
|
def initialize(json)
|
|
25
25
|
hash = self.class.normalize(json)
|
|
26
|
+
@object = hash[:object]
|
|
26
27
|
@id = hash[:id]
|
|
27
28
|
@event = hash[:event]
|
|
28
29
|
@data = hash[:data] ? WorkOS::PermissionDeletedData.new(hash[:data]) : nil
|
|
29
30
|
@created_at = hash[:created_at]
|
|
30
31
|
@context = hash[:context] ? WorkOS::EventContext.new(hash[:context]) : nil
|
|
31
|
-
@object = hash[:object]
|
|
32
32
|
end
|
|
33
33
|
end
|
|
34
34
|
end
|
|
@@ -5,30 +5,30 @@
|
|
|
5
5
|
module WorkOS
|
|
6
6
|
class PermissionUpdated < WorkOS::Types::BaseModel
|
|
7
7
|
HASH_ATTRS = {
|
|
8
|
+
object: :object,
|
|
8
9
|
id: :id,
|
|
9
10
|
event: :event,
|
|
10
11
|
data: :data,
|
|
11
12
|
created_at: :created_at,
|
|
12
|
-
context: :context
|
|
13
|
-
object: :object
|
|
13
|
+
context: :context
|
|
14
14
|
}.freeze
|
|
15
15
|
|
|
16
16
|
attr_accessor \
|
|
17
|
+
:object,
|
|
17
18
|
:id,
|
|
18
19
|
:event,
|
|
19
20
|
:data,
|
|
20
21
|
:created_at,
|
|
21
|
-
:context
|
|
22
|
-
:object
|
|
22
|
+
:context
|
|
23
23
|
|
|
24
24
|
def initialize(json)
|
|
25
25
|
hash = self.class.normalize(json)
|
|
26
|
+
@object = hash[:object]
|
|
26
27
|
@id = hash[:id]
|
|
27
28
|
@event = hash[:event]
|
|
28
29
|
@data = hash[:data] ? WorkOS::PermissionUpdatedData.new(hash[:data]) : nil
|
|
29
30
|
@created_at = hash[:created_at]
|
|
30
31
|
@context = hash[:context] ? WorkOS::EventContext.new(hash[:context]) : nil
|
|
31
|
-
@object = hash[:object]
|
|
32
32
|
end
|
|
33
33
|
end
|
|
34
34
|
end
|
|
@@ -5,30 +5,30 @@
|
|
|
5
5
|
module WorkOS
|
|
6
6
|
class RoleCreated < WorkOS::Types::BaseModel
|
|
7
7
|
HASH_ATTRS = {
|
|
8
|
+
object: :object,
|
|
8
9
|
id: :id,
|
|
9
10
|
event: :event,
|
|
10
11
|
data: :data,
|
|
11
12
|
created_at: :created_at,
|
|
12
|
-
context: :context
|
|
13
|
-
object: :object
|
|
13
|
+
context: :context
|
|
14
14
|
}.freeze
|
|
15
15
|
|
|
16
16
|
attr_accessor \
|
|
17
|
+
:object,
|
|
17
18
|
:id,
|
|
18
19
|
:event,
|
|
19
20
|
:data,
|
|
20
21
|
:created_at,
|
|
21
|
-
:context
|
|
22
|
-
:object
|
|
22
|
+
:context
|
|
23
23
|
|
|
24
24
|
def initialize(json)
|
|
25
25
|
hash = self.class.normalize(json)
|
|
26
|
+
@object = hash[:object]
|
|
26
27
|
@id = hash[:id]
|
|
27
28
|
@event = hash[:event]
|
|
28
29
|
@data = hash[:data] ? WorkOS::RoleCreatedData.new(hash[:data]) : nil
|
|
29
30
|
@created_at = hash[:created_at]
|
|
30
31
|
@context = hash[:context] ? WorkOS::EventContext.new(hash[:context]) : nil
|
|
31
|
-
@object = hash[:object]
|
|
32
32
|
end
|
|
33
33
|
end
|
|
34
34
|
end
|
|
@@ -5,30 +5,30 @@
|
|
|
5
5
|
module WorkOS
|
|
6
6
|
class RoleDeleted < WorkOS::Types::BaseModel
|
|
7
7
|
HASH_ATTRS = {
|
|
8
|
+
object: :object,
|
|
8
9
|
id: :id,
|
|
9
10
|
event: :event,
|
|
10
11
|
data: :data,
|
|
11
12
|
created_at: :created_at,
|
|
12
|
-
context: :context
|
|
13
|
-
object: :object
|
|
13
|
+
context: :context
|
|
14
14
|
}.freeze
|
|
15
15
|
|
|
16
16
|
attr_accessor \
|
|
17
|
+
:object,
|
|
17
18
|
:id,
|
|
18
19
|
:event,
|
|
19
20
|
:data,
|
|
20
21
|
:created_at,
|
|
21
|
-
:context
|
|
22
|
-
:object
|
|
22
|
+
:context
|
|
23
23
|
|
|
24
24
|
def initialize(json)
|
|
25
25
|
hash = self.class.normalize(json)
|
|
26
|
+
@object = hash[:object]
|
|
26
27
|
@id = hash[:id]
|
|
27
28
|
@event = hash[:event]
|
|
28
29
|
@data = hash[:data] ? WorkOS::RoleDeletedData.new(hash[:data]) : nil
|
|
29
30
|
@created_at = hash[:created_at]
|
|
30
31
|
@context = hash[:context] ? WorkOS::EventContext.new(hash[:context]) : nil
|
|
31
|
-
@object = hash[:object]
|
|
32
32
|
end
|
|
33
33
|
end
|
|
34
34
|
end
|
|
@@ -5,30 +5,30 @@
|
|
|
5
5
|
module WorkOS
|
|
6
6
|
class RoleUpdated < WorkOS::Types::BaseModel
|
|
7
7
|
HASH_ATTRS = {
|
|
8
|
+
object: :object,
|
|
8
9
|
id: :id,
|
|
9
10
|
event: :event,
|
|
10
11
|
data: :data,
|
|
11
12
|
created_at: :created_at,
|
|
12
|
-
context: :context
|
|
13
|
-
object: :object
|
|
13
|
+
context: :context
|
|
14
14
|
}.freeze
|
|
15
15
|
|
|
16
16
|
attr_accessor \
|
|
17
|
+
:object,
|
|
17
18
|
:id,
|
|
18
19
|
:event,
|
|
19
20
|
:data,
|
|
20
21
|
:created_at,
|
|
21
|
-
:context
|
|
22
|
-
:object
|
|
22
|
+
:context
|
|
23
23
|
|
|
24
24
|
def initialize(json)
|
|
25
25
|
hash = self.class.normalize(json)
|
|
26
|
+
@object = hash[:object]
|
|
26
27
|
@id = hash[:id]
|
|
27
28
|
@event = hash[:event]
|
|
28
29
|
@data = hash[:data] ? WorkOS::RoleUpdatedData.new(hash[:data]) : nil
|
|
29
30
|
@created_at = hash[:created_at]
|
|
30
31
|
@context = hash[:context] ? WorkOS::EventContext.new(hash[:context]) : nil
|
|
31
|
-
@object = hash[:object]
|
|
32
32
|
end
|
|
33
33
|
end
|
|
34
34
|
end
|