mirror of
https://github.com/lowdefy/lowdefy.git
synced 2025-04-06 15:30:30 +08:00
Merge pull request #535 from lowdefy/knex
This commit is contained in:
commit
08a7f8349a
BIN
.yarn/cache/@azure-abort-controller-npm-1.0.4-34d881263e-e772f6c9af.zip
vendored
Normal file
BIN
.yarn/cache/@azure-abort-controller-npm-1.0.4-34d881263e-e772f6c9af.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/@azure-core-auth-npm-1.2.0-4c86b84843-36fb630197.zip
vendored
Normal file
BIN
.yarn/cache/@azure-core-auth-npm-1.2.0-4c86b84843-36fb630197.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/@azure-ms-rest-azure-env-npm-1.1.2-c1c6e78885-70f52de1fe.zip
vendored
Normal file
BIN
.yarn/cache/@azure-ms-rest-azure-env-npm-1.1.2-c1c6e78885-70f52de1fe.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/@azure-ms-rest-js-npm-1.11.2-1f0635df68-a96f2f075e.zip
vendored
Normal file
BIN
.yarn/cache/@azure-ms-rest-js-npm-1.11.2-1f0635df68-a96f2f075e.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/@azure-ms-rest-nodeauth-npm-2.0.2-cccf9dbca0-65b0959c17.zip
vendored
Normal file
BIN
.yarn/cache/@azure-ms-rest-nodeauth-npm-2.0.2-cccf9dbca0-65b0959c17.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/@types-node-npm-12.20.7-73d5af0499-0c12d32c14.zip
vendored
Normal file
BIN
.yarn/cache/@types-node-npm-12.20.7-73d5af0499-0c12d32c14.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/@types-node-npm-8.10.66-b849acaf16-d4f105d5c9.zip
vendored
Normal file
BIN
.yarn/cache/@types-node-npm-8.10.66-b849acaf16-d4f105d5c9.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/@types-readable-stream-npm-2.3.9-506ceda8eb-f48e493650.zip
vendored
Normal file
BIN
.yarn/cache/@types-readable-stream-npm-2.3.9-506ceda8eb-f48e493650.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/adal-node-npm-0.1.28-50ce9ce733-e0612f4be3.zip
vendored
Normal file
BIN
.yarn/cache/adal-node-npm-0.1.28-50ce9ce733-e0612f4be3.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/async-npm-3.2.0-b6fd825ddc-5c7913c084.zip
vendored
Normal file
BIN
.yarn/cache/async-npm-3.2.0-b6fd825ddc-5c7913c084.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/bignumber.js-npm-9.0.0-ce190bcd7c-5968a936fb.zip
vendored
Normal file
BIN
.yarn/cache/bignumber.js-npm-9.0.0-ce190bcd7c-5968a936fb.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/bl-npm-3.0.1-fb8b706aac-7db2f70083.zip
vendored
Normal file
BIN
.yarn/cache/bl-npm-3.0.1-fb8b706aac-7db2f70083.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/block-stream-npm-0.0.9-ce3ced9c02-8018fa57ae.zip
vendored
Normal file
BIN
.yarn/cache/block-stream-npm-0.0.9-ce3ced9c02-8018fa57ae.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/buffer-writer-npm-2.0.0-5cd2ef55bc-aeeac620f1.zip
vendored
Normal file
BIN
.yarn/cache/buffer-writer-npm-2.0.0-5cd2ef55bc-aeeac620f1.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/commander-npm-7.2.0-19178180f8-bdc0eca5e2.zip
vendored
Normal file
BIN
.yarn/cache/commander-npm-7.2.0-19178180f8-bdc0eca5e2.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/date-utils-npm-1.2.21-439b57f53d-b36a47f35c.zip
vendored
Normal file
BIN
.yarn/cache/date-utils-npm-1.2.21-439b57f53d-b36a47f35c.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/debug-npm-4.3.1-22e08d605e-0d41ba5177.zip
vendored
Normal file
BIN
.yarn/cache/debug-npm-4.3.1-22e08d605e-0d41ba5177.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/depd-npm-2.0.0-b6c51a4b43-20726d843f.zip
vendored
Normal file
BIN
.yarn/cache/depd-npm-2.0.0-b6c51a4b43-20726d843f.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/detect-libc-npm-1.0.3-c30ac344d4-6cec442139.zip
vendored
Normal file
BIN
.yarn/cache/detect-libc-npm-1.0.3-c30ac344d4-6cec442139.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/esm-npm-3.2.25-762b3ebd40-12a0272aaa.zip
vendored
Normal file
BIN
.yarn/cache/esm-npm-3.2.25-762b3ebd40-12a0272aaa.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/form-data-npm-2.5.1-47256351b5-c46ee9a14a.zip
vendored
Normal file
BIN
.yarn/cache/form-data-npm-2.5.1-47256351b5-c46ee9a14a.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/fstream-npm-1.0.12-db27e8a713-61c76d2c8d.zip
vendored
Normal file
BIN
.yarn/cache/fstream-npm-1.0.12-db27e8a713-61c76d2c8d.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/getopts-npm-2.2.5-550074bd56-cd7db41344.zip
vendored
Normal file
BIN
.yarn/cache/getopts-npm-2.2.5-550074bd56-cd7db41344.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/iconv-lite-npm-0.5.2-04e4678c41-b54433bf01.zip
vendored
Normal file
BIN
.yarn/cache/iconv-lite-npm-0.5.2-04e4678c41-b54433bf01.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/jsbi-npm-3.1.4-248bd487e1-8e8e03bbdd.zip
vendored
Normal file
BIN
.yarn/cache/jsbi-npm-3.1.4-248bd487e1-8e8e03bbdd.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/knex-npm-0.95.4-6b4565ac8d-a9805bcfc1.zip
vendored
Normal file
BIN
.yarn/cache/knex-npm-0.95.4-6b4565ac8d-a9805bcfc1.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/lodash-npm-4.17.21-6382451519-4983720b9a.zip
vendored
Normal file
BIN
.yarn/cache/lodash-npm-4.17.21-6382451519-4983720b9a.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/mssql-npm-6.3.1-f0c65b9705-f3558a0296.zip
vendored
Normal file
BIN
.yarn/cache/mssql-npm-6.3.1-f0c65b9705-f3558a0296.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/mysql-npm-2.18.1-8fdb56201f-07c6c6c442.zip
vendored
Normal file
BIN
.yarn/cache/mysql-npm-2.18.1-8fdb56201f-07c6c6c442.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/native-duplexpair-npm-1.0.0-5ee9036c39-48359df17d.zip
vendored
Normal file
BIN
.yarn/cache/native-duplexpair-npm-1.0.0-5ee9036c39-48359df17d.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/needle-npm-2.6.0-11708fcd8b-0a00060d58.zip
vendored
Normal file
BIN
.yarn/cache/needle-npm-2.6.0-11708fcd8b-0a00060d58.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/node-addon-api-npm-3.1.0-a15037f88c-9b5c1f5f24.zip
vendored
Normal file
BIN
.yarn/cache/node-addon-api-npm-3.1.0-a15037f88c-9b5c1f5f24.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/node-gyp-npm-3.8.0-34b3928909-bbea370ec5.zip
vendored
Normal file
BIN
.yarn/cache/node-gyp-npm-3.8.0-34b3928909-bbea370ec5.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/node-pre-gyp-npm-0.11.0-df386f4c01-c166a62588.zip
vendored
Normal file
BIN
.yarn/cache/node-pre-gyp-npm-0.11.0-df386f4c01-c166a62588.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/nopt-npm-3.0.6-370ee63cf6-cb2105d528.zip
vendored
Normal file
BIN
.yarn/cache/nopt-npm-3.0.6-370ee63cf6-cb2105d528.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/oracledb-npm-5.1.0-5af4450ffa-c4dd2c6ac0.zip
vendored
Normal file
BIN
.yarn/cache/oracledb-npm-5.1.0-5af4450ffa-c4dd2c6ac0.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/packet-reader-npm-1.0.0-e93c92246b-fdbf006717.zip
vendored
Normal file
BIN
.yarn/cache/packet-reader-npm-1.0.0-e93c92246b-fdbf006717.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/pg-connection-string-npm-2.4.0-f4a243776a-fdb3ec1c3d.zip
vendored
Normal file
BIN
.yarn/cache/pg-connection-string-npm-2.4.0-f4a243776a-fdb3ec1c3d.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/pg-int8-npm-1.0.1-5cd67f3e22-b18c3a18e5.zip
vendored
Normal file
BIN
.yarn/cache/pg-int8-npm-1.0.1-5cd67f3e22-b18c3a18e5.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/pg-npm-8.5.1-fadefeb3ad-b8eed3cd38.zip
vendored
Normal file
BIN
.yarn/cache/pg-npm-8.5.1-fadefeb3ad-b8eed3cd38.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/pg-pool-npm-3.2.2-0c6a03a132-d25d4d0757.zip
vendored
Normal file
BIN
.yarn/cache/pg-pool-npm-3.2.2-0c6a03a132-d25d4d0757.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/pg-protocol-npm-1.4.0-196559396d-2b5ebfccd0.zip
vendored
Normal file
BIN
.yarn/cache/pg-protocol-npm-1.4.0-196559396d-2b5ebfccd0.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/pg-types-npm-2.2.0-a3360226c4-3c36335465.zip
vendored
Normal file
BIN
.yarn/cache/pg-types-npm-2.2.0-a3360226c4-3c36335465.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/pgpass-npm-1.0.4-c96230be37-39234fabf0.zip
vendored
Normal file
BIN
.yarn/cache/pgpass-npm-1.0.4-c96230be37-39234fabf0.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/postgres-array-npm-2.0.0-4f49dc1389-99fd702c5c.zip
vendored
Normal file
BIN
.yarn/cache/postgres-array-npm-2.0.0-4f49dc1389-99fd702c5c.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/postgres-bytea-npm-1.0.0-8c2b81fa73-a3399e0645.zip
vendored
Normal file
BIN
.yarn/cache/postgres-bytea-npm-1.0.0-8c2b81fa73-a3399e0645.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/postgres-date-npm-1.0.7-aadfe5531e-823b22d37c.zip
vendored
Normal file
BIN
.yarn/cache/postgres-date-npm-1.0.7-aadfe5531e-823b22d37c.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/postgres-interval-npm-1.2.0-ca6414744d-a882aae6c3.zip
vendored
Normal file
BIN
.yarn/cache/postgres-interval-npm-1.2.0-ca6414744d-a882aae6c3.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/semver-npm-5.3.0-520e1d15f2-8211d9f88e.zip
vendored
Normal file
BIN
.yarn/cache/semver-npm-5.3.0-520e1d15f2-8211d9f88e.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/sprintf-js-npm-1.1.2-ea16269a6d-50d2008328.zip
vendored
Normal file
BIN
.yarn/cache/sprintf-js-npm-1.1.2-ea16269a6d-50d2008328.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/sqlite3-npm-5.0.2-7fc32b45f3-3fc6876e88.zip
vendored
Normal file
BIN
.yarn/cache/sqlite3-npm-5.0.2-7fc32b45f3-3fc6876e88.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/sqlstring-npm-2.3.1-2d4ffafe98-d10f04099c.zip
vendored
Normal file
BIN
.yarn/cache/sqlstring-npm-2.3.1-2d4ffafe98-d10f04099c.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/tar-npm-2.2.2-0ce6504da4-a8eeafd7ea.zip
vendored
Normal file
BIN
.yarn/cache/tar-npm-2.2.2-0ce6504da4-a8eeafd7ea.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/tarn-npm-1.1.5-6206bbbc92-a72300be92.zip
vendored
Normal file
BIN
.yarn/cache/tarn-npm-1.1.5-6206bbbc92-a72300be92.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/tarn-npm-3.0.1-afc495be8f-132dd6c6c3.zip
vendored
Normal file
BIN
.yarn/cache/tarn-npm-3.0.1-afc495be8f-132dd6c6c3.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/tedious-npm-6.7.0-b1277dfccf-fc093389da.zip
vendored
Normal file
BIN
.yarn/cache/tedious-npm-6.7.0-b1277dfccf-fc093389da.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/tildify-npm-2.0.0-324bfdd523-c5743c23c5.zip
vendored
Normal file
BIN
.yarn/cache/tildify-npm-2.0.0-324bfdd523-c5743c23c5.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/underscore-npm-1.12.1-f5ca0889f5-b53ae924fe.zip
vendored
Normal file
BIN
.yarn/cache/underscore-npm-1.12.1-f5ca0889f5-b53ae924fe.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/xml2js-npm-0.4.23-93a8b2e10b-5e6e539557.zip
vendored
Normal file
BIN
.yarn/cache/xml2js-npm-0.4.23-93a8b2e10b-5e6e539557.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/xmlbuilder-npm-11.0.1-b8b04dc929-8f479b28b5.zip
vendored
Normal file
BIN
.yarn/cache/xmlbuilder-npm-11.0.1-b8b04dc929-8f479b28b5.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/xmldom-npm-0.5.0-cea586e8b3-da2d23fe8e.zip
vendored
Normal file
BIN
.yarn/cache/xmldom-npm-0.5.0-cea586e8b3-da2d23fe8e.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/xpath.js-npm-1.1.0-21de325652-ea017dceb3.zip
vendored
Normal file
BIN
.yarn/cache/xpath.js-npm-1.1.0-21de325652-ea017dceb3.zip
vendored
Normal file
Binary file not shown.
@ -55,9 +55,15 @@
|
||||
"graphql": "15.5.0",
|
||||
"inquirer": "7.3.3",
|
||||
"js-yaml": "4.0.0",
|
||||
"mssql": "6.3.1",
|
||||
"mysql": "2.18.1",
|
||||
"opener": "1.5.2",
|
||||
"ora": "5.3.0",
|
||||
"oracledb": "5.1.0",
|
||||
"pg": "8.5.1",
|
||||
"reload": "3.1.1",
|
||||
"saslprep": "1.0.3",
|
||||
"sqlite3": "5.0.2",
|
||||
"uuid": "8.3.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
@ -16,7 +16,7 @@ _ref:
|
||||
path: templates/general.yaml.njk
|
||||
vars:
|
||||
pageId: AWSS3
|
||||
pageTitle: AWSS3
|
||||
pageTitle: Amazon S3
|
||||
section: Connections
|
||||
filePath: connections/AWSS3.yaml
|
||||
content:
|
||||
@ -48,22 +48,27 @@ _ref:
|
||||
- `read: boolean`: Default: `true` - Allow reads from the bucket.
|
||||
- `write: boolean`: Default: `false` - Allow writes to the bucket.
|
||||
|
||||
### Examples
|
||||
#### Examples
|
||||
|
||||
Read and writes on a bucket:
|
||||
###### Read and writes on a bucket:
|
||||
```yaml
|
||||
connections:
|
||||
- id: my_bucket
|
||||
type: AwsS3Bucket
|
||||
properties:
|
||||
accessKeyId:
|
||||
_secret: my_bucket_access_key_id
|
||||
_secret: S3_ACCESS_KEY_ID
|
||||
secretAccessKey:
|
||||
_secret: my_bucket_secret_access_key
|
||||
_secret: S3_SECRET_ACCESS_KEY
|
||||
region: eu-west-1
|
||||
bucket: my-bucket-name
|
||||
write: true
|
||||
```
|
||||
Environment variables:
|
||||
```
|
||||
LOWDEFY_SECRET_S3_ACCESS_KEY_ID = AKIAIOSFODNN7EXAMPLE
|
||||
LOWDEFY_SECRET_S3_SECRET_ACCESS_KEY = wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
|
||||
```
|
||||
|
||||
## Requests
|
||||
|
||||
@ -82,9 +87,9 @@ _ref:
|
||||
- `responseContentType: string`: Sets the Content-Type header of the response.
|
||||
- `responseContentDisposition: string`: Sets the Content-Disposition header of the response.
|
||||
|
||||
### Examples
|
||||
#### Examples
|
||||
|
||||
Download a pdf and open in a new tab:
|
||||
###### Download a pdf and open in a new tab:
|
||||
```yaml
|
||||
requests:
|
||||
- id: my_file_link
|
||||
@ -126,9 +131,9 @@ _ref:
|
||||
- `key: string`: __Required__ - Key (or filename) under which object will be stored. If another file is saved with the same key, that file will be overwritten, so a random string in this field is probably needed.
|
||||
|
||||
|
||||
### Examples
|
||||
#### Examples
|
||||
|
||||
Upload a file with user filename and random id:
|
||||
###### Upload a file with user filename and random id:
|
||||
```yaml
|
||||
- id: my_post_policy
|
||||
type: AwsS3PresignedPostPolicy
|
||||
|
75
packages/docs/connections/AmazonRedshift.yaml
Normal file
75
packages/docs/connections/AmazonRedshift.yaml
Normal file
@ -0,0 +1,75 @@
|
||||
# Copyright 2020-2021 Lowdefy, Inc
|
||||
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
_ref:
|
||||
path: templates/general.yaml.njk
|
||||
vars:
|
||||
pageId: AmazonRedshift
|
||||
pageTitle: Amazon Redshift
|
||||
section: Connections
|
||||
filePath: connections/AmazonRedshift.yaml
|
||||
content:
|
||||
- id: markdown_intro
|
||||
type: Markdown
|
||||
properties:
|
||||
content: |
|
||||
The [Knex](/Knex) connection can be used to connect to a [Amazon Redshift](https://aws.amazon.com/redshift) database.
|
||||
|
||||
- id: markdown_connection
|
||||
type: MarkdownWithCode
|
||||
properties:
|
||||
content: |
|
||||
## Connections
|
||||
|
||||
Connection types:
|
||||
- Knex
|
||||
|
||||
### Knex
|
||||
|
||||
#### Properties
|
||||
- `client: enum`: __Required__ - Should be `redshift` to connect to Amazon Redshift.
|
||||
- `connection: object | string`: __Required__ - Connection string or object to pass to the [`pg`](https://www.npmjs.com/package/pg) database client.
|
||||
- `useNullAsDefault: boolean`: If true, undefined keys are replaced with NULL instead of DEFAULT.
|
||||
|
||||
#### Examples
|
||||
|
||||
###### Connection object:
|
||||
```yaml
|
||||
connections:
|
||||
- id: redshift
|
||||
type: Knex
|
||||
properties:
|
||||
client: redshift
|
||||
connection:
|
||||
host:
|
||||
_secret: REDSHIFT_HOST
|
||||
database:
|
||||
_secret: REDSHIFT_DB
|
||||
user:
|
||||
_secret: REDSHIFT_USER
|
||||
password:
|
||||
_secret: REDSHIFT_PASSWORD
|
||||
```
|
||||
Environment variables:
|
||||
```
|
||||
LOWDEFY_SECRET_REDSHIFT_HOST = examplecluster.XXXXXXXXXXXX.us-west-2.redshift.amazonaws.com
|
||||
LOWDEFY_SECRET_REDSHIFT_REDSHIFT_DB = db
|
||||
LOWDEFY_SECRET_REDSHIFT_USER = user
|
||||
LOWDEFY_SECRET_REDSHIFT_PASSWORD = password
|
||||
```
|
||||
- id: markdown_requests
|
||||
type: MarkdownWithCode
|
||||
properties:
|
||||
content:
|
||||
_ref: connections/KnexRequests.md
|
@ -77,31 +77,31 @@ _ref:
|
||||
- `auth: object`: Object with username and password.
|
||||
|
||||
|
||||
### Examples
|
||||
#### Examples
|
||||
|
||||
Properties for a AxiosHttp can be set on either the connection, the request, or both. However, both a connection and request need to be defined.
|
||||
|
||||
Using the connection to set baseUrl and authorization, and handle specific requests as requests.
|
||||
###### Using the connection to set baseUrl and authorization, and handle specific requests as requests.
|
||||
```yaml
|
||||
connections:
|
||||
- id: myapp_api
|
||||
- id: app_api
|
||||
type: AxiosHttp
|
||||
properties:
|
||||
baseUrl: myapp.com/api
|
||||
baseUrl: app.com/api
|
||||
auth:
|
||||
username: lowdefy_api_user
|
||||
username: api_user
|
||||
password:
|
||||
_secret: lowdefy_api_password
|
||||
_secret: API_PASSWORD
|
||||
# ...
|
||||
requests:
|
||||
- id: get_orders
|
||||
type: AxiosHttp
|
||||
connectionId: myapp_api
|
||||
connectionId: app_api
|
||||
properties:
|
||||
url: /orders
|
||||
- id: update_order
|
||||
type: AxiosHttp
|
||||
connectionId: myapp_api
|
||||
connectionId: app_api
|
||||
properties:
|
||||
url:
|
||||
_nunjucks: /orders/{{ order_id }}
|
||||
@ -111,7 +111,7 @@ _ref:
|
||||
```
|
||||
|
||||
|
||||
Setting properties on only the connection:
|
||||
###### Setting properties on only the connection:
|
||||
```yaml
|
||||
connections:
|
||||
- id: get_count
|
||||
@ -120,7 +120,7 @@ _ref:
|
||||
url: myapp.com/api/count
|
||||
headers:
|
||||
X-Api-Key:
|
||||
_secret: my_api_key
|
||||
_secret: API_KEY
|
||||
# ...
|
||||
requests:
|
||||
- id: get_count
|
||||
@ -128,7 +128,7 @@ _ref:
|
||||
connectionId: get_count
|
||||
```
|
||||
|
||||
Setting properties on only the request, and using a generic connection:
|
||||
###### Setting properties on only the request, and using a generic connection:
|
||||
```yaml
|
||||
connections:
|
||||
- id: axios
|
||||
|
@ -33,7 +33,7 @@ _ref:
|
||||
|
||||
The `GoogleSheet` connection can be used to connect to a Google using an API key or a service account. An API key can only be used for read-only access to public sheets, so most applications should use a service account. A guide to creating a service account can be found in the [tutorial](/tutorial-requests).
|
||||
|
||||
This connection refers to the entire document as the 'spreadsheet', and the individual sheets in the document as 'sheets'. The spreadsheet is identified by it's spreadsheetId, and sheets can either be identified by their sheetId or their index (position in the document starting from 0).
|
||||
This connection refers to the entire document as the `spreadsheet`, and the individual sheets in the document as `sheets`. The spreadsheet is identified by it's `spreadsheetId`, and sheets can either be identified by their `sheetId` or their `index` (position in the document starting from 0).
|
||||
|
||||
When a sheet is accessed in a browser the url either looks like:
|
||||
`https://docs.google.com/spreadsheets/d/{spreadsheetId}/edit#gid={sheetId}`
|
||||
@ -53,7 +53,7 @@ _ref:
|
||||
|
||||
#### Examples
|
||||
|
||||
Read only access to first sheet in a public spreadsheet:
|
||||
###### Read only access to first sheet in a public spreadsheet:
|
||||
```yaml
|
||||
connections:
|
||||
- id: public_sheet
|
||||
@ -65,7 +65,7 @@ _ref:
|
||||
spreadsheetId: ubQsWYNGRUq0gFB1sAp2r9oYE19lZ8yGA1T6y0yBoLPW
|
||||
```
|
||||
|
||||
Access with a service account, with defined types:
|
||||
###### Access with a service account, with defined types:
|
||||
```yaml
|
||||
connections:
|
||||
- id: my_sheet
|
||||
@ -108,7 +108,7 @@ _ref:
|
||||
|
||||
#### Examples
|
||||
|
||||
Insert a list of rows.
|
||||
###### Insert a list of rows.
|
||||
```yaml
|
||||
requests:
|
||||
- id: append_rows
|
||||
@ -139,7 +139,7 @@ _ref:
|
||||
|
||||
#### Examples
|
||||
|
||||
Insert a single row:
|
||||
###### Insert a single row:
|
||||
```yaml
|
||||
requests:
|
||||
- id: insert_dva
|
||||
@ -165,7 +165,7 @@ _ref:
|
||||
|
||||
#### Examples
|
||||
|
||||
Delete the row where name is "Hanzo".
|
||||
###### Delete the row where name is "Hanzo".
|
||||
```yaml
|
||||
requests:
|
||||
- id: delete_hanzo
|
||||
@ -190,7 +190,7 @@ _ref:
|
||||
|
||||
#### Examples
|
||||
|
||||
Get the first 10 rows.
|
||||
###### Get the first 10 rows.
|
||||
```yaml
|
||||
requests:
|
||||
- id: get_10_rows
|
||||
@ -201,7 +201,7 @@ _ref:
|
||||
limit: 10
|
||||
```
|
||||
|
||||
Pagination using limit and skip.
|
||||
###### Pagination using limit and skip.
|
||||
```yaml
|
||||
requests:
|
||||
- id: get_10_rows
|
||||
@ -219,7 +219,7 @@ _ref:
|
||||
_state: page_size
|
||||
```
|
||||
|
||||
Get all records where age is greater than 25.
|
||||
###### Get all records where age is greater than 25.
|
||||
```yaml
|
||||
requests:
|
||||
- id: get_10_rows
|
||||
@ -231,7 +231,7 @@ _ref:
|
||||
$gt: 25
|
||||
```
|
||||
|
||||
Use an aggregation pipeline to aggregate data.
|
||||
###### Use an aggregation pipeline to aggregate data.
|
||||
```yaml
|
||||
requests:
|
||||
- id: get_10_rows
|
||||
@ -263,7 +263,7 @@ _ref:
|
||||
|
||||
#### Examples
|
||||
|
||||
Get row where name is "Zarya".
|
||||
###### Get row where name is "Zarya".
|
||||
```yaml
|
||||
requests:
|
||||
- id: get_10_rows
|
||||
@ -289,7 +289,7 @@ _ref:
|
||||
|
||||
#### Examples
|
||||
|
||||
Update all rows where age is less than 18.
|
||||
###### Update all rows where age is less than 18.
|
||||
```yaml
|
||||
requests:
|
||||
- id: get_10_rows
|
||||
@ -317,7 +317,7 @@ _ref:
|
||||
|
||||
#### Examples
|
||||
|
||||
Update the row for "Doomfist"
|
||||
###### Update the row for "Doomfist"
|
||||
```yaml
|
||||
requests:
|
||||
- id: get_10_rows
|
||||
|
181
packages/docs/connections/Knex.yaml
Normal file
181
packages/docs/connections/Knex.yaml
Normal file
@ -0,0 +1,181 @@
|
||||
# Copyright 2020-2021 Lowdefy, Inc
|
||||
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
_ref:
|
||||
path: templates/general.yaml.njk
|
||||
vars:
|
||||
pageId: Knex
|
||||
pageTitle: Knex
|
||||
section: Connections
|
||||
filePath: connections/Knex.yaml
|
||||
content:
|
||||
- id: markdown_intro
|
||||
type: MarkdownWithCode
|
||||
properties:
|
||||
content: |
|
||||
[`Knex.js`](http://knexjs.org) is a SQL query builder that can be used to connect to [PostgreSQL](/PostgreSQL), [MS SQL Server](/MSSQL), [MySQL](/MySQL), [MariaDB](/MariaDB), [SQLite](/SQLite), [Oracle](/Oracle), and [Amazon Redshift](/AmazonRedshift) databases.
|
||||
|
||||
The Knex connection can be used to execute raw SQL queries using the `KnexRaw` requests, or the Knex query builder can be used with the `KnexBuilder` request.
|
||||
|
||||
For more details on specific databases, see the database documentation:
|
||||
- id: amazon_redshift_link
|
||||
type: Anchor
|
||||
properties:
|
||||
title: Amazon Redshift
|
||||
icon: LinkOutlined
|
||||
events:
|
||||
onClick:
|
||||
- id: link,
|
||||
type: Link
|
||||
params:
|
||||
pageId: AmazonRedshift
|
||||
- id: mariadb_link
|
||||
type: Anchor
|
||||
properties:
|
||||
title: MariaDB
|
||||
icon: LinkOutlined
|
||||
events:
|
||||
onClick:
|
||||
- id: link,
|
||||
type: Link
|
||||
params:
|
||||
pageId: MariaDB
|
||||
- id: mssql_link
|
||||
type: Anchor
|
||||
properties:
|
||||
title: MS SQL Server
|
||||
icon: LinkOutlined
|
||||
events:
|
||||
onClick:
|
||||
- id: link,
|
||||
type: Link
|
||||
params:
|
||||
pageId: MSSQL
|
||||
- id: mysql_link
|
||||
type: Anchor
|
||||
properties:
|
||||
title: MySQL
|
||||
icon: LinkOutlined
|
||||
events:
|
||||
onClick:
|
||||
- id: link,
|
||||
type: Link
|
||||
params:
|
||||
pageId: MySQL
|
||||
- id: oracle_link
|
||||
type: Anchor
|
||||
properties:
|
||||
title: Oracle Database
|
||||
icon: LinkOutlined
|
||||
events:
|
||||
onClick:
|
||||
- id: link,
|
||||
type: Link
|
||||
params:
|
||||
pageId: OracleDB
|
||||
- id: postgresql_link
|
||||
type: Anchor
|
||||
properties:
|
||||
title: PostgreSQL
|
||||
icon: LinkOutlined
|
||||
events:
|
||||
onClick:
|
||||
- id: link,
|
||||
type: Link
|
||||
params:
|
||||
pageId: PostgreSQL
|
||||
- id: sqlite_link
|
||||
type: Anchor
|
||||
properties:
|
||||
title: SQLite
|
||||
icon: LinkOutlined
|
||||
events:
|
||||
onClick:
|
||||
- id: link,
|
||||
type: Link
|
||||
params:
|
||||
pageId: SQLite
|
||||
- id: markdown_connection
|
||||
type: MarkdownWithCode
|
||||
properties:
|
||||
content: |
|
||||
## Connections
|
||||
|
||||
Connection types:
|
||||
- Knex
|
||||
|
||||
### Knex
|
||||
|
||||
#### Properties
|
||||
- `client: enum`: __Required__ - The database client to use. One of:
|
||||
- `mssql`
|
||||
- `mysql`
|
||||
- `oracledb`
|
||||
- `postgres`
|
||||
- `pg` (alias of `postgres`)
|
||||
- `postgresql` (alias of `postgres`)
|
||||
- `redshift`
|
||||
- `sqlite3`
|
||||
- `sqlite` (alias of `sqlite3`)
|
||||
- `connection: object | string`: __Required__ - Connection string or object to pass to the database client. See the specific client documentation for more details.
|
||||
- `searchPath: string`: Set PostgreSQL search path.
|
||||
- `version: string`: Set database version.
|
||||
- `useNullAsDefault: boolean`: If true, undefined keys are replaced with NULL instead of DEFAULT.
|
||||
|
||||
#### Examples
|
||||
|
||||
###### MySQL with connection object:
|
||||
```yaml
|
||||
connections:
|
||||
- id: mysql
|
||||
type: Knex
|
||||
properties:
|
||||
client: mysql
|
||||
connection:
|
||||
host:
|
||||
_secret: MYSQL_HOST
|
||||
user:
|
||||
_secret: MYSQL_USER
|
||||
database:
|
||||
_secret: MYSQL_DB
|
||||
password:
|
||||
_secret: MYSQL_PASSWORD
|
||||
```
|
||||
Environment variables:
|
||||
```
|
||||
LOWDEFY_SECRET_MYSQL_HOST = database.server.com
|
||||
LOWDEFY_SECRET_MYSQL_DB = db
|
||||
LOWDEFY_SECRET_MYSQL_USER = user
|
||||
LOWDEFY_SECRET_MYSQL_PASSWORD = password
|
||||
```
|
||||
|
||||
###### PostgreSQL with secret connection string:
|
||||
```yaml
|
||||
connections:
|
||||
- id: postgres
|
||||
type: Knex
|
||||
properties:
|
||||
client: postgres
|
||||
connection:
|
||||
_secret: PG_CONNECTION_STRING
|
||||
```
|
||||
Environment variables:
|
||||
```
|
||||
LOWDEFY_SECRET_PG_CONNECTION_STRING = postgresql://user:password@database.server.com:5432/db
|
||||
```
|
||||
- id: markdown_requests
|
||||
type: MarkdownWithCode
|
||||
properties:
|
||||
content:
|
||||
_ref: connections/KnexRequests.md
|
121
packages/docs/connections/KnexRequests.md
Normal file
121
packages/docs/connections/KnexRequests.md
Normal file
@ -0,0 +1,121 @@
|
||||
## Requests
|
||||
|
||||
Request types:
|
||||
|
||||
- KnexBuilder
|
||||
- KnexRaw
|
||||
|
||||
### KnexBuilder
|
||||
|
||||
#### Properties
|
||||
|
||||
- `query: object[]`: **Required** - SQL query builder array. An array of objects, with a single key which is the name of the knex builder function. The value should be an array of arguments to pass to the builder function.
|
||||
- `tableName: string | object`: The name of the table to query from.
|
||||
|
||||
#### Examples
|
||||
|
||||
###### Build a query:
|
||||
|
||||
```yaml
|
||||
id: knexBuilder
|
||||
type: KnexBuilder
|
||||
connectionId: knex
|
||||
properties:
|
||||
query:
|
||||
- select:
|
||||
- '*'
|
||||
- from:
|
||||
- users
|
||||
- where:
|
||||
- name
|
||||
- _state: name
|
||||
```
|
||||
|
||||
###### Using `tableName`:
|
||||
|
||||
```yaml
|
||||
id: knexBuilder
|
||||
type: KnexBuilder
|
||||
connectionId: knex
|
||||
properties:
|
||||
tableName: users
|
||||
query:
|
||||
- select:
|
||||
- '*'
|
||||
- where:
|
||||
- name
|
||||
- _state: name
|
||||
```
|
||||
|
||||
###### Aliases:
|
||||
|
||||
```yaml
|
||||
id: knexBuilder
|
||||
type: KnexBuilder
|
||||
connectionId: knex
|
||||
properties:
|
||||
tableName:
|
||||
a: tableA
|
||||
b: tableB
|
||||
query:
|
||||
- select:
|
||||
- aField: 'a.field'
|
||||
- bField: 'b.field'
|
||||
- limit:
|
||||
- 1
|
||||
```
|
||||
|
||||
### KnexRaw
|
||||
|
||||
#### Properties
|
||||
|
||||
- `query: string`: **Required** - SQL query string.
|
||||
- `parameters: string | number | array | object`: SQL query parameters.
|
||||
|
||||
#### Examples
|
||||
|
||||
###### Simple raw query:
|
||||
|
||||
```yaml
|
||||
id: knexRaw
|
||||
type: KnexRaw
|
||||
connectionId: knex
|
||||
properties:
|
||||
query: SELECT * FROM "my_table";
|
||||
```
|
||||
|
||||
###### Query with named parameters:
|
||||
|
||||
```yaml
|
||||
id: knexRaw
|
||||
type: KnexRaw
|
||||
connectionId: knex
|
||||
properties:
|
||||
query: select * from users where name = :name
|
||||
parameters:
|
||||
name:
|
||||
_state: selected_name
|
||||
```
|
||||
|
||||
###### Query with positional parameters:
|
||||
|
||||
```yaml
|
||||
id: knexRaw
|
||||
type: KnexRaw
|
||||
connectionId: knex
|
||||
properties:
|
||||
query: select * from users where name = ?
|
||||
parameters:
|
||||
- _state: selected_name
|
||||
```
|
||||
|
||||
###### Reference a `.sql` file:
|
||||
|
||||
```yaml
|
||||
id: knexRaw
|
||||
type: KnexRaw
|
||||
connectionId: knex
|
||||
properties:
|
||||
query:
|
||||
_ref: my_query.sql
|
||||
```
|
90
packages/docs/connections/MSSQL.yaml
Normal file
90
packages/docs/connections/MSSQL.yaml
Normal file
@ -0,0 +1,90 @@
|
||||
# Copyright 2020-2021 Lowdefy, Inc
|
||||
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
_ref:
|
||||
path: templates/general.yaml.njk
|
||||
vars:
|
||||
pageId: MSSQL
|
||||
pageTitle: Microsoft SQL Server
|
||||
section: Connections
|
||||
filePath: connections/MSSQL.yaml
|
||||
content:
|
||||
- id: markdown_intro
|
||||
type: Markdown
|
||||
properties:
|
||||
content: |
|
||||
The [Knex](/Knex) connection can be used to connect to [Microsoft SQL Server](https://www.microsoft.com/en-us/sql-server/sql-server-2019).
|
||||
|
||||
- id: markdown_connection
|
||||
type: MarkdownWithCode
|
||||
properties:
|
||||
content: |
|
||||
## Connections
|
||||
|
||||
Connection types:
|
||||
- Knex
|
||||
|
||||
### Knex
|
||||
|
||||
#### Properties
|
||||
- `client: enum`: __Required__ - Should be `mssql` to connect to Microsoft SQL Server.
|
||||
- `connection: object | string `: __Required__ - Connection object or string to pass to the [`mssql`](https://www.npmjs.com/package/mssql) database client.
|
||||
- `useNullAsDefault: boolean`: If true, undefined keys are replaced with NULL instead of DEFAULT.
|
||||
|
||||
#### Examples
|
||||
|
||||
###### Connection object:
|
||||
```yaml
|
||||
connections:
|
||||
- id: mssql
|
||||
type: Knex
|
||||
properties:
|
||||
client: mssql
|
||||
connection:
|
||||
host:
|
||||
_secret: MSSQL_HOST
|
||||
database:
|
||||
_secret: MSSQL_DB
|
||||
user:
|
||||
_secret: MSSQL_USER
|
||||
password:
|
||||
_secret: MSSQL_PASSWORD
|
||||
```
|
||||
Environment variables:
|
||||
```
|
||||
LOWDEFY_SECRET_MSSQL_HOST = database.server.com
|
||||
LOWDEFY_SECRET_MSSQL_DB = db
|
||||
LOWDEFY_SECRET_MSSQL_USER = user
|
||||
LOWDEFY_SECRET_MSSQL_PASSWORD = password
|
||||
```
|
||||
|
||||
###### Secret connection string:
|
||||
```yaml
|
||||
connections:
|
||||
- id: mssql
|
||||
type: Knex
|
||||
properties:
|
||||
client: mssql
|
||||
connection:
|
||||
_secret: MSSQL_CONNECTION_STRING
|
||||
```
|
||||
Environment variables:
|
||||
```
|
||||
LOWDEFY_SECRET_MSSQL_CONNECTION_STRING = mssql://user:password@database.server.com:1433/db
|
||||
```
|
||||
- id: markdown_requests
|
||||
type: MarkdownWithCode
|
||||
properties:
|
||||
content:
|
||||
_ref: connections/KnexRequests.md
|
77
packages/docs/connections/MariaDB.yaml
Normal file
77
packages/docs/connections/MariaDB.yaml
Normal file
@ -0,0 +1,77 @@
|
||||
# Copyright 2020-2021 Lowdefy, Inc
|
||||
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
_ref:
|
||||
path: templates/general.yaml.njk
|
||||
vars:
|
||||
pageId: MariaDB
|
||||
pageTitle: MariaDB
|
||||
section: Connections
|
||||
filePath: connections/MariaDB.yaml
|
||||
content:
|
||||
- id: markdown_intro
|
||||
type: Markdown
|
||||
properties:
|
||||
content: |
|
||||
The [Knex](/Knex) connection can be used to connect to a [MariaDB](https://www.mysql.com) database. To connect to a MariaDB database, use the `mysql` client.
|
||||
|
||||
- id: markdown_connection
|
||||
type: MarkdownWithCode
|
||||
properties:
|
||||
content: |
|
||||
## Connections
|
||||
|
||||
Connection types:
|
||||
- Knex
|
||||
|
||||
### Knex
|
||||
|
||||
#### Properties
|
||||
- `client: enum`: __Required__ - Use the `mysql` client to connect to MariaDB.
|
||||
- `connection: object | string `: __Required__ - Connection object or string to pass to the [`mysql`](https://www.npmjs.com/package/mysql) database client.
|
||||
- `version: string`: Set database version.
|
||||
- `useNullAsDefault: boolean`: If true, undefined keys are replaced with NULL instead of DEFAULT.
|
||||
|
||||
#### Examples
|
||||
|
||||
###### Connection object:
|
||||
```yaml
|
||||
connections:
|
||||
- id: mariadb
|
||||
type: Knex
|
||||
properties:
|
||||
client: mysql
|
||||
connection:
|
||||
host:
|
||||
_secret: MARIADB_HOST
|
||||
database:
|
||||
_secret: MARIADB_DB
|
||||
user:
|
||||
_secret: MARIADB_USER
|
||||
password:
|
||||
_secret: MARIADB_PASSWORD
|
||||
```
|
||||
Environment variables:
|
||||
```
|
||||
LOWDEFY_SECRET_MARIADB_HOST = database.server.com
|
||||
LOWDEFY_SECRET_MARIADB_DB = db
|
||||
LOWDEFY_SECRET_MARIADB_USER = user
|
||||
LOWDEFY_SECRET_MARIADB_PASSWORD = password
|
||||
```
|
||||
|
||||
- id: markdown_requests
|
||||
type: MarkdownWithCode
|
||||
properties:
|
||||
content:
|
||||
_ref: connections/KnexRequests.md
|
@ -67,17 +67,21 @@ _ref:
|
||||
|
||||
#### Examples
|
||||
|
||||
MongoDB collection with reads and writes:
|
||||
###### MongoDB collection with reads and writes:
|
||||
```yaml
|
||||
connections:
|
||||
- id: my_collection
|
||||
type: MongoDBCollection
|
||||
properties:
|
||||
databaseUri:
|
||||
_secret: my_database_uri
|
||||
_secret: MONGODB_URI
|
||||
collection: my_collection_name
|
||||
write: true
|
||||
```
|
||||
Environment variables:
|
||||
```
|
||||
LOWDEFY_SECRET_MONGODB_URI = mongodb+srv://username:password@server.example.com/database
|
||||
```
|
||||
|
||||
## Requests
|
||||
|
||||
@ -112,7 +116,7 @@ _ref:
|
||||
|
||||
#### Examples
|
||||
|
||||
Calculate average score by region:
|
||||
###### Calculate average score by region:
|
||||
```yaml
|
||||
requests:
|
||||
- id: avg_spend_by_region
|
||||
@ -149,7 +153,7 @@ _ref:
|
||||
|
||||
#### Examples
|
||||
|
||||
Delete all documents older than a specific date:
|
||||
###### Delete all documents older than a specific date:
|
||||
```yaml
|
||||
requests:
|
||||
- id: delete_old_documents
|
||||
@ -178,7 +182,7 @@ _ref:
|
||||
|
||||
#### Examples
|
||||
|
||||
Delete a document by _id:
|
||||
###### Delete a document by _id:
|
||||
```yaml
|
||||
requests:
|
||||
- id: delete_selected_document
|
||||
@ -210,7 +214,7 @@ _ref:
|
||||
|
||||
#### Examples
|
||||
|
||||
Find top ten scores above 90:
|
||||
###### Find top ten scores above 90:
|
||||
```yaml
|
||||
requests:
|
||||
- id: scores_top_ten_scores_above_90
|
||||
@ -250,7 +254,7 @@ _ref:
|
||||
|
||||
#### Examples
|
||||
|
||||
Find a document by id:
|
||||
###### Find a document by id:
|
||||
```yaml
|
||||
requests:
|
||||
- id: find_by_id
|
||||
@ -279,7 +283,7 @@ _ref:
|
||||
|
||||
#### Examples
|
||||
|
||||
Insert a set of documents:
|
||||
###### Insert a set of documents:
|
||||
```yaml
|
||||
requests:
|
||||
- id: insert_new_comment
|
||||
@ -312,7 +316,7 @@ _ref:
|
||||
|
||||
#### Examples
|
||||
|
||||
Insert a document:
|
||||
###### Insert a document:
|
||||
```yaml
|
||||
requests:
|
||||
- id: insert_new_comment
|
||||
@ -349,7 +353,7 @@ _ref:
|
||||
|
||||
#### Examples
|
||||
|
||||
Set a list of documents as resolved:
|
||||
###### Set a list of documents as resolved:
|
||||
```yaml
|
||||
requests:
|
||||
- id: set_resolved
|
||||
@ -365,7 +369,7 @@ _ref:
|
||||
resolved: true
|
||||
```
|
||||
|
||||
Mark all documents with score less than 6 as urgent:
|
||||
###### Mark all documents with score less than 6 as urgent:
|
||||
```yaml
|
||||
requests:
|
||||
- id: set_resolved
|
||||
@ -402,7 +406,7 @@ _ref:
|
||||
|
||||
#### Examples
|
||||
|
||||
Update a document:
|
||||
###### Update a document:
|
||||
```yaml
|
||||
requests:
|
||||
- id: update
|
||||
|
92
packages/docs/connections/MySQL.yaml
Normal file
92
packages/docs/connections/MySQL.yaml
Normal file
@ -0,0 +1,92 @@
|
||||
# Copyright 2020-2021 Lowdefy, Inc
|
||||
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
_ref:
|
||||
path: templates/general.yaml.njk
|
||||
vars:
|
||||
pageId: MySQL
|
||||
pageTitle: MySQL
|
||||
section: Connections
|
||||
filePath: connections/MySQL.yaml
|
||||
content:
|
||||
- id: markdown_intro
|
||||
type: Markdown
|
||||
properties:
|
||||
content: |
|
||||
The [Knex](/Knex) connection can be used to connect to a [MySQL](https://www.mysql.com) database.
|
||||
|
||||
- id: markdown_connection
|
||||
type: MarkdownWithCode
|
||||
properties:
|
||||
content: |
|
||||
## Connections
|
||||
|
||||
Connection types:
|
||||
- Knex
|
||||
|
||||
### Knex
|
||||
|
||||
#### Properties
|
||||
- `client: enum`: __Required__ - Should be `mysql` to connect to MySQL.
|
||||
- `connection: object | string `: __Required__ - Connection object or string to pass to the [`mysql`](https://www.npmjs.com/package/mysql) database client.
|
||||
- `version: string`: Set database version.
|
||||
- `useNullAsDefault: boolean`: If true, undefined keys are replaced with NULL instead of DEFAULT.
|
||||
|
||||
#### Examples
|
||||
|
||||
###### Connection Object:
|
||||
```yaml
|
||||
connections:
|
||||
- id: mysql
|
||||
type: Knex
|
||||
properties:
|
||||
client: mysql
|
||||
connection:
|
||||
host:
|
||||
_secret: MYSQL_HOST
|
||||
user:
|
||||
_secret: MYSQL_USER
|
||||
database:
|
||||
_secret: MYSQL_DB
|
||||
password:
|
||||
_secret: MYSQL_PASSWORD
|
||||
```
|
||||
Environment variables:
|
||||
```
|
||||
LOWDEFY_SECRET_MYSQL_HOST = database.server.com
|
||||
LOWDEFY_SECRET_MYSQL_DB = db
|
||||
LOWDEFY_SECRET_MYSQL_USER = user
|
||||
LOWDEFY_SECRET_MYSQL_PASSWORD = password
|
||||
```
|
||||
|
||||
###### Connection string:
|
||||
```yaml
|
||||
connections:
|
||||
- id: mysql
|
||||
type: Knex
|
||||
properties:
|
||||
client: mysql
|
||||
connection:
|
||||
_secret: MYSQL_CONNECTION_STRING
|
||||
```
|
||||
Environment variables:
|
||||
```
|
||||
LOWDEFY_SECRET_MYSQL_CONNECTION_STRING = mysql://user:password@database.server.com/db
|
||||
```
|
||||
|
||||
- id: markdown_requests
|
||||
type: MarkdownWithCode
|
||||
properties:
|
||||
content:
|
||||
_ref: connections/KnexRequests.md
|
73
packages/docs/connections/OracleDB.yaml
Normal file
73
packages/docs/connections/OracleDB.yaml
Normal file
@ -0,0 +1,73 @@
|
||||
# Copyright 2020-2021 Lowdefy, Inc
|
||||
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
_ref:
|
||||
path: templates/general.yaml.njk
|
||||
vars:
|
||||
pageId: OracleDB
|
||||
pageTitle: Oracle Database
|
||||
section: Connections
|
||||
filePath: connections/OracleDB.yaml
|
||||
content:
|
||||
- id: markdown_intro
|
||||
type: Markdown
|
||||
properties:
|
||||
content: |
|
||||
The [Knex](/Knex) connection can be used to connect to a [Oracle Database](https://www.oracle.com/database/).
|
||||
|
||||
- id: markdown_connection
|
||||
type: MarkdownWithCode
|
||||
properties:
|
||||
content: |
|
||||
## Connections
|
||||
|
||||
Connection types:
|
||||
- Knex
|
||||
|
||||
### Knex
|
||||
|
||||
#### Properties
|
||||
- `client: enum`: __Required__ - Should be `oracledb` to connect to Oracle Database.
|
||||
- `connection: object | string `: __Required__ - Connection object or string to pass to the [`oracledb`](https://www.npmjs.com/package/oracledb) database client.
|
||||
- `useNullAsDefault: boolean`: If true, undefined keys are replaced with NULL instead of DEFAULT.
|
||||
|
||||
#### Examples
|
||||
|
||||
###### Connection Object:
|
||||
```yaml
|
||||
connections:
|
||||
- id: oracledb
|
||||
type: Knex
|
||||
properties:
|
||||
client: oracledb
|
||||
connection:
|
||||
user:
|
||||
_secret: ORACLEDB_USER
|
||||
password:
|
||||
_secret:
|
||||
connectString:
|
||||
_secret: ORACLEDB_CONNECT_STRING
|
||||
```
|
||||
Environment variables:
|
||||
```
|
||||
LOWDEFY_SECRET_ORACLEDB_USER = user
|
||||
LOWDEFY_SECRET_ORACLEDB_PASSWORD = password
|
||||
LOWDEFY_SECRET_ORACLEDB_CONNECT_STRING = database.server.com/db
|
||||
```
|
||||
|
||||
- id: markdown_requests
|
||||
type: MarkdownWithCode
|
||||
properties:
|
||||
content:
|
||||
_ref: connections/KnexRequests.md
|
99
packages/docs/connections/PostgreSQL.yaml
Normal file
99
packages/docs/connections/PostgreSQL.yaml
Normal file
@ -0,0 +1,99 @@
|
||||
# Copyright 2020-2021 Lowdefy, Inc
|
||||
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
_ref:
|
||||
path: templates/general.yaml.njk
|
||||
vars:
|
||||
pageId: PostgreSQL
|
||||
pageTitle: PostgreSQL
|
||||
section: Connections
|
||||
filePath: connections/PostgreSQL.yaml
|
||||
content:
|
||||
- id: markdown_intro
|
||||
type: Markdown
|
||||
properties:
|
||||
content: |
|
||||
The [Knex](/Knex) connection can be used to connect to a [PostgreSQL](https://www.postgresql.org) database.
|
||||
|
||||
- id: markdown_connection
|
||||
type: MarkdownWithCode
|
||||
properties:
|
||||
content: |
|
||||
## Connections
|
||||
|
||||
Connection types:
|
||||
- Knex
|
||||
|
||||
### Knex
|
||||
|
||||
#### Properties
|
||||
- `client: enum`: __Required__ - The database client to use. To connect to PostgreSQL, use one of:
|
||||
- `postgres`
|
||||
- `pg` (alias of `postgres`)
|
||||
- `postgresql` (alias of `postgres`)
|
||||
- `connection: object | string`: __Required__ - Connection string or object to pass to the [`pg`](https://www.npmjs.com/package/pg) database client.
|
||||
- `searchPath: string`: Set PostgreSQL search path.
|
||||
- `version: string`: Set database version.
|
||||
- `useNullAsDefault: boolean`: If true, undefined keys are replaced with NULL instead of DEFAULT.
|
||||
|
||||
#### Examples
|
||||
|
||||
###### Connection Object:
|
||||
```yaml
|
||||
connections:
|
||||
- id: postgres
|
||||
type: Knex
|
||||
properties:
|
||||
client: postgres
|
||||
connection:
|
||||
user:
|
||||
_secret: PG_USER
|
||||
host:
|
||||
_secret: PG_HOST
|
||||
database:
|
||||
_secret: PG_DB
|
||||
password:
|
||||
_secret: PG_PASSWORD
|
||||
```
|
||||
Environment variables:
|
||||
```
|
||||
LOWDEFY_SECRET_PG_HOST = database.server.com
|
||||
LOWDEFY_SECRET_PG_DB = db
|
||||
LOWDEFY_SECRET_PG_USER = user
|
||||
LOWDEFY_SECRET_PG_PASSWORD = password
|
||||
```
|
||||
|
||||
###### Secret connection string, with version and searchPath:
|
||||
```yaml
|
||||
connections:
|
||||
- id: postgres
|
||||
type: Knex
|
||||
properties:
|
||||
client: postgres
|
||||
connection:
|
||||
_secret: PG_CONNECTION_STRING
|
||||
version: '7.2'
|
||||
searchPath:
|
||||
- knex
|
||||
- public
|
||||
```
|
||||
Environment variables:
|
||||
```
|
||||
LOWDEFY_SECRET_PG_CONNECTION_STRING = postgresql://user:password@database.server.com:5432/db
|
||||
```
|
||||
- id: markdown_requests
|
||||
type: MarkdownWithCode
|
||||
properties:
|
||||
content:
|
||||
_ref: connections/KnexRequests.md
|
94
packages/docs/connections/SQLite.yaml
Normal file
94
packages/docs/connections/SQLite.yaml
Normal file
@ -0,0 +1,94 @@
|
||||
# Copyright 2020-2021 Lowdefy, Inc
|
||||
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
_ref:
|
||||
path: templates/general.yaml.njk
|
||||
vars:
|
||||
pageId: SQLite
|
||||
pageTitle: SQLite
|
||||
section: Connections
|
||||
filePath: connections/SQLite.yaml
|
||||
content:
|
||||
- id: markdown_intro
|
||||
type: Markdown
|
||||
properties:
|
||||
content: |
|
||||
The [Knex](/Knex) connection can be used to connect to a [SQLite](https://www.sqlite.org) database.
|
||||
- id: warning
|
||||
type: Alert
|
||||
properties:
|
||||
type: warning
|
||||
showIcon: false
|
||||
description: |
|
||||
SQLite is best suited as a development database when used with Lowdefy. Using SQLite in a serverless environment is not recommended, and not supported by the current Lowdefy deployment options. See the example below on how to configure different database connections based on the environment.
|
||||
|
||||
- id: markdown_connection
|
||||
type: MarkdownWithCode
|
||||
properties:
|
||||
content: |
|
||||
## Connections
|
||||
|
||||
Connection types:
|
||||
- Knex
|
||||
|
||||
### Knex
|
||||
|
||||
#### Properties
|
||||
- `client: enum`: __Required__ - Should be `sqlite3` or `sqlite` to connect to SQLite.
|
||||
- `connection: object`:
|
||||
- `filename: string`: __Required__ - The path to the SQLite file (relative to the project root).
|
||||
- `useNullAsDefault: boolean`: If true, undefined keys are replaced with NULL instead of DEFAULT.
|
||||
|
||||
|
||||
#### Examples
|
||||
|
||||
##### Specify filename:
|
||||
```yaml
|
||||
connections:
|
||||
- id: sqlite
|
||||
type: Knex
|
||||
properties:
|
||||
client: sqlite
|
||||
connection:
|
||||
filename: ./mydb.sqlite
|
||||
```
|
||||
|
||||
###### Different connections in deployment and production environments:
|
||||
```yaml
|
||||
connections:
|
||||
- id: knex
|
||||
type: Knex
|
||||
properties:
|
||||
client:
|
||||
_secret: KNEX_CLIENT
|
||||
connection:
|
||||
_json.parse:
|
||||
_secret: KNEX_CONNECTION
|
||||
```
|
||||
Environment variables in development:
|
||||
```
|
||||
LOWDEFY_SECRET_KNEX_CLIENT = sqlite
|
||||
LOWDEFY_SECRET_KNEX_CONNECTION = {"filename": "./mydb.sqlite"}
|
||||
```
|
||||
Environment variables in production:
|
||||
```
|
||||
LOWDEFY_SECRET_KNEX_CLIENT = postgres
|
||||
LOWDEFY_SECRET_KNEX_CONNECTION = {"user": "dbuser", "host": "database.server.com", "database": "mydb", "password": "secretpassword"}
|
||||
```
|
||||
|
||||
- id: markdown_requests
|
||||
type: MarkdownWithCode
|
||||
properties:
|
||||
content:
|
||||
_ref: connections/KnexRequests.md
|
@ -16,7 +16,7 @@ _ref:
|
||||
path: templates/general.yaml.njk
|
||||
vars:
|
||||
pageId: SendGridMail
|
||||
pageTitle: SendGridMail
|
||||
pageTitle: SendGrid Email
|
||||
section: Connections
|
||||
filePath: connections/SendGridMail.yaml
|
||||
content:
|
||||
@ -24,14 +24,14 @@ _ref:
|
||||
type: MarkdownWithCode
|
||||
properties:
|
||||
content: |
|
||||
[SendGrid](https://sendgrid.com/) is a popular email API provider which allows you to easily setup a email service. The `SendGridMail` connection can be used to connect to an existing SendGrid API account.
|
||||
[SendGrid](https://sendgrid.com/) is a popular email API provider which allows you to easily setup a email service. The `SendGridMail` connection can be used to connect to an existing SendGrid API account.
|
||||
|
||||
The `SendGridMail` connector uses the [@sendgrid/mail](https://github.com/@sendgrid/mail) library.
|
||||
|
||||
In order to use the `SendGridMail` connector, you first need to create a [SendGrid](https://sendgrid.com/) account and setup an API key.
|
||||
In order to use the `SendGridMail` connector, you first need to create a [SendGrid](https://sendgrid.com/) account and setup an API key.
|
||||
|
||||
> Secrets like API keys should be stored using the [`_secret`](operators/secret.md) operator.
|
||||
|
||||
|
||||
In order to send from your custom domain your will need to [authenticate your domain](https://app.sendgrid.com/settings/sender_auth) through SendGrid. See the [SendGrid Docs](https://sendgrid.com/docs) for help on getting started with SendGrid.
|
||||
|
||||
## Connections
|
||||
@ -80,20 +80,20 @@ _ref:
|
||||
- `content: string`: __Required__ - Base 64 encoded attachment content.
|
||||
- `filename: string`: __Required__ - Name of the attachment file.
|
||||
- `type: string`: The mime type of the content you are attaching. For example, `text/plain` or `text/html`.
|
||||
|
||||
|
||||
##### array
|
||||
An array of `mail description` objects can also be provided.
|
||||
An array of `mail description` objects can also be provided.
|
||||
|
||||
### Examples
|
||||
|
||||
The following example is used to send a reminder notification to a email address when the `SendGridMailSend` request is triggered.
|
||||
###### Send a reminder email
|
||||
```yaml
|
||||
connections:
|
||||
- id: my_sendgrid
|
||||
type: SendGridMail
|
||||
properties:
|
||||
apiKey:
|
||||
_secret: example_sendgrid_api_key
|
||||
apiKey:
|
||||
_secret: SENDGRID_API_KEY
|
||||
from: reminders@example.org
|
||||
# ...
|
||||
requests:
|
||||
@ -106,8 +106,8 @@ _ref:
|
||||
text: |
|
||||
Hi Harry
|
||||
|
||||
Please remember to water the magic plants today :)
|
||||
Please remember to water the magic plants today :)
|
||||
|
||||
Thank you
|
||||
# ...
|
||||
```
|
||||
```
|
||||
|
@ -47,783 +47,7 @@ connections:
|
||||
url: /telemetry/docs
|
||||
|
||||
menus:
|
||||
- id: default
|
||||
links:
|
||||
- id: introduction
|
||||
type: MenuLink
|
||||
pageId: introduction
|
||||
properties:
|
||||
title: Introduction
|
||||
icon: CoffeeOutlined
|
||||
- id: tutorial
|
||||
type: MenuGroup
|
||||
properties:
|
||||
title: Tutorial
|
||||
icon: RocketOutlined
|
||||
links:
|
||||
- id: tutorial-start
|
||||
type: MenuLink
|
||||
pageId: tutorial-start
|
||||
properties:
|
||||
title: Getting started
|
||||
- id: tutorial-create-page
|
||||
type: MenuLink
|
||||
pageId: tutorial-create-page
|
||||
properties:
|
||||
title: Creating a page
|
||||
- id: tutorial-add-blocks
|
||||
type: MenuLink
|
||||
pageId: tutorial-add-blocks
|
||||
properties:
|
||||
title: Adding blocks
|
||||
- id: tutorial-actions-operators
|
||||
type: MenuLink
|
||||
pageId: tutorial-actions-operators
|
||||
properties:
|
||||
title: Interactive pages
|
||||
- id: tutorial-requests
|
||||
type: MenuLink
|
||||
pageId: tutorial-requests
|
||||
properties:
|
||||
title: Requests
|
||||
- id: tutorial-deploy
|
||||
type: MenuLink
|
||||
pageId: tutorial-deploy
|
||||
properties:
|
||||
title: Deploy to Netlify
|
||||
- id: next-steps
|
||||
type: MenuLink
|
||||
pageId: next-steps
|
||||
properties:
|
||||
title: Next steps
|
||||
- id: concepts
|
||||
type: MenuGroup
|
||||
properties:
|
||||
title: Concepts
|
||||
icon: BulbOutlined
|
||||
links:
|
||||
- id: overview
|
||||
type: MenuLink
|
||||
pageId: overview
|
||||
properties:
|
||||
title: Overview
|
||||
- id: cli
|
||||
type: MenuLink
|
||||
pageId: cli
|
||||
properties:
|
||||
title: The CLI
|
||||
- id: lowdefy-schema
|
||||
type: MenuLink
|
||||
pageId: lowdefy-schema
|
||||
properties:
|
||||
title: Lowdefy App Schema
|
||||
- id: context-and-state
|
||||
type: MenuLink
|
||||
pageId: context-and-state
|
||||
properties:
|
||||
title: Context and State
|
||||
- id: blocks
|
||||
type: MenuLink
|
||||
pageId: blocks
|
||||
properties:
|
||||
title: Blocks
|
||||
- id: layout
|
||||
type: MenuLink
|
||||
pageId: layout
|
||||
properties:
|
||||
title: Layout
|
||||
- id: connections-and-requests
|
||||
type: MenuLink
|
||||
pageId: connections-and-requests
|
||||
properties:
|
||||
title: Connections and Requests
|
||||
- id: events-and-actions
|
||||
type: MenuLink
|
||||
pageId: events-and-actions
|
||||
properties:
|
||||
title: Events and Actions
|
||||
- id: operators
|
||||
type: MenuLink
|
||||
pageId: operators
|
||||
properties:
|
||||
title: Operators
|
||||
- id: secrets
|
||||
type: MenuLink
|
||||
pageId: secrets
|
||||
properties:
|
||||
title: Secrets
|
||||
- id: deployment
|
||||
type: MenuLink
|
||||
pageId: deployment
|
||||
properties:
|
||||
title: Deployment
|
||||
- id: lists
|
||||
type: MenuLink
|
||||
pageId: lists
|
||||
properties:
|
||||
title: Lists
|
||||
- id: custom-blocks
|
||||
type: MenuLink
|
||||
pageId: custom-blocks
|
||||
properties:
|
||||
title: Custom Blocks
|
||||
|
||||
- id: blocks_input
|
||||
type: MenuGroup
|
||||
properties:
|
||||
title: Input Blocks
|
||||
icon: FormOutlined
|
||||
links:
|
||||
- id: AutoComplete
|
||||
type: MenuLink
|
||||
pageId: AutoComplete
|
||||
- id: ButtonSelector
|
||||
type: MenuLink
|
||||
pageId: ButtonSelector
|
||||
- id: CheckboxSelector
|
||||
type: MenuLink
|
||||
pageId: CheckboxSelector
|
||||
- id: ChromeColorSelector
|
||||
type: MenuLink
|
||||
pageId: ChromeColorSelector
|
||||
- id: CircleColorSelector
|
||||
type: MenuLink
|
||||
pageId: CircleColorSelector
|
||||
- id: ColorSelector
|
||||
type: MenuLink
|
||||
pageId: ColorSelector
|
||||
- id: CompactColorSelector
|
||||
type: MenuLink
|
||||
pageId: CompactColorSelector
|
||||
- id: DateRangeSelector
|
||||
type: MenuLink
|
||||
pageId: DateRangeSelector
|
||||
- id: DateSelector
|
||||
type: MenuLink
|
||||
pageId: DateSelector
|
||||
- id: DateTimeSelector
|
||||
type: MenuLink
|
||||
pageId: DateTimeSelector
|
||||
- id: GithubColorSelector
|
||||
type: MenuLink
|
||||
pageId: GithubColorSelector
|
||||
- id: MonthSelector
|
||||
type: MenuLink
|
||||
pageId: MonthSelector
|
||||
- id: MultipleSelector
|
||||
type: MenuLink
|
||||
pageId: MultipleSelector
|
||||
- id: NumberInput
|
||||
type: MenuLink
|
||||
pageId: NumberInput
|
||||
- id: Pagination
|
||||
type: MenuLink
|
||||
pageId: Pagination
|
||||
- id: ParagraphInput
|
||||
type: MenuLink
|
||||
pageId: ParagraphInput
|
||||
- id: RadioSelector
|
||||
type: MenuLink
|
||||
pageId: RadioSelector
|
||||
- id: RatingSlider
|
||||
type: MenuLink
|
||||
pageId: RatingSlider
|
||||
- id: S3UploadButton
|
||||
type: MenuLink
|
||||
pageId: S3UploadButton
|
||||
- id: Selector
|
||||
type: MenuLink
|
||||
pageId: Selector
|
||||
- id: SliderColorSelector
|
||||
type: MenuLink
|
||||
pageId: SliderColorSelector
|
||||
- id: SwatchesColorSelector
|
||||
type: MenuLink
|
||||
pageId: SwatchesColorSelector
|
||||
- id: Switch
|
||||
type: MenuLink
|
||||
pageId: Switch
|
||||
- id: TextArea
|
||||
type: MenuLink
|
||||
pageId: TextArea
|
||||
- id: TextInput
|
||||
type: MenuLink
|
||||
pageId: TextInput
|
||||
- id: TitleInput
|
||||
type: MenuLink
|
||||
pageId: TitleInput
|
||||
- id: TwitterColorSelector
|
||||
type: MenuLink
|
||||
pageId: TwitterColorSelector
|
||||
- id: WeekSelector
|
||||
type: MenuLink
|
||||
pageId: WeekSelector
|
||||
- id: blocks_display
|
||||
type: MenuGroup
|
||||
properties:
|
||||
title: Display Blocks
|
||||
icon: PictureOutlined
|
||||
links:
|
||||
- id: Alert
|
||||
type: MenuLink
|
||||
pageId: Alert
|
||||
- id: Anchor
|
||||
type: MenuLink
|
||||
pageId: Anchor
|
||||
- id: Avatar
|
||||
type: MenuLink
|
||||
pageId: Avatar
|
||||
- id: Breadcrumb
|
||||
type: MenuLink
|
||||
pageId: Breadcrumb
|
||||
- id: Button
|
||||
type: MenuLink
|
||||
pageId: Button
|
||||
- id: DangerousHtml
|
||||
type: MenuLink
|
||||
pageId: DangerousHtml
|
||||
- id: DangerousMarkdown
|
||||
type: MenuLink
|
||||
pageId: DangerousMarkdown
|
||||
- id: Descriptions
|
||||
type: MenuLink
|
||||
pageId: Descriptions
|
||||
- id: Divider
|
||||
type: MenuLink
|
||||
pageId: Divider
|
||||
- id: EChart
|
||||
type: MenuLink
|
||||
pageId: EChart
|
||||
- id: Html
|
||||
type: MenuLink
|
||||
pageId: Html
|
||||
- id: Icon
|
||||
type: MenuLink
|
||||
pageId: Icon
|
||||
- id: Markdown
|
||||
type: MenuLink
|
||||
pageId: Markdown
|
||||
- id: MarkdownWithCode
|
||||
type: MenuLink
|
||||
pageId: MarkdownWithCode
|
||||
- id: Menu
|
||||
type: MenuLink
|
||||
pageId: Menu
|
||||
- id: Message
|
||||
type: MenuLink
|
||||
pageId: Message
|
||||
- id: MobileMenu
|
||||
type: MenuLink
|
||||
pageId: MobileMenu
|
||||
- id: Notification
|
||||
type: MenuLink
|
||||
pageId: Notification
|
||||
- id: Paragraph
|
||||
type: MenuLink
|
||||
pageId: Paragraph
|
||||
- id: Progress
|
||||
type: MenuLink
|
||||
pageId: Progress
|
||||
# - id: Skeleton
|
||||
# type: MenuLink
|
||||
# pageId: Skeleton
|
||||
- id: Statistic
|
||||
type: MenuLink
|
||||
pageId: Statistic
|
||||
- id: Title
|
||||
type: MenuLink
|
||||
pageId: Title
|
||||
|
||||
- id: blocks_container
|
||||
type: MenuGroup
|
||||
properties:
|
||||
title: Container Blocks
|
||||
icon: ContainerOutlined
|
||||
links:
|
||||
- id: Affix
|
||||
type: MenuLink
|
||||
pageId: Affix
|
||||
- id: Badge
|
||||
type: MenuLink
|
||||
pageId: Badge
|
||||
- id: Box
|
||||
type: MenuLink
|
||||
pageId: Box
|
||||
- id: Card
|
||||
type: MenuLink
|
||||
pageId: Card
|
||||
- id: Collapse
|
||||
type: MenuLink
|
||||
pageId: Collapse
|
||||
- id: Comment
|
||||
type: MenuLink
|
||||
pageId: Comment
|
||||
- id: ConfirmModal
|
||||
type: MenuLink
|
||||
pageId: ConfirmModal
|
||||
- id: Drawer
|
||||
type: MenuLink
|
||||
pageId: Drawer
|
||||
- id: Label
|
||||
type: MenuLink
|
||||
pageId: Label
|
||||
- id: Modal
|
||||
type: MenuLink
|
||||
pageId: Modal
|
||||
- id: Result
|
||||
type: MenuLink
|
||||
pageId: Result
|
||||
- id: Span
|
||||
type: MenuLink
|
||||
pageId: Span
|
||||
- id: Spin
|
||||
type: MenuLink
|
||||
pageId: Spin
|
||||
- id: Tabs
|
||||
type: MenuLink
|
||||
pageId: Tabs
|
||||
|
||||
- id: blocks_context
|
||||
type: MenuGroup
|
||||
properties:
|
||||
title: Context Blocks
|
||||
icon: GroupOutlined
|
||||
links:
|
||||
- id: Context
|
||||
type: MenuLink
|
||||
pageId: Context
|
||||
- id: PageHCF
|
||||
type: MenuLink
|
||||
pageId: PageHCF
|
||||
- id: PageHCF
|
||||
type: MenuLink
|
||||
pageId: PageHCF
|
||||
- id: PageHCSF
|
||||
type: MenuLink
|
||||
pageId: PageHCSF
|
||||
- id: PageHeaderMenu
|
||||
type: MenuLink
|
||||
pageId: PageHeaderMenu
|
||||
- id: PageHSCF
|
||||
type: MenuLink
|
||||
pageId: PageHSCF
|
||||
- id: PageSHCF
|
||||
type: MenuLink
|
||||
pageId: PageSHCF
|
||||
- id: PageSiderMenu
|
||||
type: MenuLink
|
||||
pageId: PageSiderMenu
|
||||
- id: blocks_list
|
||||
type: MenuGroup
|
||||
properties:
|
||||
title: List Blocks
|
||||
icon: OrderedListOutlined
|
||||
links:
|
||||
- id: ControlledList
|
||||
type: MenuLink
|
||||
pageId: ControlledList
|
||||
- id: List
|
||||
type: MenuLink
|
||||
pageId: List
|
||||
- id: connections
|
||||
type: MenuGroup
|
||||
properties:
|
||||
title: Connections
|
||||
icon: ApiOutlined
|
||||
links:
|
||||
- id: AWSS3
|
||||
type: MenuLink
|
||||
pageId: AWSS3
|
||||
properties:
|
||||
title: AWS S3
|
||||
- id: AxiosHttp
|
||||
type: MenuLink
|
||||
pageId: AxiosHttp
|
||||
properties:
|
||||
title: Axios HTTP
|
||||
- id: GoogleSheet
|
||||
type: MenuLink
|
||||
pageId: GoogleSheet
|
||||
properties:
|
||||
title: Google Sheets
|
||||
- id: MongoDB
|
||||
type: MenuLink
|
||||
pageId: MongoDB
|
||||
- id: SendGridMail
|
||||
type: MenuLink
|
||||
pageId: SendGridMail
|
||||
- id: actions
|
||||
type: MenuGroup
|
||||
properties:
|
||||
title: Actions
|
||||
icon: ThunderboltOutlined
|
||||
links:
|
||||
- id: CallMethod
|
||||
type: MenuLink
|
||||
pageId: CallMethod
|
||||
- id: Link
|
||||
type: MenuLink
|
||||
pageId: Link
|
||||
- id: MessageAction
|
||||
type: MenuLink
|
||||
pageId: MessageAction # Clash with Message block
|
||||
properties:
|
||||
title: Message
|
||||
- id: NotificationAction
|
||||
type: MenuLink
|
||||
pageId: NotificationAction # Clash with Notification block
|
||||
properties:
|
||||
title: Notification
|
||||
- id: Request
|
||||
type: MenuLink
|
||||
pageId: Request
|
||||
- id: Reset
|
||||
type: MenuLink
|
||||
pageId: Reset
|
||||
- id: ScrollTo
|
||||
type: MenuLink
|
||||
pageId: ScrollTo
|
||||
- id: SetGlobal
|
||||
type: MenuLink
|
||||
pageId: SetGlobal
|
||||
- id: SetState
|
||||
type: MenuLink
|
||||
pageId: SetState
|
||||
- id: Validate
|
||||
type: MenuLink
|
||||
pageId: Validate
|
||||
- id: operators
|
||||
type: MenuGroup
|
||||
properties:
|
||||
title: Operators
|
||||
icon: ToolOutlined
|
||||
links:
|
||||
- id: _and
|
||||
type: MenuLink
|
||||
pageId: _and
|
||||
- id: _args
|
||||
type: MenuLink
|
||||
pageId: _args
|
||||
- id: _array
|
||||
type: MenuLink
|
||||
pageId: _array
|
||||
- id: _base64
|
||||
type: MenuLink
|
||||
pageId: _base64
|
||||
- id: _date
|
||||
type: MenuLink
|
||||
pageId: _date
|
||||
- id: _diff
|
||||
type: MenuLink
|
||||
pageId: _diff
|
||||
- id: _divide
|
||||
type: MenuLink
|
||||
pageId: _divide
|
||||
- id: _eq
|
||||
type: MenuLink
|
||||
pageId: _eq
|
||||
- id: _event
|
||||
type: MenuLink
|
||||
pageId: _event
|
||||
- id: _format
|
||||
type: MenuLink
|
||||
pageId: _format
|
||||
- id: _function
|
||||
type: MenuLink
|
||||
pageId: _function
|
||||
- id: _get
|
||||
type: MenuLink
|
||||
pageId: _get
|
||||
- id: _global
|
||||
type: MenuLink
|
||||
pageId: _global
|
||||
- id: _gt
|
||||
type: MenuLink
|
||||
pageId: _gt
|
||||
- id: _gte
|
||||
type: MenuLink
|
||||
pageId: _gte
|
||||
- id: _if
|
||||
type: MenuLink
|
||||
pageId: _if
|
||||
- id: _if_none
|
||||
type: MenuLink
|
||||
pageId: _if_none
|
||||
- id: _index
|
||||
type: MenuLink
|
||||
pageId: _index
|
||||
- id: _input
|
||||
type: MenuLink
|
||||
pageId: _input
|
||||
- id: _json
|
||||
type: MenuLink
|
||||
pageId: _json
|
||||
- id: _list_contexts
|
||||
type: MenuLink
|
||||
pageId: _list_contexts
|
||||
- id: _log
|
||||
type: MenuLink
|
||||
pageId: _log
|
||||
- id: _lt
|
||||
type: MenuLink
|
||||
pageId: _lt
|
||||
- id: _lte
|
||||
type: MenuLink
|
||||
pageId: _lte
|
||||
- id: _math
|
||||
type: MenuLink
|
||||
pageId: _math
|
||||
- id: _media
|
||||
type: MenuLink
|
||||
pageId: _media
|
||||
- id: _menu
|
||||
type: MenuLink
|
||||
pageId: _menu
|
||||
- id: _mql
|
||||
type: MenuLink
|
||||
pageId: _mql
|
||||
- id: _ne
|
||||
type: MenuLink
|
||||
pageId: _ne
|
||||
- id: _not
|
||||
type: MenuLink
|
||||
pageId: _not
|
||||
- id: _nunjucks
|
||||
type: MenuLink
|
||||
pageId: _nunjucks
|
||||
- id: _object
|
||||
type: MenuLink
|
||||
pageId: _object
|
||||
- id: _operator
|
||||
type: MenuLink
|
||||
pageId: _operator
|
||||
- id: _or
|
||||
type: MenuLink
|
||||
pageId: _or
|
||||
- id: _product
|
||||
type: MenuLink
|
||||
pageId: _product
|
||||
- id: _random
|
||||
type: MenuLink
|
||||
pageId: _random
|
||||
- id: _ref
|
||||
type: MenuLink
|
||||
pageId: _ref
|
||||
- id: _regex
|
||||
type: MenuLink
|
||||
pageId: _regex
|
||||
- id: _request
|
||||
type: MenuLink
|
||||
pageId: _request
|
||||
- id: _secret
|
||||
type: MenuLink
|
||||
pageId: _secret
|
||||
- id: _state
|
||||
type: MenuLink
|
||||
pageId: _state
|
||||
- id: _string
|
||||
type: MenuLink
|
||||
pageId: _string
|
||||
- id: _subtract
|
||||
type: MenuLink
|
||||
pageId: _subtract
|
||||
- id: _sum
|
||||
type: MenuLink
|
||||
pageId: _sum
|
||||
- id: _type
|
||||
type: MenuLink
|
||||
pageId: _type
|
||||
- id: _uri
|
||||
type: MenuLink
|
||||
pageId: _uri
|
||||
- id: _url_query
|
||||
type: MenuLink
|
||||
pageId: _url_query
|
||||
- id: _uuid
|
||||
type: MenuLink
|
||||
pageId: _uuid
|
||||
- id: _var
|
||||
type: MenuLink
|
||||
pageId: _var
|
||||
- id: _yaml
|
||||
type: MenuLink
|
||||
pageId: _yaml
|
||||
_ref: menus.yaml
|
||||
|
||||
pages:
|
||||
- _ref: introduction.yaml
|
||||
- _ref: tutorial/tutorial-start.yaml
|
||||
- _ref: tutorial/tutorial-create-page.yaml
|
||||
- _ref: tutorial/tutorial-create-page-config.yaml
|
||||
- _ref: tutorial/tutorial-add-blocks.yaml
|
||||
- _ref: tutorial/tutorial-add-blocks-config.yaml
|
||||
- _ref: tutorial/tutorial-actions-operators.yaml
|
||||
- _ref: tutorial/tutorial-actions-operators-config.yaml
|
||||
- _ref: tutorial/tutorial-requests.yaml
|
||||
- _ref: tutorial/tutorial-requests-config.yaml
|
||||
- _ref: tutorial/tutorial-deploy.yaml
|
||||
- _ref: tutorial/next-steps.yaml
|
||||
|
||||
- _ref: concepts/overview.yaml
|
||||
- _ref: concepts/cli.yaml
|
||||
- _ref: concepts/lowdefy-schema.yaml
|
||||
- _ref: concepts/context-and-state.yaml
|
||||
- _ref: concepts/blocks.yaml
|
||||
- _ref: concepts/layout.yaml
|
||||
- _ref: concepts/connections-and-requests.yaml
|
||||
- _ref: concepts/events-and-actions.yaml
|
||||
- _ref: concepts/operators.yaml
|
||||
- _ref: concepts/deployment.yaml
|
||||
- _ref: concepts/secrets.yaml
|
||||
- _ref: concepts/deployment.yaml
|
||||
- _ref: concepts/lists.yaml
|
||||
- _ref: concepts/custom-blocks.yaml
|
||||
|
||||
- _ref: blocks/input/AutoComplete.yaml
|
||||
- _ref: blocks/input/ButtonSelector.yaml
|
||||
- _ref: blocks/input/CheckboxSelector.yaml
|
||||
- _ref: blocks/input/ChromeColorSelector.yaml
|
||||
- _ref: blocks/input/CircleColorSelector.yaml
|
||||
- _ref: blocks/input/ColorSelector.yaml
|
||||
- _ref: blocks/input/CompactColorSelector.yaml
|
||||
- _ref: blocks/input/DateRangeSelector.yaml
|
||||
- _ref: blocks/input/DateSelector.yaml
|
||||
- _ref: blocks/input/DateTimeSelector.yaml
|
||||
- _ref: blocks/input/GithubColorSelector.yaml
|
||||
- _ref: blocks/input/MonthSelector.yaml
|
||||
- _ref: blocks/input/MultipleSelector.yaml
|
||||
- _ref: blocks/input/NumberInput.yaml
|
||||
- _ref: blocks/input/Pagination.yaml
|
||||
- _ref: blocks/input/ParagraphInput.yaml
|
||||
- _ref: blocks/input/RadioSelector.yaml
|
||||
- _ref: blocks/input/RatingSlider.yaml
|
||||
- _ref: blocks/input/S3UploadButton.yaml
|
||||
- _ref: blocks/input/Selector.yaml
|
||||
- _ref: blocks/input/SliderColorSelector.yaml
|
||||
- _ref: blocks/input/SwatchesColorSelector.yaml
|
||||
- _ref: blocks/input/Switch.yaml
|
||||
- _ref: blocks/input/TextArea.yaml
|
||||
- _ref: blocks/input/TextInput.yaml
|
||||
- _ref: blocks/input/TitleInput.yaml
|
||||
- _ref: blocks/input/TwitterColorSelector.yaml
|
||||
- _ref: blocks/input/WeekSelector.yaml
|
||||
|
||||
- _ref: blocks/display/Alert.yaml
|
||||
- _ref: blocks/display/Anchor.yaml
|
||||
- _ref: blocks/display/Avatar.yaml
|
||||
- _ref: blocks/display/Breadcrumb.yaml
|
||||
- _ref: blocks/display/Button.yaml
|
||||
- _ref: blocks/display/DangerousHtml.yaml
|
||||
- _ref: blocks/display/DangerousMarkdown.yaml
|
||||
- _ref: blocks/display/Descriptions.yaml
|
||||
- _ref: blocks/display/Divider.yaml
|
||||
- _ref: blocks/display/EChart.yaml
|
||||
- _ref: blocks/display/Html.yaml
|
||||
- _ref: blocks/display/Icon.yaml
|
||||
- _ref: blocks/display/Markdown.yaml
|
||||
- _ref: blocks/display/MarkdownWithCode.yaml
|
||||
- _ref: blocks/display/Menu.yaml
|
||||
- _ref: blocks/display/Message.yaml
|
||||
- _ref: blocks/display/MobileMenu.yaml
|
||||
- _ref: blocks/display/Notification.yaml
|
||||
- _ref: blocks/display/Paragraph.yaml
|
||||
- _ref: blocks/display/Progress.yaml
|
||||
# - _ref: blocks/display/Skeleton.yaml
|
||||
- _ref: blocks/display/Statistic.yaml
|
||||
- _ref: blocks/display/Title.yaml
|
||||
|
||||
- _ref: blocks/container/Affix.yaml
|
||||
- _ref: blocks/container/Badge.yaml
|
||||
- _ref: blocks/container/Box.yaml
|
||||
- _ref: blocks/container/Card.yaml
|
||||
- _ref: blocks/container/Collapse.yaml
|
||||
- _ref: blocks/container/Comment.yaml
|
||||
- _ref: blocks/container/ConfirmModal.yaml
|
||||
- _ref: blocks/container/Drawer.yaml
|
||||
- _ref: blocks/container/Label.yaml
|
||||
- _ref: blocks/container/Modal.yaml
|
||||
- _ref: blocks/container/Result.yaml
|
||||
- _ref: blocks/container/Span.yaml
|
||||
- _ref: blocks/container/Spin.yaml
|
||||
- _ref: blocks/container/Tabs.yaml
|
||||
|
||||
- _ref: blocks/context/Context.yaml
|
||||
- _ref: blocks/context/PageHCF.yaml
|
||||
- _ref: blocks/context/PageHCSF.yaml
|
||||
- _ref: blocks/context/PageHeaderMenu.yaml
|
||||
- _ref: blocks/context/PageHSCF.yaml
|
||||
- _ref: blocks/context/PageSHCF.yaml
|
||||
- _ref: blocks/context/PageSiderMenu.yaml
|
||||
|
||||
- _ref: blocks/list/ControlledList.yaml
|
||||
- _ref: blocks/list/List.yaml
|
||||
# - _ref: blocks/list/TimelineList.yaml
|
||||
|
||||
- _ref: connections/AWSS3.yaml
|
||||
- _ref: connections/AxiosHttp.yaml
|
||||
- _ref: connections/GoogleSheet.yaml
|
||||
- _ref: connections/MongoDB.yaml
|
||||
- _ref: connections/SendGridMail.yaml
|
||||
|
||||
- _ref: actions/CallMethod.yaml
|
||||
- _ref: actions/Link.yaml
|
||||
- _ref: actions/Message.yaml
|
||||
- _ref: actions/Notification.yaml
|
||||
- _ref: actions/Request.yaml
|
||||
- _ref: actions/Reset.yaml
|
||||
- _ref: actions/ScrollTo.yaml
|
||||
- _ref: actions/SetGlobal.yaml
|
||||
- _ref: actions/SetState.yaml
|
||||
- _ref: actions/Validate.yaml
|
||||
|
||||
- _ref: operators/_and.yaml
|
||||
- _ref: operators/_args.yaml
|
||||
- _ref: operators/_array.yaml
|
||||
- _ref: operators/_base64.yaml
|
||||
- _ref: operators/_date.yaml
|
||||
- _ref: operators/_diff.yaml
|
||||
- _ref: operators/_divide.yaml
|
||||
- _ref: operators/_eq.yaml
|
||||
- _ref: operators/_event.yaml
|
||||
- _ref: operators/_format.yaml
|
||||
- _ref: operators/_function.yaml
|
||||
- _ref: operators/_get.yaml
|
||||
- _ref: operators/_global.yaml
|
||||
- _ref: operators/_gt.yaml
|
||||
- _ref: operators/_gte.yaml
|
||||
- _ref: operators/_if.yaml
|
||||
- _ref: operators/_if_none.yaml
|
||||
- _ref: operators/_index.yaml
|
||||
- _ref: operators/_input.yaml
|
||||
- _ref: operators/_json.yaml
|
||||
- _ref: operators/_list_contexts.yaml
|
||||
- _ref: operators/_log.yaml
|
||||
- _ref: operators/_lt.yaml
|
||||
- _ref: operators/_lte.yaml
|
||||
- _ref: operators/_math.yaml
|
||||
- _ref: operators/_media.yaml
|
||||
- _ref: operators/_menu.yaml
|
||||
- _ref: operators/_mql.yaml
|
||||
- _ref: operators/_ne.yaml
|
||||
- _ref: operators/_not.yaml
|
||||
- _ref: operators/_nunjucks.yaml
|
||||
- _ref: operators/_object.yaml
|
||||
- _ref: operators/_operator.yaml
|
||||
- _ref: operators/_or.yaml
|
||||
- _ref: operators/_product.yaml
|
||||
- _ref: operators/_random.yaml
|
||||
- _ref: operators/_ref.yaml
|
||||
- _ref: operators/_regex.yaml
|
||||
- _ref: operators/_request.yaml
|
||||
- _ref: operators/_secret.yaml
|
||||
- _ref: operators/_state.yaml
|
||||
- _ref: operators/_string.yaml
|
||||
- _ref: operators/_subtract.yaml
|
||||
- _ref: operators/_sum.yaml
|
||||
- _ref: operators/_type.yaml
|
||||
- _ref: operators/_uri.yaml
|
||||
- _ref: operators/_url_query.yaml
|
||||
- _ref: operators/_uuid.yaml
|
||||
- _ref: operators/_var.yaml
|
||||
- _ref: operators/_yaml.yaml
|
||||
|
||||
- _ref: 404.yaml
|
||||
_ref: pages.yaml
|
||||
|
633
packages/docs/menus.yaml
Normal file
633
packages/docs/menus.yaml
Normal file
@ -0,0 +1,633 @@
|
||||
- id: default
|
||||
links:
|
||||
- id: introduction
|
||||
type: MenuLink
|
||||
pageId: introduction
|
||||
properties:
|
||||
title: Introduction
|
||||
icon: CoffeeOutlined
|
||||
- id: tutorial
|
||||
type: MenuGroup
|
||||
properties:
|
||||
title: Tutorial
|
||||
icon: RocketOutlined
|
||||
links:
|
||||
- id: tutorial-start
|
||||
type: MenuLink
|
||||
pageId: tutorial-start
|
||||
properties:
|
||||
title: Getting started
|
||||
- id: tutorial-create-page
|
||||
type: MenuLink
|
||||
pageId: tutorial-create-page
|
||||
properties:
|
||||
title: Creating a page
|
||||
- id: tutorial-add-blocks
|
||||
type: MenuLink
|
||||
pageId: tutorial-add-blocks
|
||||
properties:
|
||||
title: Adding blocks
|
||||
- id: tutorial-actions-operators
|
||||
type: MenuLink
|
||||
pageId: tutorial-actions-operators
|
||||
properties:
|
||||
title: Interactive pages
|
||||
- id: tutorial-requests
|
||||
type: MenuLink
|
||||
pageId: tutorial-requests
|
||||
properties:
|
||||
title: Requests
|
||||
- id: tutorial-deploy
|
||||
type: MenuLink
|
||||
pageId: tutorial-deploy
|
||||
properties:
|
||||
title: Deploy to Netlify
|
||||
- id: next-steps
|
||||
type: MenuLink
|
||||
pageId: next-steps
|
||||
properties:
|
||||
title: Next steps
|
||||
- id: concepts
|
||||
type: MenuGroup
|
||||
properties:
|
||||
title: Concepts
|
||||
icon: BulbOutlined
|
||||
links:
|
||||
- id: overview
|
||||
type: MenuLink
|
||||
pageId: overview
|
||||
properties:
|
||||
title: Overview
|
||||
- id: cli
|
||||
type: MenuLink
|
||||
pageId: cli
|
||||
properties:
|
||||
title: The CLI
|
||||
- id: lowdefy-schema
|
||||
type: MenuLink
|
||||
pageId: lowdefy-schema
|
||||
properties:
|
||||
title: Lowdefy App Schema
|
||||
- id: context-and-state
|
||||
type: MenuLink
|
||||
pageId: context-and-state
|
||||
properties:
|
||||
title: Context and State
|
||||
- id: blocks
|
||||
type: MenuLink
|
||||
pageId: blocks
|
||||
properties:
|
||||
title: Blocks
|
||||
- id: layout
|
||||
type: MenuLink
|
||||
pageId: layout
|
||||
properties:
|
||||
title: Layout
|
||||
- id: connections-and-requests
|
||||
type: MenuLink
|
||||
pageId: connections-and-requests
|
||||
properties:
|
||||
title: Connections and Requests
|
||||
- id: events-and-actions
|
||||
type: MenuLink
|
||||
pageId: events-and-actions
|
||||
properties:
|
||||
title: Events and Actions
|
||||
- id: operators
|
||||
type: MenuLink
|
||||
pageId: operators
|
||||
properties:
|
||||
title: Operators
|
||||
- id: secrets
|
||||
type: MenuLink
|
||||
pageId: secrets
|
||||
properties:
|
||||
title: Secrets
|
||||
- id: deployment
|
||||
type: MenuLink
|
||||
pageId: deployment
|
||||
properties:
|
||||
title: Deployment
|
||||
- id: lists
|
||||
type: MenuLink
|
||||
pageId: lists
|
||||
properties:
|
||||
title: Lists
|
||||
- id: custom-blocks
|
||||
type: MenuLink
|
||||
pageId: custom-blocks
|
||||
properties:
|
||||
title: Custom Blocks
|
||||
|
||||
- id: blocks_input
|
||||
type: MenuGroup
|
||||
properties:
|
||||
title: Input Blocks
|
||||
icon: FormOutlined
|
||||
links:
|
||||
- id: AutoComplete
|
||||
type: MenuLink
|
||||
pageId: AutoComplete
|
||||
- id: ButtonSelector
|
||||
type: MenuLink
|
||||
pageId: ButtonSelector
|
||||
- id: CheckboxSelector
|
||||
type: MenuLink
|
||||
pageId: CheckboxSelector
|
||||
- id: ChromeColorSelector
|
||||
type: MenuLink
|
||||
pageId: ChromeColorSelector
|
||||
- id: CircleColorSelector
|
||||
type: MenuLink
|
||||
pageId: CircleColorSelector
|
||||
- id: ColorSelector
|
||||
type: MenuLink
|
||||
pageId: ColorSelector
|
||||
- id: CompactColorSelector
|
||||
type: MenuLink
|
||||
pageId: CompactColorSelector
|
||||
- id: DateRangeSelector
|
||||
type: MenuLink
|
||||
pageId: DateRangeSelector
|
||||
- id: DateSelector
|
||||
type: MenuLink
|
||||
pageId: DateSelector
|
||||
- id: DateTimeSelector
|
||||
type: MenuLink
|
||||
pageId: DateTimeSelector
|
||||
- id: GithubColorSelector
|
||||
type: MenuLink
|
||||
pageId: GithubColorSelector
|
||||
- id: MonthSelector
|
||||
type: MenuLink
|
||||
pageId: MonthSelector
|
||||
- id: MultipleSelector
|
||||
type: MenuLink
|
||||
pageId: MultipleSelector
|
||||
- id: NumberInput
|
||||
type: MenuLink
|
||||
pageId: NumberInput
|
||||
- id: Pagination
|
||||
type: MenuLink
|
||||
pageId: Pagination
|
||||
- id: ParagraphInput
|
||||
type: MenuLink
|
||||
pageId: ParagraphInput
|
||||
- id: RadioSelector
|
||||
type: MenuLink
|
||||
pageId: RadioSelector
|
||||
- id: RatingSlider
|
||||
type: MenuLink
|
||||
pageId: RatingSlider
|
||||
- id: S3UploadButton
|
||||
type: MenuLink
|
||||
pageId: S3UploadButton
|
||||
- id: Selector
|
||||
type: MenuLink
|
||||
pageId: Selector
|
||||
- id: SliderColorSelector
|
||||
type: MenuLink
|
||||
pageId: SliderColorSelector
|
||||
- id: SwatchesColorSelector
|
||||
type: MenuLink
|
||||
pageId: SwatchesColorSelector
|
||||
- id: Switch
|
||||
type: MenuLink
|
||||
pageId: Switch
|
||||
- id: TextArea
|
||||
type: MenuLink
|
||||
pageId: TextArea
|
||||
- id: TextInput
|
||||
type: MenuLink
|
||||
pageId: TextInput
|
||||
- id: TitleInput
|
||||
type: MenuLink
|
||||
pageId: TitleInput
|
||||
- id: TwitterColorSelector
|
||||
type: MenuLink
|
||||
pageId: TwitterColorSelector
|
||||
- id: WeekSelector
|
||||
type: MenuLink
|
||||
pageId: WeekSelector
|
||||
- id: blocks_display
|
||||
type: MenuGroup
|
||||
properties:
|
||||
title: Display Blocks
|
||||
icon: PictureOutlined
|
||||
links:
|
||||
- id: Alert
|
||||
type: MenuLink
|
||||
pageId: Alert
|
||||
- id: Anchor
|
||||
type: MenuLink
|
||||
pageId: Anchor
|
||||
- id: Avatar
|
||||
type: MenuLink
|
||||
pageId: Avatar
|
||||
- id: Breadcrumb
|
||||
type: MenuLink
|
||||
pageId: Breadcrumb
|
||||
- id: Button
|
||||
type: MenuLink
|
||||
pageId: Button
|
||||
- id: DangerousHtml
|
||||
type: MenuLink
|
||||
pageId: DangerousHtml
|
||||
- id: DangerousMarkdown
|
||||
type: MenuLink
|
||||
pageId: DangerousMarkdown
|
||||
- id: Descriptions
|
||||
type: MenuLink
|
||||
pageId: Descriptions
|
||||
- id: Divider
|
||||
type: MenuLink
|
||||
pageId: Divider
|
||||
- id: EChart
|
||||
type: MenuLink
|
||||
pageId: EChart
|
||||
- id: Html
|
||||
type: MenuLink
|
||||
pageId: Html
|
||||
- id: Icon
|
||||
type: MenuLink
|
||||
pageId: Icon
|
||||
- id: Markdown
|
||||
type: MenuLink
|
||||
pageId: Markdown
|
||||
- id: MarkdownWithCode
|
||||
type: MenuLink
|
||||
pageId: MarkdownWithCode
|
||||
- id: Menu
|
||||
type: MenuLink
|
||||
pageId: Menu
|
||||
- id: Message
|
||||
type: MenuLink
|
||||
pageId: Message
|
||||
- id: MobileMenu
|
||||
type: MenuLink
|
||||
pageId: MobileMenu
|
||||
- id: Notification
|
||||
type: MenuLink
|
||||
pageId: Notification
|
||||
- id: Paragraph
|
||||
type: MenuLink
|
||||
pageId: Paragraph
|
||||
- id: Progress
|
||||
type: MenuLink
|
||||
pageId: Progress
|
||||
# - id: Skeleton
|
||||
# type: MenuLink
|
||||
# pageId: Skeleton
|
||||
- id: Statistic
|
||||
type: MenuLink
|
||||
pageId: Statistic
|
||||
- id: Title
|
||||
type: MenuLink
|
||||
pageId: Title
|
||||
|
||||
- id: blocks_container
|
||||
type: MenuGroup
|
||||
properties:
|
||||
title: Container Blocks
|
||||
icon: ContainerOutlined
|
||||
links:
|
||||
- id: Affix
|
||||
type: MenuLink
|
||||
pageId: Affix
|
||||
- id: Badge
|
||||
type: MenuLink
|
||||
pageId: Badge
|
||||
- id: Box
|
||||
type: MenuLink
|
||||
pageId: Box
|
||||
- id: Card
|
||||
type: MenuLink
|
||||
pageId: Card
|
||||
- id: Collapse
|
||||
type: MenuLink
|
||||
pageId: Collapse
|
||||
- id: Comment
|
||||
type: MenuLink
|
||||
pageId: Comment
|
||||
- id: ConfirmModal
|
||||
type: MenuLink
|
||||
pageId: ConfirmModal
|
||||
- id: Drawer
|
||||
type: MenuLink
|
||||
pageId: Drawer
|
||||
- id: Label
|
||||
type: MenuLink
|
||||
pageId: Label
|
||||
- id: Modal
|
||||
type: MenuLink
|
||||
pageId: Modal
|
||||
- id: Result
|
||||
type: MenuLink
|
||||
pageId: Result
|
||||
- id: Span
|
||||
type: MenuLink
|
||||
pageId: Span
|
||||
- id: Spin
|
||||
type: MenuLink
|
||||
pageId: Spin
|
||||
- id: Tabs
|
||||
type: MenuLink
|
||||
pageId: Tabs
|
||||
|
||||
- id: blocks_context
|
||||
type: MenuGroup
|
||||
properties:
|
||||
title: Context Blocks
|
||||
icon: GroupOutlined
|
||||
links:
|
||||
- id: Context
|
||||
type: MenuLink
|
||||
pageId: Context
|
||||
- id: PageHCF
|
||||
type: MenuLink
|
||||
pageId: PageHCF
|
||||
- id: PageHCF
|
||||
type: MenuLink
|
||||
pageId: PageHCF
|
||||
- id: PageHCSF
|
||||
type: MenuLink
|
||||
pageId: PageHCSF
|
||||
- id: PageHeaderMenu
|
||||
type: MenuLink
|
||||
pageId: PageHeaderMenu
|
||||
- id: PageHSCF
|
||||
type: MenuLink
|
||||
pageId: PageHSCF
|
||||
- id: PageSHCF
|
||||
type: MenuLink
|
||||
pageId: PageSHCF
|
||||
- id: PageSiderMenu
|
||||
type: MenuLink
|
||||
pageId: PageSiderMenu
|
||||
- id: blocks_list
|
||||
type: MenuGroup
|
||||
properties:
|
||||
title: List Blocks
|
||||
icon: OrderedListOutlined
|
||||
links:
|
||||
- id: ControlledList
|
||||
type: MenuLink
|
||||
pageId: ControlledList
|
||||
- id: List
|
||||
type: MenuLink
|
||||
pageId: List
|
||||
- id: connections
|
||||
type: MenuGroup
|
||||
properties:
|
||||
title: Connections
|
||||
icon: ApiOutlined
|
||||
links:
|
||||
- id: AmazonRedshift
|
||||
type: MenuLink
|
||||
pageId: AmazonRedshift
|
||||
properties:
|
||||
title: Amazon Redshift
|
||||
- id: AWSS3
|
||||
type: MenuLink
|
||||
pageId: AWSS3
|
||||
properties:
|
||||
title: Amazon S3
|
||||
- id: AxiosHttp
|
||||
type: MenuLink
|
||||
pageId: AxiosHttp
|
||||
properties:
|
||||
title: Axios HTTP
|
||||
- id: GoogleSheet
|
||||
type: MenuLink
|
||||
pageId: GoogleSheet
|
||||
properties:
|
||||
title: Google Sheets
|
||||
- id: Knex
|
||||
type: MenuLink
|
||||
pageId: Knex
|
||||
- id: MariaDB
|
||||
type: MenuLink
|
||||
pageId: MariaDB
|
||||
- id: MongoDB
|
||||
type: MenuLink
|
||||
pageId: MongoDB
|
||||
- id: MSSQL
|
||||
type: MenuLink
|
||||
pageId: MSSQL
|
||||
properties:
|
||||
title: Microsoft SQL Server
|
||||
- id: MySQL
|
||||
type: MenuLink
|
||||
pageId: MySQL
|
||||
- id: OracleDB
|
||||
type: MenuLink
|
||||
pageId: OracleDB
|
||||
properties:
|
||||
title: Oracle Database
|
||||
- id: PostgreSQL
|
||||
type: MenuLink
|
||||
pageId: PostgreSQL
|
||||
- id: SendGridMail
|
||||
type: MenuLink
|
||||
pageId: SendGridMail
|
||||
properties:
|
||||
title: SendGrid Email
|
||||
- id: SQLite
|
||||
type: MenuLink
|
||||
pageId: SQLite
|
||||
- id: actions
|
||||
type: MenuGroup
|
||||
properties:
|
||||
title: Actions
|
||||
icon: ThunderboltOutlined
|
||||
links:
|
||||
- id: CallMethod
|
||||
type: MenuLink
|
||||
pageId: CallMethod
|
||||
- id: Link
|
||||
type: MenuLink
|
||||
pageId: Link
|
||||
- id: MessageAction
|
||||
type: MenuLink
|
||||
pageId: MessageAction # Clash with Message block
|
||||
properties:
|
||||
title: Message
|
||||
- id: NotificationAction
|
||||
type: MenuLink
|
||||
pageId: NotificationAction # Clash with Notification block
|
||||
properties:
|
||||
title: Notification
|
||||
- id: Request
|
||||
type: MenuLink
|
||||
pageId: Request
|
||||
- id: Reset
|
||||
type: MenuLink
|
||||
pageId: Reset
|
||||
- id: ScrollTo
|
||||
type: MenuLink
|
||||
pageId: ScrollTo
|
||||
- id: SetGlobal
|
||||
type: MenuLink
|
||||
pageId: SetGlobal
|
||||
- id: SetState
|
||||
type: MenuLink
|
||||
pageId: SetState
|
||||
- id: Validate
|
||||
type: MenuLink
|
||||
pageId: Validate
|
||||
- id: operators
|
||||
type: MenuGroup
|
||||
properties:
|
||||
title: Operators
|
||||
icon: ToolOutlined
|
||||
links:
|
||||
- id: _and
|
||||
type: MenuLink
|
||||
pageId: _and
|
||||
- id: _args
|
||||
type: MenuLink
|
||||
pageId: _args
|
||||
- id: _array
|
||||
type: MenuLink
|
||||
pageId: _array
|
||||
- id: _base64
|
||||
type: MenuLink
|
||||
pageId: _base64
|
||||
- id: _date
|
||||
type: MenuLink
|
||||
pageId: _date
|
||||
- id: _diff
|
||||
type: MenuLink
|
||||
pageId: _diff
|
||||
- id: _divide
|
||||
type: MenuLink
|
||||
pageId: _divide
|
||||
- id: _eq
|
||||
type: MenuLink
|
||||
pageId: _eq
|
||||
- id: _event
|
||||
type: MenuLink
|
||||
pageId: _event
|
||||
- id: _format
|
||||
type: MenuLink
|
||||
pageId: _format
|
||||
- id: _function
|
||||
type: MenuLink
|
||||
pageId: _function
|
||||
- id: _get
|
||||
type: MenuLink
|
||||
pageId: _get
|
||||
- id: _global
|
||||
type: MenuLink
|
||||
pageId: _global
|
||||
- id: _gt
|
||||
type: MenuLink
|
||||
pageId: _gt
|
||||
- id: _gte
|
||||
type: MenuLink
|
||||
pageId: _gte
|
||||
- id: _if
|
||||
type: MenuLink
|
||||
pageId: _if
|
||||
- id: _if_none
|
||||
type: MenuLink
|
||||
pageId: _if_none
|
||||
- id: _index
|
||||
type: MenuLink
|
||||
pageId: _index
|
||||
- id: _input
|
||||
type: MenuLink
|
||||
pageId: _input
|
||||
- id: _json
|
||||
type: MenuLink
|
||||
pageId: _json
|
||||
- id: _list_contexts
|
||||
type: MenuLink
|
||||
pageId: _list_contexts
|
||||
- id: _log
|
||||
type: MenuLink
|
||||
pageId: _log
|
||||
- id: _lt
|
||||
type: MenuLink
|
||||
pageId: _lt
|
||||
- id: _lte
|
||||
type: MenuLink
|
||||
pageId: _lte
|
||||
- id: _math
|
||||
type: MenuLink
|
||||
pageId: _math
|
||||
- id: _media
|
||||
type: MenuLink
|
||||
pageId: _media
|
||||
- id: _menu
|
||||
type: MenuLink
|
||||
pageId: _menu
|
||||
- id: _mql
|
||||
type: MenuLink
|
||||
pageId: _mql
|
||||
- id: _ne
|
||||
type: MenuLink
|
||||
pageId: _ne
|
||||
- id: _not
|
||||
type: MenuLink
|
||||
pageId: _not
|
||||
- id: _nunjucks
|
||||
type: MenuLink
|
||||
pageId: _nunjucks
|
||||
- id: _object
|
||||
type: MenuLink
|
||||
pageId: _object
|
||||
- id: _operator
|
||||
type: MenuLink
|
||||
pageId: _operator
|
||||
- id: _or
|
||||
type: MenuLink
|
||||
pageId: _or
|
||||
- id: _product
|
||||
type: MenuLink
|
||||
pageId: _product
|
||||
- id: _random
|
||||
type: MenuLink
|
||||
pageId: _random
|
||||
- id: _ref
|
||||
type: MenuLink
|
||||
pageId: _ref
|
||||
- id: _regex
|
||||
type: MenuLink
|
||||
pageId: _regex
|
||||
- id: _request
|
||||
type: MenuLink
|
||||
pageId: _request
|
||||
- id: _secret
|
||||
type: MenuLink
|
||||
pageId: _secret
|
||||
- id: _state
|
||||
type: MenuLink
|
||||
pageId: _state
|
||||
- id: _string
|
||||
type: MenuLink
|
||||
pageId: _string
|
||||
- id: _subtract
|
||||
type: MenuLink
|
||||
pageId: _subtract
|
||||
- id: _sum
|
||||
type: MenuLink
|
||||
pageId: _sum
|
||||
- id: _type
|
||||
type: MenuLink
|
||||
pageId: _type
|
||||
- id: _uri
|
||||
type: MenuLink
|
||||
pageId: _uri
|
||||
- id: _url_query
|
||||
type: MenuLink
|
||||
pageId: _url_query
|
||||
- id: _uuid
|
||||
type: MenuLink
|
||||
pageId: _uuid
|
||||
- id: _var
|
||||
type: MenuLink
|
||||
pageId: _var
|
||||
- id: _yaml
|
||||
type: MenuLink
|
||||
pageId: _yaml
|
185
packages/docs/pages.yaml
Normal file
185
packages/docs/pages.yaml
Normal file
@ -0,0 +1,185 @@
|
||||
- _ref: introduction.yaml
|
||||
- _ref: tutorial/tutorial-start.yaml
|
||||
- _ref: tutorial/tutorial-create-page.yaml
|
||||
- _ref: tutorial/tutorial-create-page-config.yaml
|
||||
- _ref: tutorial/tutorial-add-blocks.yaml
|
||||
- _ref: tutorial/tutorial-add-blocks-config.yaml
|
||||
- _ref: tutorial/tutorial-actions-operators.yaml
|
||||
- _ref: tutorial/tutorial-actions-operators-config.yaml
|
||||
- _ref: tutorial/tutorial-requests.yaml
|
||||
- _ref: tutorial/tutorial-requests-config.yaml
|
||||
- _ref: tutorial/tutorial-deploy.yaml
|
||||
- _ref: tutorial/next-steps.yaml
|
||||
|
||||
- _ref: concepts/overview.yaml
|
||||
- _ref: concepts/cli.yaml
|
||||
- _ref: concepts/lowdefy-schema.yaml
|
||||
- _ref: concepts/context-and-state.yaml
|
||||
- _ref: concepts/blocks.yaml
|
||||
- _ref: concepts/layout.yaml
|
||||
- _ref: concepts/connections-and-requests.yaml
|
||||
- _ref: concepts/events-and-actions.yaml
|
||||
- _ref: concepts/operators.yaml
|
||||
- _ref: concepts/deployment.yaml
|
||||
- _ref: concepts/secrets.yaml
|
||||
- _ref: concepts/deployment.yaml
|
||||
- _ref: concepts/lists.yaml
|
||||
- _ref: concepts/custom-blocks.yaml
|
||||
|
||||
- _ref: blocks/input/AutoComplete.yaml
|
||||
- _ref: blocks/input/ButtonSelector.yaml
|
||||
- _ref: blocks/input/CheckboxSelector.yaml
|
||||
- _ref: blocks/input/ChromeColorSelector.yaml
|
||||
- _ref: blocks/input/CircleColorSelector.yaml
|
||||
- _ref: blocks/input/ColorSelector.yaml
|
||||
- _ref: blocks/input/CompactColorSelector.yaml
|
||||
- _ref: blocks/input/DateRangeSelector.yaml
|
||||
- _ref: blocks/input/DateSelector.yaml
|
||||
- _ref: blocks/input/DateTimeSelector.yaml
|
||||
- _ref: blocks/input/GithubColorSelector.yaml
|
||||
- _ref: blocks/input/MonthSelector.yaml
|
||||
- _ref: blocks/input/MultipleSelector.yaml
|
||||
- _ref: blocks/input/NumberInput.yaml
|
||||
- _ref: blocks/input/Pagination.yaml
|
||||
- _ref: blocks/input/ParagraphInput.yaml
|
||||
- _ref: blocks/input/RadioSelector.yaml
|
||||
- _ref: blocks/input/RatingSlider.yaml
|
||||
- _ref: blocks/input/S3UploadButton.yaml
|
||||
- _ref: blocks/input/Selector.yaml
|
||||
- _ref: blocks/input/SliderColorSelector.yaml
|
||||
- _ref: blocks/input/SwatchesColorSelector.yaml
|
||||
- _ref: blocks/input/Switch.yaml
|
||||
- _ref: blocks/input/TextArea.yaml
|
||||
- _ref: blocks/input/TextInput.yaml
|
||||
- _ref: blocks/input/TitleInput.yaml
|
||||
- _ref: blocks/input/TwitterColorSelector.yaml
|
||||
- _ref: blocks/input/WeekSelector.yaml
|
||||
|
||||
- _ref: blocks/display/Alert.yaml
|
||||
- _ref: blocks/display/Anchor.yaml
|
||||
- _ref: blocks/display/Avatar.yaml
|
||||
- _ref: blocks/display/Breadcrumb.yaml
|
||||
- _ref: blocks/display/Button.yaml
|
||||
- _ref: blocks/display/DangerousHtml.yaml
|
||||
- _ref: blocks/display/DangerousMarkdown.yaml
|
||||
- _ref: blocks/display/Descriptions.yaml
|
||||
- _ref: blocks/display/Divider.yaml
|
||||
- _ref: blocks/display/EChart.yaml
|
||||
- _ref: blocks/display/Html.yaml
|
||||
- _ref: blocks/display/Icon.yaml
|
||||
- _ref: blocks/display/Markdown.yaml
|
||||
- _ref: blocks/display/MarkdownWithCode.yaml
|
||||
- _ref: blocks/display/Menu.yaml
|
||||
- _ref: blocks/display/Message.yaml
|
||||
- _ref: blocks/display/MobileMenu.yaml
|
||||
- _ref: blocks/display/Notification.yaml
|
||||
- _ref: blocks/display/Paragraph.yaml
|
||||
- _ref: blocks/display/Progress.yaml
|
||||
# - _ref: blocks/display/Skeleton.yaml
|
||||
- _ref: blocks/display/Statistic.yaml
|
||||
- _ref: blocks/display/Title.yaml
|
||||
|
||||
- _ref: blocks/container/Affix.yaml
|
||||
- _ref: blocks/container/Badge.yaml
|
||||
- _ref: blocks/container/Box.yaml
|
||||
- _ref: blocks/container/Card.yaml
|
||||
- _ref: blocks/container/Collapse.yaml
|
||||
- _ref: blocks/container/Comment.yaml
|
||||
- _ref: blocks/container/ConfirmModal.yaml
|
||||
- _ref: blocks/container/Drawer.yaml
|
||||
- _ref: blocks/container/Label.yaml
|
||||
- _ref: blocks/container/Modal.yaml
|
||||
- _ref: blocks/container/Result.yaml
|
||||
- _ref: blocks/container/Span.yaml
|
||||
- _ref: blocks/container/Spin.yaml
|
||||
- _ref: blocks/container/Tabs.yaml
|
||||
|
||||
- _ref: blocks/context/Context.yaml
|
||||
- _ref: blocks/context/PageHCF.yaml
|
||||
- _ref: blocks/context/PageHCSF.yaml
|
||||
- _ref: blocks/context/PageHeaderMenu.yaml
|
||||
- _ref: blocks/context/PageHSCF.yaml
|
||||
- _ref: blocks/context/PageSHCF.yaml
|
||||
- _ref: blocks/context/PageSiderMenu.yaml
|
||||
|
||||
- _ref: blocks/list/ControlledList.yaml
|
||||
- _ref: blocks/list/List.yaml
|
||||
# - _ref: blocks/list/TimelineList.yaml
|
||||
|
||||
- _ref: connections/AmazonRedshift.yaml
|
||||
- _ref: connections/AWSS3.yaml
|
||||
- _ref: connections/AxiosHttp.yaml
|
||||
- _ref: connections/GoogleSheet.yaml
|
||||
- _ref: connections/Knex.yaml
|
||||
- _ref: connections/MariaDB.yaml
|
||||
- _ref: connections/MongoDB.yaml
|
||||
- _ref: connections/MSSQL.yaml
|
||||
- _ref: connections/MySQL.yaml
|
||||
- _ref: connections/OracleDB.yaml
|
||||
- _ref: connections/PostgreSQL.yaml
|
||||
- _ref: connections/SendGridMail.yaml
|
||||
- _ref: connections/SQLite.yaml
|
||||
|
||||
- _ref: actions/CallMethod.yaml
|
||||
- _ref: actions/Link.yaml
|
||||
- _ref: actions/Message.yaml
|
||||
- _ref: actions/Notification.yaml
|
||||
- _ref: actions/Request.yaml
|
||||
- _ref: actions/Reset.yaml
|
||||
- _ref: actions/ScrollTo.yaml
|
||||
- _ref: actions/SetGlobal.yaml
|
||||
- _ref: actions/SetState.yaml
|
||||
- _ref: actions/Validate.yaml
|
||||
|
||||
- _ref: operators/_and.yaml
|
||||
- _ref: operators/_args.yaml
|
||||
- _ref: operators/_array.yaml
|
||||
- _ref: operators/_base64.yaml
|
||||
- _ref: operators/_date.yaml
|
||||
- _ref: operators/_diff.yaml
|
||||
- _ref: operators/_divide.yaml
|
||||
- _ref: operators/_eq.yaml
|
||||
- _ref: operators/_event.yaml
|
||||
- _ref: operators/_format.yaml
|
||||
- _ref: operators/_function.yaml
|
||||
- _ref: operators/_get.yaml
|
||||
- _ref: operators/_global.yaml
|
||||
- _ref: operators/_gt.yaml
|
||||
- _ref: operators/_gte.yaml
|
||||
- _ref: operators/_if.yaml
|
||||
- _ref: operators/_if_none.yaml
|
||||
- _ref: operators/_index.yaml
|
||||
- _ref: operators/_input.yaml
|
||||
- _ref: operators/_json.yaml
|
||||
- _ref: operators/_list_contexts.yaml
|
||||
- _ref: operators/_log.yaml
|
||||
- _ref: operators/_lt.yaml
|
||||
- _ref: operators/_lte.yaml
|
||||
- _ref: operators/_math.yaml
|
||||
- _ref: operators/_media.yaml
|
||||
- _ref: operators/_menu.yaml
|
||||
- _ref: operators/_mql.yaml
|
||||
- _ref: operators/_ne.yaml
|
||||
- _ref: operators/_not.yaml
|
||||
- _ref: operators/_nunjucks.yaml
|
||||
- _ref: operators/_object.yaml
|
||||
- _ref: operators/_operator.yaml
|
||||
- _ref: operators/_or.yaml
|
||||
- _ref: operators/_product.yaml
|
||||
- _ref: operators/_random.yaml
|
||||
- _ref: operators/_ref.yaml
|
||||
- _ref: operators/_regex.yaml
|
||||
- _ref: operators/_request.yaml
|
||||
- _ref: operators/_secret.yaml
|
||||
- _ref: operators/_state.yaml
|
||||
- _ref: operators/_string.yaml
|
||||
- _ref: operators/_subtract.yaml
|
||||
- _ref: operators/_sum.yaml
|
||||
- _ref: operators/_type.yaml
|
||||
- _ref: operators/_uri.yaml
|
||||
- _ref: operators/_url_query.yaml
|
||||
- _ref: operators/_uuid.yaml
|
||||
- _ref: operators/_var.yaml
|
||||
- _ref: operators/_yaml.yaml
|
||||
|
||||
- _ref: 404.yaml
|
@ -13,7 +13,19 @@ module.exports = {
|
||||
mode: 'production',
|
||||
target: 'node',
|
||||
node: false,
|
||||
externals: ['fs', 'path', 'chokidar'],
|
||||
externals: [
|
||||
'fs',
|
||||
'path',
|
||||
'chokidar',
|
||||
'oracledb',
|
||||
'mssql',
|
||||
'mysql',
|
||||
'mysql2',
|
||||
'pg',
|
||||
'pg-query-stream',
|
||||
'sqlite3',
|
||||
'tedious',
|
||||
],
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
|
@ -55,11 +55,17 @@
|
||||
"graphql": "15.5.0",
|
||||
"graphql-type-json": "0.3.2",
|
||||
"jsonwebtoken": "8.5.1",
|
||||
"knex": "0.95.4",
|
||||
"mingo": "4.1.2",
|
||||
"moment": "2.29.1",
|
||||
"mongodb": "3.6.4",
|
||||
"mssql": "6.3.1",
|
||||
"mysql": "2.18.1",
|
||||
"openid-client": "4.6.0",
|
||||
"saslprep": "1.0.3"
|
||||
"oracledb": "5.1.0",
|
||||
"pg": "8.5.1",
|
||||
"saslprep": "1.0.3",
|
||||
"sqlite3": "5.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/cli": "7.12.16",
|
||||
|
27
packages/graphql/src/connections/Knex/Knex.js
Normal file
27
packages/graphql/src/connections/Knex/Knex.js
Normal file
@ -0,0 +1,27 @@
|
||||
/*
|
||||
Copyright 2020-2021 Lowdefy, Inc
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import schema from './KnexSchema.json';
|
||||
import KnexBuilder from './KnexBuilder/KnexBuilder';
|
||||
import KnexRaw from './KnexRaw/KnexRaw';
|
||||
|
||||
export default {
|
||||
schema,
|
||||
requests: {
|
||||
KnexBuilder,
|
||||
KnexRaw,
|
||||
},
|
||||
};
|
60
packages/graphql/src/connections/Knex/Knex.test.js
Normal file
60
packages/graphql/src/connections/Knex/Knex.test.js
Normal file
@ -0,0 +1,60 @@
|
||||
/*
|
||||
Copyright 2020-2021 Lowdefy, Inc
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import { validate } from '@lowdefy/ajv';
|
||||
import Knex from './Knex';
|
||||
|
||||
const { schema } = Knex;
|
||||
|
||||
test('All requests are present', () => {
|
||||
expect(Knex.requests.KnexRaw).toBeDefined();
|
||||
expect(Knex.requests.KnexBuilder).toBeDefined();
|
||||
});
|
||||
|
||||
test('valid connection schema, string connection', () => {
|
||||
const connection = {
|
||||
client: 'pg',
|
||||
connection: 'postgresql://user:password@database.server.com:5432/db',
|
||||
};
|
||||
expect(validate({ schema, data: connection })).toEqual({ valid: true });
|
||||
});
|
||||
|
||||
test('valid connection schema, object connection', () => {
|
||||
const connection = {
|
||||
client: 'pg',
|
||||
connection: {
|
||||
host: 'database.server.com',
|
||||
user: 'user',
|
||||
password: 'password',
|
||||
database: 'db',
|
||||
},
|
||||
};
|
||||
expect(validate({ schema, data: connection })).toEqual({ valid: true });
|
||||
});
|
||||
|
||||
test('client missing', () => {
|
||||
const connection = { connection: 'postgresql://user:password@database.server.com:5432/db' };
|
||||
expect(() => validate({ schema, data: connection })).toThrow(
|
||||
'Knex connection should have required property "client".'
|
||||
);
|
||||
});
|
||||
|
||||
test('client missing', () => {
|
||||
const connection = { client: 'pg' };
|
||||
expect(() => validate({ schema, data: connection })).toThrow(
|
||||
'Knex connection should have required property "connection".'
|
||||
);
|
||||
});
|
@ -0,0 +1,51 @@
|
||||
/*
|
||||
Copyright 2020-2021 Lowdefy, Inc
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import knex from 'knex';
|
||||
import { type } from '@lowdefy/helpers';
|
||||
import schema from './KnexBuilderSchema.json';
|
||||
|
||||
async function knexBuilder({ request, connection }) {
|
||||
let client = knex(connection);
|
||||
if (request.tableName) {
|
||||
client = client(request.tableName);
|
||||
}
|
||||
for (const method of request.query) {
|
||||
if (Object.keys(method).length !== 1) {
|
||||
throw new Error(
|
||||
`Invalid query, more than one method defined in a method object, received ${JSON.stringify(
|
||||
Object.keys(method)
|
||||
)}.`
|
||||
);
|
||||
}
|
||||
const methodName = Object.keys(method)[0];
|
||||
const methodArgs = method[methodName];
|
||||
if (!type.isArray(methodArgs)) {
|
||||
throw new Error(
|
||||
`Invalid query, method "${methodName}" arguments should be an array, received ${JSON.stringify(
|
||||
methodArgs
|
||||
)}.`
|
||||
);
|
||||
}
|
||||
if (!type.isFunction(client[methodName])) {
|
||||
throw new Error(`Invalid query builder method "${methodName}".`);
|
||||
}
|
||||
client = client[methodName](...methodArgs);
|
||||
}
|
||||
return client;
|
||||
}
|
||||
|
||||
export default { resolver: knexBuilder, schema, checkRead: false, checkWrite: false };
|
@ -0,0 +1,146 @@
|
||||
/*
|
||||
Copyright 2020-2021 Lowdefy, Inc
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import { validate } from '@lowdefy/ajv';
|
||||
import knex from 'knex';
|
||||
import KnexBuilder from './KnexBuilder';
|
||||
|
||||
const mockKnexClient = jest.fn(() => mockKnexClient);
|
||||
|
||||
mockKnexClient.select = jest.fn(() => mockKnexClient);
|
||||
mockKnexClient.from = jest.fn(() => mockKnexClient);
|
||||
mockKnexClient.where = jest.fn(() => mockKnexClient);
|
||||
|
||||
jest.mock('knex', () => jest.fn(() => mockKnexClient));
|
||||
|
||||
const { resolver, schema } = KnexBuilder;
|
||||
|
||||
const connection = {
|
||||
client: 'pg',
|
||||
connection: 'connection',
|
||||
};
|
||||
|
||||
test('KnexBuilder with tableName', async () => {
|
||||
mockKnexClient.where.mockImplementationOnce(() =>
|
||||
Promise.resolve([
|
||||
{
|
||||
name: 'steve',
|
||||
},
|
||||
])
|
||||
);
|
||||
const request = {
|
||||
query: [{ select: ['*'] }, { where: ['name', 'steve'] }],
|
||||
tableName: 'table',
|
||||
};
|
||||
const res = await resolver({ request, connection });
|
||||
expect(knex.mock.calls).toEqual([
|
||||
[
|
||||
{
|
||||
client: 'pg',
|
||||
connection: 'connection',
|
||||
},
|
||||
],
|
||||
]);
|
||||
expect(mockKnexClient.mock.calls).toEqual([['table']]);
|
||||
expect(mockKnexClient.select.mock.calls).toEqual([['*']]);
|
||||
expect(mockKnexClient.where.mock.calls).toEqual([['name', 'steve']]);
|
||||
expect(res).toEqual([
|
||||
{
|
||||
name: 'steve',
|
||||
},
|
||||
]);
|
||||
});
|
||||
|
||||
test('KnexBuilder', async () => {
|
||||
mockKnexClient.where.mockImplementationOnce(() =>
|
||||
Promise.resolve([
|
||||
{
|
||||
name: 'steve',
|
||||
},
|
||||
])
|
||||
);
|
||||
const request = {
|
||||
query: [{ select: ['*'] }, { from: ['table'] }, { where: ['name', 'steve'] }],
|
||||
};
|
||||
const res = await resolver({ request, connection });
|
||||
expect(knex.mock.calls).toEqual([
|
||||
[
|
||||
{
|
||||
client: 'pg',
|
||||
connection: 'connection',
|
||||
},
|
||||
],
|
||||
]);
|
||||
expect(mockKnexClient.select.mock.calls).toEqual([['*']]);
|
||||
expect(mockKnexClient.from.mock.calls).toEqual([['table']]);
|
||||
expect(mockKnexClient.where.mock.calls).toEqual([['name', 'steve']]);
|
||||
expect(res).toEqual([
|
||||
{
|
||||
name: 'steve',
|
||||
},
|
||||
]);
|
||||
});
|
||||
|
||||
test('KnexBuilder, invalid method', async () => {
|
||||
const request = {
|
||||
query: [{ invalid: ['*'] }],
|
||||
};
|
||||
await expect(resolver({ request, connection })).rejects.toThrow(
|
||||
'Invalid query builder method "invalid".'
|
||||
);
|
||||
});
|
||||
|
||||
test('KnexBuilder, more than one method', async () => {
|
||||
const request = {
|
||||
query: [{ select: ['*'], where: ['name', 'steve'] }],
|
||||
};
|
||||
await expect(resolver({ request, connection })).rejects.toThrow(
|
||||
'Invalid query, more than one method defined in a method object, received ["select","where"].'
|
||||
);
|
||||
});
|
||||
|
||||
test('KnexBuilder, method args not an array', async () => {
|
||||
const request = {
|
||||
query: [{ select: '*' }],
|
||||
};
|
||||
await expect(resolver({ request, connection })).rejects.toThrow(
|
||||
'Invalid query, method "select" arguments should be an array, received "*".'
|
||||
);
|
||||
});
|
||||
|
||||
test('valid request', () => {
|
||||
let request = {
|
||||
query: [{ select: ['*'] }, { from: ['table'] }],
|
||||
};
|
||||
expect(validate({ schema, data: request })).toEqual({ valid: true });
|
||||
request = {
|
||||
query: [{ select: ['*'] }],
|
||||
tableName: 'table',
|
||||
};
|
||||
expect(validate({ schema, data: request })).toEqual({ valid: true });
|
||||
request = {
|
||||
query: [{ select: ['*'] }],
|
||||
tableName: { t: 'table' },
|
||||
};
|
||||
expect(validate({ schema, data: request })).toEqual({ valid: true });
|
||||
});
|
||||
|
||||
test('query missing', () => {
|
||||
const request = {};
|
||||
expect(() => validate({ schema, data: request })).toThrow(
|
||||
'KnexBuilder request should have required property "query".'
|
||||
);
|
||||
});
|
@ -0,0 +1,28 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"title": "Lowdefy Request Schema - KnexBuilder",
|
||||
"type": "object",
|
||||
"required": ["query"],
|
||||
"properties": {
|
||||
"query": {
|
||||
"type": "array",
|
||||
"description": "SQL query builder array. An array of objects, with a single key which is the name of the knex builder function. The value should be an array of arguments to pass to the builder function.",
|
||||
"errorMessage": {
|
||||
"type": "KnexBuilder request property \"query\" should be an array."
|
||||
}
|
||||
},
|
||||
"tableName": {
|
||||
"type": ["string", "object"],
|
||||
"description": "The name of the table to query from.",
|
||||
"errorMessage": {
|
||||
"type": "KnexBuilder request property \"tableName\" should be a string or object"
|
||||
}
|
||||
}
|
||||
},
|
||||
"errorMessage": {
|
||||
"type": "KnexBuilder request properties should be an object.",
|
||||
"required": {
|
||||
"query": "KnexBuilder request should have required property \"query\"."
|
||||
}
|
||||
}
|
||||
}
|
31
packages/graphql/src/connections/Knex/KnexRaw/KnexRaw.js
Normal file
31
packages/graphql/src/connections/Knex/KnexRaw/KnexRaw.js
Normal file
@ -0,0 +1,31 @@
|
||||
/*
|
||||
Copyright 2020-2021 Lowdefy, Inc
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import knex from 'knex';
|
||||
import schema from './KnexRawSchema.json';
|
||||
|
||||
async function knexRaw({ request, connection }) {
|
||||
const client = knex(connection);
|
||||
const res = await client.raw(request.query, request.parameters);
|
||||
Object.keys(res).forEach((key) => {
|
||||
if (key.startsWith('_')) {
|
||||
delete res[key];
|
||||
}
|
||||
});
|
||||
return res;
|
||||
}
|
||||
|
||||
export default { resolver: knexRaw, schema, checkRead: false, checkWrite: false };
|
@ -0,0 +1,91 @@
|
||||
/*
|
||||
Copyright 2020-2021 Lowdefy, Inc
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import { validate } from '@lowdefy/ajv';
|
||||
import knex from 'knex';
|
||||
import KnexRaw from './KnexRaw';
|
||||
|
||||
const mockRaw = jest.fn(() => {
|
||||
return Promise.resolve({ rows: [{ name: 'name' }], _types: 'types' });
|
||||
});
|
||||
|
||||
jest.mock('knex', () =>
|
||||
jest.fn(() => ({
|
||||
raw: mockRaw,
|
||||
}))
|
||||
);
|
||||
|
||||
const { resolver, schema } = KnexRaw;
|
||||
|
||||
const request = {
|
||||
query: 'SELECT * FROM "table" WHERE "name" = :name',
|
||||
parameters: { name: 'name' },
|
||||
};
|
||||
const connection = {
|
||||
client: 'pg',
|
||||
connection: 'connection',
|
||||
};
|
||||
|
||||
test('knexRaw', async () => {
|
||||
const res = await resolver({ request, connection });
|
||||
expect(knex.mock.calls).toEqual([
|
||||
[
|
||||
{
|
||||
client: 'pg',
|
||||
connection: 'connection',
|
||||
},
|
||||
],
|
||||
]);
|
||||
expect(mockRaw.mock.calls).toEqual([
|
||||
[
|
||||
'SELECT * FROM "table" WHERE "name" = :name',
|
||||
{
|
||||
name: 'name',
|
||||
},
|
||||
],
|
||||
]);
|
||||
expect(res).toEqual({
|
||||
rows: [
|
||||
{
|
||||
name: 'name',
|
||||
},
|
||||
],
|
||||
});
|
||||
});
|
||||
|
||||
test('valid request', () => {
|
||||
let request = {
|
||||
query: 'SELECT * FROM "table"',
|
||||
};
|
||||
expect(validate({ schema, data: request })).toEqual({ valid: true });
|
||||
request = {
|
||||
query: 'SELECT * FROM "table" WHERE "name" = :name',
|
||||
parameters: { name: 'name' },
|
||||
};
|
||||
expect(validate({ schema, data: request })).toEqual({ valid: true });
|
||||
request = {
|
||||
query: 'SELECT * FROM "table" WHERE "name" = ?',
|
||||
parameters: ['name'],
|
||||
};
|
||||
expect(validate({ schema, data: request })).toEqual({ valid: true });
|
||||
});
|
||||
|
||||
test('query missing', () => {
|
||||
const request = {};
|
||||
expect(() => validate({ schema, data: request })).toThrow(
|
||||
'KnexRaw request should have required property "query".'
|
||||
);
|
||||
});
|
@ -0,0 +1,28 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"title": "Lowdefy Request Schema - KnexRaw",
|
||||
"type": "object",
|
||||
"required": ["query"],
|
||||
"properties": {
|
||||
"query": {
|
||||
"type": "string",
|
||||
"description": "SQL query string.",
|
||||
"errorMessage": {
|
||||
"type": "KnexRaw request property \"query\" should be a string."
|
||||
}
|
||||
},
|
||||
"parameters": {
|
||||
"type": ["string","number", "array", "object"],
|
||||
"description": "SQL query parameters.",
|
||||
"errorMessage": {
|
||||
"type": "KnexRaw request property \"parameters\" should be a string, number, array, or object."
|
||||
}
|
||||
}
|
||||
},
|
||||
"errorMessage": {
|
||||
"type": "KnexRaw request properties should be an object.",
|
||||
"required": {
|
||||
"query": "KnexRaw request should have required property \"query\"."
|
||||
}
|
||||
}
|
||||
}
|
43
packages/graphql/src/connections/Knex/KnexSchema.json
Normal file
43
packages/graphql/src/connections/Knex/KnexSchema.json
Normal file
@ -0,0 +1,43 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"title": "Lowdefy Connection Schema - Knex",
|
||||
"type": "object",
|
||||
"required": ["client", "connection"],
|
||||
"properties": {
|
||||
"client": {
|
||||
"type": "string",
|
||||
"description": "SQL query string.",
|
||||
"errorMessage": {
|
||||
"type": "Knex connection property \"client\" should be a string."
|
||||
}
|
||||
},
|
||||
"connection": {
|
||||
"type": ["string", "object"],
|
||||
"description": "SQL query string.",
|
||||
"errorMessage": {
|
||||
"type": "Knex connection property \"connection\" should be a string or object."
|
||||
}
|
||||
},
|
||||
"searchPath": {
|
||||
"type": "string",
|
||||
"description": "Set PostgreSQL search path.",
|
||||
"errorMessage": {
|
||||
"type": "Knex connection property \"searchPath\" should be a string."
|
||||
}
|
||||
},
|
||||
"version": {
|
||||
"type": "string",
|
||||
"description": "Set database version.",
|
||||
"errorMessage": {
|
||||
"type": "Knex connection property \"version\" should be a string."
|
||||
}
|
||||
}
|
||||
},
|
||||
"errorMessage": {
|
||||
"type": "Knex connection properties should be an object.",
|
||||
"required": {
|
||||
"client": "Knex connection should have required property \"client\".",
|
||||
"connection": "Knex connection should have required property \"connection\"."
|
||||
}
|
||||
}
|
||||
}
|
@ -17,6 +17,7 @@
|
||||
import AwsS3Bucket from './AwsS3Bucket/AwsS3Bucket';
|
||||
import AxiosHttp from './AxiosHttp/AxiosHttp';
|
||||
import GoogleSheet from './GoogleSheet/GoogleSheet';
|
||||
import Knex from './Knex/Knex';
|
||||
import MongoDBCollection from './MongoDBCollection/MongoDBCollection';
|
||||
import SendGridMail from './SendGridMail/SendGridMail';
|
||||
|
||||
@ -24,6 +25,7 @@ const resolvers = {
|
||||
AwsS3Bucket,
|
||||
AxiosHttp,
|
||||
GoogleSheet,
|
||||
Knex,
|
||||
MongoDBCollection,
|
||||
SendGridMail,
|
||||
};
|
||||
|
@ -21,6 +21,8 @@ import { ComponentController } from '../controllers/componentController';
|
||||
|
||||
const mockLog = jest.fn();
|
||||
|
||||
const mockSet = jest.fn();
|
||||
|
||||
const logger = {
|
||||
log: mockLog,
|
||||
};
|
||||
@ -33,7 +35,7 @@ const config = {
|
||||
getSecrets: mockGetSecrets,
|
||||
};
|
||||
|
||||
const input = { req: { headers: { host: 'host' } } };
|
||||
const input = { req: { headers: { host: 'host' } }, res: { set: mockSet } };
|
||||
|
||||
/* TODO:
|
||||
- secrets can only be accessed where they should be
|
||||
@ -91,5 +93,6 @@ test('setHeaders', async () => {
|
||||
const contextFn = createContext(config);
|
||||
const context = await contextFn(input);
|
||||
const openIDController = context.getController('openId');
|
||||
expect(openIDController.setHeaders).toBe(context.setHeaders);
|
||||
openIDController.setHeader('key', 'value');
|
||||
expect(mockSet.mock.calls).toEqual([['key', 'value']]);
|
||||
});
|
||||
|
@ -777,3 +777,39 @@ describe('filter menus', () => {
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
test('Filter invalid menu item types', async () => {
|
||||
mockLoadComponent.mockImplementation((id) => {
|
||||
if (id === 'menus') {
|
||||
return [
|
||||
{
|
||||
menuId: 'default',
|
||||
links: [
|
||||
{
|
||||
id: 'menuitem:default:1',
|
||||
menuItemId: '1',
|
||||
type: 'MenuItem',
|
||||
pageId: 'page',
|
||||
auth: 'protected',
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
}
|
||||
if (id === 'config') {
|
||||
return {};
|
||||
}
|
||||
return null;
|
||||
});
|
||||
const controller = createComponentController(context);
|
||||
const res = await controller.getMenus();
|
||||
expect(res).toEqual({
|
||||
homePageId: null,
|
||||
menus: [
|
||||
{
|
||||
menuId: 'default',
|
||||
links: [],
|
||||
},
|
||||
],
|
||||
});
|
||||
});
|
||||
|
@ -2,9 +2,7 @@ const path = require('path');
|
||||
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
|
||||
const { dependencies, devDependencies } = require('./package.json');
|
||||
|
||||
const externals = [...Object.keys(dependencies), ...Object.keys(devDependencies)].filter(
|
||||
(name) => name !== 'saslprep'
|
||||
);
|
||||
const externals = [...Object.keys(dependencies), ...Object.keys(devDependencies)];
|
||||
|
||||
module.exports = {
|
||||
entry: './src/index.js',
|
||||
|
@ -101,7 +101,9 @@ const RootQuery = ({ children, lowdefy }) => {
|
||||
// User is authenticated but has removed idToken from localStorage.
|
||||
lowdefy.auth.logout();
|
||||
}
|
||||
lowdefy.user = parseJwt(idToken);
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { iat, exp, aud, iss, ...user } = parseJwt(idToken);
|
||||
lowdefy.user = user;
|
||||
}
|
||||
return <>{children}</>;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user