workos 2.6.0 → 2.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/lib/workos/directory_user.rb +6 -1
- data/lib/workos/types/directory_user_struct.rb +1 -0
- data/lib/workos/types/intent_enum.rb +1 -0
- data/lib/workos/version.rb +1 -1
- data/spec/lib/workos/directory_user_spec.rb +4 -4
- data/spec/lib/workos/portal_spec.rb +15 -0
- data/spec/support/fixtures/vcr_cassettes/directory_sync/get_user.yml +2 -2
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_users/with_after.yml +1 -1
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_users/with_before.yml +2 -2
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_users/with_directory.yml +4 -4
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_users/with_group.yml +1 -1
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_users/with_limit.yml +2 -2
- data/spec/support/fixtures/vcr_cassettes/portal/generate_link_audit_logs.yml +72 -0
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8aa19ede17769e141b7fcffeeb62b5cf4b3629fa0e70d1084b79078b691e1a28
|
4
|
+
data.tar.gz: '0395d416943a7f9f2e76643ae5eaa895025ee80acbdc751760e5cc7fb361b6f9'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: db2f2a83a2805b3e1f838a5335cfc990edf2dd045955e4086ecc6b209c52dffad25b9d06e34f085e98e3f55b54b39d281a419026cc7216b6f368a95e17353679
|
7
|
+
data.tar.gz: 90412141f8bda8924677b49381ee111fe06bff8dde9d7ff8b6c1c039c52f2970ef2b3b503766955f2454ccf92b7839087248f2796ea71d880546e24ec5c04628
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
workos (2.
|
4
|
+
workos (2.8.0)
|
5
5
|
sorbet-runtime (~> 0.5)
|
6
6
|
|
7
7
|
GEM
|
@@ -60,7 +60,7 @@ GEM
|
|
60
60
|
simplecov_json_formatter (0.1.2)
|
61
61
|
sorbet (0.5.10346)
|
62
62
|
sorbet-static (= 0.5.10346)
|
63
|
-
sorbet-runtime (0.5.
|
63
|
+
sorbet-runtime (0.5.10484)
|
64
64
|
sorbet-static (0.5.10346-universal-darwin-14)
|
65
65
|
sorbet-static (0.5.10346-universal-darwin-15)
|
66
66
|
sorbet-static (0.5.10346-universal-darwin-16)
|
@@ -9,7 +9,7 @@ module WorkOS
|
|
9
9
|
include HashProvider
|
10
10
|
extend T::Sig
|
11
11
|
|
12
|
-
attr_accessor :id, :idp_id, :emails, :first_name, :last_name, :username, :state,
|
12
|
+
attr_accessor :id, :idp_id, :emails, :first_name, :last_name, :job_title, :username, :state,
|
13
13
|
:groups, :custom_attributes, :raw_attributes, :directory_id, :organization_id
|
14
14
|
|
15
15
|
# rubocop:disable Metrics/AbcSize
|
@@ -24,6 +24,7 @@ module WorkOS
|
|
24
24
|
@emails = T.let(raw.emails, Array)
|
25
25
|
@first_name = raw.first_name
|
26
26
|
@last_name = raw.last_name
|
27
|
+
@job_title = raw.job_title
|
27
28
|
@username = raw.username
|
28
29
|
@state = raw.state
|
29
30
|
@groups = T.let(raw.groups, Array)
|
@@ -43,6 +44,7 @@ module WorkOS
|
|
43
44
|
emails: emails,
|
44
45
|
first_name: first_name,
|
45
46
|
last_name: last_name,
|
47
|
+
job_title: job_title,
|
46
48
|
username: username,
|
47
49
|
state: state,
|
48
50
|
groups: groups,
|
@@ -58,6 +60,7 @@ module WorkOS
|
|
58
60
|
|
59
61
|
private
|
60
62
|
|
63
|
+
# rubocop:disable Metrics/MethodLength
|
61
64
|
sig do
|
62
65
|
params(
|
63
66
|
json_string: String,
|
@@ -74,6 +77,7 @@ module WorkOS
|
|
74
77
|
emails: hash[:emails],
|
75
78
|
first_name: hash[:first_name],
|
76
79
|
last_name: hash[:last_name],
|
80
|
+
job_title: hash[:job_title],
|
77
81
|
username: hash[:username],
|
78
82
|
state: hash[:state],
|
79
83
|
groups: hash[:groups],
|
@@ -81,5 +85,6 @@ module WorkOS
|
|
81
85
|
raw_attributes: hash[:raw_attributes],
|
82
86
|
)
|
83
87
|
end
|
88
|
+
# rubocop:enable Metrics/MethodLength
|
84
89
|
end
|
85
90
|
end
|
@@ -13,6 +13,7 @@ module WorkOS
|
|
13
13
|
const :emails, T::Array[T.untyped]
|
14
14
|
const :first_name, T.nilable(String)
|
15
15
|
const :last_name, T.nilable(String)
|
16
|
+
const :job_title, T.nilable(String)
|
16
17
|
const :username, T.nilable(String)
|
17
18
|
const :state, T.nilable(String)
|
18
19
|
const :groups, T::Array[T.untyped]
|
data/lib/workos/version.rb
CHANGED
@@ -6,28 +6,28 @@ describe WorkOS::DirectoryUser do
|
|
6
6
|
describe '.get_primary_email' do
|
7
7
|
context 'with one primary email' do
|
8
8
|
it 'returns the primary email' do
|
9
|
-
user = WorkOS::DirectoryUser.new('{"object":"directory_user","id":"directory_user_01FAZYNPC8M0HRYTKFP2GNX852","directory_id":"directory_01FAZYMST676QMTFN1DDJZZX87","idp_id":"6092c280a3f1e19ef6d8cef8","username":"logan@workos.com","emails":[{"primary":true,"value":"logan@workos.com"}, {"primary":false,"value":"logan@gmail.com"}],"first_name":"Logan","last_name":"Gingerich","state":"active","raw_attributes":{},"custom_attributes":{},"groups":[]}')
|
9
|
+
user = WorkOS::DirectoryUser.new('{"object":"directory_user","id":"directory_user_01FAZYNPC8M0HRYTKFP2GNX852","directory_id":"directory_01FAZYMST676QMTFN1DDJZZX87","idp_id":"6092c280a3f1e19ef6d8cef8","username":"logan@workos.com","emails":[{"primary":true,"value":"logan@workos.com"}, {"primary":false,"value":"logan@gmail.com"}],"first_name":"Logan","last_name":"Gingerich","job_title":"Developer Success Engineer","state":"active","raw_attributes":{},"custom_attributes":{},"groups":[]}')
|
10
10
|
expect(user.primary_email).to eq('logan@workos.com')
|
11
11
|
end
|
12
12
|
end
|
13
13
|
|
14
14
|
context 'with multiple primary emails' do
|
15
15
|
it 'returns the first email marked as primary' do
|
16
|
-
user = WorkOS::DirectoryUser.new('{"object":"directory_user","id":"directory_user_01FAZYNPC8M0HRYTKFP2GNX852","directory_id":"directory_01FAZYMST676QMTFN1DDJZZX87","idp_id":"6092c280a3f1e19ef6d8cef8","username":"logan@workos.com","emails":[{"primary":true,"value":"logan@workos.com"}, {"primary":true,"value":"logan@gmail.com"}],"first_name":"Logan","last_name":"Gingerich","state":"active","raw_attributes":{},"custom_attributes":{},"groups":[]}')
|
16
|
+
user = WorkOS::DirectoryUser.new('{"object":"directory_user","id":"directory_user_01FAZYNPC8M0HRYTKFP2GNX852","directory_id":"directory_01FAZYMST676QMTFN1DDJZZX87","idp_id":"6092c280a3f1e19ef6d8cef8","username":"logan@workos.com","emails":[{"primary":true,"value":"logan@workos.com"}, {"primary":true,"value":"logan@gmail.com"}],"first_name":"Logan","last_name":"Gingerich","job_title":"Developer Success Engineer","state":"active","raw_attributes":{},"custom_attributes":{},"groups":[]}')
|
17
17
|
expect(user.primary_email).to eq('logan@workos.com')
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
21
21
|
context 'with no primary emails' do
|
22
22
|
it 'returns nil' do
|
23
|
-
user = WorkOS::DirectoryUser.new('{"object":"directory_user","id":"directory_user_01FAZYNPC8M0HRYTKFP2GNX852","directory_id":"directory_01FAZYMST676QMTFN1DDJZZX87","idp_id":"6092c280a3f1e19ef6d8cef8","username":"logan@workos.com","emails":[{"primary":false,"value":"logan@gmail.com"}],"first_name":"Logan","last_name":"Gingerich","state":"active","raw_attributes":{},"custom_attributes":{},"groups":[]}')
|
23
|
+
user = WorkOS::DirectoryUser.new('{"object":"directory_user","id":"directory_user_01FAZYNPC8M0HRYTKFP2GNX852","directory_id":"directory_01FAZYMST676QMTFN1DDJZZX87","idp_id":"6092c280a3f1e19ef6d8cef8","username":"logan@workos.com","emails":[{"primary":false,"value":"logan@gmail.com"}],"first_name":"Logan","last_name":"Gingerich","job_title":"Developer Success Engineer","state":"active","raw_attributes":{},"custom_attributes":{},"groups":[]}')
|
24
24
|
expect(user.primary_email).to eq(nil)
|
25
25
|
end
|
26
26
|
end
|
27
27
|
|
28
28
|
context 'with an empty email array' do
|
29
29
|
it 'returns nil' do
|
30
|
-
user = WorkOS::DirectoryUser.new('{"object":"directory_user","id":"directory_user_01FAZYNPC8M0HRYTKFP2GNX852","directory_id":"directory_01FAZYMST676QMTFN1DDJZZX87","idp_id":"6092c280a3f1e19ef6d8cef8","username":"logan@workos.com","emails":[],"first_name":"Logan","last_name":"Gingerich","state":"active","raw_attributes":{},"custom_attributes":{},"groups":[]}')
|
30
|
+
user = WorkOS::DirectoryUser.new('{"object":"directory_user","id":"directory_user_01FAZYNPC8M0HRYTKFP2GNX852","directory_id":"directory_01FAZYMST676QMTFN1DDJZZX87","idp_id":"6092c280a3f1e19ef6d8cef8","username":"logan@workos.com","emails":[],"first_name":"Logan","last_name":"Gingerich","job_title":"Developer Success Engineer","state":"active","raw_attributes":{},"custom_attributes":{},"groups":[]}')
|
31
31
|
expect(user.primary_email).to eq(nil)
|
32
32
|
end
|
33
33
|
end
|
@@ -37,6 +37,21 @@ describe WorkOS::Portal do
|
|
37
37
|
end
|
38
38
|
end
|
39
39
|
end
|
40
|
+
|
41
|
+
describe 'with the audit_logs intent' do
|
42
|
+
it 'returns an Admin Portal link' do
|
43
|
+
VCR.use_cassette 'portal/generate_link_audit_logs', match_requests_on: %i[path body] do
|
44
|
+
portal_link = described_class.generate_link(
|
45
|
+
intent: 'audit_logs',
|
46
|
+
organization: organization,
|
47
|
+
)
|
48
|
+
|
49
|
+
expect(portal_link).to eq(
|
50
|
+
'https://id.workos.com/portal/launch?secret=secret',
|
51
|
+
)
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
40
55
|
end
|
41
56
|
|
42
57
|
describe 'with an invalid organization' do
|
@@ -74,10 +74,10 @@ http_interactions:
|
|
74
74
|
- 72abbbf2b93e8ca5-EWR
|
75
75
|
body:
|
76
76
|
encoding: ASCII-8BIT
|
77
|
-
string: '{"object":"directory_user","id":"directory_user_01FAZYNPC8M0HRYTKFP2GNX852","directory_id":"directory_01FAZYMST676QMTFN1DDJZZX87","organization_id":"org_01FAZWCWR03DVWA83NCJYKKD54","idp_id":"6092c280a3f1e19ef6d8cef8","username":"logan@workos.com","emails":[{"primary":true,"value":"logan@workos.com"}],"first_name":"Logan","last_name":"Gingerich","state":"active","raw_attributes":{"id":"6092c280a3f1e19ef6d8cef8","name":"Logan
|
77
|
+
string: '{"object":"directory_user","id":"directory_user_01FAZYNPC8M0HRYTKFP2GNX852","directory_id":"directory_01FAZYMST676QMTFN1DDJZZX87","organization_id":"org_01FAZWCWR03DVWA83NCJYKKD54","idp_id":"6092c280a3f1e19ef6d8cef8","username":"logan@workos.com","emails":[{"primary":true,"value":"logan@workos.com"}],"first_name":"Logan","last_name":"Gingerich","job_title":"Developer Success Engineer","state":"active","raw_attributes":{"id":"6092c280a3f1e19ef6d8cef8","name":"Logan
|
78
78
|
Paul Gingerich","teams":["5f696c8e9a63a60e965aaca8"],"spokeId":null,"lastName":"Gingerich","createdAt":"2021-05-05T16:06:24+0000","firstName":"Logan","updatedAt":"2021-11-11T05:08:14+0000","workEmail":"logan@workos.com","department":"Infra","departmentId":"5f27ada9a5e9bc0001a0ae4a"},"custom_attributes":{},"created_at":"2021-07-19T17:57:57.268Z","updated_at":"2022-01-24T11:23:01.614Z","groups":[{"object":"directory_group","id":"directory_group_01FAZYNNQ4HQ6EBF29MPTH7VKB","idp_id":"5f696c8e9a63a60e965aaca8","directory_id":"directory_01FAZYMST676QMTFN1DDJZZX87","organization_id":"org_01FAZWCWR03DVWA83NCJYKKD54","name":"Team
|
79
79
|
- Platform","created_at":"2021-07-19T17:57:56.580Z","updated_at":"2022-01-24T11:23:01.333Z","raw_attributes":{"id":"5f696c8e9a63a60e965aaca8","name":"Platform","parent":null}},{"object":"directory_group","id":"directory_group_01FAZYNN1NZWMBRAXXDSTB5NFH","idp_id":"5f27ada9a5e9bc0001a0ae4a","directory_id":"directory_01FAZYMST676QMTFN1DDJZZX87","organization_id":"org_01FAZWCWR03DVWA83NCJYKKD54","name":"Department
|
80
80
|
- Infra","created_at":"2021-07-19T17:57:55.893Z","updated_at":"2022-01-24T11:23:01.333Z","raw_attributes":{"id":"5f27ada9a5e9bc0001a0ae4a","name":"Infra","parent":"5f27ada9a5e9bc0001a0ae48"}}]}'
|
81
|
-
http_version:
|
81
|
+
http_version:
|
82
82
|
recorded_at: Thu, 14 Jul 2022 16:46:23 GMT
|
83
83
|
recorded_with: VCR 5.0.0
|
@@ -77,7 +77,7 @@ http_interactions:
|
|
77
77
|
ma=86400
|
78
78
|
body:
|
79
79
|
encoding: ASCII-8BIT
|
80
|
-
string: '{"object":"list","listMetadata":{"before":"directory_user_01FC73296N43TB1NW9J9CQ8AHT","after":null},"data":[{"object":"directory_user","id":"directory_user_01FC73296N43TB1NW9J9CQ8AHT","directory_id":"directory_01FAZYMST676QMTFN1DDJZZX87","idp_id":"6104db3b6246f63d0df47ac5","username":"dave.liu@workos.com","emails":[{"primary":true,"value":"dave.liu@workos.com"}],"first_name":"Dave","last_name":"Liu","state":"active","raw_attributes":{"id":"6104db3b6246f63d0df47ac5","name":"Dave
|
80
|
+
string: '{"object":"list","listMetadata":{"before":"directory_user_01FC73296N43TB1NW9J9CQ8AHT","after":null},"data":[{"object":"directory_user","id":"directory_user_01FC73296N43TB1NW9J9CQ8AHT","directory_id":"directory_01FAZYMST676QMTFN1DDJZZX87","idp_id":"6104db3b6246f63d0df47ac5","username":"dave.liu@workos.com","emails":[{"primary":true,"value":"dave.liu@workos.com"}],"first_name":"Dave","last_name":"Liu","job_title":"Software Engineer","state":"active","raw_attributes":{"id":"6104db3b6246f63d0df47ac5","name":"Dave
|
81
81
|
Liu","teams":["5f696c8e9a63a60e965aaca8","6101bf5fa9e1adf3c668a1ad","6104da936b1079a2e20debb5","6104daab1a8ff9a9f023a689","6104dae33d1730d92ca27c51"],"spokeId":null,"lastName":"Liu","createdAt":"2021-07-31T05:10:19+0000","firstName":"Dave","updatedAt":"2021-07-31T08:02:36+0000","workEmail":"dave.liu@workos.com","department":"Engineering","departmentId":"5f27ada9a5e9bc0001a0ae48"},"custom_attributes":{"department":"Engineering"},"groups":[{"object":"directory_group","id":"directory_group_01FBXGP7AM2ZTG9C2NT96E0T8B","directory_id":"directory_01FAZYMST676QMTFN1DDJZZX87","name":"Team
|
82
82
|
- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
|
83
83
|
tempor incididunt ut labore et dolore magna aliqua. Neque viverra justo nec
|
@@ -77,10 +77,10 @@ http_interactions:
|
|
77
77
|
ma=86400
|
78
78
|
body:
|
79
79
|
encoding: ASCII-8BIT
|
80
|
-
string: '{"object":"list","listMetadata":{"before":null,"after":"directory_user_01FAZYNPC8M0HRYTKFP2GNX852"},"data":[{"object":"directory_user","id":"directory_user_01FAZYNPC8M0HRYTKFP2GNX852","directory_id":"directory_01FAZYMST676QMTFN1DDJZZX87","idp_id":"6092c280a3f1e19ef6d8cef8","username":"logan@workos.com","emails":[{"primary":true,"value":"logan@workos.com"}],"first_name":"Logan","last_name":"Gingerich","state":"active","raw_attributes":{"id":"6092c280a3f1e19ef6d8cef8","name":"Logan
|
80
|
+
string: '{"object":"list","listMetadata":{"before":null,"after":"directory_user_01FAZYNPC8M0HRYTKFP2GNX852"},"data":[{"object":"directory_user","id":"directory_user_01FAZYNPC8M0HRYTKFP2GNX852","directory_id":"directory_01FAZYMST676QMTFN1DDJZZX87","idp_id":"6092c280a3f1e19ef6d8cef8","username":"logan@workos.com","emails":[{"primary":true,"value":"logan@workos.com"}],"first_name":"Logan","last_name":"Gingerich","job_title":"Developer Success Engineer","state":"active","raw_attributes":{"id":"6092c280a3f1e19ef6d8cef8","name":"Logan
|
81
81
|
Paul Gingerich","teams":["5f696c8e9a63a60e965aaca8"],"spokeId":null,"lastName":"Gingerich","createdAt":"2021-05-05T16:06:24+0000","firstName":"Logan","updatedAt":"2021-07-19T19:17:52+0000","workEmail":"logan@workos.com","department":"Infra","departmentId":"5f27ada9a5e9bc0001a0ae4a"},"custom_attributes":{"department":"Infra"},"groups":[{"object":"directory_group","id":"directory_group_01FAZYNN1NZWMBRAXXDSTB5NFH","directory_id":"directory_01FAZYMST676QMTFN1DDJZZX87","name":"Department
|
82
82
|
- Infra","raw_attributes":{"id":"5f27ada9a5e9bc0001a0ae4a","name":"Infra","parent":"5f27ada9a5e9bc0001a0ae48"}},{"object":"directory_group","id":"directory_group_01FAZYNNQ4HQ6EBF29MPTH7VKB","directory_id":"directory_01FAZYMST676QMTFN1DDJZZX87","name":"Team
|
83
|
-
- Platform","raw_attributes":{"id":"5f696c8e9a63a60e965aaca8","name":"Platform","parent":null}}]},{"object":"directory_user","id":"directory_user_01FAZYNPC8DYPEWZ0BSHBA21RM","directory_id":"directory_01FAZYMST676QMTFN1DDJZZX87","idp_id":"5f27ada8a5e9bc0001a0adcf","username":"workos@test.com","emails":[{"primary":true,"value":"workos@test.com"}],"first_name":"Michael","last_name":"Grinich","state":"active","raw_attributes":{"id":"5f27ada8a5e9bc0001a0adcf","name":"Michael
|
83
|
+
- Platform","raw_attributes":{"id":"5f696c8e9a63a60e965aaca8","name":"Platform","parent":null}}]},{"object":"directory_user","id":"directory_user_01FAZYNPC8DYPEWZ0BSHBA21RM","directory_id":"directory_01FAZYMST676QMTFN1DDJZZX87","idp_id":"5f27ada8a5e9bc0001a0adcf","username":"workos@test.com","emails":[{"primary":true,"value":"workos@test.com"}],"first_name":"Michael","last_name":"Grinich","job_title":"CEO","state":"active","raw_attributes":{"id":"5f27ada8a5e9bc0001a0adcf","name":"Michael
|
84
84
|
Grinich","teams":[],"spokeId":null,"lastName":"Grinich","createdAt":"2020-08-03T06:24:40+0000","firstName":"Michael","updatedAt":"2021-07-07T08:50:53+0000","workEmail":"workos@test.com","department":"Marketing","departmentId":"5f27ada9a5e9bc0001a0ae4e"},"custom_attributes":{"department":"Marketing"},"groups":[{"object":"directory_group","id":"directory_group_01FAZYNMWS67E66CD01E7A1PC4","directory_id":"directory_01FAZYMST676QMTFN1DDJZZX87","name":"Department
|
85
85
|
- Marketing","raw_attributes":{"id":"5f27ada9a5e9bc0001a0ae4e","name":"Marketing","parent":null}}]}]}'
|
86
86
|
http_version:
|
@@ -77,7 +77,7 @@ http_interactions:
|
|
77
77
|
ma=86400
|
78
78
|
body:
|
79
79
|
encoding: ASCII-8BIT
|
80
|
-
string: '{"object":"list","listMetadata":{"before":null,"after":null},"data":[{"object":"directory_user","id":"directory_user_01FC73296N43TB1NW9J9CQ8AHT","directory_id":"directory_01FAZYMST676QMTFN1DDJZZX87","idp_id":"6104db3b6246f63d0df47ac5","username":"dave.liu@workos.com","emails":[{"primary":true,"value":"dave.liu@workos.com"}],"first_name":"Dave","last_name":"Liu","state":"active","raw_attributes":{"id":"6104db3b6246f63d0df47ac5","name":"Dave
|
80
|
+
string: '{"object":"list","listMetadata":{"before":null,"after":null},"data":[{"object":"directory_user","id":"directory_user_01FC73296N43TB1NW9J9CQ8AHT","directory_id":"directory_01FAZYMST676QMTFN1DDJZZX87","idp_id":"6104db3b6246f63d0df47ac5","username":"dave.liu@workos.com","emails":[{"primary":true,"value":"dave.liu@workos.com"}],"first_name":"Dave","last_name":"Liu","job_title":"Software Engineer","state":"active","raw_attributes":{"id":"6104db3b6246f63d0df47ac5","name":"Dave
|
81
81
|
Liu","teams":["5f696c8e9a63a60e965aaca8","6101bf5fa9e1adf3c668a1ad","6104da936b1079a2e20debb5","6104daab1a8ff9a9f023a689","6104dae33d1730d92ca27c51"],"spokeId":null,"lastName":"Liu","createdAt":"2021-07-31T05:10:19+0000","firstName":"Dave","updatedAt":"2021-07-31T08:02:36+0000","workEmail":"dave.liu@workos.com","department":"Engineering","departmentId":"5f27ada9a5e9bc0001a0ae48"},"custom_attributes":{"department":"Engineering"},"groups":[{"object":"directory_group","id":"directory_group_01FBXGP7AM2ZTG9C2NT96E0T8B","directory_id":"directory_01FAZYMST676QMTFN1DDJZZX87","name":"Team
|
82
82
|
- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
|
83
83
|
tempor incididunt ut labore et dolore magna aliqua. Neque viverra justo nec
|
@@ -180,13 +180,13 @@ http_interactions:
|
|
180
180
|
- The Best Team","raw_attributes":{"id":"6101bf5fa9e1adf3c668a1ad","name":"The
|
181
181
|
Best Team","parent":null}},{"object":"directory_group","id":"directory_group_01FAZYNNQ4HQ6EBF29MPTH7VKB","directory_id":"directory_01FAZYMST676QMTFN1DDJZZX87","name":"Team
|
182
182
|
- Platform","raw_attributes":{"id":"5f696c8e9a63a60e965aaca8","name":"Platform","parent":null}},{"object":"directory_group","id":"directory_group_01FAZYNMV2TDE78FEAH724YGMP","directory_id":"directory_01FAZYMST676QMTFN1DDJZZX87","name":"Department
|
183
|
-
- Engineering","raw_attributes":{"id":"5f27ada9a5e9bc0001a0ae48","name":"Engineering","parent":null}}]},{"object":"directory_user","id":"directory_user_01FAZYNPC8TJBP7Y2ERT51MGDF","directory_id":"directory_01FAZYMST676QMTFN1DDJZZX87","idp_id":"5f6e1d0d67a73900a6c29e15","username":"henry@workos.com","emails":[{"primary":true,"value":"henry@workos.com"}],"first_name":"Henry","last_name":"Chan","state":"active","raw_attributes":{"id":"5f6e1d0d67a73900a6c29e15","name":"Henry
|
183
|
+
- Engineering","raw_attributes":{"id":"5f27ada9a5e9bc0001a0ae48","name":"Engineering","parent":null}}]},{"object":"directory_user","id":"directory_user_01FAZYNPC8TJBP7Y2ERT51MGDF","directory_id":"directory_01FAZYMST676QMTFN1DDJZZX87","idp_id":"5f6e1d0d67a73900a6c29e15","username":"henry@workos.com","emails":[{"primary":true,"value":"henry@workos.com"}],"first_name":"Henry","last_name":"Chan","job_title":"Software Engineer","state":"active","raw_attributes":{"id":"5f6e1d0d67a73900a6c29e15","name":"Henry
|
184
184
|
Chan","teams":["5f696c8e9a63a60e965aaca8"],"spokeId":null,"lastName":"Chan","createdAt":"2020-09-25T16:38:37+0000","firstName":"Henry","updatedAt":"2021-07-07T08:46:02+0000","workEmail":"henry@workos.com","department":"Engineering","departmentId":"5f27ada9a5e9bc0001a0ae48"},"custom_attributes":{"department":"Engineering"},"groups":[{"object":"directory_group","id":"directory_group_01FAZYNNQ4HQ6EBF29MPTH7VKB","directory_id":"directory_01FAZYMST676QMTFN1DDJZZX87","name":"Team
|
185
185
|
- Platform","raw_attributes":{"id":"5f696c8e9a63a60e965aaca8","name":"Platform","parent":null}},{"object":"directory_group","id":"directory_group_01FAZYNMV2TDE78FEAH724YGMP","directory_id":"directory_01FAZYMST676QMTFN1DDJZZX87","name":"Department
|
186
|
-
- Engineering","raw_attributes":{"id":"5f27ada9a5e9bc0001a0ae48","name":"Engineering","parent":null}}]},{"object":"directory_user","id":"directory_user_01FAZYNPC8M0HRYTKFP2GNX852","directory_id":"directory_01FAZYMST676QMTFN1DDJZZX87","idp_id":"6092c280a3f1e19ef6d8cef8","username":"logan@workos.com","emails":[{"primary":true,"value":"logan@workos.com"}],"first_name":"Logan","last_name":"Gingerich","state":"active","raw_attributes":{"id":"6092c280a3f1e19ef6d8cef8","name":"Logan
|
186
|
+
- Engineering","raw_attributes":{"id":"5f27ada9a5e9bc0001a0ae48","name":"Engineering","parent":null}}]},{"object":"directory_user","id":"directory_user_01FAZYNPC8M0HRYTKFP2GNX852","directory_id":"directory_01FAZYMST676QMTFN1DDJZZX87","idp_id":"6092c280a3f1e19ef6d8cef8","username":"logan@workos.com","emails":[{"primary":true,"value":"logan@workos.com"}],"first_name":"Logan","last_name":"Gingerich","job_title":"Developer Success Engineer","state":"active","raw_attributes":{"id":"6092c280a3f1e19ef6d8cef8","name":"Logan
|
187
187
|
Paul Gingerich","teams":["5f696c8e9a63a60e965aaca8"],"spokeId":null,"lastName":"Gingerich","createdAt":"2021-05-05T16:06:24+0000","firstName":"Logan","updatedAt":"2021-07-19T19:17:52+0000","workEmail":"logan@workos.com","department":"Infra","departmentId":"5f27ada9a5e9bc0001a0ae4a"},"custom_attributes":{"department":"Infra"},"groups":[{"object":"directory_group","id":"directory_group_01FAZYNN1NZWMBRAXXDSTB5NFH","directory_id":"directory_01FAZYMST676QMTFN1DDJZZX87","name":"Department
|
188
188
|
- Infra","raw_attributes":{"id":"5f27ada9a5e9bc0001a0ae4a","name":"Infra","parent":"5f27ada9a5e9bc0001a0ae48"}},{"object":"directory_group","id":"directory_group_01FAZYNNQ4HQ6EBF29MPTH7VKB","directory_id":"directory_01FAZYMST676QMTFN1DDJZZX87","name":"Team
|
189
|
-
- Platform","raw_attributes":{"id":"5f696c8e9a63a60e965aaca8","name":"Platform","parent":null}}]},{"object":"directory_user","id":"directory_user_01FAZYNPC8DYPEWZ0BSHBA21RM","directory_id":"directory_01FAZYMST676QMTFN1DDJZZX87","idp_id":"5f27ada8a5e9bc0001a0adcf","username":"workos@test.com","emails":[{"primary":true,"value":"workos@test.com"}],"first_name":"Michael","last_name":"Grinich","state":"active","raw_attributes":{"id":"5f27ada8a5e9bc0001a0adcf","name":"Michael
|
189
|
+
- Platform","raw_attributes":{"id":"5f696c8e9a63a60e965aaca8","name":"Platform","parent":null}}]},{"object":"directory_user","id":"directory_user_01FAZYNPC8DYPEWZ0BSHBA21RM","directory_id":"directory_01FAZYMST676QMTFN1DDJZZX87","idp_id":"5f27ada8a5e9bc0001a0adcf","username":"workos@test.com","emails":[{"primary":true,"value":"workos@test.com"}],"first_name":"Michael","last_name":"Grinich","job_title":"CEO","state":"active","raw_attributes":{"id":"5f27ada8a5e9bc0001a0adcf","name":"Michael
|
190
190
|
Grinich","teams":[],"spokeId":null,"lastName":"Grinich","createdAt":"2020-08-03T06:24:40+0000","firstName":"Michael","updatedAt":"2021-07-07T08:50:53+0000","workEmail":"workos@test.com","department":"Marketing","departmentId":"5f27ada9a5e9bc0001a0ae4e"},"custom_attributes":{"department":"Marketing"},"groups":[{"object":"directory_group","id":"directory_group_01FAZYNMWS67E66CD01E7A1PC4","directory_id":"directory_01FAZYMST676QMTFN1DDJZZX87","name":"Department
|
191
191
|
- Marketing","raw_attributes":{"id":"5f27ada9a5e9bc0001a0ae4e","name":"Marketing","parent":null}}]}]}'
|
192
192
|
http_version:
|
@@ -77,7 +77,7 @@ http_interactions:
|
|
77
77
|
ma=86400
|
78
78
|
body:
|
79
79
|
encoding: ASCII-8BIT
|
80
|
-
string: '{"object":"list","listMetadata":{"before":null,"after":null},"data":[{"object":"directory_user","id":"directory_user_01FC73296N43TB1NW9J9CQ8AHT","directory_id":"directory_01FAZYMST676QMTFN1DDJZZX87","idp_id":"6104db3b6246f63d0df47ac5","username":"dave.liu@workos.com","emails":[{"primary":true,"value":"dave.liu@workos.com"}],"first_name":"Dave","last_name":"Liu","state":"active","raw_attributes":{"id":"6104db3b6246f63d0df47ac5","name":"Dave
|
80
|
+
string: '{"object":"list","listMetadata":{"before":null,"after":null},"data":[{"object":"directory_user","id":"directory_user_01FC73296N43TB1NW9J9CQ8AHT","directory_id":"directory_01FAZYMST676QMTFN1DDJZZX87","idp_id":"6104db3b6246f63d0df47ac5","username":"dave.liu@workos.com","emails":[{"primary":true,"value":"dave.liu@workos.com"}],"first_name":"Dave","last_name":"Liu","job_title":"Software Engineer","state":"active","raw_attributes":{"id":"6104db3b6246f63d0df47ac5","name":"Dave
|
81
81
|
Liu","teams":["5f696c8e9a63a60e965aaca8","6101bf5fa9e1adf3c668a1ad","6104da936b1079a2e20debb5","6104daab1a8ff9a9f023a689","6104dae33d1730d92ca27c51"],"spokeId":null,"lastName":"Liu","createdAt":"2021-07-31T05:10:19+0000","firstName":"Dave","updatedAt":"2021-07-31T08:02:36+0000","workEmail":"dave.liu@workos.com","department":"Engineering","departmentId":"5f27ada9a5e9bc0001a0ae48"},"custom_attributes":{"department":"Engineering"},"groups":[{"object":"directory_group","id":"directory_group_01FBXGP7AM2ZTG9C2NT96E0T8B","directory_id":"directory_01FAZYMST676QMTFN1DDJZZX87","name":"Team
|
82
82
|
- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
|
83
83
|
tempor incididunt ut labore et dolore magna aliqua. Neque viverra justo nec
|
@@ -77,7 +77,7 @@ http_interactions:
|
|
77
77
|
ma=86400
|
78
78
|
body:
|
79
79
|
encoding: ASCII-8BIT
|
80
|
-
string: '{"object":"list","listMetadata":{"before":"directory_user_01FAZYNPC8TJBP7Y2ERT51MGDF","after":null},"data":[{"object":"directory_user","id":"directory_user_01FC73296N43TB1NW9J9CQ8AHT","directory_id":"directory_01FAZYMST676QMTFN1DDJZZX87","idp_id":"6104db3b6246f63d0df47ac5","username":"dave.liu@workos.com","emails":[{"primary":true,"value":"dave.liu@workos.com"}],"first_name":"Dave","last_name":"Liu","state":"active","raw_attributes":{"id":"6104db3b6246f63d0df47ac5","name":"Dave
|
80
|
+
string: '{"object":"list","listMetadata":{"before":"directory_user_01FAZYNPC8TJBP7Y2ERT51MGDF","after":null},"data":[{"object":"directory_user","id":"directory_user_01FC73296N43TB1NW9J9CQ8AHT","directory_id":"directory_01FAZYMST676QMTFN1DDJZZX87","idp_id":"6104db3b6246f63d0df47ac5","username":"dave.liu@workos.com","emails":[{"primary":true,"value":"dave.liu@workos.com"}],"first_name":"Dave","last_name":"Liu","job_title":"Software Engineer","state":"active","raw_attributes":{"id":"6104db3b6246f63d0df47ac5","name":"Dave
|
81
81
|
Liu","teams":["5f696c8e9a63a60e965aaca8","6101bf5fa9e1adf3c668a1ad","6104da936b1079a2e20debb5","6104daab1a8ff9a9f023a689","6104dae33d1730d92ca27c51"],"spokeId":null,"lastName":"Liu","createdAt":"2021-07-31T05:10:19+0000","firstName":"Dave","updatedAt":"2021-07-31T08:02:36+0000","workEmail":"dave.liu@workos.com","department":"Engineering","departmentId":"5f27ada9a5e9bc0001a0ae48"},"custom_attributes":{"department":"Engineering"},"groups":[{"object":"directory_group","id":"directory_group_01FBXGP7AM2ZTG9C2NT96E0T8B","directory_id":"directory_01FAZYMST676QMTFN1DDJZZX87","name":"Team
|
82
82
|
- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
|
83
83
|
tempor incididunt ut labore et dolore magna aliqua. Neque viverra justo nec
|
@@ -180,7 +180,7 @@ http_interactions:
|
|
180
180
|
- The Best Team","raw_attributes":{"id":"6101bf5fa9e1adf3c668a1ad","name":"The
|
181
181
|
Best Team","parent":null}},{"object":"directory_group","id":"directory_group_01FAZYNNQ4HQ6EBF29MPTH7VKB","directory_id":"directory_01FAZYMST676QMTFN1DDJZZX87","name":"Team
|
182
182
|
- Platform","raw_attributes":{"id":"5f696c8e9a63a60e965aaca8","name":"Platform","parent":null}},{"object":"directory_group","id":"directory_group_01FAZYNMV2TDE78FEAH724YGMP","directory_id":"directory_01FAZYMST676QMTFN1DDJZZX87","name":"Department
|
183
|
-
- Engineering","raw_attributes":{"id":"5f27ada9a5e9bc0001a0ae48","name":"Engineering","parent":null}}]},{"object":"directory_user","id":"directory_user_01FAZYNPC8TJBP7Y2ERT51MGDF","directory_id":"directory_01FAZYMST676QMTFN1DDJZZX87","idp_id":"5f6e1d0d67a73900a6c29e15","username":"henry@workos.com","emails":[{"primary":true,"value":"henry@workos.com"}],"first_name":"Henry","last_name":"Chan","state":"active","raw_attributes":{"id":"5f6e1d0d67a73900a6c29e15","name":"Henry
|
183
|
+
- Engineering","raw_attributes":{"id":"5f27ada9a5e9bc0001a0ae48","name":"Engineering","parent":null}}]},{"object":"directory_user","id":"directory_user_01FAZYNPC8TJBP7Y2ERT51MGDF","directory_id":"directory_01FAZYMST676QMTFN1DDJZZX87","idp_id":"5f6e1d0d67a73900a6c29e15","username":"henry@workos.com","emails":[{"primary":true,"value":"henry@workos.com"}],"first_name":"Henry","last_name":"Chan","job_title":"Software Engineer","state":"active","raw_attributes":{"id":"5f6e1d0d67a73900a6c29e15","name":"Henry
|
184
184
|
Chan","teams":["5f696c8e9a63a60e965aaca8"],"spokeId":null,"lastName":"Chan","createdAt":"2020-09-25T16:38:37+0000","firstName":"Henry","updatedAt":"2021-07-07T08:46:02+0000","workEmail":"henry@workos.com","department":"Engineering","departmentId":"5f27ada9a5e9bc0001a0ae48"},"custom_attributes":{"department":"Engineering"},"groups":[{"object":"directory_group","id":"directory_group_01FAZYNNQ4HQ6EBF29MPTH7VKB","directory_id":"directory_01FAZYMST676QMTFN1DDJZZX87","name":"Team
|
185
185
|
- Platform","raw_attributes":{"id":"5f696c8e9a63a60e965aaca8","name":"Platform","parent":null}},{"object":"directory_group","id":"directory_group_01FAZYNMV2TDE78FEAH724YGMP","directory_id":"directory_01FAZYMST676QMTFN1DDJZZX87","name":"Department
|
186
186
|
- Engineering","raw_attributes":{"id":"5f27ada9a5e9bc0001a0ae48","name":"Engineering","parent":null}}]}]}'
|
@@ -0,0 +1,72 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://api.workos.com/portal/generate_link
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"intent":"audit_logs","organization":"org_01EHQMYV6MBK39QC5PZXHY59C3","return_url":null}'
|
9
|
+
headers:
|
10
|
+
Content-Type:
|
11
|
+
- application/json
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
|
+
Accept:
|
15
|
+
- "*/*"
|
16
|
+
User-Agent:
|
17
|
+
- WorkOS; ruby/2.7.1; x86_64-darwin19; v0.10.1
|
18
|
+
Authorization:
|
19
|
+
- Bearer <API_KEY>
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 201
|
23
|
+
message: Created
|
24
|
+
headers:
|
25
|
+
Server:
|
26
|
+
- Cowboy
|
27
|
+
Connection:
|
28
|
+
- keep-alive
|
29
|
+
Vary:
|
30
|
+
- Origin, Accept-Encoding
|
31
|
+
Access-Control-Allow-Credentials:
|
32
|
+
- "true"
|
33
|
+
Content-Security-Policy:
|
34
|
+
- "default-src 'self';base-uri 'self';block-all-mixed-content;font-src 'self'
|
35
|
+
https: data:;frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src
|
36
|
+
'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests"
|
37
|
+
X-Dns-Prefetch-Control:
|
38
|
+
- "off"
|
39
|
+
Expect-Ct:
|
40
|
+
- max-age=0
|
41
|
+
X-Frame-Options:
|
42
|
+
- SAMEORIGIN
|
43
|
+
Strict-Transport-Security:
|
44
|
+
- max-age=15552000; includeSubDomains
|
45
|
+
X-Download-Options:
|
46
|
+
- noopen
|
47
|
+
X-Content-Type-Options:
|
48
|
+
- nosniff
|
49
|
+
X-Permitted-Cross-Domain-Policies:
|
50
|
+
- none
|
51
|
+
Referrer-Policy:
|
52
|
+
- no-referrer
|
53
|
+
X-Xss-Protection:
|
54
|
+
- "0"
|
55
|
+
X-Request-Id:
|
56
|
+
- 5cf84612-cd60-4d91-9c7e-e1e11bb6b074
|
57
|
+
Content-Type:
|
58
|
+
- application/json; charset=utf-8
|
59
|
+
Content-Length:
|
60
|
+
- "319"
|
61
|
+
Etag:
|
62
|
+
- W/"13f-riW7JK+w7gdYvKYPzZmuQc+wFXk"
|
63
|
+
Date:
|
64
|
+
- Wed, 03 Mar 2021 22:08:00 GMT
|
65
|
+
Via:
|
66
|
+
- 1.1 vegur
|
67
|
+
body:
|
68
|
+
encoding: UTF-8
|
69
|
+
string: '{"link":"https://id.workos.com/portal/launch?secret=secret"}'
|
70
|
+
http_version:
|
71
|
+
recorded_at: Wed, 03 Mar 2021 22:08:00 GMT
|
72
|
+
recorded_with: VCR 5.0.0
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: workos
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- WorkOS
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-10-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sorbet-runtime
|
@@ -362,6 +362,7 @@ files:
|
|
362
362
|
- spec/support/fixtures/vcr_cassettes/passwordless/create_session_invalid.yml
|
363
363
|
- spec/support/fixtures/vcr_cassettes/passwordless/send_session.yml
|
364
364
|
- spec/support/fixtures/vcr_cassettes/passwordless/send_session_invalid.yml
|
365
|
+
- spec/support/fixtures/vcr_cassettes/portal/generate_link_audit_logs.yml
|
365
366
|
- spec/support/fixtures/vcr_cassettes/portal/generate_link_dsync.yml
|
366
367
|
- spec/support/fixtures/vcr_cassettes/portal/generate_link_invalid.yml
|
367
368
|
- spec/support/fixtures/vcr_cassettes/portal/generate_link_sso.yml
|
@@ -401,7 +402,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
401
402
|
- !ruby/object:Gem::Version
|
402
403
|
version: '0'
|
403
404
|
requirements: []
|
404
|
-
rubygems_version: 3.3.
|
405
|
+
rubygems_version: 3.3.23
|
405
406
|
signing_key:
|
406
407
|
specification_version: 4
|
407
408
|
summary: API client for WorkOS
|
@@ -484,6 +485,7 @@ test_files:
|
|
484
485
|
- spec/support/fixtures/vcr_cassettes/passwordless/create_session_invalid.yml
|
485
486
|
- spec/support/fixtures/vcr_cassettes/passwordless/send_session.yml
|
486
487
|
- spec/support/fixtures/vcr_cassettes/passwordless/send_session_invalid.yml
|
488
|
+
- spec/support/fixtures/vcr_cassettes/portal/generate_link_audit_logs.yml
|
487
489
|
- spec/support/fixtures/vcr_cassettes/portal/generate_link_dsync.yml
|
488
490
|
- spec/support/fixtures/vcr_cassettes/portal/generate_link_invalid.yml
|
489
491
|
- spec/support/fixtures/vcr_cassettes/portal/generate_link_sso.yml
|