workos 9.3.0 → 9.4.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 +110 -1
- data/.release-please-manifest.json +1 -1
- data/CHANGELOG.md +123 -0
- data/Gemfile.lock +2 -2
- data/lib/workos/admin_portal/generate_link.rb +0 -3
- data/lib/workos/admin_portal.rb +0 -3
- data/lib/workos/authorization/user_role_assignment.rb +3 -0
- data/lib/workos/authorization/user_role_assignment_source.rb +22 -0
- data/lib/workos/pipes/connected_account_dto.rb +31 -0
- data/lib/workos/pipes/create_data_integration.rb +34 -0
- data/lib/workos/pipes/custom_provider_definition.rb +49 -0
- data/lib/workos/pipes/data_integration.rb +55 -0
- data/lib/workos/pipes/data_integration_credential.rb +25 -0
- data/lib/workos/pipes/data_integration_credentials_dto.rb +25 -0
- data/lib/workos/pipes/data_integration_credentials_response.rb +25 -0
- data/lib/workos/pipes/data_integration_credentials_response_credential.rb +34 -0
- data/lib/workos/pipes/data_integration_custom_provider.rb +49 -0
- data/lib/workos/pipes/data_integrations_upsert_api_key_request.rb +25 -0
- data/lib/workos/pipes/data_integrations_vend_credentials_request.rb +22 -0
- data/lib/workos/pipes/update_custom_provider_definition.rb +49 -0
- data/lib/workos/pipes/update_data_integration.rb +31 -0
- data/lib/workos/pipes.rb +304 -0
- data/lib/workos/radar/radar_standalone_assess_request.rb +5 -2
- data/lib/workos/radar.rb +5 -2
- data/lib/workos/shared/auth_method_mismatch_error.rb +22 -0
- data/lib/workos/types/audit_log_export_state.rb +2 -1
- data/lib/workos/types/connected_account_state.rb +1 -2
- data/lib/workos/types/create_webhook_endpoint_events.rb +8 -1
- data/lib/workos/types/custom_provider_definition_authenticate_via.rb +13 -0
- data/lib/workos/types/data_integration_credential_type.rb +13 -0
- data/lib/workos/types/data_integration_credentials_response_error.rb +9 -0
- data/lib/workos/types/data_integration_credentials_type.rb +9 -0
- data/lib/workos/types/data_integration_custom_provider_authenticate_via.rb +9 -0
- data/lib/workos/types/data_integration_state.rb +14 -0
- data/lib/workos/types/data_integrations_list_response_data_connected_account_state.rb +6 -1
- data/lib/workos/types/update_custom_provider_definition_authenticate_via.rb +9 -0
- data/lib/workos/types/user_role_assignment_source_type.rb +13 -0
- data/lib/workos/user_management/authorization_code_session_authenticate_request.rb +5 -2
- data/lib/workos/user_management/create_magic_code_and_return.rb +14 -2
- data/lib/workos/user_management/create_user.rb +9 -0
- data/lib/workos/user_management/magic_auth_code_session_authenticate_request.rb +5 -2
- data/lib/workos/user_management/magic_auth_send_magic_auth_code_and_return_response.rb +18 -0
- data/lib/workos/user_management/password_session_authenticate_request.rb +8 -2
- data/lib/workos/user_management/radar_email_challenge_code_session_authenticate_request.rb +43 -0
- data/lib/workos/user_management/radar_sms_challenge_code_session_authenticate_request.rb +46 -0
- data/lib/workos/user_management/send_radar_sms_challenge.rb +31 -0
- data/lib/workos/user_management/send_radar_sms_challenge_response.rb +22 -0
- data/lib/workos/user_management/user_create_response.rb +7 -0
- data/lib/workos/user_management.rb +165 -6
- data/lib/workos/version.rb +1 -1
- data/rbi/workos/admin_portal.rbi +1 -2
- data/rbi/workos/auth_method_mismatch_error.rbi +30 -0
- data/rbi/workos/authorization_code_session_authenticate_request.rbi +6 -0
- data/rbi/workos/connected_account_dto.rbi +48 -0
- data/rbi/workos/create_data_integration.rbi +54 -0
- data/rbi/workos/create_magic_code_and_return.rbi +24 -0
- data/rbi/workos/create_user.rbi +18 -0
- data/rbi/workos/custom_provider_definition.rbi +84 -0
- data/rbi/workos/data_integration.rbi +96 -0
- data/rbi/workos/data_integration_credential.rbi +36 -0
- data/rbi/workos/data_integration_credentials_dto.rbi +36 -0
- data/rbi/workos/data_integration_credentials_response.rbi +36 -0
- data/rbi/workos/data_integration_credentials_response_credential.rbi +54 -0
- data/rbi/workos/data_integration_custom_provider.rbi +84 -0
- data/rbi/workos/data_integrations_upsert_api_key_request.rbi +36 -0
- data/rbi/workos/data_integrations_vend_credentials_request.rbi +30 -0
- data/rbi/workos/generate_link.rbi +0 -6
- data/rbi/workos/magic_auth_code_session_authenticate_request.rbi +6 -0
- data/rbi/workos/magic_auth_send_magic_auth_code_and_return_response.rbi +24 -0
- data/rbi/workos/password_session_authenticate_request.rbi +12 -0
- data/rbi/workos/pipes.rbi +104 -0
- data/rbi/workos/radar.rbi +2 -1
- data/rbi/workos/radar_email_challenge_code_session_authenticate_request.rbi +72 -0
- data/rbi/workos/radar_sms_challenge_code_session_authenticate_request.rbi +78 -0
- data/rbi/workos/radar_standalone_assess_request.rbi +6 -0
- data/rbi/workos/send_radar_sms_challenge.rbi +48 -0
- data/rbi/workos/send_radar_sms_challenge_response.rbi +30 -0
- data/rbi/workos/update_custom_provider_definition.rbi +84 -0
- data/rbi/workos/update_data_integration.rbi +48 -0
- data/rbi/workos/user_create_response.rbi +24 -0
- data/rbi/workos/user_management.rbi +47 -5
- data/rbi/workos/user_role_assignment.rbi +6 -0
- data/rbi/workos/user_role_assignment_source.rbi +30 -0
- data/test/workos/test_admin_portal_model_round_trip.rb +33 -0
- data/test/workos/test_audit_logs_model_round_trip.rb +218 -0
- data/test/workos/test_authorization_model_round_trip.rb +456 -0
- data/test/workos/test_connect_model_round_trip.rb +30 -0
- data/test/workos/test_groups_model_round_trip.rb +33 -0
- data/test/workos/test_model_round_trip.rb +2 -7857
- data/test/workos/test_organizations_model_round_trip.rb +29 -0
- data/test/workos/test_pipes.rb +72 -0
- data/test/workos/test_pipes_model_round_trip.rb +389 -0
- data/test/workos/test_radar_model_round_trip.rb +85 -0
- data/test/workos/test_shared_model_round_trip.rb +92 -0
- data/test/workos/test_user_management.rb +24 -0
- data/test/workos/test_user_management_model_round_trip.rb +1048 -0
- data/test/workos/test_webhooks_model_round_trip.rb +53 -0
- metadata +62 -1
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
require "test_helper"
|
|
6
|
+
|
|
7
|
+
class AdminPortalModelRoundTripTest < Minitest::Test
|
|
8
|
+
def test_generate_link_round_trip
|
|
9
|
+
fixture = {
|
|
10
|
+
"return_url" => "stub",
|
|
11
|
+
"success_url" => "stub",
|
|
12
|
+
"organization" => "stub",
|
|
13
|
+
"intent" => "stub",
|
|
14
|
+
"it_contact_emails" => []
|
|
15
|
+
}
|
|
16
|
+
model = WorkOS::GenerateLink.new(fixture.to_json)
|
|
17
|
+
json = model.to_h
|
|
18
|
+
assert_kind_of Hash, json
|
|
19
|
+
assert_equal fixture["organization"], json[:organization]
|
|
20
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def test_portal_link_response_round_trip
|
|
24
|
+
fixture = {
|
|
25
|
+
"link" => "stub"
|
|
26
|
+
}
|
|
27
|
+
model = WorkOS::PortalLinkResponse.new(fixture.to_json)
|
|
28
|
+
json = model.to_h
|
|
29
|
+
assert_kind_of Hash, json
|
|
30
|
+
assert_equal fixture["link"], json[:link]
|
|
31
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
32
|
+
end
|
|
33
|
+
end
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
require "test_helper"
|
|
6
|
+
|
|
7
|
+
class AuditLogsModelRoundTripTest < Minitest::Test
|
|
8
|
+
def test_audit_log_event_actor_round_trip
|
|
9
|
+
fixture = {
|
|
10
|
+
"id" => "stub",
|
|
11
|
+
"type" => "stub",
|
|
12
|
+
"name" => "stub",
|
|
13
|
+
"metadata" => {}
|
|
14
|
+
}
|
|
15
|
+
model = WorkOS::AuditLogEventActor.new(fixture.to_json)
|
|
16
|
+
json = model.to_h
|
|
17
|
+
assert_kind_of Hash, json
|
|
18
|
+
assert_equal fixture["id"], json[:id]
|
|
19
|
+
assert_equal fixture["type"], json[:type]
|
|
20
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def test_audit_log_event_target_round_trip
|
|
24
|
+
fixture = {
|
|
25
|
+
"id" => "stub",
|
|
26
|
+
"type" => "stub",
|
|
27
|
+
"name" => "stub",
|
|
28
|
+
"metadata" => {}
|
|
29
|
+
}
|
|
30
|
+
model = WorkOS::AuditLogEventTarget.new(fixture.to_json)
|
|
31
|
+
json = model.to_h
|
|
32
|
+
assert_kind_of Hash, json
|
|
33
|
+
assert_equal fixture["id"], json[:id]
|
|
34
|
+
assert_equal fixture["type"], json[:type]
|
|
35
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def test_audit_log_event_context_round_trip
|
|
39
|
+
fixture = {
|
|
40
|
+
"location" => "stub",
|
|
41
|
+
"user_agent" => "stub"
|
|
42
|
+
}
|
|
43
|
+
model = WorkOS::AuditLogEventContext.new(fixture.to_json)
|
|
44
|
+
json = model.to_h
|
|
45
|
+
assert_kind_of Hash, json
|
|
46
|
+
assert_equal fixture["location"], json[:location]
|
|
47
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
def test_audit_log_event_round_trip
|
|
51
|
+
fixture = {
|
|
52
|
+
"action" => "stub",
|
|
53
|
+
"occurred_at" => "stub",
|
|
54
|
+
"actor" => {},
|
|
55
|
+
"targets" => [],
|
|
56
|
+
"context" => {},
|
|
57
|
+
"metadata" => {},
|
|
58
|
+
"version" => 1
|
|
59
|
+
}
|
|
60
|
+
model = WorkOS::AuditLogEvent.new(fixture.to_json)
|
|
61
|
+
json = model.to_h
|
|
62
|
+
assert_kind_of Hash, json
|
|
63
|
+
assert_equal fixture["action"], json[:action]
|
|
64
|
+
assert_equal fixture["occurred_at"], json[:occurred_at]
|
|
65
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
def test_audit_log_event_ingestion_round_trip
|
|
69
|
+
fixture = {
|
|
70
|
+
"organization_id" => "stub",
|
|
71
|
+
"event" => {}
|
|
72
|
+
}
|
|
73
|
+
model = WorkOS::AuditLogEventIngestion.new(fixture.to_json)
|
|
74
|
+
json = model.to_h
|
|
75
|
+
assert_kind_of Hash, json
|
|
76
|
+
assert_equal fixture["organization_id"], json[:organization_id]
|
|
77
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
def test_audit_log_export_creation_round_trip
|
|
81
|
+
fixture = {
|
|
82
|
+
"organization_id" => "stub",
|
|
83
|
+
"range_start" => "stub",
|
|
84
|
+
"range_end" => "stub",
|
|
85
|
+
"actions" => [],
|
|
86
|
+
"actors" => [],
|
|
87
|
+
"actor_names" => [],
|
|
88
|
+
"actor_ids" => [],
|
|
89
|
+
"targets" => []
|
|
90
|
+
}
|
|
91
|
+
model = WorkOS::AuditLogExportCreation.new(fixture.to_json)
|
|
92
|
+
json = model.to_h
|
|
93
|
+
assert_kind_of Hash, json
|
|
94
|
+
assert_equal fixture["organization_id"], json[:organization_id]
|
|
95
|
+
assert_equal fixture["range_start"], json[:range_start]
|
|
96
|
+
assert_equal fixture["range_end"], json[:range_end]
|
|
97
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
def test_audit_log_schema_actor_input_round_trip
|
|
101
|
+
fixture = {
|
|
102
|
+
"metadata" => {}
|
|
103
|
+
}
|
|
104
|
+
model = WorkOS::AuditLogSchemaActorInput.new(fixture.to_json)
|
|
105
|
+
json = model.to_h
|
|
106
|
+
assert_kind_of Hash, json
|
|
107
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
def test_audit_log_schema_target_input_round_trip
|
|
111
|
+
fixture = {
|
|
112
|
+
"type" => "stub",
|
|
113
|
+
"metadata" => {}
|
|
114
|
+
}
|
|
115
|
+
model = WorkOS::AuditLogSchemaTargetInput.new(fixture.to_json)
|
|
116
|
+
json = model.to_h
|
|
117
|
+
assert_kind_of Hash, json
|
|
118
|
+
assert_equal fixture["type"], json[:type]
|
|
119
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
def test_audit_log_schema_input_round_trip
|
|
123
|
+
fixture = {
|
|
124
|
+
"actor" => {},
|
|
125
|
+
"targets" => [],
|
|
126
|
+
"metadata" => {}
|
|
127
|
+
}
|
|
128
|
+
model = WorkOS::AuditLogSchemaInput.new(fixture.to_json)
|
|
129
|
+
json = model.to_h
|
|
130
|
+
assert_kind_of Hash, json
|
|
131
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
def test_audit_log_event_create_response_round_trip
|
|
135
|
+
fixture = {
|
|
136
|
+
"success" => true
|
|
137
|
+
}
|
|
138
|
+
model = WorkOS::AuditLogEventCreateResponse.new(fixture.to_json)
|
|
139
|
+
json = model.to_h
|
|
140
|
+
assert_kind_of Hash, json
|
|
141
|
+
assert_equal fixture["success"], json[:success]
|
|
142
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
def test_audit_log_export_round_trip
|
|
146
|
+
fixture = {
|
|
147
|
+
"object" => "audit_log_export",
|
|
148
|
+
"id" => "stub",
|
|
149
|
+
"state" => "stub",
|
|
150
|
+
"url" => nil,
|
|
151
|
+
"created_at" => "stub",
|
|
152
|
+
"updated_at" => "stub"
|
|
153
|
+
}
|
|
154
|
+
model = WorkOS::AuditLogExport.new(fixture.to_json)
|
|
155
|
+
json = model.to_h
|
|
156
|
+
assert_kind_of Hash, json
|
|
157
|
+
assert_equal fixture["id"], json[:id]
|
|
158
|
+
assert_equal fixture["created_at"], json[:created_at]
|
|
159
|
+
assert_equal fixture["updated_at"], json[:updated_at]
|
|
160
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
def test_audit_log_schema_round_trip
|
|
164
|
+
fixture = {
|
|
165
|
+
"object" => "audit_log_schema",
|
|
166
|
+
"version" => 1,
|
|
167
|
+
"actor" => {},
|
|
168
|
+
"targets" => [],
|
|
169
|
+
"metadata" => {},
|
|
170
|
+
"created_at" => "stub"
|
|
171
|
+
}
|
|
172
|
+
model = WorkOS::AuditLogSchema.new(fixture.to_json)
|
|
173
|
+
json = model.to_h
|
|
174
|
+
assert_kind_of Hash, json
|
|
175
|
+
assert_equal fixture["version"], json[:version]
|
|
176
|
+
assert_equal fixture["created_at"], json[:created_at]
|
|
177
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
def test_audit_log_action_round_trip
|
|
181
|
+
fixture = {
|
|
182
|
+
"object" => "audit_log_action",
|
|
183
|
+
"name" => "stub",
|
|
184
|
+
"schema" => {},
|
|
185
|
+
"created_at" => "stub",
|
|
186
|
+
"updated_at" => "stub"
|
|
187
|
+
}
|
|
188
|
+
model = WorkOS::AuditLogAction.new(fixture.to_json)
|
|
189
|
+
json = model.to_h
|
|
190
|
+
assert_kind_of Hash, json
|
|
191
|
+
assert_equal fixture["name"], json[:name]
|
|
192
|
+
assert_equal fixture["created_at"], json[:created_at]
|
|
193
|
+
assert_equal fixture["updated_at"], json[:updated_at]
|
|
194
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
def test_audit_log_schema_actor_round_trip
|
|
198
|
+
fixture = {
|
|
199
|
+
"metadata" => {}
|
|
200
|
+
}
|
|
201
|
+
model = WorkOS::AuditLogSchemaActor.new(fixture.to_json)
|
|
202
|
+
json = model.to_h
|
|
203
|
+
assert_kind_of Hash, json
|
|
204
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
def test_audit_log_schema_target_round_trip
|
|
208
|
+
fixture = {
|
|
209
|
+
"type" => "stub",
|
|
210
|
+
"metadata" => {}
|
|
211
|
+
}
|
|
212
|
+
model = WorkOS::AuditLogSchemaTarget.new(fixture.to_json)
|
|
213
|
+
json = model.to_h
|
|
214
|
+
assert_kind_of Hash, json
|
|
215
|
+
assert_equal fixture["type"], json[:type]
|
|
216
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
217
|
+
end
|
|
218
|
+
end
|