workos 10.4.0 → 10.5.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 (159) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +1 -1
  3. data/.github/workflows/docs.yml +2 -2
  4. data/.github/workflows/lint.yml +1 -1
  5. data/.github/workflows/release-please.yml +1 -1
  6. data/.github/workflows/release.yml +1 -1
  7. data/.last-synced-sha +1 -1
  8. data/.oagen-manifest.json +92 -2
  9. data/.release-please-manifest.json +1 -1
  10. data/.ruby-version +1 -1
  11. data/CHANGELOG.md +214 -0
  12. data/Gemfile.lock +2 -2
  13. data/lib/workos/admin_portal/generate_link.rb +3 -0
  14. data/lib/workos/admin_portal/revoke_link.rb +22 -0
  15. data/lib/workos/admin_portal.rb +27 -0
  16. data/lib/workos/agents/agent_blueprint.rb +3 -0
  17. data/lib/workos/agents/agent_blueprint_invocable_as.rb +18 -0
  18. data/lib/workos/agents/agent_blueprints_create_request.rb +3 -0
  19. data/lib/workos/agents/agent_blueprints_create_request_invocable_as.rb +18 -0
  20. data/lib/workos/agents/agent_blueprints_update_request.rb +3 -0
  21. data/lib/workos/agents/agent_blueprints_update_request_invocable_as.rb +18 -0
  22. data/lib/workos/agents/agent_registration.rb +3 -0
  23. data/lib/workos/agents.rb +25 -0
  24. data/lib/workos/authorization/user_role_assignment_source.rb +5 -2
  25. data/lib/workos/authorization/user_role_assignment_source_group.rb +7 -0
  26. data/lib/workos/directory_sync/directory_sync_rate_limit_error.rb +25 -0
  27. data/lib/workos/directory_sync/directory_sync_response.rb +18 -0
  28. data/lib/workos/directory_sync.rb +19 -0
  29. data/lib/workos/feature_flags/flag_updated_context_previous_attribute_data.rb +3 -0
  30. data/lib/workos/feature_flags/flag_updated_context_previous_attribute_data_owner.rb +7 -0
  31. data/lib/workos/pipes/add_data_integrations_get_data_integration_authorize_url_request.rb +37 -0
  32. data/lib/workos/pipes/connected_account.rb +6 -0
  33. data/lib/workos/pipes/connected_account_input.rb +6 -0
  34. data/lib/workos/pipes/connected_account_write_response.rb +73 -0
  35. data/lib/workos/pipes/connected_account_write_response_warning.rb +22 -0
  36. data/lib/workos/pipes/create_connected_account.rb +40 -0
  37. data/lib/workos/pipes/create_organization_connected_account.rb +43 -0
  38. data/lib/workos/pipes/data_integration_credentials_response.rb +1 -1
  39. data/lib/workos/pipes/{data_integration_credentials_response_credential.rb → data_integration_vended_credential.rb} +9 -3
  40. data/lib/workos/pipes/data_integrations_create_api_key_connection_request.rb +37 -0
  41. data/lib/workos/pipes/data_integrations_create_client_credentials_connection_request.rb +43 -0
  42. data/lib/workos/pipes/data_integrations_get_data_integration_authorize_url_request.rb +3 -0
  43. data/lib/workos/pipes/data_integrations_list_response_data_connected_account.rb +6 -0
  44. data/lib/workos/pipes/data_integrations_upsert_api_key_request.rb +6 -3
  45. data/lib/workos/pipes/data_integrations_upsert_api_key_request_2.rb +37 -0
  46. data/lib/workos/pipes/data_integrations_upsert_client_credentials_request.rb +6 -3
  47. data/lib/workos/pipes/data_integrations_upsert_client_credentials_request_2.rb +43 -0
  48. data/lib/workos/pipes/organization_connected_account.rb +40 -0
  49. data/lib/workos/pipes/reauthorize_data_integrations_get_data_integration_authorize_url_request.rb +40 -0
  50. data/lib/workos/pipes/reauthorize_data_integrations_upsert_api_key_request.rb +40 -0
  51. data/lib/workos/pipes/reauthorize_data_integrations_upsert_client_credentials_request.rb +46 -0
  52. data/lib/workos/pipes.rb +192 -31
  53. data/lib/workos/shared/agent_blueprint_created_data.rb +3 -0
  54. data/lib/workos/shared/agent_blueprint_created_data_invocable_as.rb +18 -0
  55. data/lib/workos/shared/agent_blueprint_updated_data.rb +40 -1
  56. data/lib/workos/shared/agent_blueprint_updated_data_invocable_as.rb +18 -0
  57. data/lib/workos/shared/pipe_connected_account.rb +6 -0
  58. data/lib/workos/sso/token_query.rb +3 -0
  59. data/lib/workos/sso.rb +3 -0
  60. data/lib/workos/types/add_data_integrations_get_data_integration_authorize_url_request_connection_owner.rb +13 -0
  61. data/lib/workos/types/agent_blueprint_created_data_invocable_as_instance_types.rb +13 -0
  62. data/lib/workos/types/agent_blueprint_invocable_as_instance_types.rb +9 -0
  63. data/lib/workos/types/agent_blueprint_updated_data_invocable_as_instance_types.rb +9 -0
  64. data/lib/workos/types/agent_blueprints_create_request_invocable_as_instance_types.rb +9 -0
  65. data/lib/workos/types/agent_blueprints_update_request_invocable_as_instance_types.rb +9 -0
  66. data/lib/workos/types/agent_instance_created_data_type.rb +1 -5
  67. data/lib/workos/types/agent_instance_deleted_data_type.rb +1 -1
  68. data/lib/workos/types/agent_instance_type.rb +1 -1
  69. data/lib/workos/types/connected_account_write_response_auth_method.rb +9 -0
  70. data/lib/workos/types/connected_account_write_response_connection_role.rb +9 -0
  71. data/lib/workos/types/connected_account_write_response_state.rb +9 -0
  72. data/lib/workos/types/create_connected_account_state.rb +9 -0
  73. data/lib/workos/types/create_data_integration_ownership.rb +1 -5
  74. data/lib/workos/types/create_organization_connected_account_state.rb +9 -0
  75. data/lib/workos/types/data_integration_ownership.rb +1 -1
  76. data/lib/workos/types/data_integrations_create_api_key_connection_request_connection_owner.rb +9 -0
  77. data/lib/workos/types/data_integrations_create_client_credentials_connection_request_connection_owner.rb +9 -0
  78. data/lib/workos/types/data_integrations_get_data_integration_authorize_url_request_connection_owner.rb +1 -1
  79. data/lib/workos/types/data_integrations_get_user_token_request_connection_owner.rb +1 -1
  80. data/lib/workos/types/data_integrations_list_response_data_connection_owner.rb +1 -1
  81. data/lib/workos/types/data_integrations_upsert_api_key_request_2_connection_owner.rb +9 -0
  82. data/lib/workos/types/data_integrations_upsert_api_key_request_connection_owner.rb +1 -1
  83. data/lib/workos/types/data_integrations_upsert_client_credentials_request_2_connection_owner.rb +9 -0
  84. data/lib/workos/types/data_integrations_upsert_client_credentials_request_connection_owner.rb +1 -1
  85. data/lib/workos/types/data_integrations_vend_credentials_request_connection_owner.rb +1 -1
  86. data/lib/workos/types/organization_connected_account_state.rb +9 -0
  87. data/lib/workos/types/pipes_ownership.rb +1 -1
  88. data/lib/workos/types/reauthorize_data_integrations_get_data_integration_authorize_url_request_connection_owner.rb +9 -0
  89. data/lib/workos/types/reauthorize_data_integrations_upsert_api_key_request_connection_owner.rb +9 -0
  90. data/lib/workos/types/reauthorize_data_integrations_upsert_client_credentials_request_connection_owner.rb +9 -0
  91. data/lib/workos/types/resource_export_completed_data_resource_type.rb +2 -1
  92. data/lib/workos/types/vault_dek_rekeyed_data_actor_source.rb +9 -0
  93. data/lib/workos/user_management.rb +1 -1
  94. data/lib/workos/vault/vault_dek_rekeyed.rb +34 -0
  95. data/lib/workos/vault/vault_dek_rekeyed_data.rb +31 -0
  96. data/lib/workos/version.rb +1 -1
  97. data/rbi/workos/add_data_integrations_get_data_integration_authorize_url_request.rbi +60 -0
  98. data/rbi/workos/admin_portal.rbi +11 -1
  99. data/rbi/workos/agent_blueprint.rbi +6 -0
  100. data/rbi/workos/agent_blueprint_created_data.rbi +6 -0
  101. data/rbi/workos/agent_blueprint_created_data_invocable_as.rbi +24 -0
  102. data/rbi/workos/agent_blueprint_invocable_as.rbi +24 -0
  103. data/rbi/workos/agent_blueprint_updated_data.rbi +6 -0
  104. data/rbi/workos/agent_blueprint_updated_data_invocable_as.rbi +24 -0
  105. data/rbi/workos/agent_blueprints_create_request.rbi +6 -0
  106. data/rbi/workos/agent_blueprints_create_request_invocable_as.rbi +24 -0
  107. data/rbi/workos/agent_blueprints_update_request.rbi +6 -0
  108. data/rbi/workos/agent_blueprints_update_request_invocable_as.rbi +24 -0
  109. data/rbi/workos/agent_registration.rbi +6 -0
  110. data/rbi/workos/agents.rbi +12 -2
  111. data/rbi/workos/connected_account.rbi +12 -0
  112. data/rbi/workos/connected_account_input.rbi +12 -0
  113. data/rbi/workos/connected_account_write_response.rbi +132 -0
  114. data/rbi/workos/connected_account_write_response_warning.rbi +30 -0
  115. data/rbi/workos/create_connected_account.rbi +66 -0
  116. data/rbi/workos/create_organization_connected_account.rbi +72 -0
  117. data/rbi/workos/data_integration_credentials_response.rbi +2 -2
  118. data/rbi/workos/data_integration_vended_credential.rbi +66 -0
  119. data/rbi/workos/data_integrations_create_api_key_connection_request.rbi +60 -0
  120. data/rbi/workos/data_integrations_create_client_credentials_connection_request.rbi +72 -0
  121. data/rbi/workos/data_integrations_get_data_integration_authorize_url_request.rbi +6 -0
  122. data/rbi/workos/data_integrations_list_response_data_connected_account.rbi +12 -0
  123. data/rbi/workos/data_integrations_upsert_api_key_request.rbi +12 -6
  124. data/rbi/workos/data_integrations_upsert_api_key_request_2.rbi +60 -0
  125. data/rbi/workos/data_integrations_upsert_client_credentials_request.rbi +12 -6
  126. data/rbi/workos/data_integrations_upsert_client_credentials_request_2.rbi +72 -0
  127. data/rbi/workos/directory_sync.rbi +8 -0
  128. data/rbi/workos/directory_sync_rate_limit_error.rbi +36 -0
  129. data/rbi/workos/directory_sync_response.rbi +24 -0
  130. data/rbi/workos/flag_updated_context_previous_attribute_data.rbi +6 -0
  131. data/rbi/workos/flag_updated_context_previous_attribute_data_owner.rbi +36 -0
  132. data/rbi/workos/generate_link.rbi +6 -0
  133. data/rbi/workos/organization_connected_account.rbi +66 -0
  134. data/rbi/workos/pipe_connected_account.rbi +12 -0
  135. data/rbi/workos/pipes.rbi +64 -15
  136. data/rbi/workos/reauthorize_data_integrations_get_data_integration_authorize_url_request.rbi +66 -0
  137. data/rbi/workos/reauthorize_data_integrations_upsert_api_key_request.rbi +66 -0
  138. data/rbi/workos/reauthorize_data_integrations_upsert_client_credentials_request.rbi +78 -0
  139. data/rbi/workos/revoke_link.rbi +30 -0
  140. data/rbi/workos/sso.rbi +2 -1
  141. data/rbi/workos/token_query.rbi +6 -0
  142. data/rbi/workos/user_role_assignment_source.rbi +6 -0
  143. data/rbi/workos/user_role_assignment_source_group.rbi +30 -0
  144. data/rbi/workos/vault_dek_rekeyed.rbi +54 -0
  145. data/rbi/workos/{data_integration_credentials_response_credential.rbi → vault_dek_rekeyed_data.rbi} +13 -19
  146. data/test/workos/test_admin_portal.rb +9 -1
  147. data/test/workos/test_admin_portal_model_round_trip.rb +14 -0
  148. data/test/workos/test_agents.rb +8 -0
  149. data/test/workos/test_agents_model_round_trip.rb +35 -0
  150. data/test/workos/test_authorization_model_round_trip.rb +15 -1
  151. data/test/workos/test_directory_sync.rb +8 -0
  152. data/test/workos/test_directory_sync_model_round_trip.rb +24 -0
  153. data/test/workos/test_feature_flags_model_round_trip.rb +16 -0
  154. data/test/workos/test_pipes.rb +20 -4
  155. data/test/workos/test_pipes_model_round_trip.rb +284 -15
  156. data/test/workos/test_shared_model_round_trip.rb +30 -6
  157. data/test/workos/test_sso_model_round_trip.rb +1 -0
  158. data/test/workos/test_vault_model_round_trip.rb +33 -0
  159. metadata +73 -3
@@ -102,6 +102,25 @@ module WorkOS
102
102
  nil
103
103
  end
104
104
 
105
+ # Sync a Directory
106
+ # @param id [String] Unique identifier for the Directory.
107
+ # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
108
+ # @return [WorkOS::DirectorySyncResponse]
109
+ def create_directory_sync(
110
+ id:,
111
+ request_options: {}
112
+ )
113
+ response = @client.request(
114
+ method: :post,
115
+ path: "/directories/#{WorkOS::Util.encode_path(id)}/sync",
116
+ auth: true,
117
+ request_options: request_options
118
+ )
119
+ result = WorkOS::DirectorySyncResponse.new(response.body)
120
+ 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"])
121
+ result
122
+ end
123
+
105
124
  # List Directory Groups
106
125
  # @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"`.
107
126
  # @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"`.
@@ -8,6 +8,7 @@ module WorkOS
8
8
  name: :name,
9
9
  description: :description,
10
10
  tags: :tags,
11
+ owner: :owner,
11
12
  enabled: :enabled,
12
13
  default_value: :default_value
13
14
  }.freeze
@@ -16,6 +17,7 @@ module WorkOS
16
17
  :name,
17
18
  :description,
18
19
  :tags,
20
+ :owner,
19
21
  :enabled,
20
22
  :default_value
21
23
 
@@ -24,6 +26,7 @@ module WorkOS
24
26
  @name = hash[:name]
25
27
  @description = hash[:description]
26
28
  @tags = hash[:tags] || []
29
+ @owner = hash[:owner] ? WorkOS::FlagUpdatedContextPreviousAttributeDataOwner.new(hash[:owner]) : nil
27
30
  @enabled = hash[:enabled]
28
31
  @default_value = hash[:default_value]
29
32
  end
@@ -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
+ FlagUpdatedContextPreviousAttributeDataOwner = FeatureFlagOwner
7
+ 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 AddDataIntegrationsGetDataIntegrationAuthorizeUrlRequest < WorkOS::Types::BaseModel
7
+ HASH_ATTRS = {
8
+ account_display_name: :account_display_name,
9
+ user_id: :user_id,
10
+ organization_id: :organization_id,
11
+ connection_owner: :connection_owner,
12
+ return_to: :return_to,
13
+ config: :config,
14
+ connection_intent: :connection_intent
15
+ }.freeze
16
+
17
+ attr_accessor \
18
+ :account_display_name,
19
+ :user_id,
20
+ :organization_id,
21
+ :connection_owner,
22
+ :return_to,
23
+ :config,
24
+ :connection_intent
25
+
26
+ def initialize(json)
27
+ hash = self.class.normalize(json)
28
+ @account_display_name = hash[:account_display_name]
29
+ @user_id = hash[:user_id]
30
+ @organization_id = hash[:organization_id]
31
+ @connection_owner = hash[:connection_owner]
32
+ @return_to = hash[:return_to]
33
+ @config = hash[:config] || {}
34
+ @connection_intent = hash[:connection_intent]
35
+ end
36
+ end
37
+ end
@@ -19,6 +19,8 @@ module WorkOS
19
19
  client_secret_last_4: :client_secret_last_4,
20
20
  config: :config,
21
21
  state: :state,
22
+ established_by_user_id: :established_by_user_id,
23
+ state_reason: :state_reason,
22
24
  created_at: :created_at,
23
25
  updated_at: :updated_at
24
26
  }.freeze
@@ -38,6 +40,8 @@ module WorkOS
38
40
  :client_secret_last_4,
39
41
  :config,
40
42
  :state,
43
+ :established_by_user_id,
44
+ :state_reason,
41
45
  :created_at,
42
46
  :updated_at
43
47
 
@@ -57,6 +61,8 @@ module WorkOS
57
61
  @client_secret_last_4 = hash[:client_secret_last_4]
58
62
  @config = hash[:config] || {}
59
63
  @state = hash[:state]
64
+ @established_by_user_id = hash[:established_by_user_id]
65
+ @state_reason = hash[:state_reason]
60
66
  @created_at = hash[:created_at]
61
67
  @updated_at = hash[:updated_at]
62
68
  end
@@ -5,6 +5,8 @@
5
5
  module WorkOS
6
6
  class ConnectedAccountInput < WorkOS::Types::BaseModel
7
7
  HASH_ATTRS = {
8
+ account_display_name: :account_display_name,
9
+ account_identifier: :account_identifier,
8
10
  access_token: :access_token,
9
11
  refresh_token: :refresh_token,
10
12
  expires_at: :expires_at,
@@ -13,6 +15,8 @@ module WorkOS
13
15
  }.freeze
14
16
 
15
17
  attr_accessor \
18
+ :account_display_name,
19
+ :account_identifier,
16
20
  :access_token,
17
21
  :refresh_token,
18
22
  :expires_at,
@@ -21,6 +25,8 @@ module WorkOS
21
25
 
22
26
  def initialize(json)
23
27
  hash = self.class.normalize(json)
28
+ @account_display_name = hash[:account_display_name]
29
+ @account_identifier = hash[:account_identifier]
24
30
  @access_token = hash[:access_token]
25
31
  @refresh_token = hash[:refresh_token]
26
32
  @expires_at = hash[:expires_at]
@@ -0,0 +1,73 @@
1
+ # frozen_string_literal: true
2
+
3
+ # This file is auto-generated by oagen. Do not edit.
4
+
5
+ module WorkOS
6
+ class ConnectedAccountWriteResponse < WorkOS::Types::BaseModel
7
+ HASH_ATTRS = {
8
+ object: :object,
9
+ id: :id,
10
+ connection_role: :connection_role,
11
+ account_identifier: :account_identifier,
12
+ account_display_name: :account_display_name,
13
+ user_id: :user_id,
14
+ organization_id: :organization_id,
15
+ scopes: :scopes,
16
+ auth_method: :auth_method,
17
+ api_key_last_4: :api_key_last_4,
18
+ client_id: :client_id,
19
+ client_secret_last_4: :client_secret_last_4,
20
+ config: :config,
21
+ state: :state,
22
+ established_by_user_id: :established_by_user_id,
23
+ state_reason: :state_reason,
24
+ created_at: :created_at,
25
+ updated_at: :updated_at,
26
+ warnings: :warnings
27
+ }.freeze
28
+
29
+ attr_accessor \
30
+ :object,
31
+ :id,
32
+ :connection_role,
33
+ :account_identifier,
34
+ :account_display_name,
35
+ :user_id,
36
+ :organization_id,
37
+ :scopes,
38
+ :auth_method,
39
+ :api_key_last_4,
40
+ :client_id,
41
+ :client_secret_last_4,
42
+ :config,
43
+ :state,
44
+ :established_by_user_id,
45
+ :state_reason,
46
+ :created_at,
47
+ :updated_at,
48
+ :warnings
49
+
50
+ def initialize(json)
51
+ hash = self.class.normalize(json)
52
+ @object = hash[:object]
53
+ @id = hash[:id]
54
+ @connection_role = hash[:connection_role]
55
+ @account_identifier = hash[:account_identifier]
56
+ @account_display_name = hash[:account_display_name]
57
+ @user_id = hash[:user_id]
58
+ @organization_id = hash[:organization_id]
59
+ @scopes = hash[:scopes] || []
60
+ @auth_method = hash[:auth_method]
61
+ @api_key_last_4 = hash[:api_key_last_4]
62
+ @client_id = hash[:client_id]
63
+ @client_secret_last_4 = hash[:client_secret_last_4]
64
+ @config = hash[:config] || {}
65
+ @state = hash[:state]
66
+ @established_by_user_id = hash[:established_by_user_id]
67
+ @state_reason = hash[:state_reason]
68
+ @created_at = hash[:created_at]
69
+ @updated_at = hash[:updated_at]
70
+ @warnings = (hash[:warnings] || []).map { |item| item ? WorkOS::ConnectedAccountWriteResponseWarning.new(item) : nil }
71
+ end
72
+ end
73
+ 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 ConnectedAccountWriteResponseWarning < WorkOS::Types::BaseModel
7
+ HASH_ATTRS = {
8
+ code: :code,
9
+ message: :message
10
+ }.freeze
11
+
12
+ attr_accessor \
13
+ :code,
14
+ :message
15
+
16
+ def initialize(json)
17
+ hash = self.class.normalize(json)
18
+ @code = hash[:code]
19
+ @message = hash[:message]
20
+ end
21
+ end
22
+ 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 CreateConnectedAccount < WorkOS::Types::BaseModel
7
+ HASH_ATTRS = {
8
+ account_display_name: :account_display_name,
9
+ account_identifier: :account_identifier,
10
+ access_token: :access_token,
11
+ refresh_token: :refresh_token,
12
+ expires_at: :expires_at,
13
+ scopes: :scopes,
14
+ state: :state,
15
+ connection_intent: :connection_intent
16
+ }.freeze
17
+
18
+ attr_accessor \
19
+ :account_display_name,
20
+ :account_identifier,
21
+ :access_token,
22
+ :refresh_token,
23
+ :expires_at,
24
+ :scopes,
25
+ :state,
26
+ :connection_intent
27
+
28
+ def initialize(json)
29
+ hash = self.class.normalize(json)
30
+ @account_display_name = hash[:account_display_name]
31
+ @account_identifier = hash[:account_identifier]
32
+ @access_token = hash[:access_token]
33
+ @refresh_token = hash[:refresh_token]
34
+ @expires_at = hash[:expires_at]
35
+ @scopes = hash[:scopes] || []
36
+ @state = hash[:state]
37
+ @connection_intent = hash[:connection_intent]
38
+ end
39
+ end
40
+ 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 CreateOrganizationConnectedAccount < WorkOS::Types::BaseModel
7
+ HASH_ATTRS = {
8
+ account_display_name: :account_display_name,
9
+ account_identifier: :account_identifier,
10
+ access_token: :access_token,
11
+ refresh_token: :refresh_token,
12
+ expires_at: :expires_at,
13
+ scopes: :scopes,
14
+ state: :state,
15
+ user_id: :user_id,
16
+ connection_intent: :connection_intent
17
+ }.freeze
18
+
19
+ attr_accessor \
20
+ :account_display_name,
21
+ :account_identifier,
22
+ :access_token,
23
+ :refresh_token,
24
+ :expires_at,
25
+ :scopes,
26
+ :state,
27
+ :user_id,
28
+ :connection_intent
29
+
30
+ def initialize(json)
31
+ hash = self.class.normalize(json)
32
+ @account_display_name = hash[:account_display_name]
33
+ @account_identifier = hash[:account_identifier]
34
+ @access_token = hash[:access_token]
35
+ @refresh_token = hash[:refresh_token]
36
+ @expires_at = hash[:expires_at]
37
+ @scopes = hash[:scopes] || []
38
+ @state = hash[:state]
39
+ @user_id = hash[:user_id]
40
+ @connection_intent = hash[:connection_intent]
41
+ end
42
+ end
43
+ end
@@ -18,7 +18,7 @@ module WorkOS
18
18
  def initialize(json)
19
19
  hash = self.class.normalize(json)
20
20
  @active = hash[:active]
21
- @credential = hash[:credential] ? WorkOS::DataIntegrationCredentialsResponseCredential.new(hash[:credential]) : nil
21
+ @credential = hash[:credential] ? WorkOS::DataIntegrationVendedCredential.new(hash[:credential]) : nil
22
22
  @error = hash[:error]
23
23
  end
24
24
  end
@@ -3,14 +3,16 @@
3
3
  # This file is auto-generated by oagen. Do not edit.
4
4
 
5
5
  module WorkOS
6
- class DataIntegrationCredentialsResponseCredential < WorkOS::Types::BaseModel
6
+ class DataIntegrationVendedCredential < WorkOS::Types::BaseModel
7
7
  HASH_ATTRS = {
8
8
  object: :object,
9
9
  auth_method: :auth_method,
10
10
  value: :value,
11
11
  expires_at: :expires_at,
12
12
  scopes: :scopes,
13
- missing_scopes: :missing_scopes
13
+ missing_scopes: :missing_scopes,
14
+ config: :config,
15
+ metadata: :metadata
14
16
  }.freeze
15
17
 
16
18
  attr_accessor \
@@ -19,7 +21,9 @@ module WorkOS
19
21
  :value,
20
22
  :expires_at,
21
23
  :scopes,
22
- :missing_scopes
24
+ :missing_scopes,
25
+ :config,
26
+ :metadata
23
27
 
24
28
  def initialize(json)
25
29
  hash = self.class.normalize(json)
@@ -29,6 +33,8 @@ module WorkOS
29
33
  @expires_at = hash[:expires_at]
30
34
  @scopes = hash[:scopes] || []
31
35
  @missing_scopes = hash[:missing_scopes] || []
36
+ @config = hash[:config] || {}
37
+ @metadata = hash[:metadata] || {}
32
38
  end
33
39
  end
34
40
  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 DataIntegrationsCreateApiKeyConnectionRequest < WorkOS::Types::BaseModel
7
+ HASH_ATTRS = {
8
+ account_display_name: :account_display_name,
9
+ account_identifier: :account_identifier,
10
+ user_id: :user_id,
11
+ organization_id: :organization_id,
12
+ connection_owner: :connection_owner,
13
+ secret: :secret,
14
+ connection_intent: :connection_intent
15
+ }.freeze
16
+
17
+ attr_accessor \
18
+ :account_display_name,
19
+ :account_identifier,
20
+ :user_id,
21
+ :organization_id,
22
+ :connection_owner,
23
+ :secret,
24
+ :connection_intent
25
+
26
+ def initialize(json)
27
+ hash = self.class.normalize(json)
28
+ @account_display_name = hash[:account_display_name]
29
+ @account_identifier = hash[:account_identifier]
30
+ @user_id = hash[:user_id]
31
+ @organization_id = hash[:organization_id]
32
+ @connection_owner = hash[:connection_owner]
33
+ @secret = hash[:secret]
34
+ @connection_intent = hash[:connection_intent]
35
+ end
36
+ end
37
+ 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 DataIntegrationsCreateClientCredentialsConnectionRequest < WorkOS::Types::BaseModel
7
+ HASH_ATTRS = {
8
+ account_display_name: :account_display_name,
9
+ account_identifier: :account_identifier,
10
+ user_id: :user_id,
11
+ organization_id: :organization_id,
12
+ connection_owner: :connection_owner,
13
+ client_id: :client_id,
14
+ client_secret: :client_secret,
15
+ config: :config,
16
+ connection_intent: :connection_intent
17
+ }.freeze
18
+
19
+ attr_accessor \
20
+ :account_display_name,
21
+ :account_identifier,
22
+ :user_id,
23
+ :organization_id,
24
+ :connection_owner,
25
+ :client_id,
26
+ :client_secret,
27
+ :config,
28
+ :connection_intent
29
+
30
+ def initialize(json)
31
+ hash = self.class.normalize(json)
32
+ @account_display_name = hash[:account_display_name]
33
+ @account_identifier = hash[:account_identifier]
34
+ @user_id = hash[:user_id]
35
+ @organization_id = hash[:organization_id]
36
+ @connection_owner = hash[:connection_owner]
37
+ @client_id = hash[:client_id]
38
+ @client_secret = hash[:client_secret]
39
+ @config = hash[:config] || {}
40
+ @connection_intent = hash[:connection_intent]
41
+ end
42
+ end
43
+ end
@@ -5,6 +5,7 @@
5
5
  module WorkOS
6
6
  class DataIntegrationsGetDataIntegrationAuthorizeUrlRequest < WorkOS::Types::BaseModel
7
7
  HASH_ATTRS = {
8
+ account_display_name: :account_display_name,
8
9
  user_id: :user_id,
9
10
  organization_id: :organization_id,
10
11
  connection_owner: :connection_owner,
@@ -13,6 +14,7 @@ module WorkOS
13
14
  }.freeze
14
15
 
15
16
  attr_accessor \
17
+ :account_display_name,
16
18
  :user_id,
17
19
  :organization_id,
18
20
  :connection_owner,
@@ -21,6 +23,7 @@ module WorkOS
21
23
 
22
24
  def initialize(json)
23
25
  hash = self.class.normalize(json)
26
+ @account_display_name = hash[:account_display_name]
24
27
  @user_id = hash[:user_id]
25
28
  @organization_id = hash[:organization_id]
26
29
  @connection_owner = hash[:connection_owner]
@@ -19,6 +19,8 @@ module WorkOS
19
19
  client_secret_last_4: :client_secret_last_4,
20
20
  config: :config,
21
21
  state: :state,
22
+ established_by_user_id: :established_by_user_id,
23
+ state_reason: :state_reason,
22
24
  created_at: :created_at,
23
25
  updated_at: :updated_at,
24
26
  userlandUserId: :userland_user_id
@@ -42,6 +44,8 @@ module WorkOS
42
44
  :client_secret_last_4,
43
45
  :config,
44
46
  :state,
47
+ :established_by_user_id,
48
+ :state_reason,
45
49
  :created_at,
46
50
  :updated_at
47
51
 
@@ -68,6 +72,8 @@ module WorkOS
68
72
  @client_secret_last_4 = hash[:client_secret_last_4]
69
73
  @config = hash[:config] || {}
70
74
  @state = hash[:state]
75
+ @established_by_user_id = hash[:established_by_user_id]
76
+ @state_reason = hash[:state_reason]
71
77
  @created_at = hash[:created_at]
72
78
  @updated_at = hash[:updated_at]
73
79
  @userland_user_id = hash[:userlandUserId]
@@ -5,25 +5,28 @@
5
5
  module WorkOS
6
6
  class DataIntegrationsUpsertApiKeyRequest < WorkOS::Types::BaseModel
7
7
  HASH_ATTRS = {
8
+ account_display_name: :account_display_name,
9
+ account_identifier: :account_identifier,
8
10
  user_id: :user_id,
9
11
  organization_id: :organization_id,
10
- connected_account_id: :connected_account_id,
11
12
  connection_owner: :connection_owner,
12
13
  secret: :secret
13
14
  }.freeze
14
15
 
15
16
  attr_accessor \
17
+ :account_display_name,
18
+ :account_identifier,
16
19
  :user_id,
17
20
  :organization_id,
18
- :connected_account_id,
19
21
  :connection_owner,
20
22
  :secret
21
23
 
22
24
  def initialize(json)
23
25
  hash = self.class.normalize(json)
26
+ @account_display_name = hash[:account_display_name]
27
+ @account_identifier = hash[:account_identifier]
24
28
  @user_id = hash[:user_id]
25
29
  @organization_id = hash[:organization_id]
26
- @connected_account_id = hash[:connected_account_id]
27
30
  @connection_owner = hash[:connection_owner]
28
31
  @secret = hash[:secret]
29
32
  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 DataIntegrationsUpsertApiKeyRequest2 < WorkOS::Types::BaseModel
7
+ HASH_ATTRS = {
8
+ account_display_name: :account_display_name,
9
+ account_identifier: :account_identifier,
10
+ user_id: :user_id,
11
+ organization_id: :organization_id,
12
+ connection_owner: :connection_owner,
13
+ secret: :secret,
14
+ connected_account_id: :connected_account_id
15
+ }.freeze
16
+
17
+ attr_accessor \
18
+ :account_display_name,
19
+ :account_identifier,
20
+ :user_id,
21
+ :organization_id,
22
+ :connection_owner,
23
+ :secret,
24
+ :connected_account_id
25
+
26
+ def initialize(json)
27
+ hash = self.class.normalize(json)
28
+ @account_display_name = hash[:account_display_name]
29
+ @account_identifier = hash[:account_identifier]
30
+ @user_id = hash[:user_id]
31
+ @organization_id = hash[:organization_id]
32
+ @connection_owner = hash[:connection_owner]
33
+ @secret = hash[:secret]
34
+ @connected_account_id = hash[:connected_account_id]
35
+ end
36
+ end
37
+ end
@@ -5,9 +5,10 @@
5
5
  module WorkOS
6
6
  class DataIntegrationsUpsertClientCredentialsRequest < WorkOS::Types::BaseModel
7
7
  HASH_ATTRS = {
8
+ account_display_name: :account_display_name,
9
+ account_identifier: :account_identifier,
8
10
  user_id: :user_id,
9
11
  organization_id: :organization_id,
10
- connected_account_id: :connected_account_id,
11
12
  connection_owner: :connection_owner,
12
13
  client_id: :client_id,
13
14
  client_secret: :client_secret,
@@ -15,9 +16,10 @@ module WorkOS
15
16
  }.freeze
16
17
 
17
18
  attr_accessor \
19
+ :account_display_name,
20
+ :account_identifier,
18
21
  :user_id,
19
22
  :organization_id,
20
- :connected_account_id,
21
23
  :connection_owner,
22
24
  :client_id,
23
25
  :client_secret,
@@ -25,9 +27,10 @@ module WorkOS
25
27
 
26
28
  def initialize(json)
27
29
  hash = self.class.normalize(json)
30
+ @account_display_name = hash[:account_display_name]
31
+ @account_identifier = hash[:account_identifier]
28
32
  @user_id = hash[:user_id]
29
33
  @organization_id = hash[:organization_id]
30
- @connected_account_id = hash[:connected_account_id]
31
34
  @connection_owner = hash[:connection_owner]
32
35
  @client_id = hash[:client_id]
33
36
  @client_secret = hash[:client_secret]
@@ -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 DataIntegrationsUpsertClientCredentialsRequest2 < WorkOS::Types::BaseModel
7
+ HASH_ATTRS = {
8
+ account_display_name: :account_display_name,
9
+ account_identifier: :account_identifier,
10
+ user_id: :user_id,
11
+ organization_id: :organization_id,
12
+ connection_owner: :connection_owner,
13
+ client_id: :client_id,
14
+ client_secret: :client_secret,
15
+ config: :config,
16
+ connected_account_id: :connected_account_id
17
+ }.freeze
18
+
19
+ attr_accessor \
20
+ :account_display_name,
21
+ :account_identifier,
22
+ :user_id,
23
+ :organization_id,
24
+ :connection_owner,
25
+ :client_id,
26
+ :client_secret,
27
+ :config,
28
+ :connected_account_id
29
+
30
+ def initialize(json)
31
+ hash = self.class.normalize(json)
32
+ @account_display_name = hash[:account_display_name]
33
+ @account_identifier = hash[:account_identifier]
34
+ @user_id = hash[:user_id]
35
+ @organization_id = hash[:organization_id]
36
+ @connection_owner = hash[:connection_owner]
37
+ @client_id = hash[:client_id]
38
+ @client_secret = hash[:client_secret]
39
+ @config = hash[:config] || {}
40
+ @connected_account_id = hash[:connected_account_id]
41
+ end
42
+ end
43
+ end