@lowdefy/docs-content 0.0.0-experimental-20260710073520
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +20 -0
- package/content/actions/callapi.md +66 -0
- package/content/actions/callmethod.md +41 -0
- package/content/actions/copytoclipboard.md +32 -0
- package/content/actions/displaymessage.md +53 -0
- package/content/actions/downloadcsv.md +89 -0
- package/content/actions/fetch.md +50 -0
- package/content/actions/geolocationcurrentposition.md +56 -0
- package/content/actions/link.md +104 -0
- package/content/actions/login.md +85 -0
- package/content/actions/logout.md +56 -0
- package/content/actions/pdfmake.md +304 -0
- package/content/actions/request.md +67 -0
- package/content/actions/reset.md +27 -0
- package/content/actions/resetvalidation.md +85 -0
- package/content/actions/scrollto.md +85 -0
- package/content/actions/setdarkmode.md +62 -0
- package/content/actions/setfocus.md +33 -0
- package/content/actions/setglobal.md +63 -0
- package/content/actions/setlocale.md +69 -0
- package/content/actions/setstate.md +70 -0
- package/content/actions/throw.md +72 -0
- package/content/actions/validate.md +87 -0
- package/content/actions/wait.md +24 -0
- package/content/agents/agent-endpoint-tools.md +190 -0
- package/content/agents/agent-mcp-tools.md +124 -0
- package/content/agents/agent-multi-agent.md +136 -0
- package/content/agents/agent-properties.md +174 -0
- package/content/agents/agent-server-hooks.md +336 -0
- package/content/agents/agentchat.md +515 -0
- package/content/agents/agentconversations.md +148 -0
- package/content/concepts/ai-agent-docs.md +190 -0
- package/content/concepts/cli.md +213 -0
- package/content/concepts/connections-and-requests.md +7 -0
- package/content/concepts/custom-html.md +3 -0
- package/content/concepts/custom-styling.md +161 -0
- package/content/concepts/events-and-actions.md +271 -0
- package/content/concepts/hosting-files.md +18 -0
- package/content/concepts/i18n.md +320 -0
- package/content/concepts/keyboard-shortcuts.md +218 -0
- package/content/concepts/layout-overview.md +478 -0
- package/content/concepts/lists.md +144 -0
- package/content/concepts/logger.md +43 -0
- package/content/concepts/lowdefy-schema.md +365 -0
- package/content/concepts/menus.md +144 -0
- package/content/concepts/module-authoring.md +564 -0
- package/content/concepts/modules.md +338 -0
- package/content/concepts/operators.md +45 -0
- package/content/concepts/overview.md +19 -0
- package/content/concepts/references-and-templates.md +207 -0
- package/content/concepts/secrets.md +24 -0
- package/content/concepts/selectors.md +143 -0
- package/content/connections/amazonredshift.md +176 -0
- package/content/connections/anthropic.md +232 -0
- package/content/connections/awss3.md +313 -0
- package/content/connections/azureblobstorage.md +133 -0
- package/content/connections/elasticsearch.md +371 -0
- package/content/connections/google.md +228 -0
- package/content/connections/googlecloudstorage.md +139 -0
- package/content/connections/googlesheet.md +313 -0
- package/content/connections/knex.md +206 -0
- package/content/connections/mariadb.md +177 -0
- package/content/connections/mcp.md +134 -0
- package/content/connections/mongodb.md +739 -0
- package/content/connections/mssql.md +191 -0
- package/content/connections/mysql.md +192 -0
- package/content/connections/openai-connection.md +228 -0
- package/content/connections/postgresql.md +200 -0
- package/content/connections/redis.md +116 -0
- package/content/connections/sendgridmail.md +94 -0
- package/content/connections/smtp.md +149 -0
- package/content/connections/sqlite.md +187 -0
- package/content/connections/stripe.md +115 -0
- package/content/container-blocks/affix.md +413 -0
- package/content/container-blocks/alert.md +937 -0
- package/content/container-blocks/badge.md +1222 -0
- package/content/container-blocks/box.md +1453 -0
- package/content/container-blocks/card.md +1200 -0
- package/content/container-blocks/carousel.md +2247 -0
- package/content/container-blocks/collapse.md +1335 -0
- package/content/container-blocks/configprovider.md +1070 -0
- package/content/container-blocks/confirmmodal.md +1159 -0
- package/content/container-blocks/content.md +597 -0
- package/content/container-blocks/descriptions.md +870 -0
- package/content/container-blocks/drawer.md +1379 -0
- package/content/container-blocks/dropdownmenu.md +643 -0
- package/content/container-blocks/flex.md +1510 -0
- package/content/container-blocks/footer.md +380 -0
- package/content/container-blocks/googlemaps.md +546 -0
- package/content/container-blocks/googlemapsheatmap.md +607 -0
- package/content/container-blocks/googlemapsscript.md +61 -0
- package/content/container-blocks/header.md +302 -0
- package/content/container-blocks/label.md +739 -0
- package/content/container-blocks/layout.md +604 -0
- package/content/container-blocks/masonry.md +1090 -0
- package/content/container-blocks/mobilemenu.md +1244 -0
- package/content/container-blocks/modal.md +1180 -0
- package/content/container-blocks/pageheadermenu.md +614 -0
- package/content/container-blocks/pagesidebarlayout.md +438 -0
- package/content/container-blocks/pagesidermenu.md +651 -0
- package/content/container-blocks/popover.md +1421 -0
- package/content/container-blocks/result.md +972 -0
- package/content/container-blocks/sider.md +1064 -0
- package/content/container-blocks/span.md +747 -0
- package/content/container-blocks/spinner.md +267 -0
- package/content/container-blocks/splitter.md +1735 -0
- package/content/container-blocks/tabs.md +1718 -0
- package/content/container-blocks/tooltip.md +1274 -0
- package/content/container-blocks/watermark.md +515 -0
- package/content/controls/for.md +103 -0
- package/content/controls/if.md +107 -0
- package/content/controls/log.md +50 -0
- package/content/controls/parallel.md +71 -0
- package/content/controls/parallel_for.md +36 -0
- package/content/controls/reject.md +56 -0
- package/content/controls/return.md +66 -0
- package/content/controls/set_state.md +98 -0
- package/content/controls/switch.md +90 -0
- package/content/controls/throw.md +79 -0
- package/content/controls/try.md +88 -0
- package/content/deployment/docker.md +149 -0
- package/content/deployment/node-server.md +27 -0
- package/content/deployment/vercel.md +101 -0
- package/content/display-blocks/aggrid.md +1459 -0
- package/content/display-blocks/anchor.md +336 -0
- package/content/display-blocks/avatar.md +1154 -0
- package/content/display-blocks/breadcrumb.md +517 -0
- package/content/display-blocks/button.md +758 -0
- package/content/display-blocks/calendar.md +156 -0
- package/content/display-blocks/dangeroushtml.md +314 -0
- package/content/display-blocks/dangerousmarkdown.md +423 -0
- package/content/display-blocks/diffgit.md +44 -0
- package/content/display-blocks/difflist.md +225 -0
- package/content/display-blocks/diffsidebyside.md +56 -0
- package/content/display-blocks/difftimeline.md +94 -0
- package/content/display-blocks/divider.md +406 -0
- package/content/display-blocks/download.md +60 -0
- package/content/display-blocks/dropdownbutton.md +661 -0
- package/content/display-blocks/echart.md +418 -0
- package/content/display-blocks/floatbutton.md +545 -0
- package/content/display-blocks/html.md +311 -0
- package/content/display-blocks/icon.md +717 -0
- package/content/display-blocks/img.md +479 -0
- package/content/display-blocks/markdown.md +520 -0
- package/content/display-blocks/markdownwithcode.md +730 -0
- package/content/display-blocks/menu.md +1123 -0
- package/content/display-blocks/message.md +941 -0
- package/content/display-blocks/notification.md +1410 -0
- package/content/display-blocks/paragraph.md +643 -0
- package/content/display-blocks/progress.md +818 -0
- package/content/display-blocks/qrcode.md +519 -0
- package/content/display-blocks/s3download.md +240 -0
- package/content/display-blocks/search.md +360 -0
- package/content/display-blocks/skeleton.md +272 -0
- package/content/display-blocks/skeletonavatar.md +222 -0
- package/content/display-blocks/skeletonbutton.md +245 -0
- package/content/display-blocks/skeletoninput.md +223 -0
- package/content/display-blocks/skeletonparagraph.md +201 -0
- package/content/display-blocks/statistic.md +485 -0
- package/content/display-blocks/steps.md +585 -0
- package/content/display-blocks/tag.md +620 -0
- package/content/display-blocks/title.md +654 -0
- package/content/display-blocks/tour.md +2359 -0
- package/content/input-blocks/autocomplete.md +786 -0
- package/content/input-blocks/buttonselector.md +964 -0
- package/content/input-blocks/checkboxselector.md +765 -0
- package/content/input-blocks/checkboxswitch.md +497 -0
- package/content/input-blocks/colorselector.md +884 -0
- package/content/input-blocks/daterangeselector.md +777 -0
- package/content/input-blocks/dateselector.md +693 -0
- package/content/input-blocks/datetimeselector.md +791 -0
- package/content/input-blocks/inputgallery.md +528 -0
- package/content/input-blocks/monthselector.md +717 -0
- package/content/input-blocks/multipleselector.md +1337 -0
- package/content/input-blocks/numberinput.md +855 -0
- package/content/input-blocks/pagination.md +679 -0
- package/content/input-blocks/paragraphinput.md +1664 -0
- package/content/input-blocks/passwordinput.md +480 -0
- package/content/input-blocks/phonenumberinput.md +688 -0
- package/content/input-blocks/radioselector.md +820 -0
- package/content/input-blocks/ratingslider.md +684 -0
- package/content/input-blocks/s3uploadbutton.md +384 -0
- package/content/input-blocks/s3uploaddragger.md +305 -0
- package/content/input-blocks/s3uploadphoto.md +288 -0
- package/content/input-blocks/segmentedselector.md +782 -0
- package/content/input-blocks/selector.md +1162 -0
- package/content/input-blocks/switch.md +552 -0
- package/content/input-blocks/textarea.md +714 -0
- package/content/input-blocks/textinput.md +639 -0
- package/content/input-blocks/tiptapinput.md +226 -0
- package/content/input-blocks/tiptapmentioninput.md +471 -0
- package/content/input-blocks/titleinput.md +1094 -0
- package/content/input-blocks/treeinput.md +144 -0
- package/content/input-blocks/treemultipleselector.md +162 -0
- package/content/input-blocks/treeselector.md +185 -0
- package/content/input-blocks/upload.md +149 -0
- package/content/input-blocks/uploaddragger.md +85 -0
- package/content/input-blocks/uploadphoto.md +84 -0
- package/content/input-blocks/weekselector.md +630 -0
- package/content/list-blocks/controlledlist.md +498 -0
- package/content/list-blocks/list.md +529 -0
- package/content/list-blocks/listselector.md +301 -0
- package/content/list-blocks/masonrylist.md +230 -0
- package/content/migration/upgrade-guide.md +106 -0
- package/content/migration/v4-to-v5.md +589 -0
- package/content/migration/v5-to-v6.md +36 -0
- package/content/operators/_actions.md +58 -0
- package/content/operators/_and.md +76 -0
- package/content/operators/_api.md +254 -0
- package/content/operators/_app.md +114 -0
- package/content/operators/_args.md +65 -0
- package/content/operators/_array.md +331 -0
- package/content/operators/_base64.md +49 -0
- package/content/operators/_boolean.md +33 -0
- package/content/operators/_build.md +166 -0
- package/content/operators/_change_case.md +357 -0
- package/content/operators/_date.md +415 -0
- package/content/operators/_dayjs.md +128 -0
- package/content/operators/_diff.md +61 -0
- package/content/operators/_divide.md +32 -0
- package/content/operators/_eq.md +52 -0
- package/content/operators/_event.md +86 -0
- package/content/operators/_function.md +52 -0
- package/content/operators/_get.md +92 -0
- package/content/operators/_global.md +86 -0
- package/content/operators/_gt.md +50 -0
- package/content/operators/_gte.md +50 -0
- package/content/operators/_hash.md +112 -0
- package/content/operators/_if.md +30 -0
- package/content/operators/_if_none.md +47 -0
- package/content/operators/_index.md +48 -0
- package/content/operators/_input.md +86 -0
- package/content/operators/_intl.md +135 -0
- package/content/operators/_item.md +166 -0
- package/content/operators/_js.md +113 -0
- package/content/operators/_json.md +120 -0
- package/content/operators/_jsonata.md +152 -0
- package/content/operators/_locale.md +65 -0
- package/content/operators/_location.md +40 -0
- package/content/operators/_log.md +22 -0
- package/content/operators/_lt.md +50 -0
- package/content/operators/_lte.md +50 -0
- package/content/operators/_math.md +407 -0
- package/content/operators/_media.md +83 -0
- package/content/operators/_menu.md +62 -0
- package/content/operators/_module.md +340 -0
- package/content/operators/_mql.md +95 -0
- package/content/operators/_ne.md +62 -0
- package/content/operators/_not.md +33 -0
- package/content/operators/_number.md +159 -0
- package/content/operators/_nunjucks.md +117 -0
- package/content/operators/_object.md +253 -0
- package/content/operators/_operator.md +33 -0
- package/content/operators/_or.md +67 -0
- package/content/operators/_product.md +45 -0
- package/content/operators/_random.md +90 -0
- package/content/operators/_ref.md +80 -0
- package/content/operators/_regex.md +69 -0
- package/content/operators/_request.md +35 -0
- package/content/operators/_request_details.md +29 -0
- package/content/operators/_secret.md +56 -0
- package/content/operators/_state.md +134 -0
- package/content/operators/_step.md +98 -0
- package/content/operators/_string.md +327 -0
- package/content/operators/_subtract.md +24 -0
- package/content/operators/_sum.md +45 -0
- package/content/operators/_switch.md +37 -0
- package/content/operators/_t.md +96 -0
- package/content/operators/_theme.md +65 -0
- package/content/operators/_type.md +78 -0
- package/content/operators/_uri.md +49 -0
- package/content/operators/_url_query.md +92 -0
- package/content/operators/_user.md +154 -0
- package/content/operators/_uuid.md +118 -0
- package/content/operators/_var.md +88 -0
- package/content/operators/_yaml.md +96 -0
- package/content/other/introduction.md +39 -0
- package/content/other/next-auth-providers.md +3 -0
- package/content/other/updatesession.md +26 -0
- package/content/plugins/plugins-actions.md +80 -0
- package/content/plugins/plugins-connections.md +98 -0
- package/content/plugins/plugins-dev.md +138 -0
- package/content/plugins/plugins-introduction.md +29 -0
- package/content/plugins/plugins-operators.md +71 -0
- package/content/testing/e2e-auth.md +108 -0
- package/content/testing/e2e-configuration.md +107 -0
- package/content/testing/e2e-getting-started.md +96 -0
- package/content/testing/e2e-introduction.md +53 -0
- package/content/testing/e2e-mocking.md +155 -0
- package/content/testing/e2e-writing-tests.md +214 -0
- package/content/tutorial/tutorial-actions-operators.md +222 -0
- package/content/tutorial/tutorial-add-blocks.md +86 -0
- package/content/tutorial/tutorial-create-page.md +57 -0
- package/content/tutorial/tutorial-display-data-page.md +181 -0
- package/content/tutorial/tutorial-next-steps.md +53 -0
- package/content/tutorial/tutorial-requests-sql.md +22 -0
- package/content/tutorial/tutorial-start.md +71 -0
- package/content/user-authentication/auth-providers.md +15 -0
- package/content/user-authentication/login-and-logout.md +122 -0
- package/content/user-authentication/users-introduction.md +31 -0
- package/index.json +2281 -0
- package/package.json +34 -0
- package/scripts/extractAgentDocs.js +130 -0
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
# PostgreSQL
|
|
2
|
+
|
|
3
|
+
The [Knex](/Knex) connection can be used to connect to a [PostgreSQL](https://www.postgresql.org) database.
|
|
4
|
+
|
|
5
|
+
## Connections
|
|
6
|
+
|
|
7
|
+
Connection types:
|
|
8
|
+
- Knex
|
|
9
|
+
|
|
10
|
+
### Knex
|
|
11
|
+
|
|
12
|
+
#### Properties
|
|
13
|
+
- `client: enum`: __Required__ - The database client to use. To connect to PostgreSQL, use one of:
|
|
14
|
+
- `postgres`
|
|
15
|
+
- `pg` (alias of `postgres`)
|
|
16
|
+
- `postgresql` (alias of `postgres`)
|
|
17
|
+
- `connection: object | string`: __Required__ - Connection string or object to pass to the [`pg`](https://www.npmjs.com/package/pg) database client.
|
|
18
|
+
- `searchPath: string`: Set PostgreSQL search path.
|
|
19
|
+
- `version: string`: Set database version.
|
|
20
|
+
- `useNullAsDefault: boolean`: If true, undefined keys are replaced with NULL instead of DEFAULT.
|
|
21
|
+
|
|
22
|
+
#### Examples
|
|
23
|
+
|
|
24
|
+
###### Connection Object:
|
|
25
|
+
```yaml
|
|
26
|
+
connections:
|
|
27
|
+
- id: postgres
|
|
28
|
+
type: Knex
|
|
29
|
+
properties:
|
|
30
|
+
client: postgres
|
|
31
|
+
connection:
|
|
32
|
+
user:
|
|
33
|
+
_secret: PG_USER
|
|
34
|
+
host:
|
|
35
|
+
_secret: PG_HOST
|
|
36
|
+
database:
|
|
37
|
+
_secret: PG_DB
|
|
38
|
+
password:
|
|
39
|
+
_secret: PG_PASSWORD
|
|
40
|
+
```
|
|
41
|
+
Environment variables:
|
|
42
|
+
```
|
|
43
|
+
LOWDEFY_SECRET_PG_HOST = database.server.com
|
|
44
|
+
LOWDEFY_SECRET_PG_DB = db
|
|
45
|
+
LOWDEFY_SECRET_PG_USER = user
|
|
46
|
+
LOWDEFY_SECRET_PG_PASSWORD = password
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
###### Secret connection string, with version and searchPath:
|
|
50
|
+
```yaml
|
|
51
|
+
connections:
|
|
52
|
+
- id: postgres
|
|
53
|
+
type: Knex
|
|
54
|
+
properties:
|
|
55
|
+
client: postgres
|
|
56
|
+
connection:
|
|
57
|
+
_secret: PG_CONNECTION_STRING
|
|
58
|
+
version: '7.2'
|
|
59
|
+
searchPath:
|
|
60
|
+
- knex
|
|
61
|
+
- public
|
|
62
|
+
```
|
|
63
|
+
Environment variables:
|
|
64
|
+
```
|
|
65
|
+
LOWDEFY_SECRET_PG_CONNECTION_STRING = postgresql://user:password@database.server.com:5432/db
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Requests
|
|
69
|
+
|
|
70
|
+
Request types:
|
|
71
|
+
|
|
72
|
+
- KnexBuilder
|
|
73
|
+
- KnexRaw
|
|
74
|
+
|
|
75
|
+
### KnexBuilder
|
|
76
|
+
|
|
77
|
+
#### Properties
|
|
78
|
+
|
|
79
|
+
- `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.
|
|
80
|
+
- `tableName: string | object`: The name of the table to query from.
|
|
81
|
+
|
|
82
|
+
#### Examples
|
|
83
|
+
|
|
84
|
+
###### Build a query:
|
|
85
|
+
|
|
86
|
+
```yaml
|
|
87
|
+
id: knexBuilder
|
|
88
|
+
type: KnexBuilder
|
|
89
|
+
connectionId: knex
|
|
90
|
+
payload:
|
|
91
|
+
name:
|
|
92
|
+
_state: name
|
|
93
|
+
properties:
|
|
94
|
+
query:
|
|
95
|
+
- select:
|
|
96
|
+
- '*'
|
|
97
|
+
- from:
|
|
98
|
+
- users
|
|
99
|
+
- where:
|
|
100
|
+
- name
|
|
101
|
+
- _payload: name
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
###### Using `tableName`:
|
|
105
|
+
|
|
106
|
+
```yaml
|
|
107
|
+
id: knexBuilder
|
|
108
|
+
type: KnexBuilder
|
|
109
|
+
connectionId: knex
|
|
110
|
+
payload:
|
|
111
|
+
name:
|
|
112
|
+
_state: name
|
|
113
|
+
properties:
|
|
114
|
+
tableName: users
|
|
115
|
+
query:
|
|
116
|
+
- select:
|
|
117
|
+
- '*'
|
|
118
|
+
- where:
|
|
119
|
+
- name
|
|
120
|
+
- _payload: name
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
###### Aliases:
|
|
124
|
+
|
|
125
|
+
```yaml
|
|
126
|
+
id: knexBuilder
|
|
127
|
+
type: KnexBuilder
|
|
128
|
+
connectionId: knex
|
|
129
|
+
properties:
|
|
130
|
+
tableName:
|
|
131
|
+
a: tableA
|
|
132
|
+
b: tableB
|
|
133
|
+
query:
|
|
134
|
+
- select:
|
|
135
|
+
- aField: 'a.field'
|
|
136
|
+
- bField: 'b.field'
|
|
137
|
+
- limit:
|
|
138
|
+
- 1
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
### KnexRaw
|
|
142
|
+
|
|
143
|
+
#### Properties
|
|
144
|
+
|
|
145
|
+
- `query: string`: **Required** - SQL query string.
|
|
146
|
+
- `parameters: string | number | array | object`: SQL query parameters.
|
|
147
|
+
|
|
148
|
+
#### Examples
|
|
149
|
+
|
|
150
|
+
###### Simple raw query:
|
|
151
|
+
|
|
152
|
+
```yaml
|
|
153
|
+
id: knexRaw
|
|
154
|
+
type: KnexRaw
|
|
155
|
+
connectionId: knex
|
|
156
|
+
properties:
|
|
157
|
+
query: SELECT * FROM "my_table";
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
###### Query with named parameters:
|
|
161
|
+
|
|
162
|
+
```yaml
|
|
163
|
+
id: knexRaw
|
|
164
|
+
type: KnexRaw
|
|
165
|
+
connectionId: knex
|
|
166
|
+
payload:
|
|
167
|
+
selected_name:
|
|
168
|
+
_state: selected_name
|
|
169
|
+
properties:
|
|
170
|
+
query: select * from users where name = :name
|
|
171
|
+
parameters:
|
|
172
|
+
name:
|
|
173
|
+
_payload: selected_name
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
###### Query with positional parameters:
|
|
177
|
+
|
|
178
|
+
```yaml
|
|
179
|
+
id: knexRaw
|
|
180
|
+
type: KnexRaw
|
|
181
|
+
connectionId: knex
|
|
182
|
+
payload:
|
|
183
|
+
selected_name:
|
|
184
|
+
_state: selected_name
|
|
185
|
+
properties:
|
|
186
|
+
query: select * from users where name = ?
|
|
187
|
+
parameters:
|
|
188
|
+
- _payload: selected_name
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
###### Reference a `.sql` file:
|
|
192
|
+
|
|
193
|
+
```yaml
|
|
194
|
+
id: knexRaw
|
|
195
|
+
type: KnexRaw
|
|
196
|
+
connectionId: knex
|
|
197
|
+
properties:
|
|
198
|
+
query:
|
|
199
|
+
_ref: my_query.sql
|
|
200
|
+
```
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# Redis
|
|
2
|
+
|
|
3
|
+
[`Redis`](http://redis.io/) is an open-source, in-memory key-value data structure store. Redis offers a set of versatile in-memory data structures (strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperloglogs, geospatial indexes, and streams) that allow the creation of many custom applications. Key use cases for Redis include database, caching, session management and message broker.
|
|
4
|
+
|
|
5
|
+
Lowdefy integrates with Redis using the one of the recommended [Node.js clients (node-redis)](https://github.com/redis/node-redis).
|
|
6
|
+
|
|
7
|
+
## Connections
|
|
8
|
+
|
|
9
|
+
Connection types:
|
|
10
|
+
- Redis
|
|
11
|
+
|
|
12
|
+
### Redis
|
|
13
|
+
|
|
14
|
+
#### Properties
|
|
15
|
+
- `connection: object | string `: __Required__ - Connection object or string to pass to the [`redis client`](https://github.com/redis/node-redis) redis client.
|
|
16
|
+
|
|
17
|
+
The connection object accepts will be passed to the redis client verbatim, so check out the [configuration instructions](https://github.com/redis/node-redis/blob/master/docs/client-configuration.md).
|
|
18
|
+
|
|
19
|
+
#### Examples
|
|
20
|
+
|
|
21
|
+
###### Redis with connection object:
|
|
22
|
+
```yaml
|
|
23
|
+
connections:
|
|
24
|
+
- id: redis
|
|
25
|
+
type: Redis
|
|
26
|
+
properties:
|
|
27
|
+
connection:
|
|
28
|
+
username:
|
|
29
|
+
_secret: REDIS_USERNAME
|
|
30
|
+
password:
|
|
31
|
+
_secret: REDIS_PASSWORD
|
|
32
|
+
database:
|
|
33
|
+
_secret: REDIS_DATABASE
|
|
34
|
+
socket:
|
|
35
|
+
host:
|
|
36
|
+
_secret: REDIS_HOST
|
|
37
|
+
port:
|
|
38
|
+
_secret: REDIS_PORT
|
|
39
|
+
```
|
|
40
|
+
Environment variables:
|
|
41
|
+
```
|
|
42
|
+
LOWDEFY_SECRET_REDIS_USERNAME = user
|
|
43
|
+
LOWDEFY_SECRET_REDIS_PASSWORD = password
|
|
44
|
+
LOWDEFY_SECRET_REDIS_DATABASE = 4
|
|
45
|
+
LOWDEFY_SECRET_REDIS_HOST = redis.server.com
|
|
46
|
+
LOWDEFY_SECRET_REDIS_PORT = 5000
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
###### Redis with connection string:
|
|
50
|
+
```yaml
|
|
51
|
+
connections:
|
|
52
|
+
- id: redis
|
|
53
|
+
type: Redis
|
|
54
|
+
properties:
|
|
55
|
+
connection:
|
|
56
|
+
_secret: REDIS_CONNECTION_STRING
|
|
57
|
+
```
|
|
58
|
+
Environment variables:
|
|
59
|
+
```
|
|
60
|
+
LOWDEFY_SECRET_REDIS_CONNECTION_STRING = redis://user:password@redis:server.com:5000/4'
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Requests
|
|
64
|
+
|
|
65
|
+
Request types:
|
|
66
|
+
- Redis
|
|
67
|
+
|
|
68
|
+
### Redis
|
|
69
|
+
|
|
70
|
+
#### Properties
|
|
71
|
+
|
|
72
|
+
- `command: string`: **Required** - Redis command to be executed, accepts all of the [out-of-the-box Redis commands](https://redis.io/commands).
|
|
73
|
+
- `parameters: array`: An array of parameters to be passed to the redis command.
|
|
74
|
+
- `modifiers: object`: The redis modififers to be passed to the redis command.
|
|
75
|
+
|
|
76
|
+
#### Examples
|
|
77
|
+
|
|
78
|
+
###### Setting a key-value pair in redis:
|
|
79
|
+
|
|
80
|
+
```yaml
|
|
81
|
+
id: redisRequest
|
|
82
|
+
type: Redis
|
|
83
|
+
connectionId: redis
|
|
84
|
+
properties:
|
|
85
|
+
command: set
|
|
86
|
+
parameters:
|
|
87
|
+
- key
|
|
88
|
+
- value
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
###### Getting a value from redis:
|
|
92
|
+
|
|
93
|
+
```yaml
|
|
94
|
+
id: redisRequest
|
|
95
|
+
type: Redis
|
|
96
|
+
connectionId: redis
|
|
97
|
+
properties:
|
|
98
|
+
command: get
|
|
99
|
+
parameters:
|
|
100
|
+
- key
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
###### Setting a key-value pair only if key does not exist:
|
|
104
|
+
|
|
105
|
+
```yaml
|
|
106
|
+
id: redisRequest
|
|
107
|
+
type: Redis
|
|
108
|
+
connectionId: redis
|
|
109
|
+
properties:
|
|
110
|
+
command: set
|
|
111
|
+
parameters:
|
|
112
|
+
- key
|
|
113
|
+
- value
|
|
114
|
+
modififers:
|
|
115
|
+
nx: true
|
|
116
|
+
```
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# SendGrid Email
|
|
2
|
+
|
|
3
|
+
[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.
|
|
4
|
+
|
|
5
|
+
The `SendGridMail` connector uses the [@sendgrid/mail](https://github.com/@sendgrid/mail) library.
|
|
6
|
+
|
|
7
|
+
In order to use the `SendGridMail` connector, you first need to create a [SendGrid](https://sendgrid.com/) account and setup an API key.
|
|
8
|
+
|
|
9
|
+
> Secrets like API keys should be stored using the [`_secret`](operators/secret.md) operator.
|
|
10
|
+
|
|
11
|
+
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.
|
|
12
|
+
|
|
13
|
+
## Connections
|
|
14
|
+
|
|
15
|
+
Connection types:
|
|
16
|
+
- SendGridMail
|
|
17
|
+
|
|
18
|
+
## Requests
|
|
19
|
+
|
|
20
|
+
Request types:
|
|
21
|
+
- SendGridMailSend
|
|
22
|
+
|
|
23
|
+
### Types
|
|
24
|
+
|
|
25
|
+
- `email: string | object`: SendGrid accepts emails as either a `string` or an `object`.
|
|
26
|
+
- `string`: Can be in the following format; `someone@example.org` or `Some One <someone@example.org>`.
|
|
27
|
+
- `object`: With `name' and `email` properties, for example: `{"name": "Some One", "email": "someone@example.org"}`.
|
|
28
|
+
|
|
29
|
+
### SendGridMail
|
|
30
|
+
|
|
31
|
+
#### Properties
|
|
32
|
+
|
|
33
|
+
- `apiKey: string`: __Required__ - SendGrid API key.
|
|
34
|
+
- `from: email`: __Required__ - Email address to send email from.
|
|
35
|
+
- `replyTo: email`: Default email address replies should be sent to.
|
|
36
|
+
- `mailSettings: object`: SendGrid mail settings. See [SendGrid API-Reference](https://sendgrid.com/docs/api-reference/)
|
|
37
|
+
- `sandboxMode: object`: SendGrid mail sandbox mode settings.
|
|
38
|
+
- `enable: boolean`: Sandbox mode enabled when `true`.
|
|
39
|
+
- `templateId: string`: SendGrid email template ID to render email when sending.
|
|
40
|
+
- `filter: object`: Environment-aware delivery filter, applied to every send. Filter values are usually supplied by [`_secret`](operators/secret.md); a field that resolves to `null` is ignored, so one config serves every environment (a dev catch-all, a sandbox allowlist, nothing in production).
|
|
41
|
+
- `replaceAddress: string`: Redirect all mail to this single address. When set, it takes precedence — every message goes to this address only, with `cc` and `bcc` dropped.
|
|
42
|
+
- `allowlist: string[]`: A list of domains. Only recipients whose domain is in the list are sent to.
|
|
43
|
+
- `regex: string`: A regular expression. Only recipient addresses matching the pattern are sent to.
|
|
44
|
+
|
|
45
|
+
### SendGridMailSend
|
|
46
|
+
|
|
47
|
+
#### Properties
|
|
48
|
+
|
|
49
|
+
##### object
|
|
50
|
+
A `mail description`:
|
|
51
|
+
- `to: email | email[]`: __Required__ - Email address or addresses to send to.
|
|
52
|
+
- `cc: email | email[]`: Email address to cc in communication.
|
|
53
|
+
- `bcc: email | email[]`: Email address to bcc in communication.
|
|
54
|
+
- `replyTo: email | email[]`: Email address to reply to.
|
|
55
|
+
- `subject: string`: Email subject.
|
|
56
|
+
- `text: string`: Email message in plain text format.
|
|
57
|
+
- `html: string`: Email message in html format.
|
|
58
|
+
- `dynamicTemplateData: object`: SendGrid template data to render into email template.
|
|
59
|
+
- `sendAt: integer`: A unix timestamp allowing you to specify when you want your email to be delivered. You can't schedule more than 72 hours in advance.
|
|
60
|
+
- `attachments: object[]`: List of email attachments to include with email. See [SendGrid API-Reference](https://d2w67tjf43xwdp.cloudfront.net/Classroom/Build/Add_Content/attachments.html]).
|
|
61
|
+
- `content: string`: __Required__ - Base 64 encoded attachment content.
|
|
62
|
+
- `filename: string`: __Required__ - Name of the attachment file.
|
|
63
|
+
- `type: string`: The mime type of the content you are attaching. For example, `text/plain` or `text/html`.
|
|
64
|
+
|
|
65
|
+
##### array
|
|
66
|
+
An array of `mail description` objects can also be provided.
|
|
67
|
+
|
|
68
|
+
### Examples
|
|
69
|
+
|
|
70
|
+
###### Send a reminder email
|
|
71
|
+
```yaml
|
|
72
|
+
connections:
|
|
73
|
+
- id: my_sendgrid
|
|
74
|
+
type: SendGridMail
|
|
75
|
+
properties:
|
|
76
|
+
apiKey:
|
|
77
|
+
_secret: SENDGRID_API_KEY
|
|
78
|
+
from: reminders@example.org
|
|
79
|
+
# ...
|
|
80
|
+
requests:
|
|
81
|
+
- id: send_reminder
|
|
82
|
+
type: SendGridMailSend
|
|
83
|
+
connectionId: my_sendgrid
|
|
84
|
+
properties:
|
|
85
|
+
to: Harry Potter <harry@example.org>
|
|
86
|
+
subject: Reminder for Mr. Potter to water the 🌱
|
|
87
|
+
text: |
|
|
88
|
+
Hi Harry
|
|
89
|
+
|
|
90
|
+
Please remember to water the magic plants today :)
|
|
91
|
+
|
|
92
|
+
Thank you
|
|
93
|
+
# ...
|
|
94
|
+
```
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
# SMTP Email
|
|
2
|
+
|
|
3
|
+
The `SMTP` connection sends email over any SMTP server — Amazon SES, Postmark, Mailgun, Resend, SendGrid's SMTP relay, or a self-hosted server. One connection type covers every provider.
|
|
4
|
+
|
|
5
|
+
The `SMTP` connector uses the [nodemailer](https://nodemailer.com/) library. Connection properties are passed through to nodemailer's transport, so any [transport option](https://nodemailer.com/smtp/) nodemailer accepts (pooling, TLS options, a `service` shortcut, a connection `url`) can be set alongside the documented properties.
|
|
6
|
+
|
|
7
|
+
> Secrets like passwords and API keys should be stored using the [`_secret`](operators/secret.md) operator.
|
|
8
|
+
|
|
9
|
+
## Connections
|
|
10
|
+
|
|
11
|
+
Connection types:
|
|
12
|
+
- SMTP
|
|
13
|
+
|
|
14
|
+
## Requests
|
|
15
|
+
|
|
16
|
+
Request types:
|
|
17
|
+
- SMTPMailSend
|
|
18
|
+
|
|
19
|
+
### Types
|
|
20
|
+
|
|
21
|
+
- `email: string | object`: An email address as either a `string` or an `object`.
|
|
22
|
+
- `string`: In the format `someone@example.org` or `Some One <someone@example.org>`.
|
|
23
|
+
- `object`: With `name` and `email` properties, for example `{ "name": "Some One", "email": "someone@example.org" }`.
|
|
24
|
+
- `emails: email | email[]`: A single email address or a list of email addresses.
|
|
25
|
+
|
|
26
|
+
### SMTP
|
|
27
|
+
|
|
28
|
+
#### Properties
|
|
29
|
+
|
|
30
|
+
- `host: string`: Hostname or IP address of the SMTP server to connect to.
|
|
31
|
+
- `port: integer`: Port to connect to. Defaults to `587` when `secure` is `false`, or `465` when `secure` is `true`.
|
|
32
|
+
- `secure: boolean`: If `true`, the connection uses TLS when connecting to the server.
|
|
33
|
+
- `auth: object`: Authentication credentials for the SMTP server.
|
|
34
|
+
- `user: string`: Username to authenticate with.
|
|
35
|
+
- `pass: string`: Password to authenticate with.
|
|
36
|
+
- `from: emails`: __Required__ - Default email address to send email from.
|
|
37
|
+
- `replyTo: emails`: Default email address replies should be sent to.
|
|
38
|
+
- `filter: object`: Environment-aware delivery filter, applied to every send. See [Delivery filter](#delivery-filter) below.
|
|
39
|
+
|
|
40
|
+
Additional nodemailer transport options (for example `service`, `url`, `pool`, `tls`) are passed through unchanged.
|
|
41
|
+
|
|
42
|
+
### SMTPMailSend
|
|
43
|
+
|
|
44
|
+
Sends one email, or an array of emails. When an array is given, each message is sent in turn.
|
|
45
|
+
|
|
46
|
+
#### Properties
|
|
47
|
+
|
|
48
|
+
##### object
|
|
49
|
+
|
|
50
|
+
A `mail description`:
|
|
51
|
+
- `to: emails`: __Required__ - Email address or addresses to send to.
|
|
52
|
+
- `cc: emails`: Email address to cc in communication.
|
|
53
|
+
- `bcc: emails`: Email address to bcc in communication.
|
|
54
|
+
- `replyTo: emails`: Email address to reply to. Overrides the connection `replyTo`.
|
|
55
|
+
- `subject: string`: Email subject.
|
|
56
|
+
- `text: string`: Email message in plain text format.
|
|
57
|
+
- `html: string`: Email message in html format.
|
|
58
|
+
- `attachments: object[]`: List of email attachments to include with the email.
|
|
59
|
+
- `filename: string`: Name of the attachment file.
|
|
60
|
+
- `content: string`: String content of the attachment.
|
|
61
|
+
- `path: string`: File path or URL to stream the attachment from.
|
|
62
|
+
- `contentType: string`: The mime type of the content you are attaching. For example, `text/plain` or `text/html`.
|
|
63
|
+
- `encoding: string`: Encoding used to decode string `content` into a buffer. For example, `base64` or `hex`.
|
|
64
|
+
- `cid: string`: Content id to reference the attachment as an embedded image in html.
|
|
65
|
+
|
|
66
|
+
##### array
|
|
67
|
+
|
|
68
|
+
An array of `mail description` objects can also be provided.
|
|
69
|
+
|
|
70
|
+
### Delivery filter
|
|
71
|
+
|
|
72
|
+
The connection's `filter` is applied to every message before it is sent — from `SMTPMailSend` requests, notification pipelines, and any other send over the connection. It has one enforcement point, so no send can bypass it. Because filter values are usually supplied by [`_secret`](operators/secret.md), any field that resolves to `null` or `undefined` is ignored — an unset filter is disabled. This lets one connection config serve every environment: development sets a catch-all, a sandbox sets a domain allowlist or regex, production sets nothing.
|
|
73
|
+
|
|
74
|
+
- `replaceAddress: string`: Redirect all mail to this single address. When set, it takes precedence — every message is delivered to this address only, with `cc` and `bcc` dropped. Use it to catch all outbound mail in development.
|
|
75
|
+
- `allowlist: string[]`: A list of domains. Only recipients whose domain is in the list are sent to; others are dropped. When every `to` recipient is filtered out, the message is not sent.
|
|
76
|
+
- `regex: string`: A regular expression. Only recipient addresses matching the pattern are sent to.
|
|
77
|
+
|
|
78
|
+
`allowlist` and `regex` combine — a recipient must satisfy both to receive mail.
|
|
79
|
+
|
|
80
|
+
### Examples
|
|
81
|
+
|
|
82
|
+
###### Send a reminder email
|
|
83
|
+
|
|
84
|
+
```yaml
|
|
85
|
+
connections:
|
|
86
|
+
- id: my_smtp
|
|
87
|
+
type: SMTP
|
|
88
|
+
properties:
|
|
89
|
+
host: smtp.example.com
|
|
90
|
+
port: 465
|
|
91
|
+
secure: true
|
|
92
|
+
auth:
|
|
93
|
+
user: my-smtp-user
|
|
94
|
+
pass:
|
|
95
|
+
_secret: SMTP_PASS
|
|
96
|
+
from: Reminders <reminders@example.org>
|
|
97
|
+
# ...
|
|
98
|
+
requests:
|
|
99
|
+
- id: send_reminder
|
|
100
|
+
type: SMTPMailSend
|
|
101
|
+
connectionId: my_smtp
|
|
102
|
+
properties:
|
|
103
|
+
to: Harry Potter <harry@example.org>
|
|
104
|
+
subject: Reminder for Mr. Potter to water the 🌱
|
|
105
|
+
text: |
|
|
106
|
+
Hi Harry
|
|
107
|
+
|
|
108
|
+
Please remember to water the magic plants today :)
|
|
109
|
+
|
|
110
|
+
Thank you
|
|
111
|
+
# ...
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
###### Catch all mail in a development environment
|
|
115
|
+
|
|
116
|
+
```yaml
|
|
117
|
+
connections:
|
|
118
|
+
- id: my_smtp
|
|
119
|
+
type: SMTP
|
|
120
|
+
properties:
|
|
121
|
+
host: smtp.example.com
|
|
122
|
+
auth:
|
|
123
|
+
user: my-smtp-user
|
|
124
|
+
pass:
|
|
125
|
+
_secret: SMTP_PASS
|
|
126
|
+
from: App <no-reply@example.org>
|
|
127
|
+
filter:
|
|
128
|
+
# In dev, DEV_CATCH_ALL is set and all mail is redirected to it.
|
|
129
|
+
# In production the secret is unset, so the filter is disabled.
|
|
130
|
+
replaceAddress:
|
|
131
|
+
_secret: DEV_CATCH_ALL
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
###### Send over SendGrid's SMTP relay
|
|
135
|
+
|
|
136
|
+
```yaml
|
|
137
|
+
connections:
|
|
138
|
+
- id: my_smtp
|
|
139
|
+
type: SMTP
|
|
140
|
+
properties:
|
|
141
|
+
host: smtp.sendgrid.net
|
|
142
|
+
port: 465
|
|
143
|
+
secure: true
|
|
144
|
+
auth:
|
|
145
|
+
user: apikey
|
|
146
|
+
pass:
|
|
147
|
+
_secret: SENDGRID_API_KEY
|
|
148
|
+
from: App <notify@example.org>
|
|
149
|
+
```
|