Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new verified fields to the Member object and refresh docs #245

Merged
merged 2 commits into from
Aug 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions dist/b2b/discovery_intermediate_sessions.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dist/b2b/discovery_organizations.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dist/b2b/magic_links.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dist/b2b/oauth.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions dist/b2b/organizations_members.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 21 additions & 6 deletions dist/b2b/otp_sms.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dist/b2b/passwords.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dist/b2b/passwords_email.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dist/b2b/passwords_existing_password.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dist/b2b/sessions.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dist/b2b/sso.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 2 additions & 5 deletions lib/b2b/discovery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,9 @@ export interface DiscoveredOrganization {
organization?: Organization;
// Information about the membership.
membership?: Membership;
// (Coming Soon) Information about the primary authentication requirements of the Organization.
// Information about the primary authentication requirements of the Organization.
primary_required?: PrimaryRequired;
/**
* (Coming Soon) Information about the MFA requirements of the Organization and the Member's options for
* fulfilling MFA.
*/
// Information about the MFA requirements of the Organization and the Member's options for fulfilling MFA.
mfa_required?: MfaRequired;
}

Expand Down
20 changes: 10 additions & 10 deletions lib/b2b/discovery_intermediate_sessions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ export interface B2BDiscoveryIntermediateSessionsExchangeRequest {
*/
session_custom_claims?: Record<string, any>; // eslint-disable-line @typescript-eslint/no-explicit-any
/**
* (Coming Soon) 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.
* 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.
*
* Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/),
* e.g. `"en"`.
Expand Down Expand Up @@ -88,7 +88,10 @@ export interface B2BDiscoveryIntermediateSessionsExchangeResponse {
session_token: string;
// The JSON Web Token (JWT) for a given Stytch Session.
session_jwt: string;
// The [Member object](https://stytch.com/docs/b2b/api/member-object).
/**
* The [Member object](https://stytch.com/docs/b2b/api/member-object) if one already exists, or null if one
* does not.
*/
member: Member;
// The [Organization object](https://stytch.com/docs/b2b/api/organization-object).
organization: Organization;
Expand Down Expand Up @@ -117,10 +120,7 @@ export interface B2BDiscoveryIntermediateSessionsExchangeResponse {
status_code: number;
// The [Session object](https://stytch.com/docs/b2b/api/session-object).
member_session?: MemberSession;
/**
* (Coming Soon) Information about the MFA requirements of the Organization and the Member's options for
* fulfilling MFA.
*/
// Information about the MFA requirements of the Organization and the Member's options for fulfilling MFA.
mfa_required?: MfaRequired;
}

Expand All @@ -139,8 +139,8 @@ export class IntermediateSessions {
*
* This endpoint can be used to accept invites and create new members via domain matching.
*
* (Coming Soon) If the Member is required to complete MFA to log in to the Organization, the returned
* value of `member_authenticated` will be `false`.
* If the Member is required to complete MFA to log in to the Organization, the returned value of
* `member_authenticated` will be `false`.
* The `intermediate_session_token` will not be consumed and instead will be returned in the response.
* 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
Expand Down
17 changes: 8 additions & 9 deletions lib/b2b/discovery_organizations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,7 @@ export interface B2BDiscoveryOrganizationsCreateRequest {
*/
allowed_auth_methods?: string[];
/**
* (Coming Soon) The setting that controls the MFA policy for all Members in the Organization. The accepted
* values are:
* The setting that controls the MFA policy for all Members in the Organization. The accepted values are:
*
* `REQUIRED_FOR_ALL` – All Members within the Organization will be required to complete MFA every time
* they wish to log in.
Expand All @@ -166,7 +165,10 @@ export interface B2BDiscoveryOrganizationsCreateResponse {
session_token: string;
// The JSON Web Token (JWT) for a given Stytch Session.
session_jwt: string;
// The [Member object](https://stytch.com/docs/b2b/api/member-object).
/**
* The [Member object](https://stytch.com/docs/b2b/api/member-object) if one already exists, or null if one
* does not.
*/
member: Member;
/**
* Indicates whether the Member is fully authenticated. If false, the Member needs to complete an MFA step
Expand Down Expand Up @@ -195,10 +197,7 @@ export interface B2BDiscoveryOrganizationsCreateResponse {
member_session?: MemberSession;
// The [Organization object](https://stytch.com/docs/b2b/api/organization-object).
organization?: Organization;
/**
* (Coming Soon) Information about the MFA requirements of the Organization and the Member's options for
* fulfilling MFA.
*/
// Information about the MFA requirements of the Organization and the Member's options for fulfilling MFA.
mfa_required?: MfaRequired;
}

Expand Down Expand Up @@ -282,8 +281,8 @@ export class Organizations {
*
* This endpoint can also be used to start an initial session for the newly created member and organization.
*
* (Coming Soon) 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.
* 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.
* The `intermediate_session_token` will not be consumed and instead will be returned in the response.
* 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
Expand Down
20 changes: 10 additions & 10 deletions lib/b2b/magic_links.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ export interface B2BMagicLinksAuthenticateRequest {
*/
session_custom_claims?: Record<string, any>; // eslint-disable-line @typescript-eslint/no-explicit-any
/**
* (Coming Soon) 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.
* 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.
*
* Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/),
* e.g. `"en"`.
Expand Down Expand Up @@ -102,7 +102,10 @@ export interface B2BMagicLinksAuthenticateResponse {
* perform operations on an Organization, so be sure to preserve this value.
*/
organization_id: string;
// The [Member object](https://stytch.com/docs/b2b/api/member-object).
/**
* The [Member object](https://stytch.com/docs/b2b/api/member-object) if one already exists, or null if one
* does not.
*/
member: Member;
// A secret token for a given Stytch Session.
session_token: string;
Expand Down Expand Up @@ -135,10 +138,7 @@ export interface B2BMagicLinksAuthenticateResponse {
* 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors.
*/
status_code: number;
/**
* (Coming Soon) Information about the MFA requirements of the Organization and the Member's options for
* fulfilling MFA.
*/
// Information about the MFA requirements of the Organization and the Member's options for fulfilling MFA.
mfa_required?: MfaRequired;
}

Expand All @@ -160,8 +160,8 @@ export class MagicLinks {
* `session_duration_minutes` parameter is not specified, a Stytch session will be created with a 60 minute
* duration.
*
* (Coming Soon) 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.
* 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.
* 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.
Expand Down
Loading
Loading