workos 9.0.0 → 9.2.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 +49 -66
- data/.github/workflows/release.yml +2 -2
- data/.last-synced-sha +1 -1
- data/.oagen-manifest.json +101 -14
- data/.release-please-manifest.json +1 -1
- data/.ruby-version +1 -1
- data/CHANGELOG.md +89 -0
- data/Gemfile.lock +4 -4
- data/lib/workos/{directory_sync/dsync_deactivated.rb → api_keys/api_key_updated.rb} +2 -2
- 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/expire_api_key.rb +18 -0
- data/lib/workos/api_keys.rb +25 -0
- data/lib/workos/{types/dsync_deactivated_data_type.rb → authorization/create_group_role_assignment.rb} +1 -3
- data/lib/workos/authorization/delete_group_role_assignments_by_criteria.rb +7 -0
- data/lib/workos/authorization/group_role_assignment.rb +37 -0
- data/lib/workos/authorization/group_role_assignment_list.rb +25 -0
- data/lib/workos/authorization/group_role_assignment_resource.rb +25 -0
- data/lib/workos/authorization/replace_group_role_assignment_entry.rb +7 -0
- data/lib/workos/authorization/replace_group_role_assignments.rb +18 -0
- data/lib/workos/authorization/user_role_assignment_resource.rb +1 -19
- data/lib/workos/authorization.rb +190 -10
- data/lib/workos/base_client.rb +19 -2
- data/lib/workos/client.rb +8 -0
- data/lib/workos/client_api/client_api_token.rb +22 -0
- data/lib/workos/client_api/client_api_token_response.rb +18 -0
- data/lib/workos/client_api.rb +39 -0
- data/lib/workos/connect/user_object.rb +3 -0
- data/lib/workos/connect.rb +1 -1
- 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/directory_sync/dsync_token_revoked_data.rb +7 -0
- data/lib/workos/directory_sync.rb +2 -2
- data/lib/workos/events.rb +1 -1
- data/lib/workos/groups.rb +2 -2
- data/lib/workos/inflections.rb +0 -1
- data/lib/workos/organization_membership_service.rb +2 -2
- data/lib/workos/organizations.rb +1 -1
- data/lib/workos/pipes/connected_account.rb +6 -0
- data/lib/workos/pipes/data_integrations_list_response_data.rb +3 -0
- data/lib/workos/pipes/data_integrations_list_response_data_connected_account.rb +6 -0
- data/lib/workos/pipes.rb +5 -5
- data/lib/workos/pipes_provider/configure_data_integration_body.rb +28 -0
- data/lib/workos/pipes_provider/data_integration_configuration_list_response.rb +22 -0
- data/lib/workos/{directory_sync/dsync_deactivated_data.rb → pipes_provider/data_integration_configuration_response.rb} +13 -13
- data/lib/workos/pipes_provider/data_integration_credentials.rb +31 -0
- data/lib/workos/pipes_provider.rb +68 -0
- data/lib/workos/types/audit_log_configuration_log_stream_type.rb +2 -1
- data/lib/workos/types/connected_account_auth_method.rb +13 -0
- data/lib/workos/types/create_webhook_endpoint_events.rb +2 -1
- data/lib/workos/types/data_integration_access_token_response_error.rb +2 -2
- data/lib/workos/types/data_integration_credentials_credentials_type.rb +14 -0
- data/lib/workos/types/{dsync_deactivated_data_state.rb → data_integrations_list_response_data_auth_methods.rb} +1 -1
- data/lib/workos/types/data_integrations_list_response_data_connected_account_auth_method.rb +9 -0
- data/lib/workos/types/radar_standalone_response_control.rb +1 -2
- data/lib/workos/types/widget_session_token_scopes.rb +2 -1
- data/lib/workos/user_management/create_user.rb +3 -0
- data/lib/workos/user_management/email_change_confirmation_user.rb +3 -0
- data/lib/workos/user_management/revoke_session.rb +2 -6
- data/lib/workos/user_management/update_user.rb +3 -0
- data/lib/workos/user_management/user_api_key_updated_data_owner.rb +7 -0
- data/lib/workos/user_management.rb +13 -10
- data/lib/workos/vault/{object.rb → vault_object.rb} +1 -1
- data/lib/workos/vault.rb +4 -4
- data/lib/workos/version.rb +1 -1
- data/lib/workos/webhooks.rb +1 -1
- data/lib/workos/widgets/widget_session_token_response.rb +1 -12
- data/lib/workos.rb +2 -0
- data/rbi/workos/{dsync_deactivated.rbi → api_key_updated.rbi} +3 -3
- data/rbi/workos/api_key_updated_data.rbi +84 -0
- data/rbi/workos/api_key_updated_data_owner.rbi +30 -0
- data/rbi/workos/api_key_updated_data_previous_attribute.rbi +24 -0
- data/rbi/workos/api_keys.rbi +9 -0
- data/rbi/workos/authorization.rbi +63 -0
- data/rbi/workos/authorization_code_session_authenticate_request.rbi +2 -2
- data/rbi/workos/client.rbi +6 -0
- data/rbi/workos/client_api.rbi +22 -0
- data/rbi/workos/client_api_token.rbi +30 -0
- data/rbi/workos/client_api_token_response.rbi +24 -0
- data/rbi/workos/configure_data_integration_body.rbi +42 -0
- data/rbi/workos/connected_account.rbi +12 -0
- data/rbi/workos/create_group_role_assignment.rbi +42 -0
- data/rbi/workos/create_user.rbi +6 -0
- data/rbi/workos/data_integration_configuration_list_response.rbi +30 -0
- data/rbi/workos/{dsync_deactivated_data.rbi → data_integration_configuration_response.rbi} +21 -21
- data/rbi/workos/data_integration_credentials.rbi +48 -0
- data/rbi/workos/data_integrations_list_response_data.rbi +6 -0
- data/rbi/workos/data_integrations_list_response_data_connected_account.rbi +12 -0
- data/rbi/workos/delete_group_role_assignments_by_criteria.rbi +42 -0
- data/rbi/workos/dsync_token_created.rbi +54 -0
- data/rbi/workos/dsync_token_created_data.rbi +54 -0
- data/rbi/workos/dsync_token_revoked.rbi +54 -0
- data/rbi/workos/dsync_token_revoked_data.rbi +54 -0
- data/rbi/workos/email_change_confirmation_user.rbi +6 -0
- data/rbi/workos/expire_api_key.rbi +24 -0
- data/rbi/workos/group_role_assignment.rbi +60 -0
- data/rbi/workos/group_role_assignment_resource.rbi +36 -0
- data/rbi/workos/organization_membership_service.rbi +1 -1
- data/rbi/workos/pipes.rbi +2 -2
- data/rbi/workos/pipes_provider.rbi +34 -0
- data/rbi/workos/refresh_token_session_authenticate_request.rbi +2 -2
- data/rbi/workos/replace_group_role_assignment_entry.rbi +42 -0
- data/rbi/workos/replace_group_role_assignments.rbi +24 -0
- data/rbi/workos/revoke_session.rbi +0 -6
- data/rbi/workos/update_user.rbi +6 -0
- data/rbi/workos/user.rbi +6 -0
- data/rbi/workos/{dsync_deactivated_data_domain.rbi → user_api_key_updated_data_owner.rbi} +5 -5
- data/rbi/workos/user_management.rbi +8 -7
- data/rbi/workos/user_object.rbi +6 -0
- data/rbi/workos/vault.rbi +2 -2
- data/rbi/workos/{object.rbi → vault_object.rbi} +1 -1
- data/renovate.json +1 -61
- data/test/workos/test_api_keys.rb +9 -1
- data/test/workos/test_authorization.rb +48 -0
- data/test/workos/test_base_client.rb +64 -0
- data/test/workos/test_client_api.rb +33 -0
- data/test/workos/test_model_round_trip.rb +363 -67
- data/test/workos/test_pipes.rb +3 -3
- data/test/workos/test_pipes_provider.rb +41 -0
- data/test/workos/test_user_management.rb +2 -2
- data/test/workos/test_vault.rb +0 -1
- metadata +61 -17
- /data/lib/workos/{authorization → groups}/user_organization_membership_base_list_data.rb +0 -0
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,94 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [9.2.0](https://github.com/workos/workos-ruby/compare/v9.1.0...v9.2.0) (2026-06-18)
|
|
4
|
+
|
|
5
|
+
- [#501](https://github.com/workos/workos-ruby/pull/501) feat(generated)!: regenerate from spec (12 changes)
|
|
6
|
+
|
|
7
|
+
**Features**
|
|
8
|
+
- **[authorization](https://workos.com/docs/reference/fga)**:
|
|
9
|
+
- Added model `ReplaceGroupRoleAssignmentEntry`
|
|
10
|
+
- Added model `ReplaceGroupRoleAssignments`
|
|
11
|
+
- Added model `DeleteGroupRoleAssignmentsByCriteria`
|
|
12
|
+
- Added endpoint `POST /authorization/groups/{group_id}/role_assignments`
|
|
13
|
+
- Added endpoint `PUT /authorization/groups/{group_id}/role_assignments`
|
|
14
|
+
- Added endpoint `DELETE /authorization/groups/{group_id}/role_assignments`
|
|
15
|
+
- Added endpoint `GET /authorization/groups/{group_id}/role_assignments/{role_assignment_id}`
|
|
16
|
+
- Added endpoint `DELETE /authorization/groups/{group_id}/role_assignments/{role_assignment_id}`
|
|
17
|
+
- **[client](https://workos.com/docs/reference)**:
|
|
18
|
+
- Added model `ClientApiToken`
|
|
19
|
+
- Added model `ClientApiTokenResponse`
|
|
20
|
+
- Added service `Client`
|
|
21
|
+
- **[connect](https://workos.com/docs/reference/workos-connect/standalone)**:
|
|
22
|
+
- Added `auth_method` to `ConnectedAccount`
|
|
23
|
+
- Added `api_key_last_4` to `ConnectedAccount`
|
|
24
|
+
- Added enum `ConnectedAccountAuthMethod`
|
|
25
|
+
- **[groups](https://workos.com/docs/reference/groups)**:
|
|
26
|
+
- Added model `CreateGroupRoleAssignment`
|
|
27
|
+
- Added model `GroupRoleAssignment`
|
|
28
|
+
- Added model `GroupRoleAssignmentList`
|
|
29
|
+
- Added model `GroupRoleAssignmentResource`
|
|
30
|
+
- **[organization_membership](https://workos.com/docs/reference/authkit/organization-membership)**:
|
|
31
|
+
- Added model `UserOrganizationMembershipList`
|
|
32
|
+
- Added model `UserOrganizationMembershipListListMetadata`
|
|
33
|
+
- **[pipes](https://workos.com/docs/reference/pipes)**:
|
|
34
|
+
- Added model `DataIntegrationCredentials`
|
|
35
|
+
- Added model `DataIntegrationConfigurationResponse`
|
|
36
|
+
- Added model `DataIntegrationConfigurationListResponse`
|
|
37
|
+
- Added model `ConfigureDataIntegrationBody`
|
|
38
|
+
- Added `auth_methods` to `DataIntegrationsListResponseData`
|
|
39
|
+
- Added `auth_method` to `DataIntegrationsListResponseDataConnectedAccount`
|
|
40
|
+
- Added `api_key_last_4` to `DataIntegrationsListResponseDataConnectedAccount`
|
|
41
|
+
- Added enum `DataIntegrationCredentialsCredentialsType`
|
|
42
|
+
- Added enum `DataIntegrationsListResponseDataAuthMethods`
|
|
43
|
+
- Added enum `DataIntegrationsListResponseDataConnectedAccountAuthMethod`
|
|
44
|
+
- Added service `PipesProvider`
|
|
45
|
+
- **[user_management](https://workos.com/docs/reference/authkit/user)**:
|
|
46
|
+
- Added model `UserInviteList`
|
|
47
|
+
- Added model `UserInviteListListMetadata`
|
|
48
|
+
- Made `AuthorizationCodeSessionAuthenticateRequest.client_secret` optional
|
|
49
|
+
- Made `RefreshTokenSessionAuthenticateRequest.client_secret` optional
|
|
50
|
+
- **[widgets](https://workos.com/docs/reference/widgets)**:
|
|
51
|
+
- Added `widgets:pipes:manage` to `WidgetSessionTokenScopes`
|
|
52
|
+
|
|
53
|
+
**Fixes**
|
|
54
|
+
- **[organization_membership](https://workos.com/docs/reference/authkit/organization-membership)**:
|
|
55
|
+
- Changed response of `UserManagementOrganizationMembership.list` from `UserOrganizationMembership` to `UserOrganizationMembershipList`
|
|
56
|
+
- **[user_management](https://workos.com/docs/reference/authkit/user)**:
|
|
57
|
+
- Changed response of `UserManagementInvitations.list` from `UserInvite` to `UserInviteList`
|
|
58
|
+
|
|
59
|
+
## [9.1.0](https://github.com/workos/workos-ruby/compare/v9.0.0...v9.1.0) (2026-06-17)
|
|
60
|
+
|
|
61
|
+
### Bug Fixes
|
|
62
|
+
|
|
63
|
+
* **renovate:** explicitly enable minor and patch updates ([#493](https://github.com/workos/workos-ruby/issues/493)) ([c6da3f3](https://github.com/workos/workos-ruby/commit/c6da3f3acdf4dd7a6a65b3ae6463102ff0c024e1))
|
|
64
|
+
* Use Thread.current[] instead of Fiber[] for connection cache ([#499](https://github.com/workos/workos-ruby/issues/499)) ([a44d650](https://github.com/workos/workos-ruby/commit/a44d6500b29d05fe7a5a0ac7449d1a4bee88fd38))
|
|
65
|
+
|
|
66
|
+
- [#495](https://github.com/workos/workos-ruby/pull/495) feat(generated): regenerate from spec (8 changes)
|
|
67
|
+
|
|
68
|
+
**Features**
|
|
69
|
+
- **[api_keys](https://workos.com/docs/reference/authkit/api-keys)**:
|
|
70
|
+
- Added model `ExpireApiKey`
|
|
71
|
+
- Added model `ApiKeyUpdated`
|
|
72
|
+
- Added model `ApiKeyUpdatedData`
|
|
73
|
+
- Added model `ApiKeyUpdatedDataOwner`
|
|
74
|
+
- Added model `UserApiKeyUpdatedDataOwner`
|
|
75
|
+
- Added model `ApiKeyUpdatedDataPreviousAttribute`
|
|
76
|
+
- Added endpoint `POST /api_keys/{id}/expire`
|
|
77
|
+
- **[audit_logs](https://workos.com/docs/reference/audit-logs)**:
|
|
78
|
+
- Added `Snowflake` to `AuditLogConfigurationLogStreamType`
|
|
79
|
+
- **[connect](https://workos.com/docs/reference/workos-connect/standalone)**:
|
|
80
|
+
- Added `name` to `UserObject`
|
|
81
|
+
- **[directory_sync](https://workos.com/docs/reference/directory-sync)**:
|
|
82
|
+
- Added model `DsyncTokenCreated`
|
|
83
|
+
- Added model `DsyncTokenCreatedData`
|
|
84
|
+
- Added model `DsyncTokenRevoked`
|
|
85
|
+
- Added model `DsyncTokenRevokedData`
|
|
86
|
+
- **[user_management](https://workos.com/docs/reference/authkit/user)**:
|
|
87
|
+
- Added `name` to user management models
|
|
88
|
+
- **[webhooks](https://workos.com/docs/reference/webhooks)**:
|
|
89
|
+
- Added `api_key.updated` to `CreateWebhookEndpointEvents`
|
|
90
|
+
- Added `api_key.updated` to `UpdateWebhookEndpointEvents`
|
|
91
|
+
|
|
3
92
|
## [9.0.0](https://github.com/workos/workos-ruby/compare/v8.0.1...v9.0.0) (2026-05-26)
|
|
4
93
|
|
|
5
94
|
### Bug Fixes
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
workos (9.
|
|
4
|
+
workos (9.2.0)
|
|
5
5
|
jwt (~> 3.1)
|
|
6
6
|
logger (~> 1.7)
|
|
7
7
|
zeitwerk (~> 2.6)
|
|
@@ -90,7 +90,7 @@ GEM
|
|
|
90
90
|
crack (>= 0.3.2)
|
|
91
91
|
hashdiff (>= 0.4.0, < 2.0.0)
|
|
92
92
|
webrick (1.9.2)
|
|
93
|
-
yard (0.9.
|
|
93
|
+
yard (0.9.44)
|
|
94
94
|
yard-markdown (0.7.1)
|
|
95
95
|
csv
|
|
96
96
|
rdoc
|
|
@@ -153,8 +153,8 @@ CHECKSUMS
|
|
|
153
153
|
unicode-emoji (4.2.0) sha256=519e69150f75652e40bf736106cfbc8f0f73aa3fb6a65afe62fefa7f80b0f80f
|
|
154
154
|
webmock (3.26.2) sha256=774556f2ea6371846cca68c01769b2eac0d134492d21f6d0ab5dd643965a4c90
|
|
155
155
|
webrick (1.9.2) sha256=beb4a15fc474defed24a3bda4ffd88a490d517c9e4e6118c3edce59e45864131
|
|
156
|
-
workos (9.
|
|
157
|
-
yard (0.9.
|
|
156
|
+
workos (9.2.0)
|
|
157
|
+
yard (0.9.44) sha256=eb087e9b631ccd887b049f303d489963945452d5e2a7eb49a5a74a7cf6887f28
|
|
158
158
|
yard-markdown (0.7.1) sha256=06c378632dfe7ba053be9ba469eb4701aa0470e36bcf7e5546f353eb90c1bfd1
|
|
159
159
|
zeitwerk (2.7.5) sha256=d8da92128c09ea6ec62c949011b00ed4a20242b255293dd66bf41545398f73dd
|
|
160
160
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# This file is auto-generated by oagen. Do not edit.
|
|
4
4
|
|
|
5
5
|
module WorkOS
|
|
6
|
-
class
|
|
6
|
+
class ApiKeyUpdated < WorkOS::Types::BaseModel
|
|
7
7
|
HASH_ATTRS = {
|
|
8
8
|
object: :object,
|
|
9
9
|
id: :id,
|
|
@@ -26,7 +26,7 @@ module WorkOS
|
|
|
26
26
|
@object = hash[:object]
|
|
27
27
|
@id = hash[:id]
|
|
28
28
|
@event = hash[:event]
|
|
29
|
-
@data = hash[:data] ? WorkOS::
|
|
29
|
+
@data = hash[:data] ? WorkOS::ApiKeyUpdatedData.new(hash[:data]) : nil
|
|
30
30
|
@created_at = hash[:created_at]
|
|
31
31
|
@context = hash[:context] ? WorkOS::EventContext.new(hash[:context]) : nil
|
|
32
32
|
end
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
module WorkOS
|
|
6
|
+
class ApiKeyUpdatedData < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
object: :object,
|
|
9
|
+
id: :id,
|
|
10
|
+
owner: :owner,
|
|
11
|
+
name: :name,
|
|
12
|
+
obfuscated_value: :obfuscated_value,
|
|
13
|
+
last_used_at: :last_used_at,
|
|
14
|
+
expires_at: :expires_at,
|
|
15
|
+
permissions: :permissions,
|
|
16
|
+
created_at: :created_at,
|
|
17
|
+
updated_at: :updated_at,
|
|
18
|
+
previous_attributes: :previous_attributes
|
|
19
|
+
}.freeze
|
|
20
|
+
|
|
21
|
+
attr_accessor \
|
|
22
|
+
:object,
|
|
23
|
+
:id,
|
|
24
|
+
:owner,
|
|
25
|
+
:name,
|
|
26
|
+
:obfuscated_value,
|
|
27
|
+
:last_used_at,
|
|
28
|
+
:expires_at,
|
|
29
|
+
:permissions,
|
|
30
|
+
:created_at,
|
|
31
|
+
:updated_at,
|
|
32
|
+
:previous_attributes
|
|
33
|
+
|
|
34
|
+
def initialize(json)
|
|
35
|
+
hash = self.class.normalize(json)
|
|
36
|
+
@object = hash[:object]
|
|
37
|
+
@id = hash[:id]
|
|
38
|
+
@owner = hash[:owner] ? (case hash[:owner][:type] when "organization" then WorkOS::ApiKeyUpdatedDataOwner.new(hash[:owner]) when "user" then WorkOS::UserApiKeyUpdatedDataOwner.new(hash[:owner]) else hash[:owner] end) : nil
|
|
39
|
+
@name = hash[:name]
|
|
40
|
+
@obfuscated_value = hash[:obfuscated_value]
|
|
41
|
+
@last_used_at = hash[:last_used_at]
|
|
42
|
+
@expires_at = hash[:expires_at]
|
|
43
|
+
@permissions = hash[:permissions] || []
|
|
44
|
+
@created_at = hash[:created_at]
|
|
45
|
+
@updated_at = hash[:updated_at]
|
|
46
|
+
@previous_attributes = hash[:previous_attributes] ? WorkOS::ApiKeyUpdatedDataPreviousAttribute.new(hash[:previous_attributes]) : nil
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
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 ApiKeyUpdatedDataPreviousAttribute < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
expires_at: :expires_at
|
|
9
|
+
}.freeze
|
|
10
|
+
|
|
11
|
+
attr_accessor :expires_at
|
|
12
|
+
|
|
13
|
+
def initialize(json)
|
|
14
|
+
hash = self.class.normalize(json)
|
|
15
|
+
@expires_at = hash[:expires_at]
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
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 ExpireApiKey < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
expires_at: :expires_at
|
|
9
|
+
}.freeze
|
|
10
|
+
|
|
11
|
+
attr_accessor :expires_at
|
|
12
|
+
|
|
13
|
+
def initialize(json)
|
|
14
|
+
hash = self.class.normalize(json)
|
|
15
|
+
@expires_at = hash[:expires_at]
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
data/lib/workos/api_keys.rb
CHANGED
|
@@ -127,5 +127,30 @@ module WorkOS
|
|
|
127
127
|
)
|
|
128
128
|
nil
|
|
129
129
|
end
|
|
130
|
+
|
|
131
|
+
# Expire an API key
|
|
132
|
+
# @param id [String] The unique ID of the API key.
|
|
133
|
+
# @param expires_at [String, nil] When the API key should expire. If omitted or in the past, the key expires immediately. Use null to clear a scheduled future expiration.
|
|
134
|
+
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
135
|
+
# @return [WorkOS::ApiKey]
|
|
136
|
+
def create_api_key_expire(
|
|
137
|
+
id:,
|
|
138
|
+
expires_at: nil,
|
|
139
|
+
request_options: {}
|
|
140
|
+
)
|
|
141
|
+
body = {
|
|
142
|
+
"expires_at" => expires_at
|
|
143
|
+
}.compact
|
|
144
|
+
response = @client.request(
|
|
145
|
+
method: :post,
|
|
146
|
+
path: "/api_keys/#{WorkOS::Util.encode_path(id)}/expire",
|
|
147
|
+
auth: true,
|
|
148
|
+
body: body,
|
|
149
|
+
request_options: request_options
|
|
150
|
+
)
|
|
151
|
+
result = WorkOS::ApiKey.new(response.body)
|
|
152
|
+
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"])
|
|
153
|
+
result
|
|
154
|
+
end
|
|
130
155
|
end
|
|
131
156
|
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 GroupRoleAssignment < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
object: :object,
|
|
9
|
+
id: :id,
|
|
10
|
+
group_id: :group_id,
|
|
11
|
+
role: :role,
|
|
12
|
+
resource: :resource,
|
|
13
|
+
created_at: :created_at,
|
|
14
|
+
updated_at: :updated_at
|
|
15
|
+
}.freeze
|
|
16
|
+
|
|
17
|
+
attr_accessor \
|
|
18
|
+
:object,
|
|
19
|
+
:id,
|
|
20
|
+
:group_id,
|
|
21
|
+
:role,
|
|
22
|
+
:resource,
|
|
23
|
+
:created_at,
|
|
24
|
+
:updated_at
|
|
25
|
+
|
|
26
|
+
def initialize(json)
|
|
27
|
+
hash = self.class.normalize(json)
|
|
28
|
+
@object = hash[:object]
|
|
29
|
+
@id = hash[:id]
|
|
30
|
+
@group_id = hash[:group_id]
|
|
31
|
+
@role = hash[:role] ? WorkOS::SlimRole.new(hash[:role]) : nil
|
|
32
|
+
@resource = hash[:resource] ? WorkOS::GroupRoleAssignmentResource.new(hash[:resource]) : nil
|
|
33
|
+
@created_at = hash[:created_at]
|
|
34
|
+
@updated_at = hash[:updated_at]
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
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 GroupRoleAssignmentList < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
object: :object,
|
|
9
|
+
data: :data,
|
|
10
|
+
list_metadata: :list_metadata
|
|
11
|
+
}.freeze
|
|
12
|
+
|
|
13
|
+
attr_accessor \
|
|
14
|
+
:object,
|
|
15
|
+
:data,
|
|
16
|
+
:list_metadata
|
|
17
|
+
|
|
18
|
+
def initialize(json)
|
|
19
|
+
hash = self.class.normalize(json)
|
|
20
|
+
@object = hash[:object]
|
|
21
|
+
@data = (hash[:data] || []).map { |item| item ? WorkOS::GroupRoleAssignment.new(item) : nil }
|
|
22
|
+
@list_metadata = hash[:list_metadata] ? WorkOS::ListMetadata.new(hash[:list_metadata]) : nil
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
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 GroupRoleAssignmentResource < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
id: :id,
|
|
9
|
+
external_id: :external_id,
|
|
10
|
+
resource_type_slug: :resource_type_slug
|
|
11
|
+
}.freeze
|
|
12
|
+
|
|
13
|
+
attr_accessor \
|
|
14
|
+
:id,
|
|
15
|
+
:external_id,
|
|
16
|
+
:resource_type_slug
|
|
17
|
+
|
|
18
|
+
def initialize(json)
|
|
19
|
+
hash = self.class.normalize(json)
|
|
20
|
+
@id = hash[:id]
|
|
21
|
+
@external_id = hash[:external_id]
|
|
22
|
+
@resource_type_slug = hash[:resource_type_slug]
|
|
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 ReplaceGroupRoleAssignments < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
role_assignments: :role_assignments
|
|
9
|
+
}.freeze
|
|
10
|
+
|
|
11
|
+
attr_accessor :role_assignments
|
|
12
|
+
|
|
13
|
+
def initialize(json)
|
|
14
|
+
hash = self.class.normalize(json)
|
|
15
|
+
@role_assignments = (hash[:role_assignments] || []).map { |item| item ? WorkOS::ReplaceGroupRoleAssignmentEntry.new(item) : nil }
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -3,23 +3,5 @@
|
|
|
3
3
|
# This file is auto-generated by oagen. Do not edit.
|
|
4
4
|
|
|
5
5
|
module WorkOS
|
|
6
|
-
|
|
7
|
-
HASH_ATTRS = {
|
|
8
|
-
id: :id,
|
|
9
|
-
external_id: :external_id,
|
|
10
|
-
resource_type_slug: :resource_type_slug
|
|
11
|
-
}.freeze
|
|
12
|
-
|
|
13
|
-
attr_accessor \
|
|
14
|
-
:id,
|
|
15
|
-
:external_id,
|
|
16
|
-
:resource_type_slug
|
|
17
|
-
|
|
18
|
-
def initialize(json)
|
|
19
|
-
hash = self.class.normalize(json)
|
|
20
|
-
@id = hash[:id]
|
|
21
|
-
@external_id = hash[:external_id]
|
|
22
|
-
@resource_type_slug = hash[:resource_type_slug]
|
|
23
|
-
end
|
|
24
|
-
end
|
|
6
|
+
UserRoleAssignmentResource = GroupRoleAssignmentResource
|
|
25
7
|
end
|