stytch 7.5.1 → 7.6.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: 20081a47ace39be10d26c1e1aa897a2dd6a92af8033e4248cb0c0b0ab8423f20
4
+ data.tar.gz: e78cd3c76f31a2d7c186adbe92cc86b1aef074e8c2e054f871afe3a7fadb8087
5
5
  SHA512:
6
- metadata.gz: c58c3b1bc072456fb852fd99f629cfb37bf128101720edcbf708dd8dd3141002df363d9bed4aea86f27d1a3afa08622911c749d7c4c0351681b0a56cb772f58b
7
- data.tar.gz: 3114865806a41f85c50c5c162f31e5c248411797dba89e81a4c169fa317af2b0c9868c718fe0a6a292d2bfaad484f17245bbecacd1d7a22a30ed079f8110e3db
6
+ metadata.gz: e3945334acf409cebd4574c3537f5db421708ccf0f4e739fce4199af0697a65ff9aad3d80f3be995d05fbaf12a49a094c04ae9221547d9b11e9bbc9db3d6ae43
7
+ data.tar.gz: 61852bbbf716eb468c5cd3c222218dce2e6be285af330046e1a05b91d858660c6d7b3fbc3ee2c72984e38fbdf52742e1a3e3509c14af3b79e5943eed24d37991
@@ -8,6 +8,7 @@ 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'
@@ -18,7 +19,7 @@ module StytchB2B
18
19
  class Client
19
20
  ENVIRONMENTS = %i[live test].freeze
20
21
 
21
- attr_reader :discovery, :m2m, :magic_links, :oauth, :otps, :organizations, :passwords, :rbac, :recovery_codes, :sso, :sessions, :totps
22
+ attr_reader :discovery, :m2m, :magic_links, :oauth, :otps, :organizations, :passwords, :rbac, :recovery_codes, :scim, :sso, :sessions, :totps
22
23
 
23
24
  def initialize(project_id:, secret:, env: nil, &block)
24
25
  @api_host = api_host(env, project_id)
@@ -39,6 +40,7 @@ module StytchB2B
39
40
  @passwords = StytchB2B::Passwords.new(@connection)
40
41
  @rbac = StytchB2B::RBAC.new(@connection)
41
42
  @recovery_codes = StytchB2B::RecoveryCodes.new(@connection)
43
+ @scim = StytchB2B::SCIM.new(@connection)
42
44
  @sso = StytchB2B::SSO.new(@connection)
43
45
  @sessions = StytchB2B::Sessions.new(@connection, @project_id, @policy_cache)
44
46
  @totps = StytchB2B::TOTPs.new(@connection)
@@ -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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Stytch
4
- VERSION = '7.5.1'
4
+ VERSION = '7.6.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.6.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-01 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