@budibase/server 1.3.19-alpha.3 → 1.3.19-alpha.4

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 (168) hide show
  1. package/builder/assets/{index.c361a9cc.js → index.79081ecb.js} +1 -1
  2. package/builder/index.html +1 -1
  3. package/coverage/clover.xml +8 -5
  4. package/coverage/coverage-final.json +1 -1
  5. package/coverage/lcov-report/api/controllers/apikeys.js.html +1 -1
  6. package/coverage/lcov-report/api/controllers/auth.js.html +1 -1
  7. package/coverage/lcov-report/api/controllers/automation.js.html +1 -1
  8. package/coverage/lcov-report/api/controllers/backup.js.html +1 -1
  9. package/coverage/lcov-report/api/controllers/cloud.js.html +1 -1
  10. package/coverage/lcov-report/api/controllers/component.js.html +1 -1
  11. package/coverage/lcov-report/api/controllers/datasource.js.html +1 -1
  12. package/coverage/lcov-report/api/controllers/dev.js.html +1 -1
  13. package/coverage/lcov-report/api/controllers/index.html +1 -1
  14. package/coverage/lcov-report/api/controllers/integration.js.html +1 -1
  15. package/coverage/lcov-report/api/controllers/layout.js.html +1 -1
  16. package/coverage/lcov-report/api/controllers/metadata.js.html +1 -1
  17. package/coverage/lcov-report/api/controllers/migrations.js.html +1 -1
  18. package/coverage/lcov-report/api/controllers/permission.js.html +1 -1
  19. package/coverage/lcov-report/api/controllers/query/index.html +1 -1
  20. package/coverage/lcov-report/api/controllers/query/validation.js.html +1 -1
  21. package/coverage/lcov-report/api/controllers/role.js.html +1 -1
  22. package/coverage/lcov-report/api/controllers/routing.js.html +1 -1
  23. package/coverage/lcov-report/api/controllers/row/external.js.html +1 -1
  24. package/coverage/lcov-report/api/controllers/row/index.html +1 -1
  25. package/coverage/lcov-report/api/controllers/row/internal.js.html +1 -1
  26. package/coverage/lcov-report/api/controllers/row/internalSearch.js.html +1 -1
  27. package/coverage/lcov-report/api/controllers/row/staticFormula.js.html +1 -1
  28. package/coverage/lcov-report/api/controllers/row/utils.js.html +1 -1
  29. package/coverage/lcov-report/api/controllers/screen.js.html +1 -1
  30. package/coverage/lcov-report/api/controllers/script.js.html +1 -1
  31. package/coverage/lcov-report/api/controllers/table/bulkFormula.js.html +1 -1
  32. package/coverage/lcov-report/api/controllers/table/external.js.html +1 -1
  33. package/coverage/lcov-report/api/controllers/table/index.html +1 -1
  34. package/coverage/lcov-report/api/controllers/table/index.js.html +1 -1
  35. package/coverage/lcov-report/api/controllers/templates.js.html +1 -1
  36. package/coverage/lcov-report/api/controllers/user.js.html +1 -1
  37. package/coverage/lcov-report/api/controllers/view/exporters.js.html +1 -1
  38. package/coverage/lcov-report/api/controllers/view/index.html +1 -1
  39. package/coverage/lcov-report/api/controllers/view/index.js.html +1 -1
  40. package/coverage/lcov-report/api/controllers/view/utils.js.html +1 -1
  41. package/coverage/lcov-report/api/controllers/view/viewBuilder.js.html +1 -1
  42. package/coverage/lcov-report/api/controllers/webhook.js.html +1 -1
  43. package/coverage/lcov-report/api/index.html +1 -1
  44. package/coverage/lcov-report/api/index.js.html +1 -1
  45. package/coverage/lcov-report/api/routes/analytics.js.html +1 -1
  46. package/coverage/lcov-report/api/routes/apikeys.js.html +1 -1
  47. package/coverage/lcov-report/api/routes/auth.js.html +1 -1
  48. package/coverage/lcov-report/api/routes/automation.js.html +1 -1
  49. package/coverage/lcov-report/api/routes/backup.js.html +1 -1
  50. package/coverage/lcov-report/api/routes/cloud.js.html +1 -1
  51. package/coverage/lcov-report/api/routes/component.js.html +1 -1
  52. package/coverage/lcov-report/api/routes/datasource.js.html +1 -1
  53. package/coverage/lcov-report/api/routes/deploy.js.html +1 -1
  54. package/coverage/lcov-report/api/routes/dev.js.html +1 -1
  55. package/coverage/lcov-report/api/routes/index.html +1 -1
  56. package/coverage/lcov-report/api/routes/integration.js.html +1 -1
  57. package/coverage/lcov-report/api/routes/layout.js.html +1 -1
  58. package/coverage/lcov-report/api/routes/metadata.js.html +1 -1
  59. package/coverage/lcov-report/api/routes/migrations.js.html +1 -1
  60. package/coverage/lcov-report/api/routes/permission.js.html +1 -1
  61. package/coverage/lcov-report/api/routes/query.js.html +1 -1
  62. package/coverage/lcov-report/api/routes/role.js.html +1 -1
  63. package/coverage/lcov-report/api/routes/routing.js.html +1 -1
  64. package/coverage/lcov-report/api/routes/screen.js.html +1 -1
  65. package/coverage/lcov-report/api/routes/script.js.html +1 -1
  66. package/coverage/lcov-report/api/routes/table.js.html +1 -1
  67. package/coverage/lcov-report/api/routes/templates.js.html +1 -1
  68. package/coverage/lcov-report/api/routes/user.js.html +1 -1
  69. package/coverage/lcov-report/api/routes/utils/index.html +1 -1
  70. package/coverage/lcov-report/api/routes/utils/validators.js.html +1 -1
  71. package/coverage/lcov-report/api/routes/view.js.html +1 -1
  72. package/coverage/lcov-report/api/routes/webhook.js.html +1 -1
  73. package/coverage/lcov-report/automations/actions.js.html +1 -1
  74. package/coverage/lcov-report/automations/automationUtils.js.html +1 -1
  75. package/coverage/lcov-report/automations/bullboard.js.html +1 -1
  76. package/coverage/lcov-report/automations/index.html +1 -1
  77. package/coverage/lcov-report/automations/index.js.html +1 -1
  78. package/coverage/lcov-report/automations/steps/bash.js.html +1 -1
  79. package/coverage/lcov-report/automations/steps/delay.js.html +1 -1
  80. package/coverage/lcov-report/automations/steps/discord.js.html +1 -1
  81. package/coverage/lcov-report/automations/steps/executeQuery.js.html +1 -1
  82. package/coverage/lcov-report/automations/steps/executeScript.js.html +1 -1
  83. package/coverage/lcov-report/automations/steps/filter.js.html +1 -1
  84. package/coverage/lcov-report/automations/steps/index.html +1 -1
  85. package/coverage/lcov-report/automations/steps/integromat.js.html +1 -1
  86. package/coverage/lcov-report/automations/steps/loop.js.html +1 -1
  87. package/coverage/lcov-report/automations/steps/outgoingWebhook.js.html +1 -1
  88. package/coverage/lcov-report/automations/steps/queryRows.js.html +1 -1
  89. package/coverage/lcov-report/automations/steps/sendSmtpEmail.js.html +1 -1
  90. package/coverage/lcov-report/automations/steps/serverLog.js.html +1 -1
  91. package/coverage/lcov-report/automations/steps/slack.js.html +1 -1
  92. package/coverage/lcov-report/automations/steps/updateRow.js.html +1 -1
  93. package/coverage/lcov-report/automations/steps/utils.js.html +1 -1
  94. package/coverage/lcov-report/automations/steps/zapier.js.html +1 -1
  95. package/coverage/lcov-report/automations/triggerInfo/app.js.html +1 -1
  96. package/coverage/lcov-report/automations/triggerInfo/cron.js.html +1 -1
  97. package/coverage/lcov-report/automations/triggerInfo/index.html +1 -1
  98. package/coverage/lcov-report/automations/triggerInfo/index.js.html +1 -1
  99. package/coverage/lcov-report/automations/triggerInfo/rowDeleted.js.html +1 -1
  100. package/coverage/lcov-report/automations/triggerInfo/rowSaved.js.html +1 -1
  101. package/coverage/lcov-report/automations/triggerInfo/rowUpdated.js.html +1 -1
  102. package/coverage/lcov-report/automations/triggerInfo/webhook.js.html +1 -1
  103. package/coverage/lcov-report/automations/triggers.js.html +1 -1
  104. package/coverage/lcov-report/constants/index.html +1 -1
  105. package/coverage/lcov-report/constants/index.js.html +1 -1
  106. package/coverage/lcov-report/constants/layouts.js.html +1 -1
  107. package/coverage/lcov-report/constants/screens.js.html +1 -1
  108. package/coverage/lcov-report/db/inMemoryView.js.html +1 -1
  109. package/coverage/lcov-report/db/index.html +1 -1
  110. package/coverage/lcov-report/db/index.js.html +1 -1
  111. package/coverage/lcov-report/db/linkedRows/LinkController.js.html +1 -1
  112. package/coverage/lcov-report/db/linkedRows/index.html +1 -1
  113. package/coverage/lcov-report/db/linkedRows/index.js.html +1 -1
  114. package/coverage/lcov-report/db/linkedRows/linkUtils.js.html +1 -1
  115. package/coverage/lcov-report/db/newid.js.html +1 -1
  116. package/coverage/lcov-report/db/utils.js.html +1 -1
  117. package/coverage/lcov-report/events/AutomationEmitter.js.html +1 -1
  118. package/coverage/lcov-report/events/index.html +1 -1
  119. package/coverage/lcov-report/events/index.js.html +1 -1
  120. package/coverage/lcov-report/events/utils.js.html +1 -1
  121. package/coverage/lcov-report/index.html +14 -14
  122. package/coverage/lcov-report/integrations/tests/TestConfiguration.js.html +1 -1
  123. package/coverage/lcov-report/integrations/tests/index.html +1 -1
  124. package/coverage/lcov-report/middleware/appInfo.js.html +1 -1
  125. package/coverage/lcov-report/middleware/builder.js.html +1 -1
  126. package/coverage/lcov-report/middleware/currentapp.js.html +1 -1
  127. package/coverage/lcov-report/middleware/index.html +1 -1
  128. package/coverage/lcov-report/middleware/joi-validator.js.html +1 -1
  129. package/coverage/lcov-report/middleware/publicApi.js.html +1 -1
  130. package/coverage/lcov-report/middleware/resourceId.js.html +1 -1
  131. package/coverage/lcov-report/middleware/selfhost.js.html +1 -1
  132. package/coverage/lcov-report/middleware/utils.js.html +1 -1
  133. package/coverage/lcov-report/utilities/budibaseDir.js.html +1 -1
  134. package/coverage/lcov-report/utilities/centralPath.js.html +1 -1
  135. package/coverage/lcov-report/utilities/csvParser.js.html +1 -1
  136. package/coverage/lcov-report/utilities/global.js.html +1 -1
  137. package/coverage/lcov-report/utilities/index.html +15 -15
  138. package/coverage/lcov-report/utilities/index.js.html +1 -1
  139. package/coverage/lcov-report/utilities/queue/inMemoryQueue.js.html +1 -1
  140. package/coverage/lcov-report/utilities/queue/index.html +1 -1
  141. package/coverage/lcov-report/utilities/routing/index.html +1 -1
  142. package/coverage/lcov-report/utilities/routing/index.js.html +1 -1
  143. package/coverage/lcov-report/utilities/rowProcessor/index.html +1 -1
  144. package/coverage/lcov-report/utilities/rowProcessor/index.js.html +1 -1
  145. package/coverage/lcov-report/utilities/rowProcessor/utils.js.html +1 -1
  146. package/coverage/lcov-report/utilities/scriptRunner.js.html +1 -1
  147. package/coverage/lcov-report/utilities/security.js.html +1 -1
  148. package/coverage/lcov-report/utilities/statusCodes.js.html +1 -1
  149. package/coverage/lcov-report/utilities/usageQuota/index.html +1 -1
  150. package/coverage/lcov-report/utilities/usageQuota/rows.js.html +1 -1
  151. package/coverage/lcov-report/utilities/usageQuota/usageQuoteReset.js.html +1 -1
  152. package/coverage/lcov-report/utilities/users.js.html +1 -1
  153. package/coverage/lcov-report/utilities/workerRequests.js.html +32 -8
  154. package/coverage/lcov.info +8 -3
  155. package/dist/api/routes/public/rows.js +1 -82
  156. package/dist/app.js +5 -1
  157. package/dist/package.json +6 -6
  158. package/dist/tsconfig.build.tsbuildinfo +1 -1
  159. package/dist/utilities/workerRequests.js +4 -0
  160. package/package.json +7 -7
  161. package/specs/openapi.json +112 -109
  162. package/specs/openapi.yaml +93 -91
  163. package/specs/resources/misc.js +116 -0
  164. package/src/api/controllers/public/mapping/types.ts +8 -0
  165. package/src/api/routes/public/rows.ts +1 -82
  166. package/src/app.ts +11 -2
  167. package/src/definitions/openapi.ts +53 -52
  168. package/src/utilities/workerRequests.js +8 -0
@@ -128,3 +128,7 @@ exports.getChecklist = () => __awaiter(void 0, void 0, void 0, function* () {
128
128
  const response = yield fetch(checkSlashesInUrl(env.WORKER_URL + "/api/global/configs/checklist"), request(null, { method: "GET" }));
129
129
  return checkResponse(response, "get checklist");
130
130
  });
131
+ exports.generateApiKey = (userId) => __awaiter(void 0, void 0, void 0, function* () {
132
+ const response = yield fetch(checkSlashesInUrl(env.WORKER_URL + "/api/global/self/api_key"), request(null, { method: "POST", body: { userId } }));
133
+ return checkResponse(response, "generate API key");
134
+ });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@budibase/server",
3
3
  "email": "hi@budibase.com",
4
- "version": "1.3.19-alpha.3",
4
+ "version": "1.3.19-alpha.4",
5
5
  "description": "Budibase Web Server",
6
6
  "main": "src/index.ts",
7
7
  "repository": {
@@ -77,11 +77,11 @@
77
77
  "license": "GPL-3.0",
78
78
  "dependencies": {
79
79
  "@apidevtools/swagger-parser": "10.0.3",
80
- "@budibase/backend-core": "1.3.19-alpha.3",
81
- "@budibase/client": "1.3.19-alpha.3",
82
- "@budibase/pro": "1.3.19-alpha.2",
83
- "@budibase/string-templates": "1.3.19-alpha.3",
84
- "@budibase/types": "1.3.19-alpha.3",
80
+ "@budibase/backend-core": "1.3.19-alpha.4",
81
+ "@budibase/client": "1.3.19-alpha.4",
82
+ "@budibase/pro": "1.3.19-alpha.3",
83
+ "@budibase/string-templates": "1.3.19-alpha.4",
84
+ "@budibase/types": "1.3.19-alpha.4",
85
85
  "@bull-board/api": "3.7.0",
86
86
  "@bull-board/koa": "3.9.4",
87
87
  "@elastic/elasticsearch": "7.10.0",
@@ -199,5 +199,5 @@
199
199
  "optionalDependencies": {
200
200
  "oracledb": "5.3.0"
201
201
  },
202
- "gitHead": "70ca5eab5924a14ae6558924706bfa970269944a"
202
+ "gitHead": "298b2b17d1d07adf98c7e9d034ae92276b84b3ed"
203
203
  }
@@ -1659,6 +1659,117 @@
1659
1659
  "data"
1660
1660
  ]
1661
1661
  },
1662
+ "rowSearch": {
1663
+ "type": "object",
1664
+ "properties": {
1665
+ "query": {
1666
+ "type": "object",
1667
+ "properties": {
1668
+ "allOr": {
1669
+ "type": "boolean",
1670
+ "description": "Specifies that a row should be returned if it satisfies any of the specified options, rather than requiring it to fulfill all the search parameters. This defaults to false, meaning AND logic will be used."
1671
+ },
1672
+ "string": {
1673
+ "type": "object",
1674
+ "example": {
1675
+ "columnName1": "value",
1676
+ "columnName2": "value"
1677
+ },
1678
+ "description": "A map of field name to the string to search for, this will look for rows that have a value starting with the string value.",
1679
+ "additionalProperties": {
1680
+ "type": "string",
1681
+ "description": "The value to search for in the column."
1682
+ }
1683
+ },
1684
+ "fuzzy": {
1685
+ "type": "object",
1686
+ "description": "A fuzzy search, only supported by internal tables."
1687
+ },
1688
+ "range": {
1689
+ "type": "object",
1690
+ "description": "Searches within a range, the format of this must be in the format of an object with a \"low\" and \"high\" property.",
1691
+ "example": {
1692
+ "columnName1": {
1693
+ "low": 10,
1694
+ "high": 20
1695
+ }
1696
+ }
1697
+ },
1698
+ "equal": {
1699
+ "type": "object",
1700
+ "description": "Searches for rows that have a column value that is exactly the value set."
1701
+ },
1702
+ "notEqual": {
1703
+ "type": "object",
1704
+ "description": "Searches for any row which does not contain the specified column value."
1705
+ },
1706
+ "empty": {
1707
+ "type": "object",
1708
+ "description": "Searches for rows which do not contain the specified column. The object should simply contain keys of the column names, these can map to any value.",
1709
+ "example": {
1710
+ "columnName1": ""
1711
+ }
1712
+ },
1713
+ "notEmpty": {
1714
+ "type": "object",
1715
+ "description": "Searches for rows which have the specified column."
1716
+ },
1717
+ "oneOf": {
1718
+ "type": "object",
1719
+ "description": "Searches for rows which have a column value that is any of the specified values. The format of this must be columnName -> [value1, value2]."
1720
+ }
1721
+ }
1722
+ },
1723
+ "paginate": {
1724
+ "type": "boolean",
1725
+ "description": "Enables pagination, by default this is disabled."
1726
+ },
1727
+ "bookmark": {
1728
+ "oneOf": [
1729
+ {
1730
+ "type": "string"
1731
+ },
1732
+ {
1733
+ "type": "integer"
1734
+ }
1735
+ ],
1736
+ "description": "If retrieving another page, the bookmark from the previous request must be supplied."
1737
+ },
1738
+ "limit": {
1739
+ "type": "integer",
1740
+ "description": "The maximum number of rows to return, useful when paginating, for internal tables this will be limited to 1000, for SQL tables it will be 5000."
1741
+ },
1742
+ "sort": {
1743
+ "type": "object",
1744
+ "description": "A set of parameters describing the sort behaviour of the search.",
1745
+ "properties": {
1746
+ "order": {
1747
+ "type": "string",
1748
+ "enum": [
1749
+ "ascending",
1750
+ "descending"
1751
+ ],
1752
+ "description": "The order of the sort, by default this is ascending."
1753
+ },
1754
+ "column": {
1755
+ "type": "string",
1756
+ "description": "The name of the column by which the rows will be sorted."
1757
+ },
1758
+ "type": {
1759
+ "type": "string",
1760
+ "enum": [
1761
+ "string",
1762
+ "number"
1763
+ ],
1764
+ "description": "Defines whether the column should be treated as a string or as numbers when sorting."
1765
+ }
1766
+ }
1767
+ }
1768
+ },
1769
+ "required": [
1770
+ "query"
1771
+ ]
1772
+ },
1662
1773
  "nameSearch": {
1663
1774
  "type": "object",
1664
1775
  "properties": {
@@ -2129,115 +2240,7 @@
2129
2240
  "content": {
2130
2241
  "application/json": {
2131
2242
  "schema": {
2132
- "type": "object",
2133
- "required": [
2134
- "query"
2135
- ],
2136
- "properties": {
2137
- "query": {
2138
- "type": "object",
2139
- "properties": {
2140
- "allOr": {
2141
- "type": "boolean",
2142
- "description": "Specifies that a row should be returned if it satisfies any of the specified options, rather than requiring it to fulfill all the search parameters. This defaults to false, meaning AND logic will be used."
2143
- },
2144
- "string": {
2145
- "type": "object",
2146
- "example": {
2147
- "columnName1": "value",
2148
- "columnName2": "value"
2149
- },
2150
- "description": "A map of field name to the string to search for, this will look for rows that have a value starting with the string value.",
2151
- "additionalProperties": {
2152
- "type": "string",
2153
- "description": "The value to search for in the column."
2154
- }
2155
- },
2156
- "fuzzy": {
2157
- "type": "object",
2158
- "description": "A fuzzy search, only supported by internal tables."
2159
- },
2160
- "range": {
2161
- "type": "object",
2162
- "description": "Searches within a range, the format of this must be in the format of an object with a \"low\" and \"high\" property.",
2163
- "example": {
2164
- "columnName1": {
2165
- "low": 10,
2166
- "high": 20
2167
- }
2168
- }
2169
- },
2170
- "equal": {
2171
- "type": "object",
2172
- "description": "Searches for rows that have a column value that is exactly the value set."
2173
- },
2174
- "notEqual": {
2175
- "type": "object",
2176
- "description": "Searches for any row which does not contain the specified column value."
2177
- },
2178
- "empty": {
2179
- "type": "object",
2180
- "description": "Searches for rows which do not contain the specified column. The object should simply contain keys of the column names, these can map to any value.",
2181
- "example": {
2182
- "columnName1": ""
2183
- }
2184
- },
2185
- "notEmpty": {
2186
- "type": "object",
2187
- "description": "Searches for rows which have the specified column."
2188
- },
2189
- "oneOf": {
2190
- "type": "object",
2191
- "description": "Searches for rows which have a column value that is any of the specified values. The format of this must be columnName -> [value1, value2]."
2192
- }
2193
- }
2194
- },
2195
- "paginate": {
2196
- "type": "boolean",
2197
- "description": "Enables pagination, by default this is disabled."
2198
- },
2199
- "bookmark": {
2200
- "oneOf": [
2201
- {
2202
- "type": "string"
2203
- },
2204
- {
2205
- "type": "integer"
2206
- }
2207
- ],
2208
- "description": "If retrieving another page, the bookmark from the previous request must be supplied."
2209
- },
2210
- "limit": {
2211
- "type": "integer",
2212
- "description": "The maximum number of rows to return, useful when paginating, for internal tables this will be limited to 1000, for SQL tables it will be 5000."
2213
- },
2214
- "sort": {
2215
- "type": "object",
2216
- "description": "A set of parameters describing the sort behaviour of the search.",
2217
- "properties": {
2218
- "order": {
2219
- "type": "string",
2220
- "enum": [
2221
- "ascending",
2222
- "descending"
2223
- ],
2224
- "description": "The order of the sort, by default this is ascending."
2225
- },
2226
- "column": {
2227
- "type": "string",
2228
- "description": "The name of the column by which the rows will be sorted."
2229
- },
2230
- "type": {
2231
- "type": "string",
2232
- "enum": [
2233
- "string",
2234
- "number"
2235
- ],
2236
- "description": "Defines whether the column should be treated as a string or as numbers when sorting."
2237
- }
2238
- }
2239
- }
2240
- }
2243
+ "$ref": "#/components/schemas/rowSearch"
2241
2244
  }
2242
2245
  }
2243
2246
  }
@@ -1264,6 +1264,98 @@ components:
1264
1264
  - _id
1265
1265
  required:
1266
1266
  - data
1267
+ rowSearch:
1268
+ type: object
1269
+ properties:
1270
+ query:
1271
+ type: object
1272
+ properties:
1273
+ allOr:
1274
+ type: boolean
1275
+ description: Specifies that a row should be returned if it satisfies any of the
1276
+ specified options, rather than requiring it to fulfill all the
1277
+ search parameters. This defaults to false, meaning AND logic
1278
+ will be used.
1279
+ string:
1280
+ type: object
1281
+ example:
1282
+ columnName1: value
1283
+ columnName2: value
1284
+ description: A map of field name to the string to search for, this will look for
1285
+ rows that have a value starting with the string value.
1286
+ additionalProperties:
1287
+ type: string
1288
+ description: The value to search for in the column.
1289
+ fuzzy:
1290
+ type: object
1291
+ description: A fuzzy search, only supported by internal tables.
1292
+ range:
1293
+ type: object
1294
+ description: Searches within a range, the format of this must be in the format
1295
+ of an object with a "low" and "high" property.
1296
+ example:
1297
+ columnName1:
1298
+ low: 10
1299
+ high: 20
1300
+ equal:
1301
+ type: object
1302
+ description: Searches for rows that have a column value that is exactly the
1303
+ value set.
1304
+ notEqual:
1305
+ type: object
1306
+ description: Searches for any row which does not contain the specified column
1307
+ value.
1308
+ empty:
1309
+ type: object
1310
+ description: Searches for rows which do not contain the specified column. The
1311
+ object should simply contain keys of the column names, these can
1312
+ map to any value.
1313
+ example:
1314
+ columnName1: ""
1315
+ notEmpty:
1316
+ type: object
1317
+ description: Searches for rows which have the specified column.
1318
+ oneOf:
1319
+ type: object
1320
+ description: Searches for rows which have a column value that is any of the
1321
+ specified values. The format of this must be columnName ->
1322
+ [value1, value2].
1323
+ paginate:
1324
+ type: boolean
1325
+ description: Enables pagination, by default this is disabled.
1326
+ bookmark:
1327
+ oneOf:
1328
+ - type: string
1329
+ - type: integer
1330
+ description: If retrieving another page, the bookmark from the previous request
1331
+ must be supplied.
1332
+ limit:
1333
+ type: integer
1334
+ description: The maximum number of rows to return, useful when paginating, for
1335
+ internal tables this will be limited to 1000, for SQL tables it will
1336
+ be 5000.
1337
+ sort:
1338
+ type: object
1339
+ description: A set of parameters describing the sort behaviour of the search.
1340
+ properties:
1341
+ order:
1342
+ type: string
1343
+ enum:
1344
+ - ascending
1345
+ - descending
1346
+ description: The order of the sort, by default this is ascending.
1347
+ column:
1348
+ type: string
1349
+ description: The name of the column by which the rows will be sorted.
1350
+ type:
1351
+ type: string
1352
+ enum:
1353
+ - string
1354
+ - number
1355
+ description: Defines whether the column should be treated as a string or as
1356
+ numbers when sorting.
1357
+ required:
1358
+ - query
1267
1359
  nameSearch:
1268
1360
  type: object
1269
1361
  properties:
@@ -1544,97 +1636,7 @@ paths:
1544
1636
  content:
1545
1637
  application/json:
1546
1638
  schema:
1547
- type: object
1548
- required:
1549
- - query
1550
- properties:
1551
- query:
1552
- type: object
1553
- properties:
1554
- allOr:
1555
- type: boolean
1556
- description: Specifies that a row should be returned if it satisfies any of the
1557
- specified options, rather than requiring it to fulfill
1558
- all the search parameters. This defaults to false,
1559
- meaning AND logic will be used.
1560
- string:
1561
- type: object
1562
- example:
1563
- columnName1: value
1564
- columnName2: value
1565
- description: A map of field name to the string to search for, this will look for
1566
- rows that have a value starting with the string value.
1567
- additionalProperties:
1568
- type: string
1569
- description: The value to search for in the column.
1570
- fuzzy:
1571
- type: object
1572
- description: A fuzzy search, only supported by internal tables.
1573
- range:
1574
- type: object
1575
- description: Searches within a range, the format of this must be in the format
1576
- of an object with a "low" and "high" property.
1577
- example:
1578
- columnName1:
1579
- low: 10
1580
- high: 20
1581
- equal:
1582
- type: object
1583
- description: Searches for rows that have a column value that is exactly the
1584
- value set.
1585
- notEqual:
1586
- type: object
1587
- description: Searches for any row which does not contain the specified column
1588
- value.
1589
- empty:
1590
- type: object
1591
- description: Searches for rows which do not contain the specified column. The
1592
- object should simply contain keys of the column names,
1593
- these can map to any value.
1594
- example:
1595
- columnName1: ""
1596
- notEmpty:
1597
- type: object
1598
- description: Searches for rows which have the specified column.
1599
- oneOf:
1600
- type: object
1601
- description: Searches for rows which have a column value that is any of the
1602
- specified values. The format of this must be columnName
1603
- -> [value1, value2].
1604
- paginate:
1605
- type: boolean
1606
- description: Enables pagination, by default this is disabled.
1607
- bookmark:
1608
- oneOf:
1609
- - type: string
1610
- - type: integer
1611
- description: If retrieving another page, the bookmark from the previous request
1612
- must be supplied.
1613
- limit:
1614
- type: integer
1615
- description: The maximum number of rows to return, useful when paginating, for
1616
- internal tables this will be limited to 1000, for SQL tables
1617
- it will be 5000.
1618
- sort:
1619
- type: object
1620
- description: A set of parameters describing the sort behaviour of the search.
1621
- properties:
1622
- order:
1623
- type: string
1624
- enum:
1625
- - ascending
1626
- - descending
1627
- description: The order of the sort, by default this is ascending.
1628
- column:
1629
- type: string
1630
- description: The name of the column by which the rows will be sorted.
1631
- type:
1632
- type: string
1633
- enum:
1634
- - string
1635
- - number
1636
- description: Defines whether the column should be treated as a string or as
1637
- numbers when sorting.
1639
+ $ref: "#/components/schemas/rowSearch"
1638
1640
  responses:
1639
1641
  "200":
1640
1642
  description: The response will contain an array of rows that match the search
@@ -2,6 +2,122 @@ const { object } = require("./utils")
2
2
  const Resource = require("./utils/Resource")
3
3
 
4
4
  module.exports = new Resource().setSchemas({
5
+ rowSearch: object(
6
+ {
7
+ query: {
8
+ type: "object",
9
+ properties: {
10
+ allOr: {
11
+ type: "boolean",
12
+ description:
13
+ "Specifies that a row should be returned if it satisfies any of the specified options, rather than requiring it to fulfill all the search parameters. This defaults to false, meaning AND logic will be used.",
14
+ },
15
+ string: {
16
+ type: "object",
17
+ example: {
18
+ columnName1: "value",
19
+ columnName2: "value",
20
+ },
21
+ description:
22
+ "A map of field name to the string to search for, this will look for rows that have a value starting with the string value.",
23
+ additionalProperties: {
24
+ type: "string",
25
+ description: "The value to search for in the column.",
26
+ },
27
+ },
28
+ fuzzy: {
29
+ type: "object",
30
+ description: "A fuzzy search, only supported by internal tables.",
31
+ },
32
+ range: {
33
+ type: "object",
34
+ description:
35
+ 'Searches within a range, the format of this must be in the format of an object with a "low" and "high" property.',
36
+ example: {
37
+ columnName1: {
38
+ low: 10,
39
+ high: 20,
40
+ },
41
+ },
42
+ },
43
+ equal: {
44
+ type: "object",
45
+ description:
46
+ "Searches for rows that have a column value that is exactly the value set.",
47
+ },
48
+ notEqual: {
49
+ type: "object",
50
+ description:
51
+ "Searches for any row which does not contain the specified column value.",
52
+ },
53
+ empty: {
54
+ type: "object",
55
+ description:
56
+ "Searches for rows which do not contain the specified column. The object should simply contain keys of the column names, these can map to any value.",
57
+ example: {
58
+ columnName1: "",
59
+ },
60
+ },
61
+ notEmpty: {
62
+ type: "object",
63
+ description: "Searches for rows which have the specified column.",
64
+ },
65
+ oneOf: {
66
+ type: "object",
67
+ description:
68
+ "Searches for rows which have a column value that is any of the specified values. The format of this must be columnName -> [value1, value2].",
69
+ },
70
+ },
71
+ },
72
+ paginate: {
73
+ type: "boolean",
74
+ description: "Enables pagination, by default this is disabled.",
75
+ },
76
+ bookmark: {
77
+ oneOf: [
78
+ {
79
+ type: "string",
80
+ },
81
+ {
82
+ type: "integer",
83
+ },
84
+ ],
85
+ description:
86
+ "If retrieving another page, the bookmark from the previous request must be supplied.",
87
+ },
88
+ limit: {
89
+ type: "integer",
90
+ description:
91
+ "The maximum number of rows to return, useful when paginating, for internal tables this will be limited to 1000, for SQL tables it will be 5000.",
92
+ },
93
+ sort: {
94
+ type: "object",
95
+ description:
96
+ "A set of parameters describing the sort behaviour of the search.",
97
+ properties: {
98
+ order: {
99
+ type: "string",
100
+ enum: ["ascending", "descending"],
101
+ description: "The order of the sort, by default this is ascending.",
102
+ },
103
+ column: {
104
+ type: "string",
105
+ description:
106
+ "The name of the column by which the rows will be sorted.",
107
+ },
108
+ type: {
109
+ type: "string",
110
+ enum: ["string", "number"],
111
+ description:
112
+ "Defines whether the column should be treated as a string or as numbers when sorting.",
113
+ },
114
+ },
115
+ },
116
+ },
117
+ {
118
+ required: ["query"],
119
+ }
120
+ ),
5
121
  nameSearch: object({
6
122
  name: {
7
123
  type: "string",
@@ -4,10 +4,18 @@ export type Query = components["schemas"]["query"]
4
4
  export type ExecuteQuery = components["schemas"]["executeQueryOutput"]
5
5
 
6
6
  export type Application = components["schemas"]["applicationOutput"]["data"]
7
+ export type CreateApplicationParams = components["schemas"]["application"]
7
8
 
8
9
  export type Table = components["schemas"]["tableOutput"]["data"]
10
+ export type CreateTableParams = components["schemas"]["table"]
9
11
 
10
12
  export type Row = components["schemas"]["rowOutput"]["data"]
11
13
  export type RowSearch = components["schemas"]["searchOutput"]
14
+ export type CreateRowParams = components["schemas"]["row"]
12
15
 
13
16
  export type User = components["schemas"]["userOutput"]["data"]
17
+ export type CreateUserParams = components["schemas"]["user"]
18
+
19
+ export type SearchInputParams =
20
+ | components["schemas"]["nameSearch"]
21
+ | components["schemas"]["rowSearch"]