Skip to content

Commit

Permalink
feat: setup docasaurus
Browse files Browse the repository at this point in the history
  • Loading branch information
einaralex committed Aug 7, 2024
1 parent ffeefd2 commit 0b85433
Show file tree
Hide file tree
Showing 208 changed files with 10,974 additions and 3,576 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ The pipeline will automatically publish the following packages if there are chan

#### Useful links

[Release please - Github action](https://github.com/marketplace/actions/release-please-action)</br>
[Release please - Github action](https://github.com/marketplace/actions/release-please-action)

[Release please - Config file options](https://github.com/googleapis/release-please/blob/main/docs/manifest-releaser.md#configfile)

### Remote Caching
Expand Down
20 changes: 20 additions & 0 deletions apps/docs/.gitignore
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*
41 changes: 41 additions & 0 deletions apps/docs/README.md
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.
3 changes: 3 additions & 0 deletions apps/docs/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
};
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
[**Monerium SDK React Provider v0.2.0**](Packages.md)**Docs**

***

[Monerium Packages](../Packages.md) / Monerium SDK React Provider

# Monerium SDK React Provider

## Provider
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
[**Monerium SDK React Provider v0.2.0**](../Packages.md)**Docs**

***

[Monerium Packages](../../Packages.md) / [Monerium SDK React Provider](../Monerium%20SDK%20React%20Provider.md) / OrderState

# Enumeration: OrderState

## Enumeration Members

### pending

> **pending**: `"pending"`
#### Defined in

sdk/dist/index.d.ts:195

***

### placed

> **placed**: `"placed"`
#### Defined in

sdk/dist/index.d.ts:194

***

### processed

> **processed**: `"processed"`
#### Defined in

sdk/dist/index.d.ts:196

***

### rejected

> **rejected**: `"rejected"`
#### Defined in

sdk/dist/index.d.ts:197
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
[**Monerium SDK React Provider v0.2.0**](../Packages.md)**Docs**

***

[Monerium Packages](../../Packages.md) / [Monerium SDK React Provider](../Monerium%20SDK%20React%20Provider.md) / MoneriumProvider

# 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

[sdk-react-provider/src/lib/provider.tsx:19](https://github.com/monerium/js-monorepo/blob/ffeefd2a9bccc0d18acecd9390a7bfced5720c17/packages/sdk-react-provider/src/lib/provider.tsx#L19)
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
[Monerium SDK React Provider](../README.md) / useAuth
[**Monerium SDK React Provider v0.2.0**](../Packages.md)**Docs**

***

[Monerium Packages](../../Packages.md) / [Monerium SDK React Provider](../Monerium%20SDK%20React%20Provider.md) / useAuth

# Function: useAuth()

Expand All @@ -10,7 +14,7 @@

[`UseAuthReturn`](../type-aliases/UseAuthReturn.md)

- `authorize` - Redirects to the Monerium auth flow.
- `authorize` - Redirects to the Monerium auth flow.
- `isAuthorized` - Whether the user is authorized.
- `isLoading` - Whether the auth flow is loading.
- `error` - Error message if the auth flow fails.
Expand All @@ -23,8 +27,11 @@
const { authorize, isAuthorized, isLoading, error } = useAuth();

authorize(); // Redirects to the Monerium auth flow.

// To opt-in to automated wallet linking, pass the address, signature and chain.
authorize({ address, signature, chain }).
```

## Defined in

[sdk-react-provider/src/lib/hooks.tsx:82](https://github.com/monerium/js-monorepo/blob/ae1055c12538e860127a655bc059162d414323b3/packages/sdk-react-provider/src/lib/hooks.tsx#L82)
[sdk-react-provider/src/lib/hooks.tsx:85](https://github.com/monerium/js-monorepo/blob/ffeefd2a9bccc0d18acecd9390a7bfced5720c17/packages/sdk-react-provider/src/lib/hooks.tsx#L85)
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
[**Monerium SDK React Provider v0.2.0**](../Packages.md)**Docs**

***

[Monerium Packages](../../Packages.md) / [Monerium SDK React Provider](../Monerium%20SDK%20React%20Provider.md) / useAuthContext

# Function: useAuthContext()

> **useAuthContext**(`params`?): [`QueryResult`](../type-aliases/QueryResult.md)\<`"authContext"`, [`AuthContext`](../interfaces/AuthContext.md)\>
# Get the authentication context.

## Parameters

**params?** = `{}`

No required parameters.

**params.query?**: [`QueryOptions`](../type-aliases/QueryOptions.md)\<[`AuthContext`](../interfaces/AuthContext.md)\>

See [Tanstack Query - useQuery](https://tanstack.com/query/latest/docs/framework/react/reference/useQuery) options.

## Returns

[`QueryResult`](../type-aliases/QueryResult.md)\<`"authContext"`, [`AuthContext`](../interfaces/AuthContext.md)\>

## 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](https://github.com/monerium/js-monorepo/blob/main/packages/sdk/docs/generated/interfaces/AuthContext.md)

## Defined in

[sdk-react-provider/src/lib/hooks.tsx:125](https://github.com/monerium/js-monorepo/blob/ffeefd2a9bccc0d18acecd9390a7bfced5720c17/packages/sdk-react-provider/src/lib/hooks.tsx#L125)
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
[**Monerium SDK React Provider v0.2.0**](../Packages.md)**Docs**

***

[Monerium Packages](../../Packages.md) / [Monerium SDK React Provider](../Monerium%20SDK%20React%20Provider.md) / useBalances

# Function: useBalances()

> **useBalances**(`params`?): [`QueryResult`](../type-aliases/QueryResult.md)\<`"balances"`, [`Balances`](../interfaces/Balances.md)[]\>
# Get balances

## Parameters

**params?** = `{}`

No required parameters.

**params.profileId?**: `string`

Fetch balances for a specific profile.

**params.query?**: [`QueryOptions`](../type-aliases/QueryOptions.md)\<[`Balances`](../interfaces/Balances.md)[]\>

See [Tanstack Query - useQuery](https://tanstack.com/query/latest/docs/framework/react/reference/useQuery) options.

## Returns

[`QueryResult`](../type-aliases/QueryResult.md)\<`"balances"`, [`Balances`](../interfaces/Balances.md)[]\>

## 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](https://github.com/monerium/js-monorepo/blob/main/packages/sdk/docs/generated/interfaces/Balances.md)

## Defined in

[sdk-react-provider/src/lib/hooks.tsx:337](https://github.com/monerium/js-monorepo/blob/ffeefd2a9bccc0d18acecd9390a7bfced5720c17/packages/sdk-react-provider/src/lib/hooks.tsx#L337)
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
[**Monerium SDK React Provider v0.2.0**](../Packages.md)**Docs**

***

[Monerium Packages](../../Packages.md) / [Monerium SDK React Provider](../Monerium%20SDK%20React%20Provider.md) / useLinkAddress

# Function: useLinkAddress()

> **useLinkAddress**(`param`): [`MutationResult`](../type-aliases/MutationResult.md)\<`"linkAddress"`, `LinkedAddress`, `Error`, [`LinkAddress`](../interfaces/LinkAddress.md)\>
# 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`](../type-aliases/MutationOptions.md)\<`LinkedAddress`, `Error`, [`LinkAddress`](../interfaces/LinkAddress.md)\>

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`](../type-aliases/MutationResult.md)\<`"linkAddress"`, `LinkedAddress`, `Error`, [`LinkAddress`](../interfaces/LinkAddress.md)\>

## 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](https://github.com/monerium/js-monorepo/blob/main/packages/sdk/docs/generated/interfaces/LinkAddress.md)

## Defined in

[sdk-react-provider/src/lib/hooks.tsx:594](https://github.com/monerium/js-monorepo/blob/ffeefd2a9bccc0d18acecd9390a7bfced5720c17/packages/sdk-react-provider/src/lib/hooks.tsx#L594)
Loading

0 comments on commit 0b85433

Please sign in to comment.