stytch 9.4.0 → 9.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: 680830d0bdb86bd92d7341d2ed07519a4a185ccaa64b7caa10d342839de88292
4
- data.tar.gz: 2e05ae2dfb502777236daddfe88de208f8c27232144f46a7fcbc57514382a6bc
3
+ metadata.gz: fa60ebc5e53fd75729943da5cc43d5162c19fb16a4884ad9843494cc1a761c32
4
+ data.tar.gz: '021092539c3458fba96ac1601fb45ef5a7296787e1efd6d9b94f539d5a2704f0'
5
5
  SHA512:
6
- metadata.gz: '0466802a5065694b7fe51d184d81f70fa869785b6578d389913781cb9d520e6195644a3911b82535cf5cff5c7c41a33ec5e85b099ce36f78e34759406c3368e7'
7
- data.tar.gz: 5c26c228ebb6969c0ca476362b611d54ac9cfc7b0e8601640f54e5927c8900dec26c9720cfca9d2b22b8c21e4b748f84816ec17230b3b600f8343f025e1e2613
6
+ metadata.gz: 43ed753c739adc360a17d4f45bd2659dd0e0dc07b5758ed37d1270309d8be255864de0a704bafd547357d9615159b04c44e0bd9a6fd2e0fb7b397c755161110b
7
+ data.tar.gz: 1b3367f713445effab13b21baae336bff32b207a7438f68ecfcdac518edab729151b86e72728efc0869e30b3a0dec81c9243215449767311c333eb5270c48c53
@@ -32,12 +32,16 @@ module StytchB2B
32
32
  #
33
33
  # This endpoint can be used to accept invites and create new members via domain matching.
34
34
  #
35
- # If the Member is required to complete MFA to log in to the Organization, the returned value of `member_authenticated` will be `false`.
35
+ # If the is required to complete MFA to log in to the, the returned value of `member_authenticated` will be `false`.
36
36
  # The `intermediate_session_token` will not be consumed and instead will be returned in the response.
37
37
  # The `intermediate_session_token` can be passed into the [OTP SMS Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-otp-sms) to complete the MFA step and acquire a full member session.
38
38
  # The `intermediate_session_token` can also be used with the [Exchange Intermediate Session endpoint](https://stytch.com/docs/b2b/api/exchange-intermediate-session) or the [Create Organization via Discovery endpoint](https://stytch.com/docs/b2b/api/create-organization-via-discovery) to join a different Organization or create a new one.
39
39
  # The `session_duration_minutes` and `session_custom_claims` parameters will be ignored.
40
40
  #
41
+ # If the Member is logging in via an OAuth provider that does not fully verify the email, the returned value of `member_authenticated` will be `false`.
42
+ # The `intermediate_session_token` will not be consumed and instead will be returned in the response.
43
+ # The `primary_required` field details the authentication flow the Member must perform in order to [complete a step-up authentication](https://stytch.com/docs/b2b/guides/oauth/auth-flows) into the organization. The `intermediate_session_token` must be passed into that authentication flow.
44
+ #
41
45
  # == Parameters:
42
46
  # intermediate_session_token::
43
47
  # The Intermediate Session Token. This token does not necessarily belong to a specific instance of a Member, but represents a bag of factors that may be converted to a member session. The token can be used with the [OTP SMS Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-otp-sms), [TOTP Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-totp), or [Recovery Codes Recover endpoint](https://stytch.com/docs/b2b/api/recovery-codes-recover) to complete an MFA flow and log in to the Organization. It can also be used with the [Exchange Intermediate Session endpoint](https://stytch.com/docs/b2b/api/exchange-intermediate-session) to join a specific Organization that allows the factors represented by the intermediate session token; or the [Create Organization via Discovery endpoint](https://stytch.com/docs/b2b/api/create-organization-via-discovery) to create a new Organization and Member.
@@ -64,7 +68,7 @@ module StytchB2B
64
68
  # Total custom claims size cannot exceed four kilobytes.
65
69
  # The type of this field is nilable +object+.
66
70
  # locale::
67
- # If the Member needs to complete an MFA step, and the Member has a phone number, this endpoint will pre-emptively send a one-time passcode (OTP) to the Member's phone number. The locale argument will be used to determine which language to use when sending the passcode.
71
+ # If the needs to complete an MFA step, and the Member has a phone number, this endpoint will pre-emptively send a one-time passcode (OTP) to the Member's phone number. The locale argument will be used to determine which language to use when sending the passcode.
68
72
  #
69
73
  # Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`.
70
74
  #
@@ -110,7 +114,7 @@ module StytchB2B
110
114
  # Information about the MFA requirements of the Organization and the Member's options for fulfilling MFA.
111
115
  # The type of this field is nilable +MfaRequired+ (+object+).
112
116
  # primary_required::
113
- # (no documentation yet)
117
+ # Information about the primary authentication requirements of the Organization.
114
118
  # The type of this field is nilable +PrimaryRequired+ (+object+).
115
119
  def exchange(
116
120
  intermediate_session_token:,
@@ -139,14 +143,14 @@ module StytchB2B
139
143
  @connection = connection
140
144
  end
141
145
 
142
- # If an end user does not want to join any already-existing Organization, or has no possible Organizations to join, this endpoint can be used to create a new
146
+ # If an end user does not want to join any already-existing, or has no possible Organizations to join, this endpoint can be used to create a new
143
147
  # [Organization](https://stytch.com/docs/b2b/api/organization-object) and [Member](https://stytch.com/docs/b2b/api/member-object).
144
148
  #
145
149
  # This operation consumes the Intermediate Session.
146
150
  #
147
151
  # This endpoint will also create an initial Member Session for the newly created Member.
148
152
  #
149
- # The Member created by this endpoint will automatically be granted the `stytch_admin` Role. See the
153
+ # The created by this endpoint will automatically be granted the `stytch_admin` Role. See the
150
154
  # [RBAC guide](https://stytch.com/docs/b2b/guides/rbac/stytch-default) for more details on this Role.
151
155
  #
152
156
  # If the new Organization is created with a `mfa_policy` of `REQUIRED_FOR_ALL`, the newly created Member will need to complete an MFA step to log in to the Organization.
@@ -263,6 +267,17 @@ module StytchB2B
263
267
  # The list's accepted values are: `sms_otp` and `totp`.
264
268
  #
265
269
  # The type of this field is nilable list of +String+.
270
+ # oauth_tenant_jit_provisioning::
271
+ # The authentication setting that controls how a new Member can JIT provision into an organization by tenant. The accepted values are:
272
+ #
273
+ # `RESTRICTED` – only new Members with tenants in `allowed_oauth_tenants` can JIT provision via tenant.
274
+ #
275
+ # `NOT_ALLOWED` – disable JIT provisioning by OAuth Tenant.
276
+ #
277
+ # The type of this field is nilable +String+.
278
+ # allowed_oauth_tenants::
279
+ # A map of allowed OAuth tenants. If this field is not passed in, the Organization will not allow JIT provisioning by OAuth Tenant. Allowed keys are "slack" and "hubspot".
280
+ # The type of this field is nilable +object+.
266
281
  #
267
282
  # == Returns:
268
283
  # An object with the following fields:
@@ -300,7 +315,7 @@ module StytchB2B
300
315
  # Information about the MFA requirements of the Organization and the Member's options for fulfilling MFA.
301
316
  # The type of this field is nilable +MfaRequired+ (+object+).
302
317
  # primary_required::
303
- # (no documentation yet)
318
+ # Information about the primary authentication requirements of the Organization.
304
319
  # The type of this field is nilable +PrimaryRequired+ (+object+).
305
320
  def create(
306
321
  intermediate_session_token:,
@@ -319,7 +334,9 @@ module StytchB2B
319
334
  mfa_policy: nil,
320
335
  rbac_email_implicit_role_assignments: nil,
321
336
  mfa_methods: nil,
322
- allowed_mfa_methods: nil
337
+ allowed_mfa_methods: nil,
338
+ oauth_tenant_jit_provisioning: nil,
339
+ allowed_oauth_tenants: nil
323
340
  )
324
341
  headers = {}
325
342
  request = {
@@ -341,6 +358,8 @@ module StytchB2B
341
358
  request[:rbac_email_implicit_role_assignments] = rbac_email_implicit_role_assignments unless rbac_email_implicit_role_assignments.nil?
342
359
  request[:mfa_methods] = mfa_methods unless mfa_methods.nil?
343
360
  request[:allowed_mfa_methods] = allowed_mfa_methods unless allowed_mfa_methods.nil?
361
+ request[:oauth_tenant_jit_provisioning] = oauth_tenant_jit_provisioning unless oauth_tenant_jit_provisioning.nil?
362
+ request[:allowed_oauth_tenants] = allowed_oauth_tenants unless allowed_oauth_tenants.nil?
344
363
 
345
364
  post_request('/v1/b2b/discovery/organizations/create', request, headers)
346
365
  end
@@ -20,10 +20,10 @@ module StytchB2B
20
20
  @discovery = StytchB2B::MagicLinks::Discovery.new(@connection)
21
21
  end
22
22
 
23
- # Authenticate a Member with a Magic Link. This endpoint requires a Magic Link token that is not expired or previously used. If the Member’s status is `pending` or `invited`, they will be updated to `active`.
23
+ # Authenticate a with a Magic Link. This endpoint requires a Magic Link token that is not expired or previously used. If the Member’s status is `pending` or `invited`, they will be updated to `active`.
24
24
  # Provide the `session_duration_minutes` parameter to set the lifetime of the session. If the `session_duration_minutes` parameter is not specified, a Stytch session will be created with a 60 minute duration.
25
25
  #
26
- # If the Member is required to complete MFA to log in to the Organization, the returned value of `member_authenticated` will be `false`, and an `intermediate_session_token` will be returned.
26
+ # If the Member is required to complete MFA to log in to the, the returned value of `member_authenticated` will be `false`, and an `intermediate_session_token` will be returned.
27
27
  # The `intermediate_session_token` can be passed into the [OTP SMS Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-otp-sms), [TOTP Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-totp),
28
28
  # or [Recovery Codes Recover endpoint](https://stytch.com/docs/b2b/api/recovery-codes-recover) to complete the MFA step and acquire a full member session.
29
29
  # The `intermediate_session_token` can also be used with the [Exchange Intermediate Session endpoint](https://stytch.com/docs/b2b/api/exchange-intermediate-session) or the [Create Organization via Discovery endpoint](https://stytch.com/docs/b2b/api/create-organization-via-discovery) to join a different Organization or create a new one.
@@ -67,7 +67,7 @@ module StytchB2B
67
67
  # Total custom claims size cannot exceed four kilobytes.
68
68
  # The type of this field is nilable +object+.
69
69
  # locale::
70
- # If the Member needs to complete an MFA step, and the Member has a phone number, this endpoint will pre-emptively send a one-time passcode (OTP) to the Member's phone number. The locale argument will be used to determine which language to use when sending the passcode.
70
+ # If the needs to complete an MFA step, and the Member has a phone number, this endpoint will pre-emptively send a one-time passcode (OTP) to the Member's phone number. The locale argument will be used to determine which language to use when sending the passcode.
71
71
  #
72
72
  # Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`.
73
73
  #
@@ -107,9 +107,6 @@ module StytchB2B
107
107
  # session_jwt::
108
108
  # The JSON Web Token (JWT) for a given Stytch Session.
109
109
  # The type of this field is +String+.
110
- # member_session::
111
- # The [Session object](https://stytch.com/docs/b2b/api/session-object).
112
- # The type of this field is +MemberSession+ (+object+).
113
110
  # organization::
114
111
  # The [Organization object](https://stytch.com/docs/b2b/api/organization-object).
115
112
  # The type of this field is +Organization+ (+object+).
@@ -122,6 +119,9 @@ module StytchB2B
122
119
  # status_code::
123
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.
124
121
  # The type of this field is +Integer+.
122
+ # member_session::
123
+ # The [Session object](https://stytch.com/docs/b2b/api/session-object).
124
+ # The type of this field is nilable +MemberSession+ (+object+).
125
125
  # mfa_required::
126
126
  # Information about the MFA requirements of the Organization and the Member's options for fulfilling MFA.
127
127
  # The type of this field is nilable +MfaRequired+ (+object+).
@@ -265,7 +265,7 @@ module StytchB2B
265
265
  post_request('/v1/b2b/magic_links/email/login_or_signup', request, headers)
266
266
  end
267
267
 
268
- # Send an invite email to a new Member to join an Organization. The Member will be created with an `invited` status until they successfully authenticate. Sending invites to `pending` Members will update their status to `invited`. Sending invites to already `active` Members will return an error.
268
+ # Send an invite email to a new to join an. The Member will be created with an `invited` status until they successfully authenticate. Sending invites to `pending` Members will update their status to `invited`. Sending invites to already `active` Members will return an error.
269
269
  #
270
270
  # The magic link invite will be valid for 1 week.
271
271
  #
@@ -19,15 +19,18 @@ module StytchB2B
19
19
  @discovery = StytchB2B::OAuth::Discovery.new(@connection)
20
20
  end
21
21
 
22
- # Authenticate a Member given a `token`. This endpoint verifies that the member completed the OAuth flow by verifying that the token is valid and hasn't expired. Provide the `session_duration_minutes` parameter to set the lifetime of the session. If the `session_duration_minutes` parameter is not specified, a Stytch session will be created with a 60 minute duration.
22
+ # Authenticate a given a `token`. This endpoint verifies that the member completed the flow by verifying that the token is valid and hasn't expired. Provide the `session_duration_minutes` parameter to set the lifetime of the session. If the `session_duration_minutes` parameter is not specified, a Stytch session will be created with a 60 minute duration.
23
23
  #
24
- # If the Member is required to complete MFA to log in to the Organization, the returned value of `member_authenticated` will be `false`, and an `intermediate_session_token` will be returned.
24
+ # If the Member is required to complete MFA to log in to the, the returned value of `member_authenticated` will be `false`, and an `intermediate_session_token` will be returned.
25
25
  # The `intermediate_session_token` can be passed into the [OTP SMS Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-otp-sms) to complete the MFA step and acquire a full member session.
26
26
  # The `intermediate_session_token` can also be used with the [Exchange Intermediate Session endpoint](https://stytch.com/docs/b2b/api/exchange-intermediate-session) or the [Create Organization via Discovery endpoint](https://stytch.com/docs/b2b/api/create-organization-via-discovery) to join a different Organization or create a new one.
27
27
  # The `session_duration_minutes` and `session_custom_claims` parameters will be ignored.
28
28
  #
29
29
  # If a valid `session_token` or `session_jwt` is passed in, the Member will not be required to complete an MFA step.
30
30
  #
31
+ # If the Member is logging in via an OAuth provider that does not fully verify the email, the returned value of `member_authenticated` will be `false`, and an `intermediate_session_token` will be returned.
32
+ # The `primary_required` field details the authentication flow the Member must perform in order to [complete a step-up authentication](https://stytch.com/docs/b2b/guides/oauth/auth-flows) into the organization. The `intermediate_session_token` must be passed into that authentication flow.
33
+ #
31
34
  # We’re actively accepting requests for new OAuth providers! Please [email us](mailto:support@stytch.com) or [post in our community](https://stytch.com/docs/b2b/resources) if you are looking for an OAuth provider that is not currently supported.
32
35
  #
33
36
  # == Parameters:
@@ -62,7 +65,7 @@ module StytchB2B
62
65
  # A base64url encoded one time secret used to validate that the request starts and ends on the same device.
63
66
  # The type of this field is nilable +String+.
64
67
  # locale::
65
- # If the Member needs to complete an MFA step, and the Member has a phone number, this endpoint will pre-emptively send a one-time passcode (OTP) to the Member's phone number. The locale argument will be used to determine which language to use when sending the passcode.
68
+ # If the needs to complete an MFA step, and the Member has a phone number, this endpoint will pre-emptively send a one-time passcode (OTP) to the Member's phone number. The locale argument will be used to determine which language to use when sending the passcode.
66
69
  #
67
70
  # Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`.
68
71
  #
@@ -128,7 +131,7 @@ module StytchB2B
128
131
  # Information about the MFA requirements of the Organization and the Member's options for fulfilling MFA.
129
132
  # The type of this field is nilable +MfaRequired+ (+object+).
130
133
  # primary_required::
131
- # (no documentation yet)
134
+ # Information about the primary authentication requirements of the Organization.
132
135
  # The type of this field is nilable +PrimaryRequired+ (+object+).
133
136
  def authenticate(
134
137
  oauth_token:,
@@ -162,7 +165,7 @@ module StytchB2B
162
165
  @connection = connection
163
166
  end
164
167
 
165
- # Authenticates the Discovery OAuth token and exchanges it for an Intermediate Session Token. Intermediate Session Tokens can be used for various Discovery login flows and are valid for 10 minutes.
168
+ # Authenticates the Discovery token and exchanges it for an Intermediate Session Token. Intermediate Session Tokens can be used for various Discovery login flows and are valid for 10 minutes.
166
169
  #
167
170
  # == Parameters:
168
171
  # discovery_oauth_token::
@@ -57,7 +57,7 @@ module StytchB2B
57
57
  @members = StytchB2B::Organizations::Members.new(@connection)
58
58
  end
59
59
 
60
- # Creates an Organization. An `organization_name` and a unique `organization_slug` are required.
60
+ # Creates an. An `organization_name` and a unique `organization_slug` are required.
61
61
  #
62
62
  # By default, `email_invites` and `sso_jit_provisioning` will be set to `ALL_ALLOWED`, and `mfa_policy` will be set to `OPTIONAL` if no Organization authentication settings are explicitly defined in the request.
63
63
  #
@@ -150,6 +150,17 @@ module StytchB2B
150
150
  # The list's accepted values are: `sms_otp` and `totp`.
151
151
  #
152
152
  # The type of this field is nilable list of +String+.
153
+ # oauth_tenant_jit_provisioning::
154
+ # The authentication setting that controls how a new Member can JIT provision into an organization by tenant. The accepted values are:
155
+ #
156
+ # `RESTRICTED` – only new Members with tenants in `allowed_oauth_tenants` can JIT provision via tenant.
157
+ #
158
+ # `NOT_ALLOWED` – disable JIT provisioning by OAuth Tenant.
159
+ #
160
+ # The type of this field is nilable +String+.
161
+ # allowed_oauth_tenants::
162
+ # A map of allowed OAuth tenants. If this field is not passed in, the Organization will not allow JIT provisioning by OAuth Tenant. Allowed keys are "slack" and "hubspot".
163
+ # The type of this field is nilable +object+.
153
164
  #
154
165
  # == Returns:
155
166
  # An object with the following fields:
@@ -176,7 +187,9 @@ module StytchB2B
176
187
  mfa_policy: nil,
177
188
  rbac_email_implicit_role_assignments: nil,
178
189
  mfa_methods: nil,
179
- allowed_mfa_methods: nil
190
+ allowed_mfa_methods: nil,
191
+ oauth_tenant_jit_provisioning: nil,
192
+ allowed_oauth_tenants: nil
180
193
  )
181
194
  headers = {}
182
195
  request = {
@@ -195,11 +208,13 @@ module StytchB2B
195
208
  request[:rbac_email_implicit_role_assignments] = rbac_email_implicit_role_assignments unless rbac_email_implicit_role_assignments.nil?
196
209
  request[:mfa_methods] = mfa_methods unless mfa_methods.nil?
197
210
  request[:allowed_mfa_methods] = allowed_mfa_methods unless allowed_mfa_methods.nil?
211
+ request[:oauth_tenant_jit_provisioning] = oauth_tenant_jit_provisioning unless oauth_tenant_jit_provisioning.nil?
212
+ request[:allowed_oauth_tenants] = allowed_oauth_tenants unless allowed_oauth_tenants.nil?
198
213
 
199
214
  post_request('/v1/b2b/organizations', request, headers)
200
215
  end
201
216
 
202
- # Returns an Organization specified by `organization_id`.
217
+ # Returns an specified by `organization_id`.
203
218
  #
204
219
  # == Parameters:
205
220
  # organization_id::
@@ -226,7 +241,7 @@ module StytchB2B
226
241
  get_request(request, headers)
227
242
  end
228
243
 
229
- # Updates an Organization specified by `organization_id`. An Organization must always have at least one auth setting set to either `RESTRICTED` or `ALL_ALLOWED` in order to provision new Members.
244
+ # Updates an specified by `organization_id`. An Organization must always have at least one auth setting set to either `RESTRICTED` or `ALL_ALLOWED` in order to provision new Members.
230
245
  #
231
246
  # *See the [Organization authentication settings](https://stytch.com/docs/b2b/api/org-auth-settings) resource to learn more about fields like `email_jit_provisioning`, `email_invites`, `sso_jit_provisioning`, etc., and their behaviors.
232
247
  #
@@ -359,6 +374,21 @@ module StytchB2B
359
374
  #
360
375
  # If this field is provided and a session header is passed into the request, the Member Session must have permission to perform the `update.settings.allowed-mfa-methods` action on the `stytch.organization` Resource.
361
376
  # The type of this field is nilable list of +String+.
377
+ # oauth_tenant_jit_provisioning::
378
+ # The authentication setting that controls how a new Member can JIT provision into an organization by tenant. The accepted values are:
379
+ #
380
+ # `RESTRICTED` – only new Members with tenants in `allowed_oauth_tenants` can JIT provision via tenant.
381
+ #
382
+ # `NOT_ALLOWED` – disable JIT provisioning by OAuth Tenant.
383
+ #
384
+ #
385
+ # If this field is provided and a session header is passed into the request, the Member Session must have permission to perform the `update.settings.oauth-tenant-jit-provisioning` action on the `stytch.organization` Resource.
386
+ # The type of this field is nilable +String+.
387
+ # allowed_oauth_tenants::
388
+ # A map of allowed OAuth tenants. If this field is not passed in, the Organization will not allow JIT provisioning by OAuth Tenant. Allowed keys are "slack" and "hubspot".
389
+ #
390
+ # If this field is provided and a session header is passed into the request, the Member Session must have permission to perform the `update.settings.allowed-oauth-tenants` action on the `stytch.organization` Resource.
391
+ # The type of this field is nilable +object+.
362
392
  #
363
393
  # == Returns:
364
394
  # An object with the following fields:
@@ -392,6 +422,8 @@ module StytchB2B
392
422
  rbac_email_implicit_role_assignments: nil,
393
423
  mfa_methods: nil,
394
424
  allowed_mfa_methods: nil,
425
+ oauth_tenant_jit_provisioning: nil,
426
+ allowed_oauth_tenants: nil,
395
427
  method_options: nil
396
428
  )
397
429
  headers = {}
@@ -413,11 +445,13 @@ module StytchB2B
413
445
  request[:rbac_email_implicit_role_assignments] = rbac_email_implicit_role_assignments unless rbac_email_implicit_role_assignments.nil?
414
446
  request[:mfa_methods] = mfa_methods unless mfa_methods.nil?
415
447
  request[:allowed_mfa_methods] = allowed_mfa_methods unless allowed_mfa_methods.nil?
448
+ request[:oauth_tenant_jit_provisioning] = oauth_tenant_jit_provisioning unless oauth_tenant_jit_provisioning.nil?
449
+ request[:allowed_oauth_tenants] = allowed_oauth_tenants unless allowed_oauth_tenants.nil?
416
450
 
417
451
  put_request("/v1/b2b/organizations/#{organization_id}", request, headers)
418
452
  end
419
453
 
420
- # Deletes an Organization specified by `organization_id`. All Members of the Organization will also be deleted.
454
+ # Deletes an specified by `organization_id`. All Members of the Organization will also be deleted.
421
455
  #
422
456
  # == Parameters:
423
457
  # organization_id::
@@ -678,7 +712,7 @@ module StytchB2B
678
712
  @oauth_providers = StytchB2B::Organizations::Members::OAuthProviders.new(@connection)
679
713
  end
680
714
 
681
- # Updates a Member specified by `organization_id` and `member_id`.
715
+ # Updates a specified by `organization_id` and `member_id`.
682
716
  #
683
717
  # == Parameters:
684
718
  # organization_id::
@@ -801,7 +835,7 @@ module StytchB2B
801
835
  put_request("/v1/b2b/organizations/#{organization_id}/members/#{member_id}", request, headers)
802
836
  end
803
837
 
804
- # Deletes a Member specified by `organization_id` and `member_id`.
838
+ # Deletes a specified by `organization_id` and `member_id`.
805
839
  #
806
840
  # == Parameters:
807
841
  # organization_id::
@@ -835,7 +869,7 @@ module StytchB2B
835
869
  delete_request("/v1/b2b/organizations/#{organization_id}/members/#{member_id}", headers)
836
870
  end
837
871
 
838
- # Reactivates a deleted Member's status and its associated email status (if applicable) to active, specified by `organization_id` and `member_id`.
872
+ # Reactivates a deleted's status and its associated email status (if applicable) to active, specified by `organization_id` and `member_id`. This endpoint will only work for Members with at least one verified email where their `email_address_verified` is `true`.
839
873
  #
840
874
  # == Parameters:
841
875
  # organization_id::
@@ -877,7 +911,7 @@ module StytchB2B
877
911
  put_request("/v1/b2b/organizations/#{organization_id}/members/#{member_id}/reactivate", request, headers)
878
912
  end
879
913
 
880
- # Delete a Member's MFA phone number.
914
+ # Delete a's MFA phone number.
881
915
  #
882
916
  # To change a Member's phone number, you must first call this endpoint to delete the existing phone number.
883
917
  #
@@ -1024,7 +1058,7 @@ module StytchB2B
1024
1058
  post_request('/v1/b2b/organizations/members/search', request, headers)
1025
1059
  end
1026
1060
 
1027
- # Delete a Member's password.
1061
+ # Delete a's password.
1028
1062
  #
1029
1063
  # == Parameters:
1030
1064
  # organization_id::
@@ -1097,7 +1131,7 @@ module StytchB2B
1097
1131
  get_request(request, headers)
1098
1132
  end
1099
1133
 
1100
- # Unlinks a retired email address from a Member specified by their `organization_id` and `member_id`. The email address
1134
+ # Unlinks a retired email address from a specified by their `organization_id` and `member_id`. The email address
1101
1135
  # to be retired can be identified in the request body by either its `email_id`, its `email_address`, or both. If using
1102
1136
  # both identifiers they must refer to the same email.
1103
1137
  #
@@ -1165,7 +1199,7 @@ module StytchB2B
1165
1199
  post_request("/v1/b2b/organizations/#{organization_id}/members/#{member_id}/unlink_retired_email", request, headers)
1166
1200
  end
1167
1201
 
1168
- # Creates a Member. An `organization_id` and `email_address` are required.
1202
+ # Creates a. An `organization_id` and `email_address` are required.
1169
1203
  #
1170
1204
  # == Parameters:
1171
1205
  # organization_id::
@@ -26,7 +26,7 @@ module StytchB2B
26
26
  @connection = connection
27
27
  end
28
28
 
29
- # Send a One-Time Passcode (OTP) to a Member's phone number.
29
+ # Send a One-Time Passcode (OTP) to a's phone number.
30
30
  #
31
31
  # If the Member already has a phone number, the `mfa_phone_number` field is not needed; the endpoint will send an OTP to the number associated with the Member.
32
32
  # If the Member does not have a phone number, the endpoint will send an OTP to the `mfa_phone_number` provided and link the `mfa_phone_number` with the Member.
@@ -125,7 +125,7 @@ module StytchB2B
125
125
  # such as [email magic link authenticate](https://stytch.com/docs/b2b/api/authenticate-magic-link),
126
126
  # or upon successful calls to discovery authenticate methods, such as [email magic link discovery authenticate](https://stytch.com/docs/b2b/api/authenticate-discovery-magic-link).
127
127
  #
128
- # If the Organization's MFA policy is `REQUIRED_FOR_ALL`, a successful OTP authentication will change the Member's `mfa_enrolled` status to `true` if it is not already `true`.
128
+ # If the's MFA policy is `REQUIRED_FOR_ALL`, a successful OTP authentication will change the's `mfa_enrolled` status to `true` if it is not already `true`.
129
129
  # If the Organization's MFA policy is `OPTIONAL`, the Member's MFA enrollment can be toggled by passing in a value for the `set_mfa_enrollment` field.
130
130
  # The Member's MFA enrollment can also be toggled through the [Update Member](https://stytch.com/docs/b2b/api/update-member) endpoint.
131
131
  #
@@ -99,7 +99,7 @@ module StytchB2B
99
99
  # The password hash. For a Scrypt or PBKDF2 hash, the hash needs to be a base64 encoded string.
100
100
  # The type of this field is +String+.
101
101
  # hash_type::
102
- # The password hash used. Currently `bcrypt`, `scrypt`, `argon2i`, `argon2id`, `md_5`, `sha_1`, and `pbkdf_2` are supported.
102
+ # The password hash used. Currently `bcrypt`, `scrypt`, `argon_2i`, `argon2_id`, `md_5`, `sha_1`, and `pbkdf_2` are supported.
103
103
  # The type of this field is +MigrateRequestHashType+ (string enum).
104
104
  # organization_id::
105
105
  # 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.
@@ -207,7 +207,7 @@ module StytchB2B
207
207
  #
208
208
  # If you have breach detection during authentication enabled in your [password strength policy](https://stytch.com/docs/b2b/guides/passwords/strength-policies) and the member's credentials have appeared in the HaveIBeenPwned dataset, this endpoint will return a `member_reset_password` error even if the member enters a correct password. We force a password reset in this case to ensure that the member is the legitimate owner of the email address and not a malicious actor abusing the compromised credentials.
209
209
  #
210
- # If the Member is required to complete MFA to log in to the Organization, the returned value of `member_authenticated` will be `false`, and an `intermediate_session_token` will be returned.
210
+ # If the is required to complete MFA to log in to the, the returned value of `member_authenticated` will be `false`, and an `intermediate_session_token` will be returned.
211
211
  # The `intermediate_session_token` can be passed into the [OTP SMS Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-otp-sms) to complete the MFA step and acquire a full member session.
212
212
  # The `session_duration_minutes` and `session_custom_claims` parameters will be ignored.
213
213
  #
@@ -248,7 +248,7 @@ module StytchB2B
248
248
  # Total custom claims size cannot exceed four kilobytes.
249
249
  # The type of this field is nilable +object+.
250
250
  # locale::
251
- # If the Member needs to complete an MFA step, and the Member has a phone number, this endpoint will pre-emptively send a one-time passcode (OTP) to the Member's phone number. The locale argument will be used to determine which language to use when sending the passcode.
251
+ # If the needs to complete an MFA step, and the Member has a phone number, this endpoint will pre-emptively send a one-time passcode (OTP) to the Member's phone number. The locale argument will be used to determine which language to use when sending the passcode.
252
252
  #
253
253
  # Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`.
254
254
  #
@@ -419,7 +419,7 @@ module StytchB2B
419
419
  post_request('/v1/b2b/passwords/email/reset/start', request, headers)
420
420
  end
421
421
 
422
- # Reset the member's password and authenticate them. This endpoint checks that the password reset token is valid, hasn’t expired, or already been used.
422
+ # Reset the's password and authenticate them. This endpoint checks that the password reset token is valid, hasn’t expired, or already been used.
423
423
  #
424
424
  # The provided password needs to meet our password strength requirements, which can be checked in advance with the password strength endpoint. If the token and password are accepted, the password is securely stored for future authentication and the user is authenticated.
425
425
  #
@@ -470,7 +470,7 @@ module StytchB2B
470
470
  # Total custom claims size cannot exceed four kilobytes.
471
471
  # The type of this field is nilable +object+.
472
472
  # locale::
473
- # If the Member needs to complete an MFA step, and the Member has a phone number, this endpoint will pre-emptively send a one-time passcode (OTP) to the Member's phone number. The locale argument will be used to determine which language to use when sending the passcode.
473
+ # If the needs to complete an MFA step, and the Member has a phone number, this endpoint will pre-emptively send a one-time passcode (OTP) to the Member's phone number. The locale argument will be used to determine which language to use when sending the passcode.
474
474
  #
475
475
  # Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`.
476
476
  #
@@ -550,6 +550,21 @@ module StytchB2B
550
550
 
551
551
  post_request('/v1/b2b/passwords/email/reset', request, headers)
552
552
  end
553
+
554
+ def delete(
555
+ email_address:,
556
+ organization_id: nil,
557
+ member_id: nil
558
+ )
559
+ headers = {}
560
+ request = {
561
+ email_address: email_address
562
+ }
563
+ request[:organization_id] = organization_id unless organization_id.nil?
564
+ request[:member_id] = member_id unless member_id.nil?
565
+
566
+ post_request('/v1/b2b/passwords/email/delete', request, headers)
567
+ end
553
568
  end
554
569
 
555
570
  class Sessions
@@ -559,7 +574,7 @@ module StytchB2B
559
574
  @connection = connection
560
575
  end
561
576
 
562
- # Reset the Member's password using their existing session. The endpoint will error if the session does not contain an authentication factor that has been issued within the last 5 minutes. Either `session_token` or `session_jwt` should be provided.
577
+ # Reset the's password using their existing session. The endpoint will error if the session does not contain an authentication factor that has been issued within the last 5 minutes. Either `session_token` or `session_jwt` should be provided.
563
578
  #
564
579
  # Note that a successful password reset via an existing session will revoke all active sessions for the `member_id`, except for the one used during the reset flow.
565
580
  #
@@ -669,7 +684,7 @@ module StytchB2B
669
684
  @connection = connection
670
685
  end
671
686
 
672
- # Reset the member’s password using their existing password.
687
+ # Reset the’s password using their existing password.
673
688
  #
674
689
  # This endpoint adapts to your Project's password strength configuration.
675
690
  # If you're using [zxcvbn](https://stytch.com/docs/guides/passwords/strength-policy), the default, your passwords are considered valid
@@ -723,7 +738,7 @@ module StytchB2B
723
738
  # Total custom claims size cannot exceed four kilobytes.
724
739
  # The type of this field is nilable +object+.
725
740
  # locale::
726
- # If the Member needs to complete an MFA step, and the Member has a phone number, this endpoint will pre-emptively send a one-time passcode (OTP) to the Member's phone number. The locale argument will be used to determine which language to use when sending the passcode.
741
+ # If the needs to complete an MFA step, and the Member has a phone number, this endpoint will pre-emptively send a one-time passcode (OTP) to the Member's phone number. The locale argument will be used to determine which language to use when sending the passcode.
727
742
  #
728
743
  # Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`.
729
744
  #
@@ -16,7 +16,7 @@ module StytchB2B
16
16
  @connection = connection
17
17
  end
18
18
 
19
- # Allows a Member to complete an MFA flow by consuming a recovery code. This consumes the recovery code and returns a session token that can be used to authenticate the Member.
19
+ # Allows a to complete an MFA flow by consuming a recovery code. This consumes the recovery code and returns a session token that can be used to authenticate the Member.
20
20
  #
21
21
  # == Parameters:
22
22
  # organization_id::
@@ -110,7 +110,7 @@ module StytchB2B
110
110
  post_request('/v1/b2b/recovery_codes/recover', request, headers)
111
111
  end
112
112
 
113
- # Returns a Member's full set of active recovery codes.
113
+ # Returns a's full set of active recovery codes.
114
114
  #
115
115
  # == Parameters:
116
116
  # organization_id::
@@ -150,7 +150,7 @@ module StytchB2B
150
150
  get_request(request, headers)
151
151
  end
152
152
 
153
- # Rotate a Member's recovery codes. This invalidates all existing recovery codes and generates a new set of recovery codes.
153
+ # Rotate a's recovery codes. This invalidates all existing recovery codes and generates a new set of recovery codes.
154
154
  #
155
155
  # == Parameters:
156
156
  # organization_id::
@@ -194,7 +194,7 @@ module StytchB2B
194
194
  # (no documentation yet)
195
195
  # The type of this field is nilable +UpdateRequestIdentityProvider+ (string enum).
196
196
  # scim_group_implicit_role_assignments::
197
- # An array of SCIM group implicit role assignments. Each object in the array must contain a `group` and a `role_id`.
197
+ # An array of SCIM group implicit role assignments. Each object in the array must contain a `group_id` and a `role_id`.
198
198
  # The type of this field is nilable list of +SCIMGroupImplicitRoleAssignments+.
199
199
  #
200
200
  # == Returns:
@@ -460,7 +460,7 @@ module StytchB2B
460
460
  post_request("/v1/b2b/scim/#{organization_id}/connection", request, headers)
461
461
  end
462
462
 
463
- # Get SCIM Connections.
463
+ # Get SCIM Connection.
464
464
  #
465
465
  # == Parameters:
466
466
  # organization_id::
@@ -91,7 +91,7 @@ module StytchB2B
91
91
  #
92
92
  # You may provide a JWT that needs to be refreshed and is expired according to its `exp` claim. A new JWT will be returned if both the signature and the underlying Session are still valid. See our [How to use Stytch Session JWTs](https://stytch.com/docs/b2b/guides/sessions/resources/using-jwts) guide for more information.
93
93
  #
94
- # If an `authorization_check` object is passed in, this method will also check if the Member is authorized to perform the given action on the given Resource in the specified Organization. A Member is authorized if their Member Session contains a Role, assigned [explicitly or implicitly](https://stytch.com/docs/b2b/guides/rbac/role-assignment), with adequate permissions.
94
+ # If an `authorization_check` object is passed in, this method will also check if the Member is authorized to perform the given action on the given Resource in the specified. A is authorized if their Member Session contains a Role, assigned [explicitly or implicitly](https://stytch.com/docs/b2b/guides/rbac/role-assignment), with adequate permissions.
95
95
  # In addition, the `organization_id` passed in the authorization check must match the Member's Organization.
96
96
  #
97
97
  # If the Member is not authorized to perform the specified action on the specified Resource, or if the
@@ -229,13 +229,14 @@ module StytchB2B
229
229
  post_request('/v1/b2b/sessions/revoke', request, headers)
230
230
  end
231
231
 
232
- # Use this endpoint to exchange a Member's existing session for another session in a different Organization. This can be used to accept an invite, but not to create a new member via domain matching.
232
+ # Use this endpoint to exchange a's existing session for another session in a different. This can be used to accept an invite, but not to create a new member via domain matching.
233
233
  #
234
234
  # To create a new member via domain matching, use the [Exchange Intermediate Session](https://stytch.com/docs/b2b/api/exchange-intermediate-session) flow instead.
235
235
  #
236
236
  # Only Email Magic Link, OAuth, and SMS OTP factors can be transferred between sessions. Other authentication factors, such as password factors, will not be transferred to the new session.
237
237
  # Any OAuth Tokens owned by the Member will not be transferred to the new Organization.
238
238
  # SMS OTP factors can be used to fulfill MFA requirements for the target Organization if both the original and target Member have the same phone number and the phone number is verified for both Members.
239
+ # HubSpot and Slack OAuth registrations will not be transferred between sessions. Instead, you will receive a corresponding factor with type `"oauth_exchange_slack"` or `"oauth_exchange_hubspot"`
239
240
  #
240
241
  # If the Member is required to complete MFA to log in to the Organization, the returned value of `member_authenticated` will be `false`, and an `intermediate_session_token` will be returned.
241
242
  # The `intermediate_session_token` can be passed into the [OTP SMS Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-otp-sms) to complete the MFA step and acquire a full member session.
@@ -271,7 +272,7 @@ module StytchB2B
271
272
  # Total custom claims size cannot exceed four kilobytes.
272
273
  # The type of this field is nilable +object+.
273
274
  # locale::
274
- # If the Member needs to complete an MFA step, and the Member has a phone number, this endpoint will pre-emptively send a one-time passcode (OTP) to the Member's phone number. The locale argument will be used to determine which language to use when sending the passcode.
275
+ # If the needs to complete an MFA step, and the Member has a phone number, this endpoint will pre-emptively send a one-time passcode (OTP) to the Member's phone number. The locale argument will be used to determine which language to use when sending the passcode.
275
276
  #
276
277
  # Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`.
277
278
  #
@@ -340,7 +341,7 @@ module StytchB2B
340
341
  post_request('/v1/b2b/sessions/exchange', request, headers)
341
342
  end
342
343
 
343
- # Migrate a session from an external OIDC compliant endpoint. Stytch will call the external UserInfo endpoint defined in your Stytch Project settings in the [Dashboard](/dashboard), and then perform a lookup using the `session_token`. If the response contains a valid email address, Stytch will attempt to match that email address with an existing Member in your Organization and create a Stytch Session. You will need to create the member before using this endpoint.
344
+ # Migrate a session from an external OIDC compliant endpoint. Stytch will call the external UserInfo endpoint defined in your Stytch Project settings in the [Dashboard](/dashboard), and then perform a lookup using the `session_token`. If the response contains a valid email address, Stytch will attempt to match that email address with an existing in your and create a Stytch Session. You will need to create the member before using this endpoint.
344
345
  #
345
346
  # == Parameters:
346
347
  # session_token::
@@ -136,7 +136,7 @@ module StytchB2B
136
136
  # If the `session_duration_minutes` parameter is not specified, a Stytch session will be created with a 60 minute duration.
137
137
  # To link this authentication event to an existing Stytch session, include either the `session_token` or `session_jwt` param.
138
138
  #
139
- # If the Member is required to complete MFA to log in to the Organization, the returned value of `member_authenticated` will be `false`, and an `intermediate_session_token` will be returned.
139
+ # If the is required to complete MFA to log in to the, the returned value of `member_authenticated` will be `false`, and an `intermediate_session_token` will be returned.
140
140
  # The `intermediate_session_token` can be passed into the [OTP SMS Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-otp-sms), [TOTP Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-totp),
141
141
  # or [Recovery Codes Recover endpoint](https://stytch.com/docs/b2b/api/recovery-codes-recover) to complete the MFA step and acquire a full member session.
142
142
  # The `session_duration_minutes` and `session_custom_claims` parameters will be ignored.
@@ -175,7 +175,7 @@ module StytchB2B
175
175
  # Total custom claims size cannot exceed four kilobytes.
176
176
  # The type of this field is nilable +object+.
177
177
  # locale::
178
- # If the Member needs to complete an MFA step, and the Member has a phone number, this endpoint will pre-emptively send a one-time passcode (OTP) to the Member's phone number. The locale argument will be used to determine which language to use when sending the passcode.
178
+ # If the needs to complete an MFA step, and the Member has a phone number, this endpoint will pre-emptively send a one-time passcode (OTP) to the Member's phone number. The locale argument will be used to determine which language to use when sending the passcode.
179
179
  #
180
180
  # Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`.
181
181
  #
@@ -16,7 +16,7 @@ module StytchB2B
16
16
  @connection = connection
17
17
  end
18
18
 
19
- # Create a new TOTP instance for a Member. The Member can use the authenticator application of their choice to scan the QR code or enter the secret.
19
+ # Create a new TOTP instance for a. The Member can use the authenticator application of their choice to scan the QR code or enter the secret.
20
20
  #
21
21
  # Passing an intermediate session token, session token, or session JWT is not required, but if passed must match the Member ID passed.
22
22
  #
@@ -196,7 +196,7 @@ module StytchB2B
196
196
  post_request('/v1/b2b/totp/authenticate', request, headers)
197
197
  end
198
198
 
199
- # Migrate an existing TOTP instance for a Member. Recovery codes are not required and will be minted for the Member if not provided.
199
+ # Migrate an existing TOTP instance for a. Recovery codes are not required and will be minted for the Member if not provided.
200
200
  #
201
201
  # == Parameters:
202
202
  # organization_id::
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Stytch
4
- VERSION = '9.4.0'
4
+ VERSION = '9.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: 9.4.0
4
+ version: 9.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-08-01 00:00:00.000000000 Z
11
+ date: 2024-09-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday