stytch 7.5.1 → 7.7.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 207a8b80bd8b8f62b7edd7bc0398c696fbc7b28190b1d1a2157e404aede47f0e
4
- data.tar.gz: 4e98aa6bab1bbd75e81c940aadad15816864c4f9ce61a8aa2c5910e12566aef8
3
+ metadata.gz: 596a877d7f9b69bdba72760f0fa015ff8d2c9e5a70959b52bcad95f1717aecee
4
+ data.tar.gz: 11d3704cb3e3f1d984fb1242d9219a85620d630c1a668e56b10f6a19561c6183
5
5
  SHA512:
6
- metadata.gz: c58c3b1bc072456fb852fd99f629cfb37bf128101720edcbf708dd8dd3141002df363d9bed4aea86f27d1a3afa08622911c749d7c4c0351681b0a56cb772f58b
7
- data.tar.gz: 3114865806a41f85c50c5c162f31e5c248411797dba89e81a4c169fa317af2b0c9868c718fe0a6a292d2bfaad484f17245bbecacd1d7a22a30ed079f8110e3db
6
+ metadata.gz: ca380834e2a6f3d6d6f13b99bdad4462b71cbeff12951c062bb32206ff462cd6a91957ba6c4391bb0de399b007d18ecfee1000312dcff22fd163bb48f8e0d50d
7
+ data.tar.gz: 5bc2d485ec0ff81b44393552668407abf09f12dae3464caa7bc4bb0329ab29acb3431590ca591e8790c8c36a25cf8fa18afbb63fc0d1853b308239e6cc2321e3
@@ -8,17 +8,19 @@ require_relative 'b2b_otp'
8
8
  require_relative 'b2b_passwords'
9
9
  require_relative 'b2b_rbac'
10
10
  require_relative 'b2b_recovery_codes'
11
+ require_relative 'b2b_scim'
11
12
  require_relative 'b2b_sessions'
12
13
  require_relative 'b2b_sso'
13
14
  require_relative 'b2b_totps'
14
15
  require_relative 'm2m'
16
+ require_relative 'project'
15
17
  require_relative 'rbac_local'
16
18
 
17
19
  module StytchB2B
18
20
  class Client
19
21
  ENVIRONMENTS = %i[live test].freeze
20
22
 
21
- attr_reader :discovery, :m2m, :magic_links, :oauth, :otps, :organizations, :passwords, :rbac, :recovery_codes, :sso, :sessions, :totps
23
+ attr_reader :discovery, :m2m, :magic_links, :oauth, :otps, :organizations, :passwords, :project, :rbac, :recovery_codes, :scim, :sso, :sessions, :totps
22
24
 
23
25
  def initialize(project_id:, secret:, env: nil, &block)
24
26
  @api_host = api_host(env, project_id)
@@ -37,8 +39,10 @@ module StytchB2B
37
39
  @otps = StytchB2B::OTPs.new(@connection)
38
40
  @organizations = StytchB2B::Organizations.new(@connection)
39
41
  @passwords = StytchB2B::Passwords.new(@connection)
42
+ @project = Stytch::Project.new(@connection)
40
43
  @rbac = StytchB2B::RBAC.new(@connection)
41
44
  @recovery_codes = StytchB2B::RecoveryCodes.new(@connection)
45
+ @scim = StytchB2B::SCIM.new(@connection)
42
46
  @sso = StytchB2B::SSO.new(@connection)
43
47
  @sessions = StytchB2B::Sessions.new(@connection, @project_id, @policy_cache)
44
48
  @totps = StytchB2B::TOTPs.new(@connection)
@@ -500,6 +500,15 @@ module StytchB2B
500
500
  post_request('/v1/b2b/organizations/search', request, headers)
501
501
  end
502
502
 
503
+ def metrics(
504
+ organization_id:
505
+ )
506
+ headers = {}
507
+ query_params = {}
508
+ request = request_with_query_params("/v1/b2b/organizations/#{organization_id}/metrics", query_params)
509
+ get_request(request, headers)
510
+ end
511
+
503
512
  class Members
504
513
  include Stytch::RequestHelper
505
514
  attr_reader :oauth_providers
@@ -0,0 +1,262 @@
1
+ # frozen_string_literal: true
2
+
3
+ # !!!
4
+ # WARNING: This file is autogenerated
5
+ # Only modify code within MANUAL() sections
6
+ # or your changes may be overwritten later!
7
+ # !!!
8
+
9
+ require_relative 'request_helper'
10
+
11
+ module StytchB2B
12
+ class SCIM
13
+ include Stytch::RequestHelper
14
+ attr_reader :connections
15
+
16
+ def initialize(connection)
17
+ @connection = connection
18
+
19
+ @connections = StytchB2B::SCIM::Connections.new(@connection)
20
+ end
21
+
22
+ class Connections
23
+ include Stytch::RequestHelper
24
+
25
+ def initialize(connection)
26
+ @connection = connection
27
+ end
28
+
29
+ # Update a SCIM Connection. /%}
30
+ #
31
+ # == Parameters:
32
+ # organization_id::
33
+ # Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value.
34
+ # The type of this field is +String+.
35
+ # connection_id::
36
+ # The ID of the SCIM connection.
37
+ # The type of this field is +String+.
38
+ # display_name::
39
+ # A human-readable display name for the connection.
40
+ # The type of this field is nilable +String+.
41
+ # identity_provider::
42
+ # (no documentation yet)
43
+ # The type of this field is nilable +UpdateRequestIdp+ (string enum).
44
+ # scim_group_implicit_role_assignments::
45
+ # (no documentation yet)
46
+ # The type of this field is nilable list of +SCIMGroupImplicitRoleAssignments+.
47
+ #
48
+ # == Returns:
49
+ # An object with the following fields:
50
+ # request_id::
51
+ # Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we may ask for this value to help identify a specific API call when helping you debug an issue.
52
+ # The type of this field is +String+.
53
+ # status_code::
54
+ # The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors.
55
+ # The type of this field is +Integer+.
56
+ # connection::
57
+ # The `SAML Connection` object affected by this API call. See the [SAML Connection Object](https://stytch.com/docs/b2b/api/saml-connection-object) for complete response field details.
58
+ # The type of this field is nilable +SCIMConnection+ (+object+).
59
+ def update(
60
+ organization_id:,
61
+ connection_id:,
62
+ display_name: nil,
63
+ identity_provider: nil,
64
+ scim_group_implicit_role_assignments: nil
65
+ )
66
+ headers = {}
67
+ request = {}
68
+ request[:display_name] = display_name unless display_name.nil?
69
+ request[:identity_provider] = identity_provider unless identity_provider.nil?
70
+ request[:scim_group_implicit_role_assignments] = scim_group_implicit_role_assignments unless scim_group_implicit_role_assignments.nil?
71
+
72
+ put_request("/v1/b2b/scim/#{organization_id}/connections/#{connection_id}", request, headers)
73
+ end
74
+
75
+ # Deletes a SCIM Connection. /%}
76
+ #
77
+ # == Parameters:
78
+ # organization_id::
79
+ # Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value.
80
+ # The type of this field is +String+.
81
+ # connection_id::
82
+ # Globally unique UUID that identifies a specific SSO `connection_id` for a Member.
83
+ # The type of this field is +String+.
84
+ #
85
+ # == Returns:
86
+ # An object with the following fields:
87
+ # request_id::
88
+ # Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we may ask for this value to help identify a specific API call when helping you debug an issue.
89
+ # The type of this field is +String+.
90
+ # connection_id::
91
+ # The `connection_id` that was deleted as part of the delete request.
92
+ # The type of this field is +String+.
93
+ # status_code::
94
+ # The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors.
95
+ # The type of this field is +Integer+.
96
+ def delete(
97
+ organization_id:,
98
+ connection_id:
99
+ )
100
+ headers = {}
101
+ delete_request("/v1/b2b/scim/#{organization_id}/connections/#{connection_id}", headers)
102
+ end
103
+
104
+ # Start a SCIM token rotation. /%}
105
+ #
106
+ # == Parameters:
107
+ # organization_id::
108
+ # Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value.
109
+ # The type of this field is +String+.
110
+ # connection_id::
111
+ # The ID of the SCIM connection.
112
+ # The type of this field is +String+.
113
+ #
114
+ # == Returns:
115
+ # An object with the following fields:
116
+ # request_id::
117
+ # Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we may ask for this value to help identify a specific API call when helping you debug an issue.
118
+ # The type of this field is +String+.
119
+ # status_code::
120
+ # The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors.
121
+ # The type of this field is +Integer+.
122
+ # connection::
123
+ # The `SCIM Connection` object affected by this API call. See the [SCIM Connection Object](https://stytch.com/docs/b2b/api/scim-connection-object) for complete response field details.
124
+ # The type of this field is nilable +SCIMConnectionWithNextToken+ (+object+).
125
+ def rotate_start(
126
+ organization_id:,
127
+ connection_id:
128
+ )
129
+ headers = {}
130
+ request = {}
131
+
132
+ post_request("/v1/b2b/scim/#{organization_id}/connections/#{connection_id}/rotate/start", request, headers)
133
+ end
134
+
135
+ # Completes a SCIM token rotation. This will complete the current token rotation process and update the active token to be the new token supplied in the [start SCIM token rotation](https://stytch.com/docs/b2b/api/scim-rotate-token-start) response. /%}
136
+ #
137
+ # == Parameters:
138
+ # organization_id::
139
+ # Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value.
140
+ # The type of this field is +String+.
141
+ # connection_id::
142
+ # The ID of the SCIM connection.
143
+ # The type of this field is +String+.
144
+ #
145
+ # == Returns:
146
+ # An object with the following fields:
147
+ # request_id::
148
+ # Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we may ask for this value to help identify a specific API call when helping you debug an issue.
149
+ # The type of this field is +String+.
150
+ # status_code::
151
+ # The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors.
152
+ # The type of this field is +Integer+.
153
+ # connection::
154
+ # The `SCIM Connection` object affected by this API call. See the [SCIM Connection Object](https://stytch.com/docs/b2b/api/scim-connection-object) for complete response field details.
155
+ # The type of this field is nilable +SCIMConnection+ (+object+).
156
+ def rotate_complete(
157
+ organization_id:,
158
+ connection_id:
159
+ )
160
+ headers = {}
161
+ request = {}
162
+
163
+ post_request("/v1/b2b/scim/#{organization_id}/connections/#{connection_id}/rotate/complete", request, headers)
164
+ end
165
+
166
+ # Cancel a SCIM token rotation. This will cancel the current token rotation process, keeping the original token active. /%}
167
+ #
168
+ # == Parameters:
169
+ # organization_id::
170
+ # Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value.
171
+ # The type of this field is +String+.
172
+ # connection_id::
173
+ # The ID of the SCIM connection.
174
+ # The type of this field is +String+.
175
+ #
176
+ # == Returns:
177
+ # An object with the following fields:
178
+ # request_id::
179
+ # Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we may ask for this value to help identify a specific API call when helping you debug an issue.
180
+ # The type of this field is +String+.
181
+ # status_code::
182
+ # The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors.
183
+ # The type of this field is +Integer+.
184
+ # connection::
185
+ # The `SCIM Connection` object affected by this API call. See the [SCIM Connection Object](https://stytch.com/docs/b2b/api/scim-connection-object) for complete response field details.
186
+ # The type of this field is nilable +SCIMConnection+ (+object+).
187
+ def rotate_cancel(
188
+ organization_id:,
189
+ connection_id:
190
+ )
191
+ headers = {}
192
+ request = {}
193
+
194
+ post_request("/v1/b2b/scim/#{organization_id}/connections/#{connection_id}/rotate/cancel", request, headers)
195
+ end
196
+
197
+ # Create a new SCIM Connection. /%}
198
+ #
199
+ # == Parameters:
200
+ # organization_id::
201
+ # Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value.
202
+ # The type of this field is +String+.
203
+ # display_name::
204
+ # A human-readable display name for the connection.
205
+ # The type of this field is nilable +String+.
206
+ # identity_provider::
207
+ # (no documentation yet)
208
+ # The type of this field is nilable +CreateRequestIdp+ (string enum).
209
+ #
210
+ # == Returns:
211
+ # An object with the following fields:
212
+ # request_id::
213
+ # Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we may ask for this value to help identify a specific API call when helping you debug an issue.
214
+ # The type of this field is +String+.
215
+ # status_code::
216
+ # The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors.
217
+ # The type of this field is +Integer+.
218
+ # connection::
219
+ # The `SCIM Connection` object affected by this API call. See the [SCIM Connection Object](https://stytch.com/docs/b2b/api/scim-connection-object) for complete response field details.
220
+ # The type of this field is nilable +SCIMConnectionWithToken+ (+object+).
221
+ def create(
222
+ organization_id:,
223
+ display_name: nil,
224
+ identity_provider: nil
225
+ )
226
+ headers = {}
227
+ request = {}
228
+ request[:display_name] = display_name unless display_name.nil?
229
+ request[:identity_provider] = identity_provider unless identity_provider.nil?
230
+
231
+ post_request("/v1/b2b/scim/#{organization_id}/connections", request, headers)
232
+ end
233
+
234
+ # Get SCIM Connections. /%}
235
+ #
236
+ # == Parameters:
237
+ # organization_id::
238
+ # Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value.
239
+ # The type of this field is +String+.
240
+ #
241
+ # == Returns:
242
+ # An object with the following fields:
243
+ # request_id::
244
+ # Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we may ask for this value to help identify a specific API call when helping you debug an issue.
245
+ # The type of this field is +String+.
246
+ # connections::
247
+ # (no documentation yet)
248
+ # The type of this field is list of +SCIMConnection+ (+object+).
249
+ # status_code::
250
+ # The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors.
251
+ # The type of this field is +Integer+.
252
+ def get(
253
+ organization_id:
254
+ )
255
+ headers = {}
256
+ query_params = {}
257
+ request = request_with_query_params("/v1/b2b/scim/#{organization_id}/connections", query_params)
258
+ get_request(request, headers)
259
+ end
260
+ end
261
+ end
262
+ end
data/lib/stytch/client.rb CHANGED
@@ -6,6 +6,7 @@ require_relative 'magic_links'
6
6
  require_relative 'oauth'
7
7
  require_relative 'otps'
8
8
  require_relative 'passwords'
9
+ require_relative 'project'
9
10
  require_relative 'sessions'
10
11
  require_relative 'totps'
11
12
  require_relative 'users'
@@ -15,7 +16,7 @@ module Stytch
15
16
  class Client
16
17
  ENVIRONMENTS = %i[live test].freeze
17
18
 
18
- attr_reader :crypto_wallets, :m2m, :magic_links, :oauth, :otps, :passwords, :sessions, :totps, :users, :webauthn
19
+ attr_reader :crypto_wallets, :m2m, :magic_links, :oauth, :otps, :passwords, :project, :sessions, :totps, :users, :webauthn
19
20
 
20
21
  def initialize(project_id:, secret:, env: nil, &block)
21
22
  @api_host = api_host(env, project_id)
@@ -30,6 +31,7 @@ module Stytch
30
31
  @oauth = Stytch::OAuth.new(@connection)
31
32
  @otps = Stytch::OTPs.new(@connection)
32
33
  @passwords = Stytch::Passwords.new(@connection)
34
+ @project = Stytch::Project.new(@connection)
33
35
  @sessions = Stytch::Sessions.new(@connection, @project_id)
34
36
  @totps = Stytch::TOTPs.new(@connection)
35
37
  @users = Stytch::Users.new(@connection)
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ # !!!
4
+ # WARNING: This file is autogenerated
5
+ # Only modify code within MANUAL() sections
6
+ # or your changes may be overwritten later!
7
+ # !!!
8
+
9
+ require_relative 'request_helper'
10
+
11
+ module Stytch
12
+ class Project
13
+ include Stytch::RequestHelper
14
+
15
+ def initialize(connection)
16
+ @connection = connection
17
+ end
18
+
19
+ def metrics
20
+ headers = {}
21
+ query_params = {}
22
+ request = request_with_query_params('/v1/projects/metrics', query_params)
23
+ get_request(request, headers)
24
+ end
25
+ end
26
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Stytch
4
- VERSION = '7.5.1'
4
+ VERSION = '7.7.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stytch
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.5.1
4
+ version: 7.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - stytch
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-03-27 00:00:00.000000000 Z
11
+ date: 2024-04-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -133,6 +133,7 @@ files:
133
133
  - lib/stytch/b2b_passwords.rb
134
134
  - lib/stytch/b2b_rbac.rb
135
135
  - lib/stytch/b2b_recovery_codes.rb
136
+ - lib/stytch/b2b_scim.rb
136
137
  - lib/stytch/b2b_sessions.rb
137
138
  - lib/stytch/b2b_sso.rb
138
139
  - lib/stytch/b2b_totps.rb
@@ -146,6 +147,7 @@ files:
146
147
  - lib/stytch/oauth.rb
147
148
  - lib/stytch/otps.rb
148
149
  - lib/stytch/passwords.rb
150
+ - lib/stytch/project.rb
149
151
  - lib/stytch/rbac_local.rb
150
152
  - lib/stytch/request_helper.rb
151
153
  - lib/stytch/sessions.rb