Skip to content

Commit

Permalink
chore: setup docusaurus
Browse files Browse the repository at this point in the history
Signed-off-by: andrei-zgirvaci <[email protected]>
  • Loading branch information
andrei-zgirvaci committed Apr 9, 2024
1 parent 6a1d355 commit 4539962
Show file tree
Hide file tree
Showing 37 changed files with 1,301 additions and 0 deletions.
Binary file modified bun.lockb
Binary file not shown.
20 changes: 20 additions & 0 deletions 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*
43 changes: 43 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Website

This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.

API docs are generated automatically using [docusaurus-plugin-typedoc](https://www.npmjs.com/package/docusaurus-plugin-typedoc). Typedoc entrypoints are loaded from [`entrypoints.json`](./entrypoints.json) via [`docusaurus.config.ts`](docusaurus.config.ts) and corresponding Markdown outputs are emitted to [`/docs/docs/api`](./docs/api). The [`/docs/docs/contributing.mdx`](/docs/docs/contributing.mdx) file is a wrapper that imports & renders root project's [`CONTRIBUTING.md`](/CONTRIBUTING.md) file to reduce redundancy. This `contributing.mdx` file - apart from functioning standalone - is processed by `typedoc-plugin-replace-text` to replace `CONTRIBUTING.md`'s relative links with Docusaurus docs files tree links.

### 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 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')],
};
1 change: 1 addition & 0 deletions docs/docs/api/_category_.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
label: "API"
2 changes: 2 additions & 0 deletions docs/docs/api/classes/_category_.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
label: "Classes"
position: 3
154 changes: 154 additions & 0 deletions docs/docs/api/classes/core_src.AuthModule.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
---
id: "core_src.AuthModule"
title: "Class: AuthModule<C>"
sidebar_label: "AuthModule"
custom_edit_url: null
---

[core/src](../modules/core_src.md).AuthModule

## Type parameters

| Name | Type |
| :------ | :------ |
| `C` | [`BaseAuthConfig`](../modules/core_src.md#baseauthconfig) |

## Constructors

### constructor

**new AuthModule**\<`C`\>(`moduleName`): [`AuthModule`](core_src.AuthModule.md)\<`C`\>

#### Type parameters

| Name | Type |
| :------ | :------ |
| `C` | [`BaseAuthConfig`](../modules/core_src.md#baseauthconfig) |

#### Parameters

| Name | Type |
| :------ | :------ |
| `moduleName` | `string` |

#### Returns

[`AuthModule`](core_src.AuthModule.md)\<`C`\>

#### Defined in

[core/src/AuthModule.ts:8](https://github.com/openmobilehub/rn-omh-auth/blob/b43af64eae277675f57051591f993f84fd70cd48/packages/core/src/AuthModule.ts#L8)

## Properties

### authNativeModule

**authNativeModule**: `any`

#### Defined in

[core/src/AuthModule.ts:6](https://github.com/openmobilehub/rn-omh-auth/blob/b43af64eae277675f57051591f993f84fd70cd48/packages/core/src/AuthModule.ts#L6)

## Methods

### getAccessToken

**getAccessToken**(): `Promise`\<`string`\>

#### Returns

`Promise`\<`string`\>

#### Defined in

[core/src/AuthModule.ts:26](https://github.com/openmobilehub/rn-omh-auth/blob/b43af64eae277675f57051591f993f84fd70cd48/packages/core/src/AuthModule.ts#L26)

___

### getUser

**getUser**(): `Promise`\<[`OmhUserProfile`](../modules/core_src.md#omhuserprofile)\>

#### Returns

`Promise`\<[`OmhUserProfile`](../modules/core_src.md#omhuserprofile)\>

#### Defined in

[core/src/AuthModule.ts:30](https://github.com/openmobilehub/rn-omh-auth/blob/b43af64eae277675f57051591f993f84fd70cd48/packages/core/src/AuthModule.ts#L30)

___

### initialize

**initialize**(`config`): `Promise`\<`void`\>

#### Parameters

| Name | Type |
| :------ | :------ |
| `config` | `C` |

#### Returns

`Promise`\<`void`\>

#### Defined in

[core/src/AuthModule.ts:18](https://github.com/openmobilehub/rn-omh-auth/blob/b43af64eae277675f57051591f993f84fd70cd48/packages/core/src/AuthModule.ts#L18)

___

### refreshAccessToken

**refreshAccessToken**(): `Promise`\<`string`\>

#### Returns

`Promise`\<`string`\>

#### Defined in

[core/src/AuthModule.ts:34](https://github.com/openmobilehub/rn-omh-auth/blob/b43af64eae277675f57051591f993f84fd70cd48/packages/core/src/AuthModule.ts#L34)

___

### revokeAccessToken

**revokeAccessToken**(): `Promise`\<`void`\>

#### Returns

`Promise`\<`void`\>

#### Defined in

[core/src/AuthModule.ts:38](https://github.com/openmobilehub/rn-omh-auth/blob/b43af64eae277675f57051591f993f84fd70cd48/packages/core/src/AuthModule.ts#L38)

___

### signIn

**signIn**(): `Promise`\<`void`\>

#### Returns

`Promise`\<`void`\>

#### Defined in

[core/src/AuthModule.ts:22](https://github.com/openmobilehub/rn-omh-auth/blob/b43af64eae277675f57051591f993f84fd70cd48/packages/core/src/AuthModule.ts#L22)

___

### signOut

**signOut**(): `Promise`\<`void`\>

#### Returns

`Promise`\<`void`\>

#### Defined in

[core/src/AuthModule.ts:42](https://github.com/openmobilehub/rn-omh-auth/blob/b43af64eae277675f57051591f993f84fd70cd48/packages/core/src/AuthModule.ts#L42)
32 changes: 32 additions & 0 deletions docs/docs/api/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
id: "index"
title: "react-native-omh-auth"
sidebar_label: "Readme"
sidebar_position: 0
custom_edit_url: null
---

# React Native OMH Auth

React Native OMH Auth Core package

## Installation

```bash
npm install --save @omh/react-native-auth-core
npm install --save @omh/react-native-auth-plugin-...
```

## Usage

```js
import {GoogleAuth} from '@omh/react-native-auth-google';

await GoogleAuth.initialize(['openid', 'email', 'profile']);

await googleAuthProvider.signIn();
```

## Contributing

See the [contributing guide](../contributing.mdx) to learn how to contribute to the repository and the development workflow.
16 changes: 16 additions & 0 deletions docs/docs/api/modules.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
id: "modules"
title: "react-native-omh-auth"
sidebar_label: "Table of Contents"
sidebar_position: 0.5
hide_table_of_contents: true
custom_edit_url: null
---

## Modules

- [core/src](modules/core_src.md)
- [plugin-dropbox/src](modules/plugin_dropbox_src.md)
- [plugin-facebook/src](modules/plugin_facebook_src.md)
- [plugin-google/src](modules/plugin_google_src.md)
- [plugin-microsoft/src](modules/plugin_microsoft_src.md)
2 changes: 2 additions & 0 deletions docs/docs/api/modules/_category_.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
label: "Modules"
position: 1
46 changes: 46 additions & 0 deletions docs/docs/api/modules/core_src.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
id: "core_src"
title: "Module: core/src"
sidebar_label: "core/src"
sidebar_position: 0
custom_edit_url: null
---

## Classes

- [AuthModule](../classes/core_src.AuthModule.md)

## Type Aliases

### BaseAuthConfig

Ƭ **BaseAuthConfig**: `Object`

#### Type declaration

| Name | Type |
| :------ | :------ |
| `scopes` | `string`[] |

#### Defined in

[core/src/types.ts:1](https://github.com/openmobilehub/rn-omh-auth/blob/b43af64eae277675f57051591f993f84fd70cd48/packages/core/src/types.ts#L1)

___

### OmhUserProfile

Ƭ **OmhUserProfile**: `Object`

#### Type declaration

| Name | Type |
| :------ | :------ |
| `email?` | `string` |
| `name?` | `string` |
| `profileImage?` | `string` |
| `surname?` | `string` |

#### Defined in

[core/src/types.ts:5](https://github.com/openmobilehub/rn-omh-auth/blob/b43af64eae277675f57051591f993f84fd70cd48/packages/core/src/types.ts#L5)
17 changes: 17 additions & 0 deletions docs/docs/api/modules/plugin_dropbox_src.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
id: "plugin_dropbox_src"
title: "Module: plugin-dropbox/src"
sidebar_label: "plugin-dropbox/src"
sidebar_position: 0
custom_edit_url: null
---

## Variables

### default

`Const` **default**: [`AuthModule`](../classes/core_src.AuthModule.md)\<[`BaseAuthConfig`](core_src.md#baseauthconfig)\>

#### Defined in

[plugin-dropbox/src/index.tsx:4](https://github.com/openmobilehub/rn-omh-auth/blob/b43af64eae277675f57051591f993f84fd70cd48/packages/plugin-dropbox/src/index.tsx#L4)
17 changes: 17 additions & 0 deletions docs/docs/api/modules/plugin_facebook_src.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
id: "plugin_facebook_src"
title: "Module: plugin-facebook/src"
sidebar_label: "plugin-facebook/src"
sidebar_position: 0
custom_edit_url: null
---

## Variables

### default

`Const` **default**: [`AuthModule`](../classes/core_src.AuthModule.md)\<[`BaseAuthConfig`](core_src.md#baseauthconfig)\>

#### Defined in

[plugin-facebook/src/index.tsx:4](https://github.com/openmobilehub/rn-omh-auth/blob/b43af64eae277675f57051591f993f84fd70cd48/packages/plugin-facebook/src/index.tsx#L4)
17 changes: 17 additions & 0 deletions docs/docs/api/modules/plugin_google_src.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
id: "plugin_google_src"
title: "Module: plugin-google/src"
sidebar_label: "plugin-google/src"
sidebar_position: 0
custom_edit_url: null
---

## Variables

### default

`Const` **default**: [`AuthModule`](../classes/core_src.AuthModule.md)\<[`BaseAuthConfig`](core_src.md#baseauthconfig)\>

#### Defined in

[plugin-google/src/index.tsx:4](https://github.com/openmobilehub/rn-omh-auth/blob/b43af64eae277675f57051591f993f84fd70cd48/packages/plugin-google/src/index.tsx#L4)
Loading

0 comments on commit 4539962

Please sign in to comment.