workos 4.2.1 → 4.3.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/Gemfile.lock +1 -1
- data/README.md +13 -0
- data/lib/workos/events.rb +1 -1
- data/lib/workos/version.rb +1 -1
- data/spec/lib/workos/event_spec.rb +22 -0
- data/spec/support/fixtures/vcr_cassettes/events/list_events_with_organization_id.yml +80 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6e9c735f7fc4cc9a411de3ae0a3587a65eafb86d5abea06deebda9af4557b7d5
|
4
|
+
data.tar.gz: 0527add6ca64c5be1d9c38a4e205af1974c0b6407e2a9eea2358b6cd9a9328df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0ee30e5ed0c50be86a2ec193f81b1eb8a9c5900fdac6b124b7a642b874e1e88244bba23df08c60673e9ee23c35f6713e17ccfb9d6f26e3413fb2e0f48696245d
|
7
|
+
data.tar.gz: 1f5cbc0d1f2a61945b3fd0a28feb56bc2dff908d14cb78ad737d2ca3af0197391aff26e763b64e9d0b6577c0c987ab122667b2a92ce61eb54f95114d99d73d73
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -45,6 +45,19 @@ end
|
|
45
45
|
|
46
46
|
For our SDKs WorkOS follows a Semantic Versioning ([SemVer](https://semver.org/)) process where all releases will have a version X.Y.Z (like 1.0.0) pattern wherein Z would be a bug fix (e.g., 1.0.1), Y would be a minor release (1.1.0) and X would be a major release (2.0.0). We permit any breaking changes to only be released in major versions and strongly recommend reading changelogs before making any major version upgrades.
|
47
47
|
|
48
|
+
## Beta Releases
|
49
|
+
|
50
|
+
WorkOS has features in Beta that can be accessed via Beta releases. We would love for you to try these
|
51
|
+
and share feedback with us before these features reach general availability (GA). To install a Beta version,
|
52
|
+
please follow the [installation steps](#installation) above using the Beta release version.
|
53
|
+
|
54
|
+
> Note: there can be breaking changes between Beta versions. Therefore, we recommend pinning the package version to a
|
55
|
+
> specific version. This way you can install the same version each time without breaking changes unless you are
|
56
|
+
> intentionally looking for the latest Beta version.
|
57
|
+
|
58
|
+
We highly recommend keeping an eye on when the Beta feature you are interested in goes from Beta to stable so that you
|
59
|
+
can move to using the stable version.
|
60
|
+
|
48
61
|
## More Information
|
49
62
|
|
50
63
|
* [Single Sign-On Guide](https://workos.com/docs/sso/guide)
|
data/lib/workos/events.rb
CHANGED
@@ -15,7 +15,7 @@ module WorkOS
|
|
15
15
|
#
|
16
16
|
# @param [Hash] options An options hash
|
17
17
|
# @option options [String] event The type of event
|
18
|
-
#
|
18
|
+
# @option options [String] organization_id Limit scope of events to an organization
|
19
19
|
# @option options [String] limit Maximum number of records to return.
|
20
20
|
# @option options [String] after Pagination cursor to receive records
|
21
21
|
# after a provided Event ID.
|
data/lib/workos/version.rb
CHANGED
@@ -83,5 +83,27 @@ describe WorkOS::Events do
|
|
83
83
|
end
|
84
84
|
end
|
85
85
|
end
|
86
|
+
|
87
|
+
context 'with the organization_id option' do
|
88
|
+
it 'forms the proper request to the API' do
|
89
|
+
request_args = [
|
90
|
+
'/events?organization_id=org_1234',
|
91
|
+
'Content-Type' => 'application/json'
|
92
|
+
]
|
93
|
+
|
94
|
+
expected_request = Net::HTTP::Get.new(*request_args)
|
95
|
+
|
96
|
+
expect(Net::HTTP::Get).to receive(:new).with(*request_args).
|
97
|
+
and_return(expected_request)
|
98
|
+
|
99
|
+
VCR.use_cassette 'events/list_events_with_organization_id' do
|
100
|
+
events = described_class.list_events(
|
101
|
+
organization_id: 'org_1234',
|
102
|
+
)
|
103
|
+
|
104
|
+
expect(events.data.size).to eq(1)
|
105
|
+
end
|
106
|
+
end
|
107
|
+
end
|
86
108
|
end
|
87
109
|
end
|
@@ -0,0 +1,80 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.workos.com/events?organization_id=org_1234
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
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.2; arm64-darwin21; v2.3.0
|
18
|
+
Authorization:
|
19
|
+
- Bearer <API_KEY>
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 200
|
23
|
+
message: OK
|
24
|
+
headers:
|
25
|
+
Date:
|
26
|
+
- Thu, 14 Jul 2022 16:46:23 GMT
|
27
|
+
Content-Type:
|
28
|
+
- application/json; charset=utf-8
|
29
|
+
Content-Length:
|
30
|
+
- '616'
|
31
|
+
Connection:
|
32
|
+
- keep-alive
|
33
|
+
Access-Control-Allow-Credentials:
|
34
|
+
- 'true'
|
35
|
+
Content-Security-Policy:
|
36
|
+
- 'default-src ''self'';base-uri ''self'';block-all-mixed-content;font-src ''self''
|
37
|
+
https: data:;frame-ancestors ''self'';img-src ''self'' data:;object-src ''none'';script-src
|
38
|
+
''self'';script-src-attr ''none'';style-src ''self'' https: ''unsafe-inline'';upgrade-insecure-requests'
|
39
|
+
Etag:
|
40
|
+
- W/"680-NPvBik348v8xg6EE7iZMYwD5UXw"
|
41
|
+
Expect-Ct:
|
42
|
+
- max-age=0
|
43
|
+
Referrer-Policy:
|
44
|
+
- no-referrer
|
45
|
+
Strict-Transport-Security:
|
46
|
+
- max-age=15552000; includeSubDomains
|
47
|
+
Vary:
|
48
|
+
- Origin, Accept-Encoding
|
49
|
+
Via:
|
50
|
+
- 1.1 spaces-router (b642bf20b975)
|
51
|
+
X-Content-Type-Options:
|
52
|
+
- nosniff
|
53
|
+
X-Dns-Prefetch-Control:
|
54
|
+
- 'off'
|
55
|
+
X-Download-Options:
|
56
|
+
- noopen
|
57
|
+
X-Frame-Options:
|
58
|
+
- SAMEORIGIN
|
59
|
+
X-Permitted-Cross-Domain-Policies:
|
60
|
+
- none
|
61
|
+
X-Request-Id:
|
62
|
+
- 51a82273-b413-cead-b968-c07ba4d6fd08
|
63
|
+
X-Xss-Protection:
|
64
|
+
- '0'
|
65
|
+
Cf-Cache-Status:
|
66
|
+
- DYNAMIC
|
67
|
+
Report-To:
|
68
|
+
- '{"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=OS7ELJ3A8tkzMafvaIThD%2B5JlYmul1puZlAXTxEKYBLlq%2B6DCtqDqAi4dtr4yRP3khNmg6MwPiuLqtdOXRmPOtag9Ti%2FGK8ra%2BJOlpwkFjD965CNBfzao4EJtExDkbS3"}],"group":"cf-nel","max_age":604800}'
|
69
|
+
Nel:
|
70
|
+
- '{"success_fraction":0,"report_to":"cf-nel","max_age":604800}'
|
71
|
+
Server:
|
72
|
+
- cloudflare
|
73
|
+
Cf-Ray:
|
74
|
+
- 72abbbf2b93e8ca5-EWR
|
75
|
+
body:
|
76
|
+
encoding: ASCII-8BIT
|
77
|
+
string: '{"object":"list","data":[{"object":"event","id":"event_01FK3HFFGMC2WF32RR8SKWC8KA","event":"dsync.user.created","created_at":"2021-10-28T13:29:54.451Z","data":{"email":"foo@foocorp.com"}}], "list_metadata":{"after":null}}'
|
78
|
+
http_version:
|
79
|
+
recorded_at: Thu, 14 Jul 2022 16:46:23 GMT
|
80
|
+
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: 4.
|
4
|
+
version: 4.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- WorkOS
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-04-
|
11
|
+
date: 2024-04-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -201,6 +201,7 @@ files:
|
|
201
201
|
- spec/support/fixtures/vcr_cassettes/events/list_events_with_after.yml
|
202
202
|
- spec/support/fixtures/vcr_cassettes/events/list_events_with_event.yml
|
203
203
|
- spec/support/fixtures/vcr_cassettes/events/list_events_with_no_options.yml
|
204
|
+
- spec/support/fixtures/vcr_cassettes/events/list_events_with_organization_id.yml
|
204
205
|
- spec/support/fixtures/vcr_cassettes/events/list_events_with_range.yml
|
205
206
|
- spec/support/fixtures/vcr_cassettes/mfa/challenge_factor_generic_valid.yml
|
206
207
|
- spec/support/fixtures/vcr_cassettes/mfa/challenge_factor_sms_valid.yml
|
@@ -391,6 +392,7 @@ test_files:
|
|
391
392
|
- spec/support/fixtures/vcr_cassettes/events/list_events_with_after.yml
|
392
393
|
- spec/support/fixtures/vcr_cassettes/events/list_events_with_event.yml
|
393
394
|
- spec/support/fixtures/vcr_cassettes/events/list_events_with_no_options.yml
|
395
|
+
- spec/support/fixtures/vcr_cassettes/events/list_events_with_organization_id.yml
|
394
396
|
- spec/support/fixtures/vcr_cassettes/events/list_events_with_range.yml
|
395
397
|
- spec/support/fixtures/vcr_cassettes/mfa/challenge_factor_generic_valid.yml
|
396
398
|
- spec/support/fixtures/vcr_cassettes/mfa/challenge_factor_sms_valid.yml
|