Skip to content

Commit

Permalink
chore: move type
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielRivers committed Jan 10, 2025
1 parent 38b6234 commit db4bc45
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
15 changes: 1 addition & 14 deletions lib/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
Kindem2mTokenProhibitedClaims,
} from "./prohibitedClaims.ts";
import {
createKindeAPIOptions,
KindeAPIRequest,
KindeDesignerCustomProperties,
KindeFetchOptions,
Expand Down Expand Up @@ -250,20 +251,6 @@ export async function fetch<T = any>(
} as T;
}

type createKindeAPIOptions =
| {
clientId: string;
clientSecret: string;
clientIdKey: never;
clientSecretKey: never;
}
| {
clientIdKey: string;
clientSecretKey: string;
clientId: never;
clientSecret: never;
};

/**
* create a Kinde API client
* @param baseURL Base URL of the Kinde API
Expand Down
14 changes: 14 additions & 0 deletions lib/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,3 +155,17 @@ export type KindeDesignerCustomProperties = {
};

export type OrgCode = `org_${string}`;

export type createKindeAPIOptions =
| {
clientId: string;
clientSecret: string;
clientIdKey: never;
clientSecretKey: never;
}
| {
clientIdKey: string;
clientSecretKey: string;
clientId: never;
clientSecret: never;
};

0 comments on commit db4bc45

Please sign in to comment.