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
|
@@ -580,7 +580,7 @@ module WorkOS
|
|
|
580
580
|
# @param before [String, nil] An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `before="obj_123"` to fetch a new batch of objects before `"obj_123"`.
|
|
581
581
|
# @param after [String, nil] An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `after="obj_123"` to fetch a new batch of objects after `"obj_123"`.
|
|
582
582
|
# @param limit [Integer, nil] Upper limit on the number of objects to return, between `1` and `100`.
|
|
583
|
-
# @param order [WorkOS::Types::
|
|
583
|
+
# @param order [WorkOS::Types::PaginationOrder, nil] Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to descending.
|
|
584
584
|
# @param organization [String, nil] (deprecated) Filter users by the organization they are a member of. Deprecated in favor of `organization_id`.
|
|
585
585
|
# @param organization_id [String, nil] Filter users by the organization they are a member of.
|
|
586
586
|
# @param email [String, nil] Filter users by their email address.
|
|
@@ -589,7 +589,7 @@ module WorkOS
|
|
|
589
589
|
def list_users(
|
|
590
590
|
before: nil,
|
|
591
591
|
after: nil,
|
|
592
|
-
limit:
|
|
592
|
+
limit: 10,
|
|
593
593
|
order: "desc",
|
|
594
594
|
organization: nil,
|
|
595
595
|
organization_id: nil,
|
|
@@ -911,14 +911,14 @@ module WorkOS
|
|
|
911
911
|
# @param before [String, nil] An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `before="obj_123"` to fetch a new batch of objects before `"obj_123"`.
|
|
912
912
|
# @param after [String, nil] An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `after="obj_123"` to fetch a new batch of objects after `"obj_123"`.
|
|
913
913
|
# @param limit [Integer, nil] Upper limit on the number of objects to return, between `1` and `100`.
|
|
914
|
-
# @param order [WorkOS::Types::
|
|
914
|
+
# @param order [WorkOS::Types::PaginationOrder, nil] Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to descending.
|
|
915
915
|
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
916
916
|
# @return [WorkOS::Types::ListStruct<WorkOS::UserSessionsListItem>]
|
|
917
917
|
def list_sessions(
|
|
918
918
|
id:,
|
|
919
919
|
before: nil,
|
|
920
920
|
after: nil,
|
|
921
|
-
limit:
|
|
921
|
+
limit: 10,
|
|
922
922
|
order: "desc",
|
|
923
923
|
request_options: {}
|
|
924
924
|
)
|
|
@@ -957,7 +957,7 @@ module WorkOS
|
|
|
957
957
|
# @param before [String, nil] An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `before="obj_123"` to fetch a new batch of objects before `"obj_123"`.
|
|
958
958
|
# @param after [String, nil] An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `after="obj_123"` to fetch a new batch of objects after `"obj_123"`.
|
|
959
959
|
# @param limit [Integer, nil] Upper limit on the number of objects to return, between `1` and `100`.
|
|
960
|
-
# @param order [WorkOS::Types::
|
|
960
|
+
# @param order [WorkOS::Types::PaginationOrder, nil] Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to descending.
|
|
961
961
|
# @param organization_id [String, nil] The ID of the [organization](https://workos.com/docs/reference/organization) that the recipient will join.
|
|
962
962
|
# @param email [String, nil] The email address of the recipient.
|
|
963
963
|
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
@@ -965,7 +965,7 @@ module WorkOS
|
|
|
965
965
|
def list_invitations(
|
|
966
966
|
before: nil,
|
|
967
967
|
after: nil,
|
|
968
|
-
limit:
|
|
968
|
+
limit: 10,
|
|
969
969
|
order: "desc",
|
|
970
970
|
organization_id: nil,
|
|
971
971
|
email: nil,
|
|
@@ -1144,6 +1144,21 @@ module WorkOS
|
|
|
1144
1144
|
result
|
|
1145
1145
|
end
|
|
1146
1146
|
|
|
1147
|
+
# Get JWT template
|
|
1148
|
+
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
1149
|
+
# @return [WorkOS::JWTTemplateResponse]
|
|
1150
|
+
def list_jwt_template(request_options: {})
|
|
1151
|
+
response = @client.request(
|
|
1152
|
+
method: :get,
|
|
1153
|
+
path: "/user_management/jwt_template",
|
|
1154
|
+
auth: true,
|
|
1155
|
+
request_options: request_options
|
|
1156
|
+
)
|
|
1157
|
+
result = WorkOS::JWTTemplateResponse.new(response.body)
|
|
1158
|
+
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"])
|
|
1159
|
+
result
|
|
1160
|
+
end
|
|
1161
|
+
|
|
1147
1162
|
# Update JWT template
|
|
1148
1163
|
# @param content [String] The JWT template content as a Liquid template string.
|
|
1149
1164
|
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
@@ -1216,7 +1231,7 @@ module WorkOS
|
|
|
1216
1231
|
# @param before [String, nil] An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `before="obj_123"` to fetch a new batch of objects before `"obj_123"`.
|
|
1217
1232
|
# @param after [String, nil] An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `after="obj_123"` to fetch a new batch of objects after `"obj_123"`.
|
|
1218
1233
|
# @param limit [Integer, nil] Upper limit on the number of objects to return, between `1` and `100`.
|
|
1219
|
-
# @param order [WorkOS::Types::
|
|
1234
|
+
# @param order [WorkOS::Types::PaginationOrder, nil] Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to descending.
|
|
1220
1235
|
# @param organization_id [String, nil] The ID of the [organization](https://workos.com/docs/reference/organization) which the user belongs to.
|
|
1221
1236
|
# @param statuses [Array<WorkOS::Types::UserManagementOrganizationMembershipStatuses>, nil] Filter by the status of the organization membership. Array including any of `active`, `inactive`, or `pending`.
|
|
1222
1237
|
# @param user_id [String, nil] The ID of the [user](https://workos.com/docs/reference/authkit/user).
|
|
@@ -1225,7 +1240,7 @@ module WorkOS
|
|
|
1225
1240
|
def list_organization_memberships(
|
|
1226
1241
|
before: nil,
|
|
1227
1242
|
after: nil,
|
|
1228
|
-
limit:
|
|
1243
|
+
limit: 10,
|
|
1229
1244
|
order: "desc",
|
|
1230
1245
|
organization_id: nil,
|
|
1231
1246
|
statuses: nil,
|
|
@@ -1441,14 +1456,14 @@ module WorkOS
|
|
|
1441
1456
|
# @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"`.
|
|
1442
1457
|
# @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"`.
|
|
1443
1458
|
# @param limit [Integer, nil] Upper limit on the number of objects to return, between `1` and `100`.
|
|
1444
|
-
# @param order [WorkOS::Types::
|
|
1459
|
+
# @param order [WorkOS::Types::PaginationOrder, nil] Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to descending.
|
|
1445
1460
|
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
1446
1461
|
# @return [WorkOS::Types::ListStruct<WorkOS::AuthorizedConnectApplicationListData>]
|
|
1447
1462
|
def list_user_authorized_applications(
|
|
1448
1463
|
user_id:,
|
|
1449
1464
|
before: nil,
|
|
1450
1465
|
after: nil,
|
|
1451
|
-
limit:
|
|
1466
|
+
limit: 10,
|
|
1452
1467
|
order: "desc",
|
|
1453
1468
|
request_options: {}
|
|
1454
1469
|
)
|
|
@@ -1502,6 +1517,88 @@ module WorkOS
|
|
|
1502
1517
|
nil
|
|
1503
1518
|
end
|
|
1504
1519
|
|
|
1520
|
+
# List API keys for a user
|
|
1521
|
+
# @param user_id [String] Unique identifier of the user.
|
|
1522
|
+
# @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.
|
|
1523
|
+
# @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.
|
|
1524
|
+
# @param limit [Integer, nil] Upper limit on the number of objects to return, between `1` and `100`.
|
|
1525
|
+
# @param order [WorkOS::Types::PaginationOrder, nil] Order the results by the creation time.
|
|
1526
|
+
# @param organization_id [String, nil] The ID of the organization to filter user API keys by. When provided, only API keys created against that organization membership are returned.
|
|
1527
|
+
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
1528
|
+
# @return [WorkOS::Types::ListStruct<WorkOS::UserApiKey>]
|
|
1529
|
+
def list_user_api_keys(
|
|
1530
|
+
user_id:,
|
|
1531
|
+
before: nil,
|
|
1532
|
+
after: nil,
|
|
1533
|
+
limit: 10,
|
|
1534
|
+
order: "desc",
|
|
1535
|
+
organization_id: nil,
|
|
1536
|
+
request_options: {}
|
|
1537
|
+
)
|
|
1538
|
+
params = {
|
|
1539
|
+
"before" => before,
|
|
1540
|
+
"after" => after,
|
|
1541
|
+
"limit" => limit,
|
|
1542
|
+
"order" => order,
|
|
1543
|
+
"organization_id" => organization_id
|
|
1544
|
+
}.compact
|
|
1545
|
+
response = @client.request(
|
|
1546
|
+
method: :get,
|
|
1547
|
+
path: "/user_management/users/#{WorkOS::Util.encode_path(user_id)}/api_keys",
|
|
1548
|
+
auth: true,
|
|
1549
|
+
params: params,
|
|
1550
|
+
request_options: request_options
|
|
1551
|
+
)
|
|
1552
|
+
fetch_next = ->(cursor) {
|
|
1553
|
+
list_user_api_keys(
|
|
1554
|
+
user_id: user_id,
|
|
1555
|
+
before: before,
|
|
1556
|
+
after: cursor,
|
|
1557
|
+
limit: limit,
|
|
1558
|
+
order: order,
|
|
1559
|
+
organization_id: organization_id,
|
|
1560
|
+
request_options: request_options
|
|
1561
|
+
)
|
|
1562
|
+
}
|
|
1563
|
+
WorkOS::Types::ListStruct.from_response(
|
|
1564
|
+
response,
|
|
1565
|
+
model: WorkOS::UserApiKey,
|
|
1566
|
+
filters: {user_id: user_id, before: before, limit: limit, order: order, organization_id: organization_id},
|
|
1567
|
+
fetch_next: fetch_next
|
|
1568
|
+
)
|
|
1569
|
+
end
|
|
1570
|
+
|
|
1571
|
+
# Create an API key for a user
|
|
1572
|
+
# @param user_id [String] Unique identifier of the user.
|
|
1573
|
+
# @param name [String] A descriptive name for the API key.
|
|
1574
|
+
# @param organization_id [String] The ID of the organization the user API key is associated with. The user must have an active membership in this organization.
|
|
1575
|
+
# @param permissions [Array<String>, nil] The permission slugs to assign to the API key. Each permission must be enabled for user API keys.
|
|
1576
|
+
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
1577
|
+
# @return [WorkOS::UserApiKeyWithValue]
|
|
1578
|
+
def create_user_api_key(
|
|
1579
|
+
user_id:,
|
|
1580
|
+
name:,
|
|
1581
|
+
organization_id:,
|
|
1582
|
+
permissions: nil,
|
|
1583
|
+
request_options: {}
|
|
1584
|
+
)
|
|
1585
|
+
body = {
|
|
1586
|
+
"name" => name,
|
|
1587
|
+
"organization_id" => organization_id,
|
|
1588
|
+
"permissions" => permissions
|
|
1589
|
+
}.compact
|
|
1590
|
+
response = @client.request(
|
|
1591
|
+
method: :post,
|
|
1592
|
+
path: "/user_management/users/#{WorkOS::Util.encode_path(user_id)}/api_keys",
|
|
1593
|
+
auth: true,
|
|
1594
|
+
body: body,
|
|
1595
|
+
request_options: request_options
|
|
1596
|
+
)
|
|
1597
|
+
result = WorkOS::UserApiKeyWithValue.new(response.body)
|
|
1598
|
+
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"])
|
|
1599
|
+
result
|
|
1600
|
+
end
|
|
1601
|
+
|
|
1505
1602
|
# @oagen-ignore-start — non-spec helpers (hand-maintained)
|
|
1506
1603
|
# H13 — Build the JWKS URL for a given client_id (no HTTP call).
|
|
1507
1604
|
# Pair with #get_jwks (generated) to fetch the keyset.
|
|
@@ -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_membership_groups(
|
|
22
22
|
om_id:,
|
|
23
23
|
before: nil,
|
|
24
24
|
after: nil,
|
|
25
|
-
limit:
|
|
25
|
+
limit: 10,
|
|
26
26
|
order: "desc",
|
|
27
27
|
request_options: {}
|
|
28
28
|
)
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
module WorkOS
|
|
6
|
+
class VaultByokKeyDeleted < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
id: :id,
|
|
9
|
+
event: :event,
|
|
10
|
+
data: :data,
|
|
11
|
+
created_at: :created_at,
|
|
12
|
+
context: :context,
|
|
13
|
+
object: :object
|
|
14
|
+
}.freeze
|
|
15
|
+
|
|
16
|
+
attr_accessor \
|
|
17
|
+
:id,
|
|
18
|
+
:event,
|
|
19
|
+
:data,
|
|
20
|
+
:created_at,
|
|
21
|
+
:context,
|
|
22
|
+
:object
|
|
23
|
+
|
|
24
|
+
def initialize(json)
|
|
25
|
+
hash = self.class.normalize(json)
|
|
26
|
+
@id = hash[:id]
|
|
27
|
+
@event = hash[:event]
|
|
28
|
+
@data = hash[:data] ? WorkOS::VaultByokKeyDeletedData.new(hash[:data]) : nil
|
|
29
|
+
@created_at = hash[:created_at]
|
|
30
|
+
@context = hash[:context] ? WorkOS::EventContext.new(hash[:context]) : nil
|
|
31
|
+
@object = hash[:object]
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
module WorkOS
|
|
6
|
+
class VaultByokKeyDeletedData < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
organization_id: :organization_id,
|
|
9
|
+
key_provider: :key_provider
|
|
10
|
+
}.freeze
|
|
11
|
+
|
|
12
|
+
attr_accessor \
|
|
13
|
+
:organization_id,
|
|
14
|
+
:key_provider
|
|
15
|
+
|
|
16
|
+
def initialize(json)
|
|
17
|
+
hash = self.class.normalize(json)
|
|
18
|
+
@organization_id = hash[:organization_id]
|
|
19
|
+
@key_provider = hash[:key_provider]
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
data/lib/workos/version.rb
CHANGED
data/lib/workos/webhooks.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. 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 request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
19
19
|
# @return [WorkOS::Types::ListStruct<WorkOS::WebhookEndpointJson>]
|
|
20
20
|
def list_webhook_endpoints(
|
|
21
21
|
before: nil,
|
|
22
22
|
after: nil,
|
|
23
|
-
limit:
|
|
23
|
+
limit: 10,
|
|
24
24
|
order: "desc",
|
|
25
25
|
request_options: {}
|
|
26
26
|
)
|
data/rbi/workos/api_key.rbi
CHANGED
|
@@ -21,10 +21,10 @@ module WorkOS
|
|
|
21
21
|
sig { params(value: String).returns(String) }
|
|
22
22
|
def id=(value); end
|
|
23
23
|
|
|
24
|
-
sig { returns(WorkOS::ApiKeyOwner) }
|
|
24
|
+
sig { returns(T.any(WorkOS::ApiKeyOwner, WorkOS::UserApiKeyOwner)) }
|
|
25
25
|
def owner; end
|
|
26
26
|
|
|
27
|
-
sig { params(value: WorkOS::ApiKeyOwner).returns(WorkOS::ApiKeyOwner) }
|
|
27
|
+
sig { params(value: T.any(WorkOS::ApiKeyOwner, WorkOS::UserApiKeyOwner)).returns(T.any(WorkOS::ApiKeyOwner, WorkOS::UserApiKeyOwner)) }
|
|
28
28
|
def owner=(value); end
|
|
29
29
|
|
|
30
30
|
sig { returns(String) }
|
|
@@ -21,10 +21,10 @@ module WorkOS
|
|
|
21
21
|
sig { params(value: String).returns(String) }
|
|
22
22
|
def id=(value); end
|
|
23
23
|
|
|
24
|
-
sig { returns(WorkOS::ApiKeyCreatedDataOwner) }
|
|
24
|
+
sig { returns(T.any(WorkOS::ApiKeyCreatedDataOwner, WorkOS::UserApiKeyCreatedDataOwner)) }
|
|
25
25
|
def owner; end
|
|
26
26
|
|
|
27
|
-
sig { params(value: WorkOS::ApiKeyCreatedDataOwner).returns(WorkOS::ApiKeyCreatedDataOwner) }
|
|
27
|
+
sig { params(value: T.any(WorkOS::ApiKeyCreatedDataOwner, WorkOS::UserApiKeyCreatedDataOwner)).returns(T.any(WorkOS::ApiKeyCreatedDataOwner, WorkOS::UserApiKeyCreatedDataOwner)) }
|
|
28
28
|
def owner=(value); end
|
|
29
29
|
|
|
30
30
|
sig { returns(String) }
|
|
@@ -21,10 +21,10 @@ module WorkOS
|
|
|
21
21
|
sig { params(value: String).returns(String) }
|
|
22
22
|
def id=(value); end
|
|
23
23
|
|
|
24
|
-
sig { returns(WorkOS::ApiKeyRevokedDataOwner) }
|
|
24
|
+
sig { returns(T.any(WorkOS::ApiKeyRevokedDataOwner, WorkOS::UserApiKeyRevokedDataOwner)) }
|
|
25
25
|
def owner; end
|
|
26
26
|
|
|
27
|
-
sig { params(value: WorkOS::ApiKeyRevokedDataOwner).returns(WorkOS::ApiKeyRevokedDataOwner) }
|
|
27
|
+
sig { params(value: T.any(WorkOS::ApiKeyRevokedDataOwner, WorkOS::UserApiKeyRevokedDataOwner)).returns(T.any(WorkOS::ApiKeyRevokedDataOwner, WorkOS::UserApiKeyRevokedDataOwner)) }
|
|
28
28
|
def owner=(value); end
|
|
29
29
|
|
|
30
30
|
sig { returns(String) }
|
data/rbi/workos/api_keys.rbi
CHANGED
|
@@ -9,22 +9,6 @@ module WorkOS
|
|
|
9
9
|
sig { params(client: WorkOS::BaseClient).void }
|
|
10
10
|
def initialize(client); end
|
|
11
11
|
|
|
12
|
-
sig do
|
|
13
|
-
params(
|
|
14
|
-
value: String,
|
|
15
|
-
request_options: T::Hash[Symbol, T.untyped]
|
|
16
|
-
).returns(WorkOS::ApiKeyValidationResponse)
|
|
17
|
-
end
|
|
18
|
-
def create_validation(value:, request_options:); end
|
|
19
|
-
|
|
20
|
-
sig do
|
|
21
|
-
params(
|
|
22
|
-
id: String,
|
|
23
|
-
request_options: T::Hash[Symbol, T.untyped]
|
|
24
|
-
).returns(NilClass)
|
|
25
|
-
end
|
|
26
|
-
def delete_api_key(id:, request_options:); end
|
|
27
|
-
|
|
28
12
|
sig do
|
|
29
13
|
params(
|
|
30
14
|
organization_id: String,
|
|
@@ -43,9 +27,25 @@ module WorkOS
|
|
|
43
27
|
name: String,
|
|
44
28
|
permissions: T.nilable(T::Array[String]),
|
|
45
29
|
request_options: T::Hash[Symbol, T.untyped]
|
|
46
|
-
).returns(WorkOS::
|
|
30
|
+
).returns(WorkOS::OrganizationApiKeyWithValue)
|
|
47
31
|
end
|
|
48
32
|
def create_organization_api_key(organization_id:, name:, permissions:, request_options:); end
|
|
49
33
|
|
|
34
|
+
sig do
|
|
35
|
+
params(
|
|
36
|
+
value: String,
|
|
37
|
+
request_options: T::Hash[Symbol, T.untyped]
|
|
38
|
+
).returns(WorkOS::ApiKeyValidationResponse)
|
|
39
|
+
end
|
|
40
|
+
def create_validation(value:, request_options:); end
|
|
41
|
+
|
|
42
|
+
sig do
|
|
43
|
+
params(
|
|
44
|
+
id: String,
|
|
45
|
+
request_options: T::Hash[Symbol, T.untyped]
|
|
46
|
+
).returns(NilClass)
|
|
47
|
+
end
|
|
48
|
+
def delete_api_key(id:, request_options:); end
|
|
49
|
+
|
|
50
50
|
end
|
|
51
51
|
end
|
|
@@ -162,7 +162,7 @@ module WorkOS
|
|
|
162
162
|
role_slug: String,
|
|
163
163
|
resource_target: T.any(WorkOS::Authorization::ResourceTargetById, WorkOS::Authorization::ResourceTargetByExternalId),
|
|
164
164
|
request_options: T::Hash[Symbol, T.untyped]
|
|
165
|
-
).returns(WorkOS::
|
|
165
|
+
).returns(WorkOS::UserRoleAssignment)
|
|
166
166
|
end
|
|
167
167
|
def assign_role(organization_membership_id:, role_slug:, resource_target:, request_options:); end
|
|
168
168
|
|
|
@@ -313,6 +313,20 @@ module WorkOS
|
|
|
313
313
|
end
|
|
314
314
|
def list_memberships_for_resource_by_external_id(organization_id:, resource_type_slug:, external_id:, permission_slug:, before:, after:, limit:, order:, assignment:, request_options:); end
|
|
315
315
|
|
|
316
|
+
sig do
|
|
317
|
+
params(
|
|
318
|
+
organization_id: String,
|
|
319
|
+
resource_type_slug: String,
|
|
320
|
+
external_id: String,
|
|
321
|
+
before: T.nilable(String),
|
|
322
|
+
after: T.nilable(String),
|
|
323
|
+
limit: T.nilable(Integer),
|
|
324
|
+
order: T.nilable(String),
|
|
325
|
+
request_options: T::Hash[Symbol, T.untyped]
|
|
326
|
+
).returns(WorkOS::Types::ListStruct)
|
|
327
|
+
end
|
|
328
|
+
def list_role_assignments_for_resource_by_external_id(organization_id:, resource_type_slug:, external_id:, before:, after:, limit:, order:, request_options:); end
|
|
329
|
+
|
|
316
330
|
sig do
|
|
317
331
|
params(
|
|
318
332
|
before: T.nilable(String),
|
|
@@ -384,6 +398,18 @@ module WorkOS
|
|
|
384
398
|
end
|
|
385
399
|
def list_memberships_for_resource(resource_id:, permission_slug:, before:, after:, limit:, order:, assignment:, request_options:); end
|
|
386
400
|
|
|
401
|
+
sig do
|
|
402
|
+
params(
|
|
403
|
+
resource_id: String,
|
|
404
|
+
before: T.nilable(String),
|
|
405
|
+
after: T.nilable(String),
|
|
406
|
+
limit: T.nilable(Integer),
|
|
407
|
+
order: T.nilable(String),
|
|
408
|
+
request_options: T::Hash[Symbol, T.untyped]
|
|
409
|
+
).returns(WorkOS::Types::ListStruct)
|
|
410
|
+
end
|
|
411
|
+
def list_role_assignments_for_resource(resource_id:, before:, after:, limit:, order:, request_options:); end
|
|
412
|
+
|
|
387
413
|
sig do
|
|
388
414
|
params(
|
|
389
415
|
request_options: T::Hash[Symbol, T.untyped]
|
data/rbi/workos/client.rbi
CHANGED
|
@@ -6,9 +6,6 @@
|
|
|
6
6
|
|
|
7
7
|
module WorkOS
|
|
8
8
|
class Client < BaseClient
|
|
9
|
-
sig { returns(WorkOS::ApiKeys) }
|
|
10
|
-
def api_keys; end
|
|
11
|
-
|
|
12
9
|
sig { returns(WorkOS::MultiFactorAuth) }
|
|
13
10
|
def multi_factor_auth; end
|
|
14
11
|
|
|
@@ -42,6 +39,9 @@ module WorkOS
|
|
|
42
39
|
sig { returns(WorkOS::AuditLogs) }
|
|
43
40
|
def audit_logs; end
|
|
44
41
|
|
|
42
|
+
sig { returns(WorkOS::ApiKeys) }
|
|
43
|
+
def api_keys; end
|
|
44
|
+
|
|
45
45
|
sig { returns(WorkOS::Groups) }
|
|
46
46
|
def groups; end
|
|
47
47
|
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
# typed: strong
|
|
6
|
+
|
|
7
|
+
module WorkOS
|
|
8
|
+
class CreateUserApiKey
|
|
9
|
+
sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void }
|
|
10
|
+
def initialize(json); end
|
|
11
|
+
|
|
12
|
+
sig { returns(String) }
|
|
13
|
+
def name; end
|
|
14
|
+
|
|
15
|
+
sig { params(value: String).returns(String) }
|
|
16
|
+
def name=(value); end
|
|
17
|
+
|
|
18
|
+
sig { returns(String) }
|
|
19
|
+
def organization_id; end
|
|
20
|
+
|
|
21
|
+
sig { params(value: String).returns(String) }
|
|
22
|
+
def organization_id=(value); end
|
|
23
|
+
|
|
24
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
25
|
+
def permissions; end
|
|
26
|
+
|
|
27
|
+
sig { params(value: T.nilable(T::Array[String])).returns(T.nilable(T::Array[String])) }
|
|
28
|
+
def permissions=(value); end
|
|
29
|
+
|
|
30
|
+
sig { returns(T::Hash[Symbol, T.untyped]) }
|
|
31
|
+
def to_h; end
|
|
32
|
+
|
|
33
|
+
sig { params(args: T.untyped).returns(String) }
|
|
34
|
+
def to_json(*args); end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -57,6 +57,12 @@ module WorkOS
|
|
|
57
57
|
sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
|
|
58
58
|
def last_name=(value); end
|
|
59
59
|
|
|
60
|
+
sig { returns(T.nilable(String)) }
|
|
61
|
+
def name; end
|
|
62
|
+
|
|
63
|
+
sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
|
|
64
|
+
def name=(value); end
|
|
65
|
+
|
|
60
66
|
sig { returns(T.nilable(T::Array[WorkOS::DirectoryUserEmail])) }
|
|
61
67
|
def emails; end
|
|
62
68
|
|
|
@@ -57,6 +57,12 @@ module WorkOS
|
|
|
57
57
|
sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
|
|
58
58
|
def last_name=(value); end
|
|
59
59
|
|
|
60
|
+
sig { returns(T.nilable(String)) }
|
|
61
|
+
def name; end
|
|
62
|
+
|
|
63
|
+
sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
|
|
64
|
+
def name=(value); end
|
|
65
|
+
|
|
60
66
|
sig { returns(T.nilable(T::Array[WorkOS::DirectoryUserWithGroupsEmail])) }
|
|
61
67
|
def emails; end
|
|
62
68
|
|
|
@@ -57,6 +57,12 @@ module WorkOS
|
|
|
57
57
|
sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
|
|
58
58
|
def last_name=(value); end
|
|
59
59
|
|
|
60
|
+
sig { returns(T.nilable(String)) }
|
|
61
|
+
def name; end
|
|
62
|
+
|
|
63
|
+
sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
|
|
64
|
+
def name=(value); end
|
|
65
|
+
|
|
60
66
|
sig { returns(T.nilable(T::Array[WorkOS::DsyncUserUpdatedDataEmail])) }
|
|
61
67
|
def emails; end
|
|
62
68
|
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
# typed: strong
|
|
6
|
+
|
|
7
|
+
module WorkOS
|
|
8
|
+
class OrganizationApiKey
|
|
9
|
+
sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void }
|
|
10
|
+
def initialize(json); end
|
|
11
|
+
|
|
12
|
+
sig { returns(String) }
|
|
13
|
+
def object; end
|
|
14
|
+
|
|
15
|
+
sig { params(value: String).returns(String) }
|
|
16
|
+
def object=(value); end
|
|
17
|
+
|
|
18
|
+
sig { returns(String) }
|
|
19
|
+
def id; end
|
|
20
|
+
|
|
21
|
+
sig { params(value: String).returns(String) }
|
|
22
|
+
def id=(value); end
|
|
23
|
+
|
|
24
|
+
sig { returns(WorkOS::OrganizationApiKeyOwner) }
|
|
25
|
+
def owner; end
|
|
26
|
+
|
|
27
|
+
sig { params(value: WorkOS::OrganizationApiKeyOwner).returns(WorkOS::OrganizationApiKeyOwner) }
|
|
28
|
+
def owner=(value); end
|
|
29
|
+
|
|
30
|
+
sig { returns(String) }
|
|
31
|
+
def name; end
|
|
32
|
+
|
|
33
|
+
sig { params(value: String).returns(String) }
|
|
34
|
+
def name=(value); end
|
|
35
|
+
|
|
36
|
+
sig { returns(String) }
|
|
37
|
+
def obfuscated_value; end
|
|
38
|
+
|
|
39
|
+
sig { params(value: String).returns(String) }
|
|
40
|
+
def obfuscated_value=(value); end
|
|
41
|
+
|
|
42
|
+
sig { returns(T.nilable(String)) }
|
|
43
|
+
def last_used_at; end
|
|
44
|
+
|
|
45
|
+
sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
|
|
46
|
+
def last_used_at=(value); end
|
|
47
|
+
|
|
48
|
+
sig { returns(T::Array[String]) }
|
|
49
|
+
def permissions; end
|
|
50
|
+
|
|
51
|
+
sig { params(value: T::Array[String]).returns(T::Array[String]) }
|
|
52
|
+
def permissions=(value); end
|
|
53
|
+
|
|
54
|
+
sig { returns(String) }
|
|
55
|
+
def created_at; end
|
|
56
|
+
|
|
57
|
+
sig { params(value: String).returns(String) }
|
|
58
|
+
def created_at=(value); end
|
|
59
|
+
|
|
60
|
+
sig { returns(String) }
|
|
61
|
+
def updated_at; end
|
|
62
|
+
|
|
63
|
+
sig { params(value: String).returns(String) }
|
|
64
|
+
def updated_at=(value); end
|
|
65
|
+
|
|
66
|
+
sig { returns(T::Hash[Symbol, T.untyped]) }
|
|
67
|
+
def to_h; end
|
|
68
|
+
|
|
69
|
+
sig { params(args: T.untyped).returns(String) }
|
|
70
|
+
def to_json(*args); end
|
|
71
|
+
end
|
|
72
|
+
end
|