Compare commits
60 Commits
@nhost/rea
...
@nhost/rea
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9dea25ebe1 | ||
|
|
9b063abe32 | ||
|
|
cea97ba333 | ||
|
|
607c457f9d | ||
|
|
6ea9ed69ce | ||
|
|
6450dcc02e | ||
|
|
0b18704d5b | ||
|
|
0c53f9034e | ||
|
|
0c90292779 | ||
|
|
2333aeb0c8 | ||
|
|
3b686a231b | ||
|
|
136b85c5fb | ||
|
|
3d715d5f95 | ||
|
|
6d5295aeca | ||
|
|
45f6285249 | ||
|
|
01fb999c7d | ||
|
|
8b8412d5fa | ||
|
|
0f1311c5b0 | ||
|
|
6b197aa886 | ||
|
|
0353c6648e | ||
|
|
978b8f8f68 | ||
|
|
3643449a9a | ||
|
|
8e25971e7d | ||
|
|
5cf05c8731 | ||
|
|
4da70abcfb | ||
|
|
2d5203872c | ||
|
|
882f1531ab | ||
|
|
6126d77b01 | ||
|
|
09debbd746 | ||
|
|
604ed6b314 | ||
|
|
2f1fec1dcf | ||
|
|
293bdc3f1c | ||
|
|
70f537841f | ||
|
|
b670dc396b | ||
|
|
88800ba4b4 | ||
|
|
d412669c86 | ||
|
|
8600acb6f2 | ||
|
|
0e2e2344f2 | ||
|
|
8a91673242 | ||
|
|
63f27235be | ||
|
|
7feadbe55d | ||
|
|
98e5680f48 | ||
|
|
8d6ebf9032 | ||
|
|
9feea987e6 | ||
|
|
c2d77bbb7c | ||
|
|
4468654054 | ||
|
|
998291ea9d | ||
|
|
eb46f7d8b7 | ||
|
|
7bc11a1985 | ||
|
|
0fadc0d3da | ||
|
|
814856da0d | ||
|
|
1bf5114d6b | ||
|
|
ed618e0c41 | ||
|
|
8a272b5b72 | ||
|
|
2a0107db55 | ||
|
|
48a90c4f69 | ||
|
|
686d3f1b09 | ||
|
|
6b4b4a5798 | ||
|
|
3a14b90557 | ||
|
|
5485d48ce5 |
1
.github/workflows/changesets.yaml
vendored
1
.github/workflows/changesets.yaml
vendored
@@ -5,7 +5,6 @@ on:
|
|||||||
branches: [main]
|
branches: [main]
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- 'docs/**'
|
- 'docs/**'
|
||||||
- 'templates/**'
|
|
||||||
- 'examples/**'
|
- 'examples/**'
|
||||||
- 'assets/**'
|
- 'assets/**'
|
||||||
- '**.md'
|
- '**.md'
|
||||||
|
|||||||
2
.github/workflows/tests.yaml
vendored
2
.github/workflows/tests.yaml
vendored
@@ -5,7 +5,6 @@ on:
|
|||||||
branches: [main]
|
branches: [main]
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- 'docs/**'
|
- 'docs/**'
|
||||||
- 'templates/**'
|
|
||||||
- 'assets/**'
|
- 'assets/**'
|
||||||
- '**.md'
|
- '**.md'
|
||||||
- 'LICENSE'
|
- 'LICENSE'
|
||||||
@@ -14,7 +13,6 @@ on:
|
|||||||
types: [opened, synchronize]
|
types: [opened, synchronize]
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- 'docs/**'
|
- 'docs/**'
|
||||||
- 'templates/**'
|
|
||||||
- 'assets/**'
|
- 'assets/**'
|
||||||
- '**.md'
|
- '**.md'
|
||||||
- 'LICENSE'
|
- 'LICENSE'
|
||||||
|
|||||||
12
README.md
12
README.md
@@ -87,12 +87,12 @@ await nhost.graphql.request(`{
|
|||||||
Nhost is frontend agnostic, which means Nhost works with all frontend frameworks.
|
Nhost is frontend agnostic, which means Nhost works with all frontend frameworks.
|
||||||
|
|
||||||
<div align="center">
|
<div align="center">
|
||||||
<a href="https://github.com/nhost/nhost/tree/main/templates/web/nextjs-apollo"><img src="assets/nextjs.svg"/></a>
|
<a href="https://docs.nhost.io/platform/quickstarts/nextjs"><img src="assets/nextjs.svg"/></a>
|
||||||
<a href="https://github.com/nhost/nhost/tree/main/examples/nuxt-apollo"><img src="assets/nuxtjs.svg"/></a>
|
<a href="https://docs.nhost.io/reference/javascript"><img src="assets/nuxtjs.svg"/></a>
|
||||||
<a href="https://github.com/nhost/nhost/tree/main/templates/web/react-apollo"><img src="assets/react.svg"/></a>
|
<a href="https://docs.nhost.io/platform/quickstarts/react"><img src="assets/react.svg"/></a>
|
||||||
<img src="assets/react-native.svg"/>
|
<a href="https://docs.nhost.io/reference/javascript"><img src="assets/react-native.svg"/></a>
|
||||||
<a href="https://github.com/nhost/nhost/tree/main/packages/nhost-js"><img src="assets/svelte.svg"/></a>
|
<a href="https://docs.nhost.io/reference/javascript"><img src="assets/svelte.svg"/></a>
|
||||||
<a href="https://github.com/nhost/nhost/tree/main/packages/nhost-js"><img src="assets/vuejs.svg"/></a>
|
<a href="https://docs.nhost.io/platform/quickstarts/vue"><img src="assets/vuejs.svg"/></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
# Resources
|
# Resources
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
# @nhost/docs
|
# @nhost/docs
|
||||||
|
|
||||||
|
## 0.0.3
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- eb46f7d8: Use port 1337 if no port is specified when using "localhost" as `subdomain`.
|
||||||
|
|
||||||
## 0.0.2
|
## 0.0.2
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -79,17 +79,17 @@ Then start the Nhost project locally:
|
|||||||
nhost up
|
nhost up
|
||||||
```
|
```
|
||||||
|
|
||||||
Hasura Console starts automatically and your Nhost project is running locally with the backend URL: `http://localhost:1337`.
|
Hasura Console starts automatically and your Nhost project is running locally.
|
||||||
|
|
||||||
## Subdomain and Region
|
## Subdomain and Region
|
||||||
|
|
||||||
Use `localhost:1337` as the `subdomain`, and skip `region` when using the CLI and the [JavaScript SDK](/reference/javascript):
|
Use `localhost` as the `subdomain`, and skip `region` when using the CLI and the [JavaScript SDK](/reference/javascript):
|
||||||
|
|
||||||
```
|
```
|
||||||
import { NhostClient } from '@nhost/nhost-js'
|
import { NhostClient } from '@nhost/nhost-js'
|
||||||
|
|
||||||
const nhost = new NhostClient({
|
const nhost = new NhostClient({
|
||||||
subdomain: 'localhost:1337',
|
subdomain: 'localhost',
|
||||||
})
|
})
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -97,12 +97,22 @@ const nhost = new NhostClient({
|
|||||||
|
|
||||||
During local development with the CLI, all transactional emails from Authentication are sent to a local Mailhog instance, instead of to the recipient's email address. You'll see an address where after starting [`nhost up`](/reference/cli/up) where all emails are sent to.
|
During local development with the CLI, all transactional emails from Authentication are sent to a local Mailhog instance, instead of to the recipient's email address. You'll see an address where after starting [`nhost up`](/reference/cli/up) where all emails are sent to.
|
||||||
|
|
||||||
For the example below, all emails are accessable at `http://localhost:8839`.
|
For the example below, all emails are accessible at `http://localhost:8025`.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ nhost up
|
$ nhost up
|
||||||
✔ Your app is running at http://localhost:1337 (Ctrl+C to stop)
|
URLs:
|
||||||
ℹ Emails will be sent to http://localhost:8839
|
- Postgres: postgres://postgres:postgres@localhost:5432/postgres
|
||||||
|
- GraphQL: http://localhost:1337/v1/graphql
|
||||||
|
- Auth: http://localhost:1337/v1/auth
|
||||||
|
- Storage: http://localhost:1337/v1/storage
|
||||||
|
- Functions: http://localhost:1337/v1/functions
|
||||||
|
|
||||||
|
- Hasura console: http://localhost:9695
|
||||||
|
- Mailhog: http://localhost:8025
|
||||||
|
|
||||||
|
- subdomain: localhost
|
||||||
|
- region: (empty)
|
||||||
```
|
```
|
||||||
|
|
||||||
## What's next?
|
## What's next?
|
||||||
|
|||||||
@@ -198,7 +198,7 @@ Running this command will start up all the backend services provided by Nhost.
|
|||||||
It also runs a webserver to serve the Hasura Console for the GraphQL Engine so
|
It also runs a webserver to serve the Hasura Console for the GraphQL Engine so
|
||||||
you can manage the database and test the GraphQL API.
|
you can manage the database and test the GraphQL API.
|
||||||
|
|
||||||
The Hasura Console opens automatically at [http://localhost:1337](http://localhost:1337/).
|
The Hasura Console opens automatically at [http://localhost:9695](http://localhost:9695/).
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|||||||
@@ -3,25 +3,25 @@
|
|||||||
title: upload()
|
title: upload()
|
||||||
sidebar_label: upload()
|
sidebar_label: upload()
|
||||||
slug: /reference/javascript/storage/upload
|
slug: /reference/javascript/storage/upload
|
||||||
description: Use `nhost.storage.upload` to upload a file. The `file` must be of type [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File).
|
description: Use `nhost.storage.upload` to upload a file.
|
||||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/hasura-storage-client.ts#L52
|
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/hasura-storage-client.ts#L76
|
||||||
---
|
---
|
||||||
|
|
||||||
# `upload()`
|
# `upload()`
|
||||||
|
|
||||||
Use `nhost.storage.upload` to upload a file. The `file` must be of type [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File).
|
## Overload 1 of 2
|
||||||
|
|
||||||
If no `bucket` is specified the `default` bucket will be used.
|
Use `nhost.storage.upload` to upload a file.
|
||||||
|
|
||||||
```ts
|
It's possible to use [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File) or [`FormData`](https://developer.mozilla.org/en-US/docs/Web/API/FormData) to upload a file. The `File` instance is only available in the browser while `FormData` with [`form-data`](https://www.npmjs.com/package/form-data) works both in the browser and in NodeJS (server).
|
||||||
await nhost.storage.upload({ file })
|
|
||||||
```
|
|
||||||
|
|
||||||
## Parameters
|
If no `bucketId` is specified the bucket `default` is used.
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
**<span className="parameter-name">params</span>** <span className="optional-status">required</span> [`StorageUploadParams`](/reference/docgen/javascript/storage/types/storage-upload-params)
|
**<span className="parameter-name">params</span>** <span className="optional-status">required</span> [`StorageUploadFileParams`](/reference/docgen/javascript/storage/types/storage-upload-file-params)
|
||||||
|
|
||||||
| Property | Type | Required | Notes |
|
| Property | Type | Required | Notes |
|
||||||
| :------------------------------------------------------------------------------------------ | :------- | :------: | :---- |
|
| :------------------------------------------------------------------------------------------ | :------- | :------: | :---- |
|
||||||
@@ -32,12 +32,44 @@ await nhost.storage.upload({ file })
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Examples
|
### Examples
|
||||||
|
|
||||||
|
Upload a file from a browser using `File`.
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
await nhost.storage.upload({ file })
|
await nhost.storage.upload({ file })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Upload a file from a browser using `File` to a specific Bucket.
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
await nhost.storage.upload({ file, bucketId: '<Bucket-ID>' })
|
await nhost.storage.upload({ file, bucketId: '<Bucket-ID>' })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Upload a file from a server using `FormData` with [`form-data`](https://www.npmjs.com/package/form-data).
|
||||||
|
|
||||||
|
```ts
|
||||||
|
const fd = new FormData()
|
||||||
|
fd.append('file', fs.createReadStream('./tests/assets/sample.pdf'))
|
||||||
|
|
||||||
|
await storage.upload({
|
||||||
|
formData: fd
|
||||||
|
})
|
||||||
|
```
|
||||||
|
|
||||||
|
## Overload 2 of 2
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**<span className="parameter-name">params</span>** <span className="optional-status">required</span> [`StorageUploadFormDataParams`](/reference/docgen/javascript/storage/types/storage-upload-form-data-params)
|
||||||
|
|
||||||
|
| Property | Type | Required | Notes |
|
||||||
|
| :------------------------------------------------------------------------------------------ | :--------- | :------: | :---- |
|
||||||
|
| <span className="parameter-name"><span className="light-grey">params.</span>formData</span> | `FormData` | ✔️ | |
|
||||||
|
| <span className="parameter-name"><span className="light-grey">params.</span>bucketId</span> | `string` | | |
|
||||||
|
| <span className="parameter-name"><span className="light-grey">params.</span>name</span> | `string` | | |
|
||||||
|
| <span className="parameter-name"><span className="light-grey">params.</span>id</span> | `string` | | |
|
||||||
|
|
||||||
|
---
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ sidebar_label: getUrl()
|
|||||||
slug: /reference/javascript/storage/get-url
|
slug: /reference/javascript/storage/get-url
|
||||||
sidebar_class_name: deprecated
|
sidebar_class_name: deprecated
|
||||||
description: No description provided.
|
description: No description provided.
|
||||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/hasura-storage-client.ts#L74
|
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/hasura-storage-client.ts#L106
|
||||||
---
|
---
|
||||||
|
|
||||||
# `getUrl()`
|
# `getUrl()`
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ title: getPublicUrl()
|
|||||||
sidebar_label: getPublicUrl()
|
sidebar_label: getPublicUrl()
|
||||||
slug: /reference/javascript/storage/get-public-url
|
slug: /reference/javascript/storage/get-public-url
|
||||||
description: Use `nhost.storage.getPublicUrl` to get the public URL of a file. The public URL can be used for un-authenticated users to access files. To access public files the `public` role must have permissions to select the file in the `storage.files` table.
|
description: Use `nhost.storage.getPublicUrl` to get the public URL of a file. The public URL can be used for un-authenticated users to access files. To access public files the `public` role must have permissions to select the file in the `storage.files` table.
|
||||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/hasura-storage-client.ts#L88
|
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/hasura-storage-client.ts#L120
|
||||||
---
|
---
|
||||||
|
|
||||||
# `getPublicUrl()`
|
# `getPublicUrl()`
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ title: getPresignedUrl()
|
|||||||
sidebar_label: getPresignedUrl()
|
sidebar_label: getPresignedUrl()
|
||||||
slug: /reference/javascript/storage/get-presigned-url
|
slug: /reference/javascript/storage/get-presigned-url
|
||||||
description: Use `nhost.storage.getPresignedUrl` to get a presigned URL of a file. To get a presigned URL the user must have permission to select the file in the `storage.files` table.
|
description: Use `nhost.storage.getPresignedUrl` to get a presigned URL of a file. To get a presigned URL the user must have permission to select the file in the `storage.files` table.
|
||||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/hasura-storage-client.ts#L110
|
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/hasura-storage-client.ts#L142
|
||||||
---
|
---
|
||||||
|
|
||||||
# `getPresignedUrl()`
|
# `getPresignedUrl()`
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ title: delete()
|
|||||||
sidebar_label: delete()
|
sidebar_label: delete()
|
||||||
slug: /reference/javascript/storage/delete
|
slug: /reference/javascript/storage/delete
|
||||||
description: Use `nhost.storage.delete` to delete a file. To delete a file the user must have permissions to delete the file in the `storage.files` table. Deleting the file using `nhost.storage.delete()` will delete both the file and its metadata.
|
description: Use `nhost.storage.delete` to delete a file. To delete a file the user must have permissions to delete the file in the `storage.files` table. Deleting the file using `nhost.storage.delete()` will delete both the file and its metadata.
|
||||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/hasura-storage-client.ts#L135
|
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/hasura-storage-client.ts#L167
|
||||||
---
|
---
|
||||||
|
|
||||||
# `delete()`
|
# `delete()`
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ title: setAccessToken()
|
|||||||
sidebar_label: setAccessToken()
|
sidebar_label: setAccessToken()
|
||||||
slug: /reference/javascript/storage/set-access-token
|
slug: /reference/javascript/storage/set-access-token
|
||||||
description: Use `nhost.storage.setAccessToken` to a set an access token to be used in subsequent storage requests. Note that if you're signin in users with `nhost.auth.signIn()` the access token will be set automatically.
|
description: Use `nhost.storage.setAccessToken` to a set an access token to be used in subsequent storage requests. Note that if you're signin in users with `nhost.auth.signIn()` the access token will be set automatically.
|
||||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/hasura-storage-client.ts#L156
|
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/hasura-storage-client.ts#L188
|
||||||
---
|
---
|
||||||
|
|
||||||
# `setAccessToken()`
|
# `setAccessToken()`
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ title: setAdminSecret()
|
|||||||
sidebar_label: setAdminSecret()
|
sidebar_label: setAdminSecret()
|
||||||
slug: /reference/javascript/storage/set-admin-secret
|
slug: /reference/javascript/storage/set-admin-secret
|
||||||
description: Use `nhost.storage.adminSecret` to set the admin secret to be used for subsequent storage requests. This is useful if you want to run storage in "admin mode".
|
description: Use `nhost.storage.adminSecret` to set the admin secret to be used for subsequent storage requests. This is useful if you want to run storage in "admin mode".
|
||||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/hasura-storage-client.ts#L174
|
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/hasura-storage-client.ts#L206
|
||||||
---
|
---
|
||||||
|
|
||||||
# `setAdminSecret()`
|
# `setAdminSecret()`
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ title: HasuraStorageClient
|
|||||||
sidebar_label: Storage
|
sidebar_label: Storage
|
||||||
description: No description provided.
|
description: No description provided.
|
||||||
slug: /reference/javascript/storage
|
slug: /reference/javascript/storage
|
||||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/hasura-storage-client.ts#L25
|
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/hasura-storage-client.ts#L29
|
||||||
---
|
---
|
||||||
|
|
||||||
# `HasuraStorageClient`
|
# `HasuraStorageClient`
|
||||||
|
|||||||
@@ -27,6 +27,6 @@ custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storag
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
**<span className="parameter-name">params</span>** <span className="optional-status">required</span> `Partial<StorageUploadParams>`
|
**<span className="parameter-name">params</span>** <span className="optional-status">required</span> `Partial<StorageUploadFileParams>`
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ title: ApiDeleteParams
|
|||||||
sidebar_label: ApiDeleteParams
|
sidebar_label: ApiDeleteParams
|
||||||
description: No description provided.
|
description: No description provided.
|
||||||
displayed_sidebar: referenceSidebar
|
displayed_sidebar: referenceSidebar
|
||||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/utils/types.ts#L69
|
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/utils/types.ts#L84
|
||||||
---
|
---
|
||||||
|
|
||||||
# `ApiDeleteParams`
|
# `ApiDeleteParams`
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ title: ApiDeleteResponse
|
|||||||
sidebar_label: ApiDeleteResponse
|
sidebar_label: ApiDeleteResponse
|
||||||
description: No description provided.
|
description: No description provided.
|
||||||
displayed_sidebar: referenceSidebar
|
displayed_sidebar: referenceSidebar
|
||||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/utils/types.ts#L73
|
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/utils/types.ts#L88
|
||||||
---
|
---
|
||||||
|
|
||||||
# `ApiDeleteResponse`
|
# `ApiDeleteResponse`
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ title: ApiGetPresignedUrlParams
|
|||||||
sidebar_label: ApiGetPresignedUrlParams
|
sidebar_label: ApiGetPresignedUrlParams
|
||||||
description: No description provided.
|
description: No description provided.
|
||||||
displayed_sidebar: referenceSidebar
|
displayed_sidebar: referenceSidebar
|
||||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/utils/types.ts#L61
|
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/utils/types.ts#L76
|
||||||
---
|
---
|
||||||
|
|
||||||
# `ApiGetPresignedUrlParams`
|
# `ApiGetPresignedUrlParams`
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ title: ApiGetPresignedUrlResponse
|
|||||||
sidebar_label: ApiGetPresignedUrlResponse
|
sidebar_label: ApiGetPresignedUrlResponse
|
||||||
description: No description provided.
|
description: No description provided.
|
||||||
displayed_sidebar: referenceSidebar
|
displayed_sidebar: referenceSidebar
|
||||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/utils/types.ts#L65
|
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/utils/types.ts#L80
|
||||||
---
|
---
|
||||||
|
|
||||||
# `ApiGetPresignedUrlResponse`
|
# `ApiGetPresignedUrlResponse`
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ title: ApiUploadParams
|
|||||||
sidebar_label: ApiUploadParams
|
sidebar_label: ApiUploadParams
|
||||||
description: No description provided.
|
description: No description provided.
|
||||||
displayed_sidebar: referenceSidebar
|
displayed_sidebar: referenceSidebar
|
||||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/utils/types.ts#L50
|
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/utils/types.ts#L65
|
||||||
---
|
---
|
||||||
|
|
||||||
# `ApiUploadParams`
|
# `ApiUploadParams`
|
||||||
@@ -13,7 +13,7 @@ custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storag
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
**<span className="parameter-name">file</span>** <span className="optional-status">required</span> `FormData`
|
**<span className="parameter-name">formData</span>** <span className="optional-status">required</span> `FormData`
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ title: ApiUploadResponse
|
|||||||
sidebar_label: ApiUploadResponse
|
sidebar_label: ApiUploadResponse
|
||||||
description: No description provided.
|
description: No description provided.
|
||||||
displayed_sidebar: referenceSidebar
|
displayed_sidebar: referenceSidebar
|
||||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/utils/types.ts#L57
|
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/utils/types.ts#L72
|
||||||
---
|
---
|
||||||
|
|
||||||
# `ApiUploadResponse`
|
# `ApiUploadResponse`
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ title: NhostClientReturnType
|
|||||||
sidebar_label: NhostClientReturnType
|
sidebar_label: NhostClientReturnType
|
||||||
description: No description provided.
|
description: No description provided.
|
||||||
displayed_sidebar: referenceSidebar
|
displayed_sidebar: referenceSidebar
|
||||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/utils/types.ts#L4
|
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/utils/types.ts#L6
|
||||||
---
|
---
|
||||||
|
|
||||||
# `NhostClientReturnType`
|
# `NhostClientReturnType`
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ title: StorageDeleteParams
|
|||||||
sidebar_label: StorageDeleteParams
|
sidebar_label: StorageDeleteParams
|
||||||
description: No description provided.
|
description: No description provided.
|
||||||
displayed_sidebar: referenceSidebar
|
displayed_sidebar: referenceSidebar
|
||||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/utils/types.ts#L32
|
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/utils/types.ts#L47
|
||||||
---
|
---
|
||||||
|
|
||||||
# `StorageDeleteParams`
|
# `StorageDeleteParams`
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ title: StorageDeleteResponse
|
|||||||
sidebar_label: StorageDeleteResponse
|
sidebar_label: StorageDeleteResponse
|
||||||
description: No description provided.
|
description: No description provided.
|
||||||
displayed_sidebar: referenceSidebar
|
displayed_sidebar: referenceSidebar
|
||||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/utils/types.ts#L36
|
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/utils/types.ts#L51
|
||||||
---
|
---
|
||||||
|
|
||||||
# `StorageDeleteResponse`
|
# `StorageDeleteResponse`
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ title: StorageGetPresignedUrlParams
|
|||||||
sidebar_label: StorageGetPresignedUrlParams
|
sidebar_label: StorageGetPresignedUrlParams
|
||||||
description: No description provided.
|
description: No description provided.
|
||||||
displayed_sidebar: referenceSidebar
|
displayed_sidebar: referenceSidebar
|
||||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/utils/types.ts#L24
|
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/utils/types.ts#L39
|
||||||
---
|
---
|
||||||
|
|
||||||
# `StorageGetPresignedUrlParams`
|
# `StorageGetPresignedUrlParams`
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ title: StorageGetPresignedUrlResponse
|
|||||||
sidebar_label: StorageGetPresignedUrlResponse
|
sidebar_label: StorageGetPresignedUrlResponse
|
||||||
description: No description provided.
|
description: No description provided.
|
||||||
displayed_sidebar: referenceSidebar
|
displayed_sidebar: referenceSidebar
|
||||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/utils/types.ts#L28
|
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/utils/types.ts#L43
|
||||||
---
|
---
|
||||||
|
|
||||||
# `StorageGetPresignedUrlResponse`
|
# `StorageGetPresignedUrlResponse`
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ title: StorageGetUrlParams
|
|||||||
sidebar_label: StorageGetUrlParams
|
sidebar_label: StorageGetUrlParams
|
||||||
description: No description provided.
|
description: No description provided.
|
||||||
displayed_sidebar: referenceSidebar
|
displayed_sidebar: referenceSidebar
|
||||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/utils/types.ts#L20
|
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/utils/types.ts#L35
|
||||||
---
|
---
|
||||||
|
|
||||||
# `StorageGetUrlParams`
|
# `StorageGetUrlParams`
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
---
|
||||||
|
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
|
||||||
|
title: StorageUploadFileParams
|
||||||
|
sidebar_label: StorageUploadFileParams
|
||||||
|
description: No description provided.
|
||||||
|
displayed_sidebar: referenceSidebar
|
||||||
|
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/utils/types.ts#L13
|
||||||
|
---
|
||||||
|
|
||||||
|
# `StorageUploadFileParams`
|
||||||
|
|
||||||
|
## Parameters
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**<span className="parameter-name">file</span>** <span className="optional-status">required</span> `File`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**<span className="parameter-name">bucketId</span>** <span className="optional-status">optional</span> `string`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**<span className="parameter-name">name</span>** <span className="optional-status">optional</span> `string`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**<span className="parameter-name">id</span>** <span className="optional-status">optional</span> `string`
|
||||||
|
|
||||||
|
---
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
---
|
||||||
|
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
|
||||||
|
title: StorageUploadFormDataParams
|
||||||
|
sidebar_label: StorageUploadFormDataParams
|
||||||
|
description: No description provided.
|
||||||
|
displayed_sidebar: referenceSidebar
|
||||||
|
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/utils/types.ts#L21
|
||||||
|
---
|
||||||
|
|
||||||
|
# `StorageUploadFormDataParams`
|
||||||
|
|
||||||
|
## Parameters
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**<span className="parameter-name">formData</span>** <span className="optional-status">required</span> `FormData`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**<span className="parameter-name">bucketId</span>** <span className="optional-status">optional</span> `string`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**<span className="parameter-name">name</span>** <span className="optional-status">optional</span> `string`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**<span className="parameter-name">id</span>** <span className="optional-status">optional</span> `string`
|
||||||
|
|
||||||
|
---
|
||||||
@@ -4,27 +4,11 @@ title: StorageUploadParams
|
|||||||
sidebar_label: StorageUploadParams
|
sidebar_label: StorageUploadParams
|
||||||
description: No description provided.
|
description: No description provided.
|
||||||
displayed_sidebar: referenceSidebar
|
displayed_sidebar: referenceSidebar
|
||||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/utils/types.ts#L9
|
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/utils/types.ts#L29
|
||||||
---
|
---
|
||||||
|
|
||||||
# `StorageUploadParams`
|
# `StorageUploadParams`
|
||||||
|
|
||||||
## Parameters
|
```ts
|
||||||
|
type StorageUploadParams = StorageUploadFileParams | StorageUploadFormDataParams
|
||||||
---
|
```
|
||||||
|
|
||||||
**<span className="parameter-name">file</span>** <span className="optional-status">required</span> `File`
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
**<span className="parameter-name">bucketId</span>** <span className="optional-status">optional</span> `string`
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
**<span className="parameter-name">name</span>** <span className="optional-status">optional</span> `string`
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
**<span className="parameter-name">id</span>** <span className="optional-status">optional</span> `string`
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ title: StorageUploadResponse
|
|||||||
sidebar_label: StorageUploadResponse
|
sidebar_label: StorageUploadResponse
|
||||||
description: No description provided.
|
description: No description provided.
|
||||||
displayed_sidebar: referenceSidebar
|
displayed_sidebar: referenceSidebar
|
||||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/utils/types.ts#L16
|
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/utils/types.ts#L31
|
||||||
---
|
---
|
||||||
|
|
||||||
# `StorageUploadResponse`
|
# `StorageUploadResponse`
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ title: UploadHeaders
|
|||||||
sidebar_label: UploadHeaders
|
sidebar_label: UploadHeaders
|
||||||
description: No description provided.
|
description: No description provided.
|
||||||
displayed_sidebar: referenceSidebar
|
displayed_sidebar: referenceSidebar
|
||||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/utils/types.ts#L77
|
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/utils/types.ts#L92
|
||||||
---
|
---
|
||||||
|
|
||||||
# `UploadHeaders`
|
# `UploadHeaders`
|
||||||
|
|||||||
@@ -67,11 +67,11 @@ Returns the name of the file.
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
**<span className="parameter-name">add</span>** <span className="optional-status">required</span> `(params: StorageUploadParams) => void`
|
**<span className="parameter-name">add</span>** <span className="optional-status">required</span> `(params: StorageUploadFileParams) => void`
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
**<span className="parameter-name">upload</span>** <span className="optional-status">required</span> `(params: Partial<StorageUploadParams>) => Promise<UploadFileHandlerResult>`
|
**<span className="parameter-name">upload</span>** <span className="optional-status">required</span> `(params: Partial<StorageUploadFileParams>) => Promise<UploadFileHandlerResult>`
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@@ -67,11 +67,11 @@ Returns the name of the file.
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
**<span className="parameter-name">add</span>** <span className="optional-status">required</span> `(params: StorageUploadParams) => void`
|
**<span className="parameter-name">add</span>** <span className="optional-status">required</span> `(params: StorageUploadFileParams) => void`
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
**<span className="parameter-name">upload</span>** <span className="optional-status">required</span> `(params: Partial<StorageUploadParams>) => Promise<UploadFileHandlerResult>`
|
**<span className="parameter-name">upload</span>** <span className="optional-status">required</span> `(params: Partial<StorageUploadFileParams>) => Promise<UploadFileHandlerResult>`
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@nhost/docs",
|
"name": "@nhost/docs",
|
||||||
"version": "0.0.2",
|
"version": "0.0.3",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"docusaurus": "docusaurus",
|
"docusaurus": "docusaurus",
|
||||||
|
|||||||
@@ -1,23 +1,13 @@
|
|||||||
metadata_directory: metadata
|
metadata_directory: metadata
|
||||||
services:
|
services:
|
||||||
mailhog:
|
|
||||||
port: 8025
|
|
||||||
hasura:
|
hasura:
|
||||||
version: v2.8.0
|
image: hasura/graphql-engine:v2.10.1
|
||||||
environment:
|
environment:
|
||||||
hasura_graphql_enable_remote_schema_permissions: false
|
hasura_graphql_enable_remote_schema_permissions: false
|
||||||
auth:
|
auth:
|
||||||
version: 0.10.0
|
image: nhost/hasura-auth:0.10.0
|
||||||
storage:
|
storage:
|
||||||
version: 0.2.3
|
image: nhost/hasura-storage:0.2.3
|
||||||
minio:
|
|
||||||
environment:
|
|
||||||
minio_root_password: minioaccesskey123123
|
|
||||||
minio_root_user: minioaccesskey123123
|
|
||||||
postgres:
|
|
||||||
environment:
|
|
||||||
postgres_password: postgres
|
|
||||||
postgres_user: postgres
|
|
||||||
auth:
|
auth:
|
||||||
access_control:
|
access_control:
|
||||||
email:
|
email:
|
||||||
@@ -120,10 +110,10 @@ auth:
|
|||||||
from: ''
|
from: ''
|
||||||
messaging_service_id: ''
|
messaging_service_id: ''
|
||||||
smtp:
|
smtp:
|
||||||
host: nhost_mailhog
|
host: mailhog
|
||||||
method: ''
|
method: ''
|
||||||
pass: password
|
pass: password
|
||||||
port: 1706
|
port: 1025
|
||||||
secure: false
|
secure: false
|
||||||
sender: hasura-auth@example.com
|
sender: hasura-auth@example.com
|
||||||
user: user
|
user: user
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
{}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
table:
|
||||||
|
name: user_authenticators
|
||||||
|
schema: auth
|
||||||
|
configuration:
|
||||||
|
column_config:
|
||||||
|
credential_id:
|
||||||
|
custom_name: credentialId
|
||||||
|
credential_public_key:
|
||||||
|
custom_name: credentialPublicKey
|
||||||
|
user_id:
|
||||||
|
custom_name: userId
|
||||||
|
custom_column_names:
|
||||||
|
credential_id: credentialId
|
||||||
|
credential_public_key: credentialPublicKey
|
||||||
|
user_id: userId
|
||||||
|
custom_name: authUserAuthenticators
|
||||||
|
custom_root_fields:
|
||||||
|
delete: deleteAuthUserAuthenticators
|
||||||
|
delete_by_pk: deleteAuthUserAuthenticator
|
||||||
|
insert: insertAuthUserAuthenticators
|
||||||
|
insert_one: insertAuthUserAuthenticator
|
||||||
|
select: authUserAuthenticators
|
||||||
|
select_aggregate: authUserAuthenticatorsAggregate
|
||||||
|
select_by_pk: authUserAuthenticator
|
||||||
|
update: updateAuthUserAuthenticators
|
||||||
|
update_by_pk: updateAuthUserAuthenticator
|
||||||
|
object_relationships:
|
||||||
|
- name: user
|
||||||
|
using:
|
||||||
|
foreign_key_constraint_on: user_id
|
||||||
@@ -39,6 +39,8 @@ configuration:
|
|||||||
custom_name: totpSecret
|
custom_name: totpSecret
|
||||||
updated_at:
|
updated_at:
|
||||||
custom_name: updatedAt
|
custom_name: updatedAt
|
||||||
|
webauthn_current_challenge:
|
||||||
|
custom_name: currentChallenge
|
||||||
custom_column_names:
|
custom_column_names:
|
||||||
active_mfa_type: activeMfaType
|
active_mfa_type: activeMfaType
|
||||||
avatar_url: avatarUrl
|
avatar_url: avatarUrl
|
||||||
@@ -58,6 +60,7 @@ configuration:
|
|||||||
ticket_expires_at: ticketExpiresAt
|
ticket_expires_at: ticketExpiresAt
|
||||||
totp_secret: totpSecret
|
totp_secret: totpSecret
|
||||||
updated_at: updatedAt
|
updated_at: updatedAt
|
||||||
|
webauthn_current_challenge: currentChallenge
|
||||||
custom_name: users
|
custom_name: users
|
||||||
custom_root_fields:
|
custom_root_fields:
|
||||||
delete: deleteUsers
|
delete: deleteUsers
|
||||||
@@ -74,6 +77,13 @@ object_relationships:
|
|||||||
using:
|
using:
|
||||||
foreign_key_constraint_on: default_role
|
foreign_key_constraint_on: default_role
|
||||||
array_relationships:
|
array_relationships:
|
||||||
|
- name: authenticators
|
||||||
|
using:
|
||||||
|
foreign_key_constraint_on:
|
||||||
|
column: user_id
|
||||||
|
table:
|
||||||
|
name: user_authenticators
|
||||||
|
schema: auth
|
||||||
- name: refreshTokens
|
- name: refreshTokens
|
||||||
using:
|
using:
|
||||||
foreign_key_constraint_on:
|
foreign_key_constraint_on:
|
||||||
@@ -96,7 +106,8 @@ array_relationships:
|
|||||||
name: user_providers
|
name: user_providers
|
||||||
schema: auth
|
schema: auth
|
||||||
select_permissions:
|
select_permissions:
|
||||||
- permission:
|
- role: user
|
||||||
|
permission:
|
||||||
columns:
|
columns:
|
||||||
- avatar_url
|
- avatar_url
|
||||||
- display_name
|
- display_name
|
||||||
@@ -104,4 +115,3 @@ select_permissions:
|
|||||||
filter:
|
filter:
|
||||||
id:
|
id:
|
||||||
_eq: X-Hasura-User-Id
|
_eq: X-Hasura-User-Id
|
||||||
role: user
|
|
||||||
|
|||||||
@@ -2,16 +2,16 @@ table:
|
|||||||
name: customers
|
name: customers
|
||||||
schema: public
|
schema: public
|
||||||
insert_permissions:
|
insert_permissions:
|
||||||
- permission:
|
- role: public
|
||||||
|
permission:
|
||||||
check: {}
|
check: {}
|
||||||
columns:
|
columns:
|
||||||
- name
|
- name
|
||||||
role: public
|
|
||||||
select_permissions:
|
select_permissions:
|
||||||
- permission:
|
- role: public
|
||||||
|
permission:
|
||||||
columns:
|
columns:
|
||||||
- id
|
- id
|
||||||
- name
|
- name
|
||||||
- created_at
|
- created_at
|
||||||
filter: {}
|
filter: {}
|
||||||
role: public
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
- "!include auth_providers.yaml"
|
- "!include auth_providers.yaml"
|
||||||
- "!include auth_refresh_tokens.yaml"
|
- "!include auth_refresh_tokens.yaml"
|
||||||
- "!include auth_roles.yaml"
|
- "!include auth_roles.yaml"
|
||||||
|
- "!include auth_user_authenticators.yaml"
|
||||||
- "!include auth_user_providers.yaml"
|
- "!include auth_user_providers.yaml"
|
||||||
- "!include auth_user_roles.yaml"
|
- "!include auth_user_roles.yaml"
|
||||||
- "!include auth_users.yaml"
|
- "!include auth_users.yaml"
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
disabled_for_roles: []
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
[]
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{}
|
||||||
@@ -1,23 +1,13 @@
|
|||||||
metadata_directory: metadata
|
metadata_directory: metadata
|
||||||
services:
|
services:
|
||||||
mailhog:
|
|
||||||
port: 8025
|
|
||||||
hasura:
|
hasura:
|
||||||
version: v2.8.0
|
image: hasura/graphql-engine:v2.10.1
|
||||||
environment:
|
environment:
|
||||||
hasura_graphql_enable_remote_schema_permissions: false
|
hasura_graphql_enable_remote_schema_permissions: false
|
||||||
auth:
|
auth:
|
||||||
version: 0.10.0
|
image: nhost/hasura-auth:0.10.0
|
||||||
storage:
|
storage:
|
||||||
version: 0.2.3
|
image: nhost/hasura-storage:0.2.3
|
||||||
minio:
|
|
||||||
environment:
|
|
||||||
minio_root_password: minioaccesskey123123
|
|
||||||
minio_root_user: minioaccesskey123123
|
|
||||||
postgres:
|
|
||||||
environment:
|
|
||||||
postgres_password: postgres
|
|
||||||
postgres_user: postgres
|
|
||||||
auth:
|
auth:
|
||||||
access_control:
|
access_control:
|
||||||
email:
|
email:
|
||||||
@@ -120,10 +110,10 @@ auth:
|
|||||||
from: ''
|
from: ''
|
||||||
messaging_service_id: ''
|
messaging_service_id: ''
|
||||||
smtp:
|
smtp:
|
||||||
host: nhost_mailhog
|
host: mailhog
|
||||||
method: ''
|
method: ''
|
||||||
pass: password
|
pass: password
|
||||||
port: 1706
|
port: 1025
|
||||||
secure: false
|
secure: false
|
||||||
sender: hasura-auth@example.com
|
sender: hasura-auth@example.com
|
||||||
user: user
|
user: user
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
{}
|
||||||
@@ -106,7 +106,8 @@ array_relationships:
|
|||||||
name: user_providers
|
name: user_providers
|
||||||
schema: auth
|
schema: auth
|
||||||
select_permissions:
|
select_permissions:
|
||||||
- permission:
|
- role: user
|
||||||
|
permission:
|
||||||
columns:
|
columns:
|
||||||
- avatar_url
|
- avatar_url
|
||||||
- display_name
|
- display_name
|
||||||
@@ -114,4 +115,3 @@ select_permissions:
|
|||||||
filter:
|
filter:
|
||||||
id:
|
id:
|
||||||
_eq: X-Hasura-User-Id
|
_eq: X-Hasura-User-Id
|
||||||
role: user
|
|
||||||
|
|||||||
@@ -2,16 +2,16 @@ table:
|
|||||||
name: customers
|
name: customers
|
||||||
schema: public
|
schema: public
|
||||||
insert_permissions:
|
insert_permissions:
|
||||||
- permission:
|
- role: public
|
||||||
|
permission:
|
||||||
check: {}
|
check: {}
|
||||||
columns:
|
columns:
|
||||||
- name
|
- name
|
||||||
role: public
|
|
||||||
select_permissions:
|
select_permissions:
|
||||||
- permission:
|
- role: public
|
||||||
|
permission:
|
||||||
columns:
|
columns:
|
||||||
- id
|
- id
|
||||||
- name
|
- name
|
||||||
- created_at
|
- created_at
|
||||||
filter: {}
|
filter: {}
|
||||||
role: public
|
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
disabled_for_roles: []
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
[]
|
||||||
1
examples/codegen-react-query/nhost/metadata/network.yaml
Normal file
1
examples/codegen-react-query/nhost/metadata/network.yaml
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{}
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
# Custom email templates
|
|
||||||
|
|
||||||
Nhost plans to fully host custom email templates for email verification, password reset, email change confirmation, passwordless authentication...
|
|
||||||
|
|
||||||
In the meantime, it is possible to tell the Hasura-auth service to look for templates in an external public location through HTTP requests.
|
|
||||||
Here is a short example on how to proceed.
|
|
||||||
|
|
||||||
## Define where to find the custom templates
|
|
||||||
|
|
||||||
In the Nhost console, define the following **App Environment Variable:**:
|
|
||||||
|
|
||||||
- Variable name: `AUTH_EMAIL_TEMPLATE_FETCH_URL`
|
|
||||||
- Production value: `https://raw.githubusercontent.com/nhost/nhost/main/examples/custom-email-templates`
|
|
||||||
- Development value: `https://raw.githubusercontent.com/nhost/nhost/main/examples/custom-email-templates`
|
|
||||||
|
|
||||||
The above example will use the [templates located in the repository hosting this example](https://github.com/nhost/nhost/tree/main/examples/custom-email-templates). You can define another URL as long as it follows the same file structure. On every email creation, the server will use this URL to fetch its templates, depending on the locale, email type and field.
|
|
||||||
|
|
||||||
For instance, the template for english verification email body will the fetched in [https://raw.githubusercontent.com/nhost/nhost/custom-email-templates-example/examples/custom-email-templates/en/email-verify/body.html](https://raw.githubusercontent.com/nhost/nhost/custom-email-templates-example/examples/custom-email-templates/en/email-verify/body.html).
|
|
||||||
@@ -47,6 +47,8 @@ services:
|
|||||||
- postgres
|
- postgres
|
||||||
- graphql-engine
|
- graphql-engine
|
||||||
restart: always
|
restart: always
|
||||||
|
volumes:
|
||||||
|
- ./emails:/app/email-templates
|
||||||
environment:
|
environment:
|
||||||
AUTH_HOST: '0.0.0.0'
|
AUTH_HOST: '0.0.0.0'
|
||||||
HASURA_GRAPHQL_DATABASE_URL: postgres://postgres:${POSTGRES_PASSWORD:-secretpgpassword}@postgres:5432/postgres
|
HASURA_GRAPHQL_DATABASE_URL: postgres://postgres:${POSTGRES_PASSWORD:-secretpgpassword}@postgres:5432/postgres
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<h2>Confirm Email Change (custom template)</h2>
|
<h2>Confirm Email Change</h2>
|
||||||
<p>Use this link to confirm changing email:</p>
|
<p>Use this link to confirm changing email:</p>
|
||||||
<p>
|
<p>
|
||||||
<a href="${link}">
|
<a href="${link}">
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<h2>Verify Email (custom template)</h2>
|
<h2>Verify Email</h2>
|
||||||
<p>Use this link to verify your email:</p>
|
<p>Use this link to verify your email:</p>
|
||||||
<p>
|
<p>
|
||||||
<a href="${link}">
|
<a href="${link}">
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<h2>Reset Password (custom template)</h2>
|
<h2>Reset Password</h2>
|
||||||
<p>Use this link to reset your password:</p>
|
<p>Use this link to reset your password:</p>
|
||||||
<p>
|
<p>
|
||||||
<a href="${link}">
|
<a href="${link}">
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<h2>Magic Link (custom template)</h2>
|
<h2>Magic Link</h2>
|
||||||
<p>Use this link to securely sign in:</p>
|
<p>Use this link to securely sign in:</p>
|
||||||
<p>
|
<p>
|
||||||
<a href="${link}">
|
<a href="${link}">
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<h2>Confirmer changement de courriel (custom template)</h2>
|
<h2>Confirmer changement de courriel</h2>
|
||||||
<p>Utilisez ce lien pour confirmer le changement de courriel:</p>
|
<p>Utilisez ce lien pour confirmer le changement de courriel:</p>
|
||||||
<p>
|
<p>
|
||||||
<a href="${link}">
|
<a href="${link}">
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<h2>Vérifiez votre courriel (custom template)</h2>
|
<h2>Vérifiez votre courriel</h2>
|
||||||
<p>Utilisez ce lien pour vérifier votre courriel:</p>
|
<p>Utilisez ce lien pour vérifier votre courriel:</p>
|
||||||
<p>
|
<p>
|
||||||
<a href="${link}">
|
<a href="${link}">
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<h2>Réinitializer votre mot de passe (custom template)</h2>
|
<h2>Réinitializer votre mot de passe</h2>
|
||||||
<p>Utilisez ce lien pour réinitializer votre mot de passe:</p>
|
<p>Utilisez ce lien pour réinitializer votre mot de passe:</p>
|
||||||
<p>
|
<p>
|
||||||
<a href="${link}">
|
<a href="${link}">
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<h2>Lien magique (custom template)</h2>
|
<h2>Lien magique</h2>
|
||||||
<p>Utilisez ce lien pour vous connecter de façon sécuritaire:</p>
|
<p>Utilisez ce lien pour vous connecter de façon sécuritaire:</p>
|
||||||
<p>
|
<p>
|
||||||
<a href="${link}">
|
<a href="${link}">
|
||||||
@@ -1,21 +1,13 @@
|
|||||||
metadata_directory: metadata
|
metadata_directory: metadata
|
||||||
services:
|
services:
|
||||||
hasura:
|
hasura:
|
||||||
|
image: hasura/graphql-engine:v2.10.1
|
||||||
environment:
|
environment:
|
||||||
hasura_graphql_enable_remote_schema_permissions: false
|
hasura_graphql_enable_remote_schema_permissions: false
|
||||||
version: v2.8.0
|
|
||||||
minio:
|
|
||||||
environment:
|
|
||||||
minio_root_password: minioaccesskey123123
|
|
||||||
minio_root_user: minioaccesskey123123
|
|
||||||
postgres:
|
|
||||||
environment:
|
|
||||||
postgres_password: postgres
|
|
||||||
postgres_user: postgres
|
|
||||||
auth:
|
auth:
|
||||||
version: 0.10.0
|
image: nhost/hasura-auth:0.10.0
|
||||||
storage:
|
storage:
|
||||||
version: 0.2.3
|
image: nhost/hasura-storage:0.2.3
|
||||||
auth:
|
auth:
|
||||||
access_control:
|
access_control:
|
||||||
email:
|
email:
|
||||||
@@ -117,10 +109,10 @@ auth:
|
|||||||
from: ''
|
from: ''
|
||||||
messaging_service_id: ''
|
messaging_service_id: ''
|
||||||
smtp:
|
smtp:
|
||||||
host: nhost_mailhog
|
host: mailhog
|
||||||
method: ''
|
method: ''
|
||||||
pass: password
|
pass: password
|
||||||
port: 1765
|
port: 1025
|
||||||
secure: false
|
secure: false
|
||||||
sender: hasura-auth@example.com
|
sender: hasura-auth@example.com
|
||||||
user: user
|
user: user
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
{}
|
||||||
@@ -2,9 +2,8 @@ table:
|
|||||||
name: provider_requests
|
name: provider_requests
|
||||||
schema: auth
|
schema: auth
|
||||||
configuration:
|
configuration:
|
||||||
custom_column_names:
|
column_config: {}
|
||||||
id: id
|
custom_column_names: {}
|
||||||
redirect_url: redirectUrl
|
|
||||||
custom_name: authProviderRequests
|
custom_name: authProviderRequests
|
||||||
custom_root_fields:
|
custom_root_fields:
|
||||||
delete: deleteAuthProviderRequests
|
delete: deleteAuthProviderRequests
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ table:
|
|||||||
name: providers
|
name: providers
|
||||||
schema: auth
|
schema: auth
|
||||||
configuration:
|
configuration:
|
||||||
custom_column_names:
|
column_config: {}
|
||||||
id: id
|
custom_column_names: {}
|
||||||
custom_name: authProviders
|
custom_name: authProviders
|
||||||
custom_root_fields:
|
custom_root_fields:
|
||||||
delete: deleteAuthProviders
|
delete: deleteAuthProviders
|
||||||
|
|||||||
@@ -2,6 +2,15 @@ table:
|
|||||||
name: refresh_tokens
|
name: refresh_tokens
|
||||||
schema: auth
|
schema: auth
|
||||||
configuration:
|
configuration:
|
||||||
|
column_config:
|
||||||
|
created_at:
|
||||||
|
custom_name: createdAt
|
||||||
|
expires_at:
|
||||||
|
custom_name: expiresAt
|
||||||
|
refresh_token:
|
||||||
|
custom_name: refreshToken
|
||||||
|
user_id:
|
||||||
|
custom_name: userId
|
||||||
custom_column_names:
|
custom_column_names:
|
||||||
created_at: createdAt
|
created_at: createdAt
|
||||||
expires_at: expiresAt
|
expires_at: expiresAt
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ table:
|
|||||||
name: roles
|
name: roles
|
||||||
schema: auth
|
schema: auth
|
||||||
configuration:
|
configuration:
|
||||||
custom_column_names:
|
column_config: {}
|
||||||
role: role
|
custom_column_names: {}
|
||||||
custom_name: authRoles
|
custom_name: authRoles
|
||||||
custom_root_fields:
|
custom_root_fields:
|
||||||
delete: deleteAuthRoles
|
delete: deleteAuthRoles
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
table:
|
||||||
|
name: user_authenticators
|
||||||
|
schema: auth
|
||||||
|
configuration:
|
||||||
|
column_config:
|
||||||
|
credential_id:
|
||||||
|
custom_name: credentialId
|
||||||
|
credential_public_key:
|
||||||
|
custom_name: credentialPublicKey
|
||||||
|
user_id:
|
||||||
|
custom_name: userId
|
||||||
|
custom_column_names:
|
||||||
|
credential_id: credentialId
|
||||||
|
credential_public_key: credentialPublicKey
|
||||||
|
user_id: userId
|
||||||
|
custom_name: authUserAuthenticators
|
||||||
|
custom_root_fields:
|
||||||
|
delete: deleteAuthUserAuthenticators
|
||||||
|
delete_by_pk: deleteAuthUserAuthenticator
|
||||||
|
insert: insertAuthUserAuthenticators
|
||||||
|
insert_one: insertAuthUserAuthenticator
|
||||||
|
select: authUserAuthenticators
|
||||||
|
select_aggregate: authUserAuthenticatorsAggregate
|
||||||
|
select_by_pk: authUserAuthenticator
|
||||||
|
update: updateAuthUserAuthenticators
|
||||||
|
update_by_pk: updateAuthUserAuthenticator
|
||||||
|
object_relationships:
|
||||||
|
- name: user
|
||||||
|
using:
|
||||||
|
foreign_key_constraint_on: user_id
|
||||||
@@ -2,10 +2,24 @@ table:
|
|||||||
name: user_providers
|
name: user_providers
|
||||||
schema: auth
|
schema: auth
|
||||||
configuration:
|
configuration:
|
||||||
|
column_config:
|
||||||
|
access_token:
|
||||||
|
custom_name: accessToken
|
||||||
|
created_at:
|
||||||
|
custom_name: createdAt
|
||||||
|
provider_id:
|
||||||
|
custom_name: providerId
|
||||||
|
provider_user_id:
|
||||||
|
custom_name: providerUserId
|
||||||
|
refresh_token:
|
||||||
|
custom_name: refreshToken
|
||||||
|
updated_at:
|
||||||
|
custom_name: updatedAt
|
||||||
|
user_id:
|
||||||
|
custom_name: userId
|
||||||
custom_column_names:
|
custom_column_names:
|
||||||
access_token: accessToken
|
access_token: accessToken
|
||||||
created_at: createdAt
|
created_at: createdAt
|
||||||
id: id
|
|
||||||
provider_id: providerId
|
provider_id: providerId
|
||||||
provider_user_id: providerUserId
|
provider_user_id: providerUserId
|
||||||
refresh_token: refreshToken
|
refresh_token: refreshToken
|
||||||
|
|||||||
@@ -2,10 +2,13 @@ table:
|
|||||||
name: user_roles
|
name: user_roles
|
||||||
schema: auth
|
schema: auth
|
||||||
configuration:
|
configuration:
|
||||||
|
column_config:
|
||||||
|
created_at:
|
||||||
|
custom_name: createdAt
|
||||||
|
user_id:
|
||||||
|
custom_name: userId
|
||||||
custom_column_names:
|
custom_column_names:
|
||||||
created_at: createdAt
|
created_at: createdAt
|
||||||
id: id
|
|
||||||
role: role
|
|
||||||
user_id: userId
|
user_id: userId
|
||||||
custom_name: authUserRoles
|
custom_name: authUserRoles
|
||||||
custom_root_fields:
|
custom_root_fields:
|
||||||
|
|||||||
@@ -2,19 +2,54 @@ table:
|
|||||||
name: users
|
name: users
|
||||||
schema: auth
|
schema: auth
|
||||||
configuration:
|
configuration:
|
||||||
|
column_config:
|
||||||
|
active_mfa_type:
|
||||||
|
custom_name: activeMfaType
|
||||||
|
avatar_url:
|
||||||
|
custom_name: avatarUrl
|
||||||
|
created_at:
|
||||||
|
custom_name: createdAt
|
||||||
|
default_role:
|
||||||
|
custom_name: defaultRole
|
||||||
|
display_name:
|
||||||
|
custom_name: displayName
|
||||||
|
email_verified:
|
||||||
|
custom_name: emailVerified
|
||||||
|
is_anonymous:
|
||||||
|
custom_name: isAnonymous
|
||||||
|
last_seen:
|
||||||
|
custom_name: lastSeen
|
||||||
|
new_email:
|
||||||
|
custom_name: newEmail
|
||||||
|
otp_hash:
|
||||||
|
custom_name: otpHash
|
||||||
|
otp_hash_expires_at:
|
||||||
|
custom_name: otpHashExpiresAt
|
||||||
|
otp_method_last_used:
|
||||||
|
custom_name: otpMethodLastUsed
|
||||||
|
password_hash:
|
||||||
|
custom_name: passwordHash
|
||||||
|
phone_number:
|
||||||
|
custom_name: phoneNumber
|
||||||
|
phone_number_verified:
|
||||||
|
custom_name: phoneNumberVerified
|
||||||
|
ticket_expires_at:
|
||||||
|
custom_name: ticketExpiresAt
|
||||||
|
totp_secret:
|
||||||
|
custom_name: totpSecret
|
||||||
|
updated_at:
|
||||||
|
custom_name: updatedAt
|
||||||
|
webauthn_current_challenge:
|
||||||
|
custom_name: currentChallenge
|
||||||
custom_column_names:
|
custom_column_names:
|
||||||
active_mfa_type: activeMfaType
|
active_mfa_type: activeMfaType
|
||||||
avatar_url: avatarUrl
|
avatar_url: avatarUrl
|
||||||
created_at: createdAt
|
created_at: createdAt
|
||||||
default_role: defaultRole
|
default_role: defaultRole
|
||||||
disabled: disabled
|
|
||||||
display_name: displayName
|
display_name: displayName
|
||||||
email: email
|
|
||||||
email_verified: emailVerified
|
email_verified: emailVerified
|
||||||
id: id
|
|
||||||
is_anonymous: isAnonymous
|
is_anonymous: isAnonymous
|
||||||
last_seen: lastSeen
|
last_seen: lastSeen
|
||||||
locale: locale
|
|
||||||
new_email: newEmail
|
new_email: newEmail
|
||||||
otp_hash: otpHash
|
otp_hash: otpHash
|
||||||
otp_hash_expires_at: otpHashExpiresAt
|
otp_hash_expires_at: otpHashExpiresAt
|
||||||
@@ -22,10 +57,10 @@ configuration:
|
|||||||
password_hash: passwordHash
|
password_hash: passwordHash
|
||||||
phone_number: phoneNumber
|
phone_number: phoneNumber
|
||||||
phone_number_verified: phoneNumberVerified
|
phone_number_verified: phoneNumberVerified
|
||||||
ticket: ticket
|
|
||||||
ticket_expires_at: ticketExpiresAt
|
ticket_expires_at: ticketExpiresAt
|
||||||
totp_secret: totpSecret
|
totp_secret: totpSecret
|
||||||
updated_at: updatedAt
|
updated_at: updatedAt
|
||||||
|
webauthn_current_challenge: currentChallenge
|
||||||
custom_name: users
|
custom_name: users
|
||||||
custom_root_fields:
|
custom_root_fields:
|
||||||
delete: deleteUsers
|
delete: deleteUsers
|
||||||
@@ -33,7 +68,7 @@ configuration:
|
|||||||
insert: insertUsers
|
insert: insertUsers
|
||||||
insert_one: insertUser
|
insert_one: insertUser
|
||||||
select: users
|
select: users
|
||||||
select_aggregate: userAggregate
|
select_aggregate: usersAggregate
|
||||||
select_by_pk: user
|
select_by_pk: user
|
||||||
update: updateUsers
|
update: updateUsers
|
||||||
update_by_pk: updateUser
|
update_by_pk: updateUser
|
||||||
@@ -49,6 +84,13 @@ object_relationships:
|
|||||||
name: profiles
|
name: profiles
|
||||||
schema: public
|
schema: public
|
||||||
array_relationships:
|
array_relationships:
|
||||||
|
- name: authenticators
|
||||||
|
using:
|
||||||
|
foreign_key_constraint_on:
|
||||||
|
column: user_id
|
||||||
|
table:
|
||||||
|
name: user_authenticators
|
||||||
|
schema: auth
|
||||||
- name: refreshTokens
|
- name: refreshTokens
|
||||||
using:
|
using:
|
||||||
foreign_key_constraint_on:
|
foreign_key_constraint_on:
|
||||||
@@ -71,7 +113,8 @@ array_relationships:
|
|||||||
name: user_providers
|
name: user_providers
|
||||||
schema: auth
|
schema: auth
|
||||||
select_permissions:
|
select_permissions:
|
||||||
- permission:
|
- role: user
|
||||||
|
permission:
|
||||||
columns:
|
columns:
|
||||||
- avatar_url
|
- avatar_url
|
||||||
- display_name
|
- display_name
|
||||||
@@ -82,18 +125,17 @@ select_permissions:
|
|||||||
profiles:
|
profiles:
|
||||||
user_id:
|
user_id:
|
||||||
_eq: X-Hasura-User-Id
|
_eq: X-Hasura-User-Id
|
||||||
role: user
|
|
||||||
event_triggers:
|
event_triggers:
|
||||||
- definition:
|
- name: users-insert-create-profile
|
||||||
|
definition:
|
||||||
enable_manual: false
|
enable_manual: false
|
||||||
insert:
|
insert:
|
||||||
columns: "*"
|
columns: '*'
|
||||||
headers:
|
|
||||||
- name: nhost-webhook-secret
|
|
||||||
value_from_env: NHOST_WEBHOOK_SECRET
|
|
||||||
name: users-insert-create-profile
|
|
||||||
retry_conf:
|
retry_conf:
|
||||||
interval_sec: 10
|
interval_sec: 10
|
||||||
num_retries: 0
|
num_retries: 0
|
||||||
timeout_sec: 60
|
timeout_sec: 60
|
||||||
webhook: "{{NHOST_BACKEND_URL}}/v1/functions/users/insert/create-profile"
|
webhook: '{{NHOST_BACKEND_URL}}/v1/functions/users/insert/create-profile'
|
||||||
|
headers:
|
||||||
|
- name: nhost-webhook-secret
|
||||||
|
value_from_env: NHOST_WEBHOOK_SECRET
|
||||||
|
|||||||
@@ -17,7 +17,8 @@ array_relationships:
|
|||||||
name: profiles
|
name: profiles
|
||||||
schema: public
|
schema: public
|
||||||
select_permissions:
|
select_permissions:
|
||||||
- permission:
|
- role: user
|
||||||
|
permission:
|
||||||
columns:
|
columns:
|
||||||
- id
|
- id
|
||||||
- created_at
|
- created_at
|
||||||
@@ -28,10 +29,9 @@ select_permissions:
|
|||||||
profiles:
|
profiles:
|
||||||
user_id:
|
user_id:
|
||||||
_eq: X-Hasura-User-Id
|
_eq: X-Hasura-User-Id
|
||||||
role: user
|
|
||||||
update_permissions:
|
update_permissions:
|
||||||
- permission:
|
- role: user
|
||||||
check: null
|
permission:
|
||||||
columns:
|
columns:
|
||||||
- address
|
- address
|
||||||
- name
|
- name
|
||||||
@@ -39,4 +39,4 @@ update_permissions:
|
|||||||
profiles:
|
profiles:
|
||||||
user_id:
|
user_id:
|
||||||
_eq: X-Hasura-User-Id
|
_eq: X-Hasura-User-Id
|
||||||
role: user
|
check: null
|
||||||
|
|||||||
@@ -9,21 +9,21 @@ object_relationships:
|
|||||||
using:
|
using:
|
||||||
foreign_key_constraint_on: author_user_id
|
foreign_key_constraint_on: author_user_id
|
||||||
insert_permissions:
|
insert_permissions:
|
||||||
- permission:
|
- role: user
|
||||||
backend_only: false
|
permission:
|
||||||
check:
|
check:
|
||||||
customer:
|
customer:
|
||||||
company:
|
company:
|
||||||
profiles:
|
profiles:
|
||||||
user_id:
|
user_id:
|
||||||
_eq: X-Hasura-User-Id
|
_eq: X-Hasura-User-Id
|
||||||
columns:
|
|
||||||
- comment
|
|
||||||
set:
|
set:
|
||||||
author_user_id: x-hasura-user-id
|
author_user_id: x-hasura-user-id
|
||||||
role: user
|
columns:
|
||||||
|
- comment
|
||||||
select_permissions:
|
select_permissions:
|
||||||
- permission:
|
- role: user
|
||||||
|
permission:
|
||||||
columns:
|
columns:
|
||||||
- comment
|
- comment
|
||||||
- created_at
|
- created_at
|
||||||
@@ -37,21 +37,21 @@ select_permissions:
|
|||||||
profiles:
|
profiles:
|
||||||
user_id:
|
user_id:
|
||||||
_eq: X-Hasura-User-Id
|
_eq: X-Hasura-User-Id
|
||||||
role: user
|
|
||||||
update_permissions:
|
update_permissions:
|
||||||
- permission:
|
- role: user
|
||||||
check: null
|
permission:
|
||||||
columns:
|
columns:
|
||||||
- comment
|
- comment
|
||||||
filter:
|
filter:
|
||||||
user:
|
user:
|
||||||
id:
|
id:
|
||||||
_eq: X-Hasura-User-Id
|
_eq: X-Hasura-User-Id
|
||||||
role: user
|
check: null
|
||||||
delete_permissions:
|
delete_permissions:
|
||||||
- permission:
|
- role: user
|
||||||
|
permission:
|
||||||
|
backend_only: false
|
||||||
filter:
|
filter:
|
||||||
user:
|
user:
|
||||||
id:
|
id:
|
||||||
_eq: X-Hasura-User-Id
|
_eq: X-Hasura-User-Id
|
||||||
role: user
|
|
||||||
|
|||||||
@@ -14,8 +14,8 @@ array_relationships:
|
|||||||
name: customer_comments
|
name: customer_comments
|
||||||
schema: public
|
schema: public
|
||||||
insert_permissions:
|
insert_permissions:
|
||||||
- permission:
|
- role: user
|
||||||
backend_only: false
|
permission:
|
||||||
check:
|
check:
|
||||||
company:
|
company:
|
||||||
profiles:
|
profiles:
|
||||||
@@ -24,9 +24,9 @@ insert_permissions:
|
|||||||
columns:
|
columns:
|
||||||
- address
|
- address
|
||||||
- name
|
- name
|
||||||
role: user
|
|
||||||
select_permissions:
|
select_permissions:
|
||||||
- permission:
|
- role: user
|
||||||
|
permission:
|
||||||
columns:
|
columns:
|
||||||
- address
|
- address
|
||||||
- name
|
- name
|
||||||
@@ -39,10 +39,9 @@ select_permissions:
|
|||||||
profiles:
|
profiles:
|
||||||
user_id:
|
user_id:
|
||||||
_eq: X-Hasura-User-Id
|
_eq: X-Hasura-User-Id
|
||||||
role: user
|
|
||||||
update_permissions:
|
update_permissions:
|
||||||
- permission:
|
- role: user
|
||||||
check: null
|
permission:
|
||||||
columns:
|
columns:
|
||||||
- address
|
- address
|
||||||
- name
|
- name
|
||||||
@@ -51,12 +50,13 @@ update_permissions:
|
|||||||
profiles:
|
profiles:
|
||||||
user_id:
|
user_id:
|
||||||
_eq: X-Hasura-User-Id
|
_eq: X-Hasura-User-Id
|
||||||
role: user
|
check: null
|
||||||
delete_permissions:
|
delete_permissions:
|
||||||
- permission:
|
- role: user
|
||||||
|
permission:
|
||||||
|
backend_only: false
|
||||||
filter:
|
filter:
|
||||||
company:
|
company:
|
||||||
profiles:
|
profiles:
|
||||||
user_id:
|
user_id:
|
||||||
_eq: X-Hasura-User-Id
|
_eq: X-Hasura-User-Id
|
||||||
role: user
|
|
||||||
|
|||||||
@@ -2,6 +2,13 @@ table:
|
|||||||
name: profiles
|
name: profiles
|
||||||
schema: public
|
schema: public
|
||||||
configuration:
|
configuration:
|
||||||
|
column_config:
|
||||||
|
company_id:
|
||||||
|
custom_name: companyId
|
||||||
|
id:
|
||||||
|
custom_name: id
|
||||||
|
user_id:
|
||||||
|
custom_name: userId
|
||||||
custom_column_names:
|
custom_column_names:
|
||||||
company_id: companyId
|
company_id: companyId
|
||||||
id: id
|
id: id
|
||||||
@@ -25,7 +32,8 @@ object_relationships:
|
|||||||
using:
|
using:
|
||||||
foreign_key_constraint_on: user_id
|
foreign_key_constraint_on: user_id
|
||||||
select_permissions:
|
select_permissions:
|
||||||
- permission:
|
- role: user
|
||||||
|
permission:
|
||||||
columns:
|
columns:
|
||||||
- id
|
- id
|
||||||
- user_id
|
- user_id
|
||||||
@@ -35,4 +43,3 @@ select_permissions:
|
|||||||
profiles:
|
profiles:
|
||||||
user_id:
|
user_id:
|
||||||
_eq: X-Hasura-User-Id
|
_eq: X-Hasura-User-Id
|
||||||
role: user
|
|
||||||
|
|||||||
@@ -2,6 +2,23 @@ table:
|
|||||||
name: buckets
|
name: buckets
|
||||||
schema: storage
|
schema: storage
|
||||||
configuration:
|
configuration:
|
||||||
|
column_config:
|
||||||
|
cache_control:
|
||||||
|
custom_name: cacheControl
|
||||||
|
created_at:
|
||||||
|
custom_name: createdAt
|
||||||
|
download_expiration:
|
||||||
|
custom_name: downloadExpiration
|
||||||
|
id:
|
||||||
|
custom_name: id
|
||||||
|
max_upload_file_size:
|
||||||
|
custom_name: maxUploadFileSize
|
||||||
|
min_upload_file_size:
|
||||||
|
custom_name: minUploadFileSize
|
||||||
|
presigned_urls_enabled:
|
||||||
|
custom_name: presignedUrlsEnabled
|
||||||
|
updated_at:
|
||||||
|
custom_name: updatedAt
|
||||||
custom_column_names:
|
custom_column_names:
|
||||||
cache_control: cacheControl
|
cache_control: cacheControl
|
||||||
created_at: createdAt
|
created_at: createdAt
|
||||||
|
|||||||
@@ -2,6 +2,27 @@ table:
|
|||||||
name: files
|
name: files
|
||||||
schema: storage
|
schema: storage
|
||||||
configuration:
|
configuration:
|
||||||
|
column_config:
|
||||||
|
bucket_id:
|
||||||
|
custom_name: bucketId
|
||||||
|
created_at:
|
||||||
|
custom_name: createdAt
|
||||||
|
etag:
|
||||||
|
custom_name: etag
|
||||||
|
id:
|
||||||
|
custom_name: id
|
||||||
|
is_uploaded:
|
||||||
|
custom_name: isUploaded
|
||||||
|
mime_type:
|
||||||
|
custom_name: mimeType
|
||||||
|
name:
|
||||||
|
custom_name: name
|
||||||
|
size:
|
||||||
|
custom_name: size
|
||||||
|
updated_at:
|
||||||
|
custom_name: updatedAt
|
||||||
|
uploaded_by_user_id:
|
||||||
|
custom_name: uploadedByUserId
|
||||||
custom_column_names:
|
custom_column_names:
|
||||||
bucket_id: bucketId
|
bucket_id: bucketId
|
||||||
created_at: createdAt
|
created_at: createdAt
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
- "!include auth_providers.yaml"
|
- "!include auth_providers.yaml"
|
||||||
- "!include auth_refresh_tokens.yaml"
|
- "!include auth_refresh_tokens.yaml"
|
||||||
- "!include auth_roles.yaml"
|
- "!include auth_roles.yaml"
|
||||||
|
- "!include auth_user_authenticators.yaml"
|
||||||
- "!include auth_user_providers.yaml"
|
- "!include auth_user_providers.yaml"
|
||||||
- "!include auth_user_roles.yaml"
|
- "!include auth_user_roles.yaml"
|
||||||
- "!include auth_users.yaml"
|
- "!include auth_users.yaml"
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
disabled_for_roles: []
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
[]
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{}
|
||||||
@@ -1,15 +1,13 @@
|
|||||||
metadata_directory: metadata
|
metadata_directory: metadata
|
||||||
services:
|
services:
|
||||||
mailhog:
|
|
||||||
port: 8025
|
|
||||||
hasura:
|
hasura:
|
||||||
version: v2.8.0
|
image: hasura/graphql-engine:v2.10.1
|
||||||
environment:
|
environment:
|
||||||
hasura_graphql_enable_remote_schema_permissions: false
|
hasura_graphql_enable_remote_schema_permissions: false
|
||||||
auth:
|
auth:
|
||||||
version: 0.10.0
|
image: nhost/hasura-auth:0.10.0
|
||||||
storage:
|
storage:
|
||||||
version: 0.2.3
|
image: nhost/hasura-storage:0.2.3
|
||||||
auth:
|
auth:
|
||||||
access_control:
|
access_control:
|
||||||
email:
|
email:
|
||||||
@@ -109,10 +107,10 @@ auth:
|
|||||||
from: ''
|
from: ''
|
||||||
messaging_service_id: ''
|
messaging_service_id: ''
|
||||||
smtp:
|
smtp:
|
||||||
host: nhost_mailhog
|
host: mailhog
|
||||||
method: ''
|
method: ''
|
||||||
pass: password
|
pass: password
|
||||||
port: 1807
|
port: 1025
|
||||||
secure: false
|
secure: false
|
||||||
sender: hasura-auth@example.com
|
sender: hasura-auth@example.com
|
||||||
user: user
|
user: user
|
||||||
|
|||||||
1
examples/nextjs/nhost/metadata/api_limits.yaml
Normal file
1
examples/nextjs/nhost/metadata/api_limits.yaml
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{}
|
||||||
@@ -2,6 +2,7 @@ table:
|
|||||||
name: provider_requests
|
name: provider_requests
|
||||||
schema: auth
|
schema: auth
|
||||||
configuration:
|
configuration:
|
||||||
|
column_config: {}
|
||||||
custom_column_names: {}
|
custom_column_names: {}
|
||||||
custom_name: authProviderRequests
|
custom_name: authProviderRequests
|
||||||
custom_root_fields:
|
custom_root_fields:
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ table:
|
|||||||
name: providers
|
name: providers
|
||||||
schema: auth
|
schema: auth
|
||||||
configuration:
|
configuration:
|
||||||
|
column_config: {}
|
||||||
custom_column_names: {}
|
custom_column_names: {}
|
||||||
custom_name: authProviders
|
custom_name: authProviders
|
||||||
custom_root_fields:
|
custom_root_fields:
|
||||||
|
|||||||
@@ -2,6 +2,15 @@ table:
|
|||||||
name: refresh_tokens
|
name: refresh_tokens
|
||||||
schema: auth
|
schema: auth
|
||||||
configuration:
|
configuration:
|
||||||
|
column_config:
|
||||||
|
created_at:
|
||||||
|
custom_name: createdAt
|
||||||
|
expires_at:
|
||||||
|
custom_name: expiresAt
|
||||||
|
refresh_token:
|
||||||
|
custom_name: refreshToken
|
||||||
|
user_id:
|
||||||
|
custom_name: userId
|
||||||
custom_column_names:
|
custom_column_names:
|
||||||
created_at: createdAt
|
created_at: createdAt
|
||||||
expires_at: expiresAt
|
expires_at: expiresAt
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ table:
|
|||||||
name: roles
|
name: roles
|
||||||
schema: auth
|
schema: auth
|
||||||
configuration:
|
configuration:
|
||||||
|
column_config: {}
|
||||||
custom_column_names: {}
|
custom_column_names: {}
|
||||||
custom_name: authRoles
|
custom_name: authRoles
|
||||||
custom_root_fields:
|
custom_root_fields:
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
table:
|
||||||
|
name: user_authenticators
|
||||||
|
schema: auth
|
||||||
|
configuration:
|
||||||
|
column_config:
|
||||||
|
credential_id:
|
||||||
|
custom_name: credentialId
|
||||||
|
credential_public_key:
|
||||||
|
custom_name: credentialPublicKey
|
||||||
|
user_id:
|
||||||
|
custom_name: userId
|
||||||
|
custom_column_names:
|
||||||
|
credential_id: credentialId
|
||||||
|
credential_public_key: credentialPublicKey
|
||||||
|
user_id: userId
|
||||||
|
custom_name: authUserAuthenticators
|
||||||
|
custom_root_fields:
|
||||||
|
delete: deleteAuthUserAuthenticators
|
||||||
|
delete_by_pk: deleteAuthUserAuthenticator
|
||||||
|
insert: insertAuthUserAuthenticators
|
||||||
|
insert_one: insertAuthUserAuthenticator
|
||||||
|
select: authUserAuthenticators
|
||||||
|
select_aggregate: authUserAuthenticatorsAggregate
|
||||||
|
select_by_pk: authUserAuthenticator
|
||||||
|
update: updateAuthUserAuthenticators
|
||||||
|
update_by_pk: updateAuthUserAuthenticator
|
||||||
|
object_relationships:
|
||||||
|
- name: user
|
||||||
|
using:
|
||||||
|
foreign_key_constraint_on: user_id
|
||||||
@@ -2,6 +2,21 @@ table:
|
|||||||
name: user_providers
|
name: user_providers
|
||||||
schema: auth
|
schema: auth
|
||||||
configuration:
|
configuration:
|
||||||
|
column_config:
|
||||||
|
access_token:
|
||||||
|
custom_name: accessToken
|
||||||
|
created_at:
|
||||||
|
custom_name: createdAt
|
||||||
|
provider_id:
|
||||||
|
custom_name: providerId
|
||||||
|
provider_user_id:
|
||||||
|
custom_name: providerUserId
|
||||||
|
refresh_token:
|
||||||
|
custom_name: refreshToken
|
||||||
|
updated_at:
|
||||||
|
custom_name: updatedAt
|
||||||
|
user_id:
|
||||||
|
custom_name: userId
|
||||||
custom_column_names:
|
custom_column_names:
|
||||||
access_token: accessToken
|
access_token: accessToken
|
||||||
created_at: createdAt
|
created_at: createdAt
|
||||||
|
|||||||
@@ -2,6 +2,11 @@ table:
|
|||||||
name: user_roles
|
name: user_roles
|
||||||
schema: auth
|
schema: auth
|
||||||
configuration:
|
configuration:
|
||||||
|
column_config:
|
||||||
|
created_at:
|
||||||
|
custom_name: createdAt
|
||||||
|
user_id:
|
||||||
|
custom_name: userId
|
||||||
custom_column_names:
|
custom_column_names:
|
||||||
created_at: createdAt
|
created_at: createdAt
|
||||||
user_id: userId
|
user_id: userId
|
||||||
|
|||||||
@@ -2,6 +2,45 @@ table:
|
|||||||
name: users
|
name: users
|
||||||
schema: auth
|
schema: auth
|
||||||
configuration:
|
configuration:
|
||||||
|
column_config:
|
||||||
|
active_mfa_type:
|
||||||
|
custom_name: activeMfaType
|
||||||
|
avatar_url:
|
||||||
|
custom_name: avatarUrl
|
||||||
|
created_at:
|
||||||
|
custom_name: createdAt
|
||||||
|
default_role:
|
||||||
|
custom_name: defaultRole
|
||||||
|
display_name:
|
||||||
|
custom_name: displayName
|
||||||
|
email_verified:
|
||||||
|
custom_name: emailVerified
|
||||||
|
is_anonymous:
|
||||||
|
custom_name: isAnonymous
|
||||||
|
last_seen:
|
||||||
|
custom_name: lastSeen
|
||||||
|
new_email:
|
||||||
|
custom_name: newEmail
|
||||||
|
otp_hash:
|
||||||
|
custom_name: otpHash
|
||||||
|
otp_hash_expires_at:
|
||||||
|
custom_name: otpHashExpiresAt
|
||||||
|
otp_method_last_used:
|
||||||
|
custom_name: otpMethodLastUsed
|
||||||
|
password_hash:
|
||||||
|
custom_name: passwordHash
|
||||||
|
phone_number:
|
||||||
|
custom_name: phoneNumber
|
||||||
|
phone_number_verified:
|
||||||
|
custom_name: phoneNumberVerified
|
||||||
|
ticket_expires_at:
|
||||||
|
custom_name: ticketExpiresAt
|
||||||
|
totp_secret:
|
||||||
|
custom_name: totpSecret
|
||||||
|
updated_at:
|
||||||
|
custom_name: updatedAt
|
||||||
|
webauthn_current_challenge:
|
||||||
|
custom_name: currentChallenge
|
||||||
custom_column_names:
|
custom_column_names:
|
||||||
active_mfa_type: activeMfaType
|
active_mfa_type: activeMfaType
|
||||||
avatar_url: avatarUrl
|
avatar_url: avatarUrl
|
||||||
@@ -21,6 +60,7 @@ configuration:
|
|||||||
ticket_expires_at: ticketExpiresAt
|
ticket_expires_at: ticketExpiresAt
|
||||||
totp_secret: totpSecret
|
totp_secret: totpSecret
|
||||||
updated_at: updatedAt
|
updated_at: updatedAt
|
||||||
|
webauthn_current_challenge: currentChallenge
|
||||||
custom_name: users
|
custom_name: users
|
||||||
custom_root_fields:
|
custom_root_fields:
|
||||||
delete: deleteUsers
|
delete: deleteUsers
|
||||||
@@ -37,6 +77,13 @@ object_relationships:
|
|||||||
using:
|
using:
|
||||||
foreign_key_constraint_on: default_role
|
foreign_key_constraint_on: default_role
|
||||||
array_relationships:
|
array_relationships:
|
||||||
|
- name: authenticators
|
||||||
|
using:
|
||||||
|
foreign_key_constraint_on:
|
||||||
|
column: user_id
|
||||||
|
table:
|
||||||
|
name: user_authenticators
|
||||||
|
schema: auth
|
||||||
- name: refreshTokens
|
- name: refreshTokens
|
||||||
using:
|
using:
|
||||||
foreign_key_constraint_on:
|
foreign_key_constraint_on:
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ table:
|
|||||||
name: books
|
name: books
|
||||||
schema: public
|
schema: public
|
||||||
select_permissions:
|
select_permissions:
|
||||||
- permission:
|
- role: user
|
||||||
|
permission:
|
||||||
columns:
|
columns:
|
||||||
- id
|
- id
|
||||||
- title
|
- title
|
||||||
filter: {}
|
filter: {}
|
||||||
role: user
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user