-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4c7867d
commit a198864
Showing
47 changed files
with
119 additions
and
119 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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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
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
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
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
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
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
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
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
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
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
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
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
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 |
---|---|---|
@@ -0,0 +1,72 @@ | ||
--- | ||
title: "Faroe" | ||
--- | ||
|
||
# Faroe | ||
|
||
Represents a Faroe server client. | ||
|
||
Server errors are thrown as [`FaroeError`](/api-reference/sdk-js/main/FaroeError). The error code is available from `FaroeError.code`. See each method for a list of possible error codes. | ||
|
||
```ts | ||
import { Faroe, FaroeError } from "@faroe/sdk" | ||
|
||
const faroe = new Faroe(url, secret); | ||
|
||
try { | ||
await faroe.createUser(username, password, clientIP); | ||
} catch (e) { | ||
if (e instanceof FaroeError) { | ||
const errorCode = e.code; | ||
} | ||
} | ||
``` | ||
|
||
Errors caused by `fetch()` are wrapped as [`FaroeFetchError`](/api-reference/sdk-js/main/FaroeFetchError). | ||
|
||
## Constructor | ||
|
||
```ts | ||
function constructor(url: string, credential: string): this | ||
``` | ||
|
||
### Parameters | ||
|
||
- `url`: The base URL of the Faroe server (e.g. `https://your-domain.com`). | ||
- `credential`: The server credential. | ||
|
||
## Methods | ||
|
||
- [`authenticateWithPassword()`](/api-reference/sdk-js/main/Faroe/authenticateWithPassword) | ||
- [`createPasswordResetRequest()`](/api-reference/sdk-js/main/Faroe/createPasswordResetRequest) | ||
- [`createUser()`](/api-reference/sdk-js/main/Faroe/createUser) | ||
- [`createUserEmailVerificationRequest()`](/api-reference/sdk-js/main/Faroe/createUserEmailVerificationRequest) | ||
- [`deletePasswordResetRequest()`](/api-reference/sdk-js/main/Faroe/deletePasswordResetRequest) | ||
- [`deleteUser()`](/api-reference/sdk-js/main/Faroe/deleteUser) | ||
- [`deleteUserEmailUpdateRequests()`](/api-reference/sdk-js/main/Faroe/deleteUserEmailUpdateRequests) | ||
- [`deleteUserEmailVerificationRequest()`](/api-reference/sdk-js/main/Faroe/deleteUserEmailVerificationRequest) | ||
- [`deleteUserPasswordResetRequests()`](/api-reference/sdk-js/main/Faroe/deleteUserPasswordResetRequests) | ||
- [`deleteUserTOTPCredential()`](/api-reference/sdk-js/main/Faroe/deleteUserTOTPCredential) | ||
- [`getPasswordResetRequest()`](/api-reference/sdk-js/main/Faroe/getPasswordResetRequest) | ||
- [`getUser()`](/api-reference/sdk-js/main/Faroe/getUser) | ||
- [`getUserEmailUpdateRequests()`](/api-reference/sdk-js/main/Faroe/getUserEmailUpdateRequests) | ||
- [`getUserEmailVerificationRequest()`](/api-reference/sdk-js/main/Faroe/getUserEmailVerificationRequest) | ||
- [`getUserPasswordResetRequests()`](/api-reference/sdk-js/main/Faroe/getUserPasswordResetRequests) | ||
- [`getUsers()`](/api-reference/sdk-js/main/Faroe/getUsers) | ||
- [`getUserTOTPCredential()`](/api-reference/sdk-js/main/Faroe/getUserTOTPCredential) | ||
- [`regenerateUserRecoveryCode()`](/api-reference/sdk-js/main/Faroe/regenerateUserRecoveryCode) | ||
- [`registerUserTOTPCredential()`](/api-reference/sdk-js/main/Faroe/registerUserTOTPCredential) | ||
- [`resetUser2FA()`](/api-reference/sdk-js/main/Faroe/resetUser2FA) | ||
- [`resetUserPassword()`](/api-reference/sdk-js/main/Faroe/resetUserPassword) | ||
- [`updateUserPassword()`](/api-reference/sdk-js/main/Faroe/updateUserPassword) | ||
- [`verifyPasswordResetRequestEmail()`](/api-reference/sdk-js/main/Faroe/verifyPasswordResetRequestEmail) | ||
- [`verifyUser2FAWithTOTP()`](/api-reference/sdk-js/main/Faroe/verifyUser2FAWithTOTP) | ||
- [`verifyUserEmail()`](/api-reference/sdk-js/main/Faroe/verifyUserEmail) | ||
|
||
## Example | ||
|
||
```ts | ||
import { Faroe } from "@faroe/sdk" | ||
const faroe = new Faroe("https://your-domain.com", process.env.FAROE_CREDENTIAL); | ||
``` |
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
title: "@faroe/sdk" | ||
--- | ||
|
||
# @faroe/sdk | ||
|
||
## Functions | ||
|
||
- [`verifyEmailInput()`](/api-reference/sdk-js/main/verifyEmailInput) | ||
- [`verifyPasswordInput()`](/api-reference/sdk-js/main/verifyPasswordInput) | ||
|
||
## Classes | ||
|
||
- [`Faroe`](/api-reference/sdk-js/main/Faroe) | ||
- [`FaroeError`](/api-reference/sdk-js/main/FaroeError) | ||
- [`FaroeFetchError`](/api-reference/sdk-js/main/FaroeFetchError) | ||
|
||
## Interfaces | ||
|
||
- [`FaroeEmailUpdateRequest`](/api-reference/sdk-js/main/FaroeEmailUpdateRequest) | ||
- [`FaroePasswordResetRequest`](/api-reference/sdk-js/main/FaroePasswordResetRequest) | ||
- [`FaroeUserEmailVerificationRequest`](/api-reference/sdk-js/main/FaroeUserEmailVerificationRequest) | ||
- [`FaroeUserTOTPCredential`](/api-reference/sdk-js/main/FaroeUserTOTPCredential) | ||
- [`FaroeUser`](/api-reference/sdk-js/main/FaroeUser) | ||
- [`PaginationResult`](/api-reference/sdk-js/main/PaginationResult) | ||
|
||
## Enums | ||
|
||
- [`UserSortBy`](/api-reference/sdk-js/main/UserSortBy) | ||
- [`SortOrder`](/api-reference/sdk-js/main/SortOrder) |
File renamed without changes.
File renamed without changes.