workos 10.3.0 → 10.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/.github/workflows/ci.yml +2 -2
- data/.github/workflows/docs.yml +3 -3
- data/.github/workflows/lint.yml +2 -2
- data/.github/workflows/release-please.yml +3 -3
- data/.github/workflows/release.yml +2 -2
- data/.last-synced-sha +1 -1
- data/.oagen-manifest.json +234 -156
- data/.release-please-manifest.json +1 -1
- data/.ruby-version +1 -1
- data/CHANGELOG.md +174 -0
- data/Gemfile.lock +14 -14
- data/README.md +23 -0
- data/lib/workos/admin_portal.rb +2 -2
- data/lib/workos/agents.rb +5 -1
- data/lib/workos/api_keys/validate_api_key.rb +12 -1
- data/lib/workos/base_client.rb +6 -2
- data/lib/workos/configuration.rb +3 -2
- data/lib/workos/inflections.rb +2 -0
- data/lib/workos/multi_factor_auth.rb +1 -1
- data/lib/workos/pipes/connected_account.rb +9 -0
- data/lib/workos/pipes/create_data_integration.rb +3 -0
- data/lib/workos/pipes/data_integration.rb +3 -0
- data/lib/workos/pipes/data_integration_installation.rb +9 -0
- data/lib/workos/pipes/data_integrations_get_data_integration_authorize_url_request.rb +3 -0
- data/lib/workos/pipes/data_integrations_get_user_token_request.rb +11 -2
- data/lib/workos/pipes/data_integrations_list_response_data.rb +18 -3
- data/lib/workos/pipes/data_integrations_list_response_data_connected_account.rb +9 -0
- data/lib/workos/pipes/data_integrations_upsert_api_key_request.rb +25 -1
- data/lib/workos/pipes/data_integrations_upsert_client_credentials_request.rb +6 -0
- data/lib/workos/pipes/data_integrations_vend_credentials_request.rb +11 -2
- data/lib/workos/pipes.rb +324 -17
- data/lib/workos/session_manager.rb +11 -6
- data/lib/workos/shared/account_selection_required_error.rb +22 -0
- data/lib/workos/shared/pipe_connected_account.rb +15 -0
- data/lib/workos/shared/pipes_account_connection_add_failed.rb +34 -0
- data/lib/workos/shared/pipes_account_connection_add_failed_data.rb +49 -0
- data/lib/workos/shared/pipes_account_connection_connected.rb +34 -0
- data/lib/workos/shared/pipes_account_connection_connection_failed.rb +34 -0
- data/lib/workos/shared/pipes_account_connection_connection_failed_data.rb +7 -0
- data/lib/workos/shared/pipes_account_connection_disconnected.rb +34 -0
- data/lib/workos/shared/pipes_account_connection_reauthorization_needed.rb +34 -0
- data/lib/workos/shared/pipes_connected_account_connection_failed_data.rb +1 -40
- data/lib/workos/types/connected_account_connection_role.rb +13 -0
- data/lib/workos/types/create_data_integration_ownership.rb +13 -0
- data/lib/workos/types/create_webhook_endpoint_events.rb +6 -1
- data/lib/workos/types/data_integration_installation_connection_role.rb +9 -0
- data/lib/workos/types/data_integration_ownership.rb +9 -0
- data/lib/workos/types/data_integrations_get_data_integration_authorize_url_request_connection_owner.rb +9 -0
- data/lib/workos/types/data_integrations_get_user_token_request_connection_owner.rb +9 -0
- data/lib/workos/types/data_integrations_list_response_data_connected_account_connection_role.rb +9 -0
- data/lib/workos/types/data_integrations_list_response_data_connection_owner.rb +9 -0
- data/lib/workos/types/data_integrations_upsert_api_key_request_connection_owner.rb +9 -0
- data/lib/workos/types/data_integrations_upsert_client_credentials_request_connection_owner.rb +9 -0
- data/lib/workos/types/data_integrations_vend_credentials_request_connection_owner.rb +9 -0
- data/lib/workos/types/pipe_connected_account_auth_method.rb +9 -0
- data/lib/workos/types/pipe_connected_account_connection_role.rb +9 -0
- data/lib/workos/types/pipes_ownership.rb +9 -0
- data/lib/workos/types/resource_export_completed_data_resource_type.rb +3 -1
- data/lib/workos/user_management/authkit_oauth_resource.rb +34 -0
- data/lib/workos/user_management/create_authkit_oauth_resource.rb +22 -0
- data/lib/workos/user_management.rb +87 -0
- data/lib/workos/version.rb +1 -1
- data/rbi/workos/account_selection_required_error.rbi +30 -0
- data/rbi/workos/agents.rbi +2 -1
- data/rbi/workos/authkit_oauth_resource.rbi +54 -0
- data/rbi/workos/connected_account.rbi +18 -0
- data/rbi/workos/create_authkit_oauth_resource.rbi +30 -0
- data/rbi/workos/create_data_integration.rbi +6 -0
- data/rbi/workos/data_integration.rbi +6 -0
- data/rbi/workos/data_integration_installation.rbi +19 -1
- data/rbi/workos/data_integrations_get_data_integration_authorize_url_request.rbi +6 -0
- data/rbi/workos/data_integrations_get_user_token_request.rbi +18 -0
- data/rbi/workos/data_integrations_list_response_data.rbi +12 -0
- data/rbi/workos/data_integrations_list_response_data_connected_account.rbi +18 -0
- data/rbi/workos/data_integrations_upsert_api_key_request.rbi +12 -0
- data/rbi/workos/data_integrations_upsert_client_credentials_request.rbi +12 -0
- data/rbi/workos/data_integrations_vend_credentials_request.rbi +18 -0
- data/rbi/workos/pipe_connected_account.rbi +30 -0
- data/rbi/workos/pipes.rbi +122 -11
- data/rbi/workos/pipes_account_connection_add_failed.rbi +54 -0
- data/rbi/workos/pipes_account_connection_add_failed_data.rbi +84 -0
- data/rbi/workos/pipes_account_connection_connected.rbi +54 -0
- data/rbi/workos/pipes_account_connection_connection_failed.rbi +54 -0
- data/rbi/workos/pipes_account_connection_connection_failed_data.rbi +84 -0
- data/rbi/workos/pipes_account_connection_disconnected.rbi +54 -0
- data/rbi/workos/pipes_account_connection_reauthorization_needed.rbi +54 -0
- data/rbi/workos/pipes_connected_account_connection_failed_data.rbi +6 -0
- data/rbi/workos/user_management.rbi +28 -0
- data/test/workos/test_pipes.rb +64 -0
- data/test/workos/test_pipes_model_round_trip.rb +35 -5
- data/test/workos/test_session.rb +63 -0
- data/test/workos/test_shared_model_round_trip.rb +161 -0
- data/test/workos/test_user_management.rb +24 -0
- data/test/workos/test_user_management_model_round_trip.rb +32 -0
- metadata +35 -1
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
# typed: strong
|
|
6
|
+
|
|
7
|
+
module WorkOS
|
|
8
|
+
class PipesAccountConnectionAddFailedData
|
|
9
|
+
sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void }
|
|
10
|
+
def initialize(json); end
|
|
11
|
+
|
|
12
|
+
sig { returns(String) }
|
|
13
|
+
def object; end
|
|
14
|
+
|
|
15
|
+
sig { params(value: String).returns(String) }
|
|
16
|
+
def object=(value); end
|
|
17
|
+
|
|
18
|
+
sig { returns(String) }
|
|
19
|
+
def data_integration_id; end
|
|
20
|
+
|
|
21
|
+
sig { params(value: String).returns(String) }
|
|
22
|
+
def data_integration_id=(value); end
|
|
23
|
+
|
|
24
|
+
sig { returns(String) }
|
|
25
|
+
def provider_slug; end
|
|
26
|
+
|
|
27
|
+
sig { params(value: String).returns(String) }
|
|
28
|
+
def provider_slug=(value); end
|
|
29
|
+
|
|
30
|
+
sig { returns(T.nilable(String)) }
|
|
31
|
+
def user_id; end
|
|
32
|
+
|
|
33
|
+
sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
|
|
34
|
+
def user_id=(value); end
|
|
35
|
+
|
|
36
|
+
sig { returns(T.nilable(String)) }
|
|
37
|
+
def organization_id; end
|
|
38
|
+
|
|
39
|
+
sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
|
|
40
|
+
def organization_id=(value); end
|
|
41
|
+
|
|
42
|
+
sig { returns(T.nilable(String)) }
|
|
43
|
+
def account_identifier; end
|
|
44
|
+
|
|
45
|
+
sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
|
|
46
|
+
def account_identifier=(value); end
|
|
47
|
+
|
|
48
|
+
sig { returns(String) }
|
|
49
|
+
def error_code; end
|
|
50
|
+
|
|
51
|
+
sig { params(value: String).returns(String) }
|
|
52
|
+
def error_code=(value); end
|
|
53
|
+
|
|
54
|
+
sig { returns(T.nilable(String)) }
|
|
55
|
+
def error_reason; end
|
|
56
|
+
|
|
57
|
+
sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
|
|
58
|
+
def error_reason=(value); end
|
|
59
|
+
|
|
60
|
+
sig { returns(T.nilable(String)) }
|
|
61
|
+
def provider_error; end
|
|
62
|
+
|
|
63
|
+
sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
|
|
64
|
+
def provider_error=(value); end
|
|
65
|
+
|
|
66
|
+
sig { returns(T.nilable(String)) }
|
|
67
|
+
def provider_error_description; end
|
|
68
|
+
|
|
69
|
+
sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
|
|
70
|
+
def provider_error_description=(value); end
|
|
71
|
+
|
|
72
|
+
sig { returns(String) }
|
|
73
|
+
def created_at; end
|
|
74
|
+
|
|
75
|
+
sig { params(value: String).returns(String) }
|
|
76
|
+
def created_at=(value); end
|
|
77
|
+
|
|
78
|
+
sig { returns(T::Hash[Symbol, T.untyped]) }
|
|
79
|
+
def to_h; end
|
|
80
|
+
|
|
81
|
+
sig { params(args: T.untyped).returns(String) }
|
|
82
|
+
def to_json(*args); end
|
|
83
|
+
end
|
|
84
|
+
end
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
# typed: strong
|
|
6
|
+
|
|
7
|
+
module WorkOS
|
|
8
|
+
class PipesAccountConnectionConnected
|
|
9
|
+
sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void }
|
|
10
|
+
def initialize(json); end
|
|
11
|
+
|
|
12
|
+
sig { returns(String) }
|
|
13
|
+
def object; end
|
|
14
|
+
|
|
15
|
+
sig { params(value: String).returns(String) }
|
|
16
|
+
def object=(value); end
|
|
17
|
+
|
|
18
|
+
sig { returns(String) }
|
|
19
|
+
def id; end
|
|
20
|
+
|
|
21
|
+
sig { params(value: String).returns(String) }
|
|
22
|
+
def id=(value); end
|
|
23
|
+
|
|
24
|
+
sig { returns(String) }
|
|
25
|
+
def event; end
|
|
26
|
+
|
|
27
|
+
sig { params(value: String).returns(String) }
|
|
28
|
+
def event=(value); end
|
|
29
|
+
|
|
30
|
+
sig { returns(WorkOS::PipeConnectedAccount) }
|
|
31
|
+
def data; end
|
|
32
|
+
|
|
33
|
+
sig { params(value: WorkOS::PipeConnectedAccount).returns(WorkOS::PipeConnectedAccount) }
|
|
34
|
+
def data=(value); end
|
|
35
|
+
|
|
36
|
+
sig { returns(String) }
|
|
37
|
+
def created_at; end
|
|
38
|
+
|
|
39
|
+
sig { params(value: String).returns(String) }
|
|
40
|
+
def created_at=(value); end
|
|
41
|
+
|
|
42
|
+
sig { returns(T.nilable(WorkOS::EventContext)) }
|
|
43
|
+
def context; end
|
|
44
|
+
|
|
45
|
+
sig { params(value: T.nilable(WorkOS::EventContext)).returns(T.nilable(WorkOS::EventContext)) }
|
|
46
|
+
def context=(value); end
|
|
47
|
+
|
|
48
|
+
sig { returns(T::Hash[Symbol, T.untyped]) }
|
|
49
|
+
def to_h; end
|
|
50
|
+
|
|
51
|
+
sig { params(args: T.untyped).returns(String) }
|
|
52
|
+
def to_json(*args); end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
# typed: strong
|
|
6
|
+
|
|
7
|
+
module WorkOS
|
|
8
|
+
class PipesAccountConnectionConnectionFailed
|
|
9
|
+
sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void }
|
|
10
|
+
def initialize(json); end
|
|
11
|
+
|
|
12
|
+
sig { returns(String) }
|
|
13
|
+
def object; end
|
|
14
|
+
|
|
15
|
+
sig { params(value: String).returns(String) }
|
|
16
|
+
def object=(value); end
|
|
17
|
+
|
|
18
|
+
sig { returns(String) }
|
|
19
|
+
def id; end
|
|
20
|
+
|
|
21
|
+
sig { params(value: String).returns(String) }
|
|
22
|
+
def id=(value); end
|
|
23
|
+
|
|
24
|
+
sig { returns(String) }
|
|
25
|
+
def event; end
|
|
26
|
+
|
|
27
|
+
sig { params(value: String).returns(String) }
|
|
28
|
+
def event=(value); end
|
|
29
|
+
|
|
30
|
+
sig { returns(WorkOS::PipesAccountConnectionConnectionFailedData) }
|
|
31
|
+
def data; end
|
|
32
|
+
|
|
33
|
+
sig { params(value: WorkOS::PipesAccountConnectionConnectionFailedData).returns(WorkOS::PipesAccountConnectionConnectionFailedData) }
|
|
34
|
+
def data=(value); end
|
|
35
|
+
|
|
36
|
+
sig { returns(String) }
|
|
37
|
+
def created_at; end
|
|
38
|
+
|
|
39
|
+
sig { params(value: String).returns(String) }
|
|
40
|
+
def created_at=(value); end
|
|
41
|
+
|
|
42
|
+
sig { returns(T.nilable(WorkOS::EventContext)) }
|
|
43
|
+
def context; end
|
|
44
|
+
|
|
45
|
+
sig { params(value: T.nilable(WorkOS::EventContext)).returns(T.nilable(WorkOS::EventContext)) }
|
|
46
|
+
def context=(value); end
|
|
47
|
+
|
|
48
|
+
sig { returns(T::Hash[Symbol, T.untyped]) }
|
|
49
|
+
def to_h; end
|
|
50
|
+
|
|
51
|
+
sig { params(args: T.untyped).returns(String) }
|
|
52
|
+
def to_json(*args); end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
# typed: strong
|
|
6
|
+
|
|
7
|
+
module WorkOS
|
|
8
|
+
class PipesAccountConnectionConnectionFailedData
|
|
9
|
+
sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void }
|
|
10
|
+
def initialize(json); end
|
|
11
|
+
|
|
12
|
+
sig { returns(String) }
|
|
13
|
+
def object; end
|
|
14
|
+
|
|
15
|
+
sig { params(value: String).returns(String) }
|
|
16
|
+
def object=(value); end
|
|
17
|
+
|
|
18
|
+
sig { returns(String) }
|
|
19
|
+
def data_integration_id; end
|
|
20
|
+
|
|
21
|
+
sig { params(value: String).returns(String) }
|
|
22
|
+
def data_integration_id=(value); end
|
|
23
|
+
|
|
24
|
+
sig { returns(String) }
|
|
25
|
+
def provider_slug; end
|
|
26
|
+
|
|
27
|
+
sig { params(value: String).returns(String) }
|
|
28
|
+
def provider_slug=(value); end
|
|
29
|
+
|
|
30
|
+
sig { returns(T.nilable(String)) }
|
|
31
|
+
def user_id; end
|
|
32
|
+
|
|
33
|
+
sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
|
|
34
|
+
def user_id=(value); end
|
|
35
|
+
|
|
36
|
+
sig { returns(T.nilable(String)) }
|
|
37
|
+
def organization_id; end
|
|
38
|
+
|
|
39
|
+
sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
|
|
40
|
+
def organization_id=(value); end
|
|
41
|
+
|
|
42
|
+
sig { returns(T.nilable(String)) }
|
|
43
|
+
def account_identifier; end
|
|
44
|
+
|
|
45
|
+
sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
|
|
46
|
+
def account_identifier=(value); end
|
|
47
|
+
|
|
48
|
+
sig { returns(String) }
|
|
49
|
+
def error_code; end
|
|
50
|
+
|
|
51
|
+
sig { params(value: String).returns(String) }
|
|
52
|
+
def error_code=(value); end
|
|
53
|
+
|
|
54
|
+
sig { returns(T.nilable(String)) }
|
|
55
|
+
def error_reason; end
|
|
56
|
+
|
|
57
|
+
sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
|
|
58
|
+
def error_reason=(value); end
|
|
59
|
+
|
|
60
|
+
sig { returns(T.nilable(String)) }
|
|
61
|
+
def provider_error; end
|
|
62
|
+
|
|
63
|
+
sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
|
|
64
|
+
def provider_error=(value); end
|
|
65
|
+
|
|
66
|
+
sig { returns(T.nilable(String)) }
|
|
67
|
+
def provider_error_description; end
|
|
68
|
+
|
|
69
|
+
sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
|
|
70
|
+
def provider_error_description=(value); end
|
|
71
|
+
|
|
72
|
+
sig { returns(String) }
|
|
73
|
+
def created_at; end
|
|
74
|
+
|
|
75
|
+
sig { params(value: String).returns(String) }
|
|
76
|
+
def created_at=(value); end
|
|
77
|
+
|
|
78
|
+
sig { returns(T::Hash[Symbol, T.untyped]) }
|
|
79
|
+
def to_h; end
|
|
80
|
+
|
|
81
|
+
sig { params(args: T.untyped).returns(String) }
|
|
82
|
+
def to_json(*args); end
|
|
83
|
+
end
|
|
84
|
+
end
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
# typed: strong
|
|
6
|
+
|
|
7
|
+
module WorkOS
|
|
8
|
+
class PipesAccountConnectionDisconnected
|
|
9
|
+
sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void }
|
|
10
|
+
def initialize(json); end
|
|
11
|
+
|
|
12
|
+
sig { returns(String) }
|
|
13
|
+
def object; end
|
|
14
|
+
|
|
15
|
+
sig { params(value: String).returns(String) }
|
|
16
|
+
def object=(value); end
|
|
17
|
+
|
|
18
|
+
sig { returns(String) }
|
|
19
|
+
def id; end
|
|
20
|
+
|
|
21
|
+
sig { params(value: String).returns(String) }
|
|
22
|
+
def id=(value); end
|
|
23
|
+
|
|
24
|
+
sig { returns(String) }
|
|
25
|
+
def event; end
|
|
26
|
+
|
|
27
|
+
sig { params(value: String).returns(String) }
|
|
28
|
+
def event=(value); end
|
|
29
|
+
|
|
30
|
+
sig { returns(WorkOS::PipeConnectedAccount) }
|
|
31
|
+
def data; end
|
|
32
|
+
|
|
33
|
+
sig { params(value: WorkOS::PipeConnectedAccount).returns(WorkOS::PipeConnectedAccount) }
|
|
34
|
+
def data=(value); end
|
|
35
|
+
|
|
36
|
+
sig { returns(String) }
|
|
37
|
+
def created_at; end
|
|
38
|
+
|
|
39
|
+
sig { params(value: String).returns(String) }
|
|
40
|
+
def created_at=(value); end
|
|
41
|
+
|
|
42
|
+
sig { returns(T.nilable(WorkOS::EventContext)) }
|
|
43
|
+
def context; end
|
|
44
|
+
|
|
45
|
+
sig { params(value: T.nilable(WorkOS::EventContext)).returns(T.nilable(WorkOS::EventContext)) }
|
|
46
|
+
def context=(value); end
|
|
47
|
+
|
|
48
|
+
sig { returns(T::Hash[Symbol, T.untyped]) }
|
|
49
|
+
def to_h; end
|
|
50
|
+
|
|
51
|
+
sig { params(args: T.untyped).returns(String) }
|
|
52
|
+
def to_json(*args); end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
# typed: strong
|
|
6
|
+
|
|
7
|
+
module WorkOS
|
|
8
|
+
class PipesAccountConnectionReauthorizationNeeded
|
|
9
|
+
sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void }
|
|
10
|
+
def initialize(json); end
|
|
11
|
+
|
|
12
|
+
sig { returns(String) }
|
|
13
|
+
def object; end
|
|
14
|
+
|
|
15
|
+
sig { params(value: String).returns(String) }
|
|
16
|
+
def object=(value); end
|
|
17
|
+
|
|
18
|
+
sig { returns(String) }
|
|
19
|
+
def id; end
|
|
20
|
+
|
|
21
|
+
sig { params(value: String).returns(String) }
|
|
22
|
+
def id=(value); end
|
|
23
|
+
|
|
24
|
+
sig { returns(String) }
|
|
25
|
+
def event; end
|
|
26
|
+
|
|
27
|
+
sig { params(value: String).returns(String) }
|
|
28
|
+
def event=(value); end
|
|
29
|
+
|
|
30
|
+
sig { returns(WorkOS::PipeConnectedAccount) }
|
|
31
|
+
def data; end
|
|
32
|
+
|
|
33
|
+
sig { params(value: WorkOS::PipeConnectedAccount).returns(WorkOS::PipeConnectedAccount) }
|
|
34
|
+
def data=(value); end
|
|
35
|
+
|
|
36
|
+
sig { returns(String) }
|
|
37
|
+
def created_at; end
|
|
38
|
+
|
|
39
|
+
sig { params(value: String).returns(String) }
|
|
40
|
+
def created_at=(value); end
|
|
41
|
+
|
|
42
|
+
sig { returns(T.nilable(WorkOS::EventContext)) }
|
|
43
|
+
def context; end
|
|
44
|
+
|
|
45
|
+
sig { params(value: T.nilable(WorkOS::EventContext)).returns(T.nilable(WorkOS::EventContext)) }
|
|
46
|
+
def context=(value); end
|
|
47
|
+
|
|
48
|
+
sig { returns(T::Hash[Symbol, T.untyped]) }
|
|
49
|
+
def to_h; end
|
|
50
|
+
|
|
51
|
+
sig { params(args: T.untyped).returns(String) }
|
|
52
|
+
def to_json(*args); end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
@@ -39,6 +39,12 @@ module WorkOS
|
|
|
39
39
|
sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
|
|
40
40
|
def organization_id=(value); end
|
|
41
41
|
|
|
42
|
+
sig { returns(T.nilable(String)) }
|
|
43
|
+
def account_identifier; end
|
|
44
|
+
|
|
45
|
+
sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
|
|
46
|
+
def account_identifier=(value); end
|
|
47
|
+
|
|
42
48
|
sig { returns(String) }
|
|
43
49
|
def error_code; end
|
|
44
50
|
|
|
@@ -132,6 +132,34 @@ module WorkOS
|
|
|
132
132
|
end
|
|
133
133
|
def revoke_session(session_id:, request_options:); end
|
|
134
134
|
|
|
135
|
+
sig do
|
|
136
|
+
params(
|
|
137
|
+
before: T.nilable(String),
|
|
138
|
+
after: T.nilable(String),
|
|
139
|
+
limit: T.nilable(Integer),
|
|
140
|
+
order: T.nilable(String),
|
|
141
|
+
request_options: T::Hash[Symbol, T.untyped]
|
|
142
|
+
).returns(T::Array[WorkOS::AuthkitOAuthResource])
|
|
143
|
+
end
|
|
144
|
+
def list_authkit_oauth_resources(before:, after:, limit:, order:, request_options:); end
|
|
145
|
+
|
|
146
|
+
sig do
|
|
147
|
+
params(
|
|
148
|
+
uri: String,
|
|
149
|
+
default: T.nilable(T::Boolean),
|
|
150
|
+
request_options: T::Hash[Symbol, T.untyped]
|
|
151
|
+
).returns(WorkOS::AuthkitOAuthResource)
|
|
152
|
+
end
|
|
153
|
+
def create_authkit_oauth_resource(uri:, default:, request_options:); end
|
|
154
|
+
|
|
155
|
+
sig do
|
|
156
|
+
params(
|
|
157
|
+
id: String,
|
|
158
|
+
request_options: T::Hash[Symbol, T.untyped]
|
|
159
|
+
).returns(NilClass)
|
|
160
|
+
end
|
|
161
|
+
def delete_authkit_oauth_resource(id:, request_options:); end
|
|
162
|
+
|
|
135
163
|
sig do
|
|
136
164
|
params(
|
|
137
165
|
before: T.nilable(String),
|
data/test/workos/test_pipes.rb
CHANGED
|
@@ -74,6 +74,27 @@ class PipesTest < Minitest::Test
|
|
|
74
74
|
refute_nil result
|
|
75
75
|
end
|
|
76
76
|
|
|
77
|
+
def test_list_data_integration_organization_returns_expected_result
|
|
78
|
+
stub_request(:get, %r{\Ahttps://api\.workos\.com/data-integrations/stub/organization(\?|\z)})
|
|
79
|
+
.to_return(body: "{}", status: 200)
|
|
80
|
+
result = @client.pipes.list_data_integration_organization(slug: "stub")
|
|
81
|
+
refute_nil result
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
def test_update_data_integration_organization_returns_expected_result
|
|
85
|
+
stub_request(:put, %r{\Ahttps://api\.workos\.com/data-integrations/stub/organization(\?|\z)})
|
|
86
|
+
.to_return(body: "{}", status: 200)
|
|
87
|
+
result = @client.pipes.update_data_integration_organization(slug: "stub")
|
|
88
|
+
refute_nil result
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
def test_delete_data_integration_organization_returns_expected_result
|
|
92
|
+
stub_request(:delete, %r{\Ahttps://api\.workos\.com/data-integrations/stub/organization(\?|\z)})
|
|
93
|
+
.to_return(body: "{}", status: 200)
|
|
94
|
+
result = @client.pipes.delete_data_integration_organization(slug: "stub")
|
|
95
|
+
assert_nil result
|
|
96
|
+
end
|
|
97
|
+
|
|
77
98
|
def test_get_access_token_returns_expected_result
|
|
78
99
|
stub_request(:post, %r{\Ahttps://api\.workos\.com/data-integrations/stub/token(\?|\z)})
|
|
79
100
|
.to_return(body: "{}", status: 200)
|
|
@@ -81,6 +102,41 @@ class PipesTest < Minitest::Test
|
|
|
81
102
|
refute_nil result
|
|
82
103
|
end
|
|
83
104
|
|
|
105
|
+
def test_get_organization_connected_account_returns_expected_result
|
|
106
|
+
stub_request(:get, %r{\Ahttps://api\.workos\.com/organizations/stub/connected_accounts/stub(\?|\z)})
|
|
107
|
+
.to_return(body: "{}", status: 200)
|
|
108
|
+
result = @client.pipes.get_organization_connected_account(organization_id: "stub", slug: "stub")
|
|
109
|
+
refute_nil result
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
def test_create_organization_connected_account_returns_expected_result
|
|
113
|
+
stub_request(:post, %r{\Ahttps://api\.workos\.com/organizations/stub/connected_accounts/stub(\?|\z)})
|
|
114
|
+
.to_return(body: "{}", status: 200)
|
|
115
|
+
result = @client.pipes.create_organization_connected_account(organization_id: "stub", slug: "stub")
|
|
116
|
+
refute_nil result
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
def test_update_organization_connected_account_returns_expected_result
|
|
120
|
+
stub_request(:put, %r{\Ahttps://api\.workos\.com/organizations/stub/connected_accounts/stub(\?|\z)})
|
|
121
|
+
.to_return(body: "{}", status: 200)
|
|
122
|
+
result = @client.pipes.update_organization_connected_account(organization_id: "stub", slug: "stub")
|
|
123
|
+
refute_nil result
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
def test_delete_organization_connected_account_returns_expected_result
|
|
127
|
+
stub_request(:delete, %r{\Ahttps://api\.workos\.com/organizations/stub/connected_accounts/stub(\?|\z)})
|
|
128
|
+
.to_return(body: "{}", status: 200)
|
|
129
|
+
result = @client.pipes.delete_organization_connected_account(organization_id: "stub", slug: "stub")
|
|
130
|
+
assert_nil result
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
def test_list_organization_data_providers_returns_expected_result
|
|
134
|
+
stub_request(:get, %r{\Ahttps://api\.workos\.com/organizations/stub/data_providers(\?|\z)})
|
|
135
|
+
.to_return(body: "{}", status: 200)
|
|
136
|
+
result = @client.pipes.list_organization_data_providers(organization_id: "stub")
|
|
137
|
+
refute_nil result
|
|
138
|
+
end
|
|
139
|
+
|
|
84
140
|
def test_get_user_connected_account_returns_expected_result
|
|
85
141
|
stub_request(:get, %r{\Ahttps://api\.workos\.com/user_management/users/stub/connected_accounts/stub(\?|\z)})
|
|
86
142
|
.to_return(body: "{}", status: 200)
|
|
@@ -127,7 +183,15 @@ class PipesTest < Minitest::Test
|
|
|
127
183
|
{name: :authorize_data_integration, verb: :post, url: %r{\Ahttps://api\.workos\.com/data-integrations/stub/authorize(\?|\z)}, args: {slug: "stub", user_id: "stub"}},
|
|
128
184
|
{name: :update_data_integration_client_credentials, verb: :put, url: %r{\Ahttps://api\.workos\.com/data-integrations/stub/client-credentials(\?|\z)}, args: {slug: "stub", user_id: "stub", client_id: "stub", client_secret: "stub"}},
|
|
129
185
|
{name: :create_data_integration_credential, verb: :post, url: %r{\Ahttps://api\.workos\.com/data-integrations/stub/credentials(\?|\z)}, args: {slug: "stub", user_id: "stub"}},
|
|
186
|
+
{name: :list_data_integration_organization, verb: :get, url: %r{\Ahttps://api\.workos\.com/data-integrations/stub/organization(\?|\z)}, args: {slug: "stub"}},
|
|
187
|
+
{name: :update_data_integration_organization, verb: :put, url: %r{\Ahttps://api\.workos\.com/data-integrations/stub/organization(\?|\z)}, args: {slug: "stub"}},
|
|
188
|
+
{name: :delete_data_integration_organization, verb: :delete, url: %r{\Ahttps://api\.workos\.com/data-integrations/stub/organization(\?|\z)}, args: {slug: "stub"}},
|
|
130
189
|
{name: :get_access_token, verb: :post, url: %r{\Ahttps://api\.workos\.com/data-integrations/stub/token(\?|\z)}, args: {provider: "stub", user_id: "stub"}},
|
|
190
|
+
{name: :get_organization_connected_account, verb: :get, url: %r{\Ahttps://api\.workos\.com/organizations/stub/connected_accounts/stub(\?|\z)}, args: {organization_id: "stub", slug: "stub"}},
|
|
191
|
+
{name: :create_organization_connected_account, verb: :post, url: %r{\Ahttps://api\.workos\.com/organizations/stub/connected_accounts/stub(\?|\z)}, args: {organization_id: "stub", slug: "stub"}},
|
|
192
|
+
{name: :update_organization_connected_account, verb: :put, url: %r{\Ahttps://api\.workos\.com/organizations/stub/connected_accounts/stub(\?|\z)}, args: {organization_id: "stub", slug: "stub"}},
|
|
193
|
+
{name: :delete_organization_connected_account, verb: :delete, url: %r{\Ahttps://api\.workos\.com/organizations/stub/connected_accounts/stub(\?|\z)}, args: {organization_id: "stub", slug: "stub"}},
|
|
194
|
+
{name: :list_organization_data_providers, verb: :get, url: %r{\Ahttps://api\.workos\.com/organizations/stub/data_providers(\?|\z)}, args: {organization_id: "stub"}},
|
|
131
195
|
{name: :get_user_connected_account, verb: :get, url: %r{\Ahttps://api\.workos\.com/user_management/users/stub/connected_accounts/stub(\?|\z)}, args: {user_id: "stub", slug: "stub"}},
|
|
132
196
|
{name: :create_user_connected_account, verb: :post, url: %r{\Ahttps://api\.workos\.com/user_management/users/stub/connected_accounts/stub(\?|\z)}, args: {user_id: "stub", slug: "stub"}},
|
|
133
197
|
{name: :update_user_connected_account, verb: :put, url: %r{\Ahttps://api\.workos\.com/user_management/users/stub/connected_accounts/stub(\?|\z)}, args: {user_id: "stub", slug: "stub"}},
|
|
@@ -55,6 +55,7 @@ class PipesModelRoundTripTest < Minitest::Test
|
|
|
55
55
|
def test_create_data_integration_round_trip
|
|
56
56
|
fixture = {
|
|
57
57
|
"provider" => "stub",
|
|
58
|
+
"ownership" => "stub",
|
|
58
59
|
"description" => nil,
|
|
59
60
|
"enabled" => true,
|
|
60
61
|
"scopes" => nil,
|
|
@@ -126,6 +127,7 @@ class PipesModelRoundTripTest < Minitest::Test
|
|
|
126
127
|
"id" => "stub",
|
|
127
128
|
"slug" => "stub",
|
|
128
129
|
"integration_type" => "stub",
|
|
130
|
+
"ownership" => "stub",
|
|
129
131
|
"description" => nil,
|
|
130
132
|
"enabled" => true,
|
|
131
133
|
"state" => "stub",
|
|
@@ -192,6 +194,9 @@ class PipesModelRoundTripTest < Minitest::Test
|
|
|
192
194
|
fixture = {
|
|
193
195
|
"object" => "connected_account",
|
|
194
196
|
"id" => "stub",
|
|
197
|
+
"connection_role" => "stub",
|
|
198
|
+
"account_identifier" => nil,
|
|
199
|
+
"account_display_name" => nil,
|
|
195
200
|
"user_id" => nil,
|
|
196
201
|
"organization_id" => nil,
|
|
197
202
|
"scopes" => [],
|
|
@@ -208,6 +213,8 @@ class PipesModelRoundTripTest < Minitest::Test
|
|
|
208
213
|
json = model.to_h
|
|
209
214
|
assert_kind_of Hash, json
|
|
210
215
|
assert_equal fixture["id"], json[:id]
|
|
216
|
+
assert_nil json[:account_identifier]
|
|
217
|
+
assert_nil json[:account_display_name]
|
|
211
218
|
assert_nil json[:user_id]
|
|
212
219
|
assert_nil json[:organization_id]
|
|
213
220
|
assert_equal fixture["created_at"], json[:created_at]
|
|
@@ -237,10 +244,12 @@ class PipesModelRoundTripTest < Minitest::Test
|
|
|
237
244
|
"credentials_type" => "stub",
|
|
238
245
|
"scopes" => nil,
|
|
239
246
|
"auth_methods" => [],
|
|
247
|
+
"connection_owner" => "stub",
|
|
240
248
|
"ownership" => "stub",
|
|
241
249
|
"created_at" => "stub",
|
|
242
250
|
"updated_at" => "stub",
|
|
243
|
-
"connected_account" => nil
|
|
251
|
+
"connected_account" => nil,
|
|
252
|
+
"connected_accounts" => []
|
|
244
253
|
}
|
|
245
254
|
model = WorkOS::DataIntegrationsListResponseData.new(fixture.to_json)
|
|
246
255
|
json = model.to_h
|
|
@@ -306,7 +315,10 @@ class PipesModelRoundTripTest < Minitest::Test
|
|
|
306
315
|
def test_data_integration_installation_round_trip
|
|
307
316
|
fixture = {
|
|
308
317
|
"id" => "stub",
|
|
309
|
-
"
|
|
318
|
+
"connection_role" => "stub",
|
|
319
|
+
"account_identifier" => nil,
|
|
320
|
+
"account_display_name" => nil,
|
|
321
|
+
"user_id" => nil,
|
|
310
322
|
"organization_id" => nil,
|
|
311
323
|
"api_key_last_4" => nil
|
|
312
324
|
}
|
|
@@ -314,7 +326,9 @@ class PipesModelRoundTripTest < Minitest::Test
|
|
|
314
326
|
json = model.to_h
|
|
315
327
|
assert_kind_of Hash, json
|
|
316
328
|
assert_equal fixture["id"], json[:id]
|
|
317
|
-
|
|
329
|
+
assert_nil json[:account_identifier]
|
|
330
|
+
assert_nil json[:account_display_name]
|
|
331
|
+
assert_nil json[:user_id]
|
|
318
332
|
assert_nil json[:organization_id]
|
|
319
333
|
assert_nil json[:api_key_last_4]
|
|
320
334
|
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
@@ -353,6 +367,8 @@ class PipesModelRoundTripTest < Minitest::Test
|
|
|
353
367
|
fixture = {
|
|
354
368
|
"user_id" => "stub",
|
|
355
369
|
"organization_id" => "stub",
|
|
370
|
+
"connected_account_id" => "stub",
|
|
371
|
+
"connection_owner" => "stub",
|
|
356
372
|
"secret" => "stub"
|
|
357
373
|
}
|
|
358
374
|
model = WorkOS::DataIntegrationsUpsertApiKeyRequest.new(fixture.to_json)
|
|
@@ -367,6 +383,7 @@ class PipesModelRoundTripTest < Minitest::Test
|
|
|
367
383
|
fixture = {
|
|
368
384
|
"user_id" => "stub",
|
|
369
385
|
"organization_id" => "stub",
|
|
386
|
+
"connection_owner" => "stub",
|
|
370
387
|
"return_to" => "stub",
|
|
371
388
|
"config" => {}
|
|
372
389
|
}
|
|
@@ -381,6 +398,8 @@ class PipesModelRoundTripTest < Minitest::Test
|
|
|
381
398
|
fixture = {
|
|
382
399
|
"user_id" => "stub",
|
|
383
400
|
"organization_id" => "stub",
|
|
401
|
+
"connected_account_id" => "stub",
|
|
402
|
+
"connection_owner" => "stub",
|
|
384
403
|
"client_id" => "stub",
|
|
385
404
|
"client_secret" => "stub",
|
|
386
405
|
"config" => {}
|
|
@@ -397,7 +416,10 @@ class PipesModelRoundTripTest < Minitest::Test
|
|
|
397
416
|
def test_data_integrations_vend_credentials_request_round_trip
|
|
398
417
|
fixture = {
|
|
399
418
|
"user_id" => "stub",
|
|
400
|
-
"organization_id" => "stub"
|
|
419
|
+
"organization_id" => "stub",
|
|
420
|
+
"connected_account_id" => "stub",
|
|
421
|
+
"connection_owner" => "stub",
|
|
422
|
+
"supports_multiple_connections" => true
|
|
401
423
|
}
|
|
402
424
|
model = WorkOS::DataIntegrationsVendCredentialsRequest.new(fixture.to_json)
|
|
403
425
|
json = model.to_h
|
|
@@ -409,7 +431,10 @@ class PipesModelRoundTripTest < Minitest::Test
|
|
|
409
431
|
def test_data_integrations_get_user_token_request_round_trip
|
|
410
432
|
fixture = {
|
|
411
433
|
"user_id" => "stub",
|
|
412
|
-
"organization_id" => nil
|
|
434
|
+
"organization_id" => nil,
|
|
435
|
+
"connected_account_id" => "stub",
|
|
436
|
+
"connection_owner" => "stub",
|
|
437
|
+
"supports_multiple_connections" => true
|
|
413
438
|
}
|
|
414
439
|
model = WorkOS::DataIntegrationsGetUserTokenRequest.new(fixture.to_json)
|
|
415
440
|
json = model.to_h
|
|
@@ -422,6 +447,9 @@ class PipesModelRoundTripTest < Minitest::Test
|
|
|
422
447
|
fixture = {
|
|
423
448
|
"object" => "connected_account",
|
|
424
449
|
"id" => "stub",
|
|
450
|
+
"connection_role" => "stub",
|
|
451
|
+
"account_identifier" => nil,
|
|
452
|
+
"account_display_name" => nil,
|
|
425
453
|
"user_id" => nil,
|
|
426
454
|
"organization_id" => nil,
|
|
427
455
|
"scopes" => [],
|
|
@@ -439,6 +467,8 @@ class PipesModelRoundTripTest < Minitest::Test
|
|
|
439
467
|
json = model.to_h
|
|
440
468
|
assert_kind_of Hash, json
|
|
441
469
|
assert_equal fixture["id"], json[:id]
|
|
470
|
+
assert_nil json[:account_identifier]
|
|
471
|
+
assert_nil json[:account_display_name]
|
|
442
472
|
assert_nil json[:user_id]
|
|
443
473
|
assert_nil json[:organization_id]
|
|
444
474
|
assert_equal fixture["created_at"], json[:created_at]
|