-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: setup docasaurus * chore: docusaurus needs this static folder to run correctly * chore: change port * chore: decent condition * chore: set gitRevision to always be main to reduce changes in docs * chore: init adding version param * Revert "chore: init adding version param" This reverts commit 25fba47. * Release sdk 2.15.0 🚀 (#84) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Release sdk-react-provider 0.3.0 🚀 (#83) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Release customer 0.1.0 🚀 (#81) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * feat: setup docasaurus * chore: decent condition * docs: add pre-push generate docs * docs: add pre-push generate docs * docs: adjust links in READMEs * docs: adjust index * docs: adjust landing page, add gh page deploy * docs: rename to developer * docs: rename tools to packages * docs: update lockfile * docs: update gitignore * docs: add static * docs: skip commit if there is nothing to commit * docs: skip commit if there is nothing to commit * docs: trigger change * docs: add correct out * docs: set correct docusaurus build folder * docs: add baseUrl for project * docs: switch illustrations * docs: only run the doc deploy step on main --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
a64fff5
commit 3ff670c
Showing
176 changed files
with
8,494 additions
and
1,815 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 |
---|---|---|
|
@@ -51,6 +51,30 @@ jobs: | |
- name: Build | ||
run: pnpm build | ||
|
||
- name: Generate Documentation | ||
if: github.ref == 'refs/heads/main' | ||
run: pnpm run generate-docs | ||
|
||
- name: Commit and Push Documentation | ||
if: github.ref == 'refs/heads/main' | ||
run: | | ||
git config --global user.name "GitHub Actions" | ||
git config --global user.email "[email protected]" | ||
git add ./apps/developer/docs/packages/ | ||
if [ -n "$(git status --porcelain)" ]; then | ||
git commit -m "docs: update generated documentation" | ||
git push | ||
else | ||
echo "No changes to commit" | ||
fi | ||
- name: Deploy to GitHub Pages | ||
uses: peaceiris/actions-gh-pages@v4 | ||
if: github.ref == 'refs/heads/main' | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./apps/developer/build | ||
|
||
- name: Test | ||
run: pnpm test | ||
|
||
|
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 |
---|---|---|
|
@@ -27,6 +27,7 @@ out/ | |
build | ||
dist | ||
static | ||
!apps/developer/static | ||
|
||
# Debug | ||
npm-debug.log* | ||
|
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 @@ | ||
pnpm run generate-docs |
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,20 @@ | ||
# Dependencies | ||
/node_modules | ||
|
||
# Production | ||
/build | ||
|
||
# Generated files | ||
.docusaurus | ||
.cache-loader | ||
|
||
# Misc | ||
.DS_Store | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* |
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,41 @@ | ||
# Website | ||
|
||
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator. | ||
|
||
### Installation | ||
|
||
``` | ||
$ yarn | ||
``` | ||
|
||
### Local Development | ||
|
||
``` | ||
$ yarn start | ||
``` | ||
|
||
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server. | ||
|
||
### Build | ||
|
||
``` | ||
$ yarn build | ||
``` | ||
|
||
This command generates static content into the `build` directory and can be served using any static contents hosting service. | ||
|
||
### Deployment | ||
|
||
Using SSH: | ||
|
||
``` | ||
$ USE_SSH=true yarn deploy | ||
``` | ||
|
||
Not using SSH: | ||
|
||
``` | ||
$ GIT_USER=<Your GitHub username> yarn deploy | ||
``` | ||
|
||
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch. |
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,3 @@ | ||
module.exports = { | ||
presets: [require.resolve('@docusaurus/core/lib/babel/preset')], | ||
}; |
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 @@ | ||
# Welcome |
37 changes: 37 additions & 0 deletions
37
apps/developer/docs/packages/SDK React Provider/functions/MoneriumProvider.md
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,37 @@ | ||
# Function: MoneriumProvider() | ||
|
||
> **MoneriumProvider**(`params`): `Element` | ||
## Parameters | ||
|
||
• **params** | ||
|
||
• **params.children**: `ReactNode` | ||
|
||
Rest of the application. | ||
|
||
• **params.clientId**: `string` | ||
|
||
Monerium auth flow client id. | ||
|
||
• **params.environment?**: `"sandbox"` \| `"production"` = `'sandbox'` | ||
|
||
Monerium environment. | ||
|
||
• **params.redirectUri**: `string` | ||
|
||
Monerium auth flow redirect url. | ||
|
||
• **params.redirectUrl?**: `string` | ||
|
||
**Deprecated** | ||
|
||
use redirectUri | ||
|
||
## Returns | ||
|
||
`Element` | ||
|
||
## Defined in | ||
|
||
[provider.tsx:19](https://github.com/monerium/js-monorepo/blob/main/packages/sdk-react-provider/src/lib/provider.tsx#L19) |
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
42 changes: 42 additions & 0 deletions
42
apps/developer/docs/packages/SDK React Provider/functions/useAuthContext.md
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,42 @@ | ||
# Function: useAuthContext() | ||
|
||
> **useAuthContext**(`params`?): [`QueryResult`](/docs/packages/SDK%20React%20Provider/type-aliases/QueryResult.md)\<`"authContext"`, `AuthContext`\> | ||
# Get the authentication context. | ||
|
||
## Parameters | ||
|
||
• **params?** = `{}` | ||
|
||
No required parameters. | ||
|
||
• **params.query?**: [`QueryOptions`](/docs/packages/SDK%20React%20Provider/type-aliases/QueryOptions.md)\<`AuthContext`\> | ||
|
||
See [Tanstack Query - useQuery](https://tanstack.com/query/latest/docs/framework/react/reference/useQuery) options. | ||
|
||
## Returns | ||
|
||
[`QueryResult`](/docs/packages/SDK%20React%20Provider/type-aliases/QueryResult.md)\<`"authContext"`, `AuthContext`\> | ||
|
||
## Example | ||
|
||
```ts | ||
const { | ||
authContext, // useQuery's `data` property | ||
isLoading, | ||
isError, | ||
error, | ||
refetch, | ||
...moreUseQueryResults | ||
} = useAuthContext(); | ||
``` | ||
|
||
## See | ||
|
||
[API Documentation](https://monerium.dev/api-docs#operation/auth-context) | ||
|
||
[AuthContext interface](/docs/packages/SDK/interfaces/AuthContext.md) | ||
|
||
## Defined in | ||
|
||
[hooks.tsx:125](https://github.com/monerium/js-monorepo/blob/main/packages/sdk-react-provider/src/lib/hooks.tsx#L125) |
46 changes: 46 additions & 0 deletions
46
apps/developer/docs/packages/SDK React Provider/functions/useBalances.md
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,46 @@ | ||
# Function: useBalances() | ||
|
||
> **useBalances**(`params`?): [`QueryResult`](/docs/packages/SDK%20React%20Provider/type-aliases/QueryResult.md)\<`"balances"`, `Balances`[]\> | ||
# Get balances | ||
|
||
## Parameters | ||
|
||
• **params?** = `{}` | ||
|
||
No required parameters. | ||
|
||
• **params.profileId?**: `string` | ||
|
||
Fetch balances for a specific profile. | ||
|
||
• **params.query?**: [`QueryOptions`](/docs/packages/SDK%20React%20Provider/type-aliases/QueryOptions.md)\<`Balances`[]\> | ||
|
||
See [Tanstack Query - useQuery](https://tanstack.com/query/latest/docs/framework/react/reference/useQuery) options. | ||
|
||
## Returns | ||
|
||
[`QueryResult`](/docs/packages/SDK%20React%20Provider/type-aliases/QueryResult.md)\<`"balances"`, `Balances`[]\> | ||
|
||
## Example | ||
|
||
```ts | ||
const { | ||
balances, // useQuery's `data` property | ||
isLoading, | ||
isError, | ||
error, | ||
refetch, | ||
...moreUseQueryResults | ||
} = useBalances(); | ||
``` | ||
|
||
## See | ||
|
||
[API Documentation](https://monerium.dev/api-docs#operation/profile-balances) | ||
|
||
[Balances interface](/docs/packages/SDK/interfaces/Balances.md) | ||
|
||
## Defined in | ||
|
||
[hooks.tsx:337](https://github.com/monerium/js-monorepo/blob/main/packages/sdk-react-provider/src/lib/hooks.tsx#L337) |
45 changes: 45 additions & 0 deletions
45
apps/developer/docs/packages/SDK React Provider/functions/useLinkAddress.md
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,45 @@ | ||
# Function: useLinkAddress() | ||
|
||
> **useLinkAddress**(`param`): [`MutationResult`](/docs/packages/SDK%20React%20Provider/type-aliases/MutationResult.md)\<`"linkAddress"`, `LinkedAddress`, `Error`, `LinkAddress`\> | ||
# Add address to profile. | ||
When the address has been linked, the relevant profile query will be invalidated and re-fetched. | ||
|
||
## Parameters | ||
|
||
• **param** | ||
|
||
• **param.mutation?**: [`MutationOptions`](/docs/packages/SDK%20React%20Provider/type-aliases/MutationOptions.md)\<`LinkedAddress`, `Error`, `LinkAddress`\> | ||
|
||
See [Tanstack Query - useMutation](https://tanstack.com/query/latest/docs/framework/react/reference/useMutation) options. | ||
|
||
• **param.profileId**: `string` | ||
|
||
Which profile to link the address. | ||
|
||
## Returns | ||
|
||
[`MutationResult`](/docs/packages/SDK%20React%20Provider/type-aliases/MutationResult.md)\<`"linkAddress"`, `LinkedAddress`, `Error`, `LinkAddress`\> | ||
|
||
## Example | ||
|
||
```ts | ||
const { | ||
linkAddress, // useMutation's `mutateAsync` property | ||
isPending, | ||
isError, | ||
error, | ||
status, | ||
...moreUseMutationResults | ||
} = useLinkAddress(); | ||
``` | ||
|
||
## See | ||
|
||
[API Documentation](https://monerium.dev/api-docs#operation/profile-addresses) | ||
|
||
[LinkAddress interface](/docs/packages/SDK/interfaces/LinkAddress.md) | ||
|
||
## Defined in | ||
|
||
[hooks.tsx:594](https://github.com/monerium/js-monorepo/blob/main/packages/sdk-react-provider/src/lib/hooks.tsx#L594) |
44 changes: 44 additions & 0 deletions
44
apps/developer/docs/packages/SDK React Provider/functions/useOrder.md
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,44 @@ | ||
# Function: useOrder() | ||
|
||
> **useOrder**(`params`): [`QueryResult`](/docs/packages/SDK%20React%20Provider/type-aliases/QueryResult.md)\<`"order"`, `Order`\> | ||
# Get single order | ||
|
||
## Parameters | ||
|
||
• **params** | ||
|
||
• **params.orderId**: `string` | ||
|
||
The id of the order. | ||
|
||
• **params.query?**: [`QueryOptions`](/docs/packages/SDK%20React%20Provider/type-aliases/QueryOptions.md)\<`Order`\> = `{}` | ||
|
||
See [Tanstack Query - useQuery](https://tanstack.com/query/latest/docs/framework/react/reference/useQuery) options. | ||
|
||
## Returns | ||
|
||
[`QueryResult`](/docs/packages/SDK%20React%20Provider/type-aliases/QueryResult.md)\<`"order"`, `Order`\> | ||
|
||
## Example | ||
|
||
```ts | ||
const { | ||
order, // useQuery's `data` property | ||
isLoading, | ||
isError, | ||
error, | ||
refetch, | ||
...moreUseQueryResults | ||
} = useOrder(); | ||
``` | ||
|
||
## See | ||
|
||
[API Documentation](https://monerium.dev/api-docs#operation/order) | ||
|
||
[Order interface](/docs/packages/SDK/interfaces/Order.md) | ||
|
||
## Defined in | ||
|
||
[hooks.tsx:389](https://github.com/monerium/js-monorepo/blob/main/packages/sdk-react-provider/src/lib/hooks.tsx#L389) |
Oops, something went wrong.