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 DFP endpoints #348

Merged
merged 5 commits into from
Jan 6, 2025
Merged
Show file tree
Hide file tree
Changes from 4 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
2 changes: 2 additions & 0 deletions dist/b2b/client.js

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

3 changes: 2 additions & 1 deletion dist/b2b/rbac.js

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

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

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

2 changes: 2 additions & 0 deletions dist/b2c/client.js

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

23 changes: 23 additions & 0 deletions dist/b2c/fraud.js

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

60 changes: 60 additions & 0 deletions dist/b2c/fraud_fingerprint.js

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

51 changes: 51 additions & 0 deletions dist/b2c/fraud_rules.js

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

8 changes: 4 additions & 4 deletions dist/b2c/sessions.js

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

4 changes: 4 additions & 0 deletions dist/shared/client.js

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

5 changes: 3 additions & 2 deletions dist/shared/envs.js

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

3 changes: 2 additions & 1 deletion dist/shared/index.js

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

3 changes: 3 additions & 0 deletions lib/b2b/client.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as jose from "jose";
import { BaseClient, ClientConfig } from "../shared/client";
import { Discovery } from "./discovery";
import { Fraud } from "../b2c/fraud";
import { JwtConfig } from "../shared/sessions";
import { M2M } from "../b2c/m2m";
import { MagicLinks } from "./magic_links";
Expand All @@ -20,6 +21,7 @@ import { TOTPs } from "./totps";
export class B2BClient extends BaseClient {
protected jwtConfig: JwtConfig;
discovery: Discovery;
fraud: Fraud;
m2m: M2M;
magicLinks: MagicLinks;
oauth: OAuth;
Expand Down Expand Up @@ -52,6 +54,7 @@ export class B2BClient extends BaseClient {
const policyCache = new PolicyCache(new RBAC(this.fetchConfig));

this.discovery = new Discovery(this.fetchConfig);
this.fraud = new Fraud(this.fetchConfig);
this.m2m = new M2M(this.fetchConfig, this.jwtConfig);
this.magicLinks = new MagicLinks(this.fetchConfig);
this.oauth = new OAuth(this.fetchConfig);
Expand Down
7 changes: 4 additions & 3 deletions lib/b2b/rbac.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ export interface B2BRBACPolicyResponse {
status_code: number;
/**
* The RBAC Policy document that contains all defined Roles and Resources – which are managed in the
* [Dashboard](/dashboard/rbac). Read more about these entities and how they work in our
* [RBAC overview](https://stytch.com/docs/b2b/guides/rbac/overview).
* [Dashboard](https://stytch.com/docs/dashboard/rbac). Read more about these entities and how they work in
* our [RBAC overview](https://stytch.com/docs/b2b/guides/rbac/overview).
*/
policy?: Policy;
}
Expand All @@ -168,7 +168,8 @@ export class RBAC {
* the need for an extra request to Stytch. The policy will be refreshed if an authorization check is
* requested and the RBAC policy was last updated more than 5 minutes ago.
*
* Resources and Roles can be created and managed within the [Dashboard](/dashboard/rbac). Additionally,
* Resources and Roles can be created and managed within the
* [Dashboard](https://stytch.com/docs/dashboard/rbac). Additionally,
* [Role assignment](https://stytch.com/docs/b2b/guides/rbac/role-assignment) can be programmatically
* managed through certain Stytch API endpoints.
*
Expand Down
8 changes: 4 additions & 4 deletions lib/b2b/sessions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -641,10 +641,10 @@ export class Sessions {

/**
* 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.
* endpoint defined in your Stytch Project settings in the [Dashboard](https://stytch.com/docs/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.
* @param data {@link B2BSessionsMigrateRequest}
* @returns {@link B2BSessionsMigrateResponse}
* @async
Expand Down
3 changes: 3 additions & 0 deletions lib/b2c/client.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as jose from "jose";
import { BaseClient, ClientConfig } from "../shared/client";
import { CryptoWallets } from "./crypto_wallets";
import { Fraud } from "./fraud";
import { JwtConfig } from "../shared/sessions";
import { M2M } from "./m2m";
import { MagicLinks } from "./magic_links";
Expand All @@ -16,6 +17,7 @@ import { WebAuthn } from "./webauthn";
export class Client extends BaseClient {
protected jwtConfig: JwtConfig;
cryptoWallets: CryptoWallets;
fraud: Fraud;
m2m: M2M;
magicLinks: MagicLinks;
oauth: OAuth;
Expand Down Expand Up @@ -43,6 +45,7 @@ export class Client extends BaseClient {
};

this.cryptoWallets = new CryptoWallets(this.fetchConfig);
this.fraud = new Fraud(this.fetchConfig);
this.m2m = new M2M(this.fetchConfig, this.jwtConfig);
this.magicLinks = new MagicLinks(this.fetchConfig);
this.oauth = new OAuth(this.fetchConfig);
Expand Down
Loading
Loading