workos 7.1.1 → 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 +38 -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 +6 -6
- 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 +250 -138
- data/lib/workos/base_client.rb +6 -1
- 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/encryptors/aes_gcm.rb +35 -3
- data/lib/workos/events.rb +2 -2
- data/lib/workos/feature_flags.rb +6 -6
- data/lib/workos/groups.rb +5 -5
- data/lib/workos/multi_factor_auth.rb +3 -3
- data/lib/workos/organization_domains.rb +1 -1
- data/lib/workos/organizations.rb +2 -2
- data/lib/workos/radar.rb +2 -2
- data/lib/workos/sso/profile.rb +3 -0
- data/lib/workos/sso.rb +4 -4
- 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 +181 -75
- 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 +3 -3
- 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 +127 -27
- 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 +91 -14
- 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_audit_logs.rb +2 -2
- data/test/workos/test_authorization.rb +102 -20
- data/test/workos/test_encryptors_aes_gcm.rb +21 -0
- data/test/workos/test_model_round_trip.rb +278 -83
- data/test/workos/test_session.rb +68 -0
- data/test/workos/test_user_management.rb +69 -9
- data/test/workos/test_webhooks.rb +2 -2
- metadata +39 -33
- 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
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
|
)
|
|
@@ -67,7 +67,7 @@ module WorkOS
|
|
|
67
67
|
body = {
|
|
68
68
|
"endpoint_url" => endpoint_url,
|
|
69
69
|
"events" => events
|
|
70
|
-
}
|
|
70
|
+
}
|
|
71
71
|
response = @client.request(
|
|
72
72
|
method: :post,
|
|
73
73
|
path: "/webhook_endpoints",
|
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
|
|
@@ -6,6 +6,90 @@
|
|
|
6
6
|
|
|
7
7
|
module WorkOS
|
|
8
8
|
class Authorization
|
|
9
|
+
class ResourceTargetById
|
|
10
|
+
sig { returns(String) }
|
|
11
|
+
def resource_id; end
|
|
12
|
+
|
|
13
|
+
sig do
|
|
14
|
+
params(
|
|
15
|
+
resource_id: String
|
|
16
|
+
).returns(WorkOS::Authorization::ResourceTargetById)
|
|
17
|
+
end
|
|
18
|
+
def self.new(resource_id:); end
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
class ResourceTargetByExternalId
|
|
22
|
+
sig { returns(String) }
|
|
23
|
+
def resource_external_id; end
|
|
24
|
+
|
|
25
|
+
sig { returns(String) }
|
|
26
|
+
def resource_type_slug; end
|
|
27
|
+
|
|
28
|
+
sig do
|
|
29
|
+
params(
|
|
30
|
+
resource_external_id: String,
|
|
31
|
+
resource_type_slug: String
|
|
32
|
+
).returns(WorkOS::Authorization::ResourceTargetByExternalId)
|
|
33
|
+
end
|
|
34
|
+
def self.new(resource_external_id:, resource_type_slug:); end
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
class ParentResourceById
|
|
38
|
+
sig { returns(String) }
|
|
39
|
+
def parent_resource_id; end
|
|
40
|
+
|
|
41
|
+
sig do
|
|
42
|
+
params(
|
|
43
|
+
parent_resource_id: String
|
|
44
|
+
).returns(WorkOS::Authorization::ParentResourceById)
|
|
45
|
+
end
|
|
46
|
+
def self.new(parent_resource_id:); end
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
class ParentResourceByExternalId
|
|
50
|
+
sig { returns(String) }
|
|
51
|
+
def parent_resource_type_slug; end
|
|
52
|
+
|
|
53
|
+
sig { returns(String) }
|
|
54
|
+
def parent_resource_external_id; end
|
|
55
|
+
|
|
56
|
+
sig do
|
|
57
|
+
params(
|
|
58
|
+
parent_resource_type_slug: String,
|
|
59
|
+
parent_resource_external_id: String
|
|
60
|
+
).returns(WorkOS::Authorization::ParentResourceByExternalId)
|
|
61
|
+
end
|
|
62
|
+
def self.new(parent_resource_type_slug:, parent_resource_external_id:); end
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
class ParentById
|
|
66
|
+
sig { returns(String) }
|
|
67
|
+
def parent_resource_id; end
|
|
68
|
+
|
|
69
|
+
sig do
|
|
70
|
+
params(
|
|
71
|
+
parent_resource_id: String
|
|
72
|
+
).returns(WorkOS::Authorization::ParentById)
|
|
73
|
+
end
|
|
74
|
+
def self.new(parent_resource_id:); end
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
class ParentByExternalId
|
|
78
|
+
sig { returns(String) }
|
|
79
|
+
def parent_resource_type_slug; end
|
|
80
|
+
|
|
81
|
+
sig { returns(String) }
|
|
82
|
+
def parent_external_id; end
|
|
83
|
+
|
|
84
|
+
sig do
|
|
85
|
+
params(
|
|
86
|
+
parent_resource_type_slug: String,
|
|
87
|
+
parent_external_id: String
|
|
88
|
+
).returns(WorkOS::Authorization::ParentByExternalId)
|
|
89
|
+
end
|
|
90
|
+
def self.new(parent_resource_type_slug:, parent_external_id:); end
|
|
91
|
+
end
|
|
92
|
+
|
|
9
93
|
sig { params(client: WorkOS::BaseClient).void }
|
|
10
94
|
def initialize(client); end
|
|
11
95
|
|
|
@@ -13,18 +97,17 @@ module WorkOS
|
|
|
13
97
|
params(
|
|
14
98
|
organization_membership_id: String,
|
|
15
99
|
permission_slug: String,
|
|
16
|
-
|
|
17
|
-
resource_external_id: T.nilable(String),
|
|
18
|
-
resource_type_slug: T.nilable(String),
|
|
100
|
+
resource_target: T.any(WorkOS::Authorization::ResourceTargetById, WorkOS::Authorization::ResourceTargetByExternalId),
|
|
19
101
|
request_options: T::Hash[Symbol, T.untyped]
|
|
20
102
|
).returns(WorkOS::AuthorizationCheck)
|
|
21
103
|
end
|
|
22
|
-
def check(organization_membership_id:, permission_slug:,
|
|
104
|
+
def check(organization_membership_id:, permission_slug:, resource_target:, request_options:); end
|
|
23
105
|
|
|
24
106
|
sig do
|
|
25
107
|
params(
|
|
26
108
|
organization_membership_id: String,
|
|
27
109
|
permission_slug: String,
|
|
110
|
+
parent_resource: T.any(WorkOS::Authorization::ParentResourceById, WorkOS::Authorization::ParentResourceByExternalId),
|
|
28
111
|
before: T.nilable(String),
|
|
29
112
|
after: T.nilable(String),
|
|
30
113
|
limit: T.nilable(Integer),
|
|
@@ -32,7 +115,7 @@ module WorkOS
|
|
|
32
115
|
request_options: T::Hash[Symbol, T.untyped]
|
|
33
116
|
).returns(WorkOS::Types::ListStruct)
|
|
34
117
|
end
|
|
35
|
-
def list_resources_for_membership(organization_membership_id:, permission_slug:, before:, after:, limit:, order:, request_options:); end
|
|
118
|
+
def list_resources_for_membership(organization_membership_id:, permission_slug:, parent_resource:, before:, after:, limit:, order:, request_options:); end
|
|
36
119
|
|
|
37
120
|
sig do
|
|
38
121
|
params(
|
|
@@ -77,25 +160,21 @@ module WorkOS
|
|
|
77
160
|
params(
|
|
78
161
|
organization_membership_id: String,
|
|
79
162
|
role_slug: String,
|
|
80
|
-
|
|
81
|
-
resource_external_id: T.nilable(String),
|
|
82
|
-
resource_type_slug: T.nilable(String),
|
|
163
|
+
resource_target: T.any(WorkOS::Authorization::ResourceTargetById, WorkOS::Authorization::ResourceTargetByExternalId),
|
|
83
164
|
request_options: T::Hash[Symbol, T.untyped]
|
|
84
|
-
).returns(WorkOS::
|
|
165
|
+
).returns(WorkOS::UserRoleAssignment)
|
|
85
166
|
end
|
|
86
|
-
def assign_role(organization_membership_id:, role_slug:,
|
|
167
|
+
def assign_role(organization_membership_id:, role_slug:, resource_target:, request_options:); end
|
|
87
168
|
|
|
88
169
|
sig do
|
|
89
170
|
params(
|
|
90
171
|
organization_membership_id: String,
|
|
91
172
|
role_slug: String,
|
|
92
|
-
|
|
93
|
-
resource_external_id: T.nilable(String),
|
|
94
|
-
resource_type_slug: T.nilable(String),
|
|
173
|
+
resource_target: T.any(WorkOS::Authorization::ResourceTargetById, WorkOS::Authorization::ResourceTargetByExternalId),
|
|
95
174
|
request_options: T::Hash[Symbol, T.untyped]
|
|
96
175
|
).returns(NilClass)
|
|
97
176
|
end
|
|
98
|
-
def remove_role(organization_membership_id:, role_slug:,
|
|
177
|
+
def remove_role(organization_membership_id:, role_slug:, resource_target:, request_options:); end
|
|
99
178
|
|
|
100
179
|
sig do
|
|
101
180
|
params(
|
|
@@ -201,13 +280,11 @@ module WorkOS
|
|
|
201
280
|
external_id: String,
|
|
202
281
|
name: T.nilable(String),
|
|
203
282
|
description: T.nilable(String),
|
|
204
|
-
|
|
205
|
-
parent_resource_external_id: T.nilable(String),
|
|
206
|
-
parent_resource_type_slug: T.nilable(String),
|
|
283
|
+
parent_resource: T.nilable(T.any(WorkOS::Authorization::ParentResourceById, WorkOS::Authorization::ParentResourceByExternalId)),
|
|
207
284
|
request_options: T::Hash[Symbol, T.untyped]
|
|
208
285
|
).returns(WorkOS::AuthorizationResource)
|
|
209
286
|
end
|
|
210
|
-
def update_resource_by_external_id(organization_id:, resource_type_slug:, external_id:, name:, description:,
|
|
287
|
+
def update_resource_by_external_id(organization_id:, resource_type_slug:, external_id:, name:, description:, parent_resource:, request_options:); end
|
|
211
288
|
|
|
212
289
|
sig do
|
|
213
290
|
params(
|
|
@@ -236,6 +313,20 @@ module WorkOS
|
|
|
236
313
|
end
|
|
237
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
|
|
238
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
|
+
|
|
239
330
|
sig do
|
|
240
331
|
params(
|
|
241
332
|
before: T.nilable(String),
|
|
@@ -246,10 +337,11 @@ module WorkOS
|
|
|
246
337
|
resource_type_slug: T.nilable(String),
|
|
247
338
|
resource_external_id: T.nilable(String),
|
|
248
339
|
search: T.nilable(String),
|
|
340
|
+
parent: T.nilable(T.any(WorkOS::Authorization::ParentById, WorkOS::Authorization::ParentByExternalId)),
|
|
249
341
|
request_options: T::Hash[Symbol, T.untyped]
|
|
250
342
|
).returns(WorkOS::Types::ListStruct)
|
|
251
343
|
end
|
|
252
|
-
def list_resources(before:, after:, limit:, order:, organization_id:, resource_type_slug:, resource_external_id:, search:, request_options:); end
|
|
344
|
+
def list_resources(before:, after:, limit:, order:, organization_id:, resource_type_slug:, resource_external_id:, search:, parent:, request_options:); end
|
|
253
345
|
|
|
254
346
|
sig do
|
|
255
347
|
params(
|
|
@@ -258,13 +350,11 @@ module WorkOS
|
|
|
258
350
|
resource_type_slug: String,
|
|
259
351
|
organization_id: String,
|
|
260
352
|
description: T.nilable(String),
|
|
261
|
-
|
|
262
|
-
parent_resource_external_id: T.nilable(String),
|
|
263
|
-
parent_resource_type_slug: T.nilable(String),
|
|
353
|
+
parent_resource: T.nilable(T.any(WorkOS::Authorization::ParentResourceById, WorkOS::Authorization::ParentResourceByExternalId)),
|
|
264
354
|
request_options: T::Hash[Symbol, T.untyped]
|
|
265
355
|
).returns(WorkOS::AuthorizationResource)
|
|
266
356
|
end
|
|
267
|
-
def create_resource(external_id:, name:, resource_type_slug:, organization_id:, description:,
|
|
357
|
+
def create_resource(external_id:, name:, resource_type_slug:, organization_id:, description:, parent_resource:, request_options:); end
|
|
268
358
|
|
|
269
359
|
sig do
|
|
270
360
|
params(
|
|
@@ -279,13 +369,11 @@ module WorkOS
|
|
|
279
369
|
resource_id: String,
|
|
280
370
|
name: T.nilable(String),
|
|
281
371
|
description: T.nilable(String),
|
|
282
|
-
|
|
283
|
-
parent_resource_external_id: T.nilable(String),
|
|
284
|
-
parent_resource_type_slug: T.nilable(String),
|
|
372
|
+
parent_resource: T.nilable(T.any(WorkOS::Authorization::ParentResourceById, WorkOS::Authorization::ParentResourceByExternalId)),
|
|
285
373
|
request_options: T::Hash[Symbol, T.untyped]
|
|
286
374
|
).returns(WorkOS::AuthorizationResource)
|
|
287
375
|
end
|
|
288
|
-
def update_resource(resource_id:, name:, description:,
|
|
376
|
+
def update_resource(resource_id:, name:, description:, parent_resource:, request_options:); end
|
|
289
377
|
|
|
290
378
|
sig do
|
|
291
379
|
params(
|
|
@@ -310,6 +398,18 @@ module WorkOS
|
|
|
310
398
|
end
|
|
311
399
|
def list_memberships_for_resource(resource_id:, permission_slug:, before:, after:, limit:, order:, assignment:, request_options:); end
|
|
312
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
|
+
|
|
313
413
|
sig do
|
|
314
414
|
params(
|
|
315
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
|
|
@@ -0,0 +1,78 @@
|
|
|
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 OrganizationApiKeyWithValue
|
|
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::OrganizationApiKeyWithValueOwner) }
|
|
25
|
+
def owner; end
|
|
26
|
+
|
|
27
|
+
sig { params(value: WorkOS::OrganizationApiKeyWithValueOwner).returns(WorkOS::OrganizationApiKeyWithValueOwner) }
|
|
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(String) }
|
|
67
|
+
def value; end
|
|
68
|
+
|
|
69
|
+
sig { params(value: String).returns(String) }
|
|
70
|
+
def value=(value); end
|
|
71
|
+
|
|
72
|
+
sig { returns(T::Hash[Symbol, T.untyped]) }
|
|
73
|
+
def to_h; end
|
|
74
|
+
|
|
75
|
+
sig { params(args: T.untyped).returns(String) }
|
|
76
|
+
def to_json(*args); end
|
|
77
|
+
end
|
|
78
|
+
end
|
|
@@ -0,0 +1,30 @@
|
|
|
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 OrganizationApiKeyWithValueOwner
|
|
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 type; end
|
|
14
|
+
|
|
15
|
+
sig { params(value: String).returns(String) }
|
|
16
|
+
def type=(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(T::Hash[Symbol, T.untyped]) }
|
|
25
|
+
def to_h; end
|
|
26
|
+
|
|
27
|
+
sig { params(args: T.untyped).returns(String) }
|
|
28
|
+
def to_json(*args); end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -75,6 +75,12 @@ module WorkOS
|
|
|
75
75
|
sig { params(value: WorkOS::SlimRole).returns(WorkOS::SlimRole) }
|
|
76
76
|
def role=(value); end
|
|
77
77
|
|
|
78
|
+
sig { returns(WorkOS::User) }
|
|
79
|
+
def user; end
|
|
80
|
+
|
|
81
|
+
sig { params(value: WorkOS::User).returns(WorkOS::User) }
|
|
82
|
+
def user=(value); end
|
|
83
|
+
|
|
78
84
|
sig { returns(T::Hash[Symbol, T.untyped]) }
|
|
79
85
|
def to_h; end
|
|
80
86
|
|
data/rbi/workos/profile.rbi
CHANGED
|
@@ -63,6 +63,12 @@ module WorkOS
|
|
|
63
63
|
sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
|
|
64
64
|
def last_name=(value); end
|
|
65
65
|
|
|
66
|
+
sig { returns(T.nilable(String)) }
|
|
67
|
+
def name; end
|
|
68
|
+
|
|
69
|
+
sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
|
|
70
|
+
def name=(value); end
|
|
71
|
+
|
|
66
72
|
sig { returns(T.nilable(WorkOS::SlimRole)) }
|
|
67
73
|
def role; end
|
|
68
74
|
|