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

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 (148) hide show
  1. package/CHANGELOG.md +92 -73
  2. package/actions/JsAction.yaml +6 -6
  3. package/blocks/container/Affix.yaml +1 -1
  4. package/blocks/container/Alert.yaml +2 -2
  5. package/blocks/container/Badge.yaml +1 -1
  6. package/blocks/container/Box.yaml +1 -1
  7. package/blocks/container/Card.yaml +1 -1
  8. package/blocks/container/Collapse.yaml +1 -1
  9. package/blocks/container/Comment.yaml +4 -4
  10. package/blocks/container/ConfirmModal.yaml +1 -1
  11. package/blocks/container/Descriptions.yaml +2 -2
  12. package/blocks/container/Drawer.yaml +1 -1
  13. package/blocks/container/Label.yaml +1 -2
  14. package/blocks/container/Modal.yaml +1 -1
  15. package/blocks/container/PageHCF.yaml +1 -1
  16. package/blocks/container/PageHCSF.yaml +1 -1
  17. package/blocks/container/PageHSCF.yaml +1 -1
  18. package/blocks/container/PageHeaderMenu.yaml +3 -3
  19. package/blocks/container/PageSHCF.yaml +1 -1
  20. package/blocks/container/PageSiderMenu.yaml +3 -3
  21. package/blocks/container/Result.yaml +2 -2
  22. package/blocks/container/Span.yaml +1 -1
  23. package/blocks/container/Spin.yaml +2 -2
  24. package/blocks/container/Tabs.yaml +2 -2
  25. package/blocks/container/Tooltip.yaml +1 -1
  26. package/blocks/display/Anchor.yaml +1 -2
  27. package/blocks/display/Avatar.yaml +1 -2
  28. package/blocks/display/Breadcrumb.yaml +2 -3
  29. package/blocks/display/Button.yaml +7 -7
  30. package/blocks/display/DangerousHtml.yaml +1 -1
  31. package/blocks/display/DangerousMarkdown.yaml +1 -1
  32. package/blocks/display/Divider.yaml +1 -3
  33. package/blocks/display/EChart.yaml +1 -1
  34. package/blocks/display/Html.yaml +2 -2
  35. package/blocks/display/Icon.yaml +1 -3
  36. package/blocks/display/Img.yaml +1 -1
  37. package/blocks/display/Markdown.yaml +5 -6
  38. package/blocks/display/MarkdownWithCode.yaml +3 -5
  39. package/blocks/display/Menu.yaml +3 -3
  40. package/blocks/display/Message.yaml +1 -1
  41. package/blocks/display/MobileMenu.yaml +3 -4
  42. package/blocks/display/Notification.yaml +2 -2
  43. package/blocks/display/Paragraph.yaml +2 -4
  44. package/blocks/display/Progress.yaml +8 -9
  45. package/blocks/display/Skeleton.yaml +1 -2
  46. package/blocks/display/Statistic.yaml +3 -5
  47. package/blocks/display/Title.yaml +1 -1
  48. package/blocks/input/AutoComplete.yaml +1 -2
  49. package/blocks/input/ButtonSelector.yaml +1 -2
  50. package/blocks/input/CheckboxSelector.yaml +1 -2
  51. package/blocks/input/CheckboxSwitch.yaml +1 -1
  52. package/blocks/input/ChromeColorSelector.yaml +1 -2
  53. package/blocks/input/CircleColorSelector.yaml +1 -2
  54. package/blocks/input/ColorSelector.yaml +1 -2
  55. package/blocks/input/CompactColorSelector.yaml +1 -2
  56. package/blocks/input/DateRangeSelector.yaml +1 -2
  57. package/blocks/input/DateSelector.yaml +1 -2
  58. package/blocks/input/DateTimeSelector.yaml +1 -2
  59. package/blocks/input/GithubColorSelector.yaml +1 -2
  60. package/blocks/input/MonthSelector.yaml +1 -2
  61. package/blocks/input/MultipleSelector.yaml +1 -1
  62. package/blocks/input/NumberInput.yaml +1 -1
  63. package/blocks/input/Pagination.yaml +3 -3
  64. package/blocks/input/ParagraphInput.yaml +1 -1
  65. package/blocks/input/PasswordInput.yaml +1 -1
  66. package/blocks/input/RadioSelector.yaml +1 -1
  67. package/blocks/input/RatingSlider.yaml +1 -1
  68. package/blocks/input/S3UploadButton.yaml +1 -1
  69. package/blocks/input/Selector.yaml +1 -1
  70. package/blocks/input/SliderColorSelector.yaml +1 -1
  71. package/blocks/input/SwatchesColorSelector.yaml +1 -1
  72. package/blocks/input/Switch.yaml +1 -1
  73. package/blocks/input/TextArea.yaml +1 -2
  74. package/blocks/input/TextInput.yaml +7 -7
  75. package/blocks/input/TitleInput.yaml +1 -1
  76. package/blocks/input/TwitterColorSelector.yaml +1 -1
  77. package/blocks/input/WeekSelector.yaml +1 -1
  78. package/blocks/list/ControlledList.yaml +18 -18
  79. package/blocks/list/List.yaml +16 -17
  80. package/blocks/list/TimelineList.yaml +23 -22
  81. package/concepts/cli.yaml +7 -7
  82. package/concepts/custom-blocks.yaml +16 -2
  83. package/concepts/custom-code.yaml +5 -4
  84. package/concepts/lowdefy-schema.yaml +5 -4
  85. package/connections/AxiosHttp.yaml +1 -1
  86. package/connections/Knex.yaml +7 -7
  87. package/connections/MongoDB.yaml +176 -47
  88. package/connections/Redis.yaml +147 -0
  89. package/deployment/aws-lambda.yaml +3 -3
  90. package/deployment/docker.yaml +4 -4
  91. package/deployment/node-server.yaml +1 -1
  92. package/howto/generate-csv.yaml.njk +7 -6
  93. package/howto/generate-pdf.yaml.njk +21 -21
  94. package/howto/generateCsv/lowdefy.yaml +32 -31
  95. package/howto/generatePdf/lowdefy.yaml +10 -9
  96. package/introduction.yaml +1 -1
  97. package/lowdefy.yaml +1 -1
  98. package/menus.yaml +29 -29
  99. package/operators/_actions.yaml +2 -2
  100. package/operators/_diff.yaml +0 -1
  101. package/operators/_get.yaml +6 -6
  102. package/operators/_js.yaml +2 -2
  103. package/operators/_ref.yaml +40 -6
  104. package/operators/_yaml.yaml +39 -15
  105. package/package.json +6 -7
  106. package/pages.yaml +9 -8
  107. package/public/sitemap.xml +204 -204
  108. package/templates/blocks/defaultValueTransformer.js +4 -2
  109. package/templates/blocks/exampleTransformer.js +1 -1
  110. package/templates/blocks/propertiesFormTransformer.js +3 -3
  111. package/templates/blocks/propertiesGetterTransformer.js +2 -2
  112. package/templates/blocks/schemaTransformer.js +1 -1
  113. package/templates/blocks/template.yaml.njk +3 -4
  114. package/templates/blog.yaml.njk +5 -5
  115. package/templates/cli_command.yaml.njk +2 -2
  116. package/templates/footer.yaml.njk +18 -18
  117. package/templates/general.yaml.njk +4 -4
  118. package/templates/generateSitemap.js +1 -2
  119. package/templates/header.yaml +2 -2
  120. package/templates/navigation_buttons.yaml +2 -2
  121. package/templates/operatorsMethodTransformer.js +2 -2
  122. package/templates/test/array.test.js +146 -166
  123. package/templates/test/boolean.test.js +13 -17
  124. package/templates/test/button.test.js +21 -25
  125. package/templates/test/color.test.js +21 -23
  126. package/templates/test/enum.test.js +15 -19
  127. package/templates/test/icon.test.js +17 -21
  128. package/templates/test/integer.test.js +13 -17
  129. package/templates/test/manual.test.js +66 -74
  130. package/templates/test/number.test.js +13 -17
  131. package/templates/test/object.test.js +90 -98
  132. package/templates/test/oneOf.test.js +108 -120
  133. package/templates/test/string.test.js +13 -17
  134. package/templates/test/yaml.test.js +96 -112
  135. package/tutorial/tutorial-actions-operators-config.yaml +4 -4
  136. package/tutorial/tutorial-actions-operators.yaml +6 -6
  137. package/tutorial/tutorial-add-blocks-config.yaml +4 -4
  138. package/tutorial/tutorial-add-blocks.yaml +4 -4
  139. package/tutorial/tutorial-create-page-config.yaml +2 -2
  140. package/tutorial/tutorial-create-page.yaml +4 -4
  141. package/tutorial/tutorial-deploy.yaml +2 -2
  142. package/tutorial/tutorial-requests-config.yaml +4 -4
  143. package/tutorial/tutorial-requests.yaml +2 -2
  144. package/tutorial/tutorial-start.yaml +6 -6
  145. package/users/login-and-logout.yaml +2 -2
  146. package/users/protected-pages.yaml +2 -2
  147. package/users/roles.yaml +2 -2
  148. package/users/users-introduction.yaml +2 -2
@@ -88,7 +88,7 @@ _ref:
88
88
  ###### A basic full example requesting data from https://jsonplaceholder.typicode.com
89
89
 
90
90
  ```yaml
91
- lowdefy: 3.23.1
91
+ lowdefy: 3.23.2
92
92
  name: Lowdefy starter
93
93
  connections:
94
94
  - id: my_api
@@ -33,7 +33,7 @@ _ref:
33
33
  type: Anchor
34
34
  properties:
35
35
  title: Amazon Redshift
36
- icon: LinkOutlined
36
+ icon: AiOutlinedLink
37
37
  events:
38
38
  onClick:
39
39
  - id: link,
@@ -44,7 +44,7 @@ _ref:
44
44
  type: Anchor
45
45
  properties:
46
46
  title: MariaDB
47
- icon: LinkOutlined
47
+ icon: AiOutlinedLink
48
48
  events:
49
49
  onClick:
50
50
  - id: link,
@@ -55,7 +55,7 @@ _ref:
55
55
  type: Anchor
56
56
  properties:
57
57
  title: MS SQL Server
58
- icon: LinkOutlined
58
+ icon: AiOutlinedLink
59
59
  events:
60
60
  onClick:
61
61
  - id: link,
@@ -66,7 +66,7 @@ _ref:
66
66
  type: Anchor
67
67
  properties:
68
68
  title: MySQL
69
- icon: LinkOutlined
69
+ icon: AiOutlinedLink
70
70
  events:
71
71
  onClick:
72
72
  - id: link,
@@ -77,7 +77,7 @@ _ref:
77
77
  type: Anchor
78
78
  properties:
79
79
  title: Oracle Database
80
- icon: LinkOutlined
80
+ icon: AiOutlinedLink
81
81
  events:
82
82
  onClick:
83
83
  - id: link,
@@ -88,7 +88,7 @@ _ref:
88
88
  type: Anchor
89
89
  properties:
90
90
  title: PostgreSQL
91
- icon: LinkOutlined
91
+ icon: AiOutlinedLink
92
92
  events:
93
93
  onClick:
94
94
  - id: link,
@@ -99,7 +99,7 @@ _ref:
99
99
  type: Anchor
100
100
  properties:
101
101
  title: SQLite
102
- icon: LinkOutlined
102
+ icon: AiOutlinedLink
103
103
  events:
104
104
  onClick:
105
105
  - id: link,
@@ -106,14 +106,30 @@ _ref:
106
106
 
107
107
  #### Properties
108
108
  - `pipeline: object[]`: __Required__ - Array containing all the aggregation framework commands for the execution.
109
- - `options: object`: Optional settings. See the [driver docs](https://mongodb.github.io/node-mongodb-native/3.3/api/Collection.html#aggregate) for more information. Supported settings are:
110
- - `readPreference: string | object`: The read preference.
109
+ - `options: object`: Optional settings. See the [driver docs](https://mongodb.github.io/node-mongodb-native/4.0/classes/collection.html#aggregate) for more information. Supported settings are:
111
110
  - `allowDiskUse: boolean`: Default: `false` - Allow disk use on the MongoDB server to store temporary results for the aggregation.
112
- - `maxTimeMS: number`: Specifies a cumulative time limit in milliseconds for processing operations on the cursor.
111
+ - `authdb: string`: Specifies the authentication information to be used.
112
+ - `batchSize: number`: The number of documents to return per batch.
113
+ - `bsonRegExp: boolean`: Return the BSON regular expressions as BSONRegExp instances.
113
114
  - `bypassDocumentValidation: boolean`: Default: `false` - Allow driver to bypass schema validation in MongoDB 3.2 or higher.
115
+ - `checkKeys: boolean`: The serializer will check if keys are valid.
114
116
  - `collation: object`: Specify collation (MongoDB 3.4 or higher) settings for update operation.
115
117
  - `comment: string`: Add a [comment](https://docs.mongodb.com/manual/reference/operator/query/comment/index.html) to the aggregation. These comments are visible in the MongoDB profile log, making them easier to interpret.
118
+ - `dbName: string`: The database name.
119
+ - `explain: boolean`: Specifies to return the information on the processing of the pipeline.
120
+ - `fullResponse: boolean`: Return the full server response for the command.
116
121
  - `hint: string | object`: Add an index selection hint to an aggregation command.
122
+ - `ignoreUndefined: boolean`: Default: `true` - Serialize will not emit undefined fields.
123
+ - `let: object`: Specifies an object with a list of variables. This allows you to improve command readability by separating the variables from the query text.
124
+ - `maxAwaitTimeMS: number`: The maximum amount of time for the server to wait on new documents to satisfy a tailable cursor query.
125
+ - `maxTimeMS: number`: Specifies a cumulative time limit in milliseconds for processing operations on the cursor.
126
+ - `noResponse: boolean`: Admin command option.
127
+ - `readConcern: object`: Specifies the level of isolation for read operations.
128
+ - `readPreference: string | object`: The read preference.
129
+ - `retryWrites: boolean`: Should retry failed writes.
130
+ - `serializeFunctions: boolean`: Default: `false` - Serialize the javascript functions.
131
+ - `willRetryWrites: boolean`: Option whether to retry writes.
132
+ - `writeConcern: object`: An object that expresses the write concern to use with the $out or $merge stage.
117
133
 
118
134
  #### Examples
119
135
 
@@ -143,14 +159,27 @@ _ref:
143
159
 
144
160
  #### Properties
145
161
  - `filter: object`: __Required__ - The filter used to select the document to update.
146
- - `options: object`: Optional settings. See the [driver docs](https://mongodb.github.io/node-mongodb-native/3.3/api/Collection.html#updateOne) for more information. Supported settings are:
162
+ - `options: object`: Optional settings. See the [driver docs](https://mongodb.github.io/node-mongodb-native/4.0/classes/collection.html#deletemany) for more information. Supported settings are:
163
+ - `authdb: string`: Specifies the authentication information to be used.
164
+ - `bsonRegExp: boolean`: Return the BSON regular expressions as BSONRegExp instances.
147
165
  - `checkKeys: boolean`: Default: `false` - If true, will throw if bson documents start with $ or include a . in any key value.
148
166
  - `collation: object`: Specify collation (MongoDB 3.4 or higher) settings for update operation.
149
- - `hint: object`: An optional hint for query optimization.
167
+ - `comment: string`: A user-provided comment to attach to this command.
168
+ - `dbName: string`: The database name.
169
+ - `explain: boolean`: Specifies the verbosity mode for the explain output.
170
+ - `fullResponse: boolean`: Return the full server response for the command.
171
+ - `hint: string | object`: An optional hint for query optimization.
150
172
  - `ignoreUndefined: boolean`: Default: `false` - Specify if the BSON serializer should ignore undefined fields.
151
- - `j: boolean`: Specify a journal write concern.
152
- - `w: number | string`: The write concern
153
- - `wtimeout: number`: The write concern timeout.
173
+ - `let: object`: Map of parameter names and values that can be accessed using `$$var` (requires MongoDB 5.0).
174
+ - `maxTimeMS: number`: Specifies a cumulative time limit in milliseconds for processing operations on the cursor.
175
+ - `noResponse: boolean`: Admin command option.
176
+ - `ordered: boolean`: If true, when an insert fails, don't execute the remaining writes. If false, continue with remaining inserts when one fails.
177
+ - `readConcern: object`: Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported).
178
+ - `readPreference: string | object`: The read preference.
179
+ - `retryWrites: boolean`: Should retry failed writes.
180
+ - `serializeFunctions: boolean`: Default: `false` - Serialize the javascript functions.
181
+ - `willRetryWrites: boolean`: Option whether to retry writes.
182
+ - `writeConcern: object`: An object that expresses the write concern.
154
183
 
155
184
  #### Examples
156
185
 
@@ -173,14 +202,27 @@ _ref:
173
202
 
174
203
  #### Properties
175
204
  - `filter: object`: __Required__ - The filter used to select the document to update.
176
- - `options: object`: Optional settings. See the [driver docs](https://mongodb.github.io/node-mongodb-native/3.3/api/Collection.html#updateOne) for more information. Supported settings are:
205
+ - `options: object`: Optional settings. See the [driver docs](https://mongodb.github.io/node-mongodb-native/4.0/classes/collection.html#deleteone) for more information. Supported settings are:
206
+ - `authdb: string`: Specifies the authentication information to be used.
207
+ - `bsonRegExp: boolean`: Return the BSON regular expressions as BSONRegExp instances.
177
208
  - `checkKeys: boolean`: Default: `false` - If true, will throw if bson documents start with $ or include a . in any key value.
178
209
  - `collation: object`: Specify collation (MongoDB 3.4 or higher) settings for update operation.
179
- - `hint: object`: An optional hint for query optimization.
210
+ - `comment: string`: A user-provided comment to attach to this command.
211
+ - `dbName: string`: The database name.
212
+ - `explain: boolean`: Specifies the verbosity mode for the explain output.
213
+ - `fullResponse: boolean`: Return the full server response for the command.
214
+ - `hint: string | object`: An optional hint for query optimization.
180
215
  - `ignoreUndefined: boolean`: Default: `false` - Specify if the BSON serializer should ignore undefined fields.
181
- - `j: boolean`: Specify a journal write concern.
182
- - `w: number | string`: The write concern
183
- - `wtimeout: number`: The write concern timeout.
216
+ - `let: object`: Map of parameter names and values that can be accessed using `$$var` (requires MongoDB 5.0).
217
+ - `maxTimeMS: number`: Specifies a cumulative time limit in milliseconds for processing operations on the cursor.
218
+ - `noResponse: boolean`: Admin command option.
219
+ - `ordered: boolean`: If true, when an insert fails, don't execute the remaining writes. If false, continue with remaining inserts when one fails.
220
+ - `readConcern: object`: Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported).
221
+ - `readPreference: string | object`: The read preference.
222
+ - `retryWrites: boolean`: Should retry failed writes.
223
+ - `serializeFunctions: boolean`: Default: `false` - Serialize the javascript functions.
224
+ - `willRetryWrites: boolean`: Option whether to retry writes.
225
+ - `writeConcern: object`: An object that expresses the write concern.
184
226
 
185
227
  #### Examples
186
228
 
@@ -204,16 +246,43 @@ _ref:
204
246
 
205
247
  #### Properties
206
248
  - `query: object`: __Required__ - A MongoDB query object.
207
- - `options: object`: Optional settings. See the [driver docs](https://mongodb.github.io/node-mongodb-native/3.3/api/Collection.html#find) for more information. Supported settings are:
249
+ - `options: object`: Optional settings. See the [driver docs](https://mongodb.github.io/node-mongodb-native/4.0/classes/collection.html#find) for more information. Supported settings are:
250
+ - `allowDiskUse: boolean`: Allows disk use for blocking sort operations exceeding 100MB memory. (MongoDB 3.2 or higher)
251
+ - `allowPartialResults: boolean`: For queries against a sharded collection, allows the command (or subsequent getMore commands) to return partial results, rather than an error, if one or more queried shards are available.
252
+ - `authdb: string`: Specifies the authentication information to be used.
253
+ - `awaitData: boolean`: Specify if the cursor is a tailable-await cursor. Requires `tailable` to be true.
254
+ - `batchSize: number`: Set the batchSize for the getMoreCommand when iterating over the query results.
255
+ - `bsonRegExp: boolean`: Return the BSON regular expressions as BSONRegExp instances.
256
+ - `checkKeys: boolean`: The serializer will check if keys are valid.
257
+ - `collation: object`: Specify collation (MongoDB 3.4 or higher) settings for update operation.
258
+ - `comment: string | object`: Add a [comment](https://docs.mongodb.com/manual/reference/operator/query/comment/index.html) to the query. These comments are visible in the MongoDB profile log, making them easier to interpret.
259
+ - `dbName: string`: The database name.
260
+ - `explain: boolean`: Specifies the verbosity mode for the explain output.
261
+ - `fullResponse: boolean`: Return the full server response for the command.
262
+ - `hint: string | object`: Tell the query to use specific indexes in the query. Object of indexes to use, `{'_id':1}`.
263
+ - `ignoreUndefined: boolean`: Default: `true` - Serialize will not emit undefined fields.
264
+ - `let: object`: Map of parameter names and values that can be accessed using `$$var` (requires MongoDB 5.0).
208
265
  - `limit: number`: Sets the limit of documents returned in the query.
209
- - `sort array | object`: Set to sort the documents coming back from the query.
266
+ - `max: object`: The exclusive upper bound for a specific index.
267
+ - `maxAwaitTimeMS: number`: The maximum amount of time for the server to wait on new documents to satisfy a tailable cursor query. Requires `tailable` and `awaitData` to be true.
268
+ - `maxTimeMS: number`: Number of milliseconds to wait before aborting the command.
269
+ - `min: object`: The inclusive lower bound for a specific index.
270
+ - `noCursorTimeout: boolean`: The server normally times out idle cursors after an inactivity period (10 minutes) to prevent excess memory use. Set this option to prevent that.
271
+ - `noResponse: boolean`: Admin command option.
210
272
  - `projection: object`: The fields to return in the query. Object of fields to either include or exclude (one of, not both), `{'a':1, 'b': 1}` or `{'a': 0, 'b': 0}`.
211
- - `skip: number`: Set to skip N documents ahead in your query (useful for pagination).
212
- - `hint: object`: Tell the query to use specific indexes in the query. Object of indexes to use, `{'_id':1}`.
213
- - `comment: string`: Add a [comment](https://docs.mongodb.com/manual/reference/operator/query/comment/index.html) to the query. These comments are visible in the MongoDB profile log, making them easier to interpret.
273
+ - `readConcern: object`: Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported).
214
274
  - `readPreference: string | object`: The preferred read preference.
215
- - `maxTimeMS: number`: Number of milliseconds to wait before aborting the query.
216
- - `collation: object`: Specify collation (MongoDB 3.4 or higher) settings for update operation.
275
+ - `retryWrites: boolean`: Should retry failed writes.
276
+ - `returnKey: boolean`: If true, returns only the index keys in the resulting documents.
277
+ - `serializeFunctions: boolean`: Default: `false` - Serialize the javascript functions.
278
+ - `showRecordId: boolean`: Determine whether to return the record identifier for each document. If true, adds a field $recordId to the returned documents.
279
+ - `singleBatch: boolean`: Default: `false` - Determines whether to close the cursor after the first batch.
280
+ - `skip: number`: Set to skip N documents ahead in your query (useful for pagination).
281
+ - `sort: array | object`: Set to sort the documents coming back from the query.
282
+ - `tailable: boolean`: Specify if the cursor is tailable.
283
+ - `timeout: boolean`: Specify if the cursor can timeout.
284
+ - `willRetryWrites: boolean`: Option whether to retry writes.
285
+ - `writeConcern: object`: An object that expresses the write concern.
217
286
 
218
287
  #### Examples
219
288
 
@@ -245,16 +314,43 @@ _ref:
245
314
 
246
315
  #### Properties
247
316
  - `query: object`: __Required__ - A MongoDB query object.
248
- - `options: object`: Optional settings. See the [driver docs](https://mongodb.github.io/node-mongodb-native/3.3/api/Collection.html#find) for more information. Supported settings are:
317
+ - `options: object`: Optional settings. See the [driver docs](https://mongodb.github.io/node-mongodb-native/4.0/classes/collection.html#findone) for more information. Supported settings are:
318
+ - `allowDiskUse: boolean`: Allows disk use for blocking sort operations exceeding 100MB memory. (MongoDB 3.2 or higher)
319
+ - `allowPartialResults: boolean`: For queries against a sharded collection, allows the command (or subsequent getMore commands) to return partial results, rather than an error, if one or more queried shards are available.
320
+ - `authdb: string`: Specifies the authentication information to be used.
321
+ - `awaitData: boolean`: Specify if the cursor is a tailable-await cursor. Requires `tailable` to be true.
322
+ - `batchSize: number`: Set the batchSize for the getMoreCommand when iterating over the query results.
323
+ - `bsonRegExp: boolean`: Return the BSON regular expressions as BSONRegExp instances.
324
+ - `checkKeys: boolean`: The serializer will check if keys are valid.
325
+ - `collation: object`: Specify collation (MongoDB 3.4 or higher) settings for update operation.
326
+ - `comment: string | object`: Add a [comment](https://docs.mongodb.com/manual/reference/operator/query/comment/index.html) to the query. These comments are visible in the MongoDB profile log, making them easier to interpret.
327
+ - `dbName: string`: The database name.
328
+ - `explain: boolean`: Specifies the verbosity mode for the explain output.
329
+ - `fullResponse: boolean`: Return the full server response for the command.
330
+ - `hint: string | object`: Tell the query to use specific indexes in the query. Object of indexes to use, `{'_id':1}`.
331
+ - `ignoreUndefined: boolean`: Default: `true` - Serialize will not emit undefined fields.
332
+ - `let: object`: Map of parameter names and values that can be accessed using `$$var` (requires MongoDB 5.0).
249
333
  - `limit: number`: Sets the limit of documents returned in the query.
250
- - `sort: array | object`: Set to sort the documents coming back from the query.
334
+ - `max: object`: The exclusive upper bound for a specific index.
335
+ - `maxAwaitTimeMS: number`: The maximum amount of time for the server to wait on new documents to satisfy a tailable cursor query. Requires `tailable` and `awaitData` to be true.
336
+ - `maxTimeMS: number`: Number of milliseconds to wait before aborting the command.
337
+ - `min: object`: The inclusive lower bound for a specific index.
338
+ - `noCursorTimeout: boolean`: The server normally times out idle cursors after an inactivity period (10 minutes) to prevent excess memory use. Set this option to prevent that.
339
+ - `noResponse: boolean`: Admin command option.
251
340
  - `projection: object`: The fields to return in the query. Object of fields to either include or exclude (one of, not both), `{'a':1, 'b': 1}` or `{'a': 0, 'b': 0}`.
252
- - `skip: number`: Set to skip N documents ahead in your query (useful for pagination).
253
- - `hint: object`: Tell the query to use specific indexes in the query. Object of indexes to use, `{'_id':1}`.
254
- - `comment: string`: Add a [comment](https://docs.mongodb.com/manual/reference/operator/query/comment/index.html) to the query. These comments are visible in the MongoDB profile log, making them easier to interpret.
341
+ - `readConcern: object`: Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported).
255
342
  - `readPreference: string | object`: The preferred read preference.
256
- - `maxTimeMS: number`: Number of milliseconds to wait before aborting the query.
257
- - `collation: object`: Specify collation (MongoDB 3.4 or higher) settings for update operation.
343
+ - `retryWrites: boolean`: Should retry failed writes.
344
+ - `returnKey: boolean`: If true, returns only the index keys in the resulting documents.
345
+ - `serializeFunctions: boolean`: Default: `false` - Serialize the javascript functions.
346
+ - `showRecordId: boolean`: Determine whether to return the record identifier for each document. If true, adds a field $recordId to the returned documents.
347
+ - `singleBatch: boolean`: Default: `false` - Determines whether to close the cursor after the first batch.
348
+ - `skip: number`: Set to skip N documents ahead in your query (useful for pagination).
349
+ - `sort: array | object`: Set to sort the documents coming back from the query.
350
+ - `tailable: boolean`: Specify if the cursor is tailable.
351
+ - `timeout: boolean`: Specify if the cursor can timeout.
352
+ - `willRetryWrites: boolean`: Option whether to retry writes.
353
+ - `writeConcern: object`: An object that expresses the write concern.
258
354
 
259
355
  #### Examples
260
356
 
@@ -276,15 +372,27 @@ _ref:
276
372
 
277
373
  #### Properties
278
374
  - `docs: object[]`: __Required__ - The array of documents to be inserted.
279
- - `options: object`: Optional settings. See the [driver docs](https://mongodb.github.io/node-mongodb-native/3.3/api/Collection.html#insertMany) for more information. Supported settings are:
375
+ - `options: object`: Optional settings. See the [driver docs](https://mongodb.github.io/node-mongodb-native/4.0/classes/collection.html#insertmany) for more information. Supported settings are:
376
+ - `authdb: string`: Specifies the authentication information to be used.
377
+ - `bsonRegExp: boolean`: Return the BSON regular expressions as BSONRegExp instances.
280
378
  - `bypassDocumentValidation: boolean`: Default: `false` - Allow driver to bypass schema validation in MongoDB 3.2 or higher
281
379
  - `checkKeys: boolean`: Default: `true` - If true, will throw if bson documents start with $ or include a . in any key value.
282
- - `forceServerObjectId: boolean`: Default: `false` - Force server to assign _id values instead of driver.
283
- - `j: boolean`: Default: `false` - Specify a journal write concern.
380
+ - `collation: object`: Specify collation (MongoDB 3.4 or higher) settings for update operation.
381
+ - `comment: string | object`: Add a [comment](https://docs.mongodb.com/manual/reference/operator/query/comment/index.html) to the query. These comments are visible in the MongoDB profile log, making them easier to interpret.
382
+ - `dbName: string`: The database name.
383
+ - `explain: object`: Specifies the verbosity mode for the explain output.
384
+ - `forcesServerObjectId: boolean`: Default: `false` - Force server to assign _id values instead of driver.
385
+ - `fullResponse: boolean`: Return the full server response for the command.
284
386
  - `ignoreUndefined: boolean`: Default: `false` - Specify if the BSON serializer should ignore undefined fields.
285
- - `w: number | string`: The write concern.
286
- - `wtimeout: number`: The write concern timeout.
287
-
387
+ - `maxTimeMS: number`: Number of milliseconds to wait before aborting the command.
388
+ - `noResponse: boolean`: Admin command option.
389
+ - `ordered: boolean`: If true, when an insert fails, don't execute the remaining writes. If false, continue with remaining inserts when one fails.
390
+ - `readConcern: object`: Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported).
391
+ - `readPreference: object`: The preferred read preference.
392
+ - `retryWrites: boolean`: Should retry failed writes.
393
+ - `serializeFunctions: boolean`: Default: `false` - Serialize the javascript functions.
394
+ - `willRetryWrites: boolean`: Option whether to retry writes.
395
+ - `writeConcern: object`: An object that expresses the write concern.
288
396
 
289
397
  #### Examples
290
398
 
@@ -311,14 +419,26 @@ _ref:
311
419
 
312
420
  #### Properties
313
421
  - `doc: object`: __Required__ - The document to be inserted.
314
- - `options: object`: Optional settings. See the [driver docs](https://mongodb.github.io/node-mongodb-native/3.3/api/Collection.html#insertOne) for more information. Supported settings are:
422
+ - `options: object`: Optional settings. See the [driver docs](https://mongodb.github.io/node-mongodb-native/4.0/classes/collection.html#insertone) for more information. Supported settings are:
423
+ - `authdb: string`: Specifies the authentication information to be used.
424
+ - `bsonRegExp: boolean`: Return the BSON regular expressions as BSONRegExp instances.
315
425
  - `bypassDocumentValidation: boolean`: Default: `false` - Allow driver to bypass schema validation in MongoDB 3.2 or higher
316
426
  - `checkKeys: boolean`: Default: `true` - If true, will throw if bson documents start with $ or include a . in any key value.
317
- - `forceServerObjectId: boolean`: Default: `false` - Force server to assign _id values instead of driver.
318
- - `j: boolean`: Default: `false` - Specify a journal write concern.
427
+ - `collation: object`: Specify collation (MongoDB 3.4 or higher) settings for update operation.
428
+ - `comment: string | object`: Add a [comment](https://docs.mongodb.com/manual/reference/operator/query/comment/index.html) to the query. These comments are visible in the MongoDB profile log, making them easier to interpret.
429
+ - `dbName: string`: The database name.
430
+ - `explain: object`: Specifies the verbosity mode for the explain output.
431
+ - `forcesServerObjectId: boolean`: Default: `false` - Force server to assign _id values instead of driver.
432
+ - `fullResponse: boolean`: Return the full server response for the command.
319
433
  - `ignoreUndefined: boolean`: Default: `false` - Specify if the BSON serializer should ignore undefined fields.
320
- - `w: number | string`: The write concern.
321
- - `wtimeout: number`: The write concern timeout.
434
+ - `maxTimeMS: number`: Number of milliseconds to wait before aborting the command.
435
+ - `noResponse: boolean`: Admin command option.
436
+ - `readConcern: object`: Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported).
437
+ - `readPreference: object`: The preferred read preference.
438
+ - `retryWrites: boolean`: Should retry failed writes.
439
+ - `serializeFunctions: boolean`: Default: `false` - Serialize the javascript functions.
440
+ - `willRetryWrites: boolean`: Option whether to retry writes.
441
+ - `writeConcern: object`: An object that expresses the write concern.
322
442
 
323
443
  #### Examples
324
444
 
@@ -382,7 +502,6 @@ _ref:
382
502
  requests:
383
503
  - id: set_resolved
384
504
  type: MongoDBUpdateMany
385
- connectionId: my_mongodb_collection_id
386
505
  properties:
387
506
  filter:
388
507
  score:
@@ -399,19 +518,29 @@ _ref:
399
518
  #### Properties
400
519
  - `filter: object`: __Required__ - The filter used to select the document to update.
401
520
  - `update: object | object[]`: __Required__ - The update operations to be applied to the document.
402
- - `options: object`: Optional settings. See the [driver docs](https://mongodb.github.io/node-mongodb-native/3.3/api/Collection.html#updateOne) for more information. Supported settings are:
403
- - `arrayFilters: string[]`: _Array_ - Array filters for the [`$[<identifier>]`](https://docs.mongodb.com/manual/reference/operator/update/positional-filtered/) array update operator.
521
+ - `options: object`: Optional settings. See the [driver docs](https://mongodb.github.io/node-mongodb-native/4.0/classes/collection.html#updateone) for more information. Supported settings are:
522
+ - `arrayFilters: object[]`: _Array_ - Array filters for the [`$[<identifier>]`](https://docs.mongodb.com/manual/reference/operator/update/positional-filtered/) array update operator.
523
+ - `authdb: string`: Specifies the authentication information to be used.
524
+ - `bsonRegExp: boolean`: Return the BSON regular expressions as BSONRegExp instances.
404
525
  - `bypassDocumentValidation: boolean`: Default: `false` - Allow driver to bypass schema validation in MongoDB 3.2 or higher.
405
526
  - `checkKeys: boolean`: Default: `false` - If true, will throw if bson documents start with $ or include a . in any key value.
406
527
  - `collation: object`: Specify collation (MongoDB 3.4 or higher) settings for update operation.
407
- - `forceServerObjectId: boolean`: Force server to assign _id values instead of driver.
408
- - `hint: object`: An optional hint for query optimization.
528
+ - `comment: string | object`: A user-provided comment to attach to this command.
529
+ - `dbName: string`: The database name.
530
+ - `explain: object`: Specifies the verbosity mode for the explain output.
531
+ - `fullResponse: boolean`: Return the full server response for the command.
532
+ - `hint: string | object`: An optional hint for query optimization.
409
533
  - `ignoreUndefined: boolean`: Default: `false` - Specify if the BSON serializer should ignore undefined fields.
410
- - `j: boolean`: Specify a journal write concern.
534
+ - `let: object`: Map of parameter names and values that can be accessed using `$$var` (requires MongoDB 5.0).
535
+ - `maxTimeMS: number`: Number of milliseconds to wait before aborting the command.
536
+ - `noResponse: boolean`: Admin command option.
537
+ - `readConcern: object`: Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported).
538
+ - `readPreference: object`: The preferred read preference.
539
+ - `retryWrites: boolean`: Should retry failed writes.
540
+ - `serializeFunctions: boolean`: Default: `false` - Serialize the javascript functions.
411
541
  - `upsert: boolean`: Default: `false` - Insert document if no match is found.
412
- - `w: integer | string`: The write concern
413
- - `wtimeout: integer`: The write concern timeout.
414
-
542
+ - `willRetryWrites: boolean`: Option whether to retry writes.
543
+ - `writeConcern: object`: An object that expresses the write concern.
415
544
 
416
545
  #### Examples
417
546
 
@@ -0,0 +1,147 @@
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: Redis
19
+ pageTitle: Redis
20
+ section: Connections
21
+ filePath: connections/Redis.yaml
22
+ content:
23
+ - id: markdown_intro
24
+ type: MarkdownWithCode
25
+ properties:
26
+ content: |
27
+ [`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.
28
+
29
+ Lowdefy integrates with Redis using the one of the recommended [Node.js clients (node-redis)](https://github.com/redis/node-redis).
30
+
31
+ - id: markdown_connection
32
+ type: MarkdownWithCode
33
+ properties:
34
+ content: |
35
+ ## Connections
36
+
37
+ Connection types:
38
+ - Redis
39
+
40
+ ### Redis
41
+
42
+ #### Properties
43
+ - `connection: object | string `: __Required__ - Connection object or string to pass to the [`redis client`](https://github.com/redis/node-redis) redis client.
44
+
45
+ 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).
46
+
47
+ #### Examples
48
+
49
+ ###### Redis with connection object:
50
+ ```yaml
51
+ connections:
52
+ - id: redis
53
+ type: Redis
54
+ properties:
55
+ connection:
56
+ username:
57
+ _secret: REDIS_USERNAME
58
+ password:
59
+ _secret: REDIS_PASSWORD
60
+ database:
61
+ _secret: REDIS_DATABASE
62
+ socket:
63
+ host:
64
+ _secret: REDIS_HOST
65
+ port:
66
+ _secret: REDIS_PORT
67
+ ```
68
+ Environment variables:
69
+ ```
70
+ LOWDEFY_SECRET_REDIS_USERNAME = user
71
+ LOWDEFY_SECRET_REDIS_PASSWORD = password
72
+ LOWDEFY_SECRET_REDIS_DATABASE = 4
73
+ LOWDEFY_SECRET_REDIS_HOST = redis.server.com
74
+ LOWDEFY_SECRET_REDIS_PORT = 5000
75
+ ```
76
+
77
+ ###### Redis with connection string:
78
+ ```yaml
79
+ connections:
80
+ - id: redis
81
+ type: Redis
82
+ properties:
83
+ connection:
84
+ _secret: REDIS_CONNECTION_STRING
85
+ ```
86
+ Environment variables:
87
+ ```
88
+ LOWDEFY_SECRET_REDIS_CONNECTION_STRING = redis://user:password@redis:server.com:5000/4'
89
+ ```
90
+ - id: markdown_requests
91
+ type: MarkdownWithCode
92
+ properties:
93
+ content: |
94
+ ## Requests
95
+
96
+ Request types:
97
+ - Redis
98
+
99
+ ### Redis
100
+
101
+ #### Properties
102
+
103
+ - `command: string`: **Required** - Redis command to be executed, accepts all of the [out-of-the-box Redis commands](https://redis.io/commands).
104
+ - `parameters: array`: An array of parameters to be passed to the redis command.
105
+ - `modifiers: object`: The redis modififers to be passed to the redis command.
106
+
107
+ #### Examples
108
+
109
+ ###### Setting a key-value pair in redis:
110
+
111
+ ```yaml
112
+ id: redisRequest
113
+ type: Redis
114
+ connectionId: redis
115
+ properties:
116
+ command: set
117
+ parameters:
118
+ - key
119
+ - value
120
+ ```
121
+
122
+ ###### Getting a value from redis:
123
+
124
+ ```yaml
125
+ id: redisRequest
126
+ type: Redis
127
+ connectionId: redis
128
+ properties:
129
+ command: get
130
+ parameters:
131
+ - key
132
+ ```
133
+
134
+ ###### Setting a key-value pair only if key does not exist:
135
+
136
+ ````yaml
137
+ id: redisRequest
138
+ type: Redis
139
+ connectionId: redis
140
+ properties:
141
+ command: set
142
+ parameters:
143
+ - key
144
+ - value
145
+ modififers:
146
+ nx: true
147
+ ```
@@ -55,10 +55,10 @@ _ref:
55
55
  COPY --chown=node:node . .
56
56
 
57
57
  # Build the Lowdefy config using the Lowdefy CLI
58
- RUN npx lowdefy@3.23.1 build
58
+ RUN npx lowdefy@3.23.2 build
59
59
 
60
60
  # Use the correct Lowdefy base image
61
- FROM lowdefy/lowdefy-aws-lambda:3.23.1
61
+ FROM lowdefy/lowdefy-aws-lambda:3.23.2
62
62
 
63
63
  # Copy build output from build stage
64
64
  COPY --from=build /home/node/lowdefy/.lowdefy/build ./build
@@ -74,7 +74,7 @@ _ref:
74
74
  type: Alert
75
75
  properties:
76
76
  type: warning
77
- icon: WarningFilled
77
+ icon: AiFilledWarning
78
78
  description: When updating your app to a new Lowdefy version, make sure to update the Lowdefy version in the Dockerfile
79
79
 
80
80
  - id: md2
@@ -32,7 +32,7 @@ _ref:
32
32
 
33
33
  The Lowdefy server can be configured using the following environment variables:
34
34
 
35
- - `LOWDEFY_SERVER_BASE_PATH`: Set the base path to serve the Lowdefy application from. This will serve the application under `https://example.com/<base-path>`instead of `https://example.com`, and all pages under `https://example.com/<base-path>/<page-id>` instead of the default `https://example.com/<page-id>`.
35
+ - `LOWDEFY_BASE_PATH`: Set the base path to serve the Lowdefy application from. This will serve the application under `https://example.com/<base-path>`instead of `https://example.com`, and all pages under `https://example.com/<base-path>/<page-id>` instead of the default `https://example.com/<page-id>`.
36
36
  - `LOWDEFY_SERVER_BUILD_DIRECTORY`: The directory of the built Lowdefy configuration (The output of `lowdefy build`, usually found at `./.lowdefy/build` in your project repository). The default is `./build` (or `/home/node/lowdefy/build`).
37
37
  - `LOWDEFY_SERVER_PUBLIC_DIRECTORY`: The directory of the public assets to be served. The default is `./public` (or `/home/node/lowdefy/public`).
38
38
  - `LOWDEFY_SERVER_PORT`: The port (inside the container) at which to run the server. The default is `3000`.
@@ -41,7 +41,7 @@ _ref:
41
41
  type: Alert
42
42
  properties:
43
43
  type: warning
44
- icon: WarningFilled
44
+ icon: AiFilledWarning
45
45
  description: When updating your app to a new Lowdefy version, make sure to update the Lowdefy version in the Dockerfile
46
46
 
47
47
  - id: md2
@@ -65,10 +65,10 @@ _ref:
65
65
  COPY --chown=node:node . .
66
66
 
67
67
  # Build the Lowdefy config using the Lowdefy CLI
68
- RUN npx lowdefy@3.23.1 build
68
+ RUN npx lowdefy@3.23.2 build
69
69
 
70
70
  # Use the correct Lowdefy base image
71
- FROM lowdefy/lowdefy:3.23.1
71
+ FROM lowdefy/lowdefy:3.23.2
72
72
 
73
73
  # Copy build output from build stage
74
74
  COPY --from=build --chown=node:node /home/node/lowdefy/.lowdefy/build ./build
@@ -105,7 +105,7 @@ _ref:
105
105
 
106
106
  The following environment variables can be specified:
107
107
 
108
- - `LOWDEFY_SERVER_BASE_PATH`: Set the base path to serve the Lowdefy application from. This will serve the application under `https://example.com/<base-path>`instead of `https://example.com`, and all pages under `https://example.com/<base-path>/<page-id>` instead of the default `https://example.com/<page-id>`.
108
+ - `LOWDEFY_BASE_PATH`: Set the base path to serve the Lowdefy application from. This will serve the application under `https://example.com/<base-path>`instead of `https://example.com`, and all pages under `https://example.com/<base-path>/<page-id>` instead of the default `https://example.com/<page-id>`.
109
109
  - `LOWDEFY_SERVER_BUILD_DIRECTORY`: The directory of the built Lowdefy configuration (The output of `lowdefy build`, usually found at `./.lowdefy/build` in your project repository). The default is `./.lowdefy/build`.
110
110
  - `LOWDEFY_SERVER_PORT`: The port at which to run the server. The default is `3000`.
111
111
  - `LOWDEFY_SERVER_PUBLIC_DIRECTORY`: The directory of the public assets to be served. The default is `./public`.