workos 3.0.0 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/.semaphore/semaphore.yml +1 -1
  3. data/Gemfile.lock +1 -1
  4. data/lib/workos/directory_sync.rb +3 -0
  5. data/lib/workos/organization_membership.rb +4 -1
  6. data/lib/workos/organizations.rb +1 -0
  7. data/lib/workos/sso.rb +1 -0
  8. data/lib/workos/types/organization_membership_struct.rb +2 -1
  9. data/lib/workos/types/user_struct.rb +1 -0
  10. data/lib/workos/user.rb +4 -1
  11. data/lib/workos/user_management.rb +3 -0
  12. data/lib/workos/version.rb +1 -1
  13. data/spec/lib/workos/directory_sync_spec.rb +30 -15
  14. data/spec/lib/workos/organizations_spec.rb +6 -3
  15. data/spec/lib/workos/sso_spec.rb +12 -6
  16. data/spec/lib/workos/user_management_spec.rb +14 -7
  17. data/spec/support/fixtures/vcr_cassettes/directory_sync/list_directories/with_after.yml +1 -1
  18. data/spec/support/fixtures/vcr_cassettes/directory_sync/list_directories/with_before.yml +1 -1
  19. data/spec/support/fixtures/vcr_cassettes/directory_sync/list_directories/with_domain.yml +1 -1
  20. data/spec/support/fixtures/vcr_cassettes/directory_sync/list_directories/with_limit.yml +1 -1
  21. data/spec/support/fixtures/vcr_cassettes/directory_sync/list_directories/with_no_options.yml +1 -1
  22. data/spec/support/fixtures/vcr_cassettes/directory_sync/list_directories/with_search.yml +1 -1
  23. data/spec/support/fixtures/vcr_cassettes/directory_sync/list_groups/with_after.yml +1 -1
  24. data/spec/support/fixtures/vcr_cassettes/directory_sync/list_groups/with_before.yml +1 -1
  25. data/spec/support/fixtures/vcr_cassettes/directory_sync/list_groups/with_directory.yml +1 -1
  26. data/spec/support/fixtures/vcr_cassettes/directory_sync/list_groups/with_limit.yml +1 -1
  27. data/spec/support/fixtures/vcr_cassettes/directory_sync/list_groups/with_no_options.yml +1 -1
  28. data/spec/support/fixtures/vcr_cassettes/directory_sync/list_groups/with_user.yml +1 -1
  29. data/spec/support/fixtures/vcr_cassettes/directory_sync/list_users/with_after.yml +1 -1
  30. data/spec/support/fixtures/vcr_cassettes/directory_sync/list_users/with_before.yml +1 -1
  31. data/spec/support/fixtures/vcr_cassettes/directory_sync/list_users/with_directory.yml +1 -1
  32. data/spec/support/fixtures/vcr_cassettes/directory_sync/list_users/with_group.yml +1 -1
  33. data/spec/support/fixtures/vcr_cassettes/directory_sync/list_users/with_limit.yml +1 -1
  34. data/spec/support/fixtures/vcr_cassettes/directory_sync/list_users/with_no_options.yml +72 -71
  35. data/spec/support/fixtures/vcr_cassettes/organization/list.yml +1 -1
  36. data/spec/support/fixtures/vcr_cassettes/sso/list_connections/with_after.yml +1 -1
  37. data/spec/support/fixtures/vcr_cassettes/sso/list_connections/with_before.yml +1 -1
  38. data/spec/support/fixtures/vcr_cassettes/sso/list_connections/with_connection_type.yml +1 -1
  39. data/spec/support/fixtures/vcr_cassettes/sso/list_connections/with_domain.yml +1 -1
  40. data/spec/support/fixtures/vcr_cassettes/sso/list_connections/with_limit.yml +1 -1
  41. data/spec/support/fixtures/vcr_cassettes/sso/list_connections/with_no_options.yml +1 -1
  42. data/spec/support/fixtures/vcr_cassettes/sso/list_connections/with_organization_id.yml +1 -1
  43. data/spec/support/fixtures/vcr_cassettes/user_management/create_organization_membership/valid.yml +1 -1
  44. data/spec/support/fixtures/vcr_cassettes/user_management/get_organization_membership.yml +1 -1
  45. data/spec/support/fixtures/vcr_cassettes/user_management/get_user.yml +79 -79
  46. data/spec/support/fixtures/vcr_cassettes/user_management/list_invitations/with_after.yml +1 -1
  47. data/spec/support/fixtures/vcr_cassettes/user_management/list_invitations/with_before.yml +1 -1
  48. data/spec/support/fixtures/vcr_cassettes/user_management/list_invitations/with_limit.yml +1 -1
  49. data/spec/support/fixtures/vcr_cassettes/user_management/list_invitations/with_no_options.yml +1 -1
  50. data/spec/support/fixtures/vcr_cassettes/user_management/list_invitations/with_organization_id.yml +1 -1
  51. data/spec/support/fixtures/vcr_cassettes/user_management/list_organization_memberships/no_options.yml +2 -2
  52. data/spec/support/fixtures/vcr_cassettes/user_management/list_organization_memberships/with_options.yml +1 -1
  53. data/spec/support/fixtures/vcr_cassettes/user_management/list_users/no_options.yml +1 -1
  54. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8a7377543b69e5754e2754e56bd4c43683ffe6177d678449150b41178cddc2b0
4
- data.tar.gz: 8e0c5d4ee45c39f8084d4b5c31b0e8058ba52ba7d3a7ca56e0146491af723d10
3
+ metadata.gz: 301b7f9d339c1ec1bf85dfc43a4d1ba85de8b6234323c8982fa2f2cf76bed6dd
4
+ data.tar.gz: 91ed96c899e42ccaed1955304fd98a7da7ca7e946be803df4e7c27f4cb3db5fc
5
5
  SHA512:
6
- metadata.gz: d987073ab5dfe9eac87cf279ac8b5e75aff23fd56faf2c4b16f0c6acb43054112042915f1662685af16ec80d172c11b8b6c0bf5a02f44440ac9bf2d973f036ea
7
- data.tar.gz: 1627133ce7178bd72df4a6b0d710a842c9a66926d83ff05283836d3ff9afd958d10b8512c3f119621b4cc8ada2445e1854ae1d237f30e7430468b6dd2a90c6b1
6
+ metadata.gz: b96feaf7d73165f33b979f3cd396adcf91aa4457161647b57423bf204bd89de42e6badeba37f06faf562bd58f5148fe9bd329850721c1efe5f0d0d18e0459bf6
7
+ data.tar.gz: 9417023f79e961c063fcb17c4ca60035e292fe2c321710778d99610165bea2b5c564e7dfad24a7b2effdb51b0d5355fe0c4155de45c7ef5d0d073ddfbbb1f1c6
@@ -4,7 +4,7 @@ name: Ruby
4
4
  agent:
5
5
  machine:
6
6
  type: e1-standard-2
7
- os_image: ubuntu1804
7
+ os_image: ubuntu2004
8
8
 
9
9
  blocks:
10
10
  - name: Run Sorbet 🍦
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- workos (3.0.0)
4
+ workos (4.0.0)
5
5
  sorbet-runtime (~> 0.5)
6
6
 
7
7
  GEM
@@ -35,6 +35,7 @@ module WorkOS
35
35
  ).returns(WorkOS::Types::ListStruct)
36
36
  end
37
37
  def list_directories(options = {})
38
+ options[:order] ||= 'desc'
38
39
  response = execute_request(
39
40
  request: get_request(
40
41
  path: '/directories',
@@ -104,6 +105,7 @@ module WorkOS
104
105
  ).returns(WorkOS::Types::ListStruct)
105
106
  end
106
107
  def list_groups(options = {})
108
+ options[:order] ||= 'desc'
107
109
  response = execute_request(
108
110
  request: get_request(
109
111
  path: '/directory_groups',
@@ -144,6 +146,7 @@ module WorkOS
144
146
  ).returns(WorkOS::Types::ListStruct)
145
147
  end
146
148
  def list_users(options = {})
149
+ options[:order] ||= 'desc'
147
150
  response = execute_request(
148
151
  request: get_request(
149
152
  path: '/directory_users',
@@ -9,7 +9,7 @@ module WorkOS
9
9
  include HashProvider
10
10
  extend T::Sig
11
11
 
12
- attr_accessor :id, :user_id, :organization_id, :created_at, :updated_at
12
+ attr_accessor :id, :user_id, :organization_id, :status, :created_at, :updated_at
13
13
 
14
14
  sig { params(json: String).void }
15
15
  def initialize(json)
@@ -18,6 +18,7 @@ module WorkOS
18
18
  @id = T.let(raw.id, String)
19
19
  @user_id = T.let(raw.user_id, String)
20
20
  @organization_id = raw.organization_id
21
+ @status = T.let(raw.status, String)
21
22
  @created_at = T.let(raw.created_at, String)
22
23
  @updated_at = T.let(raw.updated_at, String)
23
24
  end
@@ -27,6 +28,7 @@ module WorkOS
27
28
  id: id,
28
29
  user_id: user_id,
29
30
  organization_id: organization_id,
31
+ status: status,
30
32
  created_at: created_at,
31
33
  updated_at: updated_at,
32
34
  }
@@ -42,6 +44,7 @@ module WorkOS
42
44
  id: hash[:id],
43
45
  user_id: hash[:user_id],
44
46
  organization_id: hash[:organization_id],
47
+ status: hash[:status],
45
48
  created_at: hash[:created_at],
46
49
  updated_at: hash[:updated_at],
47
50
  )
@@ -28,6 +28,7 @@ module WorkOS
28
28
  ).returns(WorkOS::Types::ListStruct)
29
29
  end
30
30
  def list_organizations(options = {})
31
+ options[:order] ||= 'desc'
31
32
  response = execute_request(
32
33
  request: get_request(
33
34
  path: '/organizations',
data/lib/workos/sso.rb CHANGED
@@ -175,6 +175,7 @@ module WorkOS
175
175
  ).returns(WorkOS::Types::ListStruct)
176
176
  end
177
177
  def list_connections(options = {})
178
+ options[:order] ||= 'desc'
178
179
  response = execute_request(
179
180
  request: get_request(
180
181
  path: '/connections',
@@ -7,7 +7,8 @@ module WorkOS
7
7
  class OrganizationMembershipStruct < T::Struct
8
8
  const :id, String
9
9
  const :user_id, String
10
- const :organization_id, String
10
+ const :organization_id, T.nilable(String)
11
+ const :status, String
11
12
  const :created_at, String
12
13
  const :updated_at, String
13
14
  end
@@ -10,6 +10,7 @@ module WorkOS
10
10
  const :first_name, T.nilable(String)
11
11
  const :last_name, T.nilable(String)
12
12
  const :email_verified, T::Boolean
13
+ const :profile_picture_url, T.nilable(String)
13
14
  const :created_at, String
14
15
  const :updated_at, String
15
16
  end
data/lib/workos/user.rb CHANGED
@@ -10,7 +10,7 @@ module WorkOS
10
10
  extend T::Sig
11
11
 
12
12
  attr_accessor :id, :email, :first_name, :last_name, :email_verified,
13
- :created_at, :updated_at
13
+ :profile_picture_url, :created_at, :updated_at
14
14
 
15
15
  sig { params(json: String).void }
16
16
  def initialize(json)
@@ -21,6 +21,7 @@ module WorkOS
21
21
  @first_name = raw.first_name
22
22
  @last_name = raw.last_name
23
23
  @email_verified = raw.email_verified
24
+ @profile_picture_url = raw.profile_picture_url
24
25
  @created_at = T.let(raw.created_at, String)
25
26
  @updated_at = T.let(raw.updated_at, String)
26
27
  end
@@ -32,6 +33,7 @@ module WorkOS
32
33
  first_name: first_name,
33
34
  last_name: last_name,
34
35
  email_verified: email_verified,
36
+ profile_picture_url: profile_picture_url,
35
37
  created_at: created_at,
36
38
  updated_at: updated_at,
37
39
  }
@@ -49,6 +51,7 @@ module WorkOS
49
51
  first_name: hash[:first_name],
50
52
  last_name: hash[:last_name],
51
53
  email_verified: hash[:email_verified],
54
+ profile_picture_url: hash[:profile_picture_url],
52
55
  created_at: hash[:created_at],
53
56
  updated_at: hash[:updated_at],
54
57
  )
@@ -157,6 +157,7 @@ module WorkOS
157
157
  ).returns(WorkOS::Types::ListStruct)
158
158
  end
159
159
  def list_users(options = {})
160
+ options[:order] ||= 'desc'
160
161
  response = execute_request(
161
162
  request: get_request(
162
163
  path: '/user_management/users',
@@ -783,6 +784,7 @@ module WorkOS
783
784
  ).returns(WorkOS::Types::ListStruct)
784
785
  end
785
786
  def list_organization_memberships(options = {})
787
+ options[:order] ||= 'desc'
786
788
  response = execute_request(
787
789
  request: get_request(
788
790
  path: '/user_management/organization_memberships',
@@ -889,6 +891,7 @@ module WorkOS
889
891
  ).returns(WorkOS::Types::ListStruct)
890
892
  end
891
893
  def list_invitations(options = {})
894
+ options[:order] ||= 'desc'
892
895
  response = execute_request(
893
896
  request: get_request(
894
897
  path: '/user_management/invitations',
@@ -2,5 +2,5 @@
2
2
  # typed: strong
3
3
 
4
4
  module WorkOS
5
- VERSION = '3.0.0'
5
+ VERSION = '4.0.0'
6
6
  end
@@ -24,7 +24,8 @@ describe WorkOS::DirectorySync do
24
24
  context 'with domain option' do
25
25
  it 'forms the proper request to the API' do
26
26
  request_args = [
27
- '/directories?domain=foo-corp.com',
27
+ '/directories?domain=foo-corp.com&'\
28
+ 'order=desc',
28
29
  'Content-Type' => 'application/json'
29
30
  ]
30
31
 
@@ -46,7 +47,8 @@ describe WorkOS::DirectorySync do
46
47
  context 'with search option' do
47
48
  it 'forms the proper request to the API' do
48
49
  request_args = [
49
- '/directories?search=Testing',
50
+ '/directories?search=Testing&'\
51
+ 'order=desc',
50
52
  'Content-Type' => 'application/json'
51
53
  ]
52
54
 
@@ -69,7 +71,8 @@ describe WorkOS::DirectorySync do
69
71
  context 'with the before option' do
70
72
  it 'forms the proper request to the API' do
71
73
  request_args = [
72
- '/directories?before=directory_01FGCPNV312FHFRCX0BYWHVSE1',
74
+ '/directories?before=directory_01FGCPNV312FHFRCX0BYWHVSE1&'\
75
+ 'order=desc',
73
76
  'Content-Type' => 'application/json'
74
77
  ]
75
78
 
@@ -91,7 +94,8 @@ describe WorkOS::DirectorySync do
91
94
  context 'with the after option' do
92
95
  it 'forms the proper request to the API' do
93
96
  request_args = [
94
- '/directories?after=directory_01FGCPNV312FHFRCX0BYWHVSE1',
97
+ '/directories?after=directory_01FGCPNV312FHFRCX0BYWHVSE1&'\
98
+ 'order=desc',
95
99
  'Content-Type' => 'application/json'
96
100
  ]
97
101
 
@@ -111,7 +115,8 @@ describe WorkOS::DirectorySync do
111
115
  context 'with the limit option' do
112
116
  it 'forms the proper request to the API' do
113
117
  request_args = [
114
- '/directories?limit=2',
118
+ '/directories?limit=2&'\
119
+ 'order=desc',
115
120
  'Content-Type' => 'application/json'
116
121
  ]
117
122
 
@@ -189,7 +194,8 @@ describe WorkOS::DirectorySync do
189
194
  context 'with directory option' do
190
195
  it 'forms the proper request to the API' do
191
196
  request_args = [
192
- '/directory_groups?directory=directory_01G2Z8ADK5NPMVTWF48MVVE4HT',
197
+ '/directory_groups?directory=directory_01G2Z8ADK5NPMVTWF48MVVE4HT&'\
198
+ 'order=desc',
193
199
  'Content-Type' => 'application/json'
194
200
  ]
195
201
 
@@ -212,7 +218,8 @@ describe WorkOS::DirectorySync do
212
218
  context 'with user option' do
213
219
  it 'forms the proper request to the API' do
214
220
  request_args = [
215
- '/directory_groups?user=directory_user_01G2Z8D4FDB28ZNSRRBVCF2E0P',
221
+ '/directory_groups?user=directory_user_01G2Z8D4FDB28ZNSRRBVCF2E0P&'\
222
+ 'order=desc',
216
223
  'Content-Type' => 'application/json'
217
224
  ]
218
225
 
@@ -235,7 +242,8 @@ describe WorkOS::DirectorySync do
235
242
  it 'forms the proper request to the API' do
236
243
  request_args = [
237
244
  '/directory_groups?before=directory_group_01G2Z8D4ZR8RJ03Y1W7P9K8NMG&' \
238
- 'directory=directory_01G2Z8ADK5NPMVTWF48MVVE4HT',
245
+ 'directory=directory_01G2Z8ADK5NPMVTWF48MVVE4HT&'\
246
+ 'order=desc',
239
247
  'Content-Type' => 'application/json'
240
248
  ]
241
249
 
@@ -259,7 +267,8 @@ describe WorkOS::DirectorySync do
259
267
  it 'forms the proper request to the API' do
260
268
  request_args = [
261
269
  '/directory_groups?after=directory_group_01G2Z8D4ZR8RJ03Y1W7P9K8NMG&' \
262
- 'directory=directory_01G2Z8ADK5NPMVTWF48MVVE4HT',
270
+ 'directory=directory_01G2Z8ADK5NPMVTWF48MVVE4HT&'\
271
+ 'order=desc',
263
272
  'Content-Type' => 'application/json'
264
273
  ]
265
274
 
@@ -283,7 +292,8 @@ describe WorkOS::DirectorySync do
283
292
  it 'forms the proper request to the API' do
284
293
  request_args = [
285
294
  '/directory_groups?limit=2&' \
286
- 'directory=directory_01G2Z8ADK5NPMVTWF48MVVE4HT',
295
+ 'directory=directory_01G2Z8ADK5NPMVTWF48MVVE4HT&'\
296
+ 'order=desc',
287
297
  'Content-Type' => 'application/json'
288
298
  ]
289
299
 
@@ -318,7 +328,8 @@ describe WorkOS::DirectorySync do
318
328
  context 'with directory option' do
319
329
  it 'forms the proper request to the API' do
320
330
  request_args = [
321
- '/directory_users?directory=directory_01FAZYMST676QMTFN1DDJZZX87',
331
+ '/directory_users?directory=directory_01FAZYMST676QMTFN1DDJZZX87&'\
332
+ 'order=desc',
322
333
  'Content-Type' => 'application/json'
323
334
  ]
324
335
 
@@ -341,7 +352,8 @@ describe WorkOS::DirectorySync do
341
352
  context 'with group option' do
342
353
  it 'forms the proper request to the API' do
343
354
  request_args = [
344
- '/directory_users?group=directory_group_01FBXGP79EJAYKW0WS9JCK1V6E',
355
+ '/directory_users?group=directory_group_01FBXGP79EJAYKW0WS9JCK1V6E&'\
356
+ 'order=desc',
345
357
  'Content-Type' => 'application/json'
346
358
  ]
347
359
 
@@ -364,7 +376,8 @@ describe WorkOS::DirectorySync do
364
376
  it 'forms the proper request to the API' do
365
377
  request_args = [
366
378
  '/directory_users?before=directory_user_01FAZYNPC8TJBP7Y2ERT51MGDF&'\
367
- 'directory=directory_01FAZYMST676QMTFN1DDJZZX87',
379
+ 'directory=directory_01FAZYMST676QMTFN1DDJZZX87&'\
380
+ 'order=desc',
368
381
  'Content-Type' => 'application/json'
369
382
  ]
370
383
 
@@ -388,7 +401,8 @@ describe WorkOS::DirectorySync do
388
401
  it 'forms the proper request to the API' do
389
402
  request_args = [
390
403
  '/directory_users?after=directory_user_01FAZYNPC8TJBP7Y2ERT51MGDF&' \
391
- 'directory=directory_01FAZYMST676QMTFN1DDJZZX87',
404
+ 'directory=directory_01FAZYMST676QMTFN1DDJZZX87&'\
405
+ 'order=desc',
392
406
  'Content-Type' => 'application/json'
393
407
  ]
394
408
 
@@ -412,7 +426,8 @@ describe WorkOS::DirectorySync do
412
426
  it 'forms the proper request to the API' do
413
427
  request_args = [
414
428
  '/directory_users?limit=2&' \
415
- 'directory=directory_01FAZYMST676QMTFN1DDJZZX87',
429
+ 'directory=directory_01FAZYMST676QMTFN1DDJZZX87&'\
430
+ 'order=desc',
416
431
  'Content-Type' => 'application/json'
417
432
  ]
418
433
 
@@ -121,7 +121,8 @@ describe WorkOS::Organizations do
121
121
  context 'with the before option' do
122
122
  it 'forms the proper request to the API' do
123
123
  request_args = [
124
- '/organizations?before=before-id',
124
+ '/organizations?before=before-id&'\
125
+ 'order=desc',
125
126
  'Content-Type' => 'application/json'
126
127
  ]
127
128
 
@@ -143,7 +144,8 @@ describe WorkOS::Organizations do
143
144
  context 'with the after option' do
144
145
  it 'forms the proper request to the API' do
145
146
  request_args = [
146
- '/organizations?after=after-id',
147
+ '/organizations?after=after-id&'\
148
+ 'order=desc',
147
149
  'Content-Type' => 'application/json'
148
150
  ]
149
151
 
@@ -163,7 +165,8 @@ describe WorkOS::Organizations do
163
165
  context 'with the limit option' do
164
166
  it 'forms the proper request to the API' do
165
167
  request_args = [
166
- '/organizations?limit=10',
168
+ '/organizations?limit=10&'\
169
+ 'order=desc',
167
170
  'Content-Type' => 'application/json'
168
171
  ]
169
172
 
@@ -457,7 +457,8 @@ describe WorkOS::SSO do
457
457
  context 'with connection_type option' do
458
458
  it 'forms the proper request to the API' do
459
459
  request_args = [
460
- '/connections?connection_type=OktaSAML',
460
+ '/connections?connection_type=OktaSAML&'\
461
+ 'order=desc',
461
462
  'Content-Type' => 'application/json'
462
463
  ]
463
464
 
@@ -480,7 +481,8 @@ describe WorkOS::SSO do
480
481
  context 'with domain option' do
481
482
  it 'forms the proper request to the API' do
482
483
  request_args = [
483
- '/connections?domain=foo-corp.com',
484
+ '/connections?domain=foo-corp.com&'\
485
+ 'order=desc',
484
486
  'Content-Type' => 'application/json'
485
487
  ]
486
488
 
@@ -502,7 +504,8 @@ describe WorkOS::SSO do
502
504
  context 'with organization_id option' do
503
505
  it 'forms the proper request to the API' do
504
506
  request_args = [
505
- '/connections?organization_id=org_01F9293WD2PDEEV4Y625XPZVG7',
507
+ '/connections?organization_id=org_01F9293WD2PDEEV4Y625XPZVG7&'\
508
+ 'order=desc',
506
509
  'Content-Type' => 'application/json'
507
510
  ]
508
511
 
@@ -527,7 +530,8 @@ describe WorkOS::SSO do
527
530
  context 'with limit option' do
528
531
  it 'forms the proper request to the API' do
529
532
  request_args = [
530
- '/connections?limit=2',
533
+ '/connections?limit=2&'\
534
+ 'order=desc',
531
535
  'Content-Type' => 'application/json'
532
536
  ]
533
537
 
@@ -549,7 +553,8 @@ describe WorkOS::SSO do
549
553
  context 'with before option' do
550
554
  it 'forms the proper request to the API' do
551
555
  request_args = [
552
- '/connections?before=conn_01FA3WGCWPCCY1V2FGES2FDNP7',
556
+ '/connections?before=conn_01FA3WGCWPCCY1V2FGES2FDNP7&'\
557
+ 'order=desc',
553
558
  'Content-Type' => 'application/json'
554
559
  ]
555
560
 
@@ -571,7 +576,8 @@ describe WorkOS::SSO do
571
576
  context 'with after option' do
572
577
  it 'forms the proper request to the API' do
573
578
  request_args = [
574
- '/connections?after=conn_01FA3WGCWPCCY1V2FGES2FDNP7',
579
+ '/connections?after=conn_01FA3WGCWPCCY1V2FGES2FDNP7&'\
580
+ 'order=desc',
575
581
  'Content-Type' => 'application/json'
576
582
  ]
577
583
 
@@ -225,7 +225,7 @@ describe WorkOS::UserManagement do
225
225
  it 'returns a user' do
226
226
  VCR.use_cassette 'user_management/get_user' do
227
227
  user = described_class.get_user(
228
- id: 'user_01H7TVSKS45SDHN5V9XPSM6H44',
228
+ id: 'user_01HP0B4ZV2FWWVY0BF16GFDAER',
229
229
  )
230
230
 
231
231
  expect(user.id.instance_of?(String))
@@ -265,7 +265,9 @@ describe WorkOS::UserManagement do
265
265
  context 'with options' do
266
266
  it 'returns a list of matching users' do
267
267
  request_args = [
268
- '/user_management/users?email=lucy.lawless%40example.com&order=desc&limit=5',
268
+ '/user_management/users?email=lucy.lawless%40example.com&'\
269
+ 'order=desc&'\
270
+ 'limit=5',
269
271
  'Content-Type' => 'application/json'
270
272
  ]
271
273
 
@@ -820,7 +822,8 @@ describe WorkOS::UserManagement do
820
822
  context 'with options' do
821
823
  it 'returns a list of matching users' do
822
824
  request_args = [
823
- '/user_management/organization_memberships?user_id=user_01H5JQDV7R7ATEYZDEG0W5PRYS&order=desc&limit=5',
825
+ '/user_management/organization_memberships?user_id=user_01H5JQDV7R7ATEYZDEG0W5PRYS&'\
826
+ 'order=desc&limit=5',
824
827
  'Content-Type' => 'application/json'
825
828
  ]
826
829
 
@@ -941,7 +944,8 @@ describe WorkOS::UserManagement do
941
944
  context 'with organization_id option' do
942
945
  it 'forms the proper request to the API' do
943
946
  request_args = [
944
- '/user_management/invitations?organization_id=org_01H5JQDV7R7ATEYZDEG0W5PRYS',
947
+ '/user_management/invitations?organization_id=org_01H5JQDV7R7ATEYZDEG0W5PRYS&'\
948
+ 'order=desc',
945
949
  'Content-Type' => 'application/json'
946
950
  ]
947
951
 
@@ -966,7 +970,8 @@ describe WorkOS::UserManagement do
966
970
  context 'with limit option' do
967
971
  it 'forms the proper request to the API' do
968
972
  request_args = [
969
- '/user_management/invitations?limit=2',
973
+ '/user_management/invitations?limit=2&'\
974
+ 'order=desc',
970
975
  'Content-Type' => 'application/json'
971
976
  ]
972
977
 
@@ -988,7 +993,8 @@ describe WorkOS::UserManagement do
988
993
  context 'with before option' do
989
994
  it 'forms the proper request to the API' do
990
995
  request_args = [
991
- '/user_management/invitations?before=invitation_01H5JQDV7R7ATEYZDEG0W5PRYS',
996
+ '/user_management/invitations?before=invitation_01H5JQDV7R7ATEYZDEG0W5PRYS&'\
997
+ 'order=desc',
992
998
  'Content-Type' => 'application/json'
993
999
  ]
994
1000
 
@@ -1010,7 +1016,8 @@ describe WorkOS::UserManagement do
1010
1016
  context 'with after option' do
1011
1017
  it 'forms the proper request to the API' do
1012
1018
  request_args = [
1013
- '/user_management/invitations?after=invitation_01H5JQDV7R7ATEYZDEG0W5PRYS',
1019
+ '/user_management/invitations?after=invitation_01H5JQDV7R7ATEYZDEG0W5PRYS&'\
1020
+ 'order=desc',
1014
1021
  'Content-Type' => 'application/json'
1015
1022
  ]
1016
1023
 
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://api.workos.com/directories?after=directory_01FGCPNV312FHFRCX0BYWHVSE1
5
+ uri: https://api.workos.com/directories?after=directory_01FGCPNV312FHFRCX0BYWHVSE1&order=desc
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://api.workos.com/directories?before=directory_01FGCPNV312FHFRCX0BYWHVSE1
5
+ uri: https://api.workos.com/directories?before=directory_01FGCPNV312FHFRCX0BYWHVSE1&order=desc
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://api.workos.com/directories?domain=foo-corp.com
5
+ uri: https://api.workos.com/directories?domain=foo-corp.com&order=desc
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://api.workos.com/directories?limit=2
5
+ uri: https://api.workos.com/directories?limit=2&order=desc
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://api.workos.com/directories
5
+ uri: https://api.workos.com/directories?order=desc
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://api.workos.com/directories?search=Testing
5
+ uri: https://api.workos.com/directories?order=desc&search=Testing
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://api.workos.com/directory_groups?after=directory_group_01G2Z8D4ZR8RJ03Y1W7P9K8NMG&directory=directory_01G2Z8ADK5NPMVTWF48MVVE4HT
5
+ uri: https://api.workos.com/directory_groups?after=directory_group_01G2Z8D4ZR8RJ03Y1W7P9K8NMG&directory=directory_01G2Z8ADK5NPMVTWF48MVVE4HT&order=desc
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://api.workos.com/directory_groups?before=directory_group_01G2Z8D4ZR8RJ03Y1W7P9K8NMG&directory=directory_01G2Z8ADK5NPMVTWF48MVVE4HT
5
+ uri: https://api.workos.com/directory_groups?before=directory_group_01G2Z8D4ZR8RJ03Y1W7P9K8NMG&directory=directory_01G2Z8ADK5NPMVTWF48MVVE4HT&order=desc
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://api.workos.com/directory_groups?directory=directory_01G2Z8ADK5NPMVTWF48MVVE4HT
5
+ uri: https://api.workos.com/directory_groups?directory=directory_01G2Z8ADK5NPMVTWF48MVVE4HT&order=desc
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://api.workos.com/directory_groups?directory=directory_01G2Z8ADK5NPMVTWF48MVVE4HT&limit=2
5
+ uri: https://api.workos.com/directory_groups?directory=directory_01G2Z8ADK5NPMVTWF48MVVE4HT&limit=2&order=desc
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://api.workos.com/directory_groups
5
+ uri: https://api.workos.com/directory_groups?order=desc
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://api.workos.com/directory_groups?user=directory_user_01G2Z8D4FDB28ZNSRRBVCF2E0P
5
+ uri: https://api.workos.com/directory_groups?order=desc&user=directory_user_01G2Z8D4FDB28ZNSRRBVCF2E0P
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://api.workos.com/directory_users?after=directory_user_01FAZYNPC8TJBP7Y2ERT51MGDF&directory=directory_01FAZYMST676QMTFN1DDJZZX87
5
+ uri: https://api.workos.com/directory_users?after=directory_user_01FAZYNPC8TJBP7Y2ERT51MGDF&directory=directory_01FAZYMST676QMTFN1DDJZZX87&order=desc
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://api.workos.com/directory_users?before=directory_user_01FAZYNPC8TJBP7Y2ERT51MGDF&directory=directory_01FAZYMST676QMTFN1DDJZZX87
5
+ uri: https://api.workos.com/directory_users?before=directory_user_01FAZYNPC8TJBP7Y2ERT51MGDF&directory=directory_01FAZYMST676QMTFN1DDJZZX87&order=desc
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://api.workos.com/directory_users?directory=directory_01FAZYMST676QMTFN1DDJZZX87
5
+ uri: https://api.workos.com/directory_users?directory=directory_01FAZYMST676QMTFN1DDJZZX87&order=desc
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''