forked from medusajs/medusa
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: generated tsdocs (medusajs#6352)
Generated TSDocs for the past release. Note: I haven't updated examples as the examples are for modules without a public reference yet, so the examples can wait.
- Loading branch information
1 parent
788c4a1
commit c86e27b
Showing
27 changed files
with
3,768 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,128 @@ | ||
import { BaseFilterable } from "../../dal" | ||
|
||
/** | ||
* @interface | ||
* | ||
* The auth user details. | ||
*/ | ||
export type AuthUserDTO = { | ||
/** | ||
* The ID of the auth user. | ||
*/ | ||
id: string | ||
|
||
/** | ||
* The provider of the auth user. | ||
*/ | ||
provider: string | ||
|
||
/** | ||
* The associated providers entity's ID. | ||
*/ | ||
entity_id: string | ||
|
||
/** | ||
* The scope of the auth user. | ||
*/ | ||
scope: string | ||
|
||
/** | ||
* The provider metadata of the auth user. | ||
*/ | ||
provider_metadata?: Record<string, unknown> | ||
|
||
/** | ||
* The user metadata of the auth user. | ||
*/ | ||
user_metadata: Record<string, unknown> | ||
|
||
/** | ||
* The app metadata of the auth user. | ||
*/ | ||
app_metadata: Record<string, unknown> | ||
} | ||
|
||
/** | ||
* @interface | ||
* | ||
* The auth user to be created. | ||
*/ | ||
export type CreateAuthUserDTO = { | ||
/** | ||
* The ID of the auth user. | ||
*/ | ||
id?: string | ||
|
||
/** | ||
* The provider of the auth user. | ||
*/ | ||
provider: string | ||
|
||
/** | ||
* The associated entity's ID. | ||
*/ | ||
entity_id: string | ||
|
||
/** | ||
* The scope of the auth user. | ||
*/ | ||
scope: string | ||
|
||
/** | ||
* The provider metadata of the auth user. | ||
*/ | ||
provider_metadata?: Record<string, unknown> | ||
|
||
/** | ||
* The user metadata of the auth user. | ||
*/ | ||
user_metadata?: Record<string, unknown> | ||
|
||
/** | ||
* The app metadata of the auth user. | ||
*/ | ||
app_metadata?: Record<string, unknown> | ||
} | ||
|
||
/** | ||
* @interface | ||
* | ||
* The attributes to update in the auth user. | ||
*/ | ||
export type UpdateAuthUserDTO = { | ||
/** | ||
* The ID of the auth user. | ||
*/ | ||
id: string | ||
|
||
/** | ||
* The provider metadata of the auth user. | ||
*/ | ||
provider_metadata?: Record<string, unknown> | ||
|
||
/** | ||
* The user metadata of the auth user. | ||
*/ | ||
user_metadata?: Record<string, unknown> | ||
|
||
/** | ||
* The app metadata of the auth user. | ||
*/ | ||
app_metadata?: Record<string, unknown> | ||
} | ||
|
||
/** | ||
* The filters to apply on the retrieved auth user. | ||
*/ | ||
export interface FilterableAuthUserProps | ||
extends BaseFilterable<FilterableAuthUserProps> { | ||
/** | ||
* The IDs to filter the auth user by. | ||
*/ | ||
id?: string[] | ||
|
||
/** | ||
* Filter the auth auth user by the associated provider(s). | ||
*/ | ||
provider?: string[] | string | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,88 @@ | ||
/** | ||
* @interface | ||
* | ||
* The details of the authentication response. | ||
*/ | ||
export type AuthenticationResponse = { | ||
/** | ||
* Whether the authentication was successful. | ||
*/ | ||
success: boolean | ||
|
||
/** | ||
* The authenticated user's details. The details shape | ||
* depends on the used provider ID. | ||
*/ | ||
authUser?: any | ||
|
||
/** | ||
* The error message, if an error occurs. | ||
*/ | ||
error?: string | ||
|
||
/** | ||
* Redirect location. Location takes precedence over success. | ||
*/ | ||
location?: string | ||
} | ||
|
||
/** | ||
* @interface | ||
* | ||
* Provider configuration for the Medusa auth module. | ||
*/ | ||
export type AuthModuleProviderConfig = { | ||
/** | ||
* Provider name | ||
*/ | ||
name: string | ||
|
||
/** | ||
* Scope configurations for the provider | ||
*/ | ||
scopes: Record<string, AuthProviderScope> | ||
} | ||
|
||
/** | ||
* @interface | ||
* | ||
* Configuration of a single provider scope | ||
*/ | ||
export type AuthProviderScope = Record<string, unknown> | ||
|
||
/** | ||
* @interface | ||
* | ||
* Input for authentication and callback validation methods. | ||
*/ | ||
export type AuthenticationInput = { | ||
/** | ||
* url of incoming authentication request. | ||
*/ | ||
url: string | ||
|
||
/** | ||
* Headers of incoming authentication request. | ||
*/ | ||
headers: Record<string, string> | ||
|
||
/** | ||
* Query params of incoming authentication request. | ||
*/ | ||
query: Record<string, string> | ||
|
||
/** | ||
* Body of incoming authentication request. | ||
*/ | ||
body: Record<string, string> | ||
|
||
/** | ||
* Scope for authentication request. | ||
*/ | ||
authScope: string | ||
|
||
/** | ||
* Protocol of incoming authentication request (For example, `https`). | ||
*/ | ||
protocol: string | ||
} |
Oops, something went wrong.