workos 10.2.1 → 10.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.last-synced-sha +1 -1
- data/.oagen-manifest.json +311 -0
- data/.release-please-manifest.json +1 -1
- data/CHANGELOG.md +154 -0
- data/Gemfile.lock +2 -2
- data/lib/workos/agents/agent_blueprint.rb +43 -0
- data/lib/workos/agents/agent_blueprint_invocable_by.rb +7 -0
- data/lib/workos/agents/agent_blueprint_session_setting.rb +25 -0
- data/lib/workos/agents/agent_blueprints_create_request.rb +31 -0
- data/lib/workos/agents/agent_blueprints_create_request_invocable_by.rb +22 -0
- data/lib/workos/agents/agent_blueprints_create_request_session_setting.rb +7 -0
- data/lib/workos/agents/agent_blueprints_token_mint_token_request.rb +34 -0
- data/lib/workos/agents/agent_blueprints_token_validate_token_request.rb +18 -0
- data/lib/workos/agents/agent_blueprints_update_request.rb +31 -0
- data/lib/workos/agents/agent_blueprints_update_request_invocable_by.rb +7 -0
- data/lib/workos/agents/agent_blueprints_update_request_session_setting.rb +25 -0
- data/lib/workos/agents/agent_instance.rb +40 -0
- data/lib/workos/agents/agent_instance_session.rb +40 -0
- data/lib/workos/agents/agent_token.rb +40 -0
- data/lib/workos/agents/agent_token_validation.rb +40 -0
- data/lib/workos/agents.rb +395 -0
- data/lib/workos/api_keys/validate_api_key.rb +1 -12
- data/lib/workos/audit_logs.rb +23 -5
- data/lib/workos/authorization.rb +3 -3
- data/lib/workos/client.rb +4 -0
- data/lib/workos/inflections.rb +15 -0
- data/lib/workos/organizations/create_it_contact.rb +18 -0
- data/lib/workos/organizations/invite_it_contact.rb +18 -0
- data/lib/workos/organizations/it_contact.rb +31 -0
- data/lib/workos/organizations/it_contact_list.rb +25 -0
- data/lib/workos/organizations/organization_input.rb +10 -1
- data/lib/workos/organizations/update_audit_logs_retention.rb +13 -1
- data/lib/workos/organizations.rb +110 -1
- data/lib/workos/platform_teams/create_team.rb +22 -0
- data/lib/workos/platform_teams/team.rb +37 -0
- data/lib/workos/platform_teams.rb +58 -0
- data/lib/workos/shared/agent_blueprint_created.rb +34 -0
- data/lib/workos/shared/agent_blueprint_created_data.rb +43 -0
- data/lib/workos/shared/agent_blueprint_created_data_invocable_by.rb +22 -0
- data/lib/workos/shared/agent_blueprint_created_data_session_setting.rb +25 -0
- data/lib/workos/shared/agent_blueprint_deleted.rb +34 -0
- data/lib/workos/shared/agent_blueprint_deleted_data.rb +31 -0
- data/lib/workos/shared/agent_blueprint_updated.rb +34 -0
- data/lib/workos/shared/agent_blueprint_updated_data.rb +7 -0
- data/lib/workos/shared/agent_blueprint_updated_data_invocable_by.rb +7 -0
- data/lib/workos/shared/agent_blueprint_updated_data_session_setting.rb +7 -0
- data/lib/workos/shared/agent_instance_created.rb +34 -0
- data/lib/workos/shared/agent_instance_created_data.rb +40 -0
- data/lib/workos/shared/agent_instance_deleted.rb +34 -0
- data/lib/workos/shared/agent_instance_deleted_data.rb +40 -0
- data/lib/workos/shared/agent_instance_session_created.rb +34 -0
- data/lib/workos/shared/agent_instance_session_created_data.rb +43 -0
- data/lib/workos/shared/agent_instance_session_revoked.rb +34 -0
- data/lib/workos/shared/agent_instance_session_revoked_data.rb +40 -0
- data/lib/workos/shared/resource_export_completed.rb +34 -0
- data/lib/workos/shared/resource_export_completed_data.rb +22 -0
- data/lib/workos/shared/resource_export_created.rb +34 -0
- data/lib/workos/shared/resource_export_created_data.rb +22 -0
- data/lib/workos/shared/resource_export_downloaded.rb +34 -0
- data/lib/workos/shared/resource_export_downloaded_data.rb +22 -0
- data/lib/workos/shared/resource_export_failed.rb +34 -0
- data/lib/workos/shared/resource_export_failed_data.rb +22 -0
- data/lib/workos/shared/waitlist_user.rb +8 -5
- data/lib/workos/sso/create_connection.rb +37 -0
- data/lib/workos/sso/create_connection_attribute_maps.rb +22 -0
- data/lib/workos/sso/create_connection_key_pair.rb +22 -0
- data/lib/workos/sso/create_connection_oidc_options.rb +43 -0
- data/lib/workos/sso/create_connection_saml_options.rb +40 -0
- data/lib/workos/sso/create_connection_standard_attributes.rb +34 -0
- data/lib/workos/sso/create_saml_idp_signing_certificate.rb +18 -0
- data/lib/workos/sso/patch_connection.rb +34 -0
- data/lib/workos/sso/patch_connection_attribute_maps.rb +22 -0
- data/lib/workos/sso/patch_connection_oidc_options.rb +40 -0
- data/lib/workos/sso/patch_connection_saml_options.rb +31 -0
- data/lib/workos/sso/patch_connection_standard_attributes.rb +7 -0
- data/lib/workos/sso/saml_idp_signing_certificate.rb +34 -0
- data/lib/workos/sso/saml_idp_signing_certificate_list.rb +22 -0
- data/lib/workos/sso/saml_sp_encryption_certificate.rb +34 -0
- data/lib/workos/sso/saml_sp_encryption_certificate_list.rb +22 -0
- data/lib/workos/sso/saml_sp_signing_certificate.rb +34 -0
- data/lib/workos/sso/token_query.rb +11 -2
- data/lib/workos/sso.rb +305 -4
- data/lib/workos/types/agent_blueprints_token_mint_token_request_type.rb +15 -0
- data/lib/workos/types/agent_instance_created_data_type.rb +13 -0
- data/lib/workos/types/agent_instance_deleted_data_type.rb +9 -0
- data/lib/workos/types/agent_instance_session_status.rb +14 -0
- data/lib/workos/types/agent_instance_type.rb +9 -0
- data/lib/workos/types/authenticate_response_authentication_method.rb +1 -4
- data/lib/workos/types/connection_activated_data_connection_type.rb +1 -4
- data/lib/workos/types/connection_type.rb +1 -4
- data/lib/workos/types/connections_connection_type.rb +1 -4
- data/lib/workos/types/create_connection_oidc_options_id_token_signature_algorithm.rb +24 -0
- data/lib/workos/types/create_connection_oidc_options_token_authentication_method.rb +14 -0
- data/lib/workos/types/create_webhook_endpoint_events.rb +8 -1
- data/lib/workos/types/invite_it_contact_intents.rb +16 -0
- data/lib/workos/types/patch_connection_oidc_options_id_token_signature_algorithm.rb +9 -0
- data/lib/workos/types/patch_connection_oidc_options_token_authentication_method.rb +9 -0
- data/lib/workos/types/resource_export_completed_data_resource_type.rb +16 -0
- data/lib/workos/types/resource_export_created_data_resource_type.rb +9 -0
- data/lib/workos/types/resource_export_downloaded_data_resource_type.rb +9 -0
- data/lib/workos/types/resource_export_failed_data_resource_type.rb +9 -0
- data/lib/workos/types/session_created_data_status.rb +1 -6
- data/lib/workos/types/session_revoked_data_status.rb +1 -1
- data/lib/workos/types/sso_grant_type.rb +13 -0
- data/lib/workos/types/team_production_state.rb +15 -0
- data/lib/workos/types/token_query_grant_type.rb +9 -0
- data/lib/workos/types/update_audit_logs_retention_retention_period.rb +32 -0
- data/lib/workos/types/user_identities_get_item_provider.rb +1 -4
- data/lib/workos/types/user_management_waitlists_state.rb +14 -0
- data/lib/workos/types/user_sessions_status.rb +1 -1
- data/lib/workos/types/waitlist_entry_state.rb +9 -0
- data/lib/workos/types/waitlist_user_state.rb +1 -6
- data/lib/workos/user_management/authentication_oauth_failed_data.rb +5 -2
- data/lib/workos/user_management/authentication_oauth_succeeded_data.rb +5 -2
- data/lib/workos/user_management/create_password_reset_token.rb +1 -12
- data/lib/workos/user_management/create_waitlist_entry.rb +25 -0
- data/lib/workos/user_management/email_completion_session_authenticate_request.rb +43 -0
- data/lib/workos/user_management/waitlist.rb +28 -0
- data/lib/workos/user_management/waitlist_entry.rb +43 -0
- data/lib/workos/user_management.rb +176 -0
- data/lib/workos/version.rb +1 -1
- data/lib/workos.rb +1 -0
- data/rbi/workos/agent_blueprint.rbi +72 -0
- data/rbi/workos/agent_blueprint_created.rbi +54 -0
- data/rbi/workos/agent_blueprint_created_data.rbi +72 -0
- data/rbi/workos/agent_blueprint_created_data_invocable_by.rbi +30 -0
- data/rbi/workos/agent_blueprint_created_data_session_setting.rbi +36 -0
- data/rbi/workos/agent_blueprint_deleted.rbi +54 -0
- data/rbi/workos/agent_blueprint_deleted_data.rbi +48 -0
- data/rbi/workos/agent_blueprint_invocable_by.rbi +30 -0
- data/rbi/workos/agent_blueprint_session_setting.rbi +36 -0
- data/rbi/workos/agent_blueprint_updated.rbi +54 -0
- data/rbi/workos/agent_blueprint_updated_data.rbi +72 -0
- data/rbi/workos/agent_blueprint_updated_data_invocable_by.rbi +30 -0
- data/rbi/workos/agent_blueprint_updated_data_session_setting.rbi +36 -0
- data/rbi/workos/agent_blueprints_create_request.rbi +48 -0
- data/rbi/workos/agent_blueprints_create_request_invocable_by.rbi +30 -0
- data/rbi/workos/agent_blueprints_create_request_session_setting.rbi +36 -0
- data/rbi/workos/agent_blueprints_token_mint_token_request.rbi +54 -0
- data/rbi/workos/agent_blueprints_token_validate_token_request.rbi +24 -0
- data/rbi/workos/agent_blueprints_update_request.rbi +48 -0
- data/rbi/workos/agent_blueprints_update_request_invocable_by.rbi +30 -0
- data/rbi/workos/agent_blueprints_update_request_session_setting.rbi +36 -0
- data/rbi/workos/agent_instance.rbi +66 -0
- data/rbi/workos/agent_instance_created.rbi +54 -0
- data/rbi/workos/agent_instance_created_data.rbi +66 -0
- data/rbi/workos/agent_instance_deleted.rbi +54 -0
- data/rbi/workos/agent_instance_deleted_data.rbi +66 -0
- data/rbi/workos/agent_instance_session.rbi +66 -0
- data/rbi/workos/agent_instance_session_created.rbi +54 -0
- data/rbi/workos/agent_instance_session_created_data.rbi +72 -0
- data/rbi/workos/agent_instance_session_revoked.rbi +54 -0
- data/rbi/workos/agent_instance_session_revoked_data.rbi +66 -0
- data/rbi/workos/agent_token.rbi +66 -0
- data/rbi/workos/agent_token_validation.rbi +66 -0
- data/rbi/workos/agents.rbi +133 -0
- data/rbi/workos/audit_logs.rbi +26 -2
- data/rbi/workos/authentication_oauth_failed_data.rbi +6 -0
- data/rbi/workos/authentication_oauth_succeeded_data.rbi +6 -0
- data/rbi/workos/client.rbi +3 -0
- data/rbi/workos/create_connection.rbi +60 -0
- data/rbi/workos/create_connection_attribute_maps.rbi +30 -0
- data/rbi/workos/create_connection_key_pair.rbi +30 -0
- data/rbi/workos/create_connection_oidc_options.rbi +72 -0
- data/rbi/workos/create_connection_saml_options.rbi +66 -0
- data/rbi/workos/create_connection_standard_attributes.rbi +54 -0
- data/rbi/workos/create_it_contact.rbi +24 -0
- data/rbi/workos/create_saml_idp_signing_certificate.rbi +24 -0
- data/rbi/workos/create_team.rbi +30 -0
- data/rbi/workos/create_waitlist_entry.rbi +36 -0
- data/rbi/workos/email_completion_session_authenticate_request.rbi +72 -0
- data/rbi/workos/invite_it_contact.rbi +24 -0
- data/rbi/workos/it_contact.rbi +48 -0
- data/rbi/workos/organizations.rbi +45 -0
- data/rbi/workos/patch_connection.rbi +54 -0
- data/rbi/workos/patch_connection_attribute_maps.rbi +30 -0
- data/rbi/workos/patch_connection_oidc_options.rbi +66 -0
- data/rbi/workos/patch_connection_saml_options.rbi +48 -0
- data/rbi/workos/patch_connection_standard_attributes.rbi +54 -0
- data/rbi/workos/platform_teams.rbi +30 -0
- data/rbi/workos/resource_export_completed.rbi +54 -0
- data/rbi/workos/resource_export_completed_data.rbi +30 -0
- data/rbi/workos/resource_export_created.rbi +54 -0
- data/rbi/workos/resource_export_created_data.rbi +30 -0
- data/rbi/workos/resource_export_downloaded.rbi +54 -0
- data/rbi/workos/resource_export_downloaded_data.rbi +30 -0
- data/rbi/workos/resource_export_failed.rbi +54 -0
- data/rbi/workos/resource_export_failed_data.rbi +30 -0
- data/rbi/workos/saml_idp_signing_certificate.rbi +54 -0
- data/rbi/workos/saml_idp_signing_certificate_list.rbi +30 -0
- data/rbi/workos/saml_sp_encryption_certificate.rbi +54 -0
- data/rbi/workos/saml_sp_encryption_certificate_list.rbi +30 -0
- data/rbi/workos/saml_sp_signing_certificate.rbi +54 -0
- data/rbi/workos/sso.rbi +155 -2
- data/rbi/workos/team.rbi +60 -0
- data/rbi/workos/token_query.rbi +20 -2
- data/rbi/workos/update_audit_logs_retention.rbi +8 -2
- data/rbi/workos/user_management.rbi +64 -0
- data/rbi/workos/waitlist.rbi +42 -0
- data/rbi/workos/waitlist_entry.rbi +72 -0
- data/rbi/workos/waitlist_user.rbi +12 -6
- data/test/workos/test_agents.rb +105 -1
- data/test/workos/test_agents_model_round_trip.rb +245 -0
- data/test/workos/test_audit_logs.rb +11 -2
- data/test/workos/test_authorization.rb +6 -6
- data/test/workos/test_organizations.rb +41 -1
- data/test/workos/test_organizations_model_round_trip.rb +40 -1
- data/test/workos/test_platform_teams.rb +41 -0
- data/test/workos/test_platform_teams_model_round_trip.rb +41 -0
- data/test/workos/test_shared_model_round_trip.rb +449 -2
- data/test/workos/test_sso.rb +108 -2
- data/test/workos/test_sso_model_round_trip.rb +262 -2
- data/test/workos/test_user_management.rb +56 -0
- data/test/workos/test_user_management_model_round_trip.rb +78 -2
- metadata +160 -1
|
@@ -5,13 +5,25 @@
|
|
|
5
5
|
module WorkOS
|
|
6
6
|
class UpdateAuditLogsRetention < WorkOS::Types::BaseModel
|
|
7
7
|
HASH_ATTRS = {
|
|
8
|
+
retention_period: :retention_period,
|
|
8
9
|
retention_period_in_days: :retention_period_in_days
|
|
9
10
|
}.freeze
|
|
10
11
|
|
|
11
|
-
|
|
12
|
+
# @!attribute retention_period_in_days
|
|
13
|
+
# @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`.
|
|
14
|
+
|
|
15
|
+
attr_accessor :retention_period
|
|
16
|
+
|
|
17
|
+
def retention_period_in_days
|
|
18
|
+
warn "[DEPRECATION] `retention_period_in_days` is deprecated and will be removed in a future version.", uplevel: 1
|
|
19
|
+
@retention_period_in_days
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
attr_writer :retention_period_in_days
|
|
12
23
|
|
|
13
24
|
def initialize(json)
|
|
14
25
|
hash = self.class.normalize(json)
|
|
26
|
+
@retention_period = hash[:retention_period]
|
|
15
27
|
@retention_period_in_days = hash[:retention_period_in_days]
|
|
16
28
|
end
|
|
17
29
|
end
|
data/lib/workos/organizations.rb
CHANGED
|
@@ -65,7 +65,7 @@ module WorkOS
|
|
|
65
65
|
# Create an Organization
|
|
66
66
|
# @param name [String] The name of the organization.
|
|
67
67
|
# @param allow_profiles_outside_organization [Boolean, nil] Whether the organization allows profiles from outside the organization to sign in.
|
|
68
|
-
# @param domains [Array<String>, nil] The domains associated with the organization. Deprecated in favor of `domain_data`.
|
|
68
|
+
# @param domains [Array<String>, nil] (deprecated) The domains associated with the organization. Deprecated in favor of `domain_data`.
|
|
69
69
|
# @param domain_data [Array<WorkOS::OrganizationDomainData>, nil] The domains associated with the organization, including verification state.
|
|
70
70
|
# @param metadata [Hash{String => String}, nil] Object containing [metadata](https://workos.com/docs/authkit/metadata) key/value pairs associated with the Organization.
|
|
71
71
|
# @param external_id [String, nil] An external identifier for the Organization.
|
|
@@ -263,5 +263,114 @@ module WorkOS
|
|
|
263
263
|
fetch_next: fetch_next
|
|
264
264
|
)
|
|
265
265
|
end
|
|
266
|
+
|
|
267
|
+
# List IT contacts
|
|
268
|
+
# @param organization_id [String] The ID of the organization.
|
|
269
|
+
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
270
|
+
# @return [WorkOS::Types::ListStruct<WorkOS::ItContact>]
|
|
271
|
+
def list_it_contacts(
|
|
272
|
+
organization_id:,
|
|
273
|
+
request_options: {}
|
|
274
|
+
)
|
|
275
|
+
response = @client.request(
|
|
276
|
+
method: :get,
|
|
277
|
+
path: "/organizations/#{WorkOS::Util.encode_path(organization_id)}/it_contacts",
|
|
278
|
+
auth: true,
|
|
279
|
+
request_options: request_options
|
|
280
|
+
)
|
|
281
|
+
WorkOS::Types::ListStruct.from_response(
|
|
282
|
+
response,
|
|
283
|
+
model: WorkOS::ItContact,
|
|
284
|
+
filters: {organization_id: organization_id}
|
|
285
|
+
)
|
|
286
|
+
end
|
|
287
|
+
|
|
288
|
+
# Create an IT contact
|
|
289
|
+
# @param organization_id [String] The ID of the organization.
|
|
290
|
+
# @param email [String] The email address of the IT contact.
|
|
291
|
+
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
292
|
+
# @return [WorkOS::ItContact]
|
|
293
|
+
def create_it_contact(
|
|
294
|
+
organization_id:,
|
|
295
|
+
email:,
|
|
296
|
+
request_options: {}
|
|
297
|
+
)
|
|
298
|
+
body = {
|
|
299
|
+
"email" => email
|
|
300
|
+
}
|
|
301
|
+
response = @client.request(
|
|
302
|
+
method: :post,
|
|
303
|
+
path: "/organizations/#{WorkOS::Util.encode_path(organization_id)}/it_contacts",
|
|
304
|
+
auth: true,
|
|
305
|
+
body: body,
|
|
306
|
+
request_options: request_options
|
|
307
|
+
)
|
|
308
|
+
result = WorkOS::ItContact.new(response.body)
|
|
309
|
+
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"])
|
|
310
|
+
result
|
|
311
|
+
end
|
|
312
|
+
|
|
313
|
+
# Delete an IT contact
|
|
314
|
+
# @param organization_id [String] The ID of the organization.
|
|
315
|
+
# @param contact_id [String] The ID of the IT contact.
|
|
316
|
+
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
317
|
+
# @return [void]
|
|
318
|
+
def delete_it_contact(
|
|
319
|
+
organization_id:,
|
|
320
|
+
contact_id:,
|
|
321
|
+
request_options: {}
|
|
322
|
+
)
|
|
323
|
+
@client.request(
|
|
324
|
+
method: :delete,
|
|
325
|
+
path: "/organizations/#{WorkOS::Util.encode_path(organization_id)}/it_contacts/#{WorkOS::Util.encode_path(contact_id)}",
|
|
326
|
+
auth: true,
|
|
327
|
+
request_options: request_options
|
|
328
|
+
)
|
|
329
|
+
nil
|
|
330
|
+
end
|
|
331
|
+
|
|
332
|
+
# Invite an IT contact
|
|
333
|
+
# @param organization_id [String] The ID of the organization.
|
|
334
|
+
# @param contact_id [String] The ID of the IT contact.
|
|
335
|
+
# @param intents [Array<WorkOS::Types::InviteItContactIntents>] The Admin Portal features that the IT contact can configure.
|
|
336
|
+
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
337
|
+
# @return [void]
|
|
338
|
+
def invite_it_contact(
|
|
339
|
+
organization_id:,
|
|
340
|
+
contact_id:,
|
|
341
|
+
intents:,
|
|
342
|
+
request_options: {}
|
|
343
|
+
)
|
|
344
|
+
body = {
|
|
345
|
+
"intents" => intents
|
|
346
|
+
}
|
|
347
|
+
@client.request(
|
|
348
|
+
method: :post,
|
|
349
|
+
path: "/organizations/#{WorkOS::Util.encode_path(organization_id)}/it_contacts/#{WorkOS::Util.encode_path(contact_id)}/invite",
|
|
350
|
+
auth: true,
|
|
351
|
+
body: body,
|
|
352
|
+
request_options: request_options
|
|
353
|
+
)
|
|
354
|
+
nil
|
|
355
|
+
end
|
|
356
|
+
|
|
357
|
+
# Revoke an IT contact's invitation
|
|
358
|
+
# @param organization_id [String] The ID of the organization.
|
|
359
|
+
# @param contact_id [String] The ID of the IT contact.
|
|
360
|
+
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
361
|
+
# @return [void]
|
|
362
|
+
def revoke_it_contact(
|
|
363
|
+
organization_id:,
|
|
364
|
+
contact_id:,
|
|
365
|
+
request_options: {}
|
|
366
|
+
)
|
|
367
|
+
@client.request(
|
|
368
|
+
method: :post,
|
|
369
|
+
path: "/organizations/#{WorkOS::Util.encode_path(organization_id)}/it_contacts/#{WorkOS::Util.encode_path(contact_id)}/revoke",
|
|
370
|
+
auth: true,
|
|
371
|
+
request_options: request_options
|
|
372
|
+
)
|
|
373
|
+
nil
|
|
374
|
+
end
|
|
266
375
|
end
|
|
267
376
|
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
module WorkOS
|
|
6
|
+
class CreateTeam < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
admin_email: :admin_email,
|
|
9
|
+
name: :name
|
|
10
|
+
}.freeze
|
|
11
|
+
|
|
12
|
+
attr_accessor \
|
|
13
|
+
:admin_email,
|
|
14
|
+
:name
|
|
15
|
+
|
|
16
|
+
def initialize(json)
|
|
17
|
+
hash = self.class.normalize(json)
|
|
18
|
+
@admin_email = hash[:admin_email]
|
|
19
|
+
@name = hash[:name]
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
module WorkOS
|
|
6
|
+
class Team < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
object: :object,
|
|
9
|
+
id: :id,
|
|
10
|
+
name: :name,
|
|
11
|
+
production_state: :production_state,
|
|
12
|
+
production_enabled_at: :production_enabled_at,
|
|
13
|
+
created_at: :created_at,
|
|
14
|
+
updated_at: :updated_at
|
|
15
|
+
}.freeze
|
|
16
|
+
|
|
17
|
+
attr_accessor \
|
|
18
|
+
:object,
|
|
19
|
+
:id,
|
|
20
|
+
:name,
|
|
21
|
+
:production_state,
|
|
22
|
+
:production_enabled_at,
|
|
23
|
+
:created_at,
|
|
24
|
+
:updated_at
|
|
25
|
+
|
|
26
|
+
def initialize(json)
|
|
27
|
+
hash = self.class.normalize(json)
|
|
28
|
+
@object = hash[:object]
|
|
29
|
+
@id = hash[:id]
|
|
30
|
+
@name = hash[:name]
|
|
31
|
+
@production_state = hash[:production_state]
|
|
32
|
+
@production_enabled_at = hash[:production_enabled_at]
|
|
33
|
+
@created_at = hash[:created_at]
|
|
34
|
+
@updated_at = hash[:updated_at]
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
require "json"
|
|
6
|
+
|
|
7
|
+
module WorkOS
|
|
8
|
+
class PlatformTeams
|
|
9
|
+
def initialize(client)
|
|
10
|
+
@client = client
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
# Create a team
|
|
14
|
+
# @param admin_email [String] The email address of the person who will administer the team. An invitation is sent to this address.
|
|
15
|
+
# @param name [String] Name of the team.
|
|
16
|
+
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
17
|
+
# @return [WorkOS::Team]
|
|
18
|
+
def create_team(
|
|
19
|
+
admin_email:,
|
|
20
|
+
name:,
|
|
21
|
+
request_options: {}
|
|
22
|
+
)
|
|
23
|
+
body = {
|
|
24
|
+
"admin_email" => admin_email,
|
|
25
|
+
"name" => name
|
|
26
|
+
}
|
|
27
|
+
response = @client.request(
|
|
28
|
+
method: :post,
|
|
29
|
+
path: "/platform/teams",
|
|
30
|
+
auth: true,
|
|
31
|
+
body: body,
|
|
32
|
+
request_options: request_options
|
|
33
|
+
)
|
|
34
|
+
result = WorkOS::Team.new(response.body)
|
|
35
|
+
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"])
|
|
36
|
+
result
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Get a team
|
|
40
|
+
# @param team_id [String] The ID of the team.
|
|
41
|
+
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
42
|
+
# @return [WorkOS::Team]
|
|
43
|
+
def get_team(
|
|
44
|
+
team_id:,
|
|
45
|
+
request_options: {}
|
|
46
|
+
)
|
|
47
|
+
response = @client.request(
|
|
48
|
+
method: :get,
|
|
49
|
+
path: "/platform/teams/#{WorkOS::Util.encode_path(team_id)}",
|
|
50
|
+
auth: true,
|
|
51
|
+
request_options: request_options
|
|
52
|
+
)
|
|
53
|
+
result = WorkOS::Team.new(response.body)
|
|
54
|
+
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"])
|
|
55
|
+
result
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
module WorkOS
|
|
6
|
+
class AgentBlueprintCreated < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
object: :object,
|
|
9
|
+
id: :id,
|
|
10
|
+
event: :event,
|
|
11
|
+
data: :data,
|
|
12
|
+
created_at: :created_at,
|
|
13
|
+
context: :context
|
|
14
|
+
}.freeze
|
|
15
|
+
|
|
16
|
+
attr_accessor \
|
|
17
|
+
:object,
|
|
18
|
+
:id,
|
|
19
|
+
:event,
|
|
20
|
+
:data,
|
|
21
|
+
:created_at,
|
|
22
|
+
:context
|
|
23
|
+
|
|
24
|
+
def initialize(json)
|
|
25
|
+
hash = self.class.normalize(json)
|
|
26
|
+
@object = hash[:object]
|
|
27
|
+
@id = hash[:id]
|
|
28
|
+
@event = hash[:event]
|
|
29
|
+
@data = hash[:data] ? WorkOS::AgentBlueprintCreatedData.new(hash[:data]) : nil
|
|
30
|
+
@created_at = hash[:created_at]
|
|
31
|
+
@context = hash[:context] ? WorkOS::EventContext.new(hash[:context]) : nil
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
module WorkOS
|
|
6
|
+
class AgentBlueprintCreatedData < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
object: :object,
|
|
9
|
+
id: :id,
|
|
10
|
+
name: :name,
|
|
11
|
+
description: :description,
|
|
12
|
+
permissions: :permissions,
|
|
13
|
+
invocable_by: :invocable_by,
|
|
14
|
+
session_settings: :session_settings,
|
|
15
|
+
created_at: :created_at,
|
|
16
|
+
updated_at: :updated_at
|
|
17
|
+
}.freeze
|
|
18
|
+
|
|
19
|
+
attr_accessor \
|
|
20
|
+
:object,
|
|
21
|
+
:id,
|
|
22
|
+
:name,
|
|
23
|
+
:description,
|
|
24
|
+
:permissions,
|
|
25
|
+
:invocable_by,
|
|
26
|
+
:session_settings,
|
|
27
|
+
:created_at,
|
|
28
|
+
:updated_at
|
|
29
|
+
|
|
30
|
+
def initialize(json)
|
|
31
|
+
hash = self.class.normalize(json)
|
|
32
|
+
@object = hash[:object]
|
|
33
|
+
@id = hash[:id]
|
|
34
|
+
@name = hash[:name]
|
|
35
|
+
@description = hash[:description]
|
|
36
|
+
@permissions = hash[:permissions] || []
|
|
37
|
+
@invocable_by = hash[:invocable_by] ? WorkOS::AgentBlueprintCreatedDataInvocableBy.new(hash[:invocable_by]) : nil
|
|
38
|
+
@session_settings = hash[:session_settings] ? WorkOS::AgentBlueprintCreatedDataSessionSetting.new(hash[:session_settings]) : nil
|
|
39
|
+
@created_at = hash[:created_at]
|
|
40
|
+
@updated_at = hash[:updated_at]
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
module WorkOS
|
|
6
|
+
class AgentBlueprintCreatedDataInvocableBy < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
role_slugs: :role_slugs,
|
|
9
|
+
organization_ids: :organization_ids
|
|
10
|
+
}.freeze
|
|
11
|
+
|
|
12
|
+
attr_accessor \
|
|
13
|
+
:role_slugs,
|
|
14
|
+
:organization_ids
|
|
15
|
+
|
|
16
|
+
def initialize(json)
|
|
17
|
+
hash = self.class.normalize(json)
|
|
18
|
+
@role_slugs = hash[:role_slugs] || []
|
|
19
|
+
@organization_ids = hash[:organization_ids] || []
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
module WorkOS
|
|
6
|
+
class AgentBlueprintCreatedDataSessionSetting < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
max_age_seconds: :max_age_seconds,
|
|
9
|
+
access_token_ttl_seconds: :access_token_ttl_seconds,
|
|
10
|
+
refresh_token_ttl_seconds: :refresh_token_ttl_seconds
|
|
11
|
+
}.freeze
|
|
12
|
+
|
|
13
|
+
attr_accessor \
|
|
14
|
+
:max_age_seconds,
|
|
15
|
+
:access_token_ttl_seconds,
|
|
16
|
+
:refresh_token_ttl_seconds
|
|
17
|
+
|
|
18
|
+
def initialize(json)
|
|
19
|
+
hash = self.class.normalize(json)
|
|
20
|
+
@max_age_seconds = hash[:max_age_seconds]
|
|
21
|
+
@access_token_ttl_seconds = hash[:access_token_ttl_seconds]
|
|
22
|
+
@refresh_token_ttl_seconds = hash[:refresh_token_ttl_seconds]
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
module WorkOS
|
|
6
|
+
class AgentBlueprintDeleted < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
object: :object,
|
|
9
|
+
id: :id,
|
|
10
|
+
event: :event,
|
|
11
|
+
data: :data,
|
|
12
|
+
created_at: :created_at,
|
|
13
|
+
context: :context
|
|
14
|
+
}.freeze
|
|
15
|
+
|
|
16
|
+
attr_accessor \
|
|
17
|
+
:object,
|
|
18
|
+
:id,
|
|
19
|
+
:event,
|
|
20
|
+
:data,
|
|
21
|
+
:created_at,
|
|
22
|
+
:context
|
|
23
|
+
|
|
24
|
+
def initialize(json)
|
|
25
|
+
hash = self.class.normalize(json)
|
|
26
|
+
@object = hash[:object]
|
|
27
|
+
@id = hash[:id]
|
|
28
|
+
@event = hash[:event]
|
|
29
|
+
@data = hash[:data] ? WorkOS::AgentBlueprintDeletedData.new(hash[:data]) : nil
|
|
30
|
+
@created_at = hash[:created_at]
|
|
31
|
+
@context = hash[:context] ? WorkOS::EventContext.new(hash[:context]) : nil
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
module WorkOS
|
|
6
|
+
class AgentBlueprintDeletedData < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
object: :object,
|
|
9
|
+
id: :id,
|
|
10
|
+
name: :name,
|
|
11
|
+
created_at: :created_at,
|
|
12
|
+
updated_at: :updated_at
|
|
13
|
+
}.freeze
|
|
14
|
+
|
|
15
|
+
attr_accessor \
|
|
16
|
+
:object,
|
|
17
|
+
:id,
|
|
18
|
+
:name,
|
|
19
|
+
:created_at,
|
|
20
|
+
:updated_at
|
|
21
|
+
|
|
22
|
+
def initialize(json)
|
|
23
|
+
hash = self.class.normalize(json)
|
|
24
|
+
@object = hash[:object]
|
|
25
|
+
@id = hash[:id]
|
|
26
|
+
@name = hash[:name]
|
|
27
|
+
@created_at = hash[:created_at]
|
|
28
|
+
@updated_at = hash[:updated_at]
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
module WorkOS
|
|
6
|
+
class AgentBlueprintUpdated < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
object: :object,
|
|
9
|
+
id: :id,
|
|
10
|
+
event: :event,
|
|
11
|
+
data: :data,
|
|
12
|
+
created_at: :created_at,
|
|
13
|
+
context: :context
|
|
14
|
+
}.freeze
|
|
15
|
+
|
|
16
|
+
attr_accessor \
|
|
17
|
+
:object,
|
|
18
|
+
:id,
|
|
19
|
+
:event,
|
|
20
|
+
:data,
|
|
21
|
+
:created_at,
|
|
22
|
+
:context
|
|
23
|
+
|
|
24
|
+
def initialize(json)
|
|
25
|
+
hash = self.class.normalize(json)
|
|
26
|
+
@object = hash[:object]
|
|
27
|
+
@id = hash[:id]
|
|
28
|
+
@event = hash[:event]
|
|
29
|
+
@data = hash[:data] ? WorkOS::AgentBlueprintUpdatedData.new(hash[:data]) : nil
|
|
30
|
+
@created_at = hash[:created_at]
|
|
31
|
+
@context = hash[:context] ? WorkOS::EventContext.new(hash[:context]) : nil
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
module WorkOS
|
|
6
|
+
class AgentInstanceCreated < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
object: :object,
|
|
9
|
+
id: :id,
|
|
10
|
+
event: :event,
|
|
11
|
+
data: :data,
|
|
12
|
+
created_at: :created_at,
|
|
13
|
+
context: :context
|
|
14
|
+
}.freeze
|
|
15
|
+
|
|
16
|
+
attr_accessor \
|
|
17
|
+
:object,
|
|
18
|
+
:id,
|
|
19
|
+
:event,
|
|
20
|
+
:data,
|
|
21
|
+
:created_at,
|
|
22
|
+
:context
|
|
23
|
+
|
|
24
|
+
def initialize(json)
|
|
25
|
+
hash = self.class.normalize(json)
|
|
26
|
+
@object = hash[:object]
|
|
27
|
+
@id = hash[:id]
|
|
28
|
+
@event = hash[:event]
|
|
29
|
+
@data = hash[:data] ? WorkOS::AgentInstanceCreatedData.new(hash[:data]) : nil
|
|
30
|
+
@created_at = hash[:created_at]
|
|
31
|
+
@context = hash[:context] ? WorkOS::EventContext.new(hash[:context]) : nil
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
module WorkOS
|
|
6
|
+
class AgentInstanceCreatedData < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
object: :object,
|
|
9
|
+
id: :id,
|
|
10
|
+
agent_blueprint_id: :agent_blueprint_id,
|
|
11
|
+
organization_id: :organization_id,
|
|
12
|
+
organization_membership_id: :organization_membership_id,
|
|
13
|
+
type: :type,
|
|
14
|
+
created_at: :created_at,
|
|
15
|
+
updated_at: :updated_at
|
|
16
|
+
}.freeze
|
|
17
|
+
|
|
18
|
+
attr_accessor \
|
|
19
|
+
:object,
|
|
20
|
+
:id,
|
|
21
|
+
:agent_blueprint_id,
|
|
22
|
+
:organization_id,
|
|
23
|
+
:organization_membership_id,
|
|
24
|
+
:type,
|
|
25
|
+
:created_at,
|
|
26
|
+
:updated_at
|
|
27
|
+
|
|
28
|
+
def initialize(json)
|
|
29
|
+
hash = self.class.normalize(json)
|
|
30
|
+
@object = hash[:object]
|
|
31
|
+
@id = hash[:id]
|
|
32
|
+
@agent_blueprint_id = hash[:agent_blueprint_id]
|
|
33
|
+
@organization_id = hash[:organization_id]
|
|
34
|
+
@organization_membership_id = hash[:organization_membership_id]
|
|
35
|
+
@type = hash[:type]
|
|
36
|
+
@created_at = hash[:created_at]
|
|
37
|
+
@updated_at = hash[:updated_at]
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
module WorkOS
|
|
6
|
+
class AgentInstanceDeleted < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
object: :object,
|
|
9
|
+
id: :id,
|
|
10
|
+
event: :event,
|
|
11
|
+
data: :data,
|
|
12
|
+
created_at: :created_at,
|
|
13
|
+
context: :context
|
|
14
|
+
}.freeze
|
|
15
|
+
|
|
16
|
+
attr_accessor \
|
|
17
|
+
:object,
|
|
18
|
+
:id,
|
|
19
|
+
:event,
|
|
20
|
+
:data,
|
|
21
|
+
:created_at,
|
|
22
|
+
:context
|
|
23
|
+
|
|
24
|
+
def initialize(json)
|
|
25
|
+
hash = self.class.normalize(json)
|
|
26
|
+
@object = hash[:object]
|
|
27
|
+
@id = hash[:id]
|
|
28
|
+
@event = hash[:event]
|
|
29
|
+
@data = hash[:data] ? WorkOS::AgentInstanceDeletedData.new(hash[:data]) : nil
|
|
30
|
+
@created_at = hash[:created_at]
|
|
31
|
+
@context = hash[:context] ? WorkOS::EventContext.new(hash[:context]) : nil
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
module WorkOS
|
|
6
|
+
class AgentInstanceDeletedData < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
object: :object,
|
|
9
|
+
id: :id,
|
|
10
|
+
agent_blueprint_id: :agent_blueprint_id,
|
|
11
|
+
organization_id: :organization_id,
|
|
12
|
+
organization_membership_id: :organization_membership_id,
|
|
13
|
+
type: :type,
|
|
14
|
+
created_at: :created_at,
|
|
15
|
+
updated_at: :updated_at
|
|
16
|
+
}.freeze
|
|
17
|
+
|
|
18
|
+
attr_accessor \
|
|
19
|
+
:object,
|
|
20
|
+
:id,
|
|
21
|
+
:agent_blueprint_id,
|
|
22
|
+
:organization_id,
|
|
23
|
+
:organization_membership_id,
|
|
24
|
+
:type,
|
|
25
|
+
:created_at,
|
|
26
|
+
:updated_at
|
|
27
|
+
|
|
28
|
+
def initialize(json)
|
|
29
|
+
hash = self.class.normalize(json)
|
|
30
|
+
@object = hash[:object]
|
|
31
|
+
@id = hash[:id]
|
|
32
|
+
@agent_blueprint_id = hash[:agent_blueprint_id]
|
|
33
|
+
@organization_id = hash[:organization_id]
|
|
34
|
+
@organization_membership_id = hash[:organization_membership_id]
|
|
35
|
+
@type = hash[:type]
|
|
36
|
+
@created_at = hash[:created_at]
|
|
37
|
+
@updated_at = hash[:updated_at]
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|