From bd40c3fe0e57f30990c818eb68b5f31e090f9250 Mon Sep 17 00:00:00 2001 From: "workos-sdk-automation[bot]" <255426317+workos-sdk-automation[bot]@users.noreply.github.com> Date: Tue, 1 Sep 2026 16:10:50 +0000 Subject: [PATCH 1/7] feat(api_keys)!: SDK surface change: Symbol "ValidateApiKey" was removed --- lib/workos/api_keys/validate_api_key.rb | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/lib/workos/api_keys/validate_api_key.rb b/lib/workos/api_keys/validate_api_key.rb index e7d92a4c..6ccddea8 100644 --- a/lib/workos/api_keys/validate_api_key.rb +++ b/lib/workos/api_keys/validate_api_key.rb @@ -3,16 +3,5 @@ # This file is auto-generated by oagen. Do not edit. module WorkOS - class ValidateApiKey < WorkOS::Types::BaseModel - HASH_ATTRS = { - value: :value - }.freeze - - attr_accessor :value - - def initialize(json) - hash = self.class.normalize(json) - @value = hash[:value] - end - end + ValidateApiKey = CreateSAMLIdpSigningCertificate end From 1a30d567408310cae39bb1d5d1b00a55b34dff61 Mon Sep 17 00:00:00 2001 From: "workos-sdk-automation[bot]" <255426317+workos-sdk-automation[bot]@users.noreply.github.com> Date: Tue, 1 Sep 2026 16:10:50 +0000 Subject: [PATCH 2/7] feat(audit_logs)!: SDK surface change: Parameter "retention_period_in_days" renamed to "retention" on "AuditLogs.update_organization_audit_logs_retention" --- lib/workos/audit_logs.rb | 28 +++++++++++++--- .../update_audit_logs_retention.rb | 14 +++++++- ...e_audit_logs_retention_retention_period.rb | 32 +++++++++++++++++++ rbi/workos/audit_logs.rbi | 28 ++++++++++++++-- rbi/workos/update_audit_logs_retention.rbi | 10 ++++-- test/workos/test_audit_logs.rb | 13 ++++++-- 6 files changed, 113 insertions(+), 12 deletions(-) create mode 100644 lib/workos/types/update_audit_logs_retention_retention_period.rb diff --git a/lib/workos/audit_logs.rb b/lib/workos/audit_logs.rb index 2e0e7deb..f9adafad 100644 --- a/lib/workos/audit_logs.rb +++ b/lib/workos/audit_logs.rb @@ -6,6 +6,18 @@ module WorkOS class AuditLogs + # Identifies the retention (period variant). + # + # @!attribute [r] retention_period + # @return [WorkOS::Types::UpdateAuditLogsRetentionRetentionPeriod] + RetentionPeriod = Data.define(:retention_period) + + # Identifies the retention (period in days variant). + # + # @!attribute [r] retention_period_in_days + # @return [Integer] + RetentionPeriodInDays = Data.define(:retention_period_in_days) + def initialize(client) @client = client end @@ -31,17 +43,23 @@ def get_organization_audit_logs_retention( # Set Retention # @param id [String] Unique identifier of the Organization. - # @param retention_period_in_days [Integer] The number of days Audit Log events will be retained. Valid values are `30` and `365`. + # @param retention [WorkOS::AuditLogs::RetentionPeriod, WorkOS::AuditLogs::RetentionPeriodInDays] Identifies the retention. # @param request_options [Hash] (see WorkOS::Types::RequestOptions) # @return [WorkOS::AuditLogsRetention] def update_organization_audit_logs_retention( id:, - retention_period_in_days:, + retention:, request_options: {} ) - body = { - "retention_period_in_days" => retention_period_in_days - } + body = {} + case retention + when WorkOS::AuditLogs::RetentionPeriod + body["retention_period"] = retention.retention_period + when WorkOS::AuditLogs::RetentionPeriodInDays + body["retention_period_in_days"] = retention.retention_period_in_days + else + raise ArgumentError, "expected retention to be one of: WorkOS::AuditLogs::RetentionPeriod, WorkOS::AuditLogs::RetentionPeriodInDays, got #{retention.class}" + end response = @client.request( method: :put, path: "/organizations/#{WorkOS::Util.encode_path(id)}/audit_logs_retention", diff --git a/lib/workos/organizations/update_audit_logs_retention.rb b/lib/workos/organizations/update_audit_logs_retention.rb index 14e0ccfa..da5c8c41 100644 --- a/lib/workos/organizations/update_audit_logs_retention.rb +++ b/lib/workos/organizations/update_audit_logs_retention.rb @@ -5,13 +5,25 @@ module WorkOS class UpdateAuditLogsRetention < WorkOS::Types::BaseModel HASH_ATTRS = { + retention_period: :retention_period, retention_period_in_days: :retention_period_in_days }.freeze - attr_accessor :retention_period_in_days + # @!attribute retention_period_in_days + # @deprecated The number of days Audit Log events will be retained. Valid values are `30` through `330` in 30-day increments and `365` through `3650` in 365-day increments. Deprecated: use `retention_period` instead. Mutually exclusive with `retention_period`. + + attr_accessor :retention_period + + def retention_period_in_days + warn "[DEPRECATION] `retention_period_in_days` is deprecated and will be removed in a future version.", uplevel: 1 + @retention_period_in_days + end + + attr_writer :retention_period_in_days def initialize(json) hash = self.class.normalize(json) + @retention_period = hash[:retention_period] @retention_period_in_days = hash[:retention_period_in_days] end end diff --git a/lib/workos/types/update_audit_logs_retention_retention_period.rb b/lib/workos/types/update_audit_logs_retention_retention_period.rb new file mode 100644 index 00000000..8e0623ac --- /dev/null +++ b/lib/workos/types/update_audit_logs_retention_retention_period.rb @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + module Types + class UpdateAuditLogsRetentionRetentionPeriod + VALUE_1_MONTH = "1_MONTH" + VALUE_2_MONTHS = "2_MONTHS" + VALUE_3_MONTHS = "3_MONTHS" + VALUE_4_MONTHS = "4_MONTHS" + VALUE_5_MONTHS = "5_MONTHS" + VALUE_6_MONTHS = "6_MONTHS" + VALUE_7_MONTHS = "7_MONTHS" + VALUE_8_MONTHS = "8_MONTHS" + VALUE_9_MONTHS = "9_MONTHS" + VALUE_10_MONTHS = "10_MONTHS" + VALUE_11_MONTHS = "11_MONTHS" + VALUE_1_YEAR = "1_YEAR" + VALUE_2_YEARS = "2_YEARS" + VALUE_3_YEARS = "3_YEARS" + VALUE_4_YEARS = "4_YEARS" + VALUE_5_YEARS = "5_YEARS" + VALUE_6_YEARS = "6_YEARS" + VALUE_7_YEARS = "7_YEARS" + VALUE_8_YEARS = "8_YEARS" + VALUE_9_YEARS = "9_YEARS" + VALUE_10_YEARS = "10_YEARS" + ALL = [VALUE_1_MONTH, VALUE_2_MONTHS, VALUE_3_MONTHS, VALUE_4_MONTHS, VALUE_5_MONTHS, VALUE_6_MONTHS, VALUE_7_MONTHS, VALUE_8_MONTHS, VALUE_9_MONTHS, VALUE_10_MONTHS, VALUE_11_MONTHS, VALUE_1_YEAR, VALUE_2_YEARS, VALUE_3_YEARS, VALUE_4_YEARS, VALUE_5_YEARS, VALUE_6_YEARS, VALUE_7_YEARS, VALUE_8_YEARS, VALUE_9_YEARS, VALUE_10_YEARS].freeze + end + end +end diff --git a/rbi/workos/audit_logs.rbi b/rbi/workos/audit_logs.rbi index 4fc1e0b6..0a9fe19b 100644 --- a/rbi/workos/audit_logs.rbi +++ b/rbi/workos/audit_logs.rbi @@ -6,6 +6,30 @@ module WorkOS class AuditLogs + class RetentionPeriod + sig { returns(String) } + def retention_period; end + + sig do + params( + retention_period: String + ).returns(WorkOS::AuditLogs::RetentionPeriod) + end + def self.new(retention_period:); end + end + + class RetentionPeriodInDays + sig { returns(Integer) } + def retention_period_in_days; end + + sig do + params( + retention_period_in_days: Integer + ).returns(WorkOS::AuditLogs::RetentionPeriodInDays) + end + def self.new(retention_period_in_days:); end + end + sig { params(client: WorkOS::BaseClient).void } def initialize(client); end @@ -20,11 +44,11 @@ module WorkOS sig do params( id: String, - retention_period_in_days: Integer, + retention: T.any(WorkOS::AuditLogs::RetentionPeriod, WorkOS::AuditLogs::RetentionPeriodInDays), request_options: T::Hash[Symbol, T.untyped] ).returns(WorkOS::AuditLogsRetention) end - def update_organization_audit_logs_retention(id:, retention_period_in_days:, request_options:); end + def update_organization_audit_logs_retention(id:, retention:, request_options:); end sig do params( diff --git a/rbi/workos/update_audit_logs_retention.rbi b/rbi/workos/update_audit_logs_retention.rbi index 9784964c..c08ec3a0 100644 --- a/rbi/workos/update_audit_logs_retention.rbi +++ b/rbi/workos/update_audit_logs_retention.rbi @@ -9,10 +9,16 @@ module WorkOS sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } def initialize(json); end - sig { returns(Integer) } + sig { returns(T.nilable(String)) } + def retention_period; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def retention_period=(value); end + + sig { returns(T.nilable(Integer)) } def retention_period_in_days; end - sig { params(value: Integer).returns(Integer) } + sig { params(value: T.nilable(Integer)).returns(T.nilable(Integer)) } def retention_period_in_days=(value); end sig { returns(T::Hash[Symbol, T.untyped]) } diff --git a/test/workos/test_audit_logs.rb b/test/workos/test_audit_logs.rb index 764e2674..6c8b52b5 100644 --- a/test/workos/test_audit_logs.rb +++ b/test/workos/test_audit_logs.rb @@ -20,8 +20,17 @@ def test_get_organization_audit_logs_retention_returns_expected_result def test_update_organization_audit_logs_retention_returns_expected_result stub_request(:put, %r{\Ahttps://api\.workos\.com/organizations/stub/audit_logs_retention(\?|\z)}) + .with(body: hash_including("retention_period" => "stub")) .to_return(body: "{}", status: 200) - result = @client.audit_logs.update_organization_audit_logs_retention(id: "stub", retention_period_in_days: 1) + result = @client.audit_logs.update_organization_audit_logs_retention(id: "stub", retention: WorkOS::AuditLogs::RetentionPeriod.new(retention_period: "stub")) + refute_nil result + end + + def test_update_organization_audit_logs_retention_with_retention_period_in_days_returns_expected_result + stub_request(:put, %r{\Ahttps://api\.workos\.com/organizations/stub/audit_logs_retention(\?|\z)}) + .with(body: hash_including("retention_period_in_days" => 1)) + .to_return(body: "{}", status: 200) + result = @client.audit_logs.update_organization_audit_logs_retention(id: "stub", retention: WorkOS::AuditLogs::RetentionPeriodInDays.new(retention_period_in_days: 1)) refute_nil result end @@ -70,7 +79,7 @@ def test_get_export_returns_expected_result # Parameterized authentication error tests (one per endpoint). [ {name: :get_organization_audit_logs_retention, verb: :get, url: %r{\Ahttps://api\.workos\.com/organizations/stub/audit_logs_retention(\?|\z)}, args: {id: "stub"}}, - {name: :update_organization_audit_logs_retention, verb: :put, url: %r{\Ahttps://api\.workos\.com/organizations/stub/audit_logs_retention(\?|\z)}, args: {id: "stub", retention_period_in_days: 1}}, + {name: :update_organization_audit_logs_retention, verb: :put, url: %r{\Ahttps://api\.workos\.com/organizations/stub/audit_logs_retention(\?|\z)}, args: {id: "stub", retention: WorkOS::AuditLogs::RetentionPeriod.new(retention_period: "stub")}}, {name: :list_actions, verb: :get, url: %r{\Ahttps://api\.workos\.com/audit_logs/actions(\?|\z)}}, {name: :list_action_schemas, verb: :get, url: %r{\Ahttps://api\.workos\.com/audit_logs/actions/stub/schemas(\?|\z)}, args: {action_name: "stub"}}, {name: :create_schema, verb: :post, url: %r{\Ahttps://api\.workos\.com/audit_logs/actions/stub/schemas(\?|\z)}, args: {action_name: "stub", targets: [{}]}}, From a51c915cea49000d9a23d819740d87df8533e579 Mon Sep 17 00:00:00 2001 From: "workos-sdk-automation[bot]" <255426317+workos-sdk-automation[bot]@users.noreply.github.com> Date: Tue, 1 Sep 2026 16:10:50 +0000 Subject: [PATCH 3/7] feat(user_management)!: SDK surface change: Symbol "CreatePasswordResetToken" was removed --- .../types/user_management_waitlists_state.rb | 14 ++ lib/workos/user_management.rb | 176 ++++++++++++++++++ .../create_password_reset_token.rb | 13 +- .../user_management/create_waitlist_entry.rb | 25 +++ lib/workos/user_management/waitlist.rb | 28 +++ lib/workos/user_management/waitlist_entry.rb | 43 +++++ rbi/workos/user_management.rbi | 64 +++++++ test/workos/test_user_management.rb | 56 ++++++ .../test_user_management_model_round_trip.rb | 80 +++++++- 9 files changed, 485 insertions(+), 14 deletions(-) create mode 100644 lib/workos/types/user_management_waitlists_state.rb create mode 100644 lib/workos/user_management/create_waitlist_entry.rb create mode 100644 lib/workos/user_management/waitlist.rb create mode 100644 lib/workos/user_management/waitlist_entry.rb diff --git a/lib/workos/types/user_management_waitlists_state.rb b/lib/workos/types/user_management_waitlists_state.rb new file mode 100644 index 00000000..55aafd09 --- /dev/null +++ b/lib/workos/types/user_management_waitlists_state.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + module Types + class UserManagementWaitlistsState + PENDING = "pending" + APPROVED = "approved" + DENIED = "denied" + ALL = [PENDING, APPROVED, DENIED].freeze + end + end +end diff --git a/lib/workos/user_management.rb b/lib/workos/user_management.rb index 7d6d542f..8e2ef087 100644 --- a/lib/workos/user_management.rb +++ b/lib/workos/user_management.rb @@ -68,6 +68,7 @@ def get_jwks( # @param organization_id [String, nil] The ID of the organization to scope the session to. # @param pending_authentication_token [String, nil] The pending authentication token from a previous authentication attempt. # @param authentication_challenge_id [String, nil] The ID of the MFA authentication challenge. + # @param email_completion_token [String, nil] The token from the `email_completion_required` response. # @param radar_challenge_id [String, nil] The ID of the Radar email challenge being verified. # @param verification_id [String, nil] The ID of the Radar SMS verification being confirmed. Required for sign-up challenges; omitted for sign-in challenges, where the verification is resolved server-side. # @param phone_number [String, nil] The phone number the Radar SMS challenge was sent to. Required for sign-up challenges; omitted for sign-in challenges, where the phone number on file is resolved server-side. @@ -92,6 +93,7 @@ def create_authenticate( organization_id: nil, pending_authentication_token: nil, authentication_challenge_id: nil, + email_completion_token: nil, radar_challenge_id: nil, verification_id: nil, phone_number: nil, @@ -116,6 +118,7 @@ def create_authenticate( "organization_id" => organization_id, "pending_authentication_token" => pending_authentication_token, "authentication_challenge_id" => authentication_challenge_id, + "email_completion_token" => email_completion_token, "radar_challenge_id" => radar_challenge_id, "verification_id" => verification_id, "phone_number" => phone_number, @@ -1686,6 +1689,179 @@ def delete_user_authorized_application( nil end + # Delete a waitlist entry + # @param id [String] The unique ID of the waitlist entry. + # @param request_options [Hash] (see WorkOS::Types::RequestOptions) + # @return [void] + def delete_waitlist_entry( + id:, + request_options: {} + ) + @client.request( + method: :delete, + path: "/user_management/waitlist_entries/#{WorkOS::Util.encode_path(id)}", + auth: true, + request_options: request_options + ) + nil + end + + # Approve a waitlist entry + # @param id [String] The unique ID of the waitlist entry. + # @param request_options [Hash] (see WorkOS::Types::RequestOptions) + # @return [WorkOS::WaitlistEntry] + def create_waitlist_entry_approve( + id:, + request_options: {} + ) + response = @client.request( + method: :post, + path: "/user_management/waitlist_entries/#{WorkOS::Util.encode_path(id)}/approve", + auth: true, + request_options: request_options + ) + result = WorkOS::WaitlistEntry.new(response.body) + 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"]) + result + end + + # Deny a waitlist entry + # @param id [String] The unique ID of the waitlist entry. + # @param request_options [Hash] (see WorkOS::Types::RequestOptions) + # @return [WorkOS::WaitlistEntry] + def create_waitlist_entry_deny( + id:, + request_options: {} + ) + response = @client.request( + method: :post, + path: "/user_management/waitlist_entries/#{WorkOS::Util.encode_path(id)}/deny", + auth: true, + request_options: request_options + ) + result = WorkOS::WaitlistEntry.new(response.body) + 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"]) + result + end + + # List waitlists + # @param request_options [Hash] (see WorkOS::Types::RequestOptions) + # @return [WorkOS::Types::ListStruct] + def list_waitlists(request_options: {}) + response = @client.request( + method: :get, + path: "/user_management/waitlists", + auth: true, + request_options: request_options + ) + WorkOS::Types::ListStruct.from_response(response, model: WorkOS::Waitlist) + end + + # Get a waitlist + # @param id [String] The unique ID of the waitlist, or the literal `default` for the environment's default waitlist. The default waitlist is created when its first entry is added, so read requests for `default` return a `404` until then. + # @param request_options [Hash] (see WorkOS::Types::RequestOptions) + # @return [WorkOS::Waitlist] + def get_waitlist( + id:, + request_options: {} + ) + response = @client.request( + method: :get, + path: "/user_management/waitlists/#{WorkOS::Util.encode_path(id)}", + auth: true, + request_options: request_options + ) + result = WorkOS::Waitlist.new(response.body) + 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"]) + result + end + + # List waitlist entries + # @param id [String] The unique ID of the waitlist, or the literal `default` for the environment's default waitlist. The default waitlist is created when its first entry is added, so read requests for `default` return a `404` until then. + # @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"`. + # @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"`. + # @param limit [Integer, nil] Upper limit on the number of objects to return, between `1` and `100`. + # @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). + # @param state [WorkOS::Types::UserManagementWaitlistsState, nil] Filter waitlist entries by their state. + # @param email [String, nil] Filter waitlist entries by their exact email address. + # @param request_options [Hash] (see WorkOS::Types::RequestOptions) + # @return [WorkOS::Types::ListStruct] + def list_waitlist_entries( + id:, + before: nil, + after: nil, + limit: 10, + order: "desc", + state: nil, + email: nil, + request_options: {} + ) + params = { + "before" => before, + "after" => after, + "limit" => limit, + "order" => order, + "state" => state, + "email" => email + }.compact + response = @client.request( + method: :get, + path: "/user_management/waitlists/#{WorkOS::Util.encode_path(id)}/entries", + auth: true, + params: params, + request_options: request_options + ) + fetch_next = ->(cursor) { + list_waitlist_entries( + id: id, + before: before, + after: cursor, + limit: limit, + order: order, + state: state, + email: email, + request_options: request_options + ) + } + WorkOS::Types::ListStruct.from_response( + response, + model: WorkOS::WaitlistEntry, + filters: {id: id, before: before, limit: limit, order: order, state: state, email: email}, + fetch_next: fetch_next + ) + end + + # Create a waitlist entry + # @param id [String] The unique ID of the waitlist, or the literal `default` for the environment's default waitlist. Use `default` when adding the first entry — the default waitlist is created automatically. + # @param email [String] The email address of the user joining the waitlist. + # @param additional_fields [Hash{String => String}, nil] Object containing additional key/value pairs collected with the waitlist entry. Supports up to 50 string pairs, with keys up to 40 characters and values up to 600 characters. Values are user-provided — treat them as untrusted input when rendering or exporting. + # @param send_confirmation_email [Boolean, nil] Whether to send the waitlist confirmation email to the user. Defaults to `false`. No email is sent when the waitlist confirmation email is disabled in the environment, even if `send_confirmation_email` is `true`. + # @param request_options [Hash] (see WorkOS::Types::RequestOptions) + # @return [WorkOS::WaitlistEntry] + def create_waitlist_entry( + id:, + email:, + additional_fields: nil, + send_confirmation_email: nil, + request_options: {} + ) + body = { + "email" => email, + "additional_fields" => additional_fields, + "send_confirmation_email" => send_confirmation_email + }.compact + response = @client.request( + method: :post, + path: "/user_management/waitlists/#{WorkOS::Util.encode_path(id)}/entries", + auth: true, + body: body, + request_options: request_options + ) + result = WorkOS::WaitlistEntry.new(response.body) + 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"]) + result + end + # List API keys for a user # @param user_id [String] Unique identifier of the user. # @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. diff --git a/lib/workos/user_management/create_password_reset_token.rb b/lib/workos/user_management/create_password_reset_token.rb index df036baa..239c6997 100644 --- a/lib/workos/user_management/create_password_reset_token.rb +++ b/lib/workos/user_management/create_password_reset_token.rb @@ -3,16 +3,5 @@ # This file is auto-generated by oagen. Do not edit. module WorkOS - class CreatePasswordResetToken < WorkOS::Types::BaseModel - HASH_ATTRS = { - email: :email - }.freeze - - attr_accessor :email - - def initialize(json) - hash = self.class.normalize(json) - @email = hash[:email] - end - end + CreatePasswordResetToken = CreateItContact end diff --git a/lib/workos/user_management/create_waitlist_entry.rb b/lib/workos/user_management/create_waitlist_entry.rb new file mode 100644 index 00000000..11656eb2 --- /dev/null +++ b/lib/workos/user_management/create_waitlist_entry.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class CreateWaitlistEntry < WorkOS::Types::BaseModel + HASH_ATTRS = { + email: :email, + additional_fields: :additional_fields, + send_confirmation_email: :send_confirmation_email + }.freeze + + attr_accessor \ + :email, + :additional_fields, + :send_confirmation_email + + def initialize(json) + hash = self.class.normalize(json) + @email = hash[:email] + @additional_fields = hash[:additional_fields] || {} + @send_confirmation_email = hash[:send_confirmation_email] + end + end +end diff --git a/lib/workos/user_management/waitlist.rb b/lib/workos/user_management/waitlist.rb new file mode 100644 index 00000000..adafecdc --- /dev/null +++ b/lib/workos/user_management/waitlist.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class Waitlist < WorkOS::Types::BaseModel + HASH_ATTRS = { + object: :object, + id: :id, + created_at: :created_at, + updated_at: :updated_at + }.freeze + + attr_accessor \ + :object, + :id, + :created_at, + :updated_at + + def initialize(json) + hash = self.class.normalize(json) + @object = hash[:object] + @id = hash[:id] + @created_at = hash[:created_at] + @updated_at = hash[:updated_at] + end + end +end diff --git a/lib/workos/user_management/waitlist_entry.rb b/lib/workos/user_management/waitlist_entry.rb new file mode 100644 index 00000000..6bafdb60 --- /dev/null +++ b/lib/workos/user_management/waitlist_entry.rb @@ -0,0 +1,43 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class WaitlistEntry < WorkOS::Types::BaseModel + HASH_ATTRS = { + id: :id, + email: :email, + state: :state, + approved_at: :approved_at, + additional_fields: :additional_fields, + waitlist_id: :waitlist_id, + created_at: :created_at, + updated_at: :updated_at, + object: :object + }.freeze + + attr_accessor \ + :id, + :email, + :state, + :approved_at, + :additional_fields, + :waitlist_id, + :created_at, + :updated_at, + :object + + def initialize(json) + hash = self.class.normalize(json) + @id = hash[:id] + @email = hash[:email] + @state = hash[:state] + @approved_at = hash[:approved_at] + @additional_fields = hash[:additional_fields] || {} + @waitlist_id = hash[:waitlist_id] + @created_at = hash[:created_at] + @updated_at = hash[:updated_at] + @object = hash[:object] + end + end +end diff --git a/rbi/workos/user_management.rbi b/rbi/workos/user_management.rbi index 11d570ce..8f89f9ea 100644 --- a/rbi/workos/user_management.rbi +++ b/rbi/workos/user_management.rbi @@ -463,6 +463,70 @@ module WorkOS end def delete_user_authorized_application(application_id:, user_id:, request_options:); end + sig do + params( + id: String, + request_options: T::Hash[Symbol, T.untyped] + ).returns(NilClass) + end + def delete_waitlist_entry(id:, request_options:); end + + sig do + params( + id: String, + request_options: T::Hash[Symbol, T.untyped] + ).returns(WorkOS::WaitlistEntry) + end + def create_waitlist_entry_approve(id:, request_options:); end + + sig do + params( + id: String, + request_options: T::Hash[Symbol, T.untyped] + ).returns(WorkOS::WaitlistEntry) + end + def create_waitlist_entry_deny(id:, request_options:); end + + sig do + params( + request_options: T::Hash[Symbol, T.untyped] + ).returns(T::Array[WorkOS::Waitlist]) + end + def list_waitlists(request_options:); end + + sig do + params( + id: String, + request_options: T::Hash[Symbol, T.untyped] + ).returns(WorkOS::Waitlist) + end + def get_waitlist(id:, request_options:); end + + sig do + params( + id: String, + before: T.nilable(String), + after: T.nilable(String), + limit: T.nilable(Integer), + order: T.nilable(String), + state: T.nilable(String), + email: T.nilable(String), + request_options: T::Hash[Symbol, T.untyped] + ).returns(T::Array[WorkOS::WaitlistEntry]) + end + def list_waitlist_entries(id:, before:, after:, limit:, order:, state:, email:, request_options:); end + + sig do + params( + id: String, + email: String, + additional_fields: T.nilable(T::Hash[String, String]), + send_confirmation_email: T.nilable(T::Boolean), + request_options: T::Hash[Symbol, T.untyped] + ).returns(WorkOS::WaitlistEntry) + end + def create_waitlist_entry(id:, email:, additional_fields:, send_confirmation_email:, request_options:); end + sig do params( user_id: String, diff --git a/test/workos/test_user_management.rb b/test/workos/test_user_management.rb index 1cbfc2d2..294090cf 100644 --- a/test/workos/test_user_management.rb +++ b/test/workos/test_user_management.rb @@ -459,6 +459,55 @@ def test_delete_user_authorized_application_returns_expected_result assert_nil result end + def test_delete_waitlist_entry_returns_expected_result + stub_request(:delete, %r{\Ahttps://api\.workos\.com/user_management/waitlist_entries/stub(\?|\z)}) + .to_return(body: "{}", status: 200) + result = @client.user_management.delete_waitlist_entry(id: "stub") + assert_nil result + end + + def test_create_waitlist_entry_approve_returns_expected_result + stub_request(:post, %r{\Ahttps://api\.workos\.com/user_management/waitlist_entries/stub/approve(\?|\z)}) + .to_return(body: "{}", status: 200) + result = @client.user_management.create_waitlist_entry_approve(id: "stub") + refute_nil result + end + + def test_create_waitlist_entry_deny_returns_expected_result + stub_request(:post, %r{\Ahttps://api\.workos\.com/user_management/waitlist_entries/stub/deny(\?|\z)}) + .to_return(body: "{}", status: 200) + result = @client.user_management.create_waitlist_entry_deny(id: "stub") + refute_nil result + end + + def test_list_waitlists_returns_expected_result + stub_request(:get, %r{\Ahttps://api\.workos\.com/user_management/waitlists(\?|\z)}) + .to_return(body: '{"data": [], "list_metadata": {}}', status: 200) + result = @client.user_management.list_waitlists + assert_kind_of WorkOS::Types::ListStruct, result + end + + def test_get_waitlist_returns_expected_result + stub_request(:get, %r{\Ahttps://api\.workos\.com/user_management/waitlists/stub(\?|\z)}) + .to_return(body: "{}", status: 200) + result = @client.user_management.get_waitlist(id: "stub") + refute_nil result + end + + def test_list_waitlist_entries_returns_expected_result + stub_request(:get, %r{\Ahttps://api\.workos\.com/user_management/waitlists/stub/entries(\?|\z)}) + .to_return(body: '{"data": [], "list_metadata": {}}', status: 200) + result = @client.user_management.list_waitlist_entries(id: "stub") + assert_kind_of WorkOS::Types::ListStruct, result + end + + def test_create_waitlist_entry_returns_expected_result + stub_request(:post, %r{\Ahttps://api\.workos\.com/user_management/waitlists/stub/entries(\?|\z)}) + .to_return(body: "{}", status: 200) + result = @client.user_management.create_waitlist_entry(id: "stub", email: "stub") + refute_nil result + end + def test_list_user_api_keys_returns_expected_result stub_request(:get, %r{\Ahttps://api\.workos\.com/user_management/users/stub/api_keys(\?|\z)}) .to_return(body: '{"data": [], "list_metadata": {}}', status: 200) @@ -515,6 +564,13 @@ def test_create_user_api_key_returns_expected_result {name: :delete_redirect_uris, verb: :delete, url: %r{\Ahttps://api\.workos\.com/user_management/redirect_uris/stub(\?|\z)}, args: {id: "stub"}}, {name: :list_user_authorized_applications, verb: :get, url: %r{\Ahttps://api\.workos\.com/user_management/users/stub/authorized_applications(\?|\z)}, args: {user_id: "stub"}}, {name: :delete_user_authorized_application, verb: :delete, url: %r{\Ahttps://api\.workos\.com/user_management/users/stub/authorized_applications/stub(\?|\z)}, args: {application_id: "stub", user_id: "stub"}}, + {name: :delete_waitlist_entry, verb: :delete, url: %r{\Ahttps://api\.workos\.com/user_management/waitlist_entries/stub(\?|\z)}, args: {id: "stub"}}, + {name: :create_waitlist_entry_approve, verb: :post, url: %r{\Ahttps://api\.workos\.com/user_management/waitlist_entries/stub/approve(\?|\z)}, args: {id: "stub"}}, + {name: :create_waitlist_entry_deny, verb: :post, url: %r{\Ahttps://api\.workos\.com/user_management/waitlist_entries/stub/deny(\?|\z)}, args: {id: "stub"}}, + {name: :list_waitlists, verb: :get, url: %r{\Ahttps://api\.workos\.com/user_management/waitlists(\?|\z)}}, + {name: :get_waitlist, verb: :get, url: %r{\Ahttps://api\.workos\.com/user_management/waitlists/stub(\?|\z)}, args: {id: "stub"}}, + {name: :list_waitlist_entries, verb: :get, url: %r{\Ahttps://api\.workos\.com/user_management/waitlists/stub/entries(\?|\z)}, args: {id: "stub"}}, + {name: :create_waitlist_entry, verb: :post, url: %r{\Ahttps://api\.workos\.com/user_management/waitlists/stub/entries(\?|\z)}, args: {id: "stub", email: "stub"}}, {name: :list_user_api_keys, verb: :get, url: %r{\Ahttps://api\.workos\.com/user_management/users/stub/api_keys(\?|\z)}, args: {user_id: "stub"}}, {name: :create_user_api_key, verb: :post, url: %r{\Ahttps://api\.workos\.com/user_management/users/stub/api_keys(\?|\z)}, args: {user_id: "stub", name: "stub", organization_id: "stub"}} ].each do |spec| diff --git a/test/workos/test_user_management_model_round_trip.rb b/test/workos/test_user_management_model_round_trip.rb index b89facad..a62b528a 100644 --- a/test/workos/test_user_management_model_round_trip.rb +++ b/test/workos/test_user_management_model_round_trip.rb @@ -225,6 +225,19 @@ def test_revoke_session_round_trip fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } end + def test_create_waitlist_entry_round_trip + fixture = { + "email" => "stub", + "additional_fields" => {}, + "send_confirmation_email" => true + } + model = WorkOS::CreateWaitlistEntry.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + assert_equal fixture["email"], json[:email] + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + def test_user_round_trip fixture = { "object" => "user", @@ -683,7 +696,8 @@ def test_authentication_oauth_failed_data_round_trip "user_agent" => nil, "user_id" => nil, "email" => nil, - "error" => {} + "error" => {}, + "provider" => "stub" } model = WorkOS::AuthenticationOAuthFailedData.new(fixture.to_json) json = model.to_h @@ -732,7 +746,8 @@ def test_authentication_oauth_succeeded_data_round_trip "ip_address" => nil, "user_agent" => nil, "user_id" => nil, - "email" => "stub" + "email" => "stub", + "provider" => "stub" } model = WorkOS::AuthenticationOAuthSucceededData.new(fixture.to_json) json = model.to_h @@ -2058,6 +2073,45 @@ def test_device_authorization_response_round_trip fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } end + def test_waitlist_round_trip + fixture = { + "object" => "waitlist", + "id" => "stub", + "created_at" => "stub", + "updated_at" => "stub" + } + model = WorkOS::Waitlist.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + assert_equal fixture["id"], json[:id] + assert_equal fixture["created_at"], json[:created_at] + assert_equal fixture["updated_at"], json[:updated_at] + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + + def test_waitlist_entry_round_trip + fixture = { + "id" => "stub", + "email" => "stub", + "state" => "stub", + "approved_at" => nil, + "additional_fields" => {}, + "waitlist_id" => nil, + "created_at" => "stub", + "updated_at" => "stub", + "object" => "waitlist_entry" + } + model = WorkOS::WaitlistEntry.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + assert_equal fixture["id"], json[:id] + assert_equal fixture["email"], json[:email] + assert_nil json[:approved_at] + assert_equal fixture["created_at"], json[:created_at] + assert_equal fixture["updated_at"], json[:updated_at] + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + def test_jwks_response_round_trip fixture = { "keys" => [] @@ -2295,6 +2349,28 @@ def test_mfa_totp_session_authenticate_request_round_trip fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } end + def test_email_completion_session_authenticate_request_round_trip + fixture = { + "client_id" => "stub", + "client_secret" => "stub", + "grant_type" => "urn:workos:oauth:grant-type:email-completion", + "email_completion_token" => "stub", + "email" => "stub", + "ip_address" => "stub", + "device_id" => "stub", + "user_agent" => "stub", + "signals_id" => "stub" + } + model = WorkOS::EmailCompletionSessionAuthenticateRequest.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + assert_equal fixture["client_id"], json[:client_id] + assert_equal fixture["client_secret"], json[:client_secret] + assert_equal fixture["email_completion_token"], json[:email_completion_token] + assert_equal fixture["email"], json[:email] + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + def test_organization_selection_session_authenticate_request_round_trip fixture = { "client_id" => "stub", From 2dda2f29f7c3ac2c4c35df0367b28e71d617cbab Mon Sep 17 00:00:00 2001 From: "workos-sdk-automation[bot]" <255426317+workos-sdk-automation[bot]@users.noreply.github.com> Date: Tue, 1 Sep 2026 16:10:50 +0000 Subject: [PATCH 4/7] feat(user_management): Add model `EmailCompletionSessionAuthenticateRequest` --- ...completion_session_authenticate_request.rb | 43 +++++++++++ ...ompletion_session_authenticate_request.rbi | 72 +++++++++++++++++++ 2 files changed, 115 insertions(+) create mode 100644 lib/workos/user_management/email_completion_session_authenticate_request.rb create mode 100644 rbi/workos/email_completion_session_authenticate_request.rbi diff --git a/lib/workos/user_management/email_completion_session_authenticate_request.rb b/lib/workos/user_management/email_completion_session_authenticate_request.rb new file mode 100644 index 00000000..5b89aeae --- /dev/null +++ b/lib/workos/user_management/email_completion_session_authenticate_request.rb @@ -0,0 +1,43 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class EmailCompletionSessionAuthenticateRequest < WorkOS::Types::BaseModel + HASH_ATTRS = { + client_id: :client_id, + client_secret: :client_secret, + grant_type: :grant_type, + email_completion_token: :email_completion_token, + email: :email, + ip_address: :ip_address, + device_id: :device_id, + user_agent: :user_agent, + signals_id: :signals_id + }.freeze + + attr_accessor \ + :client_id, + :client_secret, + :grant_type, + :email_completion_token, + :email, + :ip_address, + :device_id, + :user_agent, + :signals_id + + def initialize(json) + hash = self.class.normalize(json) + @client_id = hash[:client_id] + @client_secret = hash[:client_secret] + @grant_type = hash[:grant_type] + @email_completion_token = hash[:email_completion_token] + @email = hash[:email] + @ip_address = hash[:ip_address] + @device_id = hash[:device_id] + @user_agent = hash[:user_agent] + @signals_id = hash[:signals_id] + end + end +end diff --git a/rbi/workos/email_completion_session_authenticate_request.rbi b/rbi/workos/email_completion_session_authenticate_request.rbi new file mode 100644 index 00000000..e33faad9 --- /dev/null +++ b/rbi/workos/email_completion_session_authenticate_request.rbi @@ -0,0 +1,72 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class EmailCompletionSessionAuthenticateRequest + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(String) } + def client_id; end + + sig { params(value: String).returns(String) } + def client_id=(value); end + + sig { returns(String) } + def client_secret; end + + sig { params(value: String).returns(String) } + def client_secret=(value); end + + sig { returns(String) } + def grant_type; end + + sig { params(value: String).returns(String) } + def grant_type=(value); end + + sig { returns(String) } + def email_completion_token; end + + sig { params(value: String).returns(String) } + def email_completion_token=(value); end + + sig { returns(String) } + def email; end + + sig { params(value: String).returns(String) } + def email=(value); end + + sig { returns(T.nilable(String)) } + def ip_address; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def ip_address=(value); end + + sig { returns(T.nilable(String)) } + def device_id; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def device_id=(value); end + + sig { returns(T.nilable(String)) } + def user_agent; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def user_agent=(value); end + + sig { returns(T.nilable(String)) } + def signals_id; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def signals_id=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end From 8b1adce2497c6a7b076273366431c347372701a4 Mon Sep 17 00:00:00 2001 From: "workos-sdk-automation[bot]" <255426317+workos-sdk-automation[bot]@users.noreply.github.com> Date: Tue, 1 Sep 2026 16:10:50 +0000 Subject: [PATCH 5/7] fix(user_management): Update user management API surface --- .../types/authenticate_response_authentication_method.rb | 5 +---- .../user_management/authentication_oauth_failed_data.rb | 7 +++++-- .../user_management/authentication_oauth_succeeded_data.rb | 7 +++++-- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/lib/workos/types/authenticate_response_authentication_method.rb b/lib/workos/types/authenticate_response_authentication_method.rb index 2d515ab4..d3da165a 100644 --- a/lib/workos/types/authenticate_response_authentication_method.rb +++ b/lib/workos/types/authenticate_response_authentication_method.rb @@ -11,13 +11,10 @@ class AuthenticateResponseAuthenticationMethod APPLE_OAUTH = "AppleOAuth" BITBUCKET_OAUTH = "BitbucketOAuth" CROSS_APP_AUTH = "CrossAppAuth" - DISCORD_OAUTH = "DiscordOAuth" EXTERNAL_AUTH = "ExternalAuth" GIT_HUB_OAUTH = "GitHubOAuth" GIT_LAB_OAUTH = "GitLabOAuth" GOOGLE_OAUTH = "GoogleOAuth" - GROK_OAUTH = "GrokOAuth" - XO_AUTH = "XOAuth" INTUIT_OAUTH = "IntuitOAuth" LINKED_IN_OAUTH = "LinkedInOAuth" MICROSOFT_OAUTH = "MicrosoftOAuth" @@ -29,7 +26,7 @@ class AuthenticateResponseAuthenticationMethod MAGIC_AUTH = "MagicAuth" IMPERSONATION = "Impersonation" MIGRATED_SESSION = "MigratedSession" - ALL = [SSO, PASSWORD, PASSKEY, APPLE_OAUTH, BITBUCKET_OAUTH, CROSS_APP_AUTH, DISCORD_OAUTH, EXTERNAL_AUTH, GIT_HUB_OAUTH, GIT_LAB_OAUTH, GOOGLE_OAUTH, GROK_OAUTH, XO_AUTH, INTUIT_OAUTH, LINKED_IN_OAUTH, MICROSOFT_OAUTH, SALESFORCE_OAUTH, SLACK_OAUTH, VERCEL_MARKETPLACE_OAUTH, VERCEL_OAUTH, XERO_OAUTH, MAGIC_AUTH, IMPERSONATION, MIGRATED_SESSION].freeze + ALL = [SSO, PASSWORD, PASSKEY, APPLE_OAUTH, BITBUCKET_OAUTH, CROSS_APP_AUTH, EXTERNAL_AUTH, GIT_HUB_OAUTH, GIT_LAB_OAUTH, GOOGLE_OAUTH, INTUIT_OAUTH, LINKED_IN_OAUTH, MICROSOFT_OAUTH, SALESFORCE_OAUTH, SLACK_OAUTH, VERCEL_MARKETPLACE_OAUTH, VERCEL_OAUTH, XERO_OAUTH, MAGIC_AUTH, IMPERSONATION, MIGRATED_SESSION].freeze end end end diff --git a/lib/workos/user_management/authentication_oauth_failed_data.rb b/lib/workos/user_management/authentication_oauth_failed_data.rb index a143a971..bbcca65f 100644 --- a/lib/workos/user_management/authentication_oauth_failed_data.rb +++ b/lib/workos/user_management/authentication_oauth_failed_data.rb @@ -11,7 +11,8 @@ class AuthenticationOAuthFailedData < WorkOS::Types::BaseModel user_agent: :user_agent, user_id: :user_id, email: :email, - error: :error + error: :error, + provider: :provider }.freeze attr_accessor \ @@ -21,7 +22,8 @@ class AuthenticationOAuthFailedData < WorkOS::Types::BaseModel :user_agent, :user_id, :email, - :error + :error, + :provider def initialize(json) hash = self.class.normalize(json) @@ -32,6 +34,7 @@ def initialize(json) @user_id = hash[:user_id] @email = hash[:email] @error = hash[:error] ? WorkOS::AuthenticationOAuthFailedDataError.new(hash[:error]) : nil + @provider = hash[:provider] end end end diff --git a/lib/workos/user_management/authentication_oauth_succeeded_data.rb b/lib/workos/user_management/authentication_oauth_succeeded_data.rb index 3291b4a7..6ae3e7d2 100644 --- a/lib/workos/user_management/authentication_oauth_succeeded_data.rb +++ b/lib/workos/user_management/authentication_oauth_succeeded_data.rb @@ -10,7 +10,8 @@ class AuthenticationOAuthSucceededData < WorkOS::Types::BaseModel ip_address: :ip_address, user_agent: :user_agent, user_id: :user_id, - email: :email + email: :email, + provider: :provider }.freeze attr_accessor \ @@ -19,7 +20,8 @@ class AuthenticationOAuthSucceededData < WorkOS::Types::BaseModel :ip_address, :user_agent, :user_id, - :email + :email, + :provider def initialize(json) hash = self.class.normalize(json) @@ -29,6 +31,7 @@ def initialize(json) @user_agent = hash[:user_agent] @user_id = hash[:user_id] @email = hash[:email] + @provider = hash[:provider] end end end From ed274fdd6009b9ce6765a236871b7a4453c62349 Mon Sep 17 00:00:00 2001 From: "workos-sdk-automation[bot]" <255426317+workos-sdk-automation[bot]@users.noreply.github.com> Date: Tue, 1 Sep 2026 16:10:50 +0000 Subject: [PATCH 6/7] chore(generated): regenerate shared files for AdminPortal, Agents, ApiKeys, AuditLogs, Authorization, ClientApi, Connect, DirectorySync, Events, FeatureFlags, Groups, MultiFactorAuth, OrganizationDomains, OrganizationMembership, Organizations, Pipes, PipesProvider, PlatformTeams, Radar, SSO, UserManagement, Vault, Webhooks, Widgets --- .last-synced-sha | 2 +- .oagen-manifest.json | 303 ++++++++++++ lib/workos.rb | 1 + lib/workos/agents.rb | 370 ++++++++++++++ lib/workos/agents/agent_blueprint.rb | 43 ++ .../agents/agent_blueprint_invocable_by.rb | 7 + .../agents/agent_blueprint_session_setting.rb | 25 + .../agents/agent_blueprints_create_request.rb | 31 ++ ..._blueprints_create_request_invocable_by.rb | 22 + ...ueprints_create_request_session_setting.rb | 7 + ...ent_blueprints_token_mint_token_request.rb | 34 ++ .../agents/agent_blueprints_update_request.rb | 31 ++ ..._blueprints_update_request_invocable_by.rb | 7 + ...ueprints_update_request_session_setting.rb | 25 + lib/workos/agents/agent_instance.rb | 40 ++ lib/workos/agents/agent_instance_session.rb | 40 ++ lib/workos/agents/agent_token.rb | 40 ++ lib/workos/authorization.rb | 6 +- lib/workos/client.rb | 4 + lib/workos/inflections.rb | 15 + lib/workos/organizations.rb | 111 ++++- lib/workos/organizations/create_it_contact.rb | 18 + lib/workos/organizations/invite_it_contact.rb | 18 + lib/workos/organizations/it_contact.rb | 31 ++ lib/workos/organizations/it_contact_list.rb | 25 + .../organizations/organization_input.rb | 11 +- lib/workos/platform_teams.rb | 58 +++ lib/workos/platform_teams/create_team.rb | 22 + lib/workos/platform_teams/team.rb | 37 ++ lib/workos/shared/agent_blueprint_created.rb | 34 ++ .../shared/agent_blueprint_created_data.rb | 43 ++ ...ent_blueprint_created_data_invocable_by.rb | 22 + ..._blueprint_created_data_session_setting.rb | 25 + lib/workos/shared/agent_blueprint_deleted.rb | 34 ++ .../shared/agent_blueprint_deleted_data.rb | 31 ++ lib/workos/shared/agent_blueprint_updated.rb | 34 ++ .../shared/agent_blueprint_updated_data.rb | 7 + ...ent_blueprint_updated_data_invocable_by.rb | 7 + ..._blueprint_updated_data_session_setting.rb | 7 + lib/workos/shared/agent_instance_created.rb | 34 ++ .../shared/agent_instance_created_data.rb | 40 ++ lib/workos/shared/agent_instance_deleted.rb | 34 ++ .../shared/agent_instance_deleted_data.rb | 40 ++ .../shared/agent_instance_session_created.rb | 34 ++ .../agent_instance_session_created_data.rb | 43 ++ .../shared/agent_instance_session_revoked.rb | 34 ++ .../agent_instance_session_revoked_data.rb | 40 ++ .../shared/resource_export_completed.rb | 34 ++ .../shared/resource_export_completed_data.rb | 22 + lib/workos/shared/resource_export_created.rb | 34 ++ .../shared/resource_export_created_data.rb | 22 + .../shared/resource_export_downloaded.rb | 34 ++ .../shared/resource_export_downloaded_data.rb | 22 + lib/workos/shared/resource_export_failed.rb | 34 ++ .../shared/resource_export_failed_data.rb | 22 + lib/workos/shared/waitlist_user.rb | 13 +- lib/workos/sso.rb | 309 +++++++++++- lib/workos/sso/create_connection.rb | 37 ++ .../sso/create_connection_attribute_maps.rb | 22 + lib/workos/sso/create_connection_key_pair.rb | 22 + .../sso/create_connection_oidc_options.rb | 43 ++ .../sso/create_connection_saml_options.rb | 40 ++ .../create_connection_standard_attributes.rb | 34 ++ .../create_saml_idp_signing_certificate.rb | 18 + lib/workos/sso/patch_connection.rb | 34 ++ .../sso/patch_connection_attribute_maps.rb | 22 + .../sso/patch_connection_oidc_options.rb | 40 ++ .../sso/patch_connection_saml_options.rb | 31 ++ .../patch_connection_standard_attributes.rb | 7 + .../sso/saml_idp_signing_certificate.rb | 34 ++ .../sso/saml_idp_signing_certificate_list.rb | 22 + .../sso/saml_sp_encryption_certificate.rb | 34 ++ .../saml_sp_encryption_certificate_list.rb | 22 + lib/workos/sso/saml_sp_signing_certificate.rb | 34 ++ lib/workos/sso/token_query.rb | 13 +- ...lueprints_token_mint_token_request_type.rb | 15 + .../types/agent_instance_created_data_type.rb | 13 + .../types/agent_instance_deleted_data_type.rb | 9 + .../types/agent_instance_session_status.rb | 14 + lib/workos/types/agent_instance_type.rb | 9 + ...nnection_activated_data_connection_type.rb | 5 +- lib/workos/types/connection_type.rb | 5 +- .../types/connections_connection_type.rb | 5 +- ...dc_options_id_token_signature_algorithm.rb | 24 + ...idc_options_token_authentication_method.rb | 14 + .../types/create_webhook_endpoint_events.rb | 9 +- lib/workos/types/invite_it_contact_intents.rb | 16 + ...dc_options_id_token_signature_algorithm.rb | 9 + ...idc_options_token_authentication_method.rb | 9 + ...rce_export_completed_data_resource_type.rb | 16 + ...ource_export_created_data_resource_type.rb | 9 + ...ce_export_downloaded_data_resource_type.rb | 9 + ...source_export_failed_data_resource_type.rb | 9 + .../types/session_created_data_status.rb | 7 +- .../types/session_revoked_data_status.rb | 2 +- lib/workos/types/sso_grant_type.rb | 13 + lib/workos/types/team_production_state.rb | 15 + lib/workos/types/token_query_grant_type.rb | 9 + .../user_identities_get_item_provider.rb | 5 +- lib/workos/types/user_sessions_status.rb | 2 +- lib/workos/types/waitlist_entry_state.rb | 9 + lib/workos/types/waitlist_user_state.rb | 7 +- rbi/workos/agent_blueprint.rbi | 72 +++ rbi/workos/agent_blueprint_created.rbi | 54 +++ rbi/workos/agent_blueprint_created_data.rbi | 72 +++ ...nt_blueprint_created_data_invocable_by.rbi | 30 ++ ...blueprint_created_data_session_setting.rbi | 36 ++ rbi/workos/agent_blueprint_deleted.rbi | 54 +++ rbi/workos/agent_blueprint_deleted_data.rbi | 48 ++ rbi/workos/agent_blueprint_invocable_by.rbi | 30 ++ .../agent_blueprint_session_setting.rbi | 36 ++ rbi/workos/agent_blueprint_updated.rbi | 54 +++ rbi/workos/agent_blueprint_updated_data.rbi | 72 +++ ...nt_blueprint_updated_data_invocable_by.rbi | 30 ++ ...blueprint_updated_data_session_setting.rbi | 36 ++ .../agent_blueprints_create_request.rbi | 48 ++ ...blueprints_create_request_invocable_by.rbi | 30 ++ ...eprints_create_request_session_setting.rbi | 36 ++ ...nt_blueprints_token_mint_token_request.rbi | 54 +++ .../agent_blueprints_update_request.rbi | 48 ++ ...blueprints_update_request_invocable_by.rbi | 30 ++ ...eprints_update_request_session_setting.rbi | 36 ++ rbi/workos/agent_instance.rbi | 66 +++ rbi/workos/agent_instance_created.rbi | 54 +++ rbi/workos/agent_instance_created_data.rbi | 66 +++ rbi/workos/agent_instance_deleted.rbi | 54 +++ rbi/workos/agent_instance_deleted_data.rbi | 66 +++ rbi/workos/agent_instance_session.rbi | 66 +++ rbi/workos/agent_instance_session_created.rbi | 54 +++ .../agent_instance_session_created_data.rbi | 72 +++ rbi/workos/agent_instance_session_revoked.rbi | 54 +++ .../agent_instance_session_revoked_data.rbi | 66 +++ rbi/workos/agent_token.rbi | 66 +++ rbi/workos/agents.rbi | 124 +++++ .../authentication_oauth_failed_data.rbi | 6 + .../authentication_oauth_succeeded_data.rbi | 6 + rbi/workos/client.rbi | 3 + rbi/workos/create_connection.rbi | 60 +++ .../create_connection_attribute_maps.rbi | 30 ++ rbi/workos/create_connection_key_pair.rbi | 30 ++ rbi/workos/create_connection_oidc_options.rbi | 72 +++ rbi/workos/create_connection_saml_options.rbi | 66 +++ .../create_connection_standard_attributes.rbi | 54 +++ rbi/workos/create_it_contact.rbi | 24 + .../create_saml_idp_signing_certificate.rbi | 24 + rbi/workos/create_team.rbi | 30 ++ rbi/workos/create_waitlist_entry.rbi | 36 ++ rbi/workos/invite_it_contact.rbi | 24 + rbi/workos/it_contact.rbi | 48 ++ rbi/workos/organizations.rbi | 45 ++ rbi/workos/patch_connection.rbi | 54 +++ .../patch_connection_attribute_maps.rbi | 30 ++ rbi/workos/patch_connection_oidc_options.rbi | 66 +++ rbi/workos/patch_connection_saml_options.rbi | 48 ++ .../patch_connection_standard_attributes.rbi | 54 +++ rbi/workos/platform_teams.rbi | 30 ++ rbi/workos/resource_export_completed.rbi | 54 +++ rbi/workos/resource_export_completed_data.rbi | 30 ++ rbi/workos/resource_export_created.rbi | 54 +++ rbi/workos/resource_export_created_data.rbi | 30 ++ rbi/workos/resource_export_downloaded.rbi | 54 +++ .../resource_export_downloaded_data.rbi | 30 ++ rbi/workos/resource_export_failed.rbi | 54 +++ rbi/workos/resource_export_failed_data.rbi | 30 ++ rbi/workos/saml_idp_signing_certificate.rbi | 54 +++ .../saml_idp_signing_certificate_list.rbi | 30 ++ rbi/workos/saml_sp_encryption_certificate.rbi | 54 +++ .../saml_sp_encryption_certificate_list.rbi | 30 ++ rbi/workos/saml_sp_signing_certificate.rbi | 54 +++ rbi/workos/sso.rbi | 157 +++++- rbi/workos/team.rbi | 60 +++ rbi/workos/token_query.rbi | 22 +- rbi/workos/waitlist.rbi | 42 ++ rbi/workos/waitlist_entry.rbi | 72 +++ rbi/workos/waitlist_user.rbi | 18 +- test/workos/test_agents.rb | 98 +++- test/workos/test_agents_model_round_trip.rb | 211 ++++++++ test/workos/test_authorization.rb | 12 +- test/workos/test_organizations.rb | 42 +- .../test_organizations_model_round_trip.rb | 41 +- test/workos/test_platform_teams.rb | 41 ++ .../test_platform_teams_model_round_trip.rb | 41 ++ test/workos/test_shared_model_round_trip.rb | 451 +++++++++++++++++- test/workos/test_sso.rb | 110 ++++- test/workos/test_sso_model_round_trip.rb | 264 +++++++++- 185 files changed, 7971 insertions(+), 73 deletions(-) create mode 100644 lib/workos/agents/agent_blueprint.rb create mode 100644 lib/workos/agents/agent_blueprint_invocable_by.rb create mode 100644 lib/workos/agents/agent_blueprint_session_setting.rb create mode 100644 lib/workos/agents/agent_blueprints_create_request.rb create mode 100644 lib/workos/agents/agent_blueprints_create_request_invocable_by.rb create mode 100644 lib/workos/agents/agent_blueprints_create_request_session_setting.rb create mode 100644 lib/workos/agents/agent_blueprints_token_mint_token_request.rb create mode 100644 lib/workos/agents/agent_blueprints_update_request.rb create mode 100644 lib/workos/agents/agent_blueprints_update_request_invocable_by.rb create mode 100644 lib/workos/agents/agent_blueprints_update_request_session_setting.rb create mode 100644 lib/workos/agents/agent_instance.rb create mode 100644 lib/workos/agents/agent_instance_session.rb create mode 100644 lib/workos/agents/agent_token.rb create mode 100644 lib/workos/organizations/create_it_contact.rb create mode 100644 lib/workos/organizations/invite_it_contact.rb create mode 100644 lib/workos/organizations/it_contact.rb create mode 100644 lib/workos/organizations/it_contact_list.rb create mode 100644 lib/workos/platform_teams.rb create mode 100644 lib/workos/platform_teams/create_team.rb create mode 100644 lib/workos/platform_teams/team.rb create mode 100644 lib/workos/shared/agent_blueprint_created.rb create mode 100644 lib/workos/shared/agent_blueprint_created_data.rb create mode 100644 lib/workos/shared/agent_blueprint_created_data_invocable_by.rb create mode 100644 lib/workos/shared/agent_blueprint_created_data_session_setting.rb create mode 100644 lib/workos/shared/agent_blueprint_deleted.rb create mode 100644 lib/workos/shared/agent_blueprint_deleted_data.rb create mode 100644 lib/workos/shared/agent_blueprint_updated.rb create mode 100644 lib/workos/shared/agent_blueprint_updated_data.rb create mode 100644 lib/workos/shared/agent_blueprint_updated_data_invocable_by.rb create mode 100644 lib/workos/shared/agent_blueprint_updated_data_session_setting.rb create mode 100644 lib/workos/shared/agent_instance_created.rb create mode 100644 lib/workos/shared/agent_instance_created_data.rb create mode 100644 lib/workos/shared/agent_instance_deleted.rb create mode 100644 lib/workos/shared/agent_instance_deleted_data.rb create mode 100644 lib/workos/shared/agent_instance_session_created.rb create mode 100644 lib/workos/shared/agent_instance_session_created_data.rb create mode 100644 lib/workos/shared/agent_instance_session_revoked.rb create mode 100644 lib/workos/shared/agent_instance_session_revoked_data.rb create mode 100644 lib/workos/shared/resource_export_completed.rb create mode 100644 lib/workos/shared/resource_export_completed_data.rb create mode 100644 lib/workos/shared/resource_export_created.rb create mode 100644 lib/workos/shared/resource_export_created_data.rb create mode 100644 lib/workos/shared/resource_export_downloaded.rb create mode 100644 lib/workos/shared/resource_export_downloaded_data.rb create mode 100644 lib/workos/shared/resource_export_failed.rb create mode 100644 lib/workos/shared/resource_export_failed_data.rb create mode 100644 lib/workos/sso/create_connection.rb create mode 100644 lib/workos/sso/create_connection_attribute_maps.rb create mode 100644 lib/workos/sso/create_connection_key_pair.rb create mode 100644 lib/workos/sso/create_connection_oidc_options.rb create mode 100644 lib/workos/sso/create_connection_saml_options.rb create mode 100644 lib/workos/sso/create_connection_standard_attributes.rb create mode 100644 lib/workos/sso/create_saml_idp_signing_certificate.rb create mode 100644 lib/workos/sso/patch_connection.rb create mode 100644 lib/workos/sso/patch_connection_attribute_maps.rb create mode 100644 lib/workos/sso/patch_connection_oidc_options.rb create mode 100644 lib/workos/sso/patch_connection_saml_options.rb create mode 100644 lib/workos/sso/patch_connection_standard_attributes.rb create mode 100644 lib/workos/sso/saml_idp_signing_certificate.rb create mode 100644 lib/workos/sso/saml_idp_signing_certificate_list.rb create mode 100644 lib/workos/sso/saml_sp_encryption_certificate.rb create mode 100644 lib/workos/sso/saml_sp_encryption_certificate_list.rb create mode 100644 lib/workos/sso/saml_sp_signing_certificate.rb create mode 100644 lib/workos/types/agent_blueprints_token_mint_token_request_type.rb create mode 100644 lib/workos/types/agent_instance_created_data_type.rb create mode 100644 lib/workos/types/agent_instance_deleted_data_type.rb create mode 100644 lib/workos/types/agent_instance_session_status.rb create mode 100644 lib/workos/types/agent_instance_type.rb create mode 100644 lib/workos/types/create_connection_oidc_options_id_token_signature_algorithm.rb create mode 100644 lib/workos/types/create_connection_oidc_options_token_authentication_method.rb create mode 100644 lib/workos/types/invite_it_contact_intents.rb create mode 100644 lib/workos/types/patch_connection_oidc_options_id_token_signature_algorithm.rb create mode 100644 lib/workos/types/patch_connection_oidc_options_token_authentication_method.rb create mode 100644 lib/workos/types/resource_export_completed_data_resource_type.rb create mode 100644 lib/workos/types/resource_export_created_data_resource_type.rb create mode 100644 lib/workos/types/resource_export_downloaded_data_resource_type.rb create mode 100644 lib/workos/types/resource_export_failed_data_resource_type.rb create mode 100644 lib/workos/types/sso_grant_type.rb create mode 100644 lib/workos/types/team_production_state.rb create mode 100644 lib/workos/types/token_query_grant_type.rb create mode 100644 lib/workos/types/waitlist_entry_state.rb create mode 100644 rbi/workos/agent_blueprint.rbi create mode 100644 rbi/workos/agent_blueprint_created.rbi create mode 100644 rbi/workos/agent_blueprint_created_data.rbi create mode 100644 rbi/workos/agent_blueprint_created_data_invocable_by.rbi create mode 100644 rbi/workos/agent_blueprint_created_data_session_setting.rbi create mode 100644 rbi/workos/agent_blueprint_deleted.rbi create mode 100644 rbi/workos/agent_blueprint_deleted_data.rbi create mode 100644 rbi/workos/agent_blueprint_invocable_by.rbi create mode 100644 rbi/workos/agent_blueprint_session_setting.rbi create mode 100644 rbi/workos/agent_blueprint_updated.rbi create mode 100644 rbi/workos/agent_blueprint_updated_data.rbi create mode 100644 rbi/workos/agent_blueprint_updated_data_invocable_by.rbi create mode 100644 rbi/workos/agent_blueprint_updated_data_session_setting.rbi create mode 100644 rbi/workos/agent_blueprints_create_request.rbi create mode 100644 rbi/workos/agent_blueprints_create_request_invocable_by.rbi create mode 100644 rbi/workos/agent_blueprints_create_request_session_setting.rbi create mode 100644 rbi/workos/agent_blueprints_token_mint_token_request.rbi create mode 100644 rbi/workos/agent_blueprints_update_request.rbi create mode 100644 rbi/workos/agent_blueprints_update_request_invocable_by.rbi create mode 100644 rbi/workos/agent_blueprints_update_request_session_setting.rbi create mode 100644 rbi/workos/agent_instance.rbi create mode 100644 rbi/workos/agent_instance_created.rbi create mode 100644 rbi/workos/agent_instance_created_data.rbi create mode 100644 rbi/workos/agent_instance_deleted.rbi create mode 100644 rbi/workos/agent_instance_deleted_data.rbi create mode 100644 rbi/workos/agent_instance_session.rbi create mode 100644 rbi/workos/agent_instance_session_created.rbi create mode 100644 rbi/workos/agent_instance_session_created_data.rbi create mode 100644 rbi/workos/agent_instance_session_revoked.rbi create mode 100644 rbi/workos/agent_instance_session_revoked_data.rbi create mode 100644 rbi/workos/agent_token.rbi create mode 100644 rbi/workos/create_connection.rbi create mode 100644 rbi/workos/create_connection_attribute_maps.rbi create mode 100644 rbi/workos/create_connection_key_pair.rbi create mode 100644 rbi/workos/create_connection_oidc_options.rbi create mode 100644 rbi/workos/create_connection_saml_options.rbi create mode 100644 rbi/workos/create_connection_standard_attributes.rbi create mode 100644 rbi/workos/create_it_contact.rbi create mode 100644 rbi/workos/create_saml_idp_signing_certificate.rbi create mode 100644 rbi/workos/create_team.rbi create mode 100644 rbi/workos/create_waitlist_entry.rbi create mode 100644 rbi/workos/invite_it_contact.rbi create mode 100644 rbi/workos/it_contact.rbi create mode 100644 rbi/workos/patch_connection.rbi create mode 100644 rbi/workos/patch_connection_attribute_maps.rbi create mode 100644 rbi/workos/patch_connection_oidc_options.rbi create mode 100644 rbi/workos/patch_connection_saml_options.rbi create mode 100644 rbi/workos/patch_connection_standard_attributes.rbi create mode 100644 rbi/workos/platform_teams.rbi create mode 100644 rbi/workos/resource_export_completed.rbi create mode 100644 rbi/workos/resource_export_completed_data.rbi create mode 100644 rbi/workos/resource_export_created.rbi create mode 100644 rbi/workos/resource_export_created_data.rbi create mode 100644 rbi/workos/resource_export_downloaded.rbi create mode 100644 rbi/workos/resource_export_downloaded_data.rbi create mode 100644 rbi/workos/resource_export_failed.rbi create mode 100644 rbi/workos/resource_export_failed_data.rbi create mode 100644 rbi/workos/saml_idp_signing_certificate.rbi create mode 100644 rbi/workos/saml_idp_signing_certificate_list.rbi create mode 100644 rbi/workos/saml_sp_encryption_certificate.rbi create mode 100644 rbi/workos/saml_sp_encryption_certificate_list.rbi create mode 100644 rbi/workos/saml_sp_signing_certificate.rbi create mode 100644 rbi/workos/team.rbi create mode 100644 rbi/workos/waitlist.rbi create mode 100644 rbi/workos/waitlist_entry.rbi create mode 100644 test/workos/test_platform_teams.rb create mode 100644 test/workos/test_platform_teams_model_round_trip.rb diff --git a/.last-synced-sha b/.last-synced-sha index 066427ca..0f267924 100644 --- a/.last-synced-sha +++ b/.last-synced-sha @@ -1 +1 @@ -a07d8e7988d035c2d727787f18f64d71b4b89a84 +d61348070f219d16b6285f205986c2d332bf6e9c diff --git a/.oagen-manifest.json b/.oagen-manifest.json index e3b41401..196ee6f7 100644 --- a/.oagen-manifest.json +++ b/.oagen-manifest.json @@ -10,11 +10,24 @@ "lib/workos/agents/agent_admin_link_claim_attempt_to_external_user_request.rb", "lib/workos/agents/agent_admin_link_claim_attempt_to_external_user_request_user.rb", "lib/workos/agents/agent_admin_validate_credential_request.rb", + "lib/workos/agents/agent_blueprint.rb", + "lib/workos/agents/agent_blueprint_invocable_by.rb", + "lib/workos/agents/agent_blueprint_session_setting.rb", + "lib/workos/agents/agent_blueprints_create_request.rb", + "lib/workos/agents/agent_blueprints_create_request_invocable_by.rb", + "lib/workos/agents/agent_blueprints_create_request_session_setting.rb", + "lib/workos/agents/agent_blueprints_token_mint_token_request.rb", + "lib/workos/agents/agent_blueprints_update_request.rb", + "lib/workos/agents/agent_blueprints_update_request_invocable_by.rb", + "lib/workos/agents/agent_blueprints_update_request_session_setting.rb", "lib/workos/agents/agent_credential_validation.rb", + "lib/workos/agents/agent_instance.rb", + "lib/workos/agents/agent_instance_session.rb", "lib/workos/agents/agent_registration.rb", "lib/workos/agents/agent_registration_agent_identity.rb", "lib/workos/agents/agent_registration_claim.rb", "lib/workos/agents/agent_registration_claim_claim_completion.rb", + "lib/workos/agents/agent_token.rb", "lib/workos/agents/claim_view_response.rb", "lib/workos/agents/claim_view_response_organization.rb", "lib/workos/api_keys.rb", @@ -230,6 +243,10 @@ "lib/workos/organizations/audit_log_configuration.rb", "lib/workos/organizations/audit_log_configuration_log_stream.rb", "lib/workos/organizations/audit_logs_retention.rb", + "lib/workos/organizations/create_it_contact.rb", + "lib/workos/organizations/invite_it_contact.rb", + "lib/workos/organizations/it_contact.rb", + "lib/workos/organizations/it_contact_list.rb", "lib/workos/organizations/organization.rb", "lib/workos/organizations/organization_authorized_connect_application_list_data.rb", "lib/workos/organizations/organization_created.rb", @@ -288,6 +305,9 @@ "lib/workos/pipes_provider/data_integration_configuration_list_response.rb", "lib/workos/pipes_provider/data_integration_configuration_response.rb", "lib/workos/pipes_provider/data_integration_credentials.rb", + "lib/workos/platform_teams.rb", + "lib/workos/platform_teams/create_team.rb", + "lib/workos/platform_teams/team.rb", "lib/workos/radar.rb", "lib/workos/radar/radar_list_entry_already_present_response.rb", "lib/workos/radar/radar_standalone_assess_request.rb", @@ -296,6 +316,24 @@ "lib/workos/radar/radar_standalone_update_radar_attempt_request.rb", "lib/workos/radar/radar_standalone_update_radar_list_request.rb", "lib/workos/shared/access_token_agent_registration_credential_issued_data_detail.rb", + "lib/workos/shared/agent_blueprint_created.rb", + "lib/workos/shared/agent_blueprint_created_data.rb", + "lib/workos/shared/agent_blueprint_created_data_invocable_by.rb", + "lib/workos/shared/agent_blueprint_created_data_session_setting.rb", + "lib/workos/shared/agent_blueprint_deleted.rb", + "lib/workos/shared/agent_blueprint_deleted_data.rb", + "lib/workos/shared/agent_blueprint_updated.rb", + "lib/workos/shared/agent_blueprint_updated_data.rb", + "lib/workos/shared/agent_blueprint_updated_data_invocable_by.rb", + "lib/workos/shared/agent_blueprint_updated_data_session_setting.rb", + "lib/workos/shared/agent_instance_created.rb", + "lib/workos/shared/agent_instance_created_data.rb", + "lib/workos/shared/agent_instance_deleted.rb", + "lib/workos/shared/agent_instance_deleted_data.rb", + "lib/workos/shared/agent_instance_session_created.rb", + "lib/workos/shared/agent_instance_session_created_data.rb", + "lib/workos/shared/agent_instance_session_revoked.rb", + "lib/workos/shared/agent_instance_session_revoked_data.rb", "lib/workos/shared/agent_registration_claim_attempt_created.rb", "lib/workos/shared/agent_registration_claim_attempt_created_data.rb", "lib/workos/shared/agent_registration_claim_completed.rb", @@ -340,6 +378,14 @@ "lib/workos/shared/pipes_connected_account_reauthorization_needed.rb", "lib/workos/shared/radar_challenge_created.rb", "lib/workos/shared/radar_challenge_created_data.rb", + "lib/workos/shared/resource_export_completed.rb", + "lib/workos/shared/resource_export_completed_data.rb", + "lib/workos/shared/resource_export_created.rb", + "lib/workos/shared/resource_export_created_data.rb", + "lib/workos/shared/resource_export_downloaded.rb", + "lib/workos/shared/resource_export_downloaded_data.rb", + "lib/workos/shared/resource_export_failed.rb", + "lib/workos/shared/resource_export_failed_data.rb", "lib/workos/shared/waitlist_user.rb", "lib/workos/shared/waitlist_user_approved.rb", "lib/workos/shared/waitlist_user_created.rb", @@ -363,7 +409,24 @@ "lib/workos/sso/connection_saml_certificate_renewed_data.rb", "lib/workos/sso/connection_saml_certificate_renewed_data_certificate.rb", "lib/workos/sso/connection_saml_certificate_renewed_data_connection.rb", + "lib/workos/sso/create_connection.rb", + "lib/workos/sso/create_connection_attribute_maps.rb", + "lib/workos/sso/create_connection_key_pair.rb", + "lib/workos/sso/create_connection_oidc_options.rb", + "lib/workos/sso/create_connection_saml_options.rb", + "lib/workos/sso/create_connection_standard_attributes.rb", + "lib/workos/sso/create_saml_idp_signing_certificate.rb", + "lib/workos/sso/patch_connection.rb", + "lib/workos/sso/patch_connection_attribute_maps.rb", + "lib/workos/sso/patch_connection_oidc_options.rb", + "lib/workos/sso/patch_connection_saml_options.rb", + "lib/workos/sso/patch_connection_standard_attributes.rb", "lib/workos/sso/profile.rb", + "lib/workos/sso/saml_idp_signing_certificate.rb", + "lib/workos/sso/saml_idp_signing_certificate_list.rb", + "lib/workos/sso/saml_sp_encryption_certificate.rb", + "lib/workos/sso/saml_sp_encryption_certificate_list.rb", + "lib/workos/sso/saml_sp_signing_certificate.rb", "lib/workos/sso/sso_authorize_url_response.rb", "lib/workos/sso/sso_logout_authorize_request.rb", "lib/workos/sso/sso_logout_authorize_response.rb", @@ -371,6 +434,11 @@ "lib/workos/sso/sso_token_response_oauth_token.rb", "lib/workos/sso/token_query.rb", "lib/workos/types/agent_admin_validate_credential_request_type.rb", + "lib/workos/types/agent_blueprints_token_mint_token_request_type.rb", + "lib/workos/types/agent_instance_created_data_type.rb", + "lib/workos/types/agent_instance_deleted_data_type.rb", + "lib/workos/types/agent_instance_session_status.rb", + "lib/workos/types/agent_instance_type.rb", "lib/workos/types/agent_registration_created_data_kind.rb", "lib/workos/types/agent_registration_created_data_method.rb", "lib/workos/types/agent_registration_created_data_status.rb", @@ -405,6 +473,8 @@ "lib/workos/types/connection_status.rb", "lib/workos/types/connection_type.rb", "lib/workos/types/connections_connection_type.rb", + "lib/workos/types/create_connection_oidc_options_id_token_signature_algorithm.rb", + "lib/workos/types/create_connection_oidc_options_token_authentication_method.rb", "lib/workos/types/create_data_integration_auth_methods.rb", "lib/workos/types/create_user_invite_options_locale.rb", "lib/workos/types/create_user_password_hash_type.rb", @@ -445,6 +515,7 @@ "lib/workos/types/invitation_resent_data_state.rb", "lib/workos/types/invitation_revoked_data_state.rb", "lib/workos/types/invitation_state.rb", + "lib/workos/types/invite_it_contact_intents.rb", "lib/workos/types/organization_created_data_domain_state.rb", "lib/workos/types/organization_created_data_domain_verification_strategy.rb", "lib/workos/types/organization_deleted_data_domain_state.rb", @@ -470,6 +541,8 @@ "lib/workos/types/organization_updated_data_domain_state.rb", "lib/workos/types/organization_updated_data_domain_verification_strategy.rb", "lib/workos/types/pagination_order.rb", + "lib/workos/types/patch_connection_oidc_options_id_token_signature_algorithm.rb", + "lib/workos/types/patch_connection_oidc_options_token_authentication_method.rb", "lib/workos/types/pipe_connected_account_state.rb", "lib/workos/types/profile_connection_type.rb", "lib/workos/types/radar_list_action.rb", @@ -480,12 +553,20 @@ "lib/workos/types/radar_standalone_response_control.rb", "lib/workos/types/radar_standalone_response_verdict.rb", "lib/workos/types/resend_user_invite_options_locale.rb", + "lib/workos/types/resource_export_completed_data_resource_type.rb", + "lib/workos/types/resource_export_created_data_resource_type.rb", + "lib/workos/types/resource_export_downloaded_data_resource_type.rb", + "lib/workos/types/resource_export_failed_data_resource_type.rb", "lib/workos/types/role_type.rb", "lib/workos/types/session_created_data_auth_method.rb", "lib/workos/types/session_created_data_status.rb", "lib/workos/types/session_revoked_data_auth_method.rb", "lib/workos/types/session_revoked_data_status.rb", + "lib/workos/types/sso_grant_type.rb", "lib/workos/types/sso_provider.rb", + "lib/workos/types/team_production_state.rb", + "lib/workos/types/token_query_grant_type.rb", + "lib/workos/types/update_audit_logs_retention_retention_period.rb", "lib/workos/types/update_custom_provider_definition_authenticate_via.rb", "lib/workos/types/update_user_password_hash_type.rb", "lib/workos/types/update_user_password_salt_position.rb", @@ -496,6 +577,7 @@ "lib/workos/types/user_management_authentication_provider.rb", "lib/workos/types/user_management_authentication_screen_hint.rb", "lib/workos/types/user_management_organization_membership_statuses.rb", + "lib/workos/types/user_management_waitlists_state.rb", "lib/workos/types/user_organization_membership_base_list_data_status.rb", "lib/workos/types/user_organization_membership_status.rb", "lib/workos/types/user_role_assignment_source_type.rb", @@ -513,6 +595,7 @@ "lib/workos/types/vault_metadata_read_data_actor_source.rb", "lib/workos/types/vault_names_listed_data_actor_source.rb", "lib/workos/types/vault_order.rb", + "lib/workos/types/waitlist_entry_state.rb", "lib/workos/types/waitlist_user_state.rb", "lib/workos/types/webhook_endpoint_status.rb", "lib/workos/types/widget_session_token_scopes.rb", @@ -584,11 +667,13 @@ "lib/workos/user_management/create_user.rb", "lib/workos/user_management/create_user_api_key.rb", "lib/workos/user_management/create_user_invite_options.rb", + "lib/workos/user_management/create_waitlist_entry.rb", "lib/workos/user_management/device_authorization_response.rb", "lib/workos/user_management/device_code_session_authenticate_request.rb", "lib/workos/user_management/email_change.rb", "lib/workos/user_management/email_change_confirmation.rb", "lib/workos/user_management/email_change_confirmation_user.rb", + "lib/workos/user_management/email_completion_session_authenticate_request.rb", "lib/workos/user_management/email_verification.rb", "lib/workos/user_management/email_verification_code_session_authenticate_request.rb", "lib/workos/user_management/email_verification_created.rb", @@ -657,6 +742,8 @@ "lib/workos/user_management/user_updated.rb", "lib/workos/user_management/verify_email_address.rb", "lib/workos/user_management/verify_email_response.rb", + "lib/workos/user_management/waitlist.rb", + "lib/workos/user_management/waitlist_entry.rb", "lib/workos/vault.rb", "lib/workos/vault/actor.rb", "lib/workos/vault/create_data_key_request.rb", @@ -715,7 +802,37 @@ "rbi/workos/agent_admin_link_claim_attempt_to_external_user_request.rbi", "rbi/workos/agent_admin_link_claim_attempt_to_external_user_request_user.rbi", "rbi/workos/agent_admin_validate_credential_request.rbi", + "rbi/workos/agent_blueprint.rbi", + "rbi/workos/agent_blueprint_created.rbi", + "rbi/workos/agent_blueprint_created_data.rbi", + "rbi/workos/agent_blueprint_created_data_invocable_by.rbi", + "rbi/workos/agent_blueprint_created_data_session_setting.rbi", + "rbi/workos/agent_blueprint_deleted.rbi", + "rbi/workos/agent_blueprint_deleted_data.rbi", + "rbi/workos/agent_blueprint_invocable_by.rbi", + "rbi/workos/agent_blueprint_session_setting.rbi", + "rbi/workos/agent_blueprint_updated.rbi", + "rbi/workos/agent_blueprint_updated_data.rbi", + "rbi/workos/agent_blueprint_updated_data_invocable_by.rbi", + "rbi/workos/agent_blueprint_updated_data_session_setting.rbi", + "rbi/workos/agent_blueprints_create_request.rbi", + "rbi/workos/agent_blueprints_create_request_invocable_by.rbi", + "rbi/workos/agent_blueprints_create_request_session_setting.rbi", + "rbi/workos/agent_blueprints_token_mint_token_request.rbi", + "rbi/workos/agent_blueprints_update_request.rbi", + "rbi/workos/agent_blueprints_update_request_invocable_by.rbi", + "rbi/workos/agent_blueprints_update_request_session_setting.rbi", "rbi/workos/agent_credential_validation.rbi", + "rbi/workos/agent_instance.rbi", + "rbi/workos/agent_instance_created.rbi", + "rbi/workos/agent_instance_created_data.rbi", + "rbi/workos/agent_instance_deleted.rbi", + "rbi/workos/agent_instance_deleted_data.rbi", + "rbi/workos/agent_instance_session.rbi", + "rbi/workos/agent_instance_session_created.rbi", + "rbi/workos/agent_instance_session_created_data.rbi", + "rbi/workos/agent_instance_session_revoked.rbi", + "rbi/workos/agent_instance_session_revoked_data.rbi", "rbi/workos/agent_registration.rbi", "rbi/workos/agent_registration_agent_identity.rbi", "rbi/workos/agent_registration_claim.rbi", @@ -741,6 +858,7 @@ "rbi/workos/agent_registration_refreshed_data.rbi", "rbi/workos/agent_registration_revoked.rbi", "rbi/workos/agent_registration_revoked_data.rbi", + "rbi/workos/agent_token.rbi", "rbi/workos/agents.rbi", "rbi/workos/api_key.rbi", "rbi/workos/api_key_created.rbi", @@ -885,6 +1003,12 @@ "rbi/workos/create_application_secret.rbi", "rbi/workos/create_authorization_permission.rbi", "rbi/workos/create_authorization_resource.rbi", + "rbi/workos/create_connection.rbi", + "rbi/workos/create_connection_attribute_maps.rbi", + "rbi/workos/create_connection_key_pair.rbi", + "rbi/workos/create_connection_oidc_options.rbi", + "rbi/workos/create_connection_saml_options.rbi", + "rbi/workos/create_connection_standard_attributes.rbi", "rbi/workos/create_cors_origin.rbi", "rbi/workos/create_data_integration.rbi", "rbi/workos/create_data_key_request.rbi", @@ -892,6 +1016,7 @@ "rbi/workos/create_group.rbi", "rbi/workos/create_group_membership.rbi", "rbi/workos/create_group_role_assignment.rbi", + "rbi/workos/create_it_contact.rbi", "rbi/workos/create_m2m_application.rbi", "rbi/workos/create_magic_code_and_return.rbi", "rbi/workos/create_oauth_application.rbi", @@ -903,10 +1028,13 @@ "rbi/workos/create_password_reset_token.rbi", "rbi/workos/create_redirect_uri.rbi", "rbi/workos/create_role.rbi", + "rbi/workos/create_saml_idp_signing_certificate.rbi", + "rbi/workos/create_team.rbi", "rbi/workos/create_user.rbi", "rbi/workos/create_user_api_key.rbi", "rbi/workos/create_user_invite_options.rbi", "rbi/workos/create_user_organization_membership.rbi", + "rbi/workos/create_waitlist_entry.rbi", "rbi/workos/create_webhook_endpoint.rbi", "rbi/workos/custom_provider_definition.rbi", "rbi/workos/data_integration.rbi", @@ -970,6 +1098,7 @@ "rbi/workos/email_change.rbi", "rbi/workos/email_change_confirmation.rbi", "rbi/workos/email_change_confirmation_user.rbi", + "rbi/workos/email_completion_session_authenticate_request.rbi", "rbi/workos/email_verification.rbi", "rbi/workos/email_verification_code_session_authenticate_request.rbi", "rbi/workos/email_verification_created.rbi", @@ -1041,6 +1170,8 @@ "rbi/workos/invitation_resent_data.rbi", "rbi/workos/invitation_revoked.rbi", "rbi/workos/invitation_revoked_data.rbi", + "rbi/workos/invite_it_contact.rbi", + "rbi/workos/it_contact.rbi", "rbi/workos/jwks_response.rbi", "rbi/workos/jwks_response_keys.rbi", "rbi/workos/jwt_template_response.rbi", @@ -1108,6 +1239,11 @@ "rbi/workos/password_reset_succeeded.rbi", "rbi/workos/password_reset_succeeded_data.rbi", "rbi/workos/password_session_authenticate_request.rbi", + "rbi/workos/patch_connection.rbi", + "rbi/workos/patch_connection_attribute_maps.rbi", + "rbi/workos/patch_connection_oidc_options.rbi", + "rbi/workos/patch_connection_saml_options.rbi", + "rbi/workos/patch_connection_standard_attributes.rbi", "rbi/workos/permission.rbi", "rbi/workos/permission_created.rbi", "rbi/workos/permission_created_data.rbi", @@ -1123,6 +1259,7 @@ "rbi/workos/pipes_connected_account_disconnected.rbi", "rbi/workos/pipes_connected_account_reauthorization_needed.rbi", "rbi/workos/pipes_provider.rbi", + "rbi/workos/platform_teams.rbi", "rbi/workos/portal_link_response.rbi", "rbi/workos/profile.rbi", "rbi/workos/radar.rbi", @@ -1146,6 +1283,14 @@ "rbi/workos/replace_group_role_assignments.rbi", "rbi/workos/resend_user_invite_options.rbi", "rbi/workos/reset_password_response.rbi", + "rbi/workos/resource_export_completed.rbi", + "rbi/workos/resource_export_completed_data.rbi", + "rbi/workos/resource_export_created.rbi", + "rbi/workos/resource_export_created_data.rbi", + "rbi/workos/resource_export_downloaded.rbi", + "rbi/workos/resource_export_downloaded_data.rbi", + "rbi/workos/resource_export_failed.rbi", + "rbi/workos/resource_export_failed_data.rbi", "rbi/workos/revoke_session.rbi", "rbi/workos/role.rbi", "rbi/workos/role_created.rbi", @@ -1155,6 +1300,11 @@ "rbi/workos/role_list.rbi", "rbi/workos/role_updated.rbi", "rbi/workos/role_updated_data.rbi", + "rbi/workos/saml_idp_signing_certificate.rbi", + "rbi/workos/saml_idp_signing_certificate_list.rbi", + "rbi/workos/saml_sp_encryption_certificate.rbi", + "rbi/workos/saml_sp_encryption_certificate_list.rbi", + "rbi/workos/saml_sp_signing_certificate.rbi", "rbi/workos/send_email_change.rbi", "rbi/workos/send_radar_sms_challenge.rbi", "rbi/workos/send_radar_sms_challenge_response.rbi", @@ -1174,6 +1324,7 @@ "rbi/workos/sso_logout_authorize_response.rbi", "rbi/workos/sso_token_response.rbi", "rbi/workos/sso_token_response_oauth_token.rbi", + "rbi/workos/team.rbi", "rbi/workos/token_query.rbi", "rbi/workos/update_audit_logs_retention.rbi", "rbi/workos/update_authorization_permission.rbi", @@ -1246,6 +1397,8 @@ "rbi/workos/vault_object.rbi", "rbi/workos/verify_email_address.rbi", "rbi/workos/verify_email_response.rbi", + "rbi/workos/waitlist.rbi", + "rbi/workos/waitlist_entry.rbi", "rbi/workos/waitlist_user.rbi", "rbi/workos/waitlist_user_approved.rbi", "rbi/workos/waitlist_user_created.rbi", @@ -1288,6 +1441,8 @@ "test/workos/test_pipes_model_round_trip.rb", "test/workos/test_pipes_provider.rb", "test/workos/test_pipes_provider_model_round_trip.rb", + "test/workos/test_platform_teams.rb", + "test/workos/test_platform_teams_model_round_trip.rb", "test/workos/test_radar.rb", "test/workos/test_radar_model_round_trip.rb", "test/workos/test_shared_model_round_trip.rb", @@ -2198,6 +2353,154 @@ "PUT /data-integrations/{slug}/client-credentials": { "sdkMethod": "update_data_integration_client_credentials", "service": "pipes" + }, + "GET /agents/blueprints": { + "sdkMethod": "list_blueprints", + "service": "agents" + }, + "POST /agents/blueprints": { + "sdkMethod": "create_blueprint", + "service": "agents" + }, + "GET /agents/blueprints/{agent_blueprint_id}": { + "sdkMethod": "get_blueprint", + "service": "agents" + }, + "PATCH /agents/blueprints/{agent_blueprint_id}": { + "sdkMethod": "update_blueprint", + "service": "agents" + }, + "DELETE /agents/blueprints/{agent_blueprint_id}": { + "sdkMethod": "delete_blueprint", + "service": "agents" + }, + "POST /agents/blueprints/{agent_blueprint_id}/tokens": { + "sdkMethod": "create_blueprint_token", + "service": "agents" + }, + "GET /agents/instances": { + "sdkMethod": "list_instances", + "service": "agents" + }, + "GET /agents/instances/{agent_instance_id}": { + "sdkMethod": "get_instance", + "service": "agents" + }, + "DELETE /agents/instances/{agent_instance_id}": { + "sdkMethod": "delete_instance", + "service": "agents" + }, + "GET /agents/sessions": { + "sdkMethod": "list_sessions", + "service": "agents" + }, + "GET /agents/sessions/{agent_instance_session_id}": { + "sdkMethod": "get_session", + "service": "agents" + }, + "POST /agents/sessions/{agent_instance_session_id}/revoke": { + "sdkMethod": "revoke_session", + "service": "agents" + }, + "POST /connections": { + "sdkMethod": "create_connection", + "service": "sso" + }, + "GET /connections/{connectionId}/saml_idp_signing_certs": { + "sdkMethod": "list_connection_saml_idp_signing_certs", + "service": "sso" + }, + "POST /connections/{connectionId}/saml_idp_signing_certs": { + "sdkMethod": "create_connection_saml_idp_signing_cert", + "service": "sso" + }, + "DELETE /connections/{connectionId}/saml_idp_signing_certs/{certificateId}": { + "sdkMethod": "delete_connection_saml_idp_signing_cert", + "service": "sso" + }, + "GET /connections/{connectionId}/saml_sp_encryption_certs": { + "sdkMethod": "list_connection_saml_sp_encryption_certs", + "service": "sso" + }, + "POST /connections/{connectionId}/saml_sp_encryption_certs": { + "sdkMethod": "create_connection_saml_sp_encryption_cert", + "service": "sso" + }, + "DELETE /connections/{connectionId}/saml_sp_encryption_certs/{certificateId}": { + "sdkMethod": "delete_connection_saml_sp_encryption_cert", + "service": "sso" + }, + "GET /connections/{connectionId}/saml_sp_signing_cert": { + "sdkMethod": "list_connection_saml_sp_signing_cert", + "service": "sso" + }, + "POST /connections/{connectionId}/saml_sp_signing_cert": { + "sdkMethod": "create_connection_saml_sp_signing_cert", + "service": "sso" + }, + "DELETE /connections/{connectionId}/saml_sp_signing_cert/{certificateId}": { + "sdkMethod": "delete_connection_saml_sp_signing_cert", + "service": "sso" + }, + "PATCH /connections/{id}": { + "sdkMethod": "update_connection", + "service": "sso" + }, + "GET /organizations/{organization_id}/it_contacts": { + "sdkMethod": "list_it_contacts", + "service": "organizations" + }, + "POST /organizations/{organization_id}/it_contacts": { + "sdkMethod": "create_it_contact", + "service": "organizations" + }, + "DELETE /organizations/{organization_id}/it_contacts/{contact_id}": { + "sdkMethod": "delete_it_contact", + "service": "organizations" + }, + "POST /organizations/{organization_id}/it_contacts/{contact_id}/invite": { + "sdkMethod": "invite_it_contact", + "service": "organizations" + }, + "POST /organizations/{organization_id}/it_contacts/{contact_id}/revoke": { + "sdkMethod": "revoke_it_contact", + "service": "organizations" + }, + "POST /platform/teams": { + "sdkMethod": "create_team", + "service": "platform_teams" + }, + "GET /platform/teams/{team_id}": { + "sdkMethod": "get_team", + "service": "platform_teams" + }, + "DELETE /user_management/waitlist_entries/{id}": { + "sdkMethod": "delete_waitlist_entry", + "service": "user_management" + }, + "POST /user_management/waitlist_entries/{id}/approve": { + "sdkMethod": "create_waitlist_entry_approve", + "service": "user_management" + }, + "POST /user_management/waitlist_entries/{id}/deny": { + "sdkMethod": "create_waitlist_entry_deny", + "service": "user_management" + }, + "GET /user_management/waitlists": { + "sdkMethod": "list_waitlists", + "service": "user_management" + }, + "GET /user_management/waitlists/{id}": { + "sdkMethod": "get_waitlist", + "service": "user_management" + }, + "GET /user_management/waitlists/{id}/entries": { + "sdkMethod": "list_waitlist_entries", + "service": "user_management" + }, + "POST /user_management/waitlists/{id}/entries": { + "sdkMethod": "create_waitlist_entry", + "service": "user_management" } } } diff --git a/lib/workos.rb b/lib/workos.rb index d635b904..87a178ce 100644 --- a/lib/workos.rb +++ b/lib/workos.rb @@ -37,6 +37,7 @@ def OMIT.inspect loader.collapse("#{__dir__}/workos/organizations") loader.collapse("#{__dir__}/workos/pipes") loader.collapse("#{__dir__}/workos/pipes_provider") +loader.collapse("#{__dir__}/workos/platform_teams") loader.collapse("#{__dir__}/workos/radar") loader.collapse("#{__dir__}/workos/shared") loader.collapse("#{__dir__}/workos/sso") diff --git a/lib/workos/agents.rb b/lib/workos/agents.rb index 197289e2..b9ce868c 100644 --- a/lib/workos/agents.rb +++ b/lib/workos/agents.rb @@ -10,6 +10,198 @@ def initialize(client) @client = client end + # List agent blueprints + # @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"`. + # @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"`. + # @param limit [Integer, nil] Upper limit on the number of objects to return, between `1` and `100`. + # @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). + # @param request_options [Hash] (see WorkOS::Types::RequestOptions) + # @return [WorkOS::Types::ListStruct] + def list_blueprints( + before: nil, + after: nil, + limit: 10, + order: "desc", + request_options: {} + ) + params = { + "before" => before, + "after" => after, + "limit" => limit, + "order" => order + }.compact + response = @client.request( + method: :get, + path: "/agents/blueprints", + auth: true, + params: params, + request_options: request_options + ) + fetch_next = ->(cursor) { + list_blueprints( + before: before, + after: cursor, + limit: limit, + order: order, + request_options: request_options + ) + } + WorkOS::Types::ListStruct.from_response( + response, + model: WorkOS::AgentBlueprint, + filters: {before: before, limit: limit, order: order}, + fetch_next: fetch_next + ) + end + + # Create an agent blueprint + # @param name [String] Human-readable name of the agent blueprint. + # @param description [String, nil] Human-readable description of the agent blueprint. + # @param permissions [Array, nil] Permission slugs forming the ceiling on what sessions minted from this blueprint may do. Each slug must exist in the environment. + # @param invocable_by [WorkOS::AgentBlueprintsCreateRequestInvocableBy, nil] Who may mint sessions from this blueprint. + # @param session_settings [WorkOS::AgentBlueprintsCreateRequestSessionSetting] Token and session lifetimes for sessions minted from this blueprint. + # @param request_options [Hash] (see WorkOS::Types::RequestOptions) + # @return [WorkOS::AgentBlueprint] + def create_blueprint( + name:, + session_settings:, + description: nil, + permissions: nil, + invocable_by: nil, + request_options: {} + ) + body = { + "name" => name, + "description" => description, + "permissions" => permissions, + "invocable_by" => invocable_by, + "session_settings" => session_settings + }.compact + response = @client.request( + method: :post, + path: "/agents/blueprints", + auth: true, + body: body, + request_options: request_options + ) + result = WorkOS::AgentBlueprint.new(response.body) + 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"]) + result + end + + # Get an agent blueprint + # @param agent_blueprint_id [String] The unique ID of the agent blueprint. + # @param request_options [Hash] (see WorkOS::Types::RequestOptions) + # @return [WorkOS::AgentBlueprint] + def get_blueprint( + agent_blueprint_id:, + request_options: {} + ) + response = @client.request( + method: :get, + path: "/agents/blueprints/#{WorkOS::Util.encode_path(agent_blueprint_id)}", + auth: true, + request_options: request_options + ) + result = WorkOS::AgentBlueprint.new(response.body) + 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"]) + result + end + + # Update an agent blueprint + # @param agent_blueprint_id [String] The unique ID of the agent blueprint. + # @param name [String, nil] Human-readable name of the agent blueprint. + # @param description [String, nil] Human-readable description of the agent blueprint. Pass `null` to clear it. + # @param permissions [Array, nil] Permission slugs forming the ceiling on what sessions minted from this blueprint may do. Each slug must exist in the environment. + # @param invocable_by [WorkOS::AgentBlueprintsUpdateRequestInvocableBy, nil] Who may mint sessions from this blueprint. Omitted lists are left unchanged. + # @param session_settings [WorkOS::AgentBlueprintsUpdateRequestSessionSetting, nil] Token and session lifetimes for sessions minted from this blueprint. Omitted fields are left unchanged. + # @param request_options [Hash] (see WorkOS::Types::RequestOptions) + # @return [WorkOS::AgentBlueprint] + def update_blueprint( + agent_blueprint_id:, + name: nil, + description: WorkOS::OMIT, + permissions: nil, + invocable_by: nil, + session_settings: nil, + request_options: {} + ) + body = { + "name" => name, + "permissions" => permissions, + "invocable_by" => invocable_by, + "session_settings" => session_settings + }.compact + body["description"] = description unless description.equal?(WorkOS::OMIT) + response = @client.request( + method: :patch, + path: "/agents/blueprints/#{WorkOS::Util.encode_path(agent_blueprint_id)}", + auth: true, + body: body, + request_options: request_options + ) + result = WorkOS::AgentBlueprint.new(response.body) + 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"]) + result + end + + # Delete an agent blueprint + # @param agent_blueprint_id [String] The unique ID of the agent blueprint. + # @param request_options [Hash] (see WorkOS::Types::RequestOptions) + # @return [void] + def delete_blueprint( + agent_blueprint_id:, + request_options: {} + ) + @client.request( + method: :delete, + path: "/agents/blueprints/#{WorkOS::Util.encode_path(agent_blueprint_id)}", + auth: true, + request_options: request_options + ) + nil + end + + # Mint an agent token + # @param agent_blueprint_id [String] The unique ID of the agent blueprint. + # @param type [WorkOS::Types::AgentBlueprintsTokenMintTokenRequestType] How the session is minted: `user_delegated`, `autonomous`, `agent_delegated`, or `refresh`. + # @param user_access_token [String, nil] The access token of the user delegating to the agent. The token identifies the user and organization; effective permissions are resolved server-side. + # @param intent [String, nil] Optional caller-supplied context, echoed as an object with a `text` field in the `intent` claim of the minted access token. + # @param organization_id [String, nil] The organization the agent acts within when operating as itself. + # @param agent_access_token [String, nil] The agent's own access token to exchange for a new session on the same instance. The token must have been minted from this blueprint; permissions are re-derived from current authority. + # @param refresh_token [String, nil] The refresh token issued with a previous agent access token. Refresh tokens are single-use: each refresh rotates it. + # @param request_options [Hash] (see WorkOS::Types::RequestOptions) + # @return [WorkOS::AgentToken] + def create_blueprint_token( + agent_blueprint_id:, + type:, + user_access_token: nil, + intent: nil, + organization_id: nil, + agent_access_token: nil, + refresh_token: nil, + request_options: {} + ) + body = { + "type" => type, + "user_access_token" => user_access_token, + "intent" => intent, + "organization_id" => organization_id, + "agent_access_token" => agent_access_token, + "refresh_token" => refresh_token + }.compact + response = @client.request( + method: :post, + path: "/agents/blueprints/#{WorkOS::Util.encode_path(agent_blueprint_id)}/tokens", + auth: true, + body: body, + request_options: request_options + ) + result = WorkOS::AgentToken.new(response.body) + 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"]) + result + end + # Link a claim attempt to an external user # @param type [String] The operation to perform on the claim attempt. Currently only `link_external_user` is supported. # @param claim_attempt_token [String] The token identifying the claim attempt. @@ -89,5 +281,183 @@ def get_registration( 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"]) result end + + # List agent instances + # @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"`. + # @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"`. + # @param limit [Integer, nil] Upper limit on the number of objects to return, between `1` and `100`. + # @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). + # @param organization_id [String, nil] Only return instances acting within this organization. + # @param agent_blueprint_id [String, nil] Only return instances minted from this blueprint. + # @param request_options [Hash] (see WorkOS::Types::RequestOptions) + # @return [WorkOS::Types::ListStruct] + def list_instances( + before: nil, + after: nil, + limit: 10, + order: "desc", + organization_id: nil, + agent_blueprint_id: nil, + request_options: {} + ) + params = { + "before" => before, + "after" => after, + "limit" => limit, + "order" => order, + "organization_id" => organization_id, + "agent_blueprint_id" => agent_blueprint_id + }.compact + response = @client.request( + method: :get, + path: "/agents/instances", + auth: true, + params: params, + request_options: request_options + ) + fetch_next = ->(cursor) { + list_instances( + before: before, + after: cursor, + limit: limit, + order: order, + organization_id: organization_id, + agent_blueprint_id: agent_blueprint_id, + request_options: request_options + ) + } + WorkOS::Types::ListStruct.from_response( + response, + model: WorkOS::AgentInstance, + filters: {before: before, limit: limit, order: order, organization_id: organization_id, agent_blueprint_id: agent_blueprint_id}, + fetch_next: fetch_next + ) + end + + # Get an agent instance + # @param agent_instance_id [String] The unique ID of the agent instance. + # @param request_options [Hash] (see WorkOS::Types::RequestOptions) + # @return [WorkOS::AgentInstance] + def get_instance( + agent_instance_id:, + request_options: {} + ) + response = @client.request( + method: :get, + path: "/agents/instances/#{WorkOS::Util.encode_path(agent_instance_id)}", + auth: true, + request_options: request_options + ) + result = WorkOS::AgentInstance.new(response.body) + 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"]) + result + end + + # Delete an agent instance + # @param agent_instance_id [String] The unique ID of the agent instance. + # @param request_options [Hash] (see WorkOS::Types::RequestOptions) + # @return [void] + def delete_instance( + agent_instance_id:, + request_options: {} + ) + @client.request( + method: :delete, + path: "/agents/instances/#{WorkOS::Util.encode_path(agent_instance_id)}", + auth: true, + request_options: request_options + ) + nil + end + + # List agent instance sessions + # @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"`. + # @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"`. + # @param limit [Integer, nil] Upper limit on the number of objects to return, between `1` and `100`. + # @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). + # @param agent_blueprint_id [String, nil] Only return sessions of instances minted from this blueprint. + # @param agent_instance_id [String, nil] Only return sessions belonging to this agent instance. + # @param request_options [Hash] (see WorkOS::Types::RequestOptions) + # @return [WorkOS::Types::ListStruct] + def list_sessions( + before: nil, + after: nil, + limit: 10, + order: "desc", + agent_blueprint_id: nil, + agent_instance_id: nil, + request_options: {} + ) + params = { + "before" => before, + "after" => after, + "limit" => limit, + "order" => order, + "agent_blueprint_id" => agent_blueprint_id, + "agent_instance_id" => agent_instance_id + }.compact + response = @client.request( + method: :get, + path: "/agents/sessions", + auth: true, + params: params, + request_options: request_options + ) + fetch_next = ->(cursor) { + list_sessions( + before: before, + after: cursor, + limit: limit, + order: order, + agent_blueprint_id: agent_blueprint_id, + agent_instance_id: agent_instance_id, + request_options: request_options + ) + } + WorkOS::Types::ListStruct.from_response( + response, + model: WorkOS::AgentInstanceSession, + filters: {before: before, limit: limit, order: order, agent_blueprint_id: agent_blueprint_id, agent_instance_id: agent_instance_id}, + fetch_next: fetch_next + ) + end + + # Get an agent instance session + # @param agent_instance_session_id [String] The unique ID of the agent instance session. + # @param request_options [Hash] (see WorkOS::Types::RequestOptions) + # @return [WorkOS::AgentInstanceSession] + def get_session( + agent_instance_session_id:, + request_options: {} + ) + response = @client.request( + method: :get, + path: "/agents/sessions/#{WorkOS::Util.encode_path(agent_instance_session_id)}", + auth: true, + request_options: request_options + ) + result = WorkOS::AgentInstanceSession.new(response.body) + 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"]) + result + end + + # Revoke an agent instance session + # @param agent_instance_session_id [String] The unique ID of the agent instance session. + # @param request_options [Hash] (see WorkOS::Types::RequestOptions) + # @return [WorkOS::AgentInstanceSession] + def revoke_session( + agent_instance_session_id:, + request_options: {} + ) + response = @client.request( + method: :post, + path: "/agents/sessions/#{WorkOS::Util.encode_path(agent_instance_session_id)}/revoke", + auth: true, + request_options: request_options + ) + result = WorkOS::AgentInstanceSession.new(response.body) + 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"]) + result + end end end diff --git a/lib/workos/agents/agent_blueprint.rb b/lib/workos/agents/agent_blueprint.rb new file mode 100644 index 00000000..017cd5ef --- /dev/null +++ b/lib/workos/agents/agent_blueprint.rb @@ -0,0 +1,43 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class AgentBlueprint < WorkOS::Types::BaseModel + HASH_ATTRS = { + object: :object, + id: :id, + name: :name, + description: :description, + permissions: :permissions, + invocable_by: :invocable_by, + session_settings: :session_settings, + created_at: :created_at, + updated_at: :updated_at + }.freeze + + attr_accessor \ + :object, + :id, + :name, + :description, + :permissions, + :invocable_by, + :session_settings, + :created_at, + :updated_at + + def initialize(json) + hash = self.class.normalize(json) + @object = hash[:object] + @id = hash[:id] + @name = hash[:name] + @description = hash[:description] + @permissions = hash[:permissions] || [] + @invocable_by = hash[:invocable_by] ? WorkOS::AgentBlueprintInvocableBy.new(hash[:invocable_by]) : nil + @session_settings = hash[:session_settings] ? WorkOS::AgentBlueprintSessionSetting.new(hash[:session_settings]) : nil + @created_at = hash[:created_at] + @updated_at = hash[:updated_at] + end + end +end diff --git a/lib/workos/agents/agent_blueprint_invocable_by.rb b/lib/workos/agents/agent_blueprint_invocable_by.rb new file mode 100644 index 00000000..8ce612d8 --- /dev/null +++ b/lib/workos/agents/agent_blueprint_invocable_by.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + AgentBlueprintInvocableBy = AgentBlueprintCreatedDataInvocableBy +end diff --git a/lib/workos/agents/agent_blueprint_session_setting.rb b/lib/workos/agents/agent_blueprint_session_setting.rb new file mode 100644 index 00000000..e9134125 --- /dev/null +++ b/lib/workos/agents/agent_blueprint_session_setting.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class AgentBlueprintSessionSetting < WorkOS::Types::BaseModel + HASH_ATTRS = { + max_age_seconds: :max_age_seconds, + access_token_ttl_seconds: :access_token_ttl_seconds, + refresh_token_ttl_seconds: :refresh_token_ttl_seconds + }.freeze + + attr_accessor \ + :max_age_seconds, + :access_token_ttl_seconds, + :refresh_token_ttl_seconds + + def initialize(json) + hash = self.class.normalize(json) + @max_age_seconds = hash[:max_age_seconds] + @access_token_ttl_seconds = hash[:access_token_ttl_seconds] + @refresh_token_ttl_seconds = hash[:refresh_token_ttl_seconds] + end + end +end diff --git a/lib/workos/agents/agent_blueprints_create_request.rb b/lib/workos/agents/agent_blueprints_create_request.rb new file mode 100644 index 00000000..2f44b28c --- /dev/null +++ b/lib/workos/agents/agent_blueprints_create_request.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class AgentBlueprintsCreateRequest < WorkOS::Types::BaseModel + HASH_ATTRS = { + name: :name, + description: :description, + permissions: :permissions, + invocable_by: :invocable_by, + session_settings: :session_settings + }.freeze + + attr_accessor \ + :name, + :description, + :permissions, + :invocable_by, + :session_settings + + def initialize(json) + hash = self.class.normalize(json) + @name = hash[:name] + @description = hash[:description] + @permissions = hash[:permissions] || [] + @invocable_by = hash[:invocable_by] ? WorkOS::AgentBlueprintsCreateRequestInvocableBy.new(hash[:invocable_by]) : nil + @session_settings = hash[:session_settings] ? WorkOS::AgentBlueprintsCreateRequestSessionSetting.new(hash[:session_settings]) : nil + end + end +end diff --git a/lib/workos/agents/agent_blueprints_create_request_invocable_by.rb b/lib/workos/agents/agent_blueprints_create_request_invocable_by.rb new file mode 100644 index 00000000..a1fb7d61 --- /dev/null +++ b/lib/workos/agents/agent_blueprints_create_request_invocable_by.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class AgentBlueprintsCreateRequestInvocableBy < WorkOS::Types::BaseModel + HASH_ATTRS = { + role_slugs: :role_slugs, + organization_ids: :organization_ids + }.freeze + + attr_accessor \ + :role_slugs, + :organization_ids + + def initialize(json) + hash = self.class.normalize(json) + @role_slugs = hash[:role_slugs] || [] + @organization_ids = hash[:organization_ids] || [] + end + end +end diff --git a/lib/workos/agents/agent_blueprints_create_request_session_setting.rb b/lib/workos/agents/agent_blueprints_create_request_session_setting.rb new file mode 100644 index 00000000..8e692f58 --- /dev/null +++ b/lib/workos/agents/agent_blueprints_create_request_session_setting.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + AgentBlueprintsCreateRequestSessionSetting = AgentBlueprintSessionSetting +end diff --git a/lib/workos/agents/agent_blueprints_token_mint_token_request.rb b/lib/workos/agents/agent_blueprints_token_mint_token_request.rb new file mode 100644 index 00000000..b1bf2db0 --- /dev/null +++ b/lib/workos/agents/agent_blueprints_token_mint_token_request.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class AgentBlueprintsTokenMintTokenRequest < WorkOS::Types::BaseModel + HASH_ATTRS = { + type: :type, + user_access_token: :user_access_token, + intent: :intent, + organization_id: :organization_id, + agent_access_token: :agent_access_token, + refresh_token: :refresh_token + }.freeze + + attr_accessor \ + :type, + :user_access_token, + :intent, + :organization_id, + :agent_access_token, + :refresh_token + + def initialize(json) + hash = self.class.normalize(json) + @type = hash[:type] + @user_access_token = hash[:user_access_token] + @intent = hash[:intent] + @organization_id = hash[:organization_id] + @agent_access_token = hash[:agent_access_token] + @refresh_token = hash[:refresh_token] + end + end +end diff --git a/lib/workos/agents/agent_blueprints_update_request.rb b/lib/workos/agents/agent_blueprints_update_request.rb new file mode 100644 index 00000000..887ffaa2 --- /dev/null +++ b/lib/workos/agents/agent_blueprints_update_request.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class AgentBlueprintsUpdateRequest < WorkOS::Types::BaseModel + HASH_ATTRS = { + name: :name, + description: :description, + permissions: :permissions, + invocable_by: :invocable_by, + session_settings: :session_settings + }.freeze + + attr_accessor \ + :name, + :description, + :permissions, + :invocable_by, + :session_settings + + def initialize(json) + hash = self.class.normalize(json) + @name = hash[:name] + @description = hash[:description] + @permissions = hash[:permissions] || [] + @invocable_by = hash[:invocable_by] ? WorkOS::AgentBlueprintsUpdateRequestInvocableBy.new(hash[:invocable_by]) : nil + @session_settings = hash[:session_settings] ? WorkOS::AgentBlueprintsUpdateRequestSessionSetting.new(hash[:session_settings]) : nil + end + end +end diff --git a/lib/workos/agents/agent_blueprints_update_request_invocable_by.rb b/lib/workos/agents/agent_blueprints_update_request_invocable_by.rb new file mode 100644 index 00000000..b6472aff --- /dev/null +++ b/lib/workos/agents/agent_blueprints_update_request_invocable_by.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + AgentBlueprintsUpdateRequestInvocableBy = AgentBlueprintsCreateRequestInvocableBy +end diff --git a/lib/workos/agents/agent_blueprints_update_request_session_setting.rb b/lib/workos/agents/agent_blueprints_update_request_session_setting.rb new file mode 100644 index 00000000..cbb57471 --- /dev/null +++ b/lib/workos/agents/agent_blueprints_update_request_session_setting.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class AgentBlueprintsUpdateRequestSessionSetting < WorkOS::Types::BaseModel + HASH_ATTRS = { + max_age_seconds: :max_age_seconds, + access_token_ttl_seconds: :access_token_ttl_seconds, + refresh_token_ttl_seconds: :refresh_token_ttl_seconds + }.freeze + + attr_accessor \ + :max_age_seconds, + :access_token_ttl_seconds, + :refresh_token_ttl_seconds + + def initialize(json) + hash = self.class.normalize(json) + @max_age_seconds = hash[:max_age_seconds] + @access_token_ttl_seconds = hash[:access_token_ttl_seconds] + @refresh_token_ttl_seconds = hash[:refresh_token_ttl_seconds] + end + end +end diff --git a/lib/workos/agents/agent_instance.rb b/lib/workos/agents/agent_instance.rb new file mode 100644 index 00000000..17f098be --- /dev/null +++ b/lib/workos/agents/agent_instance.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class AgentInstance < WorkOS::Types::BaseModel + HASH_ATTRS = { + object: :object, + id: :id, + agent_blueprint_id: :agent_blueprint_id, + organization_id: :organization_id, + organization_membership_id: :organization_membership_id, + type: :type, + created_at: :created_at, + updated_at: :updated_at + }.freeze + + attr_accessor \ + :object, + :id, + :agent_blueprint_id, + :organization_id, + :organization_membership_id, + :type, + :created_at, + :updated_at + + def initialize(json) + hash = self.class.normalize(json) + @object = hash[:object] + @id = hash[:id] + @agent_blueprint_id = hash[:agent_blueprint_id] + @organization_id = hash[:organization_id] + @organization_membership_id = hash[:organization_membership_id] + @type = hash[:type] + @created_at = hash[:created_at] + @updated_at = hash[:updated_at] + end + end +end diff --git a/lib/workos/agents/agent_instance_session.rb b/lib/workos/agents/agent_instance_session.rb new file mode 100644 index 00000000..fff819db --- /dev/null +++ b/lib/workos/agents/agent_instance_session.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class AgentInstanceSession < WorkOS::Types::BaseModel + HASH_ATTRS = { + object: :object, + id: :id, + agent_instance_id: :agent_instance_id, + status: :status, + expires_at: :expires_at, + revoked_at: :revoked_at, + created_at: :created_at, + updated_at: :updated_at + }.freeze + + attr_accessor \ + :object, + :id, + :agent_instance_id, + :status, + :expires_at, + :revoked_at, + :created_at, + :updated_at + + def initialize(json) + hash = self.class.normalize(json) + @object = hash[:object] + @id = hash[:id] + @agent_instance_id = hash[:agent_instance_id] + @status = hash[:status] + @expires_at = hash[:expires_at] + @revoked_at = hash[:revoked_at] + @created_at = hash[:created_at] + @updated_at = hash[:updated_at] + end + end +end diff --git a/lib/workos/agents/agent_token.rb b/lib/workos/agents/agent_token.rb new file mode 100644 index 00000000..0519a4fa --- /dev/null +++ b/lib/workos/agents/agent_token.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class AgentToken < WorkOS::Types::BaseModel + HASH_ATTRS = { + access_token: :access_token, + token_type: :token_type, + expires_in: :expires_in, + refresh_token: :refresh_token, + agent_instance_id: :agent_instance_id, + new_instance: :new_instance, + agent_instance_session_id: :agent_instance_session_id, + permissions: :permissions + }.freeze + + attr_accessor \ + :access_token, + :token_type, + :expires_in, + :refresh_token, + :agent_instance_id, + :new_instance, + :agent_instance_session_id, + :permissions + + def initialize(json) + hash = self.class.normalize(json) + @access_token = hash[:access_token] + @token_type = hash[:token_type] + @expires_in = hash[:expires_in] + @refresh_token = hash[:refresh_token] + @agent_instance_id = hash[:agent_instance_id] + @new_instance = hash[:new_instance] + @agent_instance_session_id = hash[:agent_instance_session_id] + @permissions = hash[:permissions] || [] + end + end +end diff --git a/lib/workos/authorization.rb b/lib/workos/authorization.rb index 2a59903c..f52457e0 100644 --- a/lib/workos/authorization.rb +++ b/lib/workos/authorization.rb @@ -834,8 +834,8 @@ def update_resource_by_external_id( when WorkOS::Authorization::ParentResourceById body["parent_resource_id"] = parent_resource.parent_resource_id when WorkOS::Authorization::ParentResourceByExternalId - body["parent_resource_external_id"] = parent_resource.parent_resource_external_id body["parent_resource_type_slug"] = parent_resource.parent_resource_type_slug + body["parent_resource_external_id"] = parent_resource.parent_resource_external_id else raise ArgumentError, "expected parent_resource to be one of: WorkOS::Authorization::ParentResourceById, WorkOS::Authorization::ParentResourceByExternalId, got #{parent_resource.class}" end @@ -1097,8 +1097,8 @@ def create_resource( when WorkOS::Authorization::ParentResourceById body["parent_resource_id"] = parent_resource.parent_resource_id when WorkOS::Authorization::ParentResourceByExternalId - body["parent_resource_external_id"] = parent_resource.parent_resource_external_id body["parent_resource_type_slug"] = parent_resource.parent_resource_type_slug + body["parent_resource_external_id"] = parent_resource.parent_resource_external_id else raise ArgumentError, "expected parent_resource to be one of: WorkOS::Authorization::ParentResourceById, WorkOS::Authorization::ParentResourceByExternalId, got #{parent_resource.class}" end @@ -1157,8 +1157,8 @@ def update_resource( when WorkOS::Authorization::ParentResourceById body["parent_resource_id"] = parent_resource.parent_resource_id when WorkOS::Authorization::ParentResourceByExternalId - body["parent_resource_external_id"] = parent_resource.parent_resource_external_id body["parent_resource_type_slug"] = parent_resource.parent_resource_type_slug + body["parent_resource_external_id"] = parent_resource.parent_resource_external_id else raise ArgumentError, "expected parent_resource to be one of: WorkOS::Authorization::ParentResourceById, WorkOS::Authorization::ParentResourceByExternalId, got #{parent_resource.class}" end diff --git a/lib/workos/client.rb b/lib/workos/client.rb index 33c231dc..b376b47b 100644 --- a/lib/workos/client.rb +++ b/lib/workos/client.rb @@ -64,6 +64,10 @@ def groups @groups ||= WorkOS::Groups.new(self) end + def platform_teams + @platform_teams ||= WorkOS::PlatformTeams.new(self) + end + def admin_portal @admin_portal ||= WorkOS::AdminPortal.new(self) end diff --git a/lib/workos/inflections.rb b/lib/workos/inflections.rb index f2763661..c170c5be 100644 --- a/lib/workos/inflections.rb +++ b/lib/workos/inflections.rb @@ -45,15 +45,30 @@ "connection_saml_certificate_renewed_data_certificate_certificate_type" => "ConnectionSAMLCertificateRenewedDataCertificateCertificateType", "connection_saml_certificate_renewed_data_connection" => "ConnectionSAMLCertificateRenewedDataConnection", "cors_origin_response" => "CORSOriginResponse", + "create_connection_oidc_options" => "CreateConnectionOIDCOptions", + "create_connection_oidc_options_id_token_signature_algorithm" => "CreateConnectionOIDCOptionsIdTokenSignatureAlgorithm", + "create_connection_oidc_options_token_authentication_method" => "CreateConnectionOIDCOptionsTokenAuthenticationMethod", + "create_connection_saml_options" => "CreateConnectionSAMLOptions", "create_cors_origin" => "CreateCORSOrigin", "create_m2m_application" => "CreateM2MApplication", "create_oauth_application" => "CreateOAuthApplication", + "create_saml_idp_signing_certificate" => "CreateSAMLIdpSigningCertificate", "jwt_template_response" => "JWTTemplateResponse", "mfa_totp_session_authenticate_request" => "MFATotpSessionAuthenticateRequest", + "patch_connection_oidc_options" => "PatchConnectionOIDCOptions", + "patch_connection_oidc_options_id_token_signature_algorithm" => "PatchConnectionOIDCOptionsIdTokenSignatureAlgorithm", + "patch_connection_oidc_options_token_authentication_method" => "PatchConnectionOIDCOptionsTokenAuthenticationMethod", + "patch_connection_saml_options" => "PatchConnectionSAMLOptions", "pkce" => "PKCE", + "saml_idp_signing_certificate" => "SAMLIdpSigningCertificate", + "saml_idp_signing_certificate_list" => "SAMLIdpSigningCertificateList", + "saml_sp_encryption_certificate" => "SAMLSpEncryptionCertificate", + "saml_sp_encryption_certificate_list" => "SAMLSpEncryptionCertificateList", + "saml_sp_signing_certificate" => "SAMLSpSigningCertificate", "sso" => "SSO", "sso_authorize_url_response" => "SSOAuthorizeUrlResponse", "sso_device_authorization_request" => "SSODeviceAuthorizationRequest", + "sso_grant_type" => "SSOGrantType", "sso_logout_authorize_request" => "SSOLogoutAuthorizeRequest", "sso_logout_authorize_response" => "SSOLogoutAuthorizeResponse", "sso_provider" => "SSOProvider", diff --git a/lib/workos/organizations.rb b/lib/workos/organizations.rb index 657600d3..17235703 100644 --- a/lib/workos/organizations.rb +++ b/lib/workos/organizations.rb @@ -65,7 +65,7 @@ def list_organizations( # Create an Organization # @param name [String] The name of the organization. # @param allow_profiles_outside_organization [Boolean, nil] Whether the organization allows profiles from outside the organization to sign in. - # @param domains [Array, nil] The domains associated with the organization. Deprecated in favor of `domain_data`. + # @param domains [Array, nil] (deprecated) The domains associated with the organization. Deprecated in favor of `domain_data`. # @param domain_data [Array, nil] The domains associated with the organization, including verification state. # @param metadata [Hash{String => String}, nil] Object containing [metadata](https://workos.com/docs/authkit/metadata) key/value pairs associated with the Organization. # @param external_id [String, nil] An external identifier for the Organization. @@ -263,5 +263,114 @@ def list_authorized_applications( fetch_next: fetch_next ) end + + # List IT contacts + # @param organization_id [String] The ID of the organization. + # @param request_options [Hash] (see WorkOS::Types::RequestOptions) + # @return [WorkOS::Types::ListStruct] + def list_it_contacts( + organization_id:, + request_options: {} + ) + response = @client.request( + method: :get, + path: "/organizations/#{WorkOS::Util.encode_path(organization_id)}/it_contacts", + auth: true, + request_options: request_options + ) + WorkOS::Types::ListStruct.from_response( + response, + model: WorkOS::ItContact, + filters: {organization_id: organization_id} + ) + end + + # Create an IT contact + # @param organization_id [String] The ID of the organization. + # @param email [String] The email address of the IT contact. + # @param request_options [Hash] (see WorkOS::Types::RequestOptions) + # @return [WorkOS::ItContact] + def create_it_contact( + organization_id:, + email:, + request_options: {} + ) + body = { + "email" => email + } + response = @client.request( + method: :post, + path: "/organizations/#{WorkOS::Util.encode_path(organization_id)}/it_contacts", + auth: true, + body: body, + request_options: request_options + ) + result = WorkOS::ItContact.new(response.body) + 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"]) + result + end + + # Delete an IT contact + # @param organization_id [String] The ID of the organization. + # @param contact_id [String] The ID of the IT contact. + # @param request_options [Hash] (see WorkOS::Types::RequestOptions) + # @return [void] + def delete_it_contact( + organization_id:, + contact_id:, + request_options: {} + ) + @client.request( + method: :delete, + path: "/organizations/#{WorkOS::Util.encode_path(organization_id)}/it_contacts/#{WorkOS::Util.encode_path(contact_id)}", + auth: true, + request_options: request_options + ) + nil + end + + # Invite an IT contact + # @param organization_id [String] The ID of the organization. + # @param contact_id [String] The ID of the IT contact. + # @param intents [Array] The Admin Portal features that the IT contact can configure. + # @param request_options [Hash] (see WorkOS::Types::RequestOptions) + # @return [void] + def invite_it_contact( + organization_id:, + contact_id:, + intents:, + request_options: {} + ) + body = { + "intents" => intents + } + @client.request( + method: :post, + path: "/organizations/#{WorkOS::Util.encode_path(organization_id)}/it_contacts/#{WorkOS::Util.encode_path(contact_id)}/invite", + auth: true, + body: body, + request_options: request_options + ) + nil + end + + # Revoke an IT contact's invitation + # @param organization_id [String] The ID of the organization. + # @param contact_id [String] The ID of the IT contact. + # @param request_options [Hash] (see WorkOS::Types::RequestOptions) + # @return [void] + def revoke_it_contact( + organization_id:, + contact_id:, + request_options: {} + ) + @client.request( + method: :post, + path: "/organizations/#{WorkOS::Util.encode_path(organization_id)}/it_contacts/#{WorkOS::Util.encode_path(contact_id)}/revoke", + auth: true, + request_options: request_options + ) + nil + end end end diff --git a/lib/workos/organizations/create_it_contact.rb b/lib/workos/organizations/create_it_contact.rb new file mode 100644 index 00000000..6d8df964 --- /dev/null +++ b/lib/workos/organizations/create_it_contact.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class CreateItContact < WorkOS::Types::BaseModel + HASH_ATTRS = { + email: :email + }.freeze + + attr_accessor :email + + def initialize(json) + hash = self.class.normalize(json) + @email = hash[:email] + end + end +end diff --git a/lib/workos/organizations/invite_it_contact.rb b/lib/workos/organizations/invite_it_contact.rb new file mode 100644 index 00000000..5418e129 --- /dev/null +++ b/lib/workos/organizations/invite_it_contact.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class InviteItContact < WorkOS::Types::BaseModel + HASH_ATTRS = { + intents: :intents + }.freeze + + attr_accessor :intents + + def initialize(json) + hash = self.class.normalize(json) + @intents = hash[:intents] || [] + end + end +end diff --git a/lib/workos/organizations/it_contact.rb b/lib/workos/organizations/it_contact.rb new file mode 100644 index 00000000..4f8231f5 --- /dev/null +++ b/lib/workos/organizations/it_contact.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class ItContact < WorkOS::Types::BaseModel + HASH_ATTRS = { + object: :object, + id: :id, + email: :email, + created_at: :created_at, + updated_at: :updated_at + }.freeze + + attr_accessor \ + :object, + :id, + :email, + :created_at, + :updated_at + + def initialize(json) + hash = self.class.normalize(json) + @object = hash[:object] + @id = hash[:id] + @email = hash[:email] + @created_at = hash[:created_at] + @updated_at = hash[:updated_at] + end + end +end diff --git a/lib/workos/organizations/it_contact_list.rb b/lib/workos/organizations/it_contact_list.rb new file mode 100644 index 00000000..3b0865ce --- /dev/null +++ b/lib/workos/organizations/it_contact_list.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class ItContactList < WorkOS::Types::BaseModel + HASH_ATTRS = { + object: :object, + data: :data, + list_metadata: :list_metadata + }.freeze + + attr_accessor \ + :object, + :data, + :list_metadata + + def initialize(json) + hash = self.class.normalize(json) + @object = hash[:object] + @data = (hash[:data] || []).map { |item| item ? WorkOS::ItContact.new(item) : nil } + @list_metadata = hash[:list_metadata] ? WorkOS::ItContactListListMetadata.new(hash[:list_metadata]) : nil + end + end +end diff --git a/lib/workos/organizations/organization_input.rb b/lib/workos/organizations/organization_input.rb index b4479b36..58eac033 100644 --- a/lib/workos/organizations/organization_input.rb +++ b/lib/workos/organizations/organization_input.rb @@ -13,14 +13,23 @@ class OrganizationInput < WorkOS::Types::BaseModel external_id: :external_id }.freeze + # @!attribute domains + # @deprecated The domains associated with the organization. Deprecated in favor of `domain_data`. + attr_accessor \ :name, :allow_profiles_outside_organization, - :domains, :domain_data, :metadata, :external_id + def domains + warn "[DEPRECATION] `domains` is deprecated and will be removed in a future version.", uplevel: 1 + @domains + end + + attr_writer :domains + def initialize(json) hash = self.class.normalize(json) @name = hash[:name] diff --git a/lib/workos/platform_teams.rb b/lib/workos/platform_teams.rb new file mode 100644 index 00000000..24b6ef13 --- /dev/null +++ b/lib/workos/platform_teams.rb @@ -0,0 +1,58 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +require "json" + +module WorkOS + class PlatformTeams + def initialize(client) + @client = client + end + + # Create a team + # @param admin_email [String] The email address of the person who will administer the team. An invitation is sent to this address. + # @param name [String] Name of the team. + # @param request_options [Hash] (see WorkOS::Types::RequestOptions) + # @return [WorkOS::Team] + def create_team( + admin_email:, + name:, + request_options: {} + ) + body = { + "admin_email" => admin_email, + "name" => name + } + response = @client.request( + method: :post, + path: "/platform/teams", + auth: true, + body: body, + request_options: request_options + ) + result = WorkOS::Team.new(response.body) + 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"]) + result + end + + # Get a team + # @param team_id [String] The ID of the team. + # @param request_options [Hash] (see WorkOS::Types::RequestOptions) + # @return [WorkOS::Team] + def get_team( + team_id:, + request_options: {} + ) + response = @client.request( + method: :get, + path: "/platform/teams/#{WorkOS::Util.encode_path(team_id)}", + auth: true, + request_options: request_options + ) + result = WorkOS::Team.new(response.body) + 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"]) + result + end + end +end diff --git a/lib/workos/platform_teams/create_team.rb b/lib/workos/platform_teams/create_team.rb new file mode 100644 index 00000000..3c036095 --- /dev/null +++ b/lib/workos/platform_teams/create_team.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class CreateTeam < WorkOS::Types::BaseModel + HASH_ATTRS = { + admin_email: :admin_email, + name: :name + }.freeze + + attr_accessor \ + :admin_email, + :name + + def initialize(json) + hash = self.class.normalize(json) + @admin_email = hash[:admin_email] + @name = hash[:name] + end + end +end diff --git a/lib/workos/platform_teams/team.rb b/lib/workos/platform_teams/team.rb new file mode 100644 index 00000000..af59997d --- /dev/null +++ b/lib/workos/platform_teams/team.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class Team < WorkOS::Types::BaseModel + HASH_ATTRS = { + object: :object, + id: :id, + name: :name, + production_state: :production_state, + production_enabled_at: :production_enabled_at, + created_at: :created_at, + updated_at: :updated_at + }.freeze + + attr_accessor \ + :object, + :id, + :name, + :production_state, + :production_enabled_at, + :created_at, + :updated_at + + def initialize(json) + hash = self.class.normalize(json) + @object = hash[:object] + @id = hash[:id] + @name = hash[:name] + @production_state = hash[:production_state] + @production_enabled_at = hash[:production_enabled_at] + @created_at = hash[:created_at] + @updated_at = hash[:updated_at] + end + end +end diff --git a/lib/workos/shared/agent_blueprint_created.rb b/lib/workos/shared/agent_blueprint_created.rb new file mode 100644 index 00000000..f238311b --- /dev/null +++ b/lib/workos/shared/agent_blueprint_created.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class AgentBlueprintCreated < WorkOS::Types::BaseModel + HASH_ATTRS = { + object: :object, + id: :id, + event: :event, + data: :data, + created_at: :created_at, + context: :context + }.freeze + + attr_accessor \ + :object, + :id, + :event, + :data, + :created_at, + :context + + def initialize(json) + hash = self.class.normalize(json) + @object = hash[:object] + @id = hash[:id] + @event = hash[:event] + @data = hash[:data] ? WorkOS::AgentBlueprintCreatedData.new(hash[:data]) : nil + @created_at = hash[:created_at] + @context = hash[:context] ? WorkOS::EventContext.new(hash[:context]) : nil + end + end +end diff --git a/lib/workos/shared/agent_blueprint_created_data.rb b/lib/workos/shared/agent_blueprint_created_data.rb new file mode 100644 index 00000000..3dfe153e --- /dev/null +++ b/lib/workos/shared/agent_blueprint_created_data.rb @@ -0,0 +1,43 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class AgentBlueprintCreatedData < WorkOS::Types::BaseModel + HASH_ATTRS = { + object: :object, + id: :id, + name: :name, + description: :description, + permissions: :permissions, + invocable_by: :invocable_by, + session_settings: :session_settings, + created_at: :created_at, + updated_at: :updated_at + }.freeze + + attr_accessor \ + :object, + :id, + :name, + :description, + :permissions, + :invocable_by, + :session_settings, + :created_at, + :updated_at + + def initialize(json) + hash = self.class.normalize(json) + @object = hash[:object] + @id = hash[:id] + @name = hash[:name] + @description = hash[:description] + @permissions = hash[:permissions] || [] + @invocable_by = hash[:invocable_by] ? WorkOS::AgentBlueprintCreatedDataInvocableBy.new(hash[:invocable_by]) : nil + @session_settings = hash[:session_settings] ? WorkOS::AgentBlueprintCreatedDataSessionSetting.new(hash[:session_settings]) : nil + @created_at = hash[:created_at] + @updated_at = hash[:updated_at] + end + end +end diff --git a/lib/workos/shared/agent_blueprint_created_data_invocable_by.rb b/lib/workos/shared/agent_blueprint_created_data_invocable_by.rb new file mode 100644 index 00000000..b2425571 --- /dev/null +++ b/lib/workos/shared/agent_blueprint_created_data_invocable_by.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class AgentBlueprintCreatedDataInvocableBy < WorkOS::Types::BaseModel + HASH_ATTRS = { + role_slugs: :role_slugs, + organization_ids: :organization_ids + }.freeze + + attr_accessor \ + :role_slugs, + :organization_ids + + def initialize(json) + hash = self.class.normalize(json) + @role_slugs = hash[:role_slugs] || [] + @organization_ids = hash[:organization_ids] || [] + end + end +end diff --git a/lib/workos/shared/agent_blueprint_created_data_session_setting.rb b/lib/workos/shared/agent_blueprint_created_data_session_setting.rb new file mode 100644 index 00000000..87483387 --- /dev/null +++ b/lib/workos/shared/agent_blueprint_created_data_session_setting.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class AgentBlueprintCreatedDataSessionSetting < WorkOS::Types::BaseModel + HASH_ATTRS = { + max_age_seconds: :max_age_seconds, + access_token_ttl_seconds: :access_token_ttl_seconds, + refresh_token_ttl_seconds: :refresh_token_ttl_seconds + }.freeze + + attr_accessor \ + :max_age_seconds, + :access_token_ttl_seconds, + :refresh_token_ttl_seconds + + def initialize(json) + hash = self.class.normalize(json) + @max_age_seconds = hash[:max_age_seconds] + @access_token_ttl_seconds = hash[:access_token_ttl_seconds] + @refresh_token_ttl_seconds = hash[:refresh_token_ttl_seconds] + end + end +end diff --git a/lib/workos/shared/agent_blueprint_deleted.rb b/lib/workos/shared/agent_blueprint_deleted.rb new file mode 100644 index 00000000..3b282311 --- /dev/null +++ b/lib/workos/shared/agent_blueprint_deleted.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class AgentBlueprintDeleted < WorkOS::Types::BaseModel + HASH_ATTRS = { + object: :object, + id: :id, + event: :event, + data: :data, + created_at: :created_at, + context: :context + }.freeze + + attr_accessor \ + :object, + :id, + :event, + :data, + :created_at, + :context + + def initialize(json) + hash = self.class.normalize(json) + @object = hash[:object] + @id = hash[:id] + @event = hash[:event] + @data = hash[:data] ? WorkOS::AgentBlueprintDeletedData.new(hash[:data]) : nil + @created_at = hash[:created_at] + @context = hash[:context] ? WorkOS::EventContext.new(hash[:context]) : nil + end + end +end diff --git a/lib/workos/shared/agent_blueprint_deleted_data.rb b/lib/workos/shared/agent_blueprint_deleted_data.rb new file mode 100644 index 00000000..d5421c82 --- /dev/null +++ b/lib/workos/shared/agent_blueprint_deleted_data.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class AgentBlueprintDeletedData < WorkOS::Types::BaseModel + HASH_ATTRS = { + object: :object, + id: :id, + name: :name, + created_at: :created_at, + updated_at: :updated_at + }.freeze + + attr_accessor \ + :object, + :id, + :name, + :created_at, + :updated_at + + def initialize(json) + hash = self.class.normalize(json) + @object = hash[:object] + @id = hash[:id] + @name = hash[:name] + @created_at = hash[:created_at] + @updated_at = hash[:updated_at] + end + end +end diff --git a/lib/workos/shared/agent_blueprint_updated.rb b/lib/workos/shared/agent_blueprint_updated.rb new file mode 100644 index 00000000..a7a69af4 --- /dev/null +++ b/lib/workos/shared/agent_blueprint_updated.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class AgentBlueprintUpdated < WorkOS::Types::BaseModel + HASH_ATTRS = { + object: :object, + id: :id, + event: :event, + data: :data, + created_at: :created_at, + context: :context + }.freeze + + attr_accessor \ + :object, + :id, + :event, + :data, + :created_at, + :context + + def initialize(json) + hash = self.class.normalize(json) + @object = hash[:object] + @id = hash[:id] + @event = hash[:event] + @data = hash[:data] ? WorkOS::AgentBlueprintUpdatedData.new(hash[:data]) : nil + @created_at = hash[:created_at] + @context = hash[:context] ? WorkOS::EventContext.new(hash[:context]) : nil + end + end +end diff --git a/lib/workos/shared/agent_blueprint_updated_data.rb b/lib/workos/shared/agent_blueprint_updated_data.rb new file mode 100644 index 00000000..afe9ce27 --- /dev/null +++ b/lib/workos/shared/agent_blueprint_updated_data.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + AgentBlueprintUpdatedData = AgentBlueprintCreatedData +end diff --git a/lib/workos/shared/agent_blueprint_updated_data_invocable_by.rb b/lib/workos/shared/agent_blueprint_updated_data_invocable_by.rb new file mode 100644 index 00000000..c1521e08 --- /dev/null +++ b/lib/workos/shared/agent_blueprint_updated_data_invocable_by.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + AgentBlueprintUpdatedDataInvocableBy = AgentBlueprintCreatedDataInvocableBy +end diff --git a/lib/workos/shared/agent_blueprint_updated_data_session_setting.rb b/lib/workos/shared/agent_blueprint_updated_data_session_setting.rb new file mode 100644 index 00000000..a2e2756a --- /dev/null +++ b/lib/workos/shared/agent_blueprint_updated_data_session_setting.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + AgentBlueprintUpdatedDataSessionSetting = AgentBlueprintCreatedDataSessionSetting +end diff --git a/lib/workos/shared/agent_instance_created.rb b/lib/workos/shared/agent_instance_created.rb new file mode 100644 index 00000000..c942e7f3 --- /dev/null +++ b/lib/workos/shared/agent_instance_created.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class AgentInstanceCreated < WorkOS::Types::BaseModel + HASH_ATTRS = { + object: :object, + id: :id, + event: :event, + data: :data, + created_at: :created_at, + context: :context + }.freeze + + attr_accessor \ + :object, + :id, + :event, + :data, + :created_at, + :context + + def initialize(json) + hash = self.class.normalize(json) + @object = hash[:object] + @id = hash[:id] + @event = hash[:event] + @data = hash[:data] ? WorkOS::AgentInstanceCreatedData.new(hash[:data]) : nil + @created_at = hash[:created_at] + @context = hash[:context] ? WorkOS::EventContext.new(hash[:context]) : nil + end + end +end diff --git a/lib/workos/shared/agent_instance_created_data.rb b/lib/workos/shared/agent_instance_created_data.rb new file mode 100644 index 00000000..7ec46741 --- /dev/null +++ b/lib/workos/shared/agent_instance_created_data.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class AgentInstanceCreatedData < WorkOS::Types::BaseModel + HASH_ATTRS = { + object: :object, + id: :id, + agent_blueprint_id: :agent_blueprint_id, + organization_id: :organization_id, + organization_membership_id: :organization_membership_id, + type: :type, + created_at: :created_at, + updated_at: :updated_at + }.freeze + + attr_accessor \ + :object, + :id, + :agent_blueprint_id, + :organization_id, + :organization_membership_id, + :type, + :created_at, + :updated_at + + def initialize(json) + hash = self.class.normalize(json) + @object = hash[:object] + @id = hash[:id] + @agent_blueprint_id = hash[:agent_blueprint_id] + @organization_id = hash[:organization_id] + @organization_membership_id = hash[:organization_membership_id] + @type = hash[:type] + @created_at = hash[:created_at] + @updated_at = hash[:updated_at] + end + end +end diff --git a/lib/workos/shared/agent_instance_deleted.rb b/lib/workos/shared/agent_instance_deleted.rb new file mode 100644 index 00000000..e0fcae5c --- /dev/null +++ b/lib/workos/shared/agent_instance_deleted.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class AgentInstanceDeleted < WorkOS::Types::BaseModel + HASH_ATTRS = { + object: :object, + id: :id, + event: :event, + data: :data, + created_at: :created_at, + context: :context + }.freeze + + attr_accessor \ + :object, + :id, + :event, + :data, + :created_at, + :context + + def initialize(json) + hash = self.class.normalize(json) + @object = hash[:object] + @id = hash[:id] + @event = hash[:event] + @data = hash[:data] ? WorkOS::AgentInstanceDeletedData.new(hash[:data]) : nil + @created_at = hash[:created_at] + @context = hash[:context] ? WorkOS::EventContext.new(hash[:context]) : nil + end + end +end diff --git a/lib/workos/shared/agent_instance_deleted_data.rb b/lib/workos/shared/agent_instance_deleted_data.rb new file mode 100644 index 00000000..c24b7949 --- /dev/null +++ b/lib/workos/shared/agent_instance_deleted_data.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class AgentInstanceDeletedData < WorkOS::Types::BaseModel + HASH_ATTRS = { + object: :object, + id: :id, + agent_blueprint_id: :agent_blueprint_id, + organization_id: :organization_id, + organization_membership_id: :organization_membership_id, + type: :type, + created_at: :created_at, + updated_at: :updated_at + }.freeze + + attr_accessor \ + :object, + :id, + :agent_blueprint_id, + :organization_id, + :organization_membership_id, + :type, + :created_at, + :updated_at + + def initialize(json) + hash = self.class.normalize(json) + @object = hash[:object] + @id = hash[:id] + @agent_blueprint_id = hash[:agent_blueprint_id] + @organization_id = hash[:organization_id] + @organization_membership_id = hash[:organization_membership_id] + @type = hash[:type] + @created_at = hash[:created_at] + @updated_at = hash[:updated_at] + end + end +end diff --git a/lib/workos/shared/agent_instance_session_created.rb b/lib/workos/shared/agent_instance_session_created.rb new file mode 100644 index 00000000..8c039995 --- /dev/null +++ b/lib/workos/shared/agent_instance_session_created.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class AgentInstanceSessionCreated < WorkOS::Types::BaseModel + HASH_ATTRS = { + object: :object, + id: :id, + event: :event, + data: :data, + created_at: :created_at, + context: :context + }.freeze + + attr_accessor \ + :object, + :id, + :event, + :data, + :created_at, + :context + + def initialize(json) + hash = self.class.normalize(json) + @object = hash[:object] + @id = hash[:id] + @event = hash[:event] + @data = hash[:data] ? WorkOS::AgentInstanceSessionCreatedData.new(hash[:data]) : nil + @created_at = hash[:created_at] + @context = hash[:context] ? WorkOS::EventContext.new(hash[:context]) : nil + end + end +end diff --git a/lib/workos/shared/agent_instance_session_created_data.rb b/lib/workos/shared/agent_instance_session_created_data.rb new file mode 100644 index 00000000..d8f41f9c --- /dev/null +++ b/lib/workos/shared/agent_instance_session_created_data.rb @@ -0,0 +1,43 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class AgentInstanceSessionCreatedData < WorkOS::Types::BaseModel + HASH_ATTRS = { + object: :object, + id: :id, + agent_instance_id: :agent_instance_id, + organization_id: :organization_id, + expires_at: :expires_at, + revoked_at: :revoked_at, + created_at: :created_at, + updated_at: :updated_at, + permission_slugs: :permission_slugs + }.freeze + + attr_accessor \ + :object, + :id, + :agent_instance_id, + :organization_id, + :expires_at, + :revoked_at, + :created_at, + :updated_at, + :permission_slugs + + def initialize(json) + hash = self.class.normalize(json) + @object = hash[:object] + @id = hash[:id] + @agent_instance_id = hash[:agent_instance_id] + @organization_id = hash[:organization_id] + @expires_at = hash[:expires_at] + @revoked_at = hash[:revoked_at] + @created_at = hash[:created_at] + @updated_at = hash[:updated_at] + @permission_slugs = hash[:permission_slugs] || [] + end + end +end diff --git a/lib/workos/shared/agent_instance_session_revoked.rb b/lib/workos/shared/agent_instance_session_revoked.rb new file mode 100644 index 00000000..710d1473 --- /dev/null +++ b/lib/workos/shared/agent_instance_session_revoked.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class AgentInstanceSessionRevoked < WorkOS::Types::BaseModel + HASH_ATTRS = { + object: :object, + id: :id, + event: :event, + data: :data, + created_at: :created_at, + context: :context + }.freeze + + attr_accessor \ + :object, + :id, + :event, + :data, + :created_at, + :context + + def initialize(json) + hash = self.class.normalize(json) + @object = hash[:object] + @id = hash[:id] + @event = hash[:event] + @data = hash[:data] ? WorkOS::AgentInstanceSessionRevokedData.new(hash[:data]) : nil + @created_at = hash[:created_at] + @context = hash[:context] ? WorkOS::EventContext.new(hash[:context]) : nil + end + end +end diff --git a/lib/workos/shared/agent_instance_session_revoked_data.rb b/lib/workos/shared/agent_instance_session_revoked_data.rb new file mode 100644 index 00000000..bf101aa6 --- /dev/null +++ b/lib/workos/shared/agent_instance_session_revoked_data.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class AgentInstanceSessionRevokedData < WorkOS::Types::BaseModel + HASH_ATTRS = { + object: :object, + id: :id, + agent_instance_id: :agent_instance_id, + organization_id: :organization_id, + expires_at: :expires_at, + revoked_at: :revoked_at, + created_at: :created_at, + updated_at: :updated_at + }.freeze + + attr_accessor \ + :object, + :id, + :agent_instance_id, + :organization_id, + :expires_at, + :revoked_at, + :created_at, + :updated_at + + def initialize(json) + hash = self.class.normalize(json) + @object = hash[:object] + @id = hash[:id] + @agent_instance_id = hash[:agent_instance_id] + @organization_id = hash[:organization_id] + @expires_at = hash[:expires_at] + @revoked_at = hash[:revoked_at] + @created_at = hash[:created_at] + @updated_at = hash[:updated_at] + end + end +end diff --git a/lib/workos/shared/resource_export_completed.rb b/lib/workos/shared/resource_export_completed.rb new file mode 100644 index 00000000..d3b13dc1 --- /dev/null +++ b/lib/workos/shared/resource_export_completed.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class ResourceExportCompleted < WorkOS::Types::BaseModel + HASH_ATTRS = { + object: :object, + id: :id, + event: :event, + data: :data, + created_at: :created_at, + context: :context + }.freeze + + attr_accessor \ + :object, + :id, + :event, + :data, + :created_at, + :context + + def initialize(json) + hash = self.class.normalize(json) + @object = hash[:object] + @id = hash[:id] + @event = hash[:event] + @data = hash[:data] ? WorkOS::ResourceExportCompletedData.new(hash[:data]) : nil + @created_at = hash[:created_at] + @context = hash[:context] ? WorkOS::EventContext.new(hash[:context]) : nil + end + end +end diff --git a/lib/workos/shared/resource_export_completed_data.rb b/lib/workos/shared/resource_export_completed_data.rb new file mode 100644 index 00000000..2eeb694e --- /dev/null +++ b/lib/workos/shared/resource_export_completed_data.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class ResourceExportCompletedData < WorkOS::Types::BaseModel + HASH_ATTRS = { + id: :id, + resource_type: :resource_type + }.freeze + + attr_accessor \ + :id, + :resource_type + + def initialize(json) + hash = self.class.normalize(json) + @id = hash[:id] + @resource_type = hash[:resource_type] + end + end +end diff --git a/lib/workos/shared/resource_export_created.rb b/lib/workos/shared/resource_export_created.rb new file mode 100644 index 00000000..e44b602a --- /dev/null +++ b/lib/workos/shared/resource_export_created.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class ResourceExportCreated < WorkOS::Types::BaseModel + HASH_ATTRS = { + object: :object, + id: :id, + event: :event, + data: :data, + created_at: :created_at, + context: :context + }.freeze + + attr_accessor \ + :object, + :id, + :event, + :data, + :created_at, + :context + + def initialize(json) + hash = self.class.normalize(json) + @object = hash[:object] + @id = hash[:id] + @event = hash[:event] + @data = hash[:data] ? WorkOS::ResourceExportCreatedData.new(hash[:data]) : nil + @created_at = hash[:created_at] + @context = hash[:context] ? WorkOS::EventContext.new(hash[:context]) : nil + end + end +end diff --git a/lib/workos/shared/resource_export_created_data.rb b/lib/workos/shared/resource_export_created_data.rb new file mode 100644 index 00000000..9d80c669 --- /dev/null +++ b/lib/workos/shared/resource_export_created_data.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class ResourceExportCreatedData < WorkOS::Types::BaseModel + HASH_ATTRS = { + id: :id, + resource_type: :resource_type + }.freeze + + attr_accessor \ + :id, + :resource_type + + def initialize(json) + hash = self.class.normalize(json) + @id = hash[:id] + @resource_type = hash[:resource_type] + end + end +end diff --git a/lib/workos/shared/resource_export_downloaded.rb b/lib/workos/shared/resource_export_downloaded.rb new file mode 100644 index 00000000..a354de2f --- /dev/null +++ b/lib/workos/shared/resource_export_downloaded.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class ResourceExportDownloaded < WorkOS::Types::BaseModel + HASH_ATTRS = { + object: :object, + id: :id, + event: :event, + data: :data, + created_at: :created_at, + context: :context + }.freeze + + attr_accessor \ + :object, + :id, + :event, + :data, + :created_at, + :context + + def initialize(json) + hash = self.class.normalize(json) + @object = hash[:object] + @id = hash[:id] + @event = hash[:event] + @data = hash[:data] ? WorkOS::ResourceExportDownloadedData.new(hash[:data]) : nil + @created_at = hash[:created_at] + @context = hash[:context] ? WorkOS::EventContext.new(hash[:context]) : nil + end + end +end diff --git a/lib/workos/shared/resource_export_downloaded_data.rb b/lib/workos/shared/resource_export_downloaded_data.rb new file mode 100644 index 00000000..24c62999 --- /dev/null +++ b/lib/workos/shared/resource_export_downloaded_data.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class ResourceExportDownloadedData < WorkOS::Types::BaseModel + HASH_ATTRS = { + id: :id, + resource_type: :resource_type + }.freeze + + attr_accessor \ + :id, + :resource_type + + def initialize(json) + hash = self.class.normalize(json) + @id = hash[:id] + @resource_type = hash[:resource_type] + end + end +end diff --git a/lib/workos/shared/resource_export_failed.rb b/lib/workos/shared/resource_export_failed.rb new file mode 100644 index 00000000..1baf4733 --- /dev/null +++ b/lib/workos/shared/resource_export_failed.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class ResourceExportFailed < WorkOS::Types::BaseModel + HASH_ATTRS = { + object: :object, + id: :id, + event: :event, + data: :data, + created_at: :created_at, + context: :context + }.freeze + + attr_accessor \ + :object, + :id, + :event, + :data, + :created_at, + :context + + def initialize(json) + hash = self.class.normalize(json) + @object = hash[:object] + @id = hash[:id] + @event = hash[:event] + @data = hash[:data] ? WorkOS::ResourceExportFailedData.new(hash[:data]) : nil + @created_at = hash[:created_at] + @context = hash[:context] ? WorkOS::EventContext.new(hash[:context]) : nil + end + end +end diff --git a/lib/workos/shared/resource_export_failed_data.rb b/lib/workos/shared/resource_export_failed_data.rb new file mode 100644 index 00000000..fce77ee1 --- /dev/null +++ b/lib/workos/shared/resource_export_failed_data.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class ResourceExportFailedData < WorkOS::Types::BaseModel + HASH_ATTRS = { + id: :id, + resource_type: :resource_type + }.freeze + + attr_accessor \ + :id, + :resource_type + + def initialize(json) + hash = self.class.normalize(json) + @id = hash[:id] + @resource_type = hash[:resource_type] + end + end +end diff --git a/lib/workos/shared/waitlist_user.rb b/lib/workos/shared/waitlist_user.rb index 5701edc2..830433b7 100644 --- a/lib/workos/shared/waitlist_user.rb +++ b/lib/workos/shared/waitlist_user.rb @@ -5,36 +5,39 @@ module WorkOS class WaitlistUser < WorkOS::Types::BaseModel HASH_ATTRS = { - object: :object, id: :id, email: :email, state: :state, approved_at: :approved_at, + additional_fields: :additional_fields, waitlist_id: :waitlist_id, created_at: :created_at, - updated_at: :updated_at + updated_at: :updated_at, + object: :object }.freeze attr_accessor \ - :object, :id, :email, :state, :approved_at, + :additional_fields, :waitlist_id, :created_at, - :updated_at + :updated_at, + :object def initialize(json) hash = self.class.normalize(json) - @object = hash[:object] @id = hash[:id] @email = hash[:email] @state = hash[:state] @approved_at = hash[:approved_at] + @additional_fields = hash[:additional_fields] || {} @waitlist_id = hash[:waitlist_id] @created_at = hash[:created_at] @updated_at = hash[:updated_at] + @object = hash[:object] end end end diff --git a/lib/workos/sso.rb b/lib/workos/sso.rb index 894d6924..a91f2635 100644 --- a/lib/workos/sso.rb +++ b/lib/workos/sso.rb @@ -7,6 +7,30 @@ module WorkOS class SSO + # Identifies the protocol options (saml variant). + # + # @!attribute [r] saml_options + # @return [WorkOS::CreateConnectionSAMLOptions] + CreateProtocolOptionsSAML = Data.define(:saml_options) + + # Identifies the protocol options (oidc variant). + # + # @!attribute [r] oidc_options + # @return [WorkOS::CreateConnectionOIDCOptions] + CreateProtocolOptionsOIDC = Data.define(:oidc_options) + + # Identifies the protocol options (saml variant). + # + # @!attribute [r] saml_options + # @return [WorkOS::PatchConnectionSAMLOptions] + PatchProtocolOptionsSAML = Data.define(:saml_options) + + # Identifies the protocol options (oidc variant). + # + # @!attribute [r] oidc_options + # @return [WorkOS::PatchConnectionOIDCOptions] + PatchProtocolOptionsOIDC = Data.define(:oidc_options) + def initialize(client) @client = client end @@ -71,6 +95,228 @@ def list_connections( ) end + # Create a Connection + # @param organization_id [String] Unique identifier for the Organization in which the Connection resides. + # @param name [String, nil] A human-readable name for the Connection. This will most commonly be the organization's name. + # @param external_id [String, nil] The customer-owned identifier for the Connection. + # @param connection_type [String, nil] The type of the Connection. Only SAML and OIDC connection types may be created. When omitted, the type is inferred from the provided options. + # @param attribute_maps [WorkOS::CreateConnectionAttributeMaps, nil] How IdP attributes or claims map onto WorkOS profile fields. Provided fields override the defaults for the connection type. + # @param protocol_options [WorkOS::SSO::CreateProtocolOptionsSAML, WorkOS::SSO::CreateProtocolOptionsOIDC] Identifies the protocol options. + # @param request_options [Hash] (see WorkOS::Types::RequestOptions) + # @return [WorkOS::Connection] + def create_connection( + organization_id:, + protocol_options:, + name: nil, + external_id: nil, + connection_type: nil, + attribute_maps: nil, + request_options: {} + ) + body = { + "organization_id" => organization_id, + "name" => name, + "external_id" => external_id, + "connection_type" => connection_type, + "attribute_maps" => attribute_maps + }.compact + case protocol_options + when WorkOS::SSO::CreateProtocolOptionsSAML + body["saml_options"] = protocol_options.saml_options + when WorkOS::SSO::CreateProtocolOptionsOIDC + body["oidc_options"] = protocol_options.oidc_options + else + raise ArgumentError, "expected protocol_options to be one of: WorkOS::SSO::CreateProtocolOptionsSAML, WorkOS::SSO::CreateProtocolOptionsOIDC, got #{protocol_options.class}" + end + response = @client.request( + method: :post, + path: "/connections", + auth: true, + body: body, + request_options: request_options + ) + result = WorkOS::Connection.new(response.body) + 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"]) + result + end + + # List IdP signing certificates + # @param connection_id [String] Unique identifier for the Connection. + # @param request_options [Hash] (see WorkOS::Types::RequestOptions) + # @return [WorkOS::SAMLIdpSigningCertificateList] + def list_connection_saml_idp_signing_certs( + connection_id:, + request_options: {} + ) + response = @client.request( + method: :get, + path: "/connections/#{WorkOS::Util.encode_path(connection_id)}/saml_idp_signing_certs", + auth: true, + request_options: request_options + ) + result = WorkOS::SAMLIdpSigningCertificateList.new(response.body) + 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"]) + result + end + + # Create an IdP signing certificate + # @param connection_id [String] Unique identifier for the Connection. + # @param value [String] The PEM-encoded X.509 certificate. + # @param request_options [Hash] (see WorkOS::Types::RequestOptions) + # @return [WorkOS::SAMLIdpSigningCertificate] + def create_connection_saml_idp_signing_cert( + connection_id:, + value:, + request_options: {} + ) + body = { + "value" => value + } + response = @client.request( + method: :post, + path: "/connections/#{WorkOS::Util.encode_path(connection_id)}/saml_idp_signing_certs", + auth: true, + body: body, + request_options: request_options + ) + result = WorkOS::SAMLIdpSigningCertificate.new(response.body) + 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"]) + result + end + + # Delete an IdP signing certificate + # @param connection_id [String] Unique identifier for the Connection. + # @param certificate_id [String] Unique identifier for the Identity Provider signing certificate. + # @param request_options [Hash] (see WorkOS::Types::RequestOptions) + # @return [void] + def delete_connection_saml_idp_signing_cert( + connection_id:, + certificate_id:, + request_options: {} + ) + @client.request( + method: :delete, + path: "/connections/#{WorkOS::Util.encode_path(connection_id)}/saml_idp_signing_certs/#{WorkOS::Util.encode_path(certificate_id)}", + auth: true, + request_options: request_options + ) + nil + end + + # List SP encryption certificates + # @param connection_id [String] Unique identifier for the Connection. + # @param request_options [Hash] (see WorkOS::Types::RequestOptions) + # @return [WorkOS::SAMLSpEncryptionCertificateList] + def list_connection_saml_sp_encryption_certs( + connection_id:, + request_options: {} + ) + response = @client.request( + method: :get, + path: "/connections/#{WorkOS::Util.encode_path(connection_id)}/saml_sp_encryption_certs", + auth: true, + request_options: request_options + ) + result = WorkOS::SAMLSpEncryptionCertificateList.new(response.body) + 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"]) + result + end + + # Create an SP encryption certificate + # @param connection_id [String] Unique identifier for the Connection. + # @param request_options [Hash] (see WorkOS::Types::RequestOptions) + # @return [WorkOS::SAMLSpEncryptionCertificate] + def create_connection_saml_sp_encryption_cert( + connection_id:, + request_options: {} + ) + response = @client.request( + method: :post, + path: "/connections/#{WorkOS::Util.encode_path(connection_id)}/saml_sp_encryption_certs", + auth: true, + request_options: request_options + ) + result = WorkOS::SAMLSpEncryptionCertificate.new(response.body) + 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"]) + result + end + + # Delete an SP encryption certificate + # @param connection_id [String] Unique identifier for the Connection. + # @param certificate_id [String] Unique identifier for the Service Provider encryption key pair. WorkOS holds the corresponding private key, which is never exposed. + # @param request_options [Hash] (see WorkOS::Types::RequestOptions) + # @return [void] + def delete_connection_saml_sp_encryption_cert( + connection_id:, + certificate_id:, + request_options: {} + ) + @client.request( + method: :delete, + path: "/connections/#{WorkOS::Util.encode_path(connection_id)}/saml_sp_encryption_certs/#{WorkOS::Util.encode_path(certificate_id)}", + auth: true, + request_options: request_options + ) + nil + end + + # Get the SP signing certificate + # @param connection_id [String] Unique identifier for the Connection. + # @param request_options [Hash] (see WorkOS::Types::RequestOptions) + # @return [WorkOS::SAMLSpSigningCertificate] + def list_connection_saml_sp_signing_cert( + connection_id:, + request_options: {} + ) + response = @client.request( + method: :get, + path: "/connections/#{WorkOS::Util.encode_path(connection_id)}/saml_sp_signing_cert", + auth: true, + request_options: request_options + ) + result = WorkOS::SAMLSpSigningCertificate.new(response.body) + 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"]) + result + end + + # Create an SP signing certificate + # @param connection_id [String] Unique identifier for the Connection. + # @param request_options [Hash] (see WorkOS::Types::RequestOptions) + # @return [WorkOS::SAMLSpSigningCertificate] + def create_connection_saml_sp_signing_cert( + connection_id:, + request_options: {} + ) + response = @client.request( + method: :post, + path: "/connections/#{WorkOS::Util.encode_path(connection_id)}/saml_sp_signing_cert", + auth: true, + request_options: request_options + ) + result = WorkOS::SAMLSpSigningCertificate.new(response.body) + 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"]) + result + end + + # Delete the SP signing certificate + # @param connection_id [String] Unique identifier for the Connection. + # @param certificate_id [String] Unique identifier for the Service Provider signing key pair. WorkOS holds the corresponding private key, which is never exposed. + # @param request_options [Hash] (see WorkOS::Types::RequestOptions) + # @return [void] + def delete_connection_saml_sp_signing_cert( + connection_id:, + certificate_id:, + request_options: {} + ) + @client.request( + method: :delete, + path: "/connections/#{WorkOS::Util.encode_path(connection_id)}/saml_sp_signing_cert/#{WorkOS::Util.encode_path(certificate_id)}", + auth: true, + request_options: request_options + ) + nil + end + # Get a Connection # @param id [String] Unique identifier for the Connection. # @param request_options [Hash] (see WorkOS::Types::RequestOptions) @@ -90,6 +336,52 @@ def get_connection( result end + # Update a Connection + # @param id [String] Unique identifier for the Connection. + # @param name [String, nil] A human-readable name for the Connection. + # @param external_id [String, nil] The customer-owned identifier for the Connection. Set to `null` to stop tracking one. + # @param connection_type [String, nil] The type of the Connection. Immutable after creation — it may be sent, but only with the Connection current type. + # @param attribute_maps [WorkOS::PatchConnectionAttributeMaps, nil] How IdP attributes or claims map onto WorkOS profile fields. Only the provided fields are updated. + # @param protocol_options [WorkOS::SSO::PatchProtocolOptionsSAML, WorkOS::SSO::PatchProtocolOptionsOIDC, nil] Identifies the protocol options. + # @param request_options [Hash] (see WorkOS::Types::RequestOptions) + # @return [WorkOS::Connection] + def update_connection( + id:, + name: nil, + external_id: WorkOS::OMIT, + connection_type: nil, + attribute_maps: nil, + protocol_options: nil, + request_options: {} + ) + body = { + "name" => name, + "connection_type" => connection_type, + "attribute_maps" => attribute_maps + }.compact + body["external_id"] = external_id unless external_id.equal?(WorkOS::OMIT) + if protocol_options + case protocol_options + when WorkOS::SSO::PatchProtocolOptionsSAML + body["saml_options"] = protocol_options.saml_options + when WorkOS::SSO::PatchProtocolOptionsOIDC + body["oidc_options"] = protocol_options.oidc_options + else + raise ArgumentError, "expected protocol_options to be one of: WorkOS::SSO::PatchProtocolOptionsSAML, WorkOS::SSO::PatchProtocolOptionsOIDC, got #{protocol_options.class}" + end + end + response = @client.request( + method: :patch, + path: "/connections/#{WorkOS::Util.encode_path(id)}", + auth: true, + body: body, + request_options: request_options + ) + result = WorkOS::Connection.new(response.body) + 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"]) + result + end + # Delete a Connection # @param id [String] Unique identifier for the Connection. # @param request_options [Hash] (see WorkOS::Types::RequestOptions) @@ -214,19 +506,28 @@ def get_profile(request_options: {}) end # Get a Profile and Token - # @param code [String] The authorization code received from the authorization callback. + # @param code [String, nil] The authorization code received from the authorization callback. Required when `grant_type` is `authorization_code`. + # @param subject_token [String, nil] The OIDC ID token to exchange. Required when `grant_type` is `urn:ietf:params:oauth:grant-type:token-exchange`. Must be sent in the request body. + # @param subject_token_type [String, nil] The type of the subject token. Required when `grant_type` is `urn:ietf:params:oauth:grant-type:token-exchange`. Must be sent in the request body. + # @param organization_id [String, nil] The ID of the organization whose connection the subject token is validated against. Required when `grant_type` is `urn:ietf:params:oauth:grant-type:token-exchange`. Must be sent in the request body. # @param request_options [Hash] (see WorkOS::Types::RequestOptions) # @return [WorkOS::SSOTokenResponse] def get_profile_and_token( - code:, + code: nil, + subject_token: nil, + subject_token_type: nil, + organization_id: nil, request_options: {} ) body = { "grant_type" => "authorization_code", "client_id" => request_options[:client_id] || @client.client_id, "client_secret" => request_options[:api_key] || @client.api_key, - "code" => code - } + "code" => code, + "subject_token" => subject_token, + "subject_token_type" => subject_token_type, + "organization_id" => organization_id + }.compact response = @client.request( method: :post, path: "/sso/token", diff --git a/lib/workos/sso/create_connection.rb b/lib/workos/sso/create_connection.rb new file mode 100644 index 00000000..3d1ff7fb --- /dev/null +++ b/lib/workos/sso/create_connection.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class CreateConnection < WorkOS::Types::BaseModel + HASH_ATTRS = { + organization_id: :organization_id, + name: :name, + external_id: :external_id, + connection_type: :connection_type, + attribute_maps: :attribute_maps, + saml_options: :saml_options, + oidc_options: :oidc_options + }.freeze + + attr_accessor \ + :organization_id, + :name, + :external_id, + :connection_type, + :attribute_maps, + :saml_options, + :oidc_options + + def initialize(json) + hash = self.class.normalize(json) + @organization_id = hash[:organization_id] + @name = hash[:name] + @external_id = hash[:external_id] + @connection_type = hash[:connection_type] + @attribute_maps = hash[:attribute_maps] ? WorkOS::CreateConnectionAttributeMaps.new(hash[:attribute_maps]) : nil + @saml_options = hash[:saml_options] ? WorkOS::CreateConnectionSAMLOptions.new(hash[:saml_options]) : nil + @oidc_options = hash[:oidc_options] ? WorkOS::CreateConnectionOIDCOptions.new(hash[:oidc_options]) : nil + end + end +end diff --git a/lib/workos/sso/create_connection_attribute_maps.rb b/lib/workos/sso/create_connection_attribute_maps.rb new file mode 100644 index 00000000..253ac6b4 --- /dev/null +++ b/lib/workos/sso/create_connection_attribute_maps.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class CreateConnectionAttributeMaps < WorkOS::Types::BaseModel + HASH_ATTRS = { + standard_attributes: :standard_attributes, + custom_attributes: :custom_attributes + }.freeze + + attr_accessor \ + :standard_attributes, + :custom_attributes + + def initialize(json) + hash = self.class.normalize(json) + @standard_attributes = hash[:standard_attributes] ? WorkOS::CreateConnectionStandardAttributes.new(hash[:standard_attributes]) : nil + @custom_attributes = hash[:custom_attributes] || {} + end + end +end diff --git a/lib/workos/sso/create_connection_key_pair.rb b/lib/workos/sso/create_connection_key_pair.rb new file mode 100644 index 00000000..13d704a2 --- /dev/null +++ b/lib/workos/sso/create_connection_key_pair.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class CreateConnectionKeyPair < WorkOS::Types::BaseModel + HASH_ATTRS = { + key: :key, + cert: :cert + }.freeze + + attr_accessor \ + :key, + :cert + + def initialize(json) + hash = self.class.normalize(json) + @key = hash[:key] + @cert = hash[:cert] + end + end +end diff --git a/lib/workos/sso/create_connection_oidc_options.rb b/lib/workos/sso/create_connection_oidc_options.rb new file mode 100644 index 00000000..e8828c32 --- /dev/null +++ b/lib/workos/sso/create_connection_oidc_options.rb @@ -0,0 +1,43 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class CreateConnectionOIDCOptions < WorkOS::Types::BaseModel + HASH_ATTRS = { + discovery_endpoint: :discovery_endpoint, + client_id: :client_id, + client_secret: :client_secret, + redirect_uri: :redirect_uri, + pkce: :pkce, + token_authentication_method: :token_authentication_method, + jwt_signing_key_pair: :jwt_signing_key_pair, + id_token_signature_algorithm: :id_token_signature_algorithm, + fetch_user_info: :fetch_user_info + }.freeze + + attr_accessor \ + :discovery_endpoint, + :client_id, + :client_secret, + :redirect_uri, + :pkce, + :token_authentication_method, + :jwt_signing_key_pair, + :id_token_signature_algorithm, + :fetch_user_info + + def initialize(json) + hash = self.class.normalize(json) + @discovery_endpoint = hash[:discovery_endpoint] + @client_id = hash[:client_id] + @client_secret = hash[:client_secret] + @redirect_uri = hash[:redirect_uri] + @pkce = hash[:pkce] + @token_authentication_method = hash[:token_authentication_method] + @jwt_signing_key_pair = hash[:jwt_signing_key_pair] ? WorkOS::CreateConnectionKeyPair.new(hash[:jwt_signing_key_pair]) : nil + @id_token_signature_algorithm = hash[:id_token_signature_algorithm] + @fetch_user_info = hash[:fetch_user_info] + end + end +end diff --git a/lib/workos/sso/create_connection_saml_options.rb b/lib/workos/sso/create_connection_saml_options.rb new file mode 100644 index 00000000..df10cbd9 --- /dev/null +++ b/lib/workos/sso/create_connection_saml_options.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class CreateConnectionSAMLOptions < WorkOS::Types::BaseModel + HASH_ATTRS = { + idp_metadata_url: :idp_metadata_url, + acs_url: :acs_url, + sp_entity_id: :sp_entity_id, + idp_entity_id: :idp_entity_id, + idp_sso_url: :idp_sso_url, + idp_signing_certs: :idp_signing_certs, + sp_signing_key_pair: :sp_signing_key_pair, + sp_encryption_key_pairs: :sp_encryption_key_pairs + }.freeze + + attr_accessor \ + :idp_metadata_url, + :acs_url, + :sp_entity_id, + :idp_entity_id, + :idp_sso_url, + :idp_signing_certs, + :sp_signing_key_pair, + :sp_encryption_key_pairs + + def initialize(json) + hash = self.class.normalize(json) + @idp_metadata_url = hash[:idp_metadata_url] + @acs_url = hash[:acs_url] + @sp_entity_id = hash[:sp_entity_id] + @idp_entity_id = hash[:idp_entity_id] + @idp_sso_url = hash[:idp_sso_url] + @idp_signing_certs = hash[:idp_signing_certs] || [] + @sp_signing_key_pair = hash[:sp_signing_key_pair] ? WorkOS::CreateConnectionKeyPair.new(hash[:sp_signing_key_pair]) : nil + @sp_encryption_key_pairs = (hash[:sp_encryption_key_pairs] || []).map { |item| item ? WorkOS::CreateConnectionKeyPair.new(item) : nil } + end + end +end diff --git a/lib/workos/sso/create_connection_standard_attributes.rb b/lib/workos/sso/create_connection_standard_attributes.rb new file mode 100644 index 00000000..360b0e27 --- /dev/null +++ b/lib/workos/sso/create_connection_standard_attributes.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class CreateConnectionStandardAttributes < WorkOS::Types::BaseModel + HASH_ATTRS = { + idp_id: :idp_id, + email: :email, + first_name: :first_name, + last_name: :last_name, + groups: :groups, + name: :name + }.freeze + + attr_accessor \ + :idp_id, + :email, + :first_name, + :last_name, + :groups, + :name + + def initialize(json) + hash = self.class.normalize(json) + @idp_id = hash[:idp_id] + @email = hash[:email] + @first_name = hash[:first_name] + @last_name = hash[:last_name] + @groups = hash[:groups] + @name = hash[:name] + end + end +end diff --git a/lib/workos/sso/create_saml_idp_signing_certificate.rb b/lib/workos/sso/create_saml_idp_signing_certificate.rb new file mode 100644 index 00000000..a91862a6 --- /dev/null +++ b/lib/workos/sso/create_saml_idp_signing_certificate.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class CreateSAMLIdpSigningCertificate < WorkOS::Types::BaseModel + HASH_ATTRS = { + value: :value + }.freeze + + attr_accessor :value + + def initialize(json) + hash = self.class.normalize(json) + @value = hash[:value] + end + end +end diff --git a/lib/workos/sso/patch_connection.rb b/lib/workos/sso/patch_connection.rb new file mode 100644 index 00000000..1dd8a138 --- /dev/null +++ b/lib/workos/sso/patch_connection.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class PatchConnection < WorkOS::Types::BaseModel + HASH_ATTRS = { + name: :name, + external_id: :external_id, + connection_type: :connection_type, + attribute_maps: :attribute_maps, + saml_options: :saml_options, + oidc_options: :oidc_options + }.freeze + + attr_accessor \ + :name, + :external_id, + :connection_type, + :attribute_maps, + :saml_options, + :oidc_options + + def initialize(json) + hash = self.class.normalize(json) + @name = hash[:name] + @external_id = hash[:external_id] + @connection_type = hash[:connection_type] + @attribute_maps = hash[:attribute_maps] ? WorkOS::PatchConnectionAttributeMaps.new(hash[:attribute_maps]) : nil + @saml_options = hash[:saml_options] ? WorkOS::PatchConnectionSAMLOptions.new(hash[:saml_options]) : nil + @oidc_options = hash[:oidc_options] ? WorkOS::PatchConnectionOIDCOptions.new(hash[:oidc_options]) : nil + end + end +end diff --git a/lib/workos/sso/patch_connection_attribute_maps.rb b/lib/workos/sso/patch_connection_attribute_maps.rb new file mode 100644 index 00000000..a518b0dc --- /dev/null +++ b/lib/workos/sso/patch_connection_attribute_maps.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class PatchConnectionAttributeMaps < WorkOS::Types::BaseModel + HASH_ATTRS = { + standard_attributes: :standard_attributes, + custom_attributes: :custom_attributes + }.freeze + + attr_accessor \ + :standard_attributes, + :custom_attributes + + def initialize(json) + hash = self.class.normalize(json) + @standard_attributes = hash[:standard_attributes] ? WorkOS::PatchConnectionStandardAttributes.new(hash[:standard_attributes]) : nil + @custom_attributes = hash[:custom_attributes] || {} + end + end +end diff --git a/lib/workos/sso/patch_connection_oidc_options.rb b/lib/workos/sso/patch_connection_oidc_options.rb new file mode 100644 index 00000000..47628d9b --- /dev/null +++ b/lib/workos/sso/patch_connection_oidc_options.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class PatchConnectionOIDCOptions < WorkOS::Types::BaseModel + HASH_ATTRS = { + discovery_endpoint: :discovery_endpoint, + client_id: :client_id, + client_secret: :client_secret, + redirect_uri: :redirect_uri, + pkce: :pkce, + token_authentication_method: :token_authentication_method, + id_token_signature_algorithm: :id_token_signature_algorithm, + fetch_user_info: :fetch_user_info + }.freeze + + attr_accessor \ + :discovery_endpoint, + :client_id, + :client_secret, + :redirect_uri, + :pkce, + :token_authentication_method, + :id_token_signature_algorithm, + :fetch_user_info + + def initialize(json) + hash = self.class.normalize(json) + @discovery_endpoint = hash[:discovery_endpoint] + @client_id = hash[:client_id] + @client_secret = hash[:client_secret] + @redirect_uri = hash[:redirect_uri] + @pkce = hash[:pkce] + @token_authentication_method = hash[:token_authentication_method] + @id_token_signature_algorithm = hash[:id_token_signature_algorithm] + @fetch_user_info = hash[:fetch_user_info] + end + end +end diff --git a/lib/workos/sso/patch_connection_saml_options.rb b/lib/workos/sso/patch_connection_saml_options.rb new file mode 100644 index 00000000..737d3e4e --- /dev/null +++ b/lib/workos/sso/patch_connection_saml_options.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class PatchConnectionSAMLOptions < WorkOS::Types::BaseModel + HASH_ATTRS = { + idp_metadata_url: :idp_metadata_url, + acs_url: :acs_url, + sp_entity_id: :sp_entity_id, + idp_entity_id: :idp_entity_id, + idp_sso_url: :idp_sso_url + }.freeze + + attr_accessor \ + :idp_metadata_url, + :acs_url, + :sp_entity_id, + :idp_entity_id, + :idp_sso_url + + def initialize(json) + hash = self.class.normalize(json) + @idp_metadata_url = hash[:idp_metadata_url] + @acs_url = hash[:acs_url] + @sp_entity_id = hash[:sp_entity_id] + @idp_entity_id = hash[:idp_entity_id] + @idp_sso_url = hash[:idp_sso_url] + end + end +end diff --git a/lib/workos/sso/patch_connection_standard_attributes.rb b/lib/workos/sso/patch_connection_standard_attributes.rb new file mode 100644 index 00000000..101e9f1a --- /dev/null +++ b/lib/workos/sso/patch_connection_standard_attributes.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + PatchConnectionStandardAttributes = CreateConnectionStandardAttributes +end diff --git a/lib/workos/sso/saml_idp_signing_certificate.rb b/lib/workos/sso/saml_idp_signing_certificate.rb new file mode 100644 index 00000000..52fe2d4f --- /dev/null +++ b/lib/workos/sso/saml_idp_signing_certificate.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class SAMLIdpSigningCertificate < WorkOS::Types::BaseModel + HASH_ATTRS = { + object: :object, + id: :id, + value: :value, + not_before: :not_before, + not_after: :not_after, + created_at: :created_at + }.freeze + + attr_accessor \ + :object, + :id, + :value, + :not_before, + :not_after, + :created_at + + def initialize(json) + hash = self.class.normalize(json) + @object = hash[:object] + @id = hash[:id] + @value = hash[:value] + @not_before = hash[:not_before] + @not_after = hash[:not_after] + @created_at = hash[:created_at] + end + end +end diff --git a/lib/workos/sso/saml_idp_signing_certificate_list.rb b/lib/workos/sso/saml_idp_signing_certificate_list.rb new file mode 100644 index 00000000..d4b9940b --- /dev/null +++ b/lib/workos/sso/saml_idp_signing_certificate_list.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class SAMLIdpSigningCertificateList < WorkOS::Types::BaseModel + HASH_ATTRS = { + object: :object, + data: :data + }.freeze + + attr_accessor \ + :object, + :data + + def initialize(json) + hash = self.class.normalize(json) + @object = hash[:object] + @data = (hash[:data] || []).map { |item| item ? WorkOS::SAMLIdpSigningCertificate.new(item) : nil } + end + end +end diff --git a/lib/workos/sso/saml_sp_encryption_certificate.rb b/lib/workos/sso/saml_sp_encryption_certificate.rb new file mode 100644 index 00000000..816962a6 --- /dev/null +++ b/lib/workos/sso/saml_sp_encryption_certificate.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class SAMLSpEncryptionCertificate < WorkOS::Types::BaseModel + HASH_ATTRS = { + object: :object, + id: :id, + value: :value, + not_before: :not_before, + not_after: :not_after, + created_at: :created_at + }.freeze + + attr_accessor \ + :object, + :id, + :value, + :not_before, + :not_after, + :created_at + + def initialize(json) + hash = self.class.normalize(json) + @object = hash[:object] + @id = hash[:id] + @value = hash[:value] + @not_before = hash[:not_before] + @not_after = hash[:not_after] + @created_at = hash[:created_at] + end + end +end diff --git a/lib/workos/sso/saml_sp_encryption_certificate_list.rb b/lib/workos/sso/saml_sp_encryption_certificate_list.rb new file mode 100644 index 00000000..a437db2f --- /dev/null +++ b/lib/workos/sso/saml_sp_encryption_certificate_list.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class SAMLSpEncryptionCertificateList < WorkOS::Types::BaseModel + HASH_ATTRS = { + object: :object, + data: :data + }.freeze + + attr_accessor \ + :object, + :data + + def initialize(json) + hash = self.class.normalize(json) + @object = hash[:object] + @data = (hash[:data] || []).map { |item| item ? WorkOS::SAMLSpEncryptionCertificate.new(item) : nil } + end + end +end diff --git a/lib/workos/sso/saml_sp_signing_certificate.rb b/lib/workos/sso/saml_sp_signing_certificate.rb new file mode 100644 index 00000000..1fb68c7e --- /dev/null +++ b/lib/workos/sso/saml_sp_signing_certificate.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class SAMLSpSigningCertificate < WorkOS::Types::BaseModel + HASH_ATTRS = { + object: :object, + id: :id, + value: :value, + not_before: :not_before, + not_after: :not_after, + created_at: :created_at + }.freeze + + attr_accessor \ + :object, + :id, + :value, + :not_before, + :not_after, + :created_at + + def initialize(json) + hash = self.class.normalize(json) + @object = hash[:object] + @id = hash[:id] + @value = hash[:value] + @not_before = hash[:not_before] + @not_after = hash[:not_after] + @created_at = hash[:created_at] + end + end +end diff --git a/lib/workos/sso/token_query.rb b/lib/workos/sso/token_query.rb index 4ee27dcc..e8d6f4e8 100644 --- a/lib/workos/sso/token_query.rb +++ b/lib/workos/sso/token_query.rb @@ -8,14 +8,20 @@ class TokenQuery < WorkOS::Types::BaseModel client_id: :client_id, client_secret: :client_secret, code: :code, - grant_type: :grant_type + grant_type: :grant_type, + subject_token: :subject_token, + subject_token_type: :subject_token_type, + organization_id: :organization_id }.freeze attr_accessor \ :client_id, :client_secret, :code, - :grant_type + :grant_type, + :subject_token, + :subject_token_type, + :organization_id def initialize(json) hash = self.class.normalize(json) @@ -23,6 +29,9 @@ def initialize(json) @client_secret = hash[:client_secret] @code = hash[:code] @grant_type = hash[:grant_type] + @subject_token = hash[:subject_token] + @subject_token_type = hash[:subject_token_type] + @organization_id = hash[:organization_id] end end end diff --git a/lib/workos/types/agent_blueprints_token_mint_token_request_type.rb b/lib/workos/types/agent_blueprints_token_mint_token_request_type.rb new file mode 100644 index 00000000..47058b20 --- /dev/null +++ b/lib/workos/types/agent_blueprints_token_mint_token_request_type.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + module Types + class AgentBlueprintsTokenMintTokenRequestType + USER_DELEGATED = "user_delegated" + AUTONOMOUS = "autonomous" + AGENT_DELEGATED = "agent_delegated" + REFRESH = "refresh" + ALL = [USER_DELEGATED, AUTONOMOUS, AGENT_DELEGATED, REFRESH].freeze + end + end +end diff --git a/lib/workos/types/agent_instance_created_data_type.rb b/lib/workos/types/agent_instance_created_data_type.rb new file mode 100644 index 00000000..49f1e43e --- /dev/null +++ b/lib/workos/types/agent_instance_created_data_type.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + module Types + class AgentInstanceCreatedDataType + DELEGATED = "delegated" + AUTONOMOUS = "autonomous" + ALL = [DELEGATED, AUTONOMOUS].freeze + end + end +end diff --git a/lib/workos/types/agent_instance_deleted_data_type.rb b/lib/workos/types/agent_instance_deleted_data_type.rb new file mode 100644 index 00000000..d98659d5 --- /dev/null +++ b/lib/workos/types/agent_instance_deleted_data_type.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + module Types + AgentInstanceDeletedDataType = AgentInstanceCreatedDataType + end +end diff --git a/lib/workos/types/agent_instance_session_status.rb b/lib/workos/types/agent_instance_session_status.rb new file mode 100644 index 00000000..d01033d6 --- /dev/null +++ b/lib/workos/types/agent_instance_session_status.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + module Types + class AgentInstanceSessionStatus + ACTIVE = "active" + REVOKED = "revoked" + EXPIRED = "expired" + ALL = [ACTIVE, REVOKED, EXPIRED].freeze + end + end +end diff --git a/lib/workos/types/agent_instance_type.rb b/lib/workos/types/agent_instance_type.rb new file mode 100644 index 00000000..eee12139 --- /dev/null +++ b/lib/workos/types/agent_instance_type.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + module Types + AgentInstanceType = AgentInstanceCreatedDataType + end +end diff --git a/lib/workos/types/connection_activated_data_connection_type.rb b/lib/workos/types/connection_activated_data_connection_type.rb index 408978ed..c93cbb28 100644 --- a/lib/workos/types/connection_activated_data_connection_type.rb +++ b/lib/workos/types/connection_activated_data_connection_type.rb @@ -17,7 +17,6 @@ class ConnectionActivatedDataConnectionType CLEVER_OIDC = "CleverOIDC" CLOUDFLARE_SAML = "CloudflareSAML" CYBER_ARK_SAML = "CyberArkSAML" - DISCORD_OAUTH = "DiscordOAuth" DUO_SAML = "DuoSAML" ENTRA_ID_OIDC = "EntraIdOIDC" GENERIC_OIDC = "GenericOIDC" @@ -27,8 +26,6 @@ class ConnectionActivatedDataConnectionType GOOGLE_OAUTH = "GoogleOAuth" GOOGLE_OIDC = "GoogleOIDC" GOOGLE_SAML = "GoogleSAML" - GROK_OAUTH = "GrokOAuth" - XO_AUTH = "XOAuth" INTUIT_OAUTH = "IntuitOAuth" JUMP_CLOUD_SAML = "JumpCloudSAML" KEYCLOAK_SAML = "KeycloakSAML" @@ -57,7 +54,7 @@ class ConnectionActivatedDataConnectionType VERCEL_OAUTH = "VercelOAuth" V_MWARE_SAML = "VMwareSAML" XERO_OAUTH = "XeroOAuth" - ALL = [ADFSSAML, ADP_OIDC, APPLE_OAUTH, AUTH_0_MIGRATION, AUTH_0_SAML, AZURE_SAML, BITBUCKET_OAUTH, CAS_SAML, CLASS_LINK_SAML, CLEVER_OIDC, CLOUDFLARE_SAML, CYBER_ARK_SAML, DISCORD_OAUTH, DUO_SAML, ENTRA_ID_OIDC, GENERIC_OIDC, GENERIC_SAML, GIT_HUB_OAUTH, GIT_LAB_OAUTH, GOOGLE_OAUTH, GOOGLE_OIDC, GOOGLE_SAML, GROK_OAUTH, XO_AUTH, INTUIT_OAUTH, JUMP_CLOUD_SAML, KEYCLOAK_SAML, LAST_PASS_SAML, LINKED_IN_OAUTH, LOGIN_GOV_OIDC, MAGIC_LINK, MICROSOFT_OAUTH, MINI_ORANGE_SAML, NET_IQ_SAML, OKTA_OIDC, OKTA_SAML, ONE_LOGIN_SAML, ORACLE_SAML, PING_FEDERATE_SAML, PING_ONE_SAML, RIPPLING_SAML, SALESFORCE_SAML, SHIBBOLETH_GENERIC_SAML, SHIBBOLETH_SAML, SIMPLE_SAML_PHP_SAML, SALESFORCE_OAUTH, SLACK_OAUTH, TEST_IDP, VERCEL_MARKETPLACE_OAUTH, VERCEL_OAUTH, V_MWARE_SAML, XERO_OAUTH].freeze + ALL = [ADFSSAML, ADP_OIDC, APPLE_OAUTH, AUTH_0_MIGRATION, AUTH_0_SAML, AZURE_SAML, BITBUCKET_OAUTH, CAS_SAML, CLASS_LINK_SAML, CLEVER_OIDC, CLOUDFLARE_SAML, CYBER_ARK_SAML, DUO_SAML, ENTRA_ID_OIDC, GENERIC_OIDC, GENERIC_SAML, GIT_HUB_OAUTH, GIT_LAB_OAUTH, GOOGLE_OAUTH, GOOGLE_OIDC, GOOGLE_SAML, INTUIT_OAUTH, JUMP_CLOUD_SAML, KEYCLOAK_SAML, LAST_PASS_SAML, LINKED_IN_OAUTH, LOGIN_GOV_OIDC, MAGIC_LINK, MICROSOFT_OAUTH, MINI_ORANGE_SAML, NET_IQ_SAML, OKTA_OIDC, OKTA_SAML, ONE_LOGIN_SAML, ORACLE_SAML, PING_FEDERATE_SAML, PING_ONE_SAML, RIPPLING_SAML, SALESFORCE_SAML, SHIBBOLETH_GENERIC_SAML, SHIBBOLETH_SAML, SIMPLE_SAML_PHP_SAML, SALESFORCE_OAUTH, SLACK_OAUTH, TEST_IDP, VERCEL_MARKETPLACE_OAUTH, VERCEL_OAUTH, V_MWARE_SAML, XERO_OAUTH].freeze end end end diff --git a/lib/workos/types/connection_type.rb b/lib/workos/types/connection_type.rb index 70913924..0789fd56 100644 --- a/lib/workos/types/connection_type.rb +++ b/lib/workos/types/connection_type.rb @@ -18,7 +18,6 @@ class ConnectionType CLEVER_OIDC = "CleverOIDC" CLOUDFLARE_SAML = "CloudflareSAML" CYBER_ARK_SAML = "CyberArkSAML" - DISCORD_OAUTH = "DiscordOAuth" DUO_SAML = "DuoSAML" ENTRA_ID_OIDC = "EntraIdOIDC" GENERIC_OIDC = "GenericOIDC" @@ -28,8 +27,6 @@ class ConnectionType GOOGLE_OAUTH = "GoogleOAuth" GOOGLE_OIDC = "GoogleOIDC" GOOGLE_SAML = "GoogleSAML" - GROK_OAUTH = "GrokOAuth" - XO_AUTH = "XOAuth" INTUIT_OAUTH = "IntuitOAuth" JUMP_CLOUD_SAML = "JumpCloudSAML" KEYCLOAK_SAML = "KeycloakSAML" @@ -58,7 +55,7 @@ class ConnectionType VERCEL_OAUTH = "VercelOAuth" V_MWARE_SAML = "VMwareSAML" XERO_OAUTH = "XeroOAuth" - ALL = [PENDING, ADFSSAML, ADP_OIDC, APPLE_OAUTH, AUTH_0_MIGRATION, AUTH_0_SAML, AZURE_SAML, BITBUCKET_OAUTH, CAS_SAML, CLASS_LINK_SAML, CLEVER_OIDC, CLOUDFLARE_SAML, CYBER_ARK_SAML, DISCORD_OAUTH, DUO_SAML, ENTRA_ID_OIDC, GENERIC_OIDC, GENERIC_SAML, GIT_HUB_OAUTH, GIT_LAB_OAUTH, GOOGLE_OAUTH, GOOGLE_OIDC, GOOGLE_SAML, GROK_OAUTH, XO_AUTH, INTUIT_OAUTH, JUMP_CLOUD_SAML, KEYCLOAK_SAML, LAST_PASS_SAML, LINKED_IN_OAUTH, LOGIN_GOV_OIDC, MAGIC_LINK, MICROSOFT_OAUTH, MINI_ORANGE_SAML, NET_IQ_SAML, OKTA_OIDC, OKTA_SAML, ONE_LOGIN_SAML, ORACLE_SAML, PING_FEDERATE_SAML, PING_ONE_SAML, RIPPLING_SAML, SALESFORCE_SAML, SHIBBOLETH_GENERIC_SAML, SHIBBOLETH_SAML, SIMPLE_SAML_PHP_SAML, SALESFORCE_OAUTH, SLACK_OAUTH, TEST_IDP, VERCEL_MARKETPLACE_OAUTH, VERCEL_OAUTH, V_MWARE_SAML, XERO_OAUTH].freeze + ALL = [PENDING, ADFSSAML, ADP_OIDC, APPLE_OAUTH, AUTH_0_MIGRATION, AUTH_0_SAML, AZURE_SAML, BITBUCKET_OAUTH, CAS_SAML, CLASS_LINK_SAML, CLEVER_OIDC, CLOUDFLARE_SAML, CYBER_ARK_SAML, DUO_SAML, ENTRA_ID_OIDC, GENERIC_OIDC, GENERIC_SAML, GIT_HUB_OAUTH, GIT_LAB_OAUTH, GOOGLE_OAUTH, GOOGLE_OIDC, GOOGLE_SAML, INTUIT_OAUTH, JUMP_CLOUD_SAML, KEYCLOAK_SAML, LAST_PASS_SAML, LINKED_IN_OAUTH, LOGIN_GOV_OIDC, MAGIC_LINK, MICROSOFT_OAUTH, MINI_ORANGE_SAML, NET_IQ_SAML, OKTA_OIDC, OKTA_SAML, ONE_LOGIN_SAML, ORACLE_SAML, PING_FEDERATE_SAML, PING_ONE_SAML, RIPPLING_SAML, SALESFORCE_SAML, SHIBBOLETH_GENERIC_SAML, SHIBBOLETH_SAML, SIMPLE_SAML_PHP_SAML, SALESFORCE_OAUTH, SLACK_OAUTH, TEST_IDP, VERCEL_MARKETPLACE_OAUTH, VERCEL_OAUTH, V_MWARE_SAML, XERO_OAUTH].freeze end end end diff --git a/lib/workos/types/connections_connection_type.rb b/lib/workos/types/connections_connection_type.rb index 0f787505..f462544b 100644 --- a/lib/workos/types/connections_connection_type.rb +++ b/lib/workos/types/connections_connection_type.rb @@ -16,7 +16,6 @@ class ConnectionsConnectionType CLASS_LINK_SAML = "ClassLinkSAML" CLEVER_OIDC = "CleverOIDC" CYBER_ARK_SAML = "CyberArkSAML" - DISCORD_OAUTH = "DiscordOAuth" DUO_SAML = "DuoSAML" ENTRA_ID_OIDC = "EntraIdOIDC" GENERIC_OIDC = "GenericOIDC" @@ -26,8 +25,6 @@ class ConnectionsConnectionType GOOGLE_OAUTH = "GoogleOAuth" GOOGLE_OIDC = "GoogleOIDC" GOOGLE_SAML = "GoogleSAML" - GROK_OAUTH = "GrokOAuth" - XO_AUTH = "XOAuth" INTUIT_OAUTH = "IntuitOAuth" JUMP_CLOUD_SAML = "JumpCloudSAML" KEYCLOAK_SAML = "KeycloakSAML" @@ -55,7 +52,7 @@ class ConnectionsConnectionType VERCEL_OAUTH = "VercelOAuth" V_MWARE_SAML = "VMwareSAML" XERO_OAUTH = "XeroOAuth" - ALL = [ADFSSAML, ADP_OIDC, APPLE_OAUTH, AUTH_0_SAML, AZURE_SAML, BITBUCKET_OAUTH, CAS_SAML, CLOUDFLARE_SAML, CLASS_LINK_SAML, CLEVER_OIDC, CYBER_ARK_SAML, DISCORD_OAUTH, DUO_SAML, ENTRA_ID_OIDC, GENERIC_OIDC, GENERIC_SAML, GITHUB_OAUTH, GIT_LAB_OAUTH, GOOGLE_OAUTH, GOOGLE_OIDC, GOOGLE_SAML, GROK_OAUTH, XO_AUTH, INTUIT_OAUTH, JUMP_CLOUD_SAML, KEYCLOAK_SAML, LAST_PASS_SAML, LINKED_IN_OAUTH, LOGIN_GOV_OIDC, MAGIC_LINK, MICROSOFT_OAUTH, MINI_ORANGE_SAML, NET_IQ_SAML, OKTA_OIDC, OKTA_SAML, ONE_LOGIN_SAML, ORACLE_SAML, PING_FEDERATE_SAML, PING_ONE_SAML, RIPPLING_SAML, SALESFORCE_SAML, SHIBBOLETH_GENERIC_SAML, SHIBBOLETH_SAML, SIMPLE_SAML_PHP_SAML, SALESFORCE_OAUTH, SLACK_OAUTH, VERCEL_MARKETPLACE_OAUTH, VERCEL_OAUTH, V_MWARE_SAML, XERO_OAUTH].freeze + ALL = [ADFSSAML, ADP_OIDC, APPLE_OAUTH, AUTH_0_SAML, AZURE_SAML, BITBUCKET_OAUTH, CAS_SAML, CLOUDFLARE_SAML, CLASS_LINK_SAML, CLEVER_OIDC, CYBER_ARK_SAML, DUO_SAML, ENTRA_ID_OIDC, GENERIC_OIDC, GENERIC_SAML, GITHUB_OAUTH, GIT_LAB_OAUTH, GOOGLE_OAUTH, GOOGLE_OIDC, GOOGLE_SAML, INTUIT_OAUTH, JUMP_CLOUD_SAML, KEYCLOAK_SAML, LAST_PASS_SAML, LINKED_IN_OAUTH, LOGIN_GOV_OIDC, MAGIC_LINK, MICROSOFT_OAUTH, MINI_ORANGE_SAML, NET_IQ_SAML, OKTA_OIDC, OKTA_SAML, ONE_LOGIN_SAML, ORACLE_SAML, PING_FEDERATE_SAML, PING_ONE_SAML, RIPPLING_SAML, SALESFORCE_SAML, SHIBBOLETH_GENERIC_SAML, SHIBBOLETH_SAML, SIMPLE_SAML_PHP_SAML, SALESFORCE_OAUTH, SLACK_OAUTH, VERCEL_MARKETPLACE_OAUTH, VERCEL_OAUTH, V_MWARE_SAML, XERO_OAUTH].freeze end end end diff --git a/lib/workos/types/create_connection_oidc_options_id_token_signature_algorithm.rb b/lib/workos/types/create_connection_oidc_options_id_token_signature_algorithm.rb new file mode 100644 index 00000000..1a3e0bf2 --- /dev/null +++ b/lib/workos/types/create_connection_oidc_options_id_token_signature_algorithm.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + module Types + class CreateConnectionOIDCOptionsIdTokenSignatureAlgorithm + ES_256 = "ES256" + ES_384 = "ES384" + ES_512 = "ES512" + ED_DSA = "EdDSA" + HS_256 = "HS256" + HS_384 = "HS384" + HS_512 = "HS512" + PS_256 = "PS256" + PS_384 = "PS384" + PS_512 = "PS512" + RS_256 = "RS256" + RS_384 = "RS384" + RS_512 = "RS512" + ALL = [ES_256, ES_384, ES_512, ED_DSA, HS_256, HS_384, HS_512, PS_256, PS_384, PS_512, RS_256, RS_384, RS_512].freeze + end + end +end diff --git a/lib/workos/types/create_connection_oidc_options_token_authentication_method.rb b/lib/workos/types/create_connection_oidc_options_token_authentication_method.rb new file mode 100644 index 00000000..c5cc5c03 --- /dev/null +++ b/lib/workos/types/create_connection_oidc_options_token_authentication_method.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + module Types + class CreateConnectionOIDCOptionsTokenAuthenticationMethod + CLIENT_SECRET_POST = "client_secret_post" + CLIENT_SECRET_BASIC = "client_secret_basic" + PRIVATE_KEY_JWT = "private_key_jwt" + ALL = [CLIENT_SECRET_POST, CLIENT_SECRET_BASIC, PRIVATE_KEY_JWT].freeze + end + end +end diff --git a/lib/workos/types/create_webhook_endpoint_events.rb b/lib/workos/types/create_webhook_endpoint_events.rb index 5e88a8cf..d2a661c9 100644 --- a/lib/workos/types/create_webhook_endpoint_events.rb +++ b/lib/workos/types/create_webhook_endpoint_events.rb @@ -5,6 +5,13 @@ module WorkOS module Types class CreateWebhookEndpointEvents + AGENT_BLUEPRINT_CREATED = "agent.blueprint.created" + AGENT_BLUEPRINT_DELETED = "agent.blueprint.deleted" + AGENT_BLUEPRINT_UPDATED = "agent.blueprint.updated" + AGENT_INSTANCE_CREATED = "agent.instance.created" + AGENT_INSTANCE_DELETED = "agent.instance.deleted" + AGENT_INSTANCE_SESSION_CREATED = "agent.instance.session.created" + AGENT_INSTANCE_SESSION_REVOKED = "agent.instance.session.revoked" AGENT_REGISTRATION_CREATED = "agent.registration.created" AGENT_REGISTRATION_CLAIM_ATTEMPT_CREATED = "agent.registration.claim.attempt.created" AGENT_REGISTRATION_CLAIM_COMPLETED = "agent.registration.claim.completed" @@ -98,7 +105,7 @@ class CreateWebhookEndpointEvents WAITLIST_USER_APPROVED = "waitlist_user.approved" WAITLIST_USER_CREATED = "waitlist_user.created" WAITLIST_USER_DENIED = "waitlist_user.denied" - ALL = [AGENT_REGISTRATION_CREATED, AGENT_REGISTRATION_CLAIM_ATTEMPT_CREATED, AGENT_REGISTRATION_CLAIM_COMPLETED, AGENT_REGISTRATION_CREDENTIAL_ISSUED, AGENT_REGISTRATION_DELETED, AGENT_REGISTRATION_REFRESHED, AGENT_REGISTRATION_EXPIRED, AGENT_REGISTRATION_ORGANIZATION_SWITCHED, AGENT_REGISTRATION_REVOKED, AUTHENTICATION_EMAIL_VERIFICATION_SUCCEEDED, AUTHENTICATION_MAGIC_AUTH_FAILED, AUTHENTICATION_MAGIC_AUTH_SUCCEEDED, AUTHENTICATION_MFA_SUCCEEDED, AUTHENTICATION_OAUTH_FAILED, AUTHENTICATION_OAUTH_SUCCEEDED, AUTHENTICATION_PASSWORD_FAILED, AUTHENTICATION_PASSWORD_SUCCEEDED, AUTHENTICATION_PASSKEY_FAILED, AUTHENTICATION_PASSKEY_SUCCEEDED, AUTHENTICATION_SSO_FAILED, AUTHENTICATION_SSO_STARTED, AUTHENTICATION_SSO_SUCCEEDED, AUTHENTICATION_SSO_TIMED_OUT, RADAR_CHALLENGE_CREATED, AUTHENTICATION_RADAR_RISK_DETECTED, AUTHENTICATION_REAUTHENTICATION_SUCCEEDED, API_KEY_CREATED, API_KEY_REVOKED, API_KEY_UPDATED, CONNECTION_ACTIVATED, CONNECTION_DEACTIVATED, CONNECTION_SAML_CERTIFICATE_RENEWAL_REQUIRED, CONNECTION_SAML_CERTIFICATE_RENEWED, CONNECTION_DELETED, DSYNC_ACTIVATED, DSYNC_DELETED, DSYNC_GROUP_CREATED, DSYNC_GROUP_DELETED, DSYNC_GROUP_UPDATED, DSYNC_GROUP_USER_ADDED, DSYNC_GROUP_USER_REMOVED, DSYNC_USER_CREATED, DSYNC_USER_DELETED, DSYNC_USER_UPDATED, EMAIL_VERIFICATION_CREATED, GROUP_CREATED, GROUP_DELETED, GROUP_MEMBER_ADDED, GROUP_MEMBER_REMOVED, GROUP_UPDATED, FLAG_CREATED, FLAG_DELETED, FLAG_UPDATED, FLAG_RULE_UPDATED, INVITATION_ACCEPTED, INVITATION_CREATED, INVITATION_RESENT, INVITATION_REVOKED, MAGIC_AUTH_CREATED, ORGANIZATION_CREATED, ORGANIZATION_DELETED, ORGANIZATION_UPDATED, ORGANIZATION_DOMAIN_CREATED, ORGANIZATION_DOMAIN_DELETED, ORGANIZATION_DOMAIN_UPDATED, ORGANIZATION_DOMAIN_VERIFIED, ORGANIZATION_DOMAIN_VERIFICATION_FAILED, PASSWORD_RESET_CREATED, PASSWORD_RESET_SUCCEEDED, USER_CREATED, USER_UPDATED, USER_DELETED, ORGANIZATION_MEMBERSHIP_CREATED, ORGANIZATION_MEMBERSHIP_DELETED, ORGANIZATION_MEMBERSHIP_UPDATED, ROLE_CREATED, ROLE_DELETED, ROLE_UPDATED, ORGANIZATION_ROLE_CREATED, ORGANIZATION_ROLE_DELETED, ORGANIZATION_ROLE_UPDATED, PERMISSION_CREATED, PERMISSION_DELETED, PERMISSION_UPDATED, PIPES_CONNECTED_ACCOUNT_CONNECTED, PIPES_CONNECTED_ACCOUNT_CONNECTION_FAILED, PIPES_CONNECTED_ACCOUNT_DISCONNECTED, PIPES_CONNECTED_ACCOUNT_REAUTHORIZATION_NEEDED, SESSION_CREATED, SESSION_REVOKED, WAITLIST_USER_APPROVED, WAITLIST_USER_CREATED, WAITLIST_USER_DENIED].freeze + ALL = [AGENT_BLUEPRINT_CREATED, AGENT_BLUEPRINT_DELETED, AGENT_BLUEPRINT_UPDATED, AGENT_INSTANCE_CREATED, AGENT_INSTANCE_DELETED, AGENT_INSTANCE_SESSION_CREATED, AGENT_INSTANCE_SESSION_REVOKED, AGENT_REGISTRATION_CREATED, AGENT_REGISTRATION_CLAIM_ATTEMPT_CREATED, AGENT_REGISTRATION_CLAIM_COMPLETED, AGENT_REGISTRATION_CREDENTIAL_ISSUED, AGENT_REGISTRATION_DELETED, AGENT_REGISTRATION_REFRESHED, AGENT_REGISTRATION_EXPIRED, AGENT_REGISTRATION_ORGANIZATION_SWITCHED, AGENT_REGISTRATION_REVOKED, AUTHENTICATION_EMAIL_VERIFICATION_SUCCEEDED, AUTHENTICATION_MAGIC_AUTH_FAILED, AUTHENTICATION_MAGIC_AUTH_SUCCEEDED, AUTHENTICATION_MFA_SUCCEEDED, AUTHENTICATION_OAUTH_FAILED, AUTHENTICATION_OAUTH_SUCCEEDED, AUTHENTICATION_PASSWORD_FAILED, AUTHENTICATION_PASSWORD_SUCCEEDED, AUTHENTICATION_PASSKEY_FAILED, AUTHENTICATION_PASSKEY_SUCCEEDED, AUTHENTICATION_SSO_FAILED, AUTHENTICATION_SSO_STARTED, AUTHENTICATION_SSO_SUCCEEDED, AUTHENTICATION_SSO_TIMED_OUT, RADAR_CHALLENGE_CREATED, AUTHENTICATION_RADAR_RISK_DETECTED, AUTHENTICATION_REAUTHENTICATION_SUCCEEDED, API_KEY_CREATED, API_KEY_REVOKED, API_KEY_UPDATED, CONNECTION_ACTIVATED, CONNECTION_DEACTIVATED, CONNECTION_SAML_CERTIFICATE_RENEWAL_REQUIRED, CONNECTION_SAML_CERTIFICATE_RENEWED, CONNECTION_DELETED, DSYNC_ACTIVATED, DSYNC_DELETED, DSYNC_GROUP_CREATED, DSYNC_GROUP_DELETED, DSYNC_GROUP_UPDATED, DSYNC_GROUP_USER_ADDED, DSYNC_GROUP_USER_REMOVED, DSYNC_USER_CREATED, DSYNC_USER_DELETED, DSYNC_USER_UPDATED, EMAIL_VERIFICATION_CREATED, GROUP_CREATED, GROUP_DELETED, GROUP_MEMBER_ADDED, GROUP_MEMBER_REMOVED, GROUP_UPDATED, FLAG_CREATED, FLAG_DELETED, FLAG_UPDATED, FLAG_RULE_UPDATED, INVITATION_ACCEPTED, INVITATION_CREATED, INVITATION_RESENT, INVITATION_REVOKED, MAGIC_AUTH_CREATED, ORGANIZATION_CREATED, ORGANIZATION_DELETED, ORGANIZATION_UPDATED, ORGANIZATION_DOMAIN_CREATED, ORGANIZATION_DOMAIN_DELETED, ORGANIZATION_DOMAIN_UPDATED, ORGANIZATION_DOMAIN_VERIFIED, ORGANIZATION_DOMAIN_VERIFICATION_FAILED, PASSWORD_RESET_CREATED, PASSWORD_RESET_SUCCEEDED, USER_CREATED, USER_UPDATED, USER_DELETED, ORGANIZATION_MEMBERSHIP_CREATED, ORGANIZATION_MEMBERSHIP_DELETED, ORGANIZATION_MEMBERSHIP_UPDATED, ROLE_CREATED, ROLE_DELETED, ROLE_UPDATED, ORGANIZATION_ROLE_CREATED, ORGANIZATION_ROLE_DELETED, ORGANIZATION_ROLE_UPDATED, PERMISSION_CREATED, PERMISSION_DELETED, PERMISSION_UPDATED, PIPES_CONNECTED_ACCOUNT_CONNECTED, PIPES_CONNECTED_ACCOUNT_CONNECTION_FAILED, PIPES_CONNECTED_ACCOUNT_DISCONNECTED, PIPES_CONNECTED_ACCOUNT_REAUTHORIZATION_NEEDED, SESSION_CREATED, SESSION_REVOKED, WAITLIST_USER_APPROVED, WAITLIST_USER_CREATED, WAITLIST_USER_DENIED].freeze end end end diff --git a/lib/workos/types/invite_it_contact_intents.rb b/lib/workos/types/invite_it_contact_intents.rb new file mode 100644 index 00000000..2999e032 --- /dev/null +++ b/lib/workos/types/invite_it_contact_intents.rb @@ -0,0 +1,16 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + module Types + class InviteItContactIntents + SSO = "sso" + DIRECTORY_SYNC = "directory_sync" + LOG_STREAMS = "log_streams" + DOMAIN_VERIFICATION = "domain_verification" + BRING_YOUR_OWN_KEY = "bring_your_own_key" + ALL = [SSO, DIRECTORY_SYNC, LOG_STREAMS, DOMAIN_VERIFICATION, BRING_YOUR_OWN_KEY].freeze + end + end +end diff --git a/lib/workos/types/patch_connection_oidc_options_id_token_signature_algorithm.rb b/lib/workos/types/patch_connection_oidc_options_id_token_signature_algorithm.rb new file mode 100644 index 00000000..14bfc043 --- /dev/null +++ b/lib/workos/types/patch_connection_oidc_options_id_token_signature_algorithm.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + module Types + PatchConnectionOIDCOptionsIdTokenSignatureAlgorithm = CreateConnectionOIDCOptionsIdTokenSignatureAlgorithm + end +end diff --git a/lib/workos/types/patch_connection_oidc_options_token_authentication_method.rb b/lib/workos/types/patch_connection_oidc_options_token_authentication_method.rb new file mode 100644 index 00000000..aa93ef23 --- /dev/null +++ b/lib/workos/types/patch_connection_oidc_options_token_authentication_method.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + module Types + PatchConnectionOIDCOptionsTokenAuthenticationMethod = CreateConnectionOIDCOptionsTokenAuthenticationMethod + end +end diff --git a/lib/workos/types/resource_export_completed_data_resource_type.rb b/lib/workos/types/resource_export_completed_data_resource_type.rb new file mode 100644 index 00000000..1c20cf06 --- /dev/null +++ b/lib/workos/types/resource_export_completed_data_resource_type.rb @@ -0,0 +1,16 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + module Types + class ResourceExportCompletedDataResourceType + USERS = "users" + ORGANIZATIONS = "organizations" + EVENTS = "events" + SESSIONS = "sessions" + AUDIT_LOG_EVENTS = "auditLogEvents" + ALL = [USERS, ORGANIZATIONS, EVENTS, SESSIONS, AUDIT_LOG_EVENTS].freeze + end + end +end diff --git a/lib/workos/types/resource_export_created_data_resource_type.rb b/lib/workos/types/resource_export_created_data_resource_type.rb new file mode 100644 index 00000000..826d69d0 --- /dev/null +++ b/lib/workos/types/resource_export_created_data_resource_type.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + module Types + ResourceExportCreatedDataResourceType = ResourceExportCompletedDataResourceType + end +end diff --git a/lib/workos/types/resource_export_downloaded_data_resource_type.rb b/lib/workos/types/resource_export_downloaded_data_resource_type.rb new file mode 100644 index 00000000..5a336f4f --- /dev/null +++ b/lib/workos/types/resource_export_downloaded_data_resource_type.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + module Types + ResourceExportDownloadedDataResourceType = ResourceExportCompletedDataResourceType + end +end diff --git a/lib/workos/types/resource_export_failed_data_resource_type.rb b/lib/workos/types/resource_export_failed_data_resource_type.rb new file mode 100644 index 00000000..0b56d124 --- /dev/null +++ b/lib/workos/types/resource_export_failed_data_resource_type.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + module Types + ResourceExportFailedDataResourceType = ResourceExportCompletedDataResourceType + end +end diff --git a/lib/workos/types/session_created_data_status.rb b/lib/workos/types/session_created_data_status.rb index 61e58218..12be75bb 100644 --- a/lib/workos/types/session_created_data_status.rb +++ b/lib/workos/types/session_created_data_status.rb @@ -4,11 +4,6 @@ module WorkOS module Types - class SessionCreatedDataStatus - ACTIVE = "active" - EXPIRED = "expired" - REVOKED = "revoked" - ALL = [ACTIVE, EXPIRED, REVOKED].freeze - end + SessionCreatedDataStatus = AgentInstanceSessionStatus end end diff --git a/lib/workos/types/session_revoked_data_status.rb b/lib/workos/types/session_revoked_data_status.rb index b9e1d357..bf68d9cd 100644 --- a/lib/workos/types/session_revoked_data_status.rb +++ b/lib/workos/types/session_revoked_data_status.rb @@ -4,6 +4,6 @@ module WorkOS module Types - SessionRevokedDataStatus = SessionCreatedDataStatus + SessionRevokedDataStatus = AgentInstanceSessionStatus end end diff --git a/lib/workos/types/sso_grant_type.rb b/lib/workos/types/sso_grant_type.rb new file mode 100644 index 00000000..27b13b41 --- /dev/null +++ b/lib/workos/types/sso_grant_type.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + module Types + class SSOGrantType + AUTHORIZATION_CODE = "authorization_code" + URN_IETF_PARAMS_OAUTH_GRANT_TYPE_TOKEN_EXCHANGE = "urn:ietf:params:oauth:grant-type:token-exchange" + ALL = [AUTHORIZATION_CODE, URN_IETF_PARAMS_OAUTH_GRANT_TYPE_TOKEN_EXCHANGE].freeze + end + end +end diff --git a/lib/workos/types/team_production_state.rb b/lib/workos/types/team_production_state.rb new file mode 100644 index 00000000..042a83ce --- /dev/null +++ b/lib/workos/types/team_production_state.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + module Types + class TeamProductionState + ACTIVE = "Active" + INACTIVE = "Inactive" + SUSPENDED = "Suspended" + DELETING = "Deleting" + ALL = [ACTIVE, INACTIVE, SUSPENDED, DELETING].freeze + end + end +end diff --git a/lib/workos/types/token_query_grant_type.rb b/lib/workos/types/token_query_grant_type.rb new file mode 100644 index 00000000..7a321122 --- /dev/null +++ b/lib/workos/types/token_query_grant_type.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + module Types + TokenQueryGrantType = SSOGrantType + end +end diff --git a/lib/workos/types/user_identities_get_item_provider.rb b/lib/workos/types/user_identities_get_item_provider.rb index bdac2e79..88c3dc96 100644 --- a/lib/workos/types/user_identities_get_item_provider.rb +++ b/lib/workos/types/user_identities_get_item_provider.rb @@ -7,12 +7,9 @@ module Types class UserIdentitiesGetItemProvider APPLE_OAUTH = "AppleOAuth" BITBUCKET_OAUTH = "BitbucketOAuth" - DISCORD_OAUTH = "DiscordOAuth" GITHUB_OAUTH = "GithubOAuth" GIT_LAB_OAUTH = "GitLabOAuth" GOOGLE_OAUTH = "GoogleOAuth" - GROK_OAUTH = "GrokOAuth" - XO_AUTH = "XOAuth" INTUIT_OAUTH = "IntuitOAuth" LINKED_IN_OAUTH = "LinkedInOAuth" MICROSOFT_OAUTH = "MicrosoftOAuth" @@ -21,7 +18,7 @@ class UserIdentitiesGetItemProvider VERCEL_MARKETPLACE_OAUTH = "VercelMarketplaceOAuth" VERCEL_OAUTH = "VercelOAuth" XERO_OAUTH = "XeroOAuth" - ALL = [APPLE_OAUTH, BITBUCKET_OAUTH, DISCORD_OAUTH, GITHUB_OAUTH, GIT_LAB_OAUTH, GOOGLE_OAUTH, GROK_OAUTH, XO_AUTH, INTUIT_OAUTH, LINKED_IN_OAUTH, MICROSOFT_OAUTH, SALESFORCE_OAUTH, SLACK_OAUTH, VERCEL_MARKETPLACE_OAUTH, VERCEL_OAUTH, XERO_OAUTH].freeze + ALL = [APPLE_OAUTH, BITBUCKET_OAUTH, GITHUB_OAUTH, GIT_LAB_OAUTH, GOOGLE_OAUTH, INTUIT_OAUTH, LINKED_IN_OAUTH, MICROSOFT_OAUTH, SALESFORCE_OAUTH, SLACK_OAUTH, VERCEL_MARKETPLACE_OAUTH, VERCEL_OAUTH, XERO_OAUTH].freeze end end end diff --git a/lib/workos/types/user_sessions_status.rb b/lib/workos/types/user_sessions_status.rb index 0d7e0642..5ec0a9a4 100644 --- a/lib/workos/types/user_sessions_status.rb +++ b/lib/workos/types/user_sessions_status.rb @@ -4,6 +4,6 @@ module WorkOS module Types - UserSessionsStatus = SessionCreatedDataStatus + UserSessionsStatus = AgentInstanceSessionStatus end end diff --git a/lib/workos/types/waitlist_entry_state.rb b/lib/workos/types/waitlist_entry_state.rb new file mode 100644 index 00000000..c012dcb3 --- /dev/null +++ b/lib/workos/types/waitlist_entry_state.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + module Types + WaitlistEntryState = UserManagementWaitlistsState + end +end diff --git a/lib/workos/types/waitlist_user_state.rb b/lib/workos/types/waitlist_user_state.rb index ac6e2501..9f905f31 100644 --- a/lib/workos/types/waitlist_user_state.rb +++ b/lib/workos/types/waitlist_user_state.rb @@ -4,11 +4,6 @@ module WorkOS module Types - class WaitlistUserState - PENDING = "pending" - APPROVED = "approved" - DENIED = "denied" - ALL = [PENDING, APPROVED, DENIED].freeze - end + WaitlistUserState = UserManagementWaitlistsState end end diff --git a/rbi/workos/agent_blueprint.rbi b/rbi/workos/agent_blueprint.rbi new file mode 100644 index 00000000..5c0acbc8 --- /dev/null +++ b/rbi/workos/agent_blueprint.rbi @@ -0,0 +1,72 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class AgentBlueprint + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(String) } + def object; end + + sig { params(value: String).returns(String) } + def object=(value); end + + sig { returns(String) } + def id; end + + sig { params(value: String).returns(String) } + def id=(value); end + + sig { returns(String) } + def name; end + + sig { params(value: String).returns(String) } + def name=(value); end + + sig { returns(T.nilable(String)) } + def description; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def description=(value); end + + sig { returns(T::Array[String]) } + def permissions; end + + sig { params(value: T::Array[String]).returns(T::Array[String]) } + def permissions=(value); end + + sig { returns(WorkOS::AgentBlueprintInvocableBy) } + def invocable_by; end + + sig { params(value: WorkOS::AgentBlueprintInvocableBy).returns(WorkOS::AgentBlueprintInvocableBy) } + def invocable_by=(value); end + + sig { returns(WorkOS::AgentBlueprintSessionSetting) } + def session_settings; end + + sig { params(value: WorkOS::AgentBlueprintSessionSetting).returns(WorkOS::AgentBlueprintSessionSetting) } + def session_settings=(value); end + + sig { returns(String) } + def created_at; end + + sig { params(value: String).returns(String) } + def created_at=(value); end + + sig { returns(String) } + def updated_at; end + + sig { params(value: String).returns(String) } + def updated_at=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/agent_blueprint_created.rbi b/rbi/workos/agent_blueprint_created.rbi new file mode 100644 index 00000000..8d2a6733 --- /dev/null +++ b/rbi/workos/agent_blueprint_created.rbi @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class AgentBlueprintCreated + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(String) } + def object; end + + sig { params(value: String).returns(String) } + def object=(value); end + + sig { returns(String) } + def id; end + + sig { params(value: String).returns(String) } + def id=(value); end + + sig { returns(String) } + def event; end + + sig { params(value: String).returns(String) } + def event=(value); end + + sig { returns(WorkOS::AgentBlueprintCreatedData) } + def data; end + + sig { params(value: WorkOS::AgentBlueprintCreatedData).returns(WorkOS::AgentBlueprintCreatedData) } + def data=(value); end + + sig { returns(String) } + def created_at; end + + sig { params(value: String).returns(String) } + def created_at=(value); end + + sig { returns(T.nilable(WorkOS::EventContext)) } + def context; end + + sig { params(value: T.nilable(WorkOS::EventContext)).returns(T.nilable(WorkOS::EventContext)) } + def context=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/agent_blueprint_created_data.rbi b/rbi/workos/agent_blueprint_created_data.rbi new file mode 100644 index 00000000..4f57caab --- /dev/null +++ b/rbi/workos/agent_blueprint_created_data.rbi @@ -0,0 +1,72 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class AgentBlueprintCreatedData + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(String) } + def object; end + + sig { params(value: String).returns(String) } + def object=(value); end + + sig { returns(String) } + def id; end + + sig { params(value: String).returns(String) } + def id=(value); end + + sig { returns(String) } + def name; end + + sig { params(value: String).returns(String) } + def name=(value); end + + sig { returns(T.nilable(String)) } + def description; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def description=(value); end + + sig { returns(T::Array[String]) } + def permissions; end + + sig { params(value: T::Array[String]).returns(T::Array[String]) } + def permissions=(value); end + + sig { returns(WorkOS::AgentBlueprintCreatedDataInvocableBy) } + def invocable_by; end + + sig { params(value: WorkOS::AgentBlueprintCreatedDataInvocableBy).returns(WorkOS::AgentBlueprintCreatedDataInvocableBy) } + def invocable_by=(value); end + + sig { returns(WorkOS::AgentBlueprintCreatedDataSessionSetting) } + def session_settings; end + + sig { params(value: WorkOS::AgentBlueprintCreatedDataSessionSetting).returns(WorkOS::AgentBlueprintCreatedDataSessionSetting) } + def session_settings=(value); end + + sig { returns(String) } + def created_at; end + + sig { params(value: String).returns(String) } + def created_at=(value); end + + sig { returns(String) } + def updated_at; end + + sig { params(value: String).returns(String) } + def updated_at=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/agent_blueprint_created_data_invocable_by.rbi b/rbi/workos/agent_blueprint_created_data_invocable_by.rbi new file mode 100644 index 00000000..6366a5d0 --- /dev/null +++ b/rbi/workos/agent_blueprint_created_data_invocable_by.rbi @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class AgentBlueprintCreatedDataInvocableBy + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(T::Array[String]) } + def role_slugs; end + + sig { params(value: T::Array[String]).returns(T::Array[String]) } + def role_slugs=(value); end + + sig { returns(T::Array[String]) } + def organization_ids; end + + sig { params(value: T::Array[String]).returns(T::Array[String]) } + def organization_ids=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/agent_blueprint_created_data_session_setting.rbi b/rbi/workos/agent_blueprint_created_data_session_setting.rbi new file mode 100644 index 00000000..48a9a1cb --- /dev/null +++ b/rbi/workos/agent_blueprint_created_data_session_setting.rbi @@ -0,0 +1,36 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class AgentBlueprintCreatedDataSessionSetting + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(Float) } + def max_age_seconds; end + + sig { params(value: Float).returns(Float) } + def max_age_seconds=(value); end + + sig { returns(Float) } + def access_token_ttl_seconds; end + + sig { params(value: Float).returns(Float) } + def access_token_ttl_seconds=(value); end + + sig { returns(Float) } + def refresh_token_ttl_seconds; end + + sig { params(value: Float).returns(Float) } + def refresh_token_ttl_seconds=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/agent_blueprint_deleted.rbi b/rbi/workos/agent_blueprint_deleted.rbi new file mode 100644 index 00000000..de50fe5b --- /dev/null +++ b/rbi/workos/agent_blueprint_deleted.rbi @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class AgentBlueprintDeleted + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(String) } + def object; end + + sig { params(value: String).returns(String) } + def object=(value); end + + sig { returns(String) } + def id; end + + sig { params(value: String).returns(String) } + def id=(value); end + + sig { returns(String) } + def event; end + + sig { params(value: String).returns(String) } + def event=(value); end + + sig { returns(WorkOS::AgentBlueprintDeletedData) } + def data; end + + sig { params(value: WorkOS::AgentBlueprintDeletedData).returns(WorkOS::AgentBlueprintDeletedData) } + def data=(value); end + + sig { returns(String) } + def created_at; end + + sig { params(value: String).returns(String) } + def created_at=(value); end + + sig { returns(T.nilable(WorkOS::EventContext)) } + def context; end + + sig { params(value: T.nilable(WorkOS::EventContext)).returns(T.nilable(WorkOS::EventContext)) } + def context=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/agent_blueprint_deleted_data.rbi b/rbi/workos/agent_blueprint_deleted_data.rbi new file mode 100644 index 00000000..6943d367 --- /dev/null +++ b/rbi/workos/agent_blueprint_deleted_data.rbi @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class AgentBlueprintDeletedData + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(String) } + def object; end + + sig { params(value: String).returns(String) } + def object=(value); end + + sig { returns(String) } + def id; end + + sig { params(value: String).returns(String) } + def id=(value); end + + sig { returns(String) } + def name; end + + sig { params(value: String).returns(String) } + def name=(value); end + + sig { returns(String) } + def created_at; end + + sig { params(value: String).returns(String) } + def created_at=(value); end + + sig { returns(String) } + def updated_at; end + + sig { params(value: String).returns(String) } + def updated_at=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/agent_blueprint_invocable_by.rbi b/rbi/workos/agent_blueprint_invocable_by.rbi new file mode 100644 index 00000000..4066e262 --- /dev/null +++ b/rbi/workos/agent_blueprint_invocable_by.rbi @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class AgentBlueprintInvocableBy + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(T::Array[String]) } + def role_slugs; end + + sig { params(value: T::Array[String]).returns(T::Array[String]) } + def role_slugs=(value); end + + sig { returns(T::Array[String]) } + def organization_ids; end + + sig { params(value: T::Array[String]).returns(T::Array[String]) } + def organization_ids=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/agent_blueprint_session_setting.rbi b/rbi/workos/agent_blueprint_session_setting.rbi new file mode 100644 index 00000000..21303591 --- /dev/null +++ b/rbi/workos/agent_blueprint_session_setting.rbi @@ -0,0 +1,36 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class AgentBlueprintSessionSetting + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(Integer) } + def max_age_seconds; end + + sig { params(value: Integer).returns(Integer) } + def max_age_seconds=(value); end + + sig { returns(Integer) } + def access_token_ttl_seconds; end + + sig { params(value: Integer).returns(Integer) } + def access_token_ttl_seconds=(value); end + + sig { returns(Integer) } + def refresh_token_ttl_seconds; end + + sig { params(value: Integer).returns(Integer) } + def refresh_token_ttl_seconds=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/agent_blueprint_updated.rbi b/rbi/workos/agent_blueprint_updated.rbi new file mode 100644 index 00000000..5400319b --- /dev/null +++ b/rbi/workos/agent_blueprint_updated.rbi @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class AgentBlueprintUpdated + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(String) } + def object; end + + sig { params(value: String).returns(String) } + def object=(value); end + + sig { returns(String) } + def id; end + + sig { params(value: String).returns(String) } + def id=(value); end + + sig { returns(String) } + def event; end + + sig { params(value: String).returns(String) } + def event=(value); end + + sig { returns(WorkOS::AgentBlueprintUpdatedData) } + def data; end + + sig { params(value: WorkOS::AgentBlueprintUpdatedData).returns(WorkOS::AgentBlueprintUpdatedData) } + def data=(value); end + + sig { returns(String) } + def created_at; end + + sig { params(value: String).returns(String) } + def created_at=(value); end + + sig { returns(T.nilable(WorkOS::EventContext)) } + def context; end + + sig { params(value: T.nilable(WorkOS::EventContext)).returns(T.nilable(WorkOS::EventContext)) } + def context=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/agent_blueprint_updated_data.rbi b/rbi/workos/agent_blueprint_updated_data.rbi new file mode 100644 index 00000000..cd76a86a --- /dev/null +++ b/rbi/workos/agent_blueprint_updated_data.rbi @@ -0,0 +1,72 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class AgentBlueprintUpdatedData + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(String) } + def object; end + + sig { params(value: String).returns(String) } + def object=(value); end + + sig { returns(String) } + def id; end + + sig { params(value: String).returns(String) } + def id=(value); end + + sig { returns(String) } + def name; end + + sig { params(value: String).returns(String) } + def name=(value); end + + sig { returns(T.nilable(String)) } + def description; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def description=(value); end + + sig { returns(T::Array[String]) } + def permissions; end + + sig { params(value: T::Array[String]).returns(T::Array[String]) } + def permissions=(value); end + + sig { returns(WorkOS::AgentBlueprintUpdatedDataInvocableBy) } + def invocable_by; end + + sig { params(value: WorkOS::AgentBlueprintUpdatedDataInvocableBy).returns(WorkOS::AgentBlueprintUpdatedDataInvocableBy) } + def invocable_by=(value); end + + sig { returns(WorkOS::AgentBlueprintUpdatedDataSessionSetting) } + def session_settings; end + + sig { params(value: WorkOS::AgentBlueprintUpdatedDataSessionSetting).returns(WorkOS::AgentBlueprintUpdatedDataSessionSetting) } + def session_settings=(value); end + + sig { returns(String) } + def created_at; end + + sig { params(value: String).returns(String) } + def created_at=(value); end + + sig { returns(String) } + def updated_at; end + + sig { params(value: String).returns(String) } + def updated_at=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/agent_blueprint_updated_data_invocable_by.rbi b/rbi/workos/agent_blueprint_updated_data_invocable_by.rbi new file mode 100644 index 00000000..c08da552 --- /dev/null +++ b/rbi/workos/agent_blueprint_updated_data_invocable_by.rbi @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class AgentBlueprintUpdatedDataInvocableBy + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(T::Array[String]) } + def role_slugs; end + + sig { params(value: T::Array[String]).returns(T::Array[String]) } + def role_slugs=(value); end + + sig { returns(T::Array[String]) } + def organization_ids; end + + sig { params(value: T::Array[String]).returns(T::Array[String]) } + def organization_ids=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/agent_blueprint_updated_data_session_setting.rbi b/rbi/workos/agent_blueprint_updated_data_session_setting.rbi new file mode 100644 index 00000000..4a23f463 --- /dev/null +++ b/rbi/workos/agent_blueprint_updated_data_session_setting.rbi @@ -0,0 +1,36 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class AgentBlueprintUpdatedDataSessionSetting + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(Float) } + def max_age_seconds; end + + sig { params(value: Float).returns(Float) } + def max_age_seconds=(value); end + + sig { returns(Float) } + def access_token_ttl_seconds; end + + sig { params(value: Float).returns(Float) } + def access_token_ttl_seconds=(value); end + + sig { returns(Float) } + def refresh_token_ttl_seconds; end + + sig { params(value: Float).returns(Float) } + def refresh_token_ttl_seconds=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/agent_blueprints_create_request.rbi b/rbi/workos/agent_blueprints_create_request.rbi new file mode 100644 index 00000000..434e11ea --- /dev/null +++ b/rbi/workos/agent_blueprints_create_request.rbi @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class AgentBlueprintsCreateRequest + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(String) } + def name; end + + sig { params(value: String).returns(String) } + def name=(value); end + + sig { returns(T.nilable(String)) } + def description; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def description=(value); end + + sig { returns(T.nilable(T::Array[String])) } + def permissions; end + + sig { params(value: T.nilable(T::Array[String])).returns(T.nilable(T::Array[String])) } + def permissions=(value); end + + sig { returns(T.nilable(WorkOS::AgentBlueprintsCreateRequestInvocableBy)) } + def invocable_by; end + + sig { params(value: T.nilable(WorkOS::AgentBlueprintsCreateRequestInvocableBy)).returns(T.nilable(WorkOS::AgentBlueprintsCreateRequestInvocableBy)) } + def invocable_by=(value); end + + sig { returns(WorkOS::AgentBlueprintsCreateRequestSessionSetting) } + def session_settings; end + + sig { params(value: WorkOS::AgentBlueprintsCreateRequestSessionSetting).returns(WorkOS::AgentBlueprintsCreateRequestSessionSetting) } + def session_settings=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/agent_blueprints_create_request_invocable_by.rbi b/rbi/workos/agent_blueprints_create_request_invocable_by.rbi new file mode 100644 index 00000000..cfac1f7e --- /dev/null +++ b/rbi/workos/agent_blueprints_create_request_invocable_by.rbi @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class AgentBlueprintsCreateRequestInvocableBy + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(T.nilable(T::Array[String])) } + def role_slugs; end + + sig { params(value: T.nilable(T::Array[String])).returns(T.nilable(T::Array[String])) } + def role_slugs=(value); end + + sig { returns(T.nilable(T::Array[String])) } + def organization_ids; end + + sig { params(value: T.nilable(T::Array[String])).returns(T.nilable(T::Array[String])) } + def organization_ids=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/agent_blueprints_create_request_session_setting.rbi b/rbi/workos/agent_blueprints_create_request_session_setting.rbi new file mode 100644 index 00000000..d71502de --- /dev/null +++ b/rbi/workos/agent_blueprints_create_request_session_setting.rbi @@ -0,0 +1,36 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class AgentBlueprintsCreateRequestSessionSetting + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(Integer) } + def max_age_seconds; end + + sig { params(value: Integer).returns(Integer) } + def max_age_seconds=(value); end + + sig { returns(Integer) } + def access_token_ttl_seconds; end + + sig { params(value: Integer).returns(Integer) } + def access_token_ttl_seconds=(value); end + + sig { returns(Integer) } + def refresh_token_ttl_seconds; end + + sig { params(value: Integer).returns(Integer) } + def refresh_token_ttl_seconds=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/agent_blueprints_token_mint_token_request.rbi b/rbi/workos/agent_blueprints_token_mint_token_request.rbi new file mode 100644 index 00000000..1a2ee195 --- /dev/null +++ b/rbi/workos/agent_blueprints_token_mint_token_request.rbi @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class AgentBlueprintsTokenMintTokenRequest + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(String) } + def type; end + + sig { params(value: String).returns(String) } + def type=(value); end + + sig { returns(T.nilable(String)) } + def user_access_token; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def user_access_token=(value); end + + sig { returns(T.nilable(String)) } + def intent; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def intent=(value); end + + sig { returns(T.nilable(String)) } + def organization_id; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def organization_id=(value); end + + sig { returns(T.nilable(String)) } + def agent_access_token; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def agent_access_token=(value); end + + sig { returns(T.nilable(String)) } + def refresh_token; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def refresh_token=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/agent_blueprints_update_request.rbi b/rbi/workos/agent_blueprints_update_request.rbi new file mode 100644 index 00000000..c6b453b5 --- /dev/null +++ b/rbi/workos/agent_blueprints_update_request.rbi @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class AgentBlueprintsUpdateRequest + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(T.nilable(String)) } + def name; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def name=(value); end + + sig { returns(T.nilable(String)) } + def description; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def description=(value); end + + sig { returns(T.nilable(T::Array[String])) } + def permissions; end + + sig { params(value: T.nilable(T::Array[String])).returns(T.nilable(T::Array[String])) } + def permissions=(value); end + + sig { returns(T.nilable(WorkOS::AgentBlueprintsUpdateRequestInvocableBy)) } + def invocable_by; end + + sig { params(value: T.nilable(WorkOS::AgentBlueprintsUpdateRequestInvocableBy)).returns(T.nilable(WorkOS::AgentBlueprintsUpdateRequestInvocableBy)) } + def invocable_by=(value); end + + sig { returns(T.nilable(WorkOS::AgentBlueprintsUpdateRequestSessionSetting)) } + def session_settings; end + + sig { params(value: T.nilable(WorkOS::AgentBlueprintsUpdateRequestSessionSetting)).returns(T.nilable(WorkOS::AgentBlueprintsUpdateRequestSessionSetting)) } + def session_settings=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/agent_blueprints_update_request_invocable_by.rbi b/rbi/workos/agent_blueprints_update_request_invocable_by.rbi new file mode 100644 index 00000000..1d715f37 --- /dev/null +++ b/rbi/workos/agent_blueprints_update_request_invocable_by.rbi @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class AgentBlueprintsUpdateRequestInvocableBy + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(T.nilable(T::Array[String])) } + def role_slugs; end + + sig { params(value: T.nilable(T::Array[String])).returns(T.nilable(T::Array[String])) } + def role_slugs=(value); end + + sig { returns(T.nilable(T::Array[String])) } + def organization_ids; end + + sig { params(value: T.nilable(T::Array[String])).returns(T.nilable(T::Array[String])) } + def organization_ids=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/agent_blueprints_update_request_session_setting.rbi b/rbi/workos/agent_blueprints_update_request_session_setting.rbi new file mode 100644 index 00000000..d4e7d714 --- /dev/null +++ b/rbi/workos/agent_blueprints_update_request_session_setting.rbi @@ -0,0 +1,36 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class AgentBlueprintsUpdateRequestSessionSetting + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(T.nilable(Integer)) } + def max_age_seconds; end + + sig { params(value: T.nilable(Integer)).returns(T.nilable(Integer)) } + def max_age_seconds=(value); end + + sig { returns(T.nilable(Integer)) } + def access_token_ttl_seconds; end + + sig { params(value: T.nilable(Integer)).returns(T.nilable(Integer)) } + def access_token_ttl_seconds=(value); end + + sig { returns(T.nilable(Integer)) } + def refresh_token_ttl_seconds; end + + sig { params(value: T.nilable(Integer)).returns(T.nilable(Integer)) } + def refresh_token_ttl_seconds=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/agent_instance.rbi b/rbi/workos/agent_instance.rbi new file mode 100644 index 00000000..feae608e --- /dev/null +++ b/rbi/workos/agent_instance.rbi @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class AgentInstance + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(String) } + def object; end + + sig { params(value: String).returns(String) } + def object=(value); end + + sig { returns(String) } + def id; end + + sig { params(value: String).returns(String) } + def id=(value); end + + sig { returns(String) } + def agent_blueprint_id; end + + sig { params(value: String).returns(String) } + def agent_blueprint_id=(value); end + + sig { returns(String) } + def organization_id; end + + sig { params(value: String).returns(String) } + def organization_id=(value); end + + sig { returns(T.nilable(String)) } + def organization_membership_id; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def organization_membership_id=(value); end + + sig { returns(String) } + def type; end + + sig { params(value: String).returns(String) } + def type=(value); end + + sig { returns(String) } + def created_at; end + + sig { params(value: String).returns(String) } + def created_at=(value); end + + sig { returns(String) } + def updated_at; end + + sig { params(value: String).returns(String) } + def updated_at=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/agent_instance_created.rbi b/rbi/workos/agent_instance_created.rbi new file mode 100644 index 00000000..d79759f2 --- /dev/null +++ b/rbi/workos/agent_instance_created.rbi @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class AgentInstanceCreated + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(String) } + def object; end + + sig { params(value: String).returns(String) } + def object=(value); end + + sig { returns(String) } + def id; end + + sig { params(value: String).returns(String) } + def id=(value); end + + sig { returns(String) } + def event; end + + sig { params(value: String).returns(String) } + def event=(value); end + + sig { returns(WorkOS::AgentInstanceCreatedData) } + def data; end + + sig { params(value: WorkOS::AgentInstanceCreatedData).returns(WorkOS::AgentInstanceCreatedData) } + def data=(value); end + + sig { returns(String) } + def created_at; end + + sig { params(value: String).returns(String) } + def created_at=(value); end + + sig { returns(T.nilable(WorkOS::EventContext)) } + def context; end + + sig { params(value: T.nilable(WorkOS::EventContext)).returns(T.nilable(WorkOS::EventContext)) } + def context=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/agent_instance_created_data.rbi b/rbi/workos/agent_instance_created_data.rbi new file mode 100644 index 00000000..4cfebd03 --- /dev/null +++ b/rbi/workos/agent_instance_created_data.rbi @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class AgentInstanceCreatedData + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(String) } + def object; end + + sig { params(value: String).returns(String) } + def object=(value); end + + sig { returns(String) } + def id; end + + sig { params(value: String).returns(String) } + def id=(value); end + + sig { returns(String) } + def agent_blueprint_id; end + + sig { params(value: String).returns(String) } + def agent_blueprint_id=(value); end + + sig { returns(String) } + def organization_id; end + + sig { params(value: String).returns(String) } + def organization_id=(value); end + + sig { returns(T.nilable(String)) } + def organization_membership_id; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def organization_membership_id=(value); end + + sig { returns(String) } + def type; end + + sig { params(value: String).returns(String) } + def type=(value); end + + sig { returns(String) } + def created_at; end + + sig { params(value: String).returns(String) } + def created_at=(value); end + + sig { returns(String) } + def updated_at; end + + sig { params(value: String).returns(String) } + def updated_at=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/agent_instance_deleted.rbi b/rbi/workos/agent_instance_deleted.rbi new file mode 100644 index 00000000..699e0394 --- /dev/null +++ b/rbi/workos/agent_instance_deleted.rbi @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class AgentInstanceDeleted + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(String) } + def object; end + + sig { params(value: String).returns(String) } + def object=(value); end + + sig { returns(String) } + def id; end + + sig { params(value: String).returns(String) } + def id=(value); end + + sig { returns(String) } + def event; end + + sig { params(value: String).returns(String) } + def event=(value); end + + sig { returns(WorkOS::AgentInstanceDeletedData) } + def data; end + + sig { params(value: WorkOS::AgentInstanceDeletedData).returns(WorkOS::AgentInstanceDeletedData) } + def data=(value); end + + sig { returns(String) } + def created_at; end + + sig { params(value: String).returns(String) } + def created_at=(value); end + + sig { returns(T.nilable(WorkOS::EventContext)) } + def context; end + + sig { params(value: T.nilable(WorkOS::EventContext)).returns(T.nilable(WorkOS::EventContext)) } + def context=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/agent_instance_deleted_data.rbi b/rbi/workos/agent_instance_deleted_data.rbi new file mode 100644 index 00000000..cfe02f07 --- /dev/null +++ b/rbi/workos/agent_instance_deleted_data.rbi @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class AgentInstanceDeletedData + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(String) } + def object; end + + sig { params(value: String).returns(String) } + def object=(value); end + + sig { returns(String) } + def id; end + + sig { params(value: String).returns(String) } + def id=(value); end + + sig { returns(String) } + def agent_blueprint_id; end + + sig { params(value: String).returns(String) } + def agent_blueprint_id=(value); end + + sig { returns(String) } + def organization_id; end + + sig { params(value: String).returns(String) } + def organization_id=(value); end + + sig { returns(T.nilable(String)) } + def organization_membership_id; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def organization_membership_id=(value); end + + sig { returns(String) } + def type; end + + sig { params(value: String).returns(String) } + def type=(value); end + + sig { returns(String) } + def created_at; end + + sig { params(value: String).returns(String) } + def created_at=(value); end + + sig { returns(String) } + def updated_at; end + + sig { params(value: String).returns(String) } + def updated_at=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/agent_instance_session.rbi b/rbi/workos/agent_instance_session.rbi new file mode 100644 index 00000000..c62a8f76 --- /dev/null +++ b/rbi/workos/agent_instance_session.rbi @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class AgentInstanceSession + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(String) } + def object; end + + sig { params(value: String).returns(String) } + def object=(value); end + + sig { returns(String) } + def id; end + + sig { params(value: String).returns(String) } + def id=(value); end + + sig { returns(String) } + def agent_instance_id; end + + sig { params(value: String).returns(String) } + def agent_instance_id=(value); end + + sig { returns(String) } + def status; end + + sig { params(value: String).returns(String) } + def status=(value); end + + sig { returns(String) } + def expires_at; end + + sig { params(value: String).returns(String) } + def expires_at=(value); end + + sig { returns(T.nilable(String)) } + def revoked_at; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def revoked_at=(value); end + + sig { returns(String) } + def created_at; end + + sig { params(value: String).returns(String) } + def created_at=(value); end + + sig { returns(String) } + def updated_at; end + + sig { params(value: String).returns(String) } + def updated_at=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/agent_instance_session_created.rbi b/rbi/workos/agent_instance_session_created.rbi new file mode 100644 index 00000000..466e3dd0 --- /dev/null +++ b/rbi/workos/agent_instance_session_created.rbi @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class AgentInstanceSessionCreated + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(String) } + def object; end + + sig { params(value: String).returns(String) } + def object=(value); end + + sig { returns(String) } + def id; end + + sig { params(value: String).returns(String) } + def id=(value); end + + sig { returns(String) } + def event; end + + sig { params(value: String).returns(String) } + def event=(value); end + + sig { returns(WorkOS::AgentInstanceSessionCreatedData) } + def data; end + + sig { params(value: WorkOS::AgentInstanceSessionCreatedData).returns(WorkOS::AgentInstanceSessionCreatedData) } + def data=(value); end + + sig { returns(String) } + def created_at; end + + sig { params(value: String).returns(String) } + def created_at=(value); end + + sig { returns(T.nilable(WorkOS::EventContext)) } + def context; end + + sig { params(value: T.nilable(WorkOS::EventContext)).returns(T.nilable(WorkOS::EventContext)) } + def context=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/agent_instance_session_created_data.rbi b/rbi/workos/agent_instance_session_created_data.rbi new file mode 100644 index 00000000..91850bd3 --- /dev/null +++ b/rbi/workos/agent_instance_session_created_data.rbi @@ -0,0 +1,72 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class AgentInstanceSessionCreatedData + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(String) } + def object; end + + sig { params(value: String).returns(String) } + def object=(value); end + + sig { returns(String) } + def id; end + + sig { params(value: String).returns(String) } + def id=(value); end + + sig { returns(String) } + def agent_instance_id; end + + sig { params(value: String).returns(String) } + def agent_instance_id=(value); end + + sig { returns(String) } + def organization_id; end + + sig { params(value: String).returns(String) } + def organization_id=(value); end + + sig { returns(String) } + def expires_at; end + + sig { params(value: String).returns(String) } + def expires_at=(value); end + + sig { returns(T.nilable(String)) } + def revoked_at; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def revoked_at=(value); end + + sig { returns(String) } + def created_at; end + + sig { params(value: String).returns(String) } + def created_at=(value); end + + sig { returns(String) } + def updated_at; end + + sig { params(value: String).returns(String) } + def updated_at=(value); end + + sig { returns(T::Array[String]) } + def permission_slugs; end + + sig { params(value: T::Array[String]).returns(T::Array[String]) } + def permission_slugs=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/agent_instance_session_revoked.rbi b/rbi/workos/agent_instance_session_revoked.rbi new file mode 100644 index 00000000..70263f17 --- /dev/null +++ b/rbi/workos/agent_instance_session_revoked.rbi @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class AgentInstanceSessionRevoked + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(String) } + def object; end + + sig { params(value: String).returns(String) } + def object=(value); end + + sig { returns(String) } + def id; end + + sig { params(value: String).returns(String) } + def id=(value); end + + sig { returns(String) } + def event; end + + sig { params(value: String).returns(String) } + def event=(value); end + + sig { returns(WorkOS::AgentInstanceSessionRevokedData) } + def data; end + + sig { params(value: WorkOS::AgentInstanceSessionRevokedData).returns(WorkOS::AgentInstanceSessionRevokedData) } + def data=(value); end + + sig { returns(String) } + def created_at; end + + sig { params(value: String).returns(String) } + def created_at=(value); end + + sig { returns(T.nilable(WorkOS::EventContext)) } + def context; end + + sig { params(value: T.nilable(WorkOS::EventContext)).returns(T.nilable(WorkOS::EventContext)) } + def context=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/agent_instance_session_revoked_data.rbi b/rbi/workos/agent_instance_session_revoked_data.rbi new file mode 100644 index 00000000..be261d20 --- /dev/null +++ b/rbi/workos/agent_instance_session_revoked_data.rbi @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class AgentInstanceSessionRevokedData + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(String) } + def object; end + + sig { params(value: String).returns(String) } + def object=(value); end + + sig { returns(String) } + def id; end + + sig { params(value: String).returns(String) } + def id=(value); end + + sig { returns(String) } + def agent_instance_id; end + + sig { params(value: String).returns(String) } + def agent_instance_id=(value); end + + sig { returns(String) } + def organization_id; end + + sig { params(value: String).returns(String) } + def organization_id=(value); end + + sig { returns(String) } + def expires_at; end + + sig { params(value: String).returns(String) } + def expires_at=(value); end + + sig { returns(T.nilable(String)) } + def revoked_at; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def revoked_at=(value); end + + sig { returns(String) } + def created_at; end + + sig { params(value: String).returns(String) } + def created_at=(value); end + + sig { returns(String) } + def updated_at; end + + sig { params(value: String).returns(String) } + def updated_at=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/agent_token.rbi b/rbi/workos/agent_token.rbi new file mode 100644 index 00000000..0efbada2 --- /dev/null +++ b/rbi/workos/agent_token.rbi @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class AgentToken + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(String) } + def access_token; end + + sig { params(value: String).returns(String) } + def access_token=(value); end + + sig { returns(String) } + def token_type; end + + sig { params(value: String).returns(String) } + def token_type=(value); end + + sig { returns(Integer) } + def expires_in; end + + sig { params(value: Integer).returns(Integer) } + def expires_in=(value); end + + sig { returns(String) } + def refresh_token; end + + sig { params(value: String).returns(String) } + def refresh_token=(value); end + + sig { returns(String) } + def agent_instance_id; end + + sig { params(value: String).returns(String) } + def agent_instance_id=(value); end + + sig { returns(T::Boolean) } + def new_instance; end + + sig { params(value: T::Boolean).returns(T::Boolean) } + def new_instance=(value); end + + sig { returns(String) } + def agent_instance_session_id; end + + sig { params(value: String).returns(String) } + def agent_instance_session_id=(value); end + + sig { returns(T::Array[String]) } + def permissions; end + + sig { params(value: T::Array[String]).returns(T::Array[String]) } + def permissions=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/agents.rbi b/rbi/workos/agents.rbi index 3e937eae..b2530e8b 100644 --- a/rbi/workos/agents.rbi +++ b/rbi/workos/agents.rbi @@ -9,6 +9,72 @@ module WorkOS sig { params(client: WorkOS::BaseClient).void } def initialize(client); end + sig do + params( + before: T.nilable(String), + after: T.nilable(String), + limit: T.nilable(Integer), + order: T.nilable(String), + request_options: T::Hash[Symbol, T.untyped] + ).returns(T::Array[WorkOS::AgentBlueprint]) + end + def list_blueprints(before:, after:, limit:, order:, request_options:); end + + sig do + params( + name: String, + session_settings: WorkOS::AgentBlueprintsCreateRequestSessionSetting, + description: T.nilable(String), + permissions: T.nilable(T::Array[String]), + invocable_by: T.nilable(WorkOS::AgentBlueprintsCreateRequestInvocableBy), + request_options: T::Hash[Symbol, T.untyped] + ).returns(WorkOS::AgentBlueprint) + end + def create_blueprint(name:, session_settings:, description:, permissions:, invocable_by:, request_options:); end + + sig do + params( + agent_blueprint_id: String, + request_options: T::Hash[Symbol, T.untyped] + ).returns(WorkOS::AgentBlueprint) + end + def get_blueprint(agent_blueprint_id:, request_options:); end + + sig do + params( + agent_blueprint_id: String, + name: T.nilable(String), + description: T.nilable(String), + permissions: T.nilable(T::Array[String]), + invocable_by: T.nilable(WorkOS::AgentBlueprintsUpdateRequestInvocableBy), + session_settings: T.nilable(WorkOS::AgentBlueprintsUpdateRequestSessionSetting), + request_options: T::Hash[Symbol, T.untyped] + ).returns(WorkOS::AgentBlueprint) + end + def update_blueprint(agent_blueprint_id:, name:, description:, permissions:, invocable_by:, session_settings:, request_options:); end + + sig do + params( + agent_blueprint_id: String, + request_options: T::Hash[Symbol, T.untyped] + ).returns(NilClass) + end + def delete_blueprint(agent_blueprint_id:, request_options:); end + + sig do + params( + agent_blueprint_id: String, + type: String, + user_access_token: T.nilable(String), + intent: T.nilable(String), + organization_id: T.nilable(String), + agent_access_token: T.nilable(String), + refresh_token: T.nilable(String), + request_options: T::Hash[Symbol, T.untyped] + ).returns(WorkOS::AgentToken) + end + def create_blueprint_token(agent_blueprint_id:, type:, user_access_token:, intent:, organization_id:, agent_access_token:, refresh_token:, request_options:); end + sig do params( type: String, @@ -38,5 +104,63 @@ module WorkOS end def get_registration(id:, request_options:); end + sig do + params( + before: T.nilable(String), + after: T.nilable(String), + limit: T.nilable(Integer), + order: T.nilable(String), + organization_id: T.nilable(String), + agent_blueprint_id: T.nilable(String), + request_options: T::Hash[Symbol, T.untyped] + ).returns(T::Array[WorkOS::AgentInstance]) + end + def list_instances(before:, after:, limit:, order:, organization_id:, agent_blueprint_id:, request_options:); end + + sig do + params( + agent_instance_id: String, + request_options: T::Hash[Symbol, T.untyped] + ).returns(WorkOS::AgentInstance) + end + def get_instance(agent_instance_id:, request_options:); end + + sig do + params( + agent_instance_id: String, + request_options: T::Hash[Symbol, T.untyped] + ).returns(NilClass) + end + def delete_instance(agent_instance_id:, request_options:); end + + sig do + params( + before: T.nilable(String), + after: T.nilable(String), + limit: T.nilable(Integer), + order: T.nilable(String), + agent_blueprint_id: T.nilable(String), + agent_instance_id: T.nilable(String), + request_options: T::Hash[Symbol, T.untyped] + ).returns(T::Array[WorkOS::AgentInstanceSession]) + end + def list_sessions(before:, after:, limit:, order:, agent_blueprint_id:, agent_instance_id:, request_options:); end + + sig do + params( + agent_instance_session_id: String, + request_options: T::Hash[Symbol, T.untyped] + ).returns(WorkOS::AgentInstanceSession) + end + def get_session(agent_instance_session_id:, request_options:); end + + sig do + params( + agent_instance_session_id: String, + request_options: T::Hash[Symbol, T.untyped] + ).returns(WorkOS::AgentInstanceSession) + end + def revoke_session(agent_instance_session_id:, request_options:); end + end end diff --git a/rbi/workos/authentication_oauth_failed_data.rbi b/rbi/workos/authentication_oauth_failed_data.rbi index 6b90714b..8967c894 100644 --- a/rbi/workos/authentication_oauth_failed_data.rbi +++ b/rbi/workos/authentication_oauth_failed_data.rbi @@ -51,6 +51,12 @@ module WorkOS sig { params(value: WorkOS::AuthenticationOAuthFailedDataError).returns(WorkOS::AuthenticationOAuthFailedDataError) } def error=(value); end + sig { returns(T.nilable(String)) } + def provider; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def provider=(value); end + sig { returns(T::Hash[Symbol, T.untyped]) } def to_h; end diff --git a/rbi/workos/authentication_oauth_succeeded_data.rbi b/rbi/workos/authentication_oauth_succeeded_data.rbi index 94cb8314..4b470fc0 100644 --- a/rbi/workos/authentication_oauth_succeeded_data.rbi +++ b/rbi/workos/authentication_oauth_succeeded_data.rbi @@ -45,6 +45,12 @@ module WorkOS sig { params(value: String).returns(String) } def email=(value); end + sig { returns(T.nilable(String)) } + def provider; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def provider=(value); end + sig { returns(T::Hash[Symbol, T.untyped]) } def to_h; end diff --git a/rbi/workos/client.rbi b/rbi/workos/client.rbi index 2d608b2c..08ac7602 100644 --- a/rbi/workos/client.rbi +++ b/rbi/workos/client.rbi @@ -54,6 +54,9 @@ module WorkOS sig { returns(WorkOS::Groups) } def groups; end + sig { returns(WorkOS::PlatformTeams) } + def platform_teams; end + sig { returns(WorkOS::AdminPortal) } def admin_portal; end diff --git a/rbi/workos/create_connection.rbi b/rbi/workos/create_connection.rbi new file mode 100644 index 00000000..f5df90e4 --- /dev/null +++ b/rbi/workos/create_connection.rbi @@ -0,0 +1,60 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class CreateConnection + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(String) } + def organization_id; end + + sig { params(value: String).returns(String) } + def organization_id=(value); end + + sig { returns(T.nilable(String)) } + def name; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def name=(value); end + + sig { returns(T.nilable(String)) } + def external_id; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def external_id=(value); end + + sig { returns(T.nilable(String)) } + def connection_type; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def connection_type=(value); end + + sig { returns(T.nilable(WorkOS::CreateConnectionAttributeMaps)) } + def attribute_maps; end + + sig { params(value: T.nilable(WorkOS::CreateConnectionAttributeMaps)).returns(T.nilable(WorkOS::CreateConnectionAttributeMaps)) } + def attribute_maps=(value); end + + sig { returns(T.nilable(WorkOS::CreateConnectionSAMLOptions)) } + def saml_options; end + + sig { params(value: T.nilable(WorkOS::CreateConnectionSAMLOptions)).returns(T.nilable(WorkOS::CreateConnectionSAMLOptions)) } + def saml_options=(value); end + + sig { returns(T.nilable(WorkOS::CreateConnectionOIDCOptions)) } + def oidc_options; end + + sig { params(value: T.nilable(WorkOS::CreateConnectionOIDCOptions)).returns(T.nilable(WorkOS::CreateConnectionOIDCOptions)) } + def oidc_options=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/create_connection_attribute_maps.rbi b/rbi/workos/create_connection_attribute_maps.rbi new file mode 100644 index 00000000..4bc7bf20 --- /dev/null +++ b/rbi/workos/create_connection_attribute_maps.rbi @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class CreateConnectionAttributeMaps + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(T.nilable(WorkOS::CreateConnectionStandardAttributes)) } + def standard_attributes; end + + sig { params(value: T.nilable(WorkOS::CreateConnectionStandardAttributes)).returns(T.nilable(WorkOS::CreateConnectionStandardAttributes)) } + def standard_attributes=(value); end + + sig { returns(T.nilable(T::Hash[String, String])) } + def custom_attributes; end + + sig { params(value: T.nilable(T::Hash[String, String])).returns(T.nilable(T::Hash[String, String])) } + def custom_attributes=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/create_connection_key_pair.rbi b/rbi/workos/create_connection_key_pair.rbi new file mode 100644 index 00000000..d361a9d4 --- /dev/null +++ b/rbi/workos/create_connection_key_pair.rbi @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class CreateConnectionKeyPair + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(String) } + def key; end + + sig { params(value: String).returns(String) } + def key=(value); end + + sig { returns(String) } + def cert; end + + sig { params(value: String).returns(String) } + def cert=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/create_connection_oidc_options.rbi b/rbi/workos/create_connection_oidc_options.rbi new file mode 100644 index 00000000..053bfc50 --- /dev/null +++ b/rbi/workos/create_connection_oidc_options.rbi @@ -0,0 +1,72 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class CreateConnectionOIDCOptions + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(String) } + def discovery_endpoint; end + + sig { params(value: String).returns(String) } + def discovery_endpoint=(value); end + + sig { returns(String) } + def client_id; end + + sig { params(value: String).returns(String) } + def client_id=(value); end + + sig { returns(T.nilable(String)) } + def client_secret; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def client_secret=(value); end + + sig { returns(T.nilable(String)) } + def redirect_uri; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def redirect_uri=(value); end + + sig { returns(T.nilable(T::Boolean)) } + def pkce; end + + sig { params(value: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def pkce=(value); end + + sig { returns(T.nilable(String)) } + def token_authentication_method; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def token_authentication_method=(value); end + + sig { returns(T.nilable(WorkOS::CreateConnectionKeyPair)) } + def jwt_signing_key_pair; end + + sig { params(value: T.nilable(WorkOS::CreateConnectionKeyPair)).returns(T.nilable(WorkOS::CreateConnectionKeyPair)) } + def jwt_signing_key_pair=(value); end + + sig { returns(T.nilable(String)) } + def id_token_signature_algorithm; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def id_token_signature_algorithm=(value); end + + sig { returns(T.nilable(T::Boolean)) } + def fetch_user_info; end + + sig { params(value: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def fetch_user_info=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/create_connection_saml_options.rbi b/rbi/workos/create_connection_saml_options.rbi new file mode 100644 index 00000000..99431002 --- /dev/null +++ b/rbi/workos/create_connection_saml_options.rbi @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class CreateConnectionSAMLOptions + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(T.nilable(String)) } + def idp_metadata_url; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def idp_metadata_url=(value); end + + sig { returns(T.nilable(String)) } + def acs_url; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def acs_url=(value); end + + sig { returns(T.nilable(String)) } + def sp_entity_id; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def sp_entity_id=(value); end + + sig { returns(T.nilable(String)) } + def idp_entity_id; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def idp_entity_id=(value); end + + sig { returns(T.nilable(String)) } + def idp_sso_url; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def idp_sso_url=(value); end + + sig { returns(T.nilable(T::Array[String])) } + def idp_signing_certs; end + + sig { params(value: T.nilable(T::Array[String])).returns(T.nilable(T::Array[String])) } + def idp_signing_certs=(value); end + + sig { returns(T.nilable(WorkOS::CreateConnectionKeyPair)) } + def sp_signing_key_pair; end + + sig { params(value: T.nilable(WorkOS::CreateConnectionKeyPair)).returns(T.nilable(WorkOS::CreateConnectionKeyPair)) } + def sp_signing_key_pair=(value); end + + sig { returns(T.nilable(T::Array[WorkOS::CreateConnectionKeyPair])) } + def sp_encryption_key_pairs; end + + sig { params(value: T.nilable(T::Array[WorkOS::CreateConnectionKeyPair])).returns(T.nilable(T::Array[WorkOS::CreateConnectionKeyPair])) } + def sp_encryption_key_pairs=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/create_connection_standard_attributes.rbi b/rbi/workos/create_connection_standard_attributes.rbi new file mode 100644 index 00000000..c0736391 --- /dev/null +++ b/rbi/workos/create_connection_standard_attributes.rbi @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class CreateConnectionStandardAttributes + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(T.nilable(String)) } + def idp_id; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def idp_id=(value); end + + sig { returns(T.nilable(String)) } + def email; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def email=(value); end + + sig { returns(T.nilable(String)) } + def first_name; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def first_name=(value); end + + sig { returns(T.nilable(String)) } + def last_name; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def last_name=(value); end + + sig { returns(T.nilable(String)) } + def groups; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def groups=(value); end + + sig { returns(T.nilable(String)) } + def name; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def name=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/create_it_contact.rbi b/rbi/workos/create_it_contact.rbi new file mode 100644 index 00000000..af6a057e --- /dev/null +++ b/rbi/workos/create_it_contact.rbi @@ -0,0 +1,24 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class CreateItContact + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(String) } + def email; end + + sig { params(value: String).returns(String) } + def email=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/create_saml_idp_signing_certificate.rbi b/rbi/workos/create_saml_idp_signing_certificate.rbi new file mode 100644 index 00000000..14c25dcc --- /dev/null +++ b/rbi/workos/create_saml_idp_signing_certificate.rbi @@ -0,0 +1,24 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class CreateSAMLIdpSigningCertificate + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(String) } + def value; end + + sig { params(value: String).returns(String) } + def value=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/create_team.rbi b/rbi/workos/create_team.rbi new file mode 100644 index 00000000..67f7178c --- /dev/null +++ b/rbi/workos/create_team.rbi @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class CreateTeam + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(String) } + def admin_email; end + + sig { params(value: String).returns(String) } + def admin_email=(value); end + + sig { returns(String) } + def name; end + + sig { params(value: String).returns(String) } + def name=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/create_waitlist_entry.rbi b/rbi/workos/create_waitlist_entry.rbi new file mode 100644 index 00000000..94c266ec --- /dev/null +++ b/rbi/workos/create_waitlist_entry.rbi @@ -0,0 +1,36 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class CreateWaitlistEntry + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(String) } + def email; end + + sig { params(value: String).returns(String) } + def email=(value); end + + sig { returns(T.nilable(T::Hash[String, String])) } + def additional_fields; end + + sig { params(value: T.nilable(T::Hash[String, String])).returns(T.nilable(T::Hash[String, String])) } + def additional_fields=(value); end + + sig { returns(T.nilable(T::Boolean)) } + def send_confirmation_email; end + + sig { params(value: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def send_confirmation_email=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/invite_it_contact.rbi b/rbi/workos/invite_it_contact.rbi new file mode 100644 index 00000000..abd5aa1b --- /dev/null +++ b/rbi/workos/invite_it_contact.rbi @@ -0,0 +1,24 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class InviteItContact + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(T::Array[String]) } + def intents; end + + sig { params(value: T::Array[String]).returns(T::Array[String]) } + def intents=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/it_contact.rbi b/rbi/workos/it_contact.rbi new file mode 100644 index 00000000..f22ac666 --- /dev/null +++ b/rbi/workos/it_contact.rbi @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class ItContact + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(String) } + def object; end + + sig { params(value: String).returns(String) } + def object=(value); end + + sig { returns(String) } + def id; end + + sig { params(value: String).returns(String) } + def id=(value); end + + sig { returns(String) } + def email; end + + sig { params(value: String).returns(String) } + def email=(value); end + + sig { returns(String) } + def created_at; end + + sig { params(value: String).returns(String) } + def created_at=(value); end + + sig { returns(String) } + def updated_at; end + + sig { params(value: String).returns(String) } + def updated_at=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/organizations.rbi b/rbi/workos/organizations.rbi index ab923582..8a018397 100644 --- a/rbi/workos/organizations.rbi +++ b/rbi/workos/organizations.rbi @@ -94,5 +94,50 @@ module WorkOS end def list_authorized_applications(organization_id:, before:, after:, limit:, order:, request_options:); end + sig do + params( + organization_id: String, + request_options: T::Hash[Symbol, T.untyped] + ).returns(WorkOS::Types::ListStruct) + end + def list_it_contacts(organization_id:, request_options:); end + + sig do + params( + organization_id: String, + email: String, + request_options: T::Hash[Symbol, T.untyped] + ).returns(WorkOS::ItContact) + end + def create_it_contact(organization_id:, email:, request_options:); end + + sig do + params( + organization_id: String, + contact_id: String, + request_options: T::Hash[Symbol, T.untyped] + ).returns(NilClass) + end + def delete_it_contact(organization_id:, contact_id:, request_options:); end + + sig do + params( + organization_id: String, + contact_id: String, + intents: T::Array[String], + request_options: T::Hash[Symbol, T.untyped] + ).returns(NilClass) + end + def invite_it_contact(organization_id:, contact_id:, intents:, request_options:); end + + sig do + params( + organization_id: String, + contact_id: String, + request_options: T::Hash[Symbol, T.untyped] + ).returns(NilClass) + end + def revoke_it_contact(organization_id:, contact_id:, request_options:); end + end end diff --git a/rbi/workos/patch_connection.rbi b/rbi/workos/patch_connection.rbi new file mode 100644 index 00000000..0677687f --- /dev/null +++ b/rbi/workos/patch_connection.rbi @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class PatchConnection + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(T.nilable(String)) } + def name; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def name=(value); end + + sig { returns(T.nilable(String)) } + def external_id; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def external_id=(value); end + + sig { returns(T.nilable(String)) } + def connection_type; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def connection_type=(value); end + + sig { returns(T.nilable(WorkOS::PatchConnectionAttributeMaps)) } + def attribute_maps; end + + sig { params(value: T.nilable(WorkOS::PatchConnectionAttributeMaps)).returns(T.nilable(WorkOS::PatchConnectionAttributeMaps)) } + def attribute_maps=(value); end + + sig { returns(T.nilable(WorkOS::PatchConnectionSAMLOptions)) } + def saml_options; end + + sig { params(value: T.nilable(WorkOS::PatchConnectionSAMLOptions)).returns(T.nilable(WorkOS::PatchConnectionSAMLOptions)) } + def saml_options=(value); end + + sig { returns(T.nilable(WorkOS::PatchConnectionOIDCOptions)) } + def oidc_options; end + + sig { params(value: T.nilable(WorkOS::PatchConnectionOIDCOptions)).returns(T.nilable(WorkOS::PatchConnectionOIDCOptions)) } + def oidc_options=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/patch_connection_attribute_maps.rbi b/rbi/workos/patch_connection_attribute_maps.rbi new file mode 100644 index 00000000..2a4cee9a --- /dev/null +++ b/rbi/workos/patch_connection_attribute_maps.rbi @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class PatchConnectionAttributeMaps + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(T.nilable(WorkOS::PatchConnectionStandardAttributes)) } + def standard_attributes; end + + sig { params(value: T.nilable(WorkOS::PatchConnectionStandardAttributes)).returns(T.nilable(WorkOS::PatchConnectionStandardAttributes)) } + def standard_attributes=(value); end + + sig { returns(T.nilable(T::Hash[String, T.nilable(String)])) } + def custom_attributes; end + + sig { params(value: T.nilable(T::Hash[String, T.nilable(String)])).returns(T.nilable(T::Hash[String, T.nilable(String)])) } + def custom_attributes=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/patch_connection_oidc_options.rbi b/rbi/workos/patch_connection_oidc_options.rbi new file mode 100644 index 00000000..4ca4be32 --- /dev/null +++ b/rbi/workos/patch_connection_oidc_options.rbi @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class PatchConnectionOIDCOptions + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(T.nilable(String)) } + def discovery_endpoint; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def discovery_endpoint=(value); end + + sig { returns(T.nilable(String)) } + def client_id; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def client_id=(value); end + + sig { returns(T.nilable(String)) } + def client_secret; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def client_secret=(value); end + + sig { returns(T.nilable(String)) } + def redirect_uri; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def redirect_uri=(value); end + + sig { returns(T.nilable(T::Boolean)) } + def pkce; end + + sig { params(value: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def pkce=(value); end + + sig { returns(T.nilable(String)) } + def token_authentication_method; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def token_authentication_method=(value); end + + sig { returns(T.nilable(String)) } + def id_token_signature_algorithm; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def id_token_signature_algorithm=(value); end + + sig { returns(T.nilable(T::Boolean)) } + def fetch_user_info; end + + sig { params(value: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def fetch_user_info=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/patch_connection_saml_options.rbi b/rbi/workos/patch_connection_saml_options.rbi new file mode 100644 index 00000000..7887ec30 --- /dev/null +++ b/rbi/workos/patch_connection_saml_options.rbi @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class PatchConnectionSAMLOptions + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(T.nilable(String)) } + def idp_metadata_url; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def idp_metadata_url=(value); end + + sig { returns(T.nilable(String)) } + def acs_url; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def acs_url=(value); end + + sig { returns(T.nilable(String)) } + def sp_entity_id; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def sp_entity_id=(value); end + + sig { returns(T.nilable(String)) } + def idp_entity_id; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def idp_entity_id=(value); end + + sig { returns(T.nilable(String)) } + def idp_sso_url; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def idp_sso_url=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/patch_connection_standard_attributes.rbi b/rbi/workos/patch_connection_standard_attributes.rbi new file mode 100644 index 00000000..94298c85 --- /dev/null +++ b/rbi/workos/patch_connection_standard_attributes.rbi @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class PatchConnectionStandardAttributes + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(T.nilable(String)) } + def idp_id; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def idp_id=(value); end + + sig { returns(T.nilable(String)) } + def email; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def email=(value); end + + sig { returns(T.nilable(String)) } + def first_name; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def first_name=(value); end + + sig { returns(T.nilable(String)) } + def last_name; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def last_name=(value); end + + sig { returns(T.nilable(String)) } + def groups; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def groups=(value); end + + sig { returns(T.nilable(String)) } + def name; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def name=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/platform_teams.rbi b/rbi/workos/platform_teams.rbi new file mode 100644 index 00000000..03771cd9 --- /dev/null +++ b/rbi/workos/platform_teams.rbi @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class PlatformTeams + sig { params(client: WorkOS::BaseClient).void } + def initialize(client); end + + sig do + params( + admin_email: String, + name: String, + request_options: T::Hash[Symbol, T.untyped] + ).returns(WorkOS::Team) + end + def create_team(admin_email:, name:, request_options:); end + + sig do + params( + team_id: String, + request_options: T::Hash[Symbol, T.untyped] + ).returns(WorkOS::Team) + end + def get_team(team_id:, request_options:); end + + end +end diff --git a/rbi/workos/resource_export_completed.rbi b/rbi/workos/resource_export_completed.rbi new file mode 100644 index 00000000..2680c81f --- /dev/null +++ b/rbi/workos/resource_export_completed.rbi @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class ResourceExportCompleted + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(String) } + def object; end + + sig { params(value: String).returns(String) } + def object=(value); end + + sig { returns(String) } + def id; end + + sig { params(value: String).returns(String) } + def id=(value); end + + sig { returns(String) } + def event; end + + sig { params(value: String).returns(String) } + def event=(value); end + + sig { returns(WorkOS::ResourceExportCompletedData) } + def data; end + + sig { params(value: WorkOS::ResourceExportCompletedData).returns(WorkOS::ResourceExportCompletedData) } + def data=(value); end + + sig { returns(String) } + def created_at; end + + sig { params(value: String).returns(String) } + def created_at=(value); end + + sig { returns(T.nilable(WorkOS::EventContext)) } + def context; end + + sig { params(value: T.nilable(WorkOS::EventContext)).returns(T.nilable(WorkOS::EventContext)) } + def context=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/resource_export_completed_data.rbi b/rbi/workos/resource_export_completed_data.rbi new file mode 100644 index 00000000..08173690 --- /dev/null +++ b/rbi/workos/resource_export_completed_data.rbi @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class ResourceExportCompletedData + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(String) } + def id; end + + sig { params(value: String).returns(String) } + def id=(value); end + + sig { returns(String) } + def resource_type; end + + sig { params(value: String).returns(String) } + def resource_type=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/resource_export_created.rbi b/rbi/workos/resource_export_created.rbi new file mode 100644 index 00000000..3ed88acd --- /dev/null +++ b/rbi/workos/resource_export_created.rbi @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class ResourceExportCreated + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(String) } + def object; end + + sig { params(value: String).returns(String) } + def object=(value); end + + sig { returns(String) } + def id; end + + sig { params(value: String).returns(String) } + def id=(value); end + + sig { returns(String) } + def event; end + + sig { params(value: String).returns(String) } + def event=(value); end + + sig { returns(WorkOS::ResourceExportCreatedData) } + def data; end + + sig { params(value: WorkOS::ResourceExportCreatedData).returns(WorkOS::ResourceExportCreatedData) } + def data=(value); end + + sig { returns(String) } + def created_at; end + + sig { params(value: String).returns(String) } + def created_at=(value); end + + sig { returns(T.nilable(WorkOS::EventContext)) } + def context; end + + sig { params(value: T.nilable(WorkOS::EventContext)).returns(T.nilable(WorkOS::EventContext)) } + def context=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/resource_export_created_data.rbi b/rbi/workos/resource_export_created_data.rbi new file mode 100644 index 00000000..b4cad229 --- /dev/null +++ b/rbi/workos/resource_export_created_data.rbi @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class ResourceExportCreatedData + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(String) } + def id; end + + sig { params(value: String).returns(String) } + def id=(value); end + + sig { returns(String) } + def resource_type; end + + sig { params(value: String).returns(String) } + def resource_type=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/resource_export_downloaded.rbi b/rbi/workos/resource_export_downloaded.rbi new file mode 100644 index 00000000..c57714f4 --- /dev/null +++ b/rbi/workos/resource_export_downloaded.rbi @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class ResourceExportDownloaded + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(String) } + def object; end + + sig { params(value: String).returns(String) } + def object=(value); end + + sig { returns(String) } + def id; end + + sig { params(value: String).returns(String) } + def id=(value); end + + sig { returns(String) } + def event; end + + sig { params(value: String).returns(String) } + def event=(value); end + + sig { returns(WorkOS::ResourceExportDownloadedData) } + def data; end + + sig { params(value: WorkOS::ResourceExportDownloadedData).returns(WorkOS::ResourceExportDownloadedData) } + def data=(value); end + + sig { returns(String) } + def created_at; end + + sig { params(value: String).returns(String) } + def created_at=(value); end + + sig { returns(T.nilable(WorkOS::EventContext)) } + def context; end + + sig { params(value: T.nilable(WorkOS::EventContext)).returns(T.nilable(WorkOS::EventContext)) } + def context=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/resource_export_downloaded_data.rbi b/rbi/workos/resource_export_downloaded_data.rbi new file mode 100644 index 00000000..9575daa4 --- /dev/null +++ b/rbi/workos/resource_export_downloaded_data.rbi @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class ResourceExportDownloadedData + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(String) } + def id; end + + sig { params(value: String).returns(String) } + def id=(value); end + + sig { returns(String) } + def resource_type; end + + sig { params(value: String).returns(String) } + def resource_type=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/resource_export_failed.rbi b/rbi/workos/resource_export_failed.rbi new file mode 100644 index 00000000..cbb3c99b --- /dev/null +++ b/rbi/workos/resource_export_failed.rbi @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class ResourceExportFailed + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(String) } + def object; end + + sig { params(value: String).returns(String) } + def object=(value); end + + sig { returns(String) } + def id; end + + sig { params(value: String).returns(String) } + def id=(value); end + + sig { returns(String) } + def event; end + + sig { params(value: String).returns(String) } + def event=(value); end + + sig { returns(WorkOS::ResourceExportFailedData) } + def data; end + + sig { params(value: WorkOS::ResourceExportFailedData).returns(WorkOS::ResourceExportFailedData) } + def data=(value); end + + sig { returns(String) } + def created_at; end + + sig { params(value: String).returns(String) } + def created_at=(value); end + + sig { returns(T.nilable(WorkOS::EventContext)) } + def context; end + + sig { params(value: T.nilable(WorkOS::EventContext)).returns(T.nilable(WorkOS::EventContext)) } + def context=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/resource_export_failed_data.rbi b/rbi/workos/resource_export_failed_data.rbi new file mode 100644 index 00000000..6c531b8d --- /dev/null +++ b/rbi/workos/resource_export_failed_data.rbi @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class ResourceExportFailedData + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(String) } + def id; end + + sig { params(value: String).returns(String) } + def id=(value); end + + sig { returns(String) } + def resource_type; end + + sig { params(value: String).returns(String) } + def resource_type=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/saml_idp_signing_certificate.rbi b/rbi/workos/saml_idp_signing_certificate.rbi new file mode 100644 index 00000000..f82c86ba --- /dev/null +++ b/rbi/workos/saml_idp_signing_certificate.rbi @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class SAMLIdpSigningCertificate + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(String) } + def object; end + + sig { params(value: String).returns(String) } + def object=(value); end + + sig { returns(String) } + def id; end + + sig { params(value: String).returns(String) } + def id=(value); end + + sig { returns(String) } + def value; end + + sig { params(value: String).returns(String) } + def value=(value); end + + sig { returns(T.nilable(String)) } + def not_before; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def not_before=(value); end + + sig { returns(T.nilable(String)) } + def not_after; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def not_after=(value); end + + sig { returns(String) } + def created_at; end + + sig { params(value: String).returns(String) } + def created_at=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/saml_idp_signing_certificate_list.rbi b/rbi/workos/saml_idp_signing_certificate_list.rbi new file mode 100644 index 00000000..ff8b21bc --- /dev/null +++ b/rbi/workos/saml_idp_signing_certificate_list.rbi @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class SAMLIdpSigningCertificateList + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(String) } + def object; end + + sig { params(value: String).returns(String) } + def object=(value); end + + sig { returns(T::Array[WorkOS::SAMLIdpSigningCertificate]) } + def data; end + + sig { params(value: T::Array[WorkOS::SAMLIdpSigningCertificate]).returns(T::Array[WorkOS::SAMLIdpSigningCertificate]) } + def data=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/saml_sp_encryption_certificate.rbi b/rbi/workos/saml_sp_encryption_certificate.rbi new file mode 100644 index 00000000..60dde564 --- /dev/null +++ b/rbi/workos/saml_sp_encryption_certificate.rbi @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class SAMLSpEncryptionCertificate + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(String) } + def object; end + + sig { params(value: String).returns(String) } + def object=(value); end + + sig { returns(String) } + def id; end + + sig { params(value: String).returns(String) } + def id=(value); end + + sig { returns(String) } + def value; end + + sig { params(value: String).returns(String) } + def value=(value); end + + sig { returns(T.nilable(String)) } + def not_before; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def not_before=(value); end + + sig { returns(T.nilable(String)) } + def not_after; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def not_after=(value); end + + sig { returns(String) } + def created_at; end + + sig { params(value: String).returns(String) } + def created_at=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/saml_sp_encryption_certificate_list.rbi b/rbi/workos/saml_sp_encryption_certificate_list.rbi new file mode 100644 index 00000000..99daf3c9 --- /dev/null +++ b/rbi/workos/saml_sp_encryption_certificate_list.rbi @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class SAMLSpEncryptionCertificateList + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(String) } + def object; end + + sig { params(value: String).returns(String) } + def object=(value); end + + sig { returns(T::Array[WorkOS::SAMLSpEncryptionCertificate]) } + def data; end + + sig { params(value: T::Array[WorkOS::SAMLSpEncryptionCertificate]).returns(T::Array[WorkOS::SAMLSpEncryptionCertificate]) } + def data=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/saml_sp_signing_certificate.rbi b/rbi/workos/saml_sp_signing_certificate.rbi new file mode 100644 index 00000000..49408443 --- /dev/null +++ b/rbi/workos/saml_sp_signing_certificate.rbi @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class SAMLSpSigningCertificate + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(String) } + def object; end + + sig { params(value: String).returns(String) } + def object=(value); end + + sig { returns(String) } + def id; end + + sig { params(value: String).returns(String) } + def id=(value); end + + sig { returns(String) } + def value; end + + sig { params(value: String).returns(String) } + def value=(value); end + + sig { returns(T.nilable(String)) } + def not_before; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def not_before=(value); end + + sig { returns(T.nilable(String)) } + def not_after; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def not_after=(value); end + + sig { returns(String) } + def created_at; end + + sig { params(value: String).returns(String) } + def created_at=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/sso.rbi b/rbi/workos/sso.rbi index 13aa23d2..67ae7de0 100644 --- a/rbi/workos/sso.rbi +++ b/rbi/workos/sso.rbi @@ -6,6 +6,54 @@ module WorkOS class SSO + class CreateProtocolOptionsSAML + sig { returns(WorkOS::CreateConnectionSAMLOptions) } + def saml_options; end + + sig do + params( + saml_options: WorkOS::CreateConnectionSAMLOptions + ).returns(WorkOS::SSO::CreateProtocolOptionsSAML) + end + def self.new(saml_options:); end + end + + class CreateProtocolOptionsOIDC + sig { returns(WorkOS::CreateConnectionOIDCOptions) } + def oidc_options; end + + sig do + params( + oidc_options: WorkOS::CreateConnectionOIDCOptions + ).returns(WorkOS::SSO::CreateProtocolOptionsOIDC) + end + def self.new(oidc_options:); end + end + + class PatchProtocolOptionsSAML + sig { returns(WorkOS::PatchConnectionSAMLOptions) } + def saml_options; end + + sig do + params( + saml_options: WorkOS::PatchConnectionSAMLOptions + ).returns(WorkOS::SSO::PatchProtocolOptionsSAML) + end + def self.new(saml_options:); end + end + + class PatchProtocolOptionsOIDC + sig { returns(WorkOS::PatchConnectionOIDCOptions) } + def oidc_options; end + + sig do + params( + oidc_options: WorkOS::PatchConnectionOIDCOptions + ).returns(WorkOS::SSO::PatchProtocolOptionsOIDC) + end + def self.new(oidc_options:); end + end + sig { params(client: WorkOS::BaseClient).void } def initialize(client); end @@ -24,6 +72,95 @@ module WorkOS end def list_connections(before:, after:, limit:, order:, connection_type:, domain:, organization_id:, search:, request_options:); end + sig do + params( + organization_id: String, + protocol_options: T.any(WorkOS::SSO::CreateProtocolOptionsSAML, WorkOS::SSO::CreateProtocolOptionsOIDC), + name: T.nilable(String), + external_id: T.nilable(String), + connection_type: T.nilable(String), + attribute_maps: T.nilable(WorkOS::CreateConnectionAttributeMaps), + request_options: T::Hash[Symbol, T.untyped] + ).returns(WorkOS::Connection) + end + def create_connection(organization_id:, protocol_options:, name:, external_id:, connection_type:, attribute_maps:, request_options:); end + + sig do + params( + connection_id: String, + request_options: T::Hash[Symbol, T.untyped] + ).returns(WorkOS::SAMLIdpSigningCertificateList) + end + def list_connection_saml_idp_signing_certs(connection_id:, request_options:); end + + sig do + params( + connection_id: String, + value: String, + request_options: T::Hash[Symbol, T.untyped] + ).returns(WorkOS::SAMLIdpSigningCertificate) + end + def create_connection_saml_idp_signing_cert(connection_id:, value:, request_options:); end + + sig do + params( + connection_id: String, + certificate_id: String, + request_options: T::Hash[Symbol, T.untyped] + ).returns(NilClass) + end + def delete_connection_saml_idp_signing_cert(connection_id:, certificate_id:, request_options:); end + + sig do + params( + connection_id: String, + request_options: T::Hash[Symbol, T.untyped] + ).returns(WorkOS::SAMLSpEncryptionCertificateList) + end + def list_connection_saml_sp_encryption_certs(connection_id:, request_options:); end + + sig do + params( + connection_id: String, + request_options: T::Hash[Symbol, T.untyped] + ).returns(WorkOS::SAMLSpEncryptionCertificate) + end + def create_connection_saml_sp_encryption_cert(connection_id:, request_options:); end + + sig do + params( + connection_id: String, + certificate_id: String, + request_options: T::Hash[Symbol, T.untyped] + ).returns(NilClass) + end + def delete_connection_saml_sp_encryption_cert(connection_id:, certificate_id:, request_options:); end + + sig do + params( + connection_id: String, + request_options: T::Hash[Symbol, T.untyped] + ).returns(WorkOS::SAMLSpSigningCertificate) + end + def list_connection_saml_sp_signing_cert(connection_id:, request_options:); end + + sig do + params( + connection_id: String, + request_options: T::Hash[Symbol, T.untyped] + ).returns(WorkOS::SAMLSpSigningCertificate) + end + def create_connection_saml_sp_signing_cert(connection_id:, request_options:); end + + sig do + params( + connection_id: String, + certificate_id: String, + request_options: T::Hash[Symbol, T.untyped] + ).returns(NilClass) + end + def delete_connection_saml_sp_signing_cert(connection_id:, certificate_id:, request_options:); end + sig do params( id: String, @@ -32,6 +169,19 @@ module WorkOS end def get_connection(id:, request_options:); end + sig do + params( + id: String, + name: T.nilable(String), + external_id: T.nilable(String), + connection_type: T.nilable(String), + attribute_maps: T.nilable(WorkOS::PatchConnectionAttributeMaps), + protocol_options: T.nilable(T.any(WorkOS::SSO::PatchProtocolOptionsSAML, WorkOS::SSO::PatchProtocolOptionsOIDC)), + request_options: T::Hash[Symbol, T.untyped] + ).returns(WorkOS::Connection) + end + def update_connection(id:, name:, external_id:, connection_type:, attribute_maps:, protocol_options:, request_options:); end + sig do params( id: String, @@ -83,11 +233,14 @@ module WorkOS sig do params( - code: String, + code: T.nilable(String), + subject_token: T.nilable(String), + subject_token_type: T.nilable(String), + organization_id: T.nilable(String), request_options: T::Hash[Symbol, T.untyped] ).returns(WorkOS::SSOTokenResponse) end - def get_profile_and_token(code:, request_options:); end + def get_profile_and_token(code:, subject_token:, subject_token_type:, organization_id:, request_options:); end end end diff --git a/rbi/workos/team.rbi b/rbi/workos/team.rbi new file mode 100644 index 00000000..958dc539 --- /dev/null +++ b/rbi/workos/team.rbi @@ -0,0 +1,60 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class Team + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(String) } + def object; end + + sig { params(value: String).returns(String) } + def object=(value); end + + sig { returns(String) } + def id; end + + sig { params(value: String).returns(String) } + def id=(value); end + + sig { returns(String) } + def name; end + + sig { params(value: String).returns(String) } + def name=(value); end + + sig { returns(String) } + def production_state; end + + sig { params(value: String).returns(String) } + def production_state=(value); end + + sig { returns(T.nilable(String)) } + def production_enabled_at; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def production_enabled_at=(value); end + + sig { returns(String) } + def created_at; end + + sig { params(value: String).returns(String) } + def created_at=(value); end + + sig { returns(String) } + def updated_at; end + + sig { params(value: String).returns(String) } + def updated_at=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/token_query.rbi b/rbi/workos/token_query.rbi index 5ba0982d..0cfc54d0 100644 --- a/rbi/workos/token_query.rbi +++ b/rbi/workos/token_query.rbi @@ -21,10 +21,10 @@ module WorkOS sig { params(value: String).returns(String) } def client_secret=(value); end - sig { returns(String) } + sig { returns(T.nilable(String)) } def code; end - sig { params(value: String).returns(String) } + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } def code=(value); end sig { returns(String) } @@ -33,6 +33,24 @@ module WorkOS sig { params(value: String).returns(String) } def grant_type=(value); end + sig { returns(T.nilable(String)) } + def subject_token; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def subject_token=(value); end + + sig { returns(T.nilable(String)) } + def subject_token_type; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def subject_token_type=(value); end + + sig { returns(T.nilable(String)) } + def organization_id; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def organization_id=(value); end + sig { returns(T::Hash[Symbol, T.untyped]) } def to_h; end diff --git a/rbi/workos/waitlist.rbi b/rbi/workos/waitlist.rbi new file mode 100644 index 00000000..e64d84f3 --- /dev/null +++ b/rbi/workos/waitlist.rbi @@ -0,0 +1,42 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class Waitlist + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(String) } + def object; end + + sig { params(value: String).returns(String) } + def object=(value); end + + sig { returns(String) } + def id; end + + sig { params(value: String).returns(String) } + def id=(value); end + + sig { returns(String) } + def created_at; end + + sig { params(value: String).returns(String) } + def created_at=(value); end + + sig { returns(String) } + def updated_at; end + + sig { params(value: String).returns(String) } + def updated_at=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/waitlist_entry.rbi b/rbi/workos/waitlist_entry.rbi new file mode 100644 index 00000000..bda7db0e --- /dev/null +++ b/rbi/workos/waitlist_entry.rbi @@ -0,0 +1,72 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class WaitlistEntry + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(String) } + def id; end + + sig { params(value: String).returns(String) } + def id=(value); end + + sig { returns(String) } + def email; end + + sig { params(value: String).returns(String) } + def email=(value); end + + sig { returns(String) } + def state; end + + sig { params(value: String).returns(String) } + def state=(value); end + + sig { returns(T.nilable(String)) } + def approved_at; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def approved_at=(value); end + + sig { returns(T.nilable(T::Hash[String, String])) } + def additional_fields; end + + sig { params(value: T.nilable(T::Hash[String, String])).returns(T.nilable(T::Hash[String, String])) } + def additional_fields=(value); end + + sig { returns(T.nilable(String)) } + def waitlist_id; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def waitlist_id=(value); end + + sig { returns(String) } + def created_at; end + + sig { params(value: String).returns(String) } + def created_at=(value); end + + sig { returns(String) } + def updated_at; end + + sig { params(value: String).returns(String) } + def updated_at=(value); end + + sig { returns(String) } + def object; end + + sig { params(value: String).returns(String) } + def object=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/waitlist_user.rbi b/rbi/workos/waitlist_user.rbi index 8e19a058..f94b55b6 100644 --- a/rbi/workos/waitlist_user.rbi +++ b/rbi/workos/waitlist_user.rbi @@ -9,12 +9,6 @@ module WorkOS sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } def initialize(json); end - sig { returns(String) } - def object; end - - sig { params(value: String).returns(String) } - def object=(value); end - sig { returns(String) } def id; end @@ -39,6 +33,12 @@ module WorkOS sig { params(value: T.nilable(String)).returns(T.nilable(String)) } def approved_at=(value); end + sig { returns(T.nilable(T::Hash[String, String])) } + def additional_fields; end + + sig { params(value: T.nilable(T::Hash[String, String])).returns(T.nilable(T::Hash[String, String])) } + def additional_fields=(value); end + sig { returns(T.nilable(String)) } def waitlist_id; end @@ -57,6 +57,12 @@ module WorkOS sig { params(value: String).returns(String) } def updated_at=(value); end + sig { returns(String) } + def object; end + + sig { params(value: String).returns(String) } + def object=(value); end + sig { returns(T::Hash[Symbol, T.untyped]) } def to_h; end diff --git a/test/workos/test_agents.rb b/test/workos/test_agents.rb index 70414562..dae8846b 100644 --- a/test/workos/test_agents.rb +++ b/test/workos/test_agents.rb @@ -11,6 +11,48 @@ def setup @client = WorkOS::Client.new(api_key: "sk_test_123") end + def test_list_blueprints_returns_expected_result + stub_request(:get, %r{\Ahttps://api\.workos\.com/agents/blueprints(\?|\z)}) + .to_return(body: '{"data": [], "list_metadata": {}}', status: 200) + result = @client.agents.list_blueprints + assert_kind_of WorkOS::Types::ListStruct, result + end + + def test_create_blueprint_returns_expected_result + stub_request(:post, %r{\Ahttps://api\.workos\.com/agents/blueprints(\?|\z)}) + .to_return(body: "{}", status: 200) + result = @client.agents.create_blueprint(name: "stub", session_settings: {}) + refute_nil result + end + + def test_get_blueprint_returns_expected_result + stub_request(:get, %r{\Ahttps://api\.workos\.com/agents/blueprints/stub(\?|\z)}) + .to_return(body: "{}", status: 200) + result = @client.agents.get_blueprint(agent_blueprint_id: "stub") + refute_nil result + end + + def test_update_blueprint_returns_expected_result + stub_request(:patch, %r{\Ahttps://api\.workos\.com/agents/blueprints/stub(\?|\z)}) + .to_return(body: "{}", status: 200) + result = @client.agents.update_blueprint(agent_blueprint_id: "stub") + refute_nil result + end + + def test_delete_blueprint_returns_expected_result + stub_request(:delete, %r{\Ahttps://api\.workos\.com/agents/blueprints/stub(\?|\z)}) + .to_return(body: "{}", status: 200) + result = @client.agents.delete_blueprint(agent_blueprint_id: "stub") + assert_nil result + end + + def test_create_blueprint_token_returns_expected_result + stub_request(:post, %r{\Ahttps://api\.workos\.com/agents/blueprints/stub/tokens(\?|\z)}) + .to_return(body: "{}", status: 200) + result = @client.agents.create_blueprint_token(agent_blueprint_id: "stub", type: "stub") + refute_nil result + end + def test_update_attempts_returns_expected_result stub_request(:patch, %r{\Ahttps://api\.workos\.com/agents/claims/attempts(\?|\z)}) .to_return(body: "{}", status: 200) @@ -32,11 +74,65 @@ def test_get_registration_returns_expected_result refute_nil result end + def test_list_instances_returns_expected_result + stub_request(:get, %r{\Ahttps://api\.workos\.com/agents/instances(\?|\z)}) + .to_return(body: '{"data": [], "list_metadata": {}}', status: 200) + result = @client.agents.list_instances + assert_kind_of WorkOS::Types::ListStruct, result + end + + def test_get_instance_returns_expected_result + stub_request(:get, %r{\Ahttps://api\.workos\.com/agents/instances/stub(\?|\z)}) + .to_return(body: "{}", status: 200) + result = @client.agents.get_instance(agent_instance_id: "stub") + refute_nil result + end + + def test_delete_instance_returns_expected_result + stub_request(:delete, %r{\Ahttps://api\.workos\.com/agents/instances/stub(\?|\z)}) + .to_return(body: "{}", status: 200) + result = @client.agents.delete_instance(agent_instance_id: "stub") + assert_nil result + end + + def test_list_sessions_returns_expected_result + stub_request(:get, %r{\Ahttps://api\.workos\.com/agents/sessions(\?|\z)}) + .to_return(body: '{"data": [], "list_metadata": {}}', status: 200) + result = @client.agents.list_sessions + assert_kind_of WorkOS::Types::ListStruct, result + end + + def test_get_session_returns_expected_result + stub_request(:get, %r{\Ahttps://api\.workos\.com/agents/sessions/stub(\?|\z)}) + .to_return(body: "{}", status: 200) + result = @client.agents.get_session(agent_instance_session_id: "stub") + refute_nil result + end + + def test_revoke_session_returns_expected_result + stub_request(:post, %r{\Ahttps://api\.workos\.com/agents/sessions/stub/revoke(\?|\z)}) + .to_return(body: "{}", status: 200) + result = @client.agents.revoke_session(agent_instance_session_id: "stub") + refute_nil result + end + # Parameterized authentication error tests (one per endpoint). [ + {name: :list_blueprints, verb: :get, url: %r{\Ahttps://api\.workos\.com/agents/blueprints(\?|\z)}}, + {name: :create_blueprint, verb: :post, url: %r{\Ahttps://api\.workos\.com/agents/blueprints(\?|\z)}, args: {name: "stub", session_settings: {}}}, + {name: :get_blueprint, verb: :get, url: %r{\Ahttps://api\.workos\.com/agents/blueprints/stub(\?|\z)}, args: {agent_blueprint_id: "stub"}}, + {name: :update_blueprint, verb: :patch, url: %r{\Ahttps://api\.workos\.com/agents/blueprints/stub(\?|\z)}, args: {agent_blueprint_id: "stub"}}, + {name: :delete_blueprint, verb: :delete, url: %r{\Ahttps://api\.workos\.com/agents/blueprints/stub(\?|\z)}, args: {agent_blueprint_id: "stub"}}, + {name: :create_blueprint_token, verb: :post, url: %r{\Ahttps://api\.workos\.com/agents/blueprints/stub/tokens(\?|\z)}, args: {agent_blueprint_id: "stub", type: "stub"}}, {name: :update_attempts, verb: :patch, url: %r{\Ahttps://api\.workos\.com/agents/claims/attempts(\?|\z)}, args: {type: "link_external_user", claim_attempt_token: "stub", user: {}}}, {name: :create_validate, verb: :post, url: %r{\Ahttps://api\.workos\.com/agents/credentials/validate(\?|\z)}, args: {type: "stub", credential: "stub"}}, - {name: :get_registration, verb: :get, url: %r{\Ahttps://api\.workos\.com/agents/registrations/stub(\?|\z)}, args: {id: "stub"}} + {name: :get_registration, verb: :get, url: %r{\Ahttps://api\.workos\.com/agents/registrations/stub(\?|\z)}, args: {id: "stub"}}, + {name: :list_instances, verb: :get, url: %r{\Ahttps://api\.workos\.com/agents/instances(\?|\z)}}, + {name: :get_instance, verb: :get, url: %r{\Ahttps://api\.workos\.com/agents/instances/stub(\?|\z)}, args: {agent_instance_id: "stub"}}, + {name: :delete_instance, verb: :delete, url: %r{\Ahttps://api\.workos\.com/agents/instances/stub(\?|\z)}, args: {agent_instance_id: "stub"}}, + {name: :list_sessions, verb: :get, url: %r{\Ahttps://api\.workos\.com/agents/sessions(\?|\z)}}, + {name: :get_session, verb: :get, url: %r{\Ahttps://api\.workos\.com/agents/sessions/stub(\?|\z)}, args: {agent_instance_session_id: "stub"}}, + {name: :revoke_session, verb: :post, url: %r{\Ahttps://api\.workos\.com/agents/sessions/stub/revoke(\?|\z)}, args: {agent_instance_session_id: "stub"}} ].each do |spec| define_method("test_#{spec[:name]}_raises_authentication_error_on_401") do stub_request(spec[:verb], spec[:url]) diff --git a/test/workos/test_agents_model_round_trip.rb b/test/workos/test_agents_model_round_trip.rb index 68801551..ac72a90a 100644 --- a/test/workos/test_agents_model_round_trip.rb +++ b/test/workos/test_agents_model_round_trip.rb @@ -56,6 +56,124 @@ def test_claim_view_response_round_trip fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } end + def test_agent_blueprint_round_trip + fixture = { + "object" => "agent_blueprint", + "id" => "stub", + "name" => "stub", + "description" => nil, + "permissions" => [], + "invocable_by" => {}, + "session_settings" => {}, + "created_at" => "stub", + "updated_at" => "stub" + } + model = WorkOS::AgentBlueprint.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + assert_equal fixture["id"], json[:id] + assert_equal fixture["name"], json[:name] + assert_nil json[:description] + assert_equal fixture["created_at"], json[:created_at] + assert_equal fixture["updated_at"], json[:updated_at] + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + + def test_agent_instance_round_trip + fixture = { + "object" => "agent_instance", + "id" => "stub", + "agent_blueprint_id" => "stub", + "organization_id" => "stub", + "organization_membership_id" => nil, + "type" => "stub", + "created_at" => "stub", + "updated_at" => "stub" + } + model = WorkOS::AgentInstance.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + assert_equal fixture["id"], json[:id] + assert_equal fixture["agent_blueprint_id"], json[:agent_blueprint_id] + assert_equal fixture["organization_id"], json[:organization_id] + assert_nil json[:organization_membership_id] + assert_equal fixture["created_at"], json[:created_at] + assert_equal fixture["updated_at"], json[:updated_at] + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + + def test_agent_token_round_trip + fixture = { + "access_token" => "stub", + "token_type" => "Bearer", + "expires_in" => 1, + "refresh_token" => "stub", + "agent_instance_id" => "stub", + "new_instance" => true, + "agent_instance_session_id" => "stub", + "permissions" => [] + } + model = WorkOS::AgentToken.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + assert_equal fixture["access_token"], json[:access_token] + assert_equal fixture["expires_in"], json[:expires_in] + assert_equal fixture["refresh_token"], json[:refresh_token] + assert_equal fixture["agent_instance_id"], json[:agent_instance_id] + assert_equal fixture["new_instance"], json[:new_instance] + assert_equal fixture["agent_instance_session_id"], json[:agent_instance_session_id] + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + + def test_agent_instance_session_round_trip + fixture = { + "object" => "agent_instance_session", + "id" => "stub", + "agent_instance_id" => "stub", + "status" => "stub", + "expires_at" => "stub", + "revoked_at" => nil, + "created_at" => "stub", + "updated_at" => "stub" + } + model = WorkOS::AgentInstanceSession.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + assert_equal fixture["id"], json[:id] + assert_equal fixture["agent_instance_id"], json[:agent_instance_id] + assert_equal fixture["expires_at"], json[:expires_at] + assert_nil json[:revoked_at] + assert_equal fixture["created_at"], json[:created_at] + assert_equal fixture["updated_at"], json[:updated_at] + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + + def test_agent_blueprint_invocable_by_round_trip + fixture = { + "role_slugs" => [], + "organization_ids" => [] + } + model = WorkOS::AgentBlueprintInvocableBy.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + + def test_agent_blueprint_session_setting_round_trip + fixture = { + "max_age_seconds" => 1, + "access_token_ttl_seconds" => 1, + "refresh_token_ttl_seconds" => 1 + } + model = WorkOS::AgentBlueprintSessionSetting.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + assert_equal fixture["max_age_seconds"], json[:max_age_seconds] + assert_equal fixture["access_token_ttl_seconds"], json[:access_token_ttl_seconds] + assert_equal fixture["refresh_token_ttl_seconds"], json[:refresh_token_ttl_seconds] + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + def test_claim_view_response_organization_round_trip fixture = { "id" => "stub", @@ -104,6 +222,99 @@ def test_agent_registration_claim_round_trip fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } end + def test_agent_blueprints_create_request_round_trip + fixture = { + "name" => "stub", + "description" => "stub", + "permissions" => [], + "invocable_by" => {}, + "session_settings" => {} + } + model = WorkOS::AgentBlueprintsCreateRequest.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + assert_equal fixture["name"], json[:name] + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + + def test_agent_blueprints_create_request_invocable_by_round_trip + fixture = { + "role_slugs" => [], + "organization_ids" => [] + } + model = WorkOS::AgentBlueprintsCreateRequestInvocableBy.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + + def test_agent_blueprints_create_request_session_setting_round_trip + fixture = { + "max_age_seconds" => 1, + "access_token_ttl_seconds" => 1, + "refresh_token_ttl_seconds" => 1 + } + model = WorkOS::AgentBlueprintsCreateRequestSessionSetting.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + assert_equal fixture["max_age_seconds"], json[:max_age_seconds] + assert_equal fixture["access_token_ttl_seconds"], json[:access_token_ttl_seconds] + assert_equal fixture["refresh_token_ttl_seconds"], json[:refresh_token_ttl_seconds] + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + + def test_agent_blueprints_update_request_round_trip + fixture = { + "name" => "stub", + "description" => nil, + "permissions" => [], + "invocable_by" => {}, + "session_settings" => {} + } + model = WorkOS::AgentBlueprintsUpdateRequest.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + + def test_agent_blueprints_update_request_invocable_by_round_trip + fixture = { + "role_slugs" => [], + "organization_ids" => [] + } + model = WorkOS::AgentBlueprintsUpdateRequestInvocableBy.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + + def test_agent_blueprints_update_request_session_setting_round_trip + fixture = { + "max_age_seconds" => 1, + "access_token_ttl_seconds" => 1, + "refresh_token_ttl_seconds" => 1 + } + model = WorkOS::AgentBlueprintsUpdateRequestSessionSetting.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + + def test_agent_blueprints_token_mint_token_request_round_trip + fixture = { + "type" => "stub", + "user_access_token" => "stub", + "intent" => "stub", + "organization_id" => "stub", + "agent_access_token" => "stub", + "refresh_token" => "stub" + } + model = WorkOS::AgentBlueprintsTokenMintTokenRequest.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + def test_agent_admin_link_claim_attempt_to_external_user_request_round_trip fixture = { "type" => "link_external_user", diff --git a/test/workos/test_authorization.rb b/test/workos/test_authorization.rb index 2c1cd2a2..7d674dc2 100644 --- a/test/workos/test_authorization.rb +++ b/test/workos/test_authorization.rb @@ -214,9 +214,9 @@ def test_update_resource_by_external_id_returns_expected_result def test_update_resource_by_external_id_with_parent_resource_by_external_id_returns_expected_result stub_request(:patch, %r{\Ahttps://api\.workos\.com/authorization/organizations/stub/resources/stub/stub(\?|\z)}) - .with(body: hash_including("parent_resource_external_id" => "stub", "parent_resource_type_slug" => "stub")) + .with(body: hash_including("parent_resource_type_slug" => "stub", "parent_resource_external_id" => "stub")) .to_return(body: "{}", status: 200) - result = @client.authorization.update_resource_by_external_id(organization_id: "stub", resource_type_slug: "stub", external_id: "stub", parent_resource: WorkOS::Authorization::ParentResourceByExternalId.new(parent_resource_external_id: "stub", parent_resource_type_slug: "stub")) + result = @client.authorization.update_resource_by_external_id(organization_id: "stub", resource_type_slug: "stub", external_id: "stub", parent_resource: WorkOS::Authorization::ParentResourceByExternalId.new(parent_resource_type_slug: "stub", parent_resource_external_id: "stub")) refute_nil result end @@ -265,9 +265,9 @@ def test_create_resource_returns_expected_result def test_create_resource_with_parent_resource_by_external_id_returns_expected_result stub_request(:post, %r{\Ahttps://api\.workos\.com/authorization/resources(\?|\z)}) - .with(body: hash_including("external_id" => "stub", "name" => "stub", "resource_type_slug" => "stub", "organization_id" => "stub", "parent_resource_external_id" => "stub", "parent_resource_type_slug" => "stub")) + .with(body: hash_including("external_id" => "stub", "name" => "stub", "resource_type_slug" => "stub", "organization_id" => "stub", "parent_resource_type_slug" => "stub", "parent_resource_external_id" => "stub")) .to_return(body: "{}", status: 200) - result = @client.authorization.create_resource(external_id: "stub", name: "stub", resource_type_slug: "stub", organization_id: "stub", parent_resource: WorkOS::Authorization::ParentResourceByExternalId.new(parent_resource_external_id: "stub", parent_resource_type_slug: "stub")) + result = @client.authorization.create_resource(external_id: "stub", name: "stub", resource_type_slug: "stub", organization_id: "stub", parent_resource: WorkOS::Authorization::ParentResourceByExternalId.new(parent_resource_type_slug: "stub", parent_resource_external_id: "stub")) refute_nil result end @@ -288,9 +288,9 @@ def test_update_resource_returns_expected_result def test_update_resource_with_parent_resource_by_external_id_returns_expected_result stub_request(:patch, %r{\Ahttps://api\.workos\.com/authorization/resources/stub(\?|\z)}) - .with(body: hash_including("parent_resource_external_id" => "stub", "parent_resource_type_slug" => "stub")) + .with(body: hash_including("parent_resource_type_slug" => "stub", "parent_resource_external_id" => "stub")) .to_return(body: "{}", status: 200) - result = @client.authorization.update_resource(resource_id: "stub", parent_resource: WorkOS::Authorization::ParentResourceByExternalId.new(parent_resource_external_id: "stub", parent_resource_type_slug: "stub")) + result = @client.authorization.update_resource(resource_id: "stub", parent_resource: WorkOS::Authorization::ParentResourceByExternalId.new(parent_resource_type_slug: "stub", parent_resource_external_id: "stub")) refute_nil result end diff --git a/test/workos/test_organizations.rb b/test/workos/test_organizations.rb index 438f3dc5..edec2f6a 100644 --- a/test/workos/test_organizations.rb +++ b/test/workos/test_organizations.rb @@ -67,6 +67,41 @@ def test_list_authorized_applications_returns_expected_result assert_kind_of WorkOS::Types::ListStruct, result end + def test_list_it_contacts_returns_expected_result + stub_request(:get, %r{\Ahttps://api\.workos\.com/organizations/stub/it_contacts(\?|\z)}) + .to_return(body: '{"data": [], "list_metadata": {}}', status: 200) + result = @client.organizations.list_it_contacts(organization_id: "stub") + assert_kind_of WorkOS::Types::ListStruct, result + end + + def test_create_it_contact_returns_expected_result + stub_request(:post, %r{\Ahttps://api\.workos\.com/organizations/stub/it_contacts(\?|\z)}) + .to_return(body: "{}", status: 200) + result = @client.organizations.create_it_contact(organization_id: "stub", email: "stub") + refute_nil result + end + + def test_delete_it_contact_returns_expected_result + stub_request(:delete, %r{\Ahttps://api\.workos\.com/organizations/stub/it_contacts/stub(\?|\z)}) + .to_return(body: "{}", status: 200) + result = @client.organizations.delete_it_contact(organization_id: "stub", contact_id: "stub") + assert_nil result + end + + def test_invite_it_contact_returns_expected_result + stub_request(:post, %r{\Ahttps://api\.workos\.com/organizations/stub/it_contacts/stub/invite(\?|\z)}) + .to_return(body: "{}", status: 200) + result = @client.organizations.invite_it_contact(organization_id: "stub", contact_id: "stub", intents: ["stub"]) + assert_nil result + end + + def test_revoke_it_contact_returns_expected_result + stub_request(:post, %r{\Ahttps://api\.workos\.com/organizations/stub/it_contacts/stub/revoke(\?|\z)}) + .to_return(body: "{}", status: 200) + result = @client.organizations.revoke_it_contact(organization_id: "stub", contact_id: "stub") + assert_nil result + end + # Parameterized authentication error tests (one per endpoint). [ {name: :list_organizations, verb: :get, url: %r{\Ahttps://api\.workos\.com/organizations(\?|\z)}}, @@ -76,7 +111,12 @@ def test_list_authorized_applications_returns_expected_result {name: :update_organization, verb: :put, url: %r{\Ahttps://api\.workos\.com/organizations/stub(\?|\z)}, args: {id: "stub"}}, {name: :delete_organization, verb: :delete, url: %r{\Ahttps://api\.workos\.com/organizations/stub(\?|\z)}, args: {id: "stub"}}, {name: :get_audit_log_configuration, verb: :get, url: %r{\Ahttps://api\.workos\.com/organizations/stub/audit_log_configuration(\?|\z)}, args: {id: "stub"}}, - {name: :list_authorized_applications, verb: :get, url: %r{\Ahttps://api\.workos\.com/organizations/stub/authorized_applications(\?|\z)}, args: {organization_id: "stub"}} + {name: :list_authorized_applications, verb: :get, url: %r{\Ahttps://api\.workos\.com/organizations/stub/authorized_applications(\?|\z)}, args: {organization_id: "stub"}}, + {name: :list_it_contacts, verb: :get, url: %r{\Ahttps://api\.workos\.com/organizations/stub/it_contacts(\?|\z)}, args: {organization_id: "stub"}}, + {name: :create_it_contact, verb: :post, url: %r{\Ahttps://api\.workos\.com/organizations/stub/it_contacts(\?|\z)}, args: {organization_id: "stub", email: "stub"}}, + {name: :delete_it_contact, verb: :delete, url: %r{\Ahttps://api\.workos\.com/organizations/stub/it_contacts/stub(\?|\z)}, args: {organization_id: "stub", contact_id: "stub"}}, + {name: :invite_it_contact, verb: :post, url: %r{\Ahttps://api\.workos\.com/organizations/stub/it_contacts/stub/invite(\?|\z)}, args: {organization_id: "stub", contact_id: "stub", intents: ["stub"]}}, + {name: :revoke_it_contact, verb: :post, url: %r{\Ahttps://api\.workos\.com/organizations/stub/it_contacts/stub/revoke(\?|\z)}, args: {organization_id: "stub", contact_id: "stub"}} ].each do |spec| define_method("test_#{spec[:name]}_raises_authentication_error_on_401") do stub_request(spec[:verb], spec[:url]) diff --git a/test/workos/test_organizations_model_round_trip.rb b/test/workos/test_organizations_model_round_trip.rb index 8d459445..3eff0f6c 100644 --- a/test/workos/test_organizations_model_round_trip.rb +++ b/test/workos/test_organizations_model_round_trip.rb @@ -7,12 +7,33 @@ class OrganizationsModelRoundTripTest < Minitest::Test def test_update_audit_logs_retention_round_trip fixture = { + "retention_period" => "stub", "retention_period_in_days" => 1 } model = WorkOS::UpdateAuditLogsRetention.new(fixture.to_json) json = model.to_h assert_kind_of Hash, json - assert_equal fixture["retention_period_in_days"], json[:retention_period_in_days] + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + + def test_create_it_contact_round_trip + fixture = { + "email" => "stub" + } + model = WorkOS::CreateItContact.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + assert_equal fixture["email"], json[:email] + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + + def test_invite_it_contact_round_trip + fixture = { + "intents" => [] + } + model = WorkOS::InviteItContact.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } end @@ -544,6 +565,24 @@ def test_organization_api_key_round_trip fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } end + def test_it_contact_round_trip + fixture = { + "object" => "it_contact", + "id" => "stub", + "email" => "stub", + "created_at" => "stub", + "updated_at" => "stub" + } + model = WorkOS::ItContact.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + assert_equal fixture["id"], json[:id] + assert_equal fixture["email"], json[:email] + assert_equal fixture["created_at"], json[:created_at] + assert_equal fixture["updated_at"], json[:updated_at] + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + def test_organization_round_trip fixture = { "object" => "organization", diff --git a/test/workos/test_platform_teams.rb b/test/workos/test_platform_teams.rb new file mode 100644 index 00000000..08cd2a1a --- /dev/null +++ b/test/workos/test_platform_teams.rb @@ -0,0 +1,41 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +require "test_helper" + +class PlatformTeamsTest < Minitest::Test + include FixtureHelper + + def setup + @client = WorkOS::Client.new(api_key: "sk_test_123") + end + + def test_create_team_returns_expected_result + stub_request(:post, %r{\Ahttps://api\.workos\.com/platform/teams(\?|\z)}) + .to_return(body: "{}", status: 200) + result = @client.platform_teams.create_team(admin_email: "stub", name: "stub") + refute_nil result + end + + def test_get_team_returns_expected_result + stub_request(:get, %r{\Ahttps://api\.workos\.com/platform/teams/stub(\?|\z)}) + .to_return(body: "{}", status: 200) + result = @client.platform_teams.get_team(team_id: "stub") + refute_nil result + end + + # Parameterized authentication error tests (one per endpoint). + [ + {name: :create_team, verb: :post, url: %r{\Ahttps://api\.workos\.com/platform/teams(\?|\z)}, args: {admin_email: "stub", name: "stub"}}, + {name: :get_team, verb: :get, url: %r{\Ahttps://api\.workos\.com/platform/teams/stub(\?|\z)}, args: {team_id: "stub"}} + ].each do |spec| + define_method("test_#{spec[:name]}_raises_authentication_error_on_401") do + stub_request(spec[:verb], spec[:url]) + .to_return(body: '{"message": "Unauthorized"}', status: 401) + assert_raises(WorkOS::AuthenticationError) do + @client.platform_teams.send(spec[:name], **(spec[:args] || {})) + end + end + end +end diff --git a/test/workos/test_platform_teams_model_round_trip.rb b/test/workos/test_platform_teams_model_round_trip.rb new file mode 100644 index 00000000..897a5971 --- /dev/null +++ b/test/workos/test_platform_teams_model_round_trip.rb @@ -0,0 +1,41 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +require "test_helper" + +class PlatformTeamsModelRoundTripTest < Minitest::Test + def test_create_team_round_trip + fixture = { + "admin_email" => "stub", + "name" => "stub" + } + model = WorkOS::CreateTeam.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + assert_equal fixture["admin_email"], json[:admin_email] + assert_equal fixture["name"], json[:name] + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + + def test_team_round_trip + fixture = { + "object" => "team", + "id" => "stub", + "name" => "stub", + "production_state" => "stub", + "production_enabled_at" => nil, + "created_at" => "stub", + "updated_at" => "stub" + } + model = WorkOS::Team.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + assert_equal fixture["id"], json[:id] + assert_equal fixture["name"], json[:name] + assert_nil json[:production_enabled_at] + assert_equal fixture["created_at"], json[:created_at] + assert_equal fixture["updated_at"], json[:updated_at] + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end +end diff --git a/test/workos/test_shared_model_round_trip.rb b/test/workos/test_shared_model_round_trip.rb index 13cef9f2..08fbae2c 100644 --- a/test/workos/test_shared_model_round_trip.rb +++ b/test/workos/test_shared_model_round_trip.rb @@ -176,14 +176,15 @@ def test_pipe_connected_account_round_trip def test_waitlist_user_round_trip fixture = { - "object" => "waitlist_user", "id" => "stub", "email" => "stub", "state" => "stub", "approved_at" => nil, + "additional_fields" => {}, "waitlist_id" => nil, "created_at" => "stub", - "updated_at" => "stub" + "updated_at" => "stub", + "object" => "waitlist_user" } model = WorkOS::WaitlistUser.new(fixture.to_json) json = model.to_h @@ -214,6 +215,336 @@ def test_event_schema_round_trip fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } end + def test_agent_blueprint_created_round_trip + fixture = { + "object" => "event", + "id" => "stub", + "event" => "agent.blueprint.created", + "data" => {}, + "created_at" => "stub", + "context" => {} + } + model = WorkOS::AgentBlueprintCreated.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + assert_equal fixture["id"], json[:id] + assert_equal fixture["created_at"], json[:created_at] + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + + def test_agent_blueprint_created_data_round_trip + fixture = { + "object" => "agent_blueprint", + "id" => "stub", + "name" => "stub", + "description" => nil, + "permissions" => [], + "invocable_by" => {}, + "session_settings" => {}, + "created_at" => "stub", + "updated_at" => "stub" + } + model = WorkOS::AgentBlueprintCreatedData.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + assert_equal fixture["id"], json[:id] + assert_equal fixture["name"], json[:name] + assert_nil json[:description] + assert_equal fixture["created_at"], json[:created_at] + assert_equal fixture["updated_at"], json[:updated_at] + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + + def test_agent_blueprint_created_data_invocable_by_round_trip + fixture = { + "role_slugs" => [], + "organization_ids" => [] + } + model = WorkOS::AgentBlueprintCreatedDataInvocableBy.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + + def test_agent_blueprint_created_data_session_setting_round_trip + fixture = { + "max_age_seconds" => 1.0, + "access_token_ttl_seconds" => 1.0, + "refresh_token_ttl_seconds" => 1.0 + } + model = WorkOS::AgentBlueprintCreatedDataSessionSetting.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + assert_equal fixture["max_age_seconds"], json[:max_age_seconds] + assert_equal fixture["access_token_ttl_seconds"], json[:access_token_ttl_seconds] + assert_equal fixture["refresh_token_ttl_seconds"], json[:refresh_token_ttl_seconds] + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + + def test_agent_blueprint_deleted_round_trip + fixture = { + "object" => "event", + "id" => "stub", + "event" => "agent.blueprint.deleted", + "data" => {}, + "created_at" => "stub", + "context" => {} + } + model = WorkOS::AgentBlueprintDeleted.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + assert_equal fixture["id"], json[:id] + assert_equal fixture["created_at"], json[:created_at] + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + + def test_agent_blueprint_deleted_data_round_trip + fixture = { + "object" => "agent_blueprint", + "id" => "stub", + "name" => "stub", + "created_at" => "stub", + "updated_at" => "stub" + } + model = WorkOS::AgentBlueprintDeletedData.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + assert_equal fixture["id"], json[:id] + assert_equal fixture["name"], json[:name] + assert_equal fixture["created_at"], json[:created_at] + assert_equal fixture["updated_at"], json[:updated_at] + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + + def test_agent_blueprint_updated_round_trip + fixture = { + "object" => "event", + "id" => "stub", + "event" => "agent.blueprint.updated", + "data" => {}, + "created_at" => "stub", + "context" => {} + } + model = WorkOS::AgentBlueprintUpdated.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + assert_equal fixture["id"], json[:id] + assert_equal fixture["created_at"], json[:created_at] + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + + def test_agent_blueprint_updated_data_round_trip + fixture = { + "object" => "agent_blueprint", + "id" => "stub", + "name" => "stub", + "description" => nil, + "permissions" => [], + "invocable_by" => {}, + "session_settings" => {}, + "created_at" => "stub", + "updated_at" => "stub" + } + model = WorkOS::AgentBlueprintUpdatedData.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + assert_equal fixture["id"], json[:id] + assert_equal fixture["name"], json[:name] + assert_nil json[:description] + assert_equal fixture["created_at"], json[:created_at] + assert_equal fixture["updated_at"], json[:updated_at] + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + + def test_agent_blueprint_updated_data_invocable_by_round_trip + fixture = { + "role_slugs" => [], + "organization_ids" => [] + } + model = WorkOS::AgentBlueprintUpdatedDataInvocableBy.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + + def test_agent_blueprint_updated_data_session_setting_round_trip + fixture = { + "max_age_seconds" => 1.0, + "access_token_ttl_seconds" => 1.0, + "refresh_token_ttl_seconds" => 1.0 + } + model = WorkOS::AgentBlueprintUpdatedDataSessionSetting.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + assert_equal fixture["max_age_seconds"], json[:max_age_seconds] + assert_equal fixture["access_token_ttl_seconds"], json[:access_token_ttl_seconds] + assert_equal fixture["refresh_token_ttl_seconds"], json[:refresh_token_ttl_seconds] + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + + def test_agent_instance_created_round_trip + fixture = { + "object" => "event", + "id" => "stub", + "event" => "agent.instance.created", + "data" => {}, + "created_at" => "stub", + "context" => {} + } + model = WorkOS::AgentInstanceCreated.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + assert_equal fixture["id"], json[:id] + assert_equal fixture["created_at"], json[:created_at] + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + + def test_agent_instance_created_data_round_trip + fixture = { + "object" => "agent_instance", + "id" => "stub", + "agent_blueprint_id" => "stub", + "organization_id" => "stub", + "organization_membership_id" => nil, + "type" => "stub", + "created_at" => "stub", + "updated_at" => "stub" + } + model = WorkOS::AgentInstanceCreatedData.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + assert_equal fixture["id"], json[:id] + assert_equal fixture["agent_blueprint_id"], json[:agent_blueprint_id] + assert_equal fixture["organization_id"], json[:organization_id] + assert_nil json[:organization_membership_id] + assert_equal fixture["created_at"], json[:created_at] + assert_equal fixture["updated_at"], json[:updated_at] + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + + def test_agent_instance_deleted_round_trip + fixture = { + "object" => "event", + "id" => "stub", + "event" => "agent.instance.deleted", + "data" => {}, + "created_at" => "stub", + "context" => {} + } + model = WorkOS::AgentInstanceDeleted.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + assert_equal fixture["id"], json[:id] + assert_equal fixture["created_at"], json[:created_at] + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + + def test_agent_instance_deleted_data_round_trip + fixture = { + "object" => "agent_instance", + "id" => "stub", + "agent_blueprint_id" => "stub", + "organization_id" => "stub", + "organization_membership_id" => nil, + "type" => "stub", + "created_at" => "stub", + "updated_at" => "stub" + } + model = WorkOS::AgentInstanceDeletedData.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + assert_equal fixture["id"], json[:id] + assert_equal fixture["agent_blueprint_id"], json[:agent_blueprint_id] + assert_equal fixture["organization_id"], json[:organization_id] + assert_nil json[:organization_membership_id] + assert_equal fixture["created_at"], json[:created_at] + assert_equal fixture["updated_at"], json[:updated_at] + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + + def test_agent_instance_session_created_round_trip + fixture = { + "object" => "event", + "id" => "stub", + "event" => "agent.instance.session.created", + "data" => {}, + "created_at" => "stub", + "context" => {} + } + model = WorkOS::AgentInstanceSessionCreated.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + assert_equal fixture["id"], json[:id] + assert_equal fixture["created_at"], json[:created_at] + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + + def test_agent_instance_session_created_data_round_trip + fixture = { + "object" => "agent_instance_session", + "id" => "stub", + "agent_instance_id" => "stub", + "organization_id" => "stub", + "expires_at" => "stub", + "revoked_at" => nil, + "created_at" => "stub", + "updated_at" => "stub", + "permission_slugs" => [] + } + model = WorkOS::AgentInstanceSessionCreatedData.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + assert_equal fixture["id"], json[:id] + assert_equal fixture["agent_instance_id"], json[:agent_instance_id] + assert_equal fixture["organization_id"], json[:organization_id] + assert_equal fixture["expires_at"], json[:expires_at] + assert_nil json[:revoked_at] + assert_equal fixture["created_at"], json[:created_at] + assert_equal fixture["updated_at"], json[:updated_at] + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + + def test_agent_instance_session_revoked_round_trip + fixture = { + "object" => "event", + "id" => "stub", + "event" => "agent.instance.session.revoked", + "data" => {}, + "created_at" => "stub", + "context" => {} + } + model = WorkOS::AgentInstanceSessionRevoked.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + assert_equal fixture["id"], json[:id] + assert_equal fixture["created_at"], json[:created_at] + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + + def test_agent_instance_session_revoked_data_round_trip + fixture = { + "object" => "agent_instance_session", + "id" => "stub", + "agent_instance_id" => "stub", + "organization_id" => "stub", + "expires_at" => "stub", + "revoked_at" => nil, + "created_at" => "stub", + "updated_at" => "stub" + } + model = WorkOS::AgentInstanceSessionRevokedData.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + assert_equal fixture["id"], json[:id] + assert_equal fixture["agent_instance_id"], json[:agent_instance_id] + assert_equal fixture["organization_id"], json[:organization_id] + assert_equal fixture["expires_at"], json[:expires_at] + assert_nil json[:revoked_at] + assert_equal fixture["created_at"], json[:created_at] + assert_equal fixture["updated_at"], json[:updated_at] + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + def test_agent_registration_claim_attempt_created_round_trip fixture = { "object" => "event", @@ -804,6 +1135,122 @@ def test_radar_challenge_created_data_round_trip fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } end + def test_resource_export_completed_round_trip + fixture = { + "object" => "event", + "id" => "stub", + "event" => "resource_export.completed", + "data" => {}, + "created_at" => "stub", + "context" => {} + } + model = WorkOS::ResourceExportCompleted.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + assert_equal fixture["id"], json[:id] + assert_equal fixture["created_at"], json[:created_at] + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + + def test_resource_export_completed_data_round_trip + fixture = { + "id" => "stub", + "resource_type" => "stub" + } + model = WorkOS::ResourceExportCompletedData.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + assert_equal fixture["id"], json[:id] + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + + def test_resource_export_created_round_trip + fixture = { + "object" => "event", + "id" => "stub", + "event" => "resource_export.created", + "data" => {}, + "created_at" => "stub", + "context" => {} + } + model = WorkOS::ResourceExportCreated.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + assert_equal fixture["id"], json[:id] + assert_equal fixture["created_at"], json[:created_at] + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + + def test_resource_export_created_data_round_trip + fixture = { + "id" => "stub", + "resource_type" => "stub" + } + model = WorkOS::ResourceExportCreatedData.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + assert_equal fixture["id"], json[:id] + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + + def test_resource_export_downloaded_round_trip + fixture = { + "object" => "event", + "id" => "stub", + "event" => "resource_export.downloaded", + "data" => {}, + "created_at" => "stub", + "context" => {} + } + model = WorkOS::ResourceExportDownloaded.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + assert_equal fixture["id"], json[:id] + assert_equal fixture["created_at"], json[:created_at] + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + + def test_resource_export_downloaded_data_round_trip + fixture = { + "id" => "stub", + "resource_type" => "stub" + } + model = WorkOS::ResourceExportDownloadedData.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + assert_equal fixture["id"], json[:id] + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + + def test_resource_export_failed_round_trip + fixture = { + "object" => "event", + "id" => "stub", + "event" => "resource_export.failed", + "data" => {}, + "created_at" => "stub", + "context" => {} + } + model = WorkOS::ResourceExportFailed.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + assert_equal fixture["id"], json[:id] + assert_equal fixture["created_at"], json[:created_at] + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + + def test_resource_export_failed_data_round_trip + fixture = { + "id" => "stub", + "resource_type" => "stub" + } + model = WorkOS::ResourceExportFailedData.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + assert_equal fixture["id"], json[:id] + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + def test_waitlist_user_approved_round_trip fixture = { "object" => "event", diff --git a/test/workos/test_sso.rb b/test/workos/test_sso.rb index f6e16efb..79562872 100644 --- a/test/workos/test_sso.rb +++ b/test/workos/test_sso.rb @@ -18,6 +18,85 @@ def test_list_connections_returns_expected_result assert_kind_of WorkOS::Types::ListStruct, result end + def test_create_connection_returns_expected_result + stub_request(:post, %r{\Ahttps://api\.workos\.com/connections(\?|\z)}) + .with(body: hash_including("organization_id" => "stub", "saml_options" => {})) + .to_return(body: "{}", status: 200) + result = @client.sso.create_connection(organization_id: "stub", protocol_options: WorkOS::SSO::CreateProtocolOptionsSAML.new(saml_options: {})) + refute_nil result + end + + def test_create_connection_with_protocol_options_oidc_returns_expected_result + stub_request(:post, %r{\Ahttps://api\.workos\.com/connections(\?|\z)}) + .with(body: hash_including("organization_id" => "stub", "oidc_options" => {})) + .to_return(body: "{}", status: 200) + result = @client.sso.create_connection(organization_id: "stub", protocol_options: WorkOS::SSO::CreateProtocolOptionsOIDC.new(oidc_options: {})) + refute_nil result + end + + def test_list_connection_saml_idp_signing_certs_returns_expected_result + stub_request(:get, %r{\Ahttps://api\.workos\.com/connections/stub/saml_idp_signing_certs(\?|\z)}) + .to_return(body: "{}", status: 200) + result = @client.sso.list_connection_saml_idp_signing_certs(connection_id: "stub") + refute_nil result + end + + def test_create_connection_saml_idp_signing_cert_returns_expected_result + stub_request(:post, %r{\Ahttps://api\.workos\.com/connections/stub/saml_idp_signing_certs(\?|\z)}) + .to_return(body: "{}", status: 200) + result = @client.sso.create_connection_saml_idp_signing_cert(connection_id: "stub", value: "stub") + refute_nil result + end + + def test_delete_connection_saml_idp_signing_cert_returns_expected_result + stub_request(:delete, %r{\Ahttps://api\.workos\.com/connections/stub/saml_idp_signing_certs/stub(\?|\z)}) + .to_return(body: "{}", status: 200) + result = @client.sso.delete_connection_saml_idp_signing_cert(connection_id: "stub", certificate_id: "stub") + assert_nil result + end + + def test_list_connection_saml_sp_encryption_certs_returns_expected_result + stub_request(:get, %r{\Ahttps://api\.workos\.com/connections/stub/saml_sp_encryption_certs(\?|\z)}) + .to_return(body: "{}", status: 200) + result = @client.sso.list_connection_saml_sp_encryption_certs(connection_id: "stub") + refute_nil result + end + + def test_create_connection_saml_sp_encryption_cert_returns_expected_result + stub_request(:post, %r{\Ahttps://api\.workos\.com/connections/stub/saml_sp_encryption_certs(\?|\z)}) + .to_return(body: "{}", status: 200) + result = @client.sso.create_connection_saml_sp_encryption_cert(connection_id: "stub") + refute_nil result + end + + def test_delete_connection_saml_sp_encryption_cert_returns_expected_result + stub_request(:delete, %r{\Ahttps://api\.workos\.com/connections/stub/saml_sp_encryption_certs/stub(\?|\z)}) + .to_return(body: "{}", status: 200) + result = @client.sso.delete_connection_saml_sp_encryption_cert(connection_id: "stub", certificate_id: "stub") + assert_nil result + end + + def test_list_connection_saml_sp_signing_cert_returns_expected_result + stub_request(:get, %r{\Ahttps://api\.workos\.com/connections/stub/saml_sp_signing_cert(\?|\z)}) + .to_return(body: "{}", status: 200) + result = @client.sso.list_connection_saml_sp_signing_cert(connection_id: "stub") + refute_nil result + end + + def test_create_connection_saml_sp_signing_cert_returns_expected_result + stub_request(:post, %r{\Ahttps://api\.workos\.com/connections/stub/saml_sp_signing_cert(\?|\z)}) + .to_return(body: "{}", status: 200) + result = @client.sso.create_connection_saml_sp_signing_cert(connection_id: "stub") + refute_nil result + end + + def test_delete_connection_saml_sp_signing_cert_returns_expected_result + stub_request(:delete, %r{\Ahttps://api\.workos\.com/connections/stub/saml_sp_signing_cert/stub(\?|\z)}) + .to_return(body: "{}", status: 200) + result = @client.sso.delete_connection_saml_sp_signing_cert(connection_id: "stub", certificate_id: "stub") + assert_nil result + end + def test_get_connection_returns_expected_result stub_request(:get, %r{\Ahttps://api\.workos\.com/connections/stub(\?|\z)}) .to_return(body: "{}", status: 200) @@ -25,6 +104,22 @@ def test_get_connection_returns_expected_result refute_nil result end + def test_update_connection_returns_expected_result + stub_request(:patch, %r{\Ahttps://api\.workos\.com/connections/stub(\?|\z)}) + .with(body: hash_including("saml_options" => {})) + .to_return(body: "{}", status: 200) + result = @client.sso.update_connection(id: "stub", protocol_options: WorkOS::SSO::PatchProtocolOptionsSAML.new(saml_options: {})) + refute_nil result + end + + def test_update_connection_with_protocol_options_oidc_returns_expected_result + stub_request(:patch, %r{\Ahttps://api\.workos\.com/connections/stub(\?|\z)}) + .with(body: hash_including("oidc_options" => {})) + .to_return(body: "{}", status: 200) + result = @client.sso.update_connection(id: "stub", protocol_options: WorkOS::SSO::PatchProtocolOptionsOIDC.new(oidc_options: {})) + refute_nil result + end + def test_delete_connection_returns_expected_result stub_request(:delete, %r{\Ahttps://api\.workos\.com/connections/stub(\?|\z)}) .to_return(body: "{}", status: 200) @@ -49,18 +144,29 @@ def test_get_profile_returns_expected_result def test_get_profile_and_token_returns_expected_result stub_request(:post, %r{\Ahttps://api\.workos\.com/sso/token(\?|\z)}) .to_return(body: "{}", status: 200) - result = @client.sso.get_profile_and_token(code: "stub") + result = @client.sso.get_profile_and_token refute_nil result end # Parameterized authentication error tests (one per endpoint). [ {name: :list_connections, verb: :get, url: %r{\Ahttps://api\.workos\.com/connections(\?|\z)}}, + {name: :create_connection, verb: :post, url: %r{\Ahttps://api\.workos\.com/connections(\?|\z)}, args: {organization_id: "stub", protocol_options: WorkOS::SSO::CreateProtocolOptionsSAML.new(saml_options: {})}}, + {name: :list_connection_saml_idp_signing_certs, verb: :get, url: %r{\Ahttps://api\.workos\.com/connections/stub/saml_idp_signing_certs(\?|\z)}, args: {connection_id: "stub"}}, + {name: :create_connection_saml_idp_signing_cert, verb: :post, url: %r{\Ahttps://api\.workos\.com/connections/stub/saml_idp_signing_certs(\?|\z)}, args: {connection_id: "stub", value: "stub"}}, + {name: :delete_connection_saml_idp_signing_cert, verb: :delete, url: %r{\Ahttps://api\.workos\.com/connections/stub/saml_idp_signing_certs/stub(\?|\z)}, args: {connection_id: "stub", certificate_id: "stub"}}, + {name: :list_connection_saml_sp_encryption_certs, verb: :get, url: %r{\Ahttps://api\.workos\.com/connections/stub/saml_sp_encryption_certs(\?|\z)}, args: {connection_id: "stub"}}, + {name: :create_connection_saml_sp_encryption_cert, verb: :post, url: %r{\Ahttps://api\.workos\.com/connections/stub/saml_sp_encryption_certs(\?|\z)}, args: {connection_id: "stub"}}, + {name: :delete_connection_saml_sp_encryption_cert, verb: :delete, url: %r{\Ahttps://api\.workos\.com/connections/stub/saml_sp_encryption_certs/stub(\?|\z)}, args: {connection_id: "stub", certificate_id: "stub"}}, + {name: :list_connection_saml_sp_signing_cert, verb: :get, url: %r{\Ahttps://api\.workos\.com/connections/stub/saml_sp_signing_cert(\?|\z)}, args: {connection_id: "stub"}}, + {name: :create_connection_saml_sp_signing_cert, verb: :post, url: %r{\Ahttps://api\.workos\.com/connections/stub/saml_sp_signing_cert(\?|\z)}, args: {connection_id: "stub"}}, + {name: :delete_connection_saml_sp_signing_cert, verb: :delete, url: %r{\Ahttps://api\.workos\.com/connections/stub/saml_sp_signing_cert/stub(\?|\z)}, args: {connection_id: "stub", certificate_id: "stub"}}, {name: :get_connection, verb: :get, url: %r{\Ahttps://api\.workos\.com/connections/stub(\?|\z)}, args: {id: "stub"}}, + {name: :update_connection, verb: :patch, url: %r{\Ahttps://api\.workos\.com/connections/stub(\?|\z)}, args: {id: "stub", protocol_options: WorkOS::SSO::PatchProtocolOptionsSAML.new(saml_options: {})}}, {name: :delete_connection, verb: :delete, url: %r{\Ahttps://api\.workos\.com/connections/stub(\?|\z)}, args: {id: "stub"}}, {name: :authorize_logout, verb: :post, url: %r{\Ahttps://api\.workos\.com/sso/logout/authorize(\?|\z)}, args: {profile_id: "stub"}}, {name: :get_profile, verb: :get, url: %r{\Ahttps://api\.workos\.com/sso/profile(\?|\z)}}, - {name: :get_profile_and_token, verb: :post, url: %r{\Ahttps://api\.workos\.com/sso/token(\?|\z)}, args: {code: "stub"}} + {name: :get_profile_and_token, verb: :post, url: %r{\Ahttps://api\.workos\.com/sso/token(\?|\z)}} ].each do |spec| define_method("test_#{spec[:name]}_raises_authentication_error_on_401") do stub_request(spec[:verb], spec[:url]) diff --git a/test/workos/test_sso_model_round_trip.rb b/test/workos/test_sso_model_round_trip.rb index e7e4f46b..9a36b742 100644 --- a/test/workos/test_sso_model_round_trip.rb +++ b/test/workos/test_sso_model_round_trip.rb @@ -5,19 +5,197 @@ require "test_helper" class SsoModelRoundTripTest < Minitest::Test + def test_create_connection_key_pair_round_trip + fixture = { + "key" => "stub", + "cert" => "stub" + } + model = WorkOS::CreateConnectionKeyPair.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + assert_equal fixture["key"], json[:key] + assert_equal fixture["cert"], json[:cert] + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + + def test_create_connection_saml_options_round_trip + fixture = { + "idp_metadata_url" => "stub", + "acs_url" => "stub", + "sp_entity_id" => "stub", + "idp_entity_id" => "stub", + "idp_sso_url" => "stub", + "idp_signing_certs" => [], + "sp_signing_key_pair" => {}, + "sp_encryption_key_pairs" => [] + } + model = WorkOS::CreateConnectionSAMLOptions.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + + def test_create_connection_oidc_options_round_trip + fixture = { + "discovery_endpoint" => "stub", + "client_id" => "stub", + "client_secret" => "stub", + "redirect_uri" => "stub", + "pkce" => true, + "token_authentication_method" => "stub", + "jwt_signing_key_pair" => {}, + "id_token_signature_algorithm" => "stub", + "fetch_user_info" => true + } + model = WorkOS::CreateConnectionOIDCOptions.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + assert_equal fixture["discovery_endpoint"], json[:discovery_endpoint] + assert_equal fixture["client_id"], json[:client_id] + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + + def test_create_connection_standard_attributes_round_trip + fixture = { + "idp_id" => "stub", + "email" => "stub", + "first_name" => "stub", + "last_name" => "stub", + "groups" => nil, + "name" => nil + } + model = WorkOS::CreateConnectionStandardAttributes.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + + def test_create_connection_attribute_maps_round_trip + fixture = { + "standard_attributes" => {}, + "custom_attributes" => {} + } + model = WorkOS::CreateConnectionAttributeMaps.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + + def test_create_connection_round_trip + fixture = { + "organization_id" => "stub", + "name" => "stub", + "external_id" => "stub", + "connection_type" => "stub", + "attribute_maps" => {}, + "saml_options" => {}, + "oidc_options" => {} + } + model = WorkOS::CreateConnection.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + assert_equal fixture["organization_id"], json[:organization_id] + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + + def test_patch_connection_saml_options_round_trip + fixture = { + "idp_metadata_url" => nil, + "acs_url" => nil, + "sp_entity_id" => nil, + "idp_entity_id" => "stub", + "idp_sso_url" => "stub" + } + model = WorkOS::PatchConnectionSAMLOptions.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + + def test_patch_connection_oidc_options_round_trip + fixture = { + "discovery_endpoint" => "stub", + "client_id" => "stub", + "client_secret" => "stub", + "redirect_uri" => nil, + "pkce" => true, + "token_authentication_method" => "stub", + "id_token_signature_algorithm" => "stub", + "fetch_user_info" => true + } + model = WorkOS::PatchConnectionOIDCOptions.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + + def test_patch_connection_standard_attributes_round_trip + fixture = { + "idp_id" => "stub", + "email" => "stub", + "first_name" => "stub", + "last_name" => "stub", + "groups" => nil, + "name" => nil + } + model = WorkOS::PatchConnectionStandardAttributes.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + + def test_patch_connection_attribute_maps_round_trip + fixture = { + "standard_attributes" => {}, + "custom_attributes" => {} + } + model = WorkOS::PatchConnectionAttributeMaps.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + + def test_patch_connection_round_trip + fixture = { + "name" => "stub", + "external_id" => nil, + "connection_type" => "stub", + "attribute_maps" => {}, + "saml_options" => {}, + "oidc_options" => {} + } + model = WorkOS::PatchConnection.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + + def test_create_saml_idp_signing_certificate_round_trip + fixture = { + "value" => "stub" + } + model = WorkOS::CreateSAMLIdpSigningCertificate.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + assert_equal fixture["value"], json[:value] + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + def test_token_query_round_trip fixture = { "client_id" => "stub", "client_secret" => "stub", "code" => "stub", - "grant_type" => "authorization_code" + "grant_type" => "stub", + "subject_token" => "stub", + "subject_token_type" => "urn:ietf:params:oauth:token-type:id_token", + "organization_id" => "stub" } model = WorkOS::TokenQuery.new(fixture.to_json) json = model.to_h assert_kind_of Hash, json assert_equal fixture["client_id"], json[:client_id] assert_equal fixture["client_secret"], json[:client_secret] - assert_equal fixture["code"], json[:code] fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } end @@ -304,6 +482,88 @@ def test_connection_saml_certificate_renewed_data_certificate_round_trip fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } end + def test_saml_idp_signing_certificate_round_trip + fixture = { + "object" => "saml_idp_signing_certificate", + "id" => "stub", + "value" => "stub", + "not_before" => nil, + "not_after" => nil, + "created_at" => "stub" + } + model = WorkOS::SAMLIdpSigningCertificate.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + assert_equal fixture["id"], json[:id] + assert_equal fixture["value"], json[:value] + assert_nil json[:not_before] + assert_nil json[:not_after] + assert_equal fixture["created_at"], json[:created_at] + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + + def test_saml_idp_signing_certificate_list_round_trip + fixture = { + "object" => "list", + "data" => [] + } + model = WorkOS::SAMLIdpSigningCertificateList.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + + def test_saml_sp_encryption_certificate_round_trip + fixture = { + "object" => "saml_sp_encryption_certificate", + "id" => "stub", + "value" => "stub", + "not_before" => nil, + "not_after" => nil, + "created_at" => "stub" + } + model = WorkOS::SAMLSpEncryptionCertificate.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + assert_equal fixture["id"], json[:id] + assert_equal fixture["value"], json[:value] + assert_nil json[:not_before] + assert_nil json[:not_after] + assert_equal fixture["created_at"], json[:created_at] + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + + def test_saml_sp_encryption_certificate_list_round_trip + fixture = { + "object" => "list", + "data" => [] + } + model = WorkOS::SAMLSpEncryptionCertificateList.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + + def test_saml_sp_signing_certificate_round_trip + fixture = { + "object" => "saml_sp_signing_certificate", + "id" => "stub", + "value" => "stub", + "not_before" => nil, + "not_after" => nil, + "created_at" => "stub" + } + model = WorkOS::SAMLSpSigningCertificate.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + assert_equal fixture["id"], json[:id] + assert_equal fixture["value"], json[:value] + assert_nil json[:not_before] + assert_nil json[:not_after] + assert_equal fixture["created_at"], json[:created_at] + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + def test_sso_authorize_url_response_round_trip fixture = { "url" => "stub" From d14e50efc1fe782bf39e0c5741c00562bd51a38b Mon Sep 17 00:00:00 2001 From: "workos-sdk-automation[bot]" <255426317+workos-sdk-automation[bot]@users.noreply.github.com> Date: Tue, 1 Sep 2026 16:10:58 +0000 Subject: [PATCH 7/7] chore(generated): add release notes fragment --- ...67627615ba0a9db28194f68afd773d08ce9cbe7.md | 141 ++++++++++++++++++ 1 file changed, 141 insertions(+) create mode 100644 .changelog-pending/2026-09-01T16-10-58-667627615ba0a9db28194f68afd773d08ce9cbe7.md diff --git a/.changelog-pending/2026-09-01T16-10-58-667627615ba0a9db28194f68afd773d08ce9cbe7.md b/.changelog-pending/2026-09-01T16-10-58-667627615ba0a9db28194f68afd773d08ce9cbe7.md new file mode 100644 index 00000000..00d650bf --- /dev/null +++ b/.changelog-pending/2026-09-01T16-10-58-667627615ba0a9db28194f68afd773d08ce9cbe7.md @@ -0,0 +1,141 @@ +* [#546](https://github.com/workos/workos-ruby/pull/546) feat(generated)!: regenerate from spec (5 changes) + + **⚠️ Breaking** + * **[agents](https://workos.com/docs/reference/agents)**: + * Removed service `Agents` + * **[sso](https://workos.com/docs/reference/sso)**: + * Removed model `TokenBody` + * Removed enum `TokenBodyGrantType` + * Removed model `TokenQuery` + * Changed parameter `SSO.token.grant_type` + + **Features** + * **[agents](https://workos.com/docs/reference/agents)**: + * Added model `AgentBlueprint` + * Added model `AgentInstance` + * Added model `AgentToken` + * Added model `AgentInstanceSession` + * Added model `AgentBlueprintInvocableBy` + * Added model `AgentBlueprintSessionSetting` + * Added model `AgentBlueprintsCreateRequest` + * Added model `AgentBlueprintsCreateRequestInvocableBy` + * Added model `AgentBlueprintsCreateRequestSessionSetting` + * Added model `AgentBlueprintsUpdateRequest` + * Added model `AgentBlueprintsUpdateRequestInvocableBy` + * Added model `AgentBlueprintsUpdateRequestSessionSetting` + * Added model `AgentBlueprintsTokenMintTokenRequest` + * Added enum `AgentInstanceType` + * Added enum `AgentInstanceSessionStatus` + * Added enum `AgentBlueprintsTokenMintTokenRequestType` + * **agents_blueprints**: + * Added service `AgentsBlueprints` + * **agents_blueprints_tokens**: + * Added service `AgentsBlueprintsTokens` + * **agents_instances**: + * Added service `AgentsInstances` + * **agents_registrations**: + * Added service `AgentsRegistrations` + * **agents_sessions**: + * Added service `AgentsSessions` + * **[organizations](https://workos.com/docs/reference/organization)**: + * Added `retention_period` to `UpdateAuditLogsRetention` + * Made `UpdateAuditLogsRetention.retention_period_in_days` optional + * Added enum `UpdateAuditLogsRetentionRetentionPeriod` + * Added model `CreateItContact` + * Added model `InviteItContact` + * Added model `ItContact` + * Added model `ItContactList` + * Added model `ItContactListListMetadata` + * Added enum `InviteItContactIntents` + * Added service `OrganizationsItContacts` + * **platform_teams**: + * Added model `CreateTeam` + * Added model `Team` + * Added enum `TeamProductionState` + * Added service `PlatformTeams` + * **[sso](https://workos.com/docs/reference/sso)**: + * Added model `TokenQuery` + * Added enum `TokenQueryGrantType` + * Added model `CreateConnectionKeyPair` + * Added model `CreateConnectionSAMLOptions` + * Added model `CreateConnectionOidcOptions` + * Added model `CreateConnectionStandardAttributes` + * Added model `CreateConnectionAttributeMaps` + * Added model `CreateConnection` + * Added model `PatchConnectionSAMLOptions` + * Added model `PatchConnectionOidcOptions` + * Added model `PatchConnectionStandardAttributes` + * Added model `PatchConnectionAttributeMaps` + * Added model `PatchConnection` + * Added model `CreateSAMLIdpSigningCertificate` + * Added model `SAMLIdpSigningCertificate` + * Added model `SAMLIdpSigningCertificateList` + * Added model `SAMLSpEncryptionCertificate` + * Added model `SAMLSpEncryptionCertificateList` + * Added model `SAMLSpSigningCertificate` + * Added enum `CreateConnectionOidcOptionsIdTokenSignatureAlgorithm` + * Added enum `PatchConnectionOidcOptionsIdTokenSignatureAlgorithm` + * Added endpoint `POST /connections` + * Added endpoint `GET /connections/{connectionId}/saml_idp_signing_certs` + * Added endpoint `POST /connections/{connectionId}/saml_idp_signing_certs` + * Added endpoint `DELETE /connections/{connectionId}/saml_idp_signing_certs/{certificateId}` + * Added endpoint `GET /connections/{connectionId}/saml_sp_encryption_certs` + * Added endpoint `POST /connections/{connectionId}/saml_sp_encryption_certs` + * Added endpoint `DELETE /connections/{connectionId}/saml_sp_encryption_certs/{certificateId}` + * Added endpoint `GET /connections/{connectionId}/saml_sp_signing_cert` + * Added endpoint `POST /connections/{connectionId}/saml_sp_signing_cert` + * Added endpoint `DELETE /connections/{connectionId}/saml_sp_signing_cert/{certificateId}` + * Added endpoint `PATCH /connections/{id}` + * Added model `TokenBody` + * Added enum `TokenBodyGrantType` + * Added enum `SSOGrantType` + * Changed required status for parameter `SSO.token.code` + * **[user_management](https://workos.com/docs/reference/authkit/user)**: + * Added enum `CreateConnectionOidcOptionsTokenAuthenticationMethod` + * Added enum `PatchConnectionOidcOptionsTokenAuthenticationMethod` + * Added model `EmailCompletionSessionAuthenticateRequest` + * Added model `CreateWaitlistEntry` + * Added model `Waitlist` + * Added model `WaitlistEntry` + * Added enum `WaitlistEntryState` + * Added enum `UserManagementWaitlistsState` + * Added service `UserManagementWaitlists` + * **[webhooks](https://workos.com/docs/reference/webhooks)**: + * Added `agent.instance.created` to `CreateWebhookEndpointEvents` + * Added `agent.instance.deleted` to `CreateWebhookEndpointEvents` + * Added `agent.instance.session.created` to `CreateWebhookEndpointEvents` + * Added `agent.instance.session.revoked` to `CreateWebhookEndpointEvents` + * Added `agent.instance.created` to `UpdateWebhookEndpointEvents` + * Added `agent.instance.deleted` to `UpdateWebhookEndpointEvents` + * Added `agent.instance.session.created` to `UpdateWebhookEndpointEvents` + * Added `agent.instance.session.revoked` to `UpdateWebhookEndpointEvents` + * Added `agent.blueprint.created` to `CreateWebhookEndpointEvents` + * Added `agent.blueprint.deleted` to `CreateWebhookEndpointEvents` + * Added `agent.blueprint.updated` to `CreateWebhookEndpointEvents` + * Added `agent.blueprint.created` to `UpdateWebhookEndpointEvents` + * Added `agent.blueprint.deleted` to `UpdateWebhookEndpointEvents` + * Added `agent.blueprint.updated` to `UpdateWebhookEndpointEvents` + + **Fixes** + * **[sso](https://workos.com/docs/reference/sso)**: + * Changed request body of `SSO.token` from `TokenBody` to `TokenQuery` + * Removed `DiscordOAuth` from `ConnectionType` + * Removed `GrokOAuth` from `ConnectionType` + * Removed `XOAuth` from `ConnectionType` + * Removed `DiscordOAuth` from `ProfileConnectionType` + * Removed `GrokOAuth` from `ProfileConnectionType` + * Removed `XOAuth` from `ProfileConnectionType` + * Removed `DiscordOAuth` from `ConnectionsConnectionType` + * Removed `GrokOAuth` from `ConnectionsConnectionType` + * Removed `XOAuth` from `ConnectionsConnectionType` + * Changed request body of `SSO.token` from `TokenQuery` to `TokenBody` + * **[user_management](https://workos.com/docs/reference/authkit/user)**: + * Changed request body for `UserManagementAuthentication.authenticate` + * Changed errors for endpoint `POST /user_management/authenticate` + * Removed `DiscordOAuth` from `AuthenticateResponseAuthenticationMethod` + * Removed `GrokOAuth` from `AuthenticateResponseAuthenticationMethod` + * Removed `XOAuth` from `AuthenticateResponseAuthenticationMethod` + * Removed `DiscordOAuth` from `UserIdentitiesGetItemProvider` + * Removed `GrokOAuth` from `UserIdentitiesGetItemProvider` + * Removed `XOAuth` from `UserIdentitiesGetItemProvider` + * Changed errors for endpoint `DELETE /user_management/users/{id}`