@lowdefy/docs 4.0.0-alpha.7 → 4.0.0-alpha.8

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.
Files changed (275) hide show
  1. package/dist/operators/client/filter_default_value.js +55 -0
  2. package/{public/modules/connectDocsearch.js → dist/operatorsClient.js} +1 -19
  3. package/{templates/blocks/schemaTransformer.js → dist/types.js} +5 -10
  4. package/package.json +19 -3
  5. package/404.yaml +0 -26
  6. package/CHANGELOG.md +0 -697
  7. package/actions/CallMethod.yaml +0 -57
  8. package/actions/JsAction.yaml +0 -281
  9. package/actions/Link.yaml +0 -120
  10. package/actions/Login.yaml +0 -123
  11. package/actions/Logout.yaml +0 -44
  12. package/actions/Message.yaml +0 -68
  13. package/actions/Notification.yaml +0 -84
  14. package/actions/Request.yaml +0 -70
  15. package/actions/Reset.yaml +0 -42
  16. package/actions/ResetValidation.yaml +0 -102
  17. package/actions/ScrollTo.yaml +0 -100
  18. package/actions/SetGlobal.yaml +0 -78
  19. package/actions/SetState.yaml +0 -85
  20. package/actions/Throw.yaml +0 -89
  21. package/actions/Validate.yaml +0 -104
  22. package/actions/Wait.yaml +0 -40
  23. package/blocks/all_icons.yaml +0 -803
  24. package/blocks/container/Affix.yaml +0 -26
  25. package/blocks/container/Alert.yaml +0 -27
  26. package/blocks/container/Badge.yaml +0 -27
  27. package/blocks/container/Box.yaml +0 -27
  28. package/blocks/container/Card.yaml +0 -29
  29. package/blocks/container/Collapse.yaml +0 -38
  30. package/blocks/container/Comment.yaml +0 -43
  31. package/blocks/container/ConfirmModal.yaml +0 -36
  32. package/blocks/container/Descriptions.yaml +0 -51
  33. package/blocks/container/Drawer.yaml +0 -46
  34. package/blocks/container/Label.yaml +0 -28
  35. package/blocks/container/Modal.yaml +0 -46
  36. package/blocks/container/PageHCF.yaml +0 -28
  37. package/blocks/container/PageHCSF.yaml +0 -29
  38. package/blocks/container/PageHSCF.yaml +0 -29
  39. package/blocks/container/PageHeaderMenu.yaml +0 -52
  40. package/blocks/container/PageSHCF.yaml +0 -29
  41. package/blocks/container/PageSiderMenu.yaml +0 -53
  42. package/blocks/container/Result.yaml +0 -34
  43. package/blocks/container/Span.yaml +0 -27
  44. package/blocks/container/Spin.yaml +0 -27
  45. package/blocks/container/Tabs.yaml +0 -41
  46. package/blocks/container/Tooltip.yaml +0 -38
  47. package/blocks/display/Anchor.yaml +0 -25
  48. package/blocks/display/Avatar.yaml +0 -23
  49. package/blocks/display/Breadcrumb.yaml +0 -28
  50. package/blocks/display/Button.yaml +0 -43
  51. package/blocks/display/DangerousHtml.yaml +0 -62
  52. package/blocks/display/DangerousMarkdown.yaml +0 -46
  53. package/blocks/display/Divider.yaml +0 -23
  54. package/blocks/display/EChart.yaml +0 -53
  55. package/blocks/display/Html.yaml +0 -50
  56. package/blocks/display/Icon.yaml +0 -23
  57. package/blocks/display/Img.yaml +0 -40
  58. package/blocks/display/Markdown.yaml +0 -31
  59. package/blocks/display/MarkdownWithCode.yaml +0 -46
  60. package/blocks/display/Menu.yaml +0 -48
  61. package/blocks/display/Message.yaml +0 -34
  62. package/blocks/display/MobileMenu.yaml +0 -47
  63. package/blocks/display/Notification.yaml +0 -34
  64. package/blocks/display/Paragraph.yaml +0 -30
  65. package/blocks/display/Progress.yaml +0 -52
  66. package/blocks/display/Skeleton.yaml +0 -27
  67. package/blocks/display/Statistic.yaml +0 -35
  68. package/blocks/display/Title.yaml +0 -32
  69. package/blocks/input/AutoComplete.yaml +0 -30
  70. package/blocks/input/ButtonSelector.yaml +0 -36
  71. package/blocks/input/CheckboxSelector.yaml +0 -36
  72. package/blocks/input/CheckboxSwitch.yaml +0 -56
  73. package/blocks/input/ChromeColorSelector.yaml +0 -24
  74. package/blocks/input/CircleColorSelector.yaml +0 -24
  75. package/blocks/input/ColorSelector.yaml +0 -24
  76. package/blocks/input/CompactColorSelector.yaml +0 -24
  77. package/blocks/input/DateRangeSelector.yaml +0 -26
  78. package/blocks/input/DateSelector.yaml +0 -26
  79. package/blocks/input/DateTimeSelector.yaml +0 -28
  80. package/blocks/input/GithubColorSelector.yaml +0 -24
  81. package/blocks/input/MonthSelector.yaml +0 -26
  82. package/blocks/input/MultipleSelector.yaml +0 -117
  83. package/blocks/input/NumberInput.yaml +0 -24
  84. package/blocks/input/Pagination.yaml +0 -33
  85. package/blocks/input/ParagraphInput.yaml +0 -32
  86. package/blocks/input/PasswordInput.yaml +0 -48
  87. package/blocks/input/RadioSelector.yaml +0 -36
  88. package/blocks/input/RatingSlider.yaml +0 -24
  89. package/blocks/input/S3UploadButton.yaml +0 -28
  90. package/blocks/input/Selector.yaml +0 -98
  91. package/blocks/input/SliderColorSelector.yaml +0 -24
  92. package/blocks/input/SwatchesColorSelector.yaml +0 -24
  93. package/blocks/input/Switch.yaml +0 -24
  94. package/blocks/input/TextArea.yaml +0 -27
  95. package/blocks/input/TextInput.yaml +0 -59
  96. package/blocks/input/TitleInput.yaml +0 -32
  97. package/blocks/input/TwitterColorSelector.yaml +0 -24
  98. package/blocks/input/WeekSelector.yaml +0 -26
  99. package/blocks/list/ControlledList.yaml +0 -191
  100. package/blocks/list/List.yaml +0 -157
  101. package/blocks/list/TimelineList.yaml +0 -136
  102. package/body.html +0 -1
  103. package/concepts/blocks.yaml +0 -249
  104. package/concepts/cli.yaml +0 -173
  105. package/concepts/connections-and-requests.yaml +0 -114
  106. package/concepts/context-and-state.yaml +0 -82
  107. package/concepts/custom-blocks.yaml +0 -190
  108. package/concepts/custom-code.yaml +0 -197
  109. package/concepts/events-and-actions.yaml +0 -224
  110. package/concepts/hosting-files.yaml +0 -50
  111. package/concepts/layout.yaml +0 -1464
  112. package/concepts/lists.yaml +0 -162
  113. package/concepts/lowdefy-schema.yaml +0 -245
  114. package/concepts/operators.yaml +0 -66
  115. package/concepts/overview.yaml +0 -48
  116. package/concepts/secrets.yaml +0 -56
  117. package/connections/AWSS3.yaml +0 -228
  118. package/connections/AmazonRedshift.yaml +0 -75
  119. package/connections/AxiosHttp.yaml +0 -194
  120. package/connections/Elasticsearch.yaml +0 -378
  121. package/connections/GoogleSheet.yaml +0 -332
  122. package/connections/Knex.yaml +0 -181
  123. package/connections/KnexRequests.md +0 -121
  124. package/connections/MSSQL.yaml +0 -90
  125. package/connections/MariaDB.yaml +0 -77
  126. package/connections/MongoDB.yaml +0 -581
  127. package/connections/MySQL.yaml +0 -92
  128. package/connections/OracleDB.yaml +0 -73
  129. package/connections/PostgreSQL.yaml +0 -99
  130. package/connections/Redis.yaml +0 -147
  131. package/connections/SQLite.yaml +0 -94
  132. package/connections/SendGridMail.yaml +0 -113
  133. package/connections/Stripe.yaml +0 -139
  134. package/deployment/aws-lambda.yaml +0 -128
  135. package/deployment/docker.yaml +0 -118
  136. package/deployment/netlify.yaml +0 -69
  137. package/deployment/node-server.yaml +0 -111
  138. package/head.html +0 -7
  139. package/howto/generate-csv.yaml.njk +0 -252
  140. package/howto/generate-pdf.yaml.njk +0 -651
  141. package/howto/generateCsv/lowdefy.yaml +0 -64
  142. package/howto/generateCsv/public/csvMake.js +0 -27
  143. package/howto/generatePdf/inv_template.yaml +0 -200
  144. package/howto/generatePdf/lowdefy.yaml +0 -117
  145. package/howto/generatePdf/my_header.html +0 -1
  146. package/howto/generatePdf/public/logo_example.png +0 -0
  147. package/howto/generatePdf/public/modules/importUmd.js +0 -7
  148. package/howto/generatePdf/public/modules/pdfMake.js +0 -7
  149. package/howto/generatePdf/public/modules/vfs_fonts.js +0 -12
  150. package/howto/use-refrences.md +0 -5
  151. package/introduction.yaml +0 -100
  152. package/lowdefy.yaml +0 -66
  153. package/menus.yaml +0 -832
  154. package/operators/_actions.yaml +0 -123
  155. package/operators/_and.yaml +0 -90
  156. package/operators/_args.yaml +0 -79
  157. package/operators/_array.yaml +0 -326
  158. package/operators/_base64.yaml +0 -56
  159. package/operators/_change_case.yaml +0 -347
  160. package/operators/_date.yaml +0 -71
  161. package/operators/_diff.yaml +0 -75
  162. package/operators/_divide.yaml +0 -46
  163. package/operators/_eq.yaml +0 -67
  164. package/operators/_event.yaml +0 -103
  165. package/operators/_format.yaml +0 -209
  166. package/operators/_function.yaml +0 -66
  167. package/operators/_get.yaml +0 -108
  168. package/operators/_global.yaml +0 -107
  169. package/operators/_gt.yaml +0 -65
  170. package/operators/_gte.yaml +0 -65
  171. package/operators/_hash.yaml +0 -109
  172. package/operators/_if.yaml +0 -44
  173. package/operators/_if_none.yaml +0 -61
  174. package/operators/_index.yaml +0 -65
  175. package/operators/_input.yaml +0 -114
  176. package/operators/_js.yaml +0 -189
  177. package/operators/_json.yaml +0 -128
  178. package/operators/_list_contexts.yaml +0 -37
  179. package/operators/_location.yaml +0 -59
  180. package/operators/_log.yaml +0 -36
  181. package/operators/_lt.yaml +0 -65
  182. package/operators/_lte.yaml +0 -65
  183. package/operators/_math.yaml +0 -374
  184. package/operators/_media.yaml +0 -86
  185. package/operators/_menu.yaml +0 -81
  186. package/operators/_mql.yaml +0 -101
  187. package/operators/_ne.yaml +0 -77
  188. package/operators/_not.yaml +0 -47
  189. package/operators/_number.yaml +0 -157
  190. package/operators/_nunjucks.yaml +0 -73
  191. package/operators/_object.yaml +0 -193
  192. package/operators/_operator.yaml +0 -47
  193. package/operators/_or.yaml +0 -81
  194. package/operators/_product.yaml +0 -59
  195. package/operators/_random.yaml +0 -104
  196. package/operators/_ref.yaml +0 -266
  197. package/operators/_regex.yaml +0 -83
  198. package/operators/_request.yaml +0 -50
  199. package/operators/_secret.yaml +0 -74
  200. package/operators/_state.yaml +0 -114
  201. package/operators/_string.yaml +0 -283
  202. package/operators/_subtract.yaml +0 -38
  203. package/operators/_sum.yaml +0 -59
  204. package/operators/_switch.yaml +0 -51
  205. package/operators/_type.yaml +0 -92
  206. package/operators/_uri.yaml +0 -56
  207. package/operators/_url_query.yaml +0 -120
  208. package/operators/_user.yaml +0 -107
  209. package/operators/_uuid.yaml +0 -114
  210. package/operators/_var.yaml +0 -105
  211. package/operators/_yaml.yaml +0 -107
  212. package/pages.yaml +0 -227
  213. package/public/images/authors/gervwyk.jpeg +0 -0
  214. package/public/images/authors/sandile.jpeg +0 -0
  215. package/public/images/howto/header_generate_csv.jpg +0 -0
  216. package/public/images/howto/header_generate_pdf.jpg +0 -0
  217. package/public/logo_example.png +0 -0
  218. package/public/lowdefy_app_schema.png +0 -0
  219. package/public/modules/csvMake.js +0 -27
  220. package/public/modules/filterDefaultValue.js +0 -48
  221. package/public/modules/importUmd.js +0 -7
  222. package/public/modules/index.js +0 -5
  223. package/public/modules/pdfMake.js +0 -7
  224. package/public/modules/test/filterDefaultValue.test.js +0 -91
  225. package/public/modules/vfs_fonts.js +0 -12
  226. package/public/sitemap.xml +0 -1024
  227. package/templates/actions.yaml.njk +0 -68
  228. package/templates/blocks/defaultValueTransformer.js +0 -53
  229. package/templates/blocks/exampleTransformer.js +0 -81
  230. package/templates/blocks/layout.yaml +0 -114
  231. package/templates/blocks/propertiesFormTransformer.js +0 -419
  232. package/templates/blocks/propertiesGetterTransformer.js +0 -132
  233. package/templates/blocks/schema.yaml.njk +0 -42
  234. package/templates/blocks/style.yaml +0 -26
  235. package/templates/blocks/template.yaml.njk +0 -495
  236. package/templates/blog.yaml.njk +0 -221
  237. package/templates/cli_command.yaml.njk +0 -37
  238. package/templates/footer.yaml.njk +0 -604
  239. package/templates/general.yaml.njk +0 -124
  240. package/templates/generateSitemap.js +0 -41
  241. package/templates/header.yaml +0 -138
  242. package/templates/navigation_buttons.yaml +0 -68
  243. package/templates/operators.yaml.njk +0 -82
  244. package/templates/operatorsMethodTransformer.js +0 -119
  245. package/templates/test/array.test.js +0 -1335
  246. package/templates/test/boolean.test.js +0 -98
  247. package/templates/test/button.test.js +0 -166
  248. package/templates/test/color.test.js +0 -126
  249. package/templates/test/enum.test.js +0 -105
  250. package/templates/test/icon.test.js +0 -109
  251. package/templates/test/integer.test.js +0 -99
  252. package/templates/test/manual.test.js +0 -238
  253. package/templates/test/number.test.js +0 -99
  254. package/templates/test/object.test.js +0 -434
  255. package/templates/test/oneOf.test.js +0 -794
  256. package/templates/test/string.test.js +0 -98
  257. package/templates/test/yaml.test.js +0 -605
  258. package/tutorial/next-steps.yaml +0 -83
  259. package/tutorial/tutorial-actions-operators-config.yaml +0 -142
  260. package/tutorial/tutorial-actions-operators.yaml +0 -436
  261. package/tutorial/tutorial-add-blocks-config.yaml +0 -109
  262. package/tutorial/tutorial-add-blocks.yaml +0 -195
  263. package/tutorial/tutorial-create-page-config.yaml +0 -77
  264. package/tutorial/tutorial-create-page.yaml +0 -196
  265. package/tutorial/tutorial-deploy.yaml +0 -146
  266. package/tutorial/tutorial-requests-config.yaml +0 -186
  267. package/tutorial/tutorial-requests.yaml +0 -338
  268. package/tutorial/tutorial-start.yaml +0 -282
  269. package/users/login-and-logout.yaml +0 -164
  270. package/users/openid-connect.yaml +0 -84
  271. package/users/protected-pages.yaml +0 -67
  272. package/users/roles.yaml +0 -70
  273. package/users/user-object.yaml +0 -73
  274. package/users/users-introduction.yaml +0 -80
  275. package/version.yaml +0 -1
@@ -1,332 +0,0 @@
1
- # Copyright 2020-2021 Lowdefy, Inc
2
-
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
-
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
-
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
- _ref:
16
- path: templates/general.yaml.njk
17
- vars:
18
- pageId: GoogleSheet
19
- pageTitle: Google Sheets
20
- section: Connections
21
- filePath: connections/GoogleSheet.yaml
22
- content:
23
- - id: markdown
24
- type: MarkdownWithCode
25
- properties:
26
- content: |
27
- ## Connections
28
-
29
- Connection types:
30
- - GoogleSheet
31
-
32
- ### GoogleSheet
33
-
34
- 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).
35
-
36
- 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).
37
-
38
- When a sheet is accessed in a browser the url either looks like:
39
- `https://docs.google.com/spreadsheets/d/{spreadsheetId}/edit#gid={sheetId}`
40
-
41
- The `GoogleSheet` connection works with sheets as a row based data store. Each row is a data record, and a header row needs to be present to define the column names. This header needs to be created in the Google Sheets web interface. Types can be specified for any of the columns in the sheet. If a type is not specified, the value will be read as a string. The `json` type will stringify a object as JSON before saving it, and parse it again when reading.
42
-
43
- #### Properties
44
- - `apiKey: string`: API key for your google project.
45
- - `client_email: string`: The email address of your service account.
46
- - `private_key: string`: The private key for your service account. Base64 encode the string if you have issues with the newline characters in the string.
47
- - `sheetId: string`: The ID of the worksheet. Can be found in the URL as the "gid" parameter. One of `sheetId` or `sheetIndex` is required.
48
- - `sheetIndex: number`: The position of the worksheet as they appear in the Google sheets UI. Starts from 0. One of `sheetId` or `sheetIndex` is required.
49
- - `spreadsheetId: string`: __Required__ - The document ID from the URL of the spreadsheet.
50
- - `columnTypes: object`: An object that defines the data types for each column. Each key should be the column name, and the value should be one of: `string`, `number`, `boolean`, `date`, or `json`.
51
- - `read: boolean`: Default: `true` - Allow read operations like find on the sheet.
52
- - `write: boolean`: Default: `false` - Allow write operations like update on the sheet.
53
-
54
- #### Examples
55
-
56
- ###### Read only access to first sheet in a public spreadsheet:
57
- ```yaml
58
- connections:
59
- - id: public_sheet
60
- type: GoogleSheet
61
- properties:
62
- apiKey:
63
- _secret: GOOGLE_SHEETS_API_KEY
64
- sheetIndex: 0
65
- spreadsheetId: ubQsWYNGRUq0gFB1sAp2r9oYE19lZ8yGA1T6y0yBoLPW
66
- ```
67
-
68
- ###### Access with a service account, with defined types:
69
- ```yaml
70
- connections:
71
- - id: my_sheet
72
- type: GoogleSheet
73
- properties:
74
- client_email:
75
- _secret: GOOGLE_SHEETS_CLIENT_EMAIL
76
- private_key:
77
- _base64.decode:
78
- _secret: GOOGLE_SHEETS_PRIVATE_KEY
79
- sheetId: '1199545345'
80
- spreadsheetId: ubQsWYNGRUq0gFB1sAp2r9oYE19lZ8yGA1T6y0yBoLPW
81
- columnTypes:
82
- name: string
83
- age: number
84
- birthday: date
85
- subscribed: boolean
86
- address: json
87
- ```
88
-
89
- ## Requests
90
-
91
- Request types:
92
- - GoogleSheetAppendMany
93
- - GoogleSheetAppendOne
94
- - GoogleSheetDeleteOne
95
- - GoogleSheetGetMany
96
- - GoogleSheetGetOne
97
- - GoogleSheetUpdateMany
98
- - GoogleSheetUpdateOne
99
-
100
- ### GoogleSheetAppendMany
101
-
102
- The `GoogleSheetAppendMany` request inserts an array of documents as rows in a Google Sheet.
103
-
104
- #### Properties
105
- - `rows: object[]`: __Required__ - The rows to insert into the sheet. An an array of objects where keys are the column names and values are the values to insert.
106
- - `options: object`: Optional settings. Supported settings are:
107
- - `raw: boolean`: Store raw values instead of converting as if typed into the sheets UI.
108
-
109
- #### Examples
110
-
111
- ###### Insert a list of rows.
112
- ```yaml
113
- requests:
114
- - id: append_rows
115
- type: GoogleSheetAppendMany
116
- connectionId: google_sheets
117
- properties:
118
- rows:
119
- - name: D.Va
120
- role: Tank
121
- - name: Tracer
122
- role: Damage
123
- - name: Genji
124
- role: Damage
125
- - name: Reinhart
126
- role: Tank
127
- - name: Mercy
128
- role: Support
129
- ```
130
-
131
- ### GoogleSheetAppendOne
132
-
133
- The `GoogleSheetAppendOne` request inserts a documents as a row in a Google Sheet.
134
-
135
- #### Properties
136
- - `row: object`: __Required__ - The row to insert into the sheet. An object where keys are the column names and values are the values to insert.
137
- - `options: object`: Optional settings. Supported settings are:
138
- - `raw: boolean`: Store raw values instead of converting as if typed into the sheets UI.
139
-
140
- #### Examples
141
-
142
- ###### Insert a single row:
143
- ```yaml
144
- requests:
145
- - id: insert_dva
146
- type: GoogleSheetAppendOne
147
- connectionId: google_sheets
148
- properties:
149
- row:
150
- name: D.Va
151
- role: Tank
152
- real_name: Hana Song
153
- age: 19
154
- ```
155
-
156
- ### GoogleSheetDeleteOne
157
-
158
- The `GoogleSheetDeleteOne` request deletes a row from a Google Sheet. It deletes the first row matched by the filter, written as a MongoDB query expression.
159
-
160
- #### Properties
161
- - `filter: object`: __Required__ - A MongoDB query expression to filter the data. The first row matched by the filter will be deleted.
162
- - `options: object`: Optional settings. Supported settings are:
163
- - `limit: number`: The maximum number of rows to fetch.
164
- - `skip: number`: The number of rows to skip from the top of the sheet.
165
-
166
- #### Examples
167
-
168
- ###### Delete the row where name is "Hanzo".
169
- ```yaml
170
- requests:
171
- - id: delete_hanzo
172
- type: GoogleSheetDeleteOne
173
- connectionId: google_sheets
174
- properties:
175
- filter:
176
- name:
177
- $eq: Hanzo
178
- ```
179
-
180
- ### GoogleSheetGetMany
181
-
182
- The `GoogleSheetGetMany` request fetches a number of rows from the spreadsheet. The `limit` and `skip` options can be used to control which documents are read from the spreadsheet. The filter or pipeline options can then be used to filter or transform the fetched data.
183
-
184
- #### Properties
185
- - `filter: object`: A MongoDB query expression to filter the data.
186
- - `pipeline: object[]`: A MongoDB aggregation pipeline to transform the data.
187
- - `options: object`: Optional settings. Supported settings are:
188
- - `limit: number`: The maximum number of rows to fetch.
189
- - `skip: number`: The number of rows to skip from the top of the sheet.
190
-
191
- #### Examples
192
-
193
- ###### Get the first 10 rows.
194
- ```yaml
195
- requests:
196
- - id: get_10_rows
197
- type: GoogleSheetGetMany
198
- connectionId: google_sheets
199
- properties:
200
- options:
201
- limit: 10
202
- ```
203
-
204
- ###### Pagination using limit and skip.
205
- ```yaml
206
- requests:
207
- - id: get_10_rows
208
- type: GoogleSheetGetMany
209
- connectionId: google_sheets
210
- properties:
211
- options:
212
- skip:
213
- _product:
214
- - _state: page_size
215
- - _subtract:
216
- - _state: page_number
217
- - 1
218
- limit:
219
- _state: page_size
220
- ```
221
-
222
- ###### Get all records where age is greater than 25.
223
- ```yaml
224
- requests:
225
- - id: get_10_rows
226
- type: GoogleSheetGetMany
227
- connectionId: google_sheets
228
- properties:
229
- filter:
230
- age:
231
- $gt: 25
232
- ```
233
-
234
- ###### Use an aggregation pipeline to aggregate data.
235
- ```yaml
236
- requests:
237
- - id: get_10_rows
238
- type: GoogleSheetGetMany
239
- connectionId: google_sheets
240
- properties:
241
- pipeline:
242
- - $group:
243
- _id: $region
244
- score:
245
- $avg: $score
246
- - $project:
247
- _id: 0
248
- region: $_id
249
- score: 1
250
- - $sort:
251
- score: 1
252
- ```
253
-
254
- ### GoogleSheetGetOne
255
-
256
- The `GoogleSheetGetOne` request fetches a single rows from the spreadsheet. The `limit` and `skip` options can be used to control which documents are read from the spreadsheet. The filter option can then be used to filter or select which row is returned.
257
-
258
- #### Properties
259
- - `filter: object`: A MongoDB query expression to filter the data.
260
- - `options: object`: Optional settings. Supported settings are:
261
- - `limit: number`: The maximum number of rows to fetch.
262
- - `skip: number`: The number of rows to skip from the top of the sheet.
263
-
264
- #### Examples
265
-
266
- ###### Get row where name is "Zarya".
267
- ```yaml
268
- requests:
269
- - id: get_10_rows
270
- type: GoogleSheetGetOne
271
- connectionId: google_sheets
272
- properties:
273
- filter:
274
- name:
275
- $eq: Zarya
276
- ```
277
-
278
- ### GoogleSheetUpdateMany
279
-
280
- The `GoogleSheetUpdateMany` request updates all the rows matched by the filter.
281
-
282
- #### Properties
283
- - `filter: object`: A MongoDB query expression to filter the data. . All rows matched by the filter will be updated.
284
- - `update: object`: The update to apply to the row. An object where keys are the column names and values are the updated values.
285
- - `options: object`: Optional settings. Supported settings are:
286
- - `limit: number`: The maximum number of rows to fetch.
287
- - `raw: boolean`: Store raw values instead of converting as if typed into the sheets UI.
288
- - `skip: number`: The number of rows to skip from the top of the sheet.
289
-
290
- #### Examples
291
-
292
- ###### Update all rows where age is less than 18.
293
- ```yaml
294
- requests:
295
- - id: get_10_rows
296
- type: GoogleSheetUpdateMany
297
- connectionId: google_sheets
298
- properties:
299
- filter:
300
- age:
301
- $lt: 18
302
- update:
303
- minor: true
304
- ```
305
- ### GoogleSheetUpdateOne
306
-
307
- The `GoogleSheetUpdateOne` request updates the first row matched by the filter.
308
-
309
- #### Properties
310
- - `filter: object`: A MongoDB query expression to filter the data. . The first row matched by the filter will be updated.
311
- - `update: object`: The update to apply to the row. An object where keys are the column names and values are the updated values.
312
- - `options: object`: Optional settings. Supported settings are:
313
- - `limit: number`: The maximum number of rows to fetch.
314
- - `raw: boolean`: Store raw values instead of converting as if typed into the sheets UI.
315
- - `skip: number`: The number of rows to skip from the top of the sheet.
316
- - `upsert: boolean`: Insert the row if no rows are matched by the filter.
317
-
318
- #### Examples
319
-
320
- ###### Update the row for "Doomfist"
321
- ```yaml
322
- requests:
323
- - id: get_10_rows
324
- type: GoogleSheetUpdateOne
325
- connectionId: google_sheets
326
- properties:
327
- filter:
328
- name:
329
- $eq: Doomfist
330
- update:
331
- overpowered: true
332
- ```
@@ -1,181 +0,0 @@
1
- # Copyright 2020-2021 Lowdefy, Inc
2
-
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
-
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
-
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
- _ref:
16
- path: templates/general.yaml.njk
17
- vars:
18
- pageId: Knex
19
- pageTitle: Knex
20
- section: Connections
21
- filePath: connections/Knex.yaml
22
- content:
23
- - id: markdown_intro
24
- type: MarkdownWithCode
25
- properties:
26
- content: |
27
- [`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.
28
-
29
- 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.
30
-
31
- For more details on specific databases, see the database documentation:
32
- - id: amazon_redshift_link
33
- type: Anchor
34
- properties:
35
- title: Amazon Redshift
36
- icon: AiOutlinedLink
37
- events:
38
- onClick:
39
- - id: link,
40
- type: Link
41
- params:
42
- pageId: AmazonRedshift
43
- - id: mariadb_link
44
- type: Anchor
45
- properties:
46
- title: MariaDB
47
- icon: AiOutlinedLink
48
- events:
49
- onClick:
50
- - id: link,
51
- type: Link
52
- params:
53
- pageId: MariaDB
54
- - id: mssql_link
55
- type: Anchor
56
- properties:
57
- title: MS SQL Server
58
- icon: AiOutlinedLink
59
- events:
60
- onClick:
61
- - id: link,
62
- type: Link
63
- params:
64
- pageId: MSSQL
65
- - id: mysql_link
66
- type: Anchor
67
- properties:
68
- title: MySQL
69
- icon: AiOutlinedLink
70
- events:
71
- onClick:
72
- - id: link,
73
- type: Link
74
- params:
75
- pageId: MySQL
76
- - id: oracle_link
77
- type: Anchor
78
- properties:
79
- title: Oracle Database
80
- icon: AiOutlinedLink
81
- events:
82
- onClick:
83
- - id: link,
84
- type: Link
85
- params:
86
- pageId: OracleDB
87
- - id: postgresql_link
88
- type: Anchor
89
- properties:
90
- title: PostgreSQL
91
- icon: AiOutlinedLink
92
- events:
93
- onClick:
94
- - id: link,
95
- type: Link
96
- params:
97
- pageId: PostgreSQL
98
- - id: sqlite_link
99
- type: Anchor
100
- properties:
101
- title: SQLite
102
- icon: AiOutlinedLink
103
- events:
104
- onClick:
105
- - id: link,
106
- type: Link
107
- params:
108
- pageId: SQLite
109
- - id: markdown_connection
110
- type: MarkdownWithCode
111
- properties:
112
- content: |
113
- ## Connections
114
-
115
- Connection types:
116
- - Knex
117
-
118
- ### Knex
119
-
120
- #### Properties
121
- - `client: enum`: __Required__ - The database client to use. One of:
122
- - `mssql`
123
- - `mysql`
124
- - `oracledb`
125
- - `postgres`
126
- - `pg` (alias of `postgres`)
127
- - `postgresql` (alias of `postgres`)
128
- - `redshift`
129
- - `sqlite3`
130
- - `sqlite` (alias of `sqlite3`)
131
- - `connection: object | string`: __Required__ - Connection string or object to pass to the database client. See the specific client documentation for more details.
132
- - `searchPath: string`: Set PostgreSQL search path.
133
- - `version: string`: Set database version.
134
- - `useNullAsDefault: boolean`: If true, undefined keys are replaced with NULL instead of DEFAULT.
135
-
136
- #### Examples
137
-
138
- ###### MySQL with connection object:
139
- ```yaml
140
- connections:
141
- - id: mysql
142
- type: Knex
143
- properties:
144
- client: mysql
145
- connection:
146
- host:
147
- _secret: MYSQL_HOST
148
- user:
149
- _secret: MYSQL_USER
150
- database:
151
- _secret: MYSQL_DB
152
- password:
153
- _secret: MYSQL_PASSWORD
154
- ```
155
- Environment variables:
156
- ```
157
- LOWDEFY_SECRET_MYSQL_HOST = database.server.com
158
- LOWDEFY_SECRET_MYSQL_DB = db
159
- LOWDEFY_SECRET_MYSQL_USER = user
160
- LOWDEFY_SECRET_MYSQL_PASSWORD = password
161
- ```
162
-
163
- ###### PostgreSQL with secret connection string:
164
- ```yaml
165
- connections:
166
- - id: postgres
167
- type: Knex
168
- properties:
169
- client: postgres
170
- connection:
171
- _secret: PG_CONNECTION_STRING
172
- ```
173
- Environment variables:
174
- ```
175
- LOWDEFY_SECRET_PG_CONNECTION_STRING = postgresql://user:password@database.server.com:5432/db
176
- ```
177
- - id: markdown_requests
178
- type: MarkdownWithCode
179
- properties:
180
- content:
181
- _ref: connections/KnexRequests.md
@@ -1,121 +0,0 @@
1
- ## Requests
2
-
3
- Request types:
4
-
5
- - KnexBuilder
6
- - KnexRaw
7
-
8
- ### KnexBuilder
9
-
10
- #### Properties
11
-
12
- - `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.
13
- - `tableName: string | object`: The name of the table to query from.
14
-
15
- #### Examples
16
-
17
- ###### Build a query:
18
-
19
- ```yaml
20
- id: knexBuilder
21
- type: KnexBuilder
22
- connectionId: knex
23
- properties:
24
- query:
25
- - select:
26
- - '*'
27
- - from:
28
- - users
29
- - where:
30
- - name
31
- - _state: name
32
- ```
33
-
34
- ###### Using `tableName`:
35
-
36
- ```yaml
37
- id: knexBuilder
38
- type: KnexBuilder
39
- connectionId: knex
40
- properties:
41
- tableName: users
42
- query:
43
- - select:
44
- - '*'
45
- - where:
46
- - name
47
- - _state: name
48
- ```
49
-
50
- ###### Aliases:
51
-
52
- ```yaml
53
- id: knexBuilder
54
- type: KnexBuilder
55
- connectionId: knex
56
- properties:
57
- tableName:
58
- a: tableA
59
- b: tableB
60
- query:
61
- - select:
62
- - aField: 'a.field'
63
- - bField: 'b.field'
64
- - limit:
65
- - 1
66
- ```
67
-
68
- ### KnexRaw
69
-
70
- #### Properties
71
-
72
- - `query: string`: **Required** - SQL query string.
73
- - `parameters: string | number | array | object`: SQL query parameters.
74
-
75
- #### Examples
76
-
77
- ###### Simple raw query:
78
-
79
- ```yaml
80
- id: knexRaw
81
- type: KnexRaw
82
- connectionId: knex
83
- properties:
84
- query: SELECT * FROM "my_table";
85
- ```
86
-
87
- ###### Query with named parameters:
88
-
89
- ```yaml
90
- id: knexRaw
91
- type: KnexRaw
92
- connectionId: knex
93
- properties:
94
- query: select * from users where name = :name
95
- parameters:
96
- name:
97
- _state: selected_name
98
- ```
99
-
100
- ###### Query with positional parameters:
101
-
102
- ```yaml
103
- id: knexRaw
104
- type: KnexRaw
105
- connectionId: knex
106
- properties:
107
- query: select * from users where name = ?
108
- parameters:
109
- - _state: selected_name
110
- ```
111
-
112
- ###### Reference a `.sql` file:
113
-
114
- ```yaml
115
- id: knexRaw
116
- type: KnexRaw
117
- connectionId: knex
118
- properties:
119
- query:
120
- _ref: my_query.sql
121
- ```