workos 7.1.2 → 8.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/docs.yml +46 -0
- data/.gitignore +2 -0
- data/.last-synced-sha +1 -1
- data/.oagen-manifest.json +61 -40
- data/.release-please-manifest.json +1 -1
- data/.yardopts +6 -0
- data/CHANGELOG.md +29 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +33 -2
- data/lib/workos/api_keys/api_key.rb +1 -1
- data/lib/workos/api_keys/api_key_created_data.rb +1 -1
- data/lib/workos/api_keys/organization_api_key.rb +43 -0
- data/lib/workos/{types/events_order.rb → api_keys/organization_api_key_owner.rb} +1 -3
- data/lib/workos/api_keys/organization_api_key_with_value.rb +46 -0
- data/lib/workos/{types/audit_logs_order.rb → api_keys/organization_api_key_with_value_owner.rb} +1 -3
- data/lib/workos/api_keys.rb +46 -46
- data/lib/workos/audit_logs.rb +4 -4
- data/lib/workos/authorization/user_organization_membership_base_list_data.rb +5 -2
- data/lib/workos/authorization/{role_assignment.rb → user_role_assignment.rb} +5 -2
- data/lib/workos/authorization/{role_assignment_resource.rb → user_role_assignment_resource.rb} +1 -1
- data/lib/workos/authorization.rb +122 -22
- data/lib/workos/client.rb +4 -4
- data/lib/workos/connect.rb +2 -2
- data/lib/workos/directory_sync/directory_user.rb +3 -0
- data/lib/workos/directory_sync/directory_user_with_groups.rb +4 -1
- data/lib/workos/directory_sync/dsync_user_updated_data.rb +3 -0
- data/lib/workos/directory_sync.rb +6 -6
- data/lib/workos/events.rb +2 -2
- data/lib/workos/feature_flags.rb +6 -6
- data/lib/workos/groups.rb +4 -4
- data/lib/workos/multi_factor_auth.rb +2 -2
- data/lib/workos/organizations.rb +2 -2
- data/lib/workos/sso/profile.rb +3 -0
- data/lib/workos/sso.rb +2 -2
- data/lib/workos/types/event_context_actor_source.rb +2 -1
- data/lib/workos/types/{applications_order.rb → pagination_order.rb} +1 -1
- data/lib/workos/types/{vault_byok_key_verification_completed_data_key_provider.rb → vault_byok_key_provider.rb} +1 -1
- data/lib/workos/user_management/create_user_api_key.rb +25 -0
- data/lib/workos/user_management/organization_membership.rb +5 -2
- data/lib/workos/user_management/user_api_key.rb +43 -0
- data/lib/workos/user_management/user_api_key_created_data_owner.rb +25 -0
- data/lib/workos/{api_keys/api_key_with_value_owner.rb → user_management/user_api_key_owner.rb} +1 -1
- data/lib/workos/{types/webhooks_order.rb → user_management/user_api_key_revoked_data_owner.rb} +1 -3
- data/lib/workos/{api_keys/api_key_with_value.rb → user_management/user_api_key_with_value.rb} +2 -2
- data/lib/workos/{types/groups_order.rb → user_management/user_api_key_with_value_owner.rb} +1 -3
- data/lib/workos/user_management/user_organization_membership.rb +5 -2
- data/lib/workos/user_management.rb +107 -10
- data/lib/workos/user_management_organization_membership_groups.rb +2 -2
- data/lib/workos/vault/vault_byok_key_deleted.rb +34 -0
- data/lib/workos/vault/vault_byok_key_deleted_data.rb +22 -0
- data/lib/workos/version.rb +1 -1
- data/lib/workos/webhooks.rb +2 -2
- data/rbi/workos/api_key.rbi +2 -2
- data/rbi/workos/api_key_created_data.rbi +2 -2
- data/rbi/workos/api_key_revoked_data.rbi +2 -2
- data/rbi/workos/api_keys.rbi +17 -17
- data/rbi/workos/authorization.rbi +27 -1
- data/rbi/workos/client.rbi +3 -3
- data/rbi/workos/create_user_api_key.rbi +36 -0
- data/rbi/workos/directory_user.rbi +6 -0
- data/rbi/workos/directory_user_with_groups.rbi +6 -0
- data/rbi/workos/dsync_user_updated_data.rbi +6 -0
- data/rbi/workos/organization_api_key.rbi +72 -0
- data/rbi/workos/{api_key_with_value_owner.rbi → organization_api_key_owner.rbi} +1 -1
- data/rbi/workos/organization_api_key_with_value.rbi +78 -0
- data/rbi/workos/organization_api_key_with_value_owner.rbi +30 -0
- data/rbi/workos/organization_membership.rbi +6 -0
- data/rbi/workos/profile.rbi +6 -0
- data/rbi/workos/user_api_key.rbi +72 -0
- data/rbi/workos/user_api_key_created_data_owner.rbi +36 -0
- data/rbi/workos/user_api_key_owner.rbi +36 -0
- data/rbi/workos/user_api_key_revoked_data_owner.rbi +36 -0
- data/rbi/workos/{api_key_with_value.rbi → user_api_key_with_value.rbi} +3 -3
- data/rbi/workos/user_api_key_with_value_owner.rbi +36 -0
- data/rbi/workos/user_management.rbi +31 -0
- data/rbi/workos/user_organization_membership.rbi +6 -0
- data/rbi/workos/user_organization_membership_base_list_data.rbi +6 -0
- data/rbi/workos/{role_assignment.rbi → user_role_assignment.rbi} +9 -3
- data/rbi/workos/{role_assignment_resource.rbi → user_role_assignment_resource.rbi} +1 -1
- data/rbi/workos/vault_byok_key_deleted.rbi +54 -0
- data/rbi/workos/vault_byok_key_deleted_data.rbi +30 -0
- data/script/docs +16 -0
- data/script/docs-serve +12 -0
- data/script/llms-txt +37 -0
- data/test/workos/test_api_keys.rb +17 -17
- data/test/workos/test_authorization.rb +16 -0
- data/test/workos/test_model_round_trip.rb +278 -83
- data/test/workos/test_user_management.rb +25 -1
- metadata +38 -32
- data/lib/workos/types/authorization_order.rb +0 -9
- data/lib/workos/types/connections_order.rb +0 -9
- data/lib/workos/types/directories_order.rb +0 -9
- data/lib/workos/types/directory_groups_order.rb +0 -9
- data/lib/workos/types/directory_users_order.rb +0 -9
- data/lib/workos/types/feature_flags_order.rb +0 -9
- data/lib/workos/types/organizations_api_keys_order.rb +0 -9
- data/lib/workos/types/organizations_feature_flags_order.rb +0 -9
- data/lib/workos/types/organizations_order.rb +0 -9
- data/lib/workos/types/permissions_order.rb +0 -9
- data/lib/workos/types/user_management_invitations_order.rb +0 -9
- data/lib/workos/types/user_management_multi_factor_authentication_order.rb +0 -9
- data/lib/workos/types/user_management_organization_membership_groups_order.rb +0 -9
- data/lib/workos/types/user_management_organization_membership_order.rb +0 -9
- data/lib/workos/types/user_management_users_authorized_applications_order.rb +0 -9
- data/lib/workos/types/user_management_users_feature_flags_order.rb +0 -9
- data/lib/workos/types/user_management_users_order.rb +0 -9
|
@@ -13,6 +13,7 @@ module WorkOS
|
|
|
13
13
|
email: :email,
|
|
14
14
|
first_name: :first_name,
|
|
15
15
|
last_name: :last_name,
|
|
16
|
+
name: :name,
|
|
16
17
|
emails: :emails,
|
|
17
18
|
job_title: :job_title,
|
|
18
19
|
username: :username,
|
|
@@ -44,6 +45,7 @@ module WorkOS
|
|
|
44
45
|
:email,
|
|
45
46
|
:first_name,
|
|
46
47
|
:last_name,
|
|
48
|
+
:name,
|
|
47
49
|
:state,
|
|
48
50
|
:custom_attributes,
|
|
49
51
|
:role,
|
|
@@ -90,6 +92,7 @@ module WorkOS
|
|
|
90
92
|
@email = hash[:email]
|
|
91
93
|
@first_name = hash[:first_name]
|
|
92
94
|
@last_name = hash[:last_name]
|
|
95
|
+
@name = hash[:name]
|
|
93
96
|
@emails = (hash[:emails] || []).map { |item| item ? WorkOS::DsyncUserUpdatedDataEmail.new(item) : nil }
|
|
94
97
|
@job_title = hash[:job_title]
|
|
95
98
|
@username = hash[:username]
|
|
@@ -14,7 +14,7 @@ module WorkOS
|
|
|
14
14
|
# @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.
|
|
15
15
|
# @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.
|
|
16
16
|
# @param limit [Integer, nil] Upper limit on the number of objects to return, between `1` and `100`.
|
|
17
|
-
# @param order [WorkOS::Types::
|
|
17
|
+
# @param order [WorkOS::Types::PaginationOrder, nil] Order the results by the creation time.
|
|
18
18
|
# @param organization_id [String, nil] Filter Directories by their associated organization.
|
|
19
19
|
# @param search [String, nil] Searchable text to match against Directory names.
|
|
20
20
|
# @param domain [String, nil] (deprecated) Filter Directories by their associated domain.
|
|
@@ -23,7 +23,7 @@ module WorkOS
|
|
|
23
23
|
def list_directories(
|
|
24
24
|
before: nil,
|
|
25
25
|
after: nil,
|
|
26
|
-
limit:
|
|
26
|
+
limit: 10,
|
|
27
27
|
order: "desc",
|
|
28
28
|
organization_id: nil,
|
|
29
29
|
search: nil,
|
|
@@ -106,7 +106,7 @@ module WorkOS
|
|
|
106
106
|
# @param before [String, nil] An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `before="obj_123"` to fetch a new batch of objects before `"obj_123"`.
|
|
107
107
|
# @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"`.
|
|
108
108
|
# @param limit [Integer, nil] Upper limit on the number of objects to return, between `1` and `100`.
|
|
109
|
-
# @param order [WorkOS::Types::
|
|
109
|
+
# @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.
|
|
110
110
|
# @param directory [String, nil] Unique identifier of the WorkOS Directory. This value can be obtained from the WorkOS dashboard or from the WorkOS API.
|
|
111
111
|
# @param user [String, nil] Unique identifier of the WorkOS Directory User. This value can be obtained from the WorkOS API.
|
|
112
112
|
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
@@ -114,7 +114,7 @@ module WorkOS
|
|
|
114
114
|
def list_groups(
|
|
115
115
|
before: nil,
|
|
116
116
|
after: nil,
|
|
117
|
-
limit:
|
|
117
|
+
limit: 10,
|
|
118
118
|
order: "desc",
|
|
119
119
|
directory: nil,
|
|
120
120
|
user: nil,
|
|
@@ -177,7 +177,7 @@ module WorkOS
|
|
|
177
177
|
# @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"`.
|
|
178
178
|
# @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"`.
|
|
179
179
|
# @param limit [Integer, nil] Upper limit on the number of objects to return, between `1` and `100`.
|
|
180
|
-
# @param order [WorkOS::Types::
|
|
180
|
+
# @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.
|
|
181
181
|
# @param directory [String, nil] Unique identifier of the WorkOS Directory. This value can be obtained from the WorkOS dashboard or from the WorkOS API.
|
|
182
182
|
# @param group [String, nil] Unique identifier of the WorkOS Directory Group. This value can be obtained from the WorkOS API.
|
|
183
183
|
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
@@ -185,7 +185,7 @@ module WorkOS
|
|
|
185
185
|
def list_users(
|
|
186
186
|
before: nil,
|
|
187
187
|
after: nil,
|
|
188
|
-
limit:
|
|
188
|
+
limit: 10,
|
|
189
189
|
order: "desc",
|
|
190
190
|
directory: nil,
|
|
191
191
|
group: nil,
|
data/lib/workos/events.rb
CHANGED
|
@@ -14,7 +14,7 @@ module WorkOS
|
|
|
14
14
|
# @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"`.
|
|
15
15
|
# @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"`.
|
|
16
16
|
# @param limit [Integer, nil] Upper limit on the number of objects to return, between `1` and `100`.
|
|
17
|
-
# @param order [WorkOS::Types::
|
|
17
|
+
# @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.
|
|
18
18
|
# @param events [Array<String>, nil] Filter events by one or more event types (e.g. `dsync.user.created`).
|
|
19
19
|
# @param range_start [String, nil] ISO-8601 date string to filter events created after this date.
|
|
20
20
|
# @param range_end [String, nil] ISO-8601 date string to filter events created before this date.
|
|
@@ -24,7 +24,7 @@ module WorkOS
|
|
|
24
24
|
def list_events(
|
|
25
25
|
before: nil,
|
|
26
26
|
after: nil,
|
|
27
|
-
limit:
|
|
27
|
+
limit: 10,
|
|
28
28
|
order: "desc",
|
|
29
29
|
events: nil,
|
|
30
30
|
range_start: nil,
|
data/lib/workos/feature_flags.rb
CHANGED
|
@@ -14,13 +14,13 @@ module WorkOS
|
|
|
14
14
|
# @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.
|
|
15
15
|
# @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.
|
|
16
16
|
# @param limit [Integer, nil] Upper limit on the number of objects to return, between `1` and `100`.
|
|
17
|
-
# @param order [WorkOS::Types::
|
|
17
|
+
# @param order [WorkOS::Types::PaginationOrder, nil] Order the results by the creation time.
|
|
18
18
|
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
19
19
|
# @return [WorkOS::Types::ListStruct<WorkOS::Flag>]
|
|
20
20
|
def list_feature_flags(
|
|
21
21
|
before: nil,
|
|
22
22
|
after: nil,
|
|
23
|
-
limit:
|
|
23
|
+
limit: 10,
|
|
24
24
|
order: "desc",
|
|
25
25
|
request_options: {}
|
|
26
26
|
)
|
|
@@ -154,14 +154,14 @@ module WorkOS
|
|
|
154
154
|
# @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.
|
|
155
155
|
# @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.
|
|
156
156
|
# @param limit [Integer, nil] Upper limit on the number of objects to return, between `1` and `100`.
|
|
157
|
-
# @param order [WorkOS::Types::
|
|
157
|
+
# @param order [WorkOS::Types::PaginationOrder, nil] Order the results by the creation time.
|
|
158
158
|
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
159
159
|
# @return [WorkOS::Types::ListStruct<WorkOS::Flag>]
|
|
160
160
|
def list_organization_feature_flags(
|
|
161
161
|
organization_id:,
|
|
162
162
|
before: nil,
|
|
163
163
|
after: nil,
|
|
164
|
-
limit:
|
|
164
|
+
limit: 10,
|
|
165
165
|
order: "desc",
|
|
166
166
|
request_options: {}
|
|
167
167
|
)
|
|
@@ -201,14 +201,14 @@ module WorkOS
|
|
|
201
201
|
# @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.
|
|
202
202
|
# @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.
|
|
203
203
|
# @param limit [Integer, nil] Upper limit on the number of objects to return, between `1` and `100`.
|
|
204
|
-
# @param order [WorkOS::Types::
|
|
204
|
+
# @param order [WorkOS::Types::PaginationOrder, nil] Order the results by the creation time.
|
|
205
205
|
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
206
206
|
# @return [WorkOS::Types::ListStruct<WorkOS::Flag>]
|
|
207
207
|
def list_user_feature_flags(
|
|
208
208
|
user_id:,
|
|
209
209
|
before: nil,
|
|
210
210
|
after: nil,
|
|
211
|
-
limit:
|
|
211
|
+
limit: 10,
|
|
212
212
|
order: "desc",
|
|
213
213
|
request_options: {}
|
|
214
214
|
)
|
data/lib/workos/groups.rb
CHANGED
|
@@ -15,14 +15,14 @@ module WorkOS
|
|
|
15
15
|
# @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"`.
|
|
16
16
|
# @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"`.
|
|
17
17
|
# @param limit [Integer, nil] Upper limit on the number of objects to return, between `1` and `100`.
|
|
18
|
-
# @param order [WorkOS::Types::
|
|
18
|
+
# @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.
|
|
19
19
|
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
20
20
|
# @return [WorkOS::Types::ListStruct<WorkOS::Group>]
|
|
21
21
|
def list_organization_groups(
|
|
22
22
|
organization_id:,
|
|
23
23
|
before: nil,
|
|
24
24
|
after: nil,
|
|
25
|
-
limit:
|
|
25
|
+
limit: 10,
|
|
26
26
|
order: "desc",
|
|
27
27
|
request_options: {}
|
|
28
28
|
)
|
|
@@ -161,7 +161,7 @@ module WorkOS
|
|
|
161
161
|
# @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"`.
|
|
162
162
|
# @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"`.
|
|
163
163
|
# @param limit [Integer, nil] Upper limit on the number of objects to return, between `1` and `100`.
|
|
164
|
-
# @param order [WorkOS::Types::
|
|
164
|
+
# @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.
|
|
165
165
|
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
166
166
|
# @return [WorkOS::Types::ListStruct<WorkOS::UserOrganizationMembershipBaseListData>]
|
|
167
167
|
def list_group_organization_memberships(
|
|
@@ -169,7 +169,7 @@ module WorkOS
|
|
|
169
169
|
group_id:,
|
|
170
170
|
before: nil,
|
|
171
171
|
after: nil,
|
|
172
|
-
limit:
|
|
172
|
+
limit: 10,
|
|
173
173
|
order: "desc",
|
|
174
174
|
request_options: {}
|
|
175
175
|
)
|
|
@@ -136,14 +136,14 @@ module WorkOS
|
|
|
136
136
|
# @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.
|
|
137
137
|
# @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.
|
|
138
138
|
# @param limit [Integer, nil] Upper limit on the number of objects to return, between `1` and `100`.
|
|
139
|
-
# @param order [WorkOS::Types::
|
|
139
|
+
# @param order [WorkOS::Types::PaginationOrder, nil] Order the results by the creation time.
|
|
140
140
|
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
141
141
|
# @return [WorkOS::Types::ListStruct<WorkOS::AuthenticationFactor>]
|
|
142
142
|
def list_user_auth_factors(
|
|
143
143
|
userland_user_id:,
|
|
144
144
|
before: nil,
|
|
145
145
|
after: nil,
|
|
146
|
-
limit:
|
|
146
|
+
limit: 10,
|
|
147
147
|
order: "desc",
|
|
148
148
|
request_options: {}
|
|
149
149
|
)
|
data/lib/workos/organizations.rb
CHANGED
|
@@ -14,7 +14,7 @@ module WorkOS
|
|
|
14
14
|
# @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"`.
|
|
15
15
|
# @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"`.
|
|
16
16
|
# @param limit [Integer, nil] Upper limit on the number of objects to return, between `1` and `100`.
|
|
17
|
-
# @param order [WorkOS::Types::
|
|
17
|
+
# @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.
|
|
18
18
|
# @param domains [Array<String>, nil] The domains of an Organization. Any Organization with a matching domain will be returned.
|
|
19
19
|
# @param search [String, nil] Searchable text for an Organization. Matches against the organization name.
|
|
20
20
|
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
@@ -22,7 +22,7 @@ module WorkOS
|
|
|
22
22
|
def list_organizations(
|
|
23
23
|
before: nil,
|
|
24
24
|
after: nil,
|
|
25
|
-
limit:
|
|
25
|
+
limit: 10,
|
|
26
26
|
order: "desc",
|
|
27
27
|
domains: nil,
|
|
28
28
|
search: nil,
|
data/lib/workos/sso/profile.rb
CHANGED
|
@@ -14,6 +14,7 @@ module WorkOS
|
|
|
14
14
|
email: :email,
|
|
15
15
|
first_name: :first_name,
|
|
16
16
|
last_name: :last_name,
|
|
17
|
+
name: :name,
|
|
17
18
|
role: :role,
|
|
18
19
|
roles: :roles,
|
|
19
20
|
groups: :groups,
|
|
@@ -31,6 +32,7 @@ module WorkOS
|
|
|
31
32
|
:email,
|
|
32
33
|
:first_name,
|
|
33
34
|
:last_name,
|
|
35
|
+
:name,
|
|
34
36
|
:role,
|
|
35
37
|
:roles,
|
|
36
38
|
:groups,
|
|
@@ -48,6 +50,7 @@ module WorkOS
|
|
|
48
50
|
@email = hash[:email]
|
|
49
51
|
@first_name = hash[:first_name]
|
|
50
52
|
@last_name = hash[:last_name]
|
|
53
|
+
@name = hash[:name]
|
|
51
54
|
@role = hash[:role] ? WorkOS::SlimRole.new(hash[:role]) : nil
|
|
52
55
|
@roles = (hash[:roles] || []).map { |item| item ? WorkOS::SlimRole.new(item) : nil }
|
|
53
56
|
@groups = hash[:groups] || []
|
data/lib/workos/sso.rb
CHANGED
|
@@ -14,7 +14,7 @@ module WorkOS
|
|
|
14
14
|
# @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.
|
|
15
15
|
# @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.
|
|
16
16
|
# @param limit [Integer, nil] Upper limit on the number of objects to return, between `1` and `100`.
|
|
17
|
-
# @param order [WorkOS::Types::
|
|
17
|
+
# @param order [WorkOS::Types::PaginationOrder, nil] Order the results by the creation time.
|
|
18
18
|
# @param connection_type [WorkOS::Types::ConnectionsConnectionType, nil] Filter Connections by their type.
|
|
19
19
|
# @param domain [String, nil] Filter Connections by their associated domain.
|
|
20
20
|
# @param organization_id [String, nil] Filter Connections by their associated organization.
|
|
@@ -24,7 +24,7 @@ module WorkOS
|
|
|
24
24
|
def list_connections(
|
|
25
25
|
before: nil,
|
|
26
26
|
after: nil,
|
|
27
|
-
limit:
|
|
27
|
+
limit: 10,
|
|
28
28
|
order: "desc",
|
|
29
29
|
connection_type: nil,
|
|
30
30
|
domain: nil,
|
|
@@ -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 CreateUserApiKey < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
name: :name,
|
|
9
|
+
organization_id: :organization_id,
|
|
10
|
+
permissions: :permissions
|
|
11
|
+
}.freeze
|
|
12
|
+
|
|
13
|
+
attr_accessor \
|
|
14
|
+
:name,
|
|
15
|
+
:organization_id,
|
|
16
|
+
:permissions
|
|
17
|
+
|
|
18
|
+
def initialize(json)
|
|
19
|
+
hash = self.class.normalize(json)
|
|
20
|
+
@name = hash[:name]
|
|
21
|
+
@organization_id = hash[:organization_id]
|
|
22
|
+
@permissions = hash[:permissions] || []
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -15,7 +15,8 @@ module WorkOS
|
|
|
15
15
|
custom_attributes: :custom_attributes,
|
|
16
16
|
created_at: :created_at,
|
|
17
17
|
updated_at: :updated_at,
|
|
18
|
-
role: :role
|
|
18
|
+
role: :role,
|
|
19
|
+
user: :user
|
|
19
20
|
}.freeze
|
|
20
21
|
|
|
21
22
|
attr_accessor \
|
|
@@ -29,7 +30,8 @@ module WorkOS
|
|
|
29
30
|
:custom_attributes,
|
|
30
31
|
:created_at,
|
|
31
32
|
:updated_at,
|
|
32
|
-
:role
|
|
33
|
+
:role,
|
|
34
|
+
:user
|
|
33
35
|
|
|
34
36
|
def initialize(json)
|
|
35
37
|
hash = self.class.normalize(json)
|
|
@@ -44,6 +46,7 @@ module WorkOS
|
|
|
44
46
|
@created_at = hash[:created_at]
|
|
45
47
|
@updated_at = hash[:updated_at]
|
|
46
48
|
@role = hash[:role] ? WorkOS::SlimRole.new(hash[:role]) : nil
|
|
49
|
+
@user = hash[:user] ? WorkOS::User.new(hash[:user]) : nil
|
|
47
50
|
end
|
|
48
51
|
end
|
|
49
52
|
end
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
module WorkOS
|
|
6
|
+
class UserApiKey < 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
|
+
permissions: :permissions,
|
|
15
|
+
created_at: :created_at,
|
|
16
|
+
updated_at: :updated_at
|
|
17
|
+
}.freeze
|
|
18
|
+
|
|
19
|
+
attr_accessor \
|
|
20
|
+
:object,
|
|
21
|
+
:id,
|
|
22
|
+
:owner,
|
|
23
|
+
:name,
|
|
24
|
+
:obfuscated_value,
|
|
25
|
+
:last_used_at,
|
|
26
|
+
:permissions,
|
|
27
|
+
:created_at,
|
|
28
|
+
:updated_at
|
|
29
|
+
|
|
30
|
+
def initialize(json)
|
|
31
|
+
hash = self.class.normalize(json)
|
|
32
|
+
@object = hash[:object]
|
|
33
|
+
@id = hash[:id]
|
|
34
|
+
@owner = hash[:owner] ? WorkOS::UserApiKeyOwner.new(hash[:owner]) : nil
|
|
35
|
+
@name = hash[:name]
|
|
36
|
+
@obfuscated_value = hash[:obfuscated_value]
|
|
37
|
+
@last_used_at = hash[:last_used_at]
|
|
38
|
+
@permissions = hash[:permissions] || []
|
|
39
|
+
@created_at = hash[:created_at]
|
|
40
|
+
@updated_at = hash[:updated_at]
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
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 UserApiKeyCreatedDataOwner < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
type: :type,
|
|
9
|
+
id: :id,
|
|
10
|
+
organization_id: :organization_id
|
|
11
|
+
}.freeze
|
|
12
|
+
|
|
13
|
+
attr_accessor \
|
|
14
|
+
:type,
|
|
15
|
+
:id,
|
|
16
|
+
:organization_id
|
|
17
|
+
|
|
18
|
+
def initialize(json)
|
|
19
|
+
hash = self.class.normalize(json)
|
|
20
|
+
@type = hash[:type]
|
|
21
|
+
@id = hash[:id]
|
|
22
|
+
@organization_id = hash[:organization_id]
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
data/lib/workos/{api_keys/api_key_with_value.rb → user_management/user_api_key_with_value.rb}
RENAMED
|
@@ -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 UserApiKeyWithValue < WorkOS::Types::BaseModel
|
|
7
7
|
HASH_ATTRS = {
|
|
8
8
|
object: :object,
|
|
9
9
|
id: :id,
|
|
@@ -33,7 +33,7 @@ module WorkOS
|
|
|
33
33
|
hash = self.class.normalize(json)
|
|
34
34
|
@object = hash[:object]
|
|
35
35
|
@id = hash[:id]
|
|
36
|
-
@owner = hash[:owner] ? WorkOS::
|
|
36
|
+
@owner = hash[:owner] ? WorkOS::UserApiKeyWithValueOwner.new(hash[:owner]) : nil
|
|
37
37
|
@name = hash[:name]
|
|
38
38
|
@obfuscated_value = hash[:obfuscated_value]
|
|
39
39
|
@last_used_at = hash[:last_used_at]
|
|
@@ -15,7 +15,8 @@ module WorkOS
|
|
|
15
15
|
custom_attributes: :custom_attributes,
|
|
16
16
|
created_at: :created_at,
|
|
17
17
|
updated_at: :updated_at,
|
|
18
|
-
role: :role
|
|
18
|
+
role: :role,
|
|
19
|
+
user: :user
|
|
19
20
|
}.freeze
|
|
20
21
|
|
|
21
22
|
attr_accessor \
|
|
@@ -29,7 +30,8 @@ module WorkOS
|
|
|
29
30
|
:custom_attributes,
|
|
30
31
|
:created_at,
|
|
31
32
|
:updated_at,
|
|
32
|
-
:role
|
|
33
|
+
:role,
|
|
34
|
+
:user
|
|
33
35
|
|
|
34
36
|
def initialize(json)
|
|
35
37
|
hash = self.class.normalize(json)
|
|
@@ -44,6 +46,7 @@ module WorkOS
|
|
|
44
46
|
@created_at = hash[:created_at]
|
|
45
47
|
@updated_at = hash[:updated_at]
|
|
46
48
|
@role = hash[:role] ? WorkOS::SlimRole.new(hash[:role]) : nil
|
|
49
|
+
@user = hash[:user] ? WorkOS::User.new(hash[:user]) : nil
|
|
47
50
|
end
|
|
48
51
|
end
|
|
49
52
|
end
|