Skip to content

Commit e4c731c

Browse files
feat(generated)!: SDK surface change: Symbol "PermissionCreatedData" was removed (+2 more) (#524)
Co-authored-by: workos-sdk-automation[bot] <255426317+workos-sdk-automation[bot]@users.noreply.github.com>
1 parent 5b06e32 commit e4c731c

174 files changed

Lines changed: 11031 additions & 221 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
* [#524](https://github.com/workos/workos-ruby/pull/524) feat(generated)!: regenerate from spec (3 changes)
2+
3+
**Features**
4+
* **agents**:
5+
* Added model `ClaimViewResponse`
6+
* Added model `ClaimViewResponseOrganization`
7+
* Added model `AgentAdminLinkClaimAttemptToExternalUserRequest`
8+
* Added model `AgentAdminLinkClaimAttemptToExternalUserRequestUser`
9+
* Added enum `ClaimViewResponseStatus`
10+
* Added endpoint `PATCH /agents/claims/attempts`
11+
* Added model `AgentRegistration`
12+
* Added model `AgentCredentialValidation`
13+
* Added model `AgentRegistrationAgentIdentity`
14+
* Added model `AgentRegistrationClaim`
15+
* Added model `AgentAdminValidateCredentialRequest`
16+
* Added model `AgentRegistrationClaimClaimCompletion`
17+
* Added enum `AgentRegistrationStatus`
18+
* Added enum `AgentRegistrationKind`
19+
* Added enum `AgentAdminValidateCredentialRequestType`
20+
* Added service `Agents`
21+
* **[api_keys](https://workos.com/docs/reference/authkit/api-keys)**:
22+
* Added `agent_registration_id` to `ApiKeyValidationResponse`
23+
* **[connect](https://workos.com/docs/reference/workos-connect/standalone)**:
24+
* Added enum `ApplicationsRegistrationTypes`
25+
* Added parameter `Applications.list.registration_types`
26+
* **[directory_sync](https://workos.com/docs/reference/directory-sync)**:
27+
* Added parameter `DirectoryUsers.list.idp_id`
28+
* Added parameter `DirectoryUsers.list.email`
29+
* **[organizations](https://workos.com/docs/reference/organization)**:
30+
* Added model `OrganizationAuthorizedConnectApplicationList`
31+
* Added model `OrganizationAuthorizedConnectApplicationListData`
32+
* Added model `OrganizationAuthorizedConnectApplicationListListMetadata`
33+
* Added service `OrganizationsAuthorizedApplications`
34+
* **[pipes](https://workos.com/docs/reference/pipes)**:
35+
* Added model `DataIntegrationInstallation`
36+
* Added `auth_methods` to `CreateDataIntegration`
37+
* Added `api_key` to `CreateDataIntegration`
38+
* Added `api_key` to `UpdateDataIntegration`
39+
* Added `auth_methods` to `DataIntegration`
40+
* Added `installation` to `DataIntegration`
41+
* Added enum `CreateDataIntegrationAuthMethods`
42+
* Added enum `DataIntegrationAuthMethods`
43+
* Added model `DataIntegrationCredentialsResponse`
44+
* Added model `DataIntegrationCredentialsResponseCredential`
45+
* Added model `DataIntegrationsUpsertApiKeyRequest`
46+
* Added model `DataIntegrationsVendCredentialsRequest`
47+
* Added enum `DataIntegrationCredentialsResponseError`
48+
* Added endpoint `PUT /data-integrations/{slug}/api-key`
49+
* Added endpoint `POST /data-integrations/{slug}/credentials`
50+
* **[sso](https://workos.com/docs/reference/sso)**:
51+
* Added parameter `SSO.authorize.prompt`
52+
* **[user_management](https://workos.com/docs/reference/authkit/user)**:
53+
* Added `ssha256` to `CreateUserPasswordHashType`
54+
* Added `ssha256` to `UpdateUserPasswordHashType`
55+
* Added endpoint `GET /user_management/radar_challenges/{id}`
56+
* **[webhooks](https://workos.com/docs/reference/webhooks)**:
57+
* Added `agent.registration.revoked` to `CreateWebhookEndpointEvents`
58+
* Added `agent.registration.revoked` to `UpdateWebhookEndpointEvents`
59+
* Added `agent.registration.deleted` to `CreateWebhookEndpointEvents`
60+
* Added `agent.registration.deleted` to `UpdateWebhookEndpointEvents`
61+
* Added `radar.challenge_created` to `CreateWebhookEndpointEvents`
62+
* Added `radar.challenge_created` to `UpdateWebhookEndpointEvents`
63+
* Added `agent.registration.expired` to `CreateWebhookEndpointEvents`
64+
* Added `agent.registration.expired` to `UpdateWebhookEndpointEvents`
65+
* **[widgets](https://workos.com/docs/reference/widgets)**:
66+
* Made `WidgetSessionToken.organization_id` optional

.last-synced-sha

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
23faa38318d596e581656934ed72c4a18476d742
1+
f40851a620a1ba0badec95e80faac475382c8dd0

.oagen-manifest.json

Lines changed: 141 additions & 1 deletion
Large diffs are not rendered by default.

lib/workos.rb

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,23 @@
55
require "zeitwerk"
66

77
module WorkOS
8+
# Sentinel default for nullable optional parameters. Distinguishes an
9+
# omitted argument ("leave unchanged") from an explicit `nil`, which
10+
# clears the field by sending JSON `null`.
11+
OMIT = Object.new
12+
13+
def OMIT.inspect
14+
"WorkOS::OMIT"
15+
end
16+
17+
OMIT.freeze
818
end
919

1020
loader = Zeitwerk::Loader.for_gem
1121
require_relative "workos/inflections"
1222
loader.inflector.inflect(WORKOS_INFLECTIONS)
1323
loader.collapse("#{__dir__}/workos/admin_portal")
24+
loader.collapse("#{__dir__}/workos/agents")
1425
loader.collapse("#{__dir__}/workos/api_keys")
1526
loader.collapse("#{__dir__}/workos/audit_logs")
1627
loader.collapse("#{__dir__}/workos/authorization")

lib/workos/agents.rb

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
# frozen_string_literal: true
2+
3+
# This file is auto-generated by oagen. Do not edit.
4+
5+
require "json"
6+
7+
module WorkOS
8+
class Agents
9+
def initialize(client)
10+
@client = client
11+
end
12+
13+
# Link a claim attempt to an external user
14+
# @param type [String] The operation to perform on the claim attempt. Currently only `link_external_user` is supported.
15+
# @param claim_attempt_token [String] The token identifying the claim attempt.
16+
# @param user [WorkOS::AgentAdminLinkClaimAttemptToExternalUserRequestUser] The user to attach to the claim attempt, identified by email and external ID.
17+
# @param organization_id [String, nil] The organization to place the agent in. Required when the user belongs to more than one organization.
18+
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
19+
# @return [WorkOS::ClaimViewResponse]
20+
def update_attempts(
21+
type:,
22+
claim_attempt_token:,
23+
user:,
24+
organization_id: nil,
25+
request_options: {}
26+
)
27+
body = {
28+
"type" => type,
29+
"claim_attempt_token" => claim_attempt_token,
30+
"user" => user,
31+
"organization_id" => organization_id
32+
}.compact
33+
response = @client.request(
34+
method: :patch,
35+
path: "/agents/claims/attempts",
36+
auth: true,
37+
body: body,
38+
request_options: request_options
39+
)
40+
result = WorkOS::ClaimViewResponse.new(response.body)
41+
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"])
42+
result
43+
end
44+
45+
# Validate an agent credential
46+
# @param type [WorkOS::Types::AgentAdminValidateCredentialRequestType] The kind of credential being validated — an agent API key or an agent access token.
47+
# @param credential [String] The credential value to validate: the API key value for `api_key`, or the access token (JWT) for `access_token`.
48+
# @param audience [String, nil] When provided, the access token's `aud` claim is verified against this value. Tokens issued for a different resource are rejected.
49+
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
50+
# @return [WorkOS::AgentCredentialValidation]
51+
def create_validate(
52+
type:,
53+
credential:,
54+
audience: nil,
55+
request_options: {}
56+
)
57+
body = {
58+
"type" => type,
59+
"credential" => credential,
60+
"audience" => audience
61+
}.compact
62+
response = @client.request(
63+
method: :post,
64+
path: "/agents/credentials/validate",
65+
auth: true,
66+
body: body,
67+
request_options: request_options
68+
)
69+
result = WorkOS::AgentCredentialValidation.new(response.body)
70+
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"])
71+
result
72+
end
73+
74+
# Get an agent registration
75+
# @param id [String] The unique ID of the agent registration.
76+
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
77+
# @return [WorkOS::AgentRegistration]
78+
def get_registration(
79+
id:,
80+
request_options: {}
81+
)
82+
response = @client.request(
83+
method: :get,
84+
path: "/agents/registrations/#{WorkOS::Util.encode_path(id)}",
85+
auth: true,
86+
request_options: request_options
87+
)
88+
result = WorkOS::AgentRegistration.new(response.body)
89+
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"])
90+
result
91+
end
92+
end
93+
end
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# frozen_string_literal: true
2+
3+
# This file is auto-generated by oagen. Do not edit.
4+
5+
module WorkOS
6+
class AgentAdminLinkClaimAttemptToExternalUserRequest < WorkOS::Types::BaseModel
7+
HASH_ATTRS = {
8+
type: :type,
9+
claim_attempt_token: :claim_attempt_token,
10+
user: :user,
11+
organization_id: :organization_id
12+
}.freeze
13+
14+
attr_accessor \
15+
:type,
16+
:claim_attempt_token,
17+
:user,
18+
:organization_id
19+
20+
def initialize(json)
21+
hash = self.class.normalize(json)
22+
@type = hash[:type]
23+
@claim_attempt_token = hash[:claim_attempt_token]
24+
@user = hash[:user] ? WorkOS::AgentAdminLinkClaimAttemptToExternalUserRequestUser.new(hash[:user]) : nil
25+
@organization_id = hash[:organization_id]
26+
end
27+
end
28+
end
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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 AgentAdminLinkClaimAttemptToExternalUserRequestUser < WorkOS::Types::BaseModel
7+
HASH_ATTRS = {
8+
email: :email,
9+
external_id: :external_id
10+
}.freeze
11+
12+
attr_accessor \
13+
:email,
14+
:external_id
15+
16+
def initialize(json)
17+
hash = self.class.normalize(json)
18+
@email = hash[:email]
19+
@external_id = hash[:external_id]
20+
end
21+
end
22+
end
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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 AgentAdminValidateCredentialRequest < WorkOS::Types::BaseModel
7+
HASH_ATTRS = {
8+
type: :type,
9+
credential: :credential,
10+
audience: :audience
11+
}.freeze
12+
13+
attr_accessor \
14+
:type,
15+
:credential,
16+
:audience
17+
18+
def initialize(json)
19+
hash = self.class.normalize(json)
20+
@type = hash[:type]
21+
@credential = hash[:credential]
22+
@audience = hash[:audience]
23+
end
24+
end
25+
end
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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 AgentCredentialValidation < WorkOS::Types::BaseModel
7+
HASH_ATTRS = {
8+
valid: :valid,
9+
registration_id: :registration_id,
10+
expires_at: :expires_at
11+
}.freeze
12+
13+
attr_accessor \
14+
:valid,
15+
:registration_id,
16+
:expires_at
17+
18+
def initialize(json)
19+
hash = self.class.normalize(json)
20+
@valid = hash[:valid]
21+
@registration_id = hash[:registration_id]
22+
@expires_at = hash[:expires_at]
23+
end
24+
end
25+
end
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# frozen_string_literal: true
2+
3+
# This file is auto-generated by oagen. Do not edit.
4+
5+
module WorkOS
6+
class AgentRegistration < WorkOS::Types::BaseModel
7+
HASH_ATTRS = {
8+
id: :id,
9+
agent_identity: :agent_identity,
10+
organization_id: :organization_id,
11+
status: :status,
12+
kind: :kind,
13+
claim: :claim,
14+
created_at: :created_at,
15+
updated_at: :updated_at
16+
}.freeze
17+
18+
attr_accessor \
19+
:id,
20+
:agent_identity,
21+
:organization_id,
22+
:status,
23+
:kind,
24+
:claim,
25+
:created_at,
26+
:updated_at
27+
28+
def initialize(json)
29+
hash = self.class.normalize(json)
30+
@id = hash[:id]
31+
@agent_identity = hash[:agent_identity] ? WorkOS::AgentRegistrationAgentIdentity.new(hash[:agent_identity]) : nil
32+
@organization_id = hash[:organization_id]
33+
@status = hash[:status]
34+
@kind = hash[:kind]
35+
@claim = hash[:claim] ? WorkOS::AgentRegistrationClaim.new(hash[:claim]) : nil
36+
@created_at = hash[:created_at]
37+
@updated_at = hash[:updated_at]
38+
end
39+
end
40+
end

0 commit comments

Comments
 (0)