workos 9.0.0 → 9.2.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.
Files changed (129) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +2 -2
  3. data/.github/workflows/docs.yml +2 -2
  4. data/.github/workflows/lint.yml +2 -2
  5. data/.github/workflows/release-please.yml +49 -66
  6. data/.github/workflows/release.yml +2 -2
  7. data/.last-synced-sha +1 -1
  8. data/.oagen-manifest.json +101 -14
  9. data/.release-please-manifest.json +1 -1
  10. data/.ruby-version +1 -1
  11. data/CHANGELOG.md +89 -0
  12. data/Gemfile.lock +4 -4
  13. data/lib/workos/{directory_sync/dsync_deactivated.rb → api_keys/api_key_updated.rb} +2 -2
  14. data/lib/workos/api_keys/api_key_updated_data.rb +49 -0
  15. data/lib/workos/{directory_sync/dsync_deactivated_data_domain.rb → api_keys/api_key_updated_data_owner.rb} +1 -1
  16. data/lib/workos/api_keys/api_key_updated_data_previous_attribute.rb +18 -0
  17. data/lib/workos/api_keys/expire_api_key.rb +18 -0
  18. data/lib/workos/api_keys.rb +25 -0
  19. data/lib/workos/{types/dsync_deactivated_data_type.rb → authorization/create_group_role_assignment.rb} +1 -3
  20. data/lib/workos/authorization/delete_group_role_assignments_by_criteria.rb +7 -0
  21. data/lib/workos/authorization/group_role_assignment.rb +37 -0
  22. data/lib/workos/authorization/group_role_assignment_list.rb +25 -0
  23. data/lib/workos/authorization/group_role_assignment_resource.rb +25 -0
  24. data/lib/workos/authorization/replace_group_role_assignment_entry.rb +7 -0
  25. data/lib/workos/authorization/replace_group_role_assignments.rb +18 -0
  26. data/lib/workos/authorization/user_role_assignment_resource.rb +1 -19
  27. data/lib/workos/authorization.rb +190 -10
  28. data/lib/workos/base_client.rb +19 -2
  29. data/lib/workos/client.rb +8 -0
  30. data/lib/workos/client_api/client_api_token.rb +22 -0
  31. data/lib/workos/client_api/client_api_token_response.rb +18 -0
  32. data/lib/workos/client_api.rb +39 -0
  33. data/lib/workos/connect/user_object.rb +3 -0
  34. data/lib/workos/connect.rb +1 -1
  35. data/lib/workos/directory_sync/dsync_token_created.rb +34 -0
  36. data/lib/workos/directory_sync/dsync_token_created_data.rb +34 -0
  37. data/lib/workos/directory_sync/dsync_token_revoked.rb +34 -0
  38. data/lib/workos/directory_sync/dsync_token_revoked_data.rb +7 -0
  39. data/lib/workos/directory_sync.rb +2 -2
  40. data/lib/workos/events.rb +1 -1
  41. data/lib/workos/groups.rb +2 -2
  42. data/lib/workos/inflections.rb +0 -1
  43. data/lib/workos/organization_membership_service.rb +2 -2
  44. data/lib/workos/organizations.rb +1 -1
  45. data/lib/workos/pipes/connected_account.rb +6 -0
  46. data/lib/workos/pipes/data_integrations_list_response_data.rb +3 -0
  47. data/lib/workos/pipes/data_integrations_list_response_data_connected_account.rb +6 -0
  48. data/lib/workos/pipes.rb +5 -5
  49. data/lib/workos/pipes_provider/configure_data_integration_body.rb +28 -0
  50. data/lib/workos/pipes_provider/data_integration_configuration_list_response.rb +22 -0
  51. data/lib/workos/{directory_sync/dsync_deactivated_data.rb → pipes_provider/data_integration_configuration_response.rb} +13 -13
  52. data/lib/workos/pipes_provider/data_integration_credentials.rb +31 -0
  53. data/lib/workos/pipes_provider.rb +68 -0
  54. data/lib/workos/types/audit_log_configuration_log_stream_type.rb +2 -1
  55. data/lib/workos/types/connected_account_auth_method.rb +13 -0
  56. data/lib/workos/types/create_webhook_endpoint_events.rb +2 -1
  57. data/lib/workos/types/data_integration_access_token_response_error.rb +2 -2
  58. data/lib/workos/types/data_integration_credentials_credentials_type.rb +14 -0
  59. data/lib/workos/types/{dsync_deactivated_data_state.rb → data_integrations_list_response_data_auth_methods.rb} +1 -1
  60. data/lib/workos/types/data_integrations_list_response_data_connected_account_auth_method.rb +9 -0
  61. data/lib/workos/types/radar_standalone_response_control.rb +1 -2
  62. data/lib/workos/types/widget_session_token_scopes.rb +2 -1
  63. data/lib/workos/user_management/create_user.rb +3 -0
  64. data/lib/workos/user_management/email_change_confirmation_user.rb +3 -0
  65. data/lib/workos/user_management/revoke_session.rb +2 -6
  66. data/lib/workos/user_management/update_user.rb +3 -0
  67. data/lib/workos/user_management/user_api_key_updated_data_owner.rb +7 -0
  68. data/lib/workos/user_management.rb +13 -10
  69. data/lib/workos/vault/{object.rb → vault_object.rb} +1 -1
  70. data/lib/workos/vault.rb +4 -4
  71. data/lib/workos/version.rb +1 -1
  72. data/lib/workos/webhooks.rb +1 -1
  73. data/lib/workos/widgets/widget_session_token_response.rb +1 -12
  74. data/lib/workos.rb +2 -0
  75. data/rbi/workos/{dsync_deactivated.rbi → api_key_updated.rbi} +3 -3
  76. data/rbi/workos/api_key_updated_data.rbi +84 -0
  77. data/rbi/workos/api_key_updated_data_owner.rbi +30 -0
  78. data/rbi/workos/api_key_updated_data_previous_attribute.rbi +24 -0
  79. data/rbi/workos/api_keys.rbi +9 -0
  80. data/rbi/workos/authorization.rbi +63 -0
  81. data/rbi/workos/authorization_code_session_authenticate_request.rbi +2 -2
  82. data/rbi/workos/client.rbi +6 -0
  83. data/rbi/workos/client_api.rbi +22 -0
  84. data/rbi/workos/client_api_token.rbi +30 -0
  85. data/rbi/workos/client_api_token_response.rbi +24 -0
  86. data/rbi/workos/configure_data_integration_body.rbi +42 -0
  87. data/rbi/workos/connected_account.rbi +12 -0
  88. data/rbi/workos/create_group_role_assignment.rbi +42 -0
  89. data/rbi/workos/create_user.rbi +6 -0
  90. data/rbi/workos/data_integration_configuration_list_response.rbi +30 -0
  91. data/rbi/workos/{dsync_deactivated_data.rbi → data_integration_configuration_response.rbi} +21 -21
  92. data/rbi/workos/data_integration_credentials.rbi +48 -0
  93. data/rbi/workos/data_integrations_list_response_data.rbi +6 -0
  94. data/rbi/workos/data_integrations_list_response_data_connected_account.rbi +12 -0
  95. data/rbi/workos/delete_group_role_assignments_by_criteria.rbi +42 -0
  96. data/rbi/workos/dsync_token_created.rbi +54 -0
  97. data/rbi/workos/dsync_token_created_data.rbi +54 -0
  98. data/rbi/workos/dsync_token_revoked.rbi +54 -0
  99. data/rbi/workos/dsync_token_revoked_data.rbi +54 -0
  100. data/rbi/workos/email_change_confirmation_user.rbi +6 -0
  101. data/rbi/workos/expire_api_key.rbi +24 -0
  102. data/rbi/workos/group_role_assignment.rbi +60 -0
  103. data/rbi/workos/group_role_assignment_resource.rbi +36 -0
  104. data/rbi/workos/organization_membership_service.rbi +1 -1
  105. data/rbi/workos/pipes.rbi +2 -2
  106. data/rbi/workos/pipes_provider.rbi +34 -0
  107. data/rbi/workos/refresh_token_session_authenticate_request.rbi +2 -2
  108. data/rbi/workos/replace_group_role_assignment_entry.rbi +42 -0
  109. data/rbi/workos/replace_group_role_assignments.rbi +24 -0
  110. data/rbi/workos/revoke_session.rbi +0 -6
  111. data/rbi/workos/update_user.rbi +6 -0
  112. data/rbi/workos/user.rbi +6 -0
  113. data/rbi/workos/{dsync_deactivated_data_domain.rbi → user_api_key_updated_data_owner.rbi} +5 -5
  114. data/rbi/workos/user_management.rbi +8 -7
  115. data/rbi/workos/user_object.rbi +6 -0
  116. data/rbi/workos/vault.rbi +2 -2
  117. data/rbi/workos/{object.rbi → vault_object.rbi} +1 -1
  118. data/renovate.json +1 -61
  119. data/test/workos/test_api_keys.rb +9 -1
  120. data/test/workos/test_authorization.rb +48 -0
  121. data/test/workos/test_base_client.rb +64 -0
  122. data/test/workos/test_client_api.rb +33 -0
  123. data/test/workos/test_model_round_trip.rb +363 -67
  124. data/test/workos/test_pipes.rb +3 -3
  125. data/test/workos/test_pipes_provider.rb +41 -0
  126. data/test/workos/test_user_management.rb +2 -2
  127. data/test/workos/test_vault.rb +0 -1
  128. metadata +61 -17
  129. /data/lib/workos/{authorization → groups}/user_organization_membership_base_list_data.rb +0 -0
@@ -26,7 +26,7 @@ module WorkOS
26
26
  # @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"`.
27
27
  # @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"`.
28
28
  # @param limit [Integer, nil] Upper limit on the number of objects to return, between `1` and `100`.
29
- # @param order [WorkOS::Types::PaginationOrder, nil] Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to descending.
29
+ # @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).
30
30
  # @param organization_id [String, nil] The ID of the [organization](https://workos.com/docs/reference/organization) which the user belongs to.
31
31
  # @param statuses [Array<WorkOS::Types::UserManagementOrganizationMembershipStatuses>, nil] Filter by the status of the organization membership. Array including any of `active`, `inactive`, or `pending`.
32
32
  # @param user_id [String, nil] The ID of the [user](https://workos.com/docs/reference/authkit/user).
@@ -228,7 +228,7 @@ module WorkOS
228
228
  # @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"`.
229
229
  # @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"`.
230
230
  # @param limit [Integer, nil] Upper limit on the number of objects to return, between `1` and `100`.
231
- # @param order [WorkOS::Types::PaginationOrder, nil] Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to descending.
231
+ # @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).
232
232
  # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
233
233
  # @return [WorkOS::Types::ListStruct<WorkOS::Group>]
234
234
  def list_organization_membership_groups(
@@ -14,7 +14,7 @@ module WorkOS
14
14
  # @param before [String, nil] An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `before="obj_123"` to fetch a new batch of objects before `"obj_123"`.
15
15
  # @param after [String, nil] An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `after="obj_123"` to fetch a new batch of objects after `"obj_123"`.
16
16
  # @param limit [Integer, nil] Upper limit on the number of objects to return, between `1` and `100`.
17
- # @param order [WorkOS::Types::PaginationOrder, nil] Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to descending.
17
+ # @param order [WorkOS::Types::PaginationOrder, nil] Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records).
18
18
  # @param domains [Array<String>, nil] The domains of an Organization. Any Organization with a matching domain will be returned.
19
19
  # @param search [String, nil] Searchable text for an Organization. Matches against the organization name.
20
20
  # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
@@ -10,6 +10,8 @@ module WorkOS
10
10
  user_id: :user_id,
11
11
  organization_id: :organization_id,
12
12
  scopes: :scopes,
13
+ auth_method: :auth_method,
14
+ api_key_last_4: :api_key_last_4,
13
15
  state: :state,
14
16
  created_at: :created_at,
15
17
  updated_at: :updated_at
@@ -21,6 +23,8 @@ module WorkOS
21
23
  :user_id,
22
24
  :organization_id,
23
25
  :scopes,
26
+ :auth_method,
27
+ :api_key_last_4,
24
28
  :state,
25
29
  :created_at,
26
30
  :updated_at
@@ -32,6 +36,8 @@ module WorkOS
32
36
  @user_id = hash[:user_id]
33
37
  @organization_id = hash[:organization_id]
34
38
  @scopes = hash[:scopes] || []
39
+ @auth_method = hash[:auth_method]
40
+ @api_key_last_4 = hash[:api_key_last_4]
35
41
  @state = hash[:state]
36
42
  @created_at = hash[:created_at]
37
43
  @updated_at = hash[:updated_at]
@@ -13,6 +13,7 @@ module WorkOS
13
13
  integration_type: :integration_type,
14
14
  credentials_type: :credentials_type,
15
15
  scopes: :scopes,
16
+ auth_methods: :auth_methods,
16
17
  ownership: :ownership,
17
18
  created_at: :created_at,
18
19
  updated_at: :updated_at,
@@ -28,6 +29,7 @@ module WorkOS
28
29
  :integration_type,
29
30
  :credentials_type,
30
31
  :scopes,
32
+ :auth_methods,
31
33
  :ownership,
32
34
  :created_at,
33
35
  :updated_at,
@@ -43,6 +45,7 @@ module WorkOS
43
45
  @integration_type = hash[:integration_type]
44
46
  @credentials_type = hash[:credentials_type]
45
47
  @scopes = hash[:scopes] || []
48
+ @auth_methods = hash[:auth_methods] || []
46
49
  @ownership = hash[:ownership]
47
50
  @created_at = hash[:created_at]
48
51
  @updated_at = hash[:updated_at]
@@ -10,6 +10,8 @@ module WorkOS
10
10
  user_id: :user_id,
11
11
  organization_id: :organization_id,
12
12
  scopes: :scopes,
13
+ auth_method: :auth_method,
14
+ api_key_last_4: :api_key_last_4,
13
15
  state: :state,
14
16
  created_at: :created_at,
15
17
  updated_at: :updated_at,
@@ -25,6 +27,8 @@ module WorkOS
25
27
  :user_id,
26
28
  :organization_id,
27
29
  :scopes,
30
+ :auth_method,
31
+ :api_key_last_4,
28
32
  :state,
29
33
  :created_at,
30
34
  :updated_at
@@ -43,6 +47,8 @@ module WorkOS
43
47
  @user_id = hash[:user_id]
44
48
  @organization_id = hash[:organization_id]
45
49
  @scopes = hash[:scopes] || []
50
+ @auth_method = hash[:auth_method]
51
+ @api_key_last_4 = hash[:api_key_last_4]
46
52
  @state = hash[:state]
47
53
  @created_at = hash[:created_at]
48
54
  @updated_at = hash[:updated_at]
data/lib/workos/pipes.rb CHANGED
@@ -42,13 +42,13 @@ module WorkOS
42
42
  end
43
43
 
44
44
  # Get an access token for a connected account
45
- # @param slug [String] The identifier of the integration.
45
+ # @param provider [String] The identifier of the integration.
46
46
  # @param user_id [String] A [User](https://workos.com/docs/reference/authkit/user) identifier.
47
47
  # @param organization_id [String, nil] An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization.
48
48
  # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
49
49
  # @return [WorkOS::DataIntegrationAccessTokenResponse]
50
- def create_data_integration_token(
51
- slug:,
50
+ def get_access_token(
51
+ provider:,
52
52
  user_id:,
53
53
  organization_id: nil,
54
54
  request_options: {}
@@ -59,7 +59,7 @@ module WorkOS
59
59
  }.compact
60
60
  response = @client.request(
61
61
  method: :post,
62
- path: "/data-integrations/#{WorkOS::Util.encode_path(slug)}/token",
62
+ path: "/data-integrations/#{WorkOS::Util.encode_path(provider)}/token",
63
63
  auth: true,
64
64
  body: body,
65
65
  request_options: request_options
@@ -121,7 +121,7 @@ module WorkOS
121
121
  nil
122
122
  end
123
123
 
124
- # List providers
124
+ # List providers for a user
125
125
  # @param user_id [String] A [User](https://workos.com/docs/reference/authkit/user) identifier to list providers and connected accounts for.
126
126
  # @param organization_id [String, nil] An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to filter connections for a specific organization.
127
127
  # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ # This file is auto-generated by oagen. Do not edit.
4
+
5
+ module WorkOS
6
+ class ConfigureDataIntegrationBody < WorkOS::Types::BaseModel
7
+ HASH_ATTRS = {
8
+ enabled: :enabled,
9
+ scopes: :scopes,
10
+ client_id: :client_id,
11
+ client_secret: :client_secret
12
+ }.freeze
13
+
14
+ attr_accessor \
15
+ :enabled,
16
+ :scopes,
17
+ :client_id,
18
+ :client_secret
19
+
20
+ def initialize(json)
21
+ hash = self.class.normalize(json)
22
+ @enabled = hash[:enabled]
23
+ @scopes = hash[:scopes] || []
24
+ @client_id = hash[:client_id]
25
+ @client_secret = hash[:client_secret]
26
+ end
27
+ end
28
+ 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 DataIntegrationConfigurationListResponse < WorkOS::Types::BaseModel
7
+ HASH_ATTRS = {
8
+ object: :object,
9
+ data: :data
10
+ }.freeze
11
+
12
+ attr_accessor \
13
+ :object,
14
+ :data
15
+
16
+ def initialize(json)
17
+ hash = self.class.normalize(json)
18
+ @object = hash[:object]
19
+ @data = (hash[:data] || []).map { |item| item ? WorkOS::DataIntegrationConfigurationResponse.new(item) : nil }
20
+ end
21
+ end
22
+ end
@@ -3,44 +3,44 @@
3
3
  # This file is auto-generated by oagen. Do not edit.
4
4
 
5
5
  module WorkOS
6
- class DsyncDeactivatedData < WorkOS::Types::BaseModel
6
+ class DataIntegrationConfigurationResponse < WorkOS::Types::BaseModel
7
7
  HASH_ATTRS = {
8
8
  object: :object,
9
9
  id: :id,
10
10
  organization_id: :organization_id,
11
- type: :type,
12
- state: :state,
11
+ slug: :slug,
13
12
  name: :name,
13
+ enabled: :enabled,
14
+ scopes: :scopes,
14
15
  created_at: :created_at,
15
16
  updated_at: :updated_at,
16
- external_key: :external_key,
17
- domains: :domains
17
+ credentials: :credentials
18
18
  }.freeze
19
19
 
20
20
  attr_accessor \
21
21
  :object,
22
22
  :id,
23
23
  :organization_id,
24
- :type,
25
- :state,
24
+ :slug,
26
25
  :name,
26
+ :enabled,
27
+ :scopes,
27
28
  :created_at,
28
29
  :updated_at,
29
- :external_key,
30
- :domains
30
+ :credentials
31
31
 
32
32
  def initialize(json)
33
33
  hash = self.class.normalize(json)
34
34
  @object = hash[:object]
35
35
  @id = hash[:id]
36
36
  @organization_id = hash[:organization_id]
37
- @type = hash[:type]
38
- @state = hash[:state]
37
+ @slug = hash[:slug]
39
38
  @name = hash[:name]
39
+ @enabled = hash[:enabled]
40
+ @scopes = hash[:scopes] || []
40
41
  @created_at = hash[:created_at]
41
42
  @updated_at = hash[:updated_at]
42
- @external_key = hash[:external_key]
43
- @domains = (hash[:domains] || []).map { |item| item ? WorkOS::DsyncDeactivatedDataDomain.new(item) : nil }
43
+ @credentials = hash[:credentials] ? WorkOS::DataIntegrationCredentials.new(hash[:credentials]) : nil
44
44
  end
45
45
  end
46
46
  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 DataIntegrationCredentials < WorkOS::Types::BaseModel
7
+ HASH_ATTRS = {
8
+ credentials_type: :credentials_type,
9
+ has_credentials: :has_credentials,
10
+ client_id: :client_id,
11
+ client_secret_last_four: :client_secret_last_four,
12
+ redirect_uri: :redirect_uri
13
+ }.freeze
14
+
15
+ attr_accessor \
16
+ :credentials_type,
17
+ :has_credentials,
18
+ :client_id,
19
+ :client_secret_last_four,
20
+ :redirect_uri
21
+
22
+ def initialize(json)
23
+ hash = self.class.normalize(json)
24
+ @credentials_type = hash[:credentials_type]
25
+ @has_credentials = hash[:has_credentials]
26
+ @client_id = hash[:client_id]
27
+ @client_secret_last_four = hash[:client_secret_last_four]
28
+ @redirect_uri = hash[:redirect_uri]
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,68 @@
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 PipesProvider
9
+ def initialize(client)
10
+ @client = client
11
+ end
12
+
13
+ # List providers for an organization
14
+ # @param organization_id [String] An [Organization](https://workos.com/docs/reference/organization) identifier to list provider configurations for.
15
+ # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
16
+ # @return [WorkOS::DataIntegrationConfigurationListResponse]
17
+ def list_organization_data_integration_configurations(
18
+ organization_id:,
19
+ request_options: {}
20
+ )
21
+ response = @client.request(
22
+ method: :get,
23
+ path: "/organizations/#{WorkOS::Util.encode_path(organization_id)}/data_integration_configurations",
24
+ auth: true,
25
+ request_options: request_options
26
+ )
27
+ result = WorkOS::DataIntegrationConfigurationListResponse.new(response.body)
28
+ 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"])
29
+ result
30
+ end
31
+
32
+ # Configure a provider for an organization
33
+ # @param organization_id [String] An [Organization](https://workos.com/docs/reference/organization) identifier to configure the provider for.
34
+ # @param slug [String] The slug identifier of the provider to configure (e.g., `github`, `slack`, `notion`).
35
+ # @param enabled [Boolean, nil] Whether the provider is enabled for the organization.
36
+ # @param scopes [Array<String>, nil] The OAuth scopes to request for the organization. Pass `null` to inherit the provider scopes.
37
+ # @param client_id [String, nil] The OAuth client ID of the organization's own application. Must be provided together with `client_secret`, and only for providers whose credentials are supplied by the organization.
38
+ # @param client_secret [String, nil] The OAuth client secret of the organization's own application. Must be provided together with `client_id`.
39
+ # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
40
+ # @return [WorkOS::DataIntegrationConfigurationResponse]
41
+ def update_organization_data_integration_configuration(
42
+ organization_id:,
43
+ slug:,
44
+ enabled: nil,
45
+ scopes: nil,
46
+ client_id: nil,
47
+ client_secret: nil,
48
+ request_options: {}
49
+ )
50
+ body = {
51
+ "enabled" => enabled,
52
+ "scopes" => scopes,
53
+ "client_id" => client_id,
54
+ "client_secret" => client_secret
55
+ }.compact
56
+ response = @client.request(
57
+ method: :put,
58
+ path: "/organizations/#{WorkOS::Util.encode_path(organization_id)}/data_integration_configurations/#{WorkOS::Util.encode_path(slug)}",
59
+ auth: true,
60
+ body: body,
61
+ request_options: request_options
62
+ )
63
+ result = WorkOS::DataIntegrationConfigurationResponse.new(response.body)
64
+ 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"])
65
+ result
66
+ end
67
+ end
68
+ end
@@ -10,8 +10,9 @@ module WorkOS
10
10
  GENERIC_HTTPS = "GenericHttps"
11
11
  GOOGLE_CLOUD_STORAGE = "GoogleCloudStorage"
12
12
  S_3 = "S3"
13
+ SNOWFLAKE = "Snowflake"
13
14
  SPLUNK = "Splunk"
14
- ALL = [AZURE_SENTINEL, DATADOG, GENERIC_HTTPS, GOOGLE_CLOUD_STORAGE, S_3, SPLUNK].freeze
15
+ ALL = [AZURE_SENTINEL, DATADOG, GENERIC_HTTPS, GOOGLE_CLOUD_STORAGE, S_3, SNOWFLAKE, SPLUNK].freeze
15
16
  end
16
17
  end
17
18
  end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ # This file is auto-generated by oagen. Do not edit.
4
+
5
+ module WorkOS
6
+ module Types
7
+ class ConnectedAccountAuthMethod
8
+ OAUTH = "oauth"
9
+ API_KEY = "api_key"
10
+ ALL = [OAUTH, API_KEY].freeze
11
+ end
12
+ end
13
+ end
@@ -22,6 +22,7 @@ module WorkOS
22
22
  AUTHENTICATION_RADAR_RISK_DETECTED = "authentication.radar_risk_detected"
23
23
  API_KEY_CREATED = "api_key.created"
24
24
  API_KEY_REVOKED = "api_key.revoked"
25
+ API_KEY_UPDATED = "api_key.updated"
25
26
  CONNECTION_ACTIVATED = "connection.activated"
26
27
  CONNECTION_DEACTIVATED = "connection.deactivated"
27
28
  CONNECTION_SAML_CERTIFICATE_RENEWAL_REQUIRED = "connection.saml_certificate_renewal_required"
@@ -85,7 +86,7 @@ module WorkOS
85
86
  WAITLIST_USER_APPROVED = "waitlist_user.approved"
86
87
  WAITLIST_USER_CREATED = "waitlist_user.created"
87
88
  WAITLIST_USER_DENIED = "waitlist_user.denied"
88
- ALL = [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, AUTHENTICATION_RADAR_RISK_DETECTED, API_KEY_CREATED, API_KEY_REVOKED, 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_DISCONNECTED, PIPES_CONNECTED_ACCOUNT_REAUTHORIZATION_NEEDED, SESSION_CREATED, SESSION_REVOKED, WAITLIST_USER_APPROVED, WAITLIST_USER_CREATED, WAITLIST_USER_DENIED].freeze
89
+ ALL = [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, AUTHENTICATION_RADAR_RISK_DETECTED, 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_DISCONNECTED, PIPES_CONNECTED_ACCOUNT_REAUTHORIZATION_NEEDED, SESSION_CREATED, SESSION_REVOKED, WAITLIST_USER_APPROVED, WAITLIST_USER_CREATED, WAITLIST_USER_DENIED].freeze
89
90
  end
90
91
  end
91
92
  end
@@ -5,9 +5,9 @@
5
5
  module WorkOS
6
6
  module Types
7
7
  class DataIntegrationAccessTokenResponseError
8
- NEEDS_REAUTHORIZATION = "needs_reauthorization"
9
8
  NOT_INSTALLED = "not_installed"
10
- ALL = [NEEDS_REAUTHORIZATION, NOT_INSTALLED].freeze
9
+ NEEDS_REAUTHORIZATION = "needs_reauthorization"
10
+ ALL = [NOT_INSTALLED, NEEDS_REAUTHORIZATION].freeze
11
11
  end
12
12
  end
13
13
  end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ # This file is auto-generated by oagen. Do not edit.
4
+
5
+ module WorkOS
6
+ module Types
7
+ class DataIntegrationCredentialsCredentialsType
8
+ SHARED = "shared"
9
+ CUSTOM = "custom"
10
+ ORGANIZATION = "organization"
11
+ ALL = [SHARED, CUSTOM, ORGANIZATION].freeze
12
+ end
13
+ end
14
+ end
@@ -4,6 +4,6 @@
4
4
 
5
5
  module WorkOS
6
6
  module Types
7
- DsyncDeactivatedDataState = DsyncActivatedDataState
7
+ DataIntegrationsListResponseDataAuthMethods = ConnectedAccountAuthMethod
8
8
  end
9
9
  end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ # This file is auto-generated by oagen. Do not edit.
4
+
5
+ module WorkOS
6
+ module Types
7
+ DataIntegrationsListResponseDataConnectedAccountAuthMethod = ConnectedAccountAuthMethod
8
+ end
9
+ end
@@ -7,13 +7,12 @@ module WorkOS
7
7
  class RadarStandaloneResponseControl
8
8
  BOT_DETECTION = "bot_detection"
9
9
  BRUTE_FORCE_ATTACK = "brute_force_attack"
10
- DOMAIN_SIGN_UP_RATE_LIMIT = "domain_sign_up_rate_limit"
11
10
  IMPOSSIBLE_TRAVEL = "impossible_travel"
12
11
  REPEAT_SIGN_UP = "repeat_sign_up"
13
12
  STALE_ACCOUNT = "stale_account"
14
13
  UNRECOGNIZED_DEVICE = "unrecognized_device"
15
14
  RESTRICTION = "restriction"
16
- ALL = [BOT_DETECTION, BRUTE_FORCE_ATTACK, DOMAIN_SIGN_UP_RATE_LIMIT, IMPOSSIBLE_TRAVEL, REPEAT_SIGN_UP, STALE_ACCOUNT, UNRECOGNIZED_DEVICE, RESTRICTION].freeze
15
+ ALL = [BOT_DETECTION, BRUTE_FORCE_ATTACK, IMPOSSIBLE_TRAVEL, REPEAT_SIGN_UP, STALE_ACCOUNT, UNRECOGNIZED_DEVICE, RESTRICTION].freeze
17
16
  end
18
17
  end
19
18
  end
@@ -11,7 +11,8 @@ module WorkOS
11
11
  WIDGETS_API_KEYS_MANAGE = "widgets:api-keys:manage"
12
12
  WIDGETS_DSYNC_MANAGE = "widgets:dsync:manage"
13
13
  WIDGETS_AUDIT_LOG_STREAMING_MANAGE = "widgets:audit-log-streaming:manage"
14
- ALL = [WIDGETS_USERS_TABLE_MANAGE, WIDGETS_DOMAIN_VERIFICATION_MANAGE, WIDGETS_SSO_MANAGE, WIDGETS_API_KEYS_MANAGE, WIDGETS_DSYNC_MANAGE, WIDGETS_AUDIT_LOG_STREAMING_MANAGE].freeze
14
+ WIDGETS_PIPES_MANAGE = "widgets:pipes:manage"
15
+ ALL = [WIDGETS_USERS_TABLE_MANAGE, WIDGETS_DOMAIN_VERIFICATION_MANAGE, WIDGETS_SSO_MANAGE, WIDGETS_API_KEYS_MANAGE, WIDGETS_DSYNC_MANAGE, WIDGETS_AUDIT_LOG_STREAMING_MANAGE, WIDGETS_PIPES_MANAGE].freeze
15
16
  end
16
17
  end
17
18
  end
@@ -8,6 +8,7 @@ module WorkOS
8
8
  email: :email,
9
9
  first_name: :first_name,
10
10
  last_name: :last_name,
11
+ name: :name,
11
12
  email_verified: :email_verified,
12
13
  metadata: :metadata,
13
14
  external_id: :external_id,
@@ -20,6 +21,7 @@ module WorkOS
20
21
  :email,
21
22
  :first_name,
22
23
  :last_name,
24
+ :name,
23
25
  :email_verified,
24
26
  :metadata,
25
27
  :external_id,
@@ -32,6 +34,7 @@ module WorkOS
32
34
  @email = hash[:email]
33
35
  @first_name = hash[:first_name]
34
36
  @last_name = hash[:last_name]
37
+ @name = hash[:name]
35
38
  @email_verified = hash[:email_verified]
36
39
  @metadata = hash[:metadata] || {}
37
40
  @external_id = hash[:external_id]
@@ -9,6 +9,7 @@ module WorkOS
9
9
  id: :id,
10
10
  first_name: :first_name,
11
11
  last_name: :last_name,
12
+ name: :name,
12
13
  profile_picture_url: :profile_picture_url,
13
14
  email: :email,
14
15
  email_verified: :email_verified,
@@ -25,6 +26,7 @@ module WorkOS
25
26
  :id,
26
27
  :first_name,
27
28
  :last_name,
29
+ :name,
28
30
  :profile_picture_url,
29
31
  :email,
30
32
  :email_verified,
@@ -41,6 +43,7 @@ module WorkOS
41
43
  @id = hash[:id]
42
44
  @first_name = hash[:first_name]
43
45
  @last_name = hash[:last_name]
46
+ @name = hash[:name]
44
47
  @profile_picture_url = hash[:profile_picture_url]
45
48
  @email = hash[:email]
46
49
  @email_verified = hash[:email_verified]
@@ -5,18 +5,14 @@
5
5
  module WorkOS
6
6
  class RevokeSession < WorkOS::Types::BaseModel
7
7
  HASH_ATTRS = {
8
- session_id: :session_id,
9
- return_to: :return_to
8
+ session_id: :session_id
10
9
  }.freeze
11
10
 
12
- attr_accessor \
13
- :session_id,
14
- :return_to
11
+ attr_accessor :session_id
15
12
 
16
13
  def initialize(json)
17
14
  hash = self.class.normalize(json)
18
15
  @session_id = hash[:session_id]
19
- @return_to = hash[:return_to]
20
16
  end
21
17
  end
22
18
  end
@@ -8,6 +8,7 @@ module WorkOS
8
8
  email: :email,
9
9
  first_name: :first_name,
10
10
  last_name: :last_name,
11
+ name: :name,
11
12
  email_verified: :email_verified,
12
13
  metadata: :metadata,
13
14
  external_id: :external_id,
@@ -21,6 +22,7 @@ module WorkOS
21
22
  :email,
22
23
  :first_name,
23
24
  :last_name,
25
+ :name,
24
26
  :email_verified,
25
27
  :metadata,
26
28
  :external_id,
@@ -34,6 +36,7 @@ module WorkOS
34
36
  @email = hash[:email]
35
37
  @first_name = hash[:first_name]
36
38
  @last_name = hash[:last_name]
39
+ @name = hash[:name]
37
40
  @email_verified = hash[:email_verified]
38
41
  @metadata = hash[:metadata] || {}
39
42
  @external_id = hash[:external_id]
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ # This file is auto-generated by oagen. Do not edit.
4
+
5
+ module WorkOS
6
+ UserApiKeyUpdatedDataOwner = UserApiKeyCreatedDataOwner
7
+ end