@budibase/server 1.0.81 → 1.0.84-alpha.0

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 (201) hide show
  1. package/builder/assets/{index.f89561ac.js → index.0297e6da.js} +140 -139
  2. package/builder/assets/{index.dd19c61c.css → index.7c8961b4.css} +2 -2
  3. package/builder/index.html +2 -2
  4. package/coverage/clover.xml +10 -5
  5. package/coverage/coverage-final.json +2 -2
  6. package/coverage/lcov-report/api/controllers/analytics.js.html +1 -1
  7. package/coverage/lcov-report/api/controllers/apikeys.js.html +1 -1
  8. package/coverage/lcov-report/api/controllers/application.js.html +1 -1
  9. package/coverage/lcov-report/api/controllers/auth.js.html +1 -1
  10. package/coverage/lcov-report/api/controllers/automation.js.html +1 -1
  11. package/coverage/lcov-report/api/controllers/backup.js.html +1 -1
  12. package/coverage/lcov-report/api/controllers/cloud.js.html +1 -1
  13. package/coverage/lcov-report/api/controllers/component.js.html +1 -1
  14. package/coverage/lcov-report/api/controllers/datasource.js.html +1 -1
  15. package/coverage/lcov-report/api/controllers/dev.js.html +1 -1
  16. package/coverage/lcov-report/api/controllers/index.html +1 -1
  17. package/coverage/lcov-report/api/controllers/integration.js.html +1 -1
  18. package/coverage/lcov-report/api/controllers/layout.js.html +1 -1
  19. package/coverage/lcov-report/api/controllers/metadata.js.html +1 -1
  20. package/coverage/lcov-report/api/controllers/migrations.js.html +1 -1
  21. package/coverage/lcov-report/api/controllers/permission.js.html +1 -1
  22. package/coverage/lcov-report/api/controllers/query/index.html +1 -1
  23. package/coverage/lcov-report/api/controllers/query/index.js.html +1 -1
  24. package/coverage/lcov-report/api/controllers/query/validation.js.html +1 -1
  25. package/coverage/lcov-report/api/controllers/role.js.html +1 -1
  26. package/coverage/lcov-report/api/controllers/routing.js.html +1 -1
  27. package/coverage/lcov-report/api/controllers/row/external.js.html +5 -5
  28. package/coverage/lcov-report/api/controllers/row/index.html +1 -1
  29. package/coverage/lcov-report/api/controllers/row/index.js.html +1 -1
  30. package/coverage/lcov-report/api/controllers/row/internal.js.html +1 -1
  31. package/coverage/lcov-report/api/controllers/row/internalSearch.js.html +1 -1
  32. package/coverage/lcov-report/api/controllers/row/staticFormula.js.html +1 -1
  33. package/coverage/lcov-report/api/controllers/row/utils.js.html +1 -1
  34. package/coverage/lcov-report/api/controllers/screen.js.html +1 -1
  35. package/coverage/lcov-report/api/controllers/script.js.html +1 -1
  36. package/coverage/lcov-report/api/controllers/table/bulkFormula.js.html +1 -1
  37. package/coverage/lcov-report/api/controllers/table/external.js.html +1 -1
  38. package/coverage/lcov-report/api/controllers/table/index.html +1 -1
  39. package/coverage/lcov-report/api/controllers/table/index.js.html +1 -1
  40. package/coverage/lcov-report/api/controllers/table/internal.js.html +1 -1
  41. package/coverage/lcov-report/api/controllers/table/utils.js.html +1 -1
  42. package/coverage/lcov-report/api/controllers/templates.js.html +1 -1
  43. package/coverage/lcov-report/api/controllers/user.js.html +1 -1
  44. package/coverage/lcov-report/api/controllers/view/exporters.js.html +1 -1
  45. package/coverage/lcov-report/api/controllers/view/index.html +1 -1
  46. package/coverage/lcov-report/api/controllers/view/index.js.html +1 -1
  47. package/coverage/lcov-report/api/controllers/view/utils.js.html +1 -1
  48. package/coverage/lcov-report/api/controllers/view/viewBuilder.js.html +1 -1
  49. package/coverage/lcov-report/api/controllers/webhook.js.html +1 -1
  50. package/coverage/lcov-report/api/index.html +1 -1
  51. package/coverage/lcov-report/api/index.js.html +1 -1
  52. package/coverage/lcov-report/api/routes/analytics.js.html +1 -1
  53. package/coverage/lcov-report/api/routes/apikeys.js.html +1 -1
  54. package/coverage/lcov-report/api/routes/application.js.html +1 -1
  55. package/coverage/lcov-report/api/routes/auth.js.html +1 -1
  56. package/coverage/lcov-report/api/routes/automation.js.html +1 -1
  57. package/coverage/lcov-report/api/routes/backup.js.html +1 -1
  58. package/coverage/lcov-report/api/routes/cloud.js.html +1 -1
  59. package/coverage/lcov-report/api/routes/component.js.html +1 -1
  60. package/coverage/lcov-report/api/routes/datasource.js.html +1 -1
  61. package/coverage/lcov-report/api/routes/deploy.js.html +1 -1
  62. package/coverage/lcov-report/api/routes/dev.js.html +1 -1
  63. package/coverage/lcov-report/api/routes/index.html +1 -1
  64. package/coverage/lcov-report/api/routes/index.js.html +1 -1
  65. package/coverage/lcov-report/api/routes/integration.js.html +1 -1
  66. package/coverage/lcov-report/api/routes/layout.js.html +1 -1
  67. package/coverage/lcov-report/api/routes/metadata.js.html +1 -1
  68. package/coverage/lcov-report/api/routes/migrations.js.html +1 -1
  69. package/coverage/lcov-report/api/routes/permission.js.html +1 -1
  70. package/coverage/lcov-report/api/routes/query.js.html +1 -1
  71. package/coverage/lcov-report/api/routes/role.js.html +1 -1
  72. package/coverage/lcov-report/api/routes/routing.js.html +1 -1
  73. package/coverage/lcov-report/api/routes/row.js.html +1 -1
  74. package/coverage/lcov-report/api/routes/screen.js.html +1 -1
  75. package/coverage/lcov-report/api/routes/script.js.html +1 -1
  76. package/coverage/lcov-report/api/routes/static.js.html +1 -1
  77. package/coverage/lcov-report/api/routes/table.js.html +1 -1
  78. package/coverage/lcov-report/api/routes/templates.js.html +1 -1
  79. package/coverage/lcov-report/api/routes/user.js.html +1 -1
  80. package/coverage/lcov-report/api/routes/utils/index.html +1 -1
  81. package/coverage/lcov-report/api/routes/utils/validators.js.html +1 -1
  82. package/coverage/lcov-report/api/routes/view.js.html +1 -1
  83. package/coverage/lcov-report/api/routes/webhook.js.html +1 -1
  84. package/coverage/lcov-report/automations/actions.js.html +1 -1
  85. package/coverage/lcov-report/automations/automationUtils.js.html +1 -1
  86. package/coverage/lcov-report/automations/bullboard.js.html +1 -1
  87. package/coverage/lcov-report/automations/index.html +1 -1
  88. package/coverage/lcov-report/automations/index.js.html +1 -1
  89. package/coverage/lcov-report/automations/steps/bash.js.html +1 -1
  90. package/coverage/lcov-report/automations/steps/createRow.js.html +1 -1
  91. package/coverage/lcov-report/automations/steps/delay.js.html +1 -1
  92. package/coverage/lcov-report/automations/steps/deleteRow.js.html +1 -1
  93. package/coverage/lcov-report/automations/steps/discord.js.html +1 -1
  94. package/coverage/lcov-report/automations/steps/executeQuery.js.html +1 -1
  95. package/coverage/lcov-report/automations/steps/executeScript.js.html +1 -1
  96. package/coverage/lcov-report/automations/steps/filter.js.html +1 -1
  97. package/coverage/lcov-report/automations/steps/index.html +1 -1
  98. package/coverage/lcov-report/automations/steps/integromat.js.html +1 -1
  99. package/coverage/lcov-report/automations/steps/outgoingWebhook.js.html +1 -1
  100. package/coverage/lcov-report/automations/steps/queryRows.js.html +1 -1
  101. package/coverage/lcov-report/automations/steps/sendSmtpEmail.js.html +1 -1
  102. package/coverage/lcov-report/automations/steps/serverLog.js.html +1 -1
  103. package/coverage/lcov-report/automations/steps/slack.js.html +1 -1
  104. package/coverage/lcov-report/automations/steps/updateRow.js.html +1 -1
  105. package/coverage/lcov-report/automations/steps/utils.js.html +1 -1
  106. package/coverage/lcov-report/automations/steps/zapier.js.html +1 -1
  107. package/coverage/lcov-report/automations/triggerInfo/app.js.html +1 -1
  108. package/coverage/lcov-report/automations/triggerInfo/cron.js.html +1 -1
  109. package/coverage/lcov-report/automations/triggerInfo/index.html +1 -1
  110. package/coverage/lcov-report/automations/triggerInfo/index.js.html +1 -1
  111. package/coverage/lcov-report/automations/triggerInfo/rowDeleted.js.html +1 -1
  112. package/coverage/lcov-report/automations/triggerInfo/rowSaved.js.html +1 -1
  113. package/coverage/lcov-report/automations/triggerInfo/rowUpdated.js.html +1 -1
  114. package/coverage/lcov-report/automations/triggerInfo/webhook.js.html +1 -1
  115. package/coverage/lcov-report/automations/triggers.js.html +1 -1
  116. package/coverage/lcov-report/automations/utils.js.html +1 -1
  117. package/coverage/lcov-report/constants/index.html +1 -1
  118. package/coverage/lcov-report/constants/index.js.html +1 -1
  119. package/coverage/lcov-report/constants/layouts.js.html +1 -1
  120. package/coverage/lcov-report/constants/screens.js.html +1 -1
  121. package/coverage/lcov-report/db/client.js.html +1 -1
  122. package/coverage/lcov-report/db/inMemoryView.js.html +1 -1
  123. package/coverage/lcov-report/db/index.html +1 -1
  124. package/coverage/lcov-report/db/index.js.html +1 -1
  125. package/coverage/lcov-report/db/linkedRows/LinkController.js.html +1 -1
  126. package/coverage/lcov-report/db/linkedRows/index.html +1 -1
  127. package/coverage/lcov-report/db/linkedRows/index.js.html +1 -1
  128. package/coverage/lcov-report/db/linkedRows/linkUtils.js.html +1 -1
  129. package/coverage/lcov-report/db/newid.js.html +1 -1
  130. package/coverage/lcov-report/db/utils.js.html +1 -1
  131. package/coverage/lcov-report/events/AutomationEmitter.js.html +1 -1
  132. package/coverage/lcov-report/events/index.html +1 -1
  133. package/coverage/lcov-report/events/index.js.html +1 -1
  134. package/coverage/lcov-report/events/utils.js.html +1 -1
  135. package/coverage/lcov-report/index.html +18 -18
  136. package/coverage/lcov-report/integrations/tests/TestConfiguration.js.html +1 -1
  137. package/coverage/lcov-report/integrations/tests/index.html +1 -1
  138. package/coverage/lcov-report/middleware/appInfo.js.html +1 -1
  139. package/coverage/lcov-report/middleware/authorized.js.html +1 -1
  140. package/coverage/lcov-report/middleware/builder.js.html +1 -1
  141. package/coverage/lcov-report/middleware/currentapp.js.html +1 -1
  142. package/coverage/lcov-report/middleware/index.html +1 -1
  143. package/coverage/lcov-report/middleware/joi-validator.js.html +1 -1
  144. package/coverage/lcov-report/middleware/resourceId.js.html +1 -1
  145. package/coverage/lcov-report/middleware/selfhost.js.html +1 -1
  146. package/coverage/lcov-report/middleware/usageQuota.js.html +1 -1
  147. package/coverage/lcov-report/middleware/utils.js.html +1 -1
  148. package/coverage/lcov-report/threads/automation.js.html +1 -1
  149. package/coverage/lcov-report/threads/index.html +1 -1
  150. package/coverage/lcov-report/threads/index.js.html +1 -1
  151. package/coverage/lcov-report/threads/query.js.html +1 -1
  152. package/coverage/lcov-report/threads/utils.js.html +1 -1
  153. package/coverage/lcov-report/utilities/bcrypt.js.html +1 -1
  154. package/coverage/lcov-report/utilities/budibaseDir.js.html +1 -1
  155. package/coverage/lcov-report/utilities/centralPath.js.html +1 -1
  156. package/coverage/lcov-report/utilities/csvParser.js.html +1 -1
  157. package/coverage/lcov-report/utilities/global.js.html +1 -1
  158. package/coverage/lcov-report/utilities/index.html +18 -18
  159. package/coverage/lcov-report/utilities/index.js.html +34 -10
  160. package/coverage/lcov-report/utilities/queue/inMemoryQueue.js.html +1 -1
  161. package/coverage/lcov-report/utilities/queue/index.html +1 -1
  162. package/coverage/lcov-report/utilities/routing/index.html +1 -1
  163. package/coverage/lcov-report/utilities/routing/index.js.html +1 -1
  164. package/coverage/lcov-report/utilities/rowProcessor/index.html +1 -1
  165. package/coverage/lcov-report/utilities/rowProcessor/index.js.html +1 -1
  166. package/coverage/lcov-report/utilities/rowProcessor/utils.js.html +1 -1
  167. package/coverage/lcov-report/utilities/scriptRunner.js.html +1 -1
  168. package/coverage/lcov-report/utilities/security.js.html +1 -1
  169. package/coverage/lcov-report/utilities/statusCodes.js.html +1 -1
  170. package/coverage/lcov-report/utilities/usageQuota/index.html +1 -1
  171. package/coverage/lcov-report/utilities/usageQuota/index.js.html +1 -1
  172. package/coverage/lcov-report/utilities/usageQuota/rows.js.html +1 -1
  173. package/coverage/lcov-report/utilities/usageQuota/usageQuoteReset.js.html +1 -1
  174. package/coverage/lcov-report/utilities/users.js.html +1 -1
  175. package/coverage/lcov-report/utilities/workerRequests.js.html +1 -1
  176. package/coverage/lcov.info +17 -6
  177. package/dist/api/controllers/public/rows.js +2 -1
  178. package/dist/api/controllers/row/external.js +4 -4
  179. package/dist/api/routes/public/applications.js +1 -10
  180. package/dist/api/routes/public/queries.js +1 -8
  181. package/dist/api/routes/public/tables.js +1 -8
  182. package/dist/api/routes/public/users.js +1 -8
  183. package/dist/package.json +4 -4
  184. package/dist/tsconfig.tsbuildinfo +1 -1
  185. package/dist/utilities/index.js +7 -0
  186. package/package.json +5 -5
  187. package/scripts/docs/toSwagger.js +1 -1
  188. package/specs/openapi.json +430 -55
  189. package/specs/openapi.yaml +337 -35
  190. package/specs/resources/application.js +7 -1
  191. package/specs/resources/query.js +6 -0
  192. package/specs/resources/table.js +6 -0
  193. package/specs/resources/user.js +6 -0
  194. package/src/api/controllers/public/rows.ts +2 -1
  195. package/src/api/controllers/row/external.js +4 -4
  196. package/src/api/routes/public/applications.ts +1 -10
  197. package/src/api/routes/public/queries.ts +1 -8
  198. package/src/api/routes/public/tables.ts +1 -8
  199. package/src/api/routes/public/users.ts +1 -8
  200. package/src/definitions/openapi.ts +591 -415
  201. package/src/utilities/index.js +8 -0
@@ -9,283 +9,273 @@ export interface paths {
9
9
  parameters: {
10
10
  header: {
11
11
  /** The ID of the app which this request is targeting. */
12
- "x-budibase-app-id": components["parameters"]["appId"]
13
- }
14
- }
12
+ "x-budibase-app-id": components["parameters"]["appId"];
13
+ };
14
+ };
15
15
  responses: {
16
16
  /** Returns the created application. */
17
17
  200: {
18
18
  content: {
19
- "application/json": components["schemas"]["applicationOutput"]
20
- }
21
- }
22
- }
19
+ "application/json": components["schemas"]["applicationOutput"];
20
+ };
21
+ };
22
+ };
23
23
  requestBody: {
24
24
  content: {
25
- "application/json": components["schemas"]["application"]
26
- }
27
- }
28
- }
29
- }
25
+ "application/json": components["schemas"]["application"];
26
+ };
27
+ };
28
+ };
29
+ };
30
30
  "/applications/{appId}": {
31
31
  get: {
32
32
  parameters: {
33
33
  path: {
34
34
  /** The ID of the app which this request is targeting. */
35
- appId: components["parameters"]["appIdUrl"]
36
- }
37
- }
35
+ appId: components["parameters"]["appIdUrl"];
36
+ };
37
+ };
38
38
  responses: {
39
39
  /** Returns the retrieved application. */
40
40
  200: {
41
41
  content: {
42
- "application/json": components["schemas"]["applicationOutput"]
43
- }
44
- }
45
- }
46
- }
42
+ "application/json": components["schemas"]["applicationOutput"];
43
+ };
44
+ };
45
+ };
46
+ };
47
47
  put: {
48
48
  parameters: {
49
49
  path: {
50
50
  /** The ID of the app which this request is targeting. */
51
- appId: components["parameters"]["appIdUrl"]
52
- }
53
- }
51
+ appId: components["parameters"]["appIdUrl"];
52
+ };
53
+ };
54
54
  responses: {
55
55
  /** Returns the updated application. */
56
56
  200: {
57
57
  content: {
58
- "application/json": components["schemas"]["applicationOutput"]
59
- }
60
- }
61
- }
58
+ "application/json": components["schemas"]["applicationOutput"];
59
+ };
60
+ };
61
+ };
62
62
  requestBody: {
63
63
  content: {
64
- "application/json": components["schemas"]["application"]
65
- }
66
- }
67
- }
64
+ "application/json": components["schemas"]["application"];
65
+ };
66
+ };
67
+ };
68
68
  delete: {
69
69
  parameters: {
70
70
  path: {
71
71
  /** The ID of the app which this request is targeting. */
72
- appId: components["parameters"]["appIdUrl"]
73
- }
74
- }
72
+ appId: components["parameters"]["appIdUrl"];
73
+ };
74
+ };
75
75
  responses: {
76
76
  /** Returns the deleted application. */
77
77
  200: {
78
78
  content: {
79
- "application/json": components["schemas"]["applicationOutput"]
80
- }
81
- }
82
- }
83
- }
84
- }
79
+ "application/json": components["schemas"]["applicationOutput"];
80
+ };
81
+ };
82
+ };
83
+ };
84
+ };
85
85
  "/applications/search": {
86
86
  /** Based on application properties (currently only name) search for applications. */
87
87
  post: {
88
- parameters: {
89
- header: {
90
- /** The ID of the app which this request is targeting. */
91
- "x-budibase-app-id": components["parameters"]["appId"]
92
- }
93
- }
94
88
  responses: {
95
89
  /** Returns the applications that were found based on the search parameters. */
96
90
  200: {
97
91
  content: {
98
- "application/json": {
99
- data: components["schemas"]["application"][]
100
- }
101
- }
102
- }
103
- }
92
+ "application/json": components["schemas"]["applicationSearch"];
93
+ };
94
+ };
95
+ };
104
96
  requestBody: {
105
97
  content: {
106
- "application/json": components["schemas"]["nameSearch"]
107
- }
108
- }
109
- }
110
- }
98
+ "application/json": components["schemas"]["nameSearch"];
99
+ };
100
+ };
101
+ };
102
+ };
111
103
  "/queries/{queryId}": {
112
104
  /** Queries which have been created within a Budibase app can be executed using this, */
113
105
  post: {
114
106
  parameters: {
115
107
  path: {
116
108
  /** The ID of the query which this request is targeting. */
117
- queryId: components["parameters"]["queryId"]
118
- }
109
+ queryId: components["parameters"]["queryId"];
110
+ };
119
111
  header: {
120
112
  /** The ID of the app which this request is targeting. */
121
- "x-budibase-app-id": components["parameters"]["appId"]
122
- }
123
- }
113
+ "x-budibase-app-id": components["parameters"]["appId"];
114
+ };
115
+ };
124
116
  responses: {
125
117
  /** Returns the result of the query execution. */
126
118
  200: {
127
119
  content: {
128
- "application/json": components["schemas"]["executeQueryOutput"]
129
- }
130
- }
131
- }
120
+ "application/json": components["schemas"]["executeQueryOutput"];
121
+ };
122
+ };
123
+ };
132
124
  requestBody: {
133
125
  content: {
134
- "application/json": components["schemas"]["executeQuery"]
135
- }
136
- }
137
- }
138
- }
126
+ "application/json": components["schemas"]["executeQuery"];
127
+ };
128
+ };
129
+ };
130
+ };
139
131
  "/queries/search": {
140
132
  /** Based on query properties (currently only name) search for queries. */
141
133
  post: {
142
134
  parameters: {
143
135
  header: {
144
136
  /** The ID of the app which this request is targeting. */
145
- "x-budibase-app-id": components["parameters"]["appId"]
146
- }
147
- }
137
+ "x-budibase-app-id": components["parameters"]["appId"];
138
+ };
139
+ };
148
140
  responses: {
149
141
  /** Returns the queries found based on the search parameters. */
150
142
  200: {
151
143
  content: {
152
- "application/json": {
153
- data: components["schemas"]["query"][]
154
- }
155
- }
156
- }
157
- }
144
+ "application/json": components["schemas"]["querySearch"];
145
+ };
146
+ };
147
+ };
158
148
  requestBody: {
159
149
  content: {
160
- "application/json": components["schemas"]["nameSearch"]
161
- }
162
- }
163
- }
164
- }
150
+ "application/json": components["schemas"]["nameSearch"];
151
+ };
152
+ };
153
+ };
154
+ };
165
155
  "/tables/{tableId}/rows": {
166
156
  /** Creates a row within the specified table. */
167
157
  post: {
168
158
  parameters: {
169
159
  path: {
170
160
  /** The ID of the table which this request is targeting. */
171
- tableId: components["parameters"]["tableId"]
172
- }
161
+ tableId: components["parameters"]["tableId"];
162
+ };
173
163
  header: {
174
164
  /** The ID of the app which this request is targeting. */
175
- "x-budibase-app-id": components["parameters"]["appId"]
176
- }
177
- }
165
+ "x-budibase-app-id": components["parameters"]["appId"];
166
+ };
167
+ };
178
168
  responses: {
179
169
  /** Returns the created row, including the ID which has been generated for it. This can be found in the Budibase portal, viewed under the developer information. */
180
170
  200: {
181
171
  content: {
182
- "application/json": components["schemas"]["rowOutput"]
183
- }
184
- }
185
- }
172
+ "application/json": components["schemas"]["rowOutput"];
173
+ };
174
+ };
175
+ };
186
176
  requestBody: {
187
177
  content: {
188
- "application/json": components["schemas"]["row"]
189
- }
190
- }
191
- }
192
- }
178
+ "application/json": components["schemas"]["row"];
179
+ };
180
+ };
181
+ };
182
+ };
193
183
  "/tables/{tableId}/rows/{rowId}": {
194
184
  /** This gets a single row, it will be enriched with the full related rows, rather than the squashed "primaryDisplay" format returned by the search endpoint. */
195
185
  get: {
196
186
  parameters: {
197
187
  path: {
198
188
  /** The ID of the table which this request is targeting. */
199
- tableId: components["parameters"]["tableId"]
189
+ tableId: components["parameters"]["tableId"];
200
190
  /** The ID of the row which this request is targeting. */
201
- rowId: components["parameters"]["rowId"]
202
- }
191
+ rowId: components["parameters"]["rowId"];
192
+ };
203
193
  header: {
204
194
  /** The ID of the app which this request is targeting. */
205
- "x-budibase-app-id": components["parameters"]["appId"]
206
- }
207
- }
195
+ "x-budibase-app-id": components["parameters"]["appId"];
196
+ };
197
+ };
208
198
  responses: {
209
199
  /** Returns the retrieved row. */
210
200
  200: {
211
201
  content: {
212
- "application/json": components["schemas"]["rowOutput"]
213
- }
214
- }
215
- }
216
- }
202
+ "application/json": components["schemas"]["rowOutput"];
203
+ };
204
+ };
205
+ };
206
+ };
217
207
  /** Updates a row within the specified table. */
218
208
  put: {
219
209
  parameters: {
220
210
  path: {
221
211
  /** The ID of the table which this request is targeting. */
222
- tableId: components["parameters"]["tableId"]
212
+ tableId: components["parameters"]["tableId"];
223
213
  /** The ID of the row which this request is targeting. */
224
- rowId: components["parameters"]["rowId"]
225
- }
214
+ rowId: components["parameters"]["rowId"];
215
+ };
226
216
  header: {
227
217
  /** The ID of the app which this request is targeting. */
228
- "x-budibase-app-id": components["parameters"]["appId"]
229
- }
230
- }
218
+ "x-budibase-app-id": components["parameters"]["appId"];
219
+ };
220
+ };
231
221
  responses: {
232
222
  /** Returns the created row, including the ID which has been generated for it. */
233
223
  200: {
234
224
  content: {
235
- "application/json": components["schemas"]["rowOutput"]
236
- }
237
- }
238
- }
225
+ "application/json": components["schemas"]["rowOutput"];
226
+ };
227
+ };
228
+ };
239
229
  requestBody: {
240
230
  content: {
241
- "application/json": components["schemas"]["row"]
242
- }
243
- }
244
- }
231
+ "application/json": components["schemas"]["row"];
232
+ };
233
+ };
234
+ };
245
235
  /** Deletes a row within the specified table. */
246
236
  delete: {
247
237
  parameters: {
248
238
  path: {
249
239
  /** The ID of the table which this request is targeting. */
250
- tableId: components["parameters"]["tableId"]
240
+ tableId: components["parameters"]["tableId"];
251
241
  /** The ID of the row which this request is targeting. */
252
- rowId: components["parameters"]["rowId"]
253
- }
242
+ rowId: components["parameters"]["rowId"];
243
+ };
254
244
  header: {
255
245
  /** The ID of the app which this request is targeting. */
256
- "x-budibase-app-id": components["parameters"]["appId"]
257
- }
258
- }
246
+ "x-budibase-app-id": components["parameters"]["appId"];
247
+ };
248
+ };
259
249
  responses: {
260
250
  /** Returns the deleted row, including the ID which has been generated for it. */
261
251
  200: {
262
252
  content: {
263
- "application/json": components["schemas"]["rowOutput"]
264
- }
265
- }
266
- }
267
- }
268
- }
253
+ "application/json": components["schemas"]["rowOutput"];
254
+ };
255
+ };
256
+ };
257
+ };
258
+ };
269
259
  "/tables/{tableId}/rows/search": {
270
260
  post: {
271
261
  parameters: {
272
262
  path: {
273
263
  /** The ID of the table which this request is targeting. */
274
- tableId: components["parameters"]["tableId"]
275
- }
264
+ tableId: components["parameters"]["tableId"];
265
+ };
276
266
  header: {
277
267
  /** The ID of the app which this request is targeting. */
278
- "x-budibase-app-id": components["parameters"]["appId"]
279
- }
280
- }
268
+ "x-budibase-app-id": components["parameters"]["appId"];
269
+ };
270
+ };
281
271
  responses: {
282
272
  /** The response will contain an array of rows that match the search parameters. */
283
273
  200: {
284
274
  content: {
285
- "application/json": components["schemas"]["searchOutput"]
286
- }
287
- }
288
- }
275
+ "application/json": components["schemas"]["searchOutput"];
276
+ };
277
+ };
278
+ };
289
279
  requestBody: {
290
280
  content: {
291
281
  "application/json": {
@@ -294,246 +284,244 @@ export interface paths {
294
284
  * @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.
295
285
  * @example [object Object]
296
286
  */
297
- string?: { [key: string]: string }
287
+ string?: { [key: string]: string };
298
288
  /** @description A fuzzy search, only supported by internal tables. */
299
- fuzzy?: { [key: string]: unknown }
289
+ fuzzy?: { [key: string]: unknown };
300
290
  /**
301
291
  * @description Searches within a range, the format of this must be columnName -> [low, high].
302
292
  * @example [object Object]
303
293
  */
304
- range?: { [key: string]: unknown }
294
+ range?: { [key: string]: unknown };
305
295
  /** @description Searches for rows that have a column value that is exactly the value set. */
306
- equal?: { [key: string]: unknown }
296
+ equal?: { [key: string]: unknown };
307
297
  /** @description Searches for any row which does not contain the specified column value. */
308
- notEqual?: { [key: string]: unknown }
298
+ notEqual?: { [key: string]: unknown };
309
299
  /**
310
300
  * @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.
311
301
  * @example [object Object]
312
302
  */
313
- empty?: { [key: string]: unknown }
303
+ empty?: { [key: string]: unknown };
314
304
  /** @description Searches for rows which have the specified column. */
315
- notEmpty?: { [key: string]: unknown }
305
+ notEmpty?: { [key: string]: unknown };
316
306
  /** @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]. */
317
- oneOf?: { [key: string]: unknown }
318
- }
307
+ oneOf?: { [key: string]: unknown };
308
+ };
319
309
  /** @description Enables pagination, by default this is disabled. */
320
- paginate?: boolean
310
+ paginate?: boolean;
321
311
  /** @description If retrieving another page, the bookmark from the previous request must be supplied. */
322
- bookmark?: string | number
312
+ bookmark?: string | number;
323
313
  /** @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. */
324
- limit?: number
314
+ limit?: number;
325
315
  /** @description A set of parameters describing the sort behaviour of the search. */
326
316
  sort?: {
327
317
  /**
328
318
  * @description The order of the sort, by default this is ascending.
329
319
  * @enum {string}
330
320
  */
331
- order?: "ascending" | "descending"
321
+ order?: "ascending" | "descending";
332
322
  /** @description The name of the column by which the rows will be sorted. */
333
- column?: string
323
+ column?: string;
334
324
  /**
335
325
  * @description Defines whether the column should be treated as a string or as numbers when sorting.
336
326
  * @enum {string}
337
327
  */
338
- type?: "string" | "number"
339
- }
340
- }
341
- }
342
- }
343
- }
344
- }
328
+ type?: "string" | "number";
329
+ };
330
+ };
331
+ };
332
+ };
333
+ };
334
+ };
345
335
  "/tables": {
346
336
  /** Create a table, this could be internal or external. */
347
337
  post: {
348
338
  parameters: {
349
339
  header: {
350
340
  /** The ID of the app which this request is targeting. */
351
- "x-budibase-app-id": components["parameters"]["appId"]
352
- }
353
- }
341
+ "x-budibase-app-id": components["parameters"]["appId"];
342
+ };
343
+ };
354
344
  responses: {
355
345
  /** Returns the created table, including the ID which has been generated for it. This can be internal or external data sources. */
356
346
  200: {
357
347
  content: {
358
- "application/json": components["schemas"]["tableOutput"]
359
- }
360
- }
361
- }
348
+ "application/json": components["schemas"]["tableOutput"];
349
+ };
350
+ };
351
+ };
362
352
  requestBody: {
363
353
  content: {
364
- "application/json": components["schemas"]["table"]
365
- }
366
- }
367
- }
368
- }
354
+ "application/json": components["schemas"]["table"];
355
+ };
356
+ };
357
+ };
358
+ };
369
359
  "/tables/{tableId}": {
370
360
  /** Lookup a table, this could be internal or external. */
371
361
  get: {
372
362
  parameters: {
373
363
  path: {
374
364
  /** The ID of the table which this request is targeting. */
375
- tableId: components["parameters"]["tableId"]
376
- }
365
+ tableId: components["parameters"]["tableId"];
366
+ };
377
367
  header: {
378
368
  /** The ID of the app which this request is targeting. */
379
- "x-budibase-app-id": components["parameters"]["appId"]
380
- }
381
- }
369
+ "x-budibase-app-id": components["parameters"]["appId"];
370
+ };
371
+ };
382
372
  responses: {
383
373
  /** Returns the retrieved table. */
384
374
  200: {
385
375
  content: {
386
- "application/json": components["schemas"]["tableOutput"]
387
- }
388
- }
389
- }
390
- }
376
+ "application/json": components["schemas"]["tableOutput"];
377
+ };
378
+ };
379
+ };
380
+ };
391
381
  /** Update a table, this could be internal or external. */
392
382
  put: {
393
383
  parameters: {
394
384
  path: {
395
385
  /** The ID of the table which this request is targeting. */
396
- tableId: components["parameters"]["tableId"]
397
- }
386
+ tableId: components["parameters"]["tableId"];
387
+ };
398
388
  header: {
399
389
  /** The ID of the app which this request is targeting. */
400
- "x-budibase-app-id": components["parameters"]["appId"]
401
- }
402
- }
390
+ "x-budibase-app-id": components["parameters"]["appId"];
391
+ };
392
+ };
403
393
  responses: {
404
394
  /** Returns the updated table. */
405
395
  200: {
406
396
  content: {
407
- "application/json": components["schemas"]["tableOutput"]
408
- }
409
- }
410
- }
397
+ "application/json": components["schemas"]["tableOutput"];
398
+ };
399
+ };
400
+ };
411
401
  requestBody: {
412
402
  content: {
413
- "application/json": components["schemas"]["table"]
414
- }
415
- }
416
- }
403
+ "application/json": components["schemas"]["table"];
404
+ };
405
+ };
406
+ };
417
407
  /** Delete a table, this could be internal or external. */
418
408
  delete: {
419
409
  parameters: {
420
410
  path: {
421
411
  /** The ID of the table which this request is targeting. */
422
- tableId: components["parameters"]["tableId"]
423
- }
412
+ tableId: components["parameters"]["tableId"];
413
+ };
424
414
  header: {
425
415
  /** The ID of the app which this request is targeting. */
426
- "x-budibase-app-id": components["parameters"]["appId"]
427
- }
428
- }
416
+ "x-budibase-app-id": components["parameters"]["appId"];
417
+ };
418
+ };
429
419
  responses: {
430
420
  /** Returns the deleted table. */
431
421
  200: {
432
422
  content: {
433
- "application/json": components["schemas"]["tableOutput"]
434
- }
435
- }
436
- }
437
- }
438
- }
423
+ "application/json": components["schemas"]["tableOutput"];
424
+ };
425
+ };
426
+ };
427
+ };
428
+ };
439
429
  "/tables/search": {
440
430
  /** Based on table properties (currently only name) search for tables. This could be an internal or an external table. */
441
431
  post: {
442
432
  parameters: {
443
433
  header: {
444
434
  /** The ID of the app which this request is targeting. */
445
- "x-budibase-app-id": components["parameters"]["appId"]
446
- }
447
- }
435
+ "x-budibase-app-id": components["parameters"]["appId"];
436
+ };
437
+ };
448
438
  responses: {
449
439
  /** Returns the found tables, based on the search parameters. */
450
440
  200: {
451
441
  content: {
452
- "application/json": {
453
- data: components["schemas"]["table"][]
454
- }
455
- }
456
- }
457
- }
442
+ "application/json": components["schemas"]["tableSearch"];
443
+ };
444
+ };
445
+ };
458
446
  requestBody: {
459
447
  content: {
460
- "application/json": components["schemas"]["nameSearch"]
461
- }
462
- }
463
- }
464
- }
448
+ "application/json": components["schemas"]["nameSearch"];
449
+ };
450
+ };
451
+ };
452
+ };
465
453
  "/users": {
466
454
  post: {
467
455
  responses: {
468
456
  /** Returns the created user. */
469
457
  200: {
470
458
  content: {
471
- "application/json": components["schemas"]["userOutput"]
472
- }
473
- }
474
- }
459
+ "application/json": components["schemas"]["userOutput"];
460
+ };
461
+ };
462
+ };
475
463
  requestBody: {
476
464
  content: {
477
- "application/json": components["schemas"]["user"]
478
- }
479
- }
480
- }
481
- }
465
+ "application/json": components["schemas"]["user"];
466
+ };
467
+ };
468
+ };
469
+ };
482
470
  "/users/{userId}": {
483
471
  get: {
484
472
  parameters: {
485
473
  path: {
486
474
  /** The ID of the user which this request is targeting. */
487
- userId: components["parameters"]["userId"]
488
- }
489
- }
475
+ userId: components["parameters"]["userId"];
476
+ };
477
+ };
490
478
  responses: {
491
479
  /** Returns the retrieved user. */
492
480
  200: {
493
481
  content: {
494
- "application/json": components["schemas"]["userOutput"]
495
- }
496
- }
497
- }
498
- }
482
+ "application/json": components["schemas"]["userOutput"];
483
+ };
484
+ };
485
+ };
486
+ };
499
487
  put: {
500
488
  parameters: {
501
489
  path: {
502
490
  /** The ID of the user which this request is targeting. */
503
- userId: components["parameters"]["userId"]
504
- }
505
- }
491
+ userId: components["parameters"]["userId"];
492
+ };
493
+ };
506
494
  responses: {
507
495
  /** Returns the updated user. */
508
496
  200: {
509
497
  content: {
510
- "application/json": components["schemas"]["userOutput"]
511
- }
512
- }
513
- }
498
+ "application/json": components["schemas"]["userOutput"];
499
+ };
500
+ };
501
+ };
514
502
  requestBody: {
515
503
  content: {
516
- "application/json": components["schemas"]["user"]
517
- }
518
- }
519
- }
504
+ "application/json": components["schemas"]["user"];
505
+ };
506
+ };
507
+ };
520
508
  delete: {
521
509
  parameters: {
522
510
  path: {
523
511
  /** The ID of the user which this request is targeting. */
524
- userId: components["parameters"]["userId"]
525
- }
526
- }
512
+ userId: components["parameters"]["userId"];
513
+ };
514
+ };
527
515
  responses: {
528
516
  /** Returns the deleted user. */
529
517
  200: {
530
518
  content: {
531
- "application/json": components["schemas"]["userOutput"]
532
- }
533
- }
534
- }
535
- }
536
- }
519
+ "application/json": components["schemas"]["userOutput"];
520
+ };
521
+ };
522
+ };
523
+ };
524
+ };
537
525
  "/users/search": {
538
526
  /** Based on user properties (currently only name) search for users. */
539
527
  post: {
@@ -541,79 +529,102 @@ export interface paths {
541
529
  /** Returns the found users based on search parameters. */
542
530
  200: {
543
531
  content: {
544
- "application/json": {
545
- data: components["schemas"]["user"][]
546
- }
547
- }
548
- }
549
- }
532
+ "application/json": components["schemas"]["userSearch"];
533
+ };
534
+ };
535
+ };
550
536
  requestBody: {
551
537
  content: {
552
- "application/json": components["schemas"]["nameSearch"]
553
- }
554
- }
555
- }
556
- }
538
+ "application/json": components["schemas"]["nameSearch"];
539
+ };
540
+ };
541
+ };
542
+ };
557
543
  }
558
544
 
559
545
  export interface components {
560
546
  schemas: {
561
547
  application: {
562
548
  /** @description The name of the app. */
563
- name: string
549
+ name: string;
564
550
  /** @description The URL by which the app is accessed, this must be URL encoded. */
565
- url: string
566
- }
551
+ url?: string;
552
+ };
567
553
  applicationOutput: {
568
554
  data: {
569
555
  /** @description The name of the app. */
570
- name: string
556
+ name: string;
557
+ /** @description The URL by which the app is accessed, this must be URL encoded. */
558
+ url: string;
559
+ /** @description The ID of the app. */
560
+ _id: string;
561
+ /**
562
+ * @description The status of the app, stating it if is the development or published version.
563
+ * @enum {string}
564
+ */
565
+ status: "development" | "published";
566
+ /** @description States when the app was created, will be constant. Stored in ISO format. */
567
+ createdAt: string;
568
+ /** @description States the last time the app was updated - stored in ISO format. */
569
+ updatedAt: string;
570
+ /** @description States the version of the Budibase client this app is currently based on. */
571
+ version: string;
572
+ /** @description In a multi-tenant environment this will state the tenant this app is within. */
573
+ tenantId?: string;
574
+ /** @description The user this app is currently being built by. */
575
+ lockedBy?: { [key: string]: unknown };
576
+ };
577
+ };
578
+ applicationSearch: {
579
+ data: {
580
+ /** @description The name of the app. */
581
+ name: string;
571
582
  /** @description The URL by which the app is accessed, this must be URL encoded. */
572
- url: string
583
+ url: string;
573
584
  /** @description The ID of the app. */
574
- _id: string
585
+ _id: string;
575
586
  /**
576
587
  * @description The status of the app, stating it if is the development or published version.
577
588
  * @enum {string}
578
589
  */
579
- status: "development" | "published"
590
+ status: "development" | "published";
580
591
  /** @description States when the app was created, will be constant. Stored in ISO format. */
581
- createdAt: string
592
+ createdAt: string;
582
593
  /** @description States the last time the app was updated - stored in ISO format. */
583
- updatedAt: string
594
+ updatedAt: string;
584
595
  /** @description States the version of the Budibase client this app is currently based on. */
585
- version: string
596
+ version: string;
586
597
  /** @description In a multi-tenant environment this will state the tenant this app is within. */
587
- tenantId?: string
598
+ tenantId?: string;
588
599
  /** @description The user this app is currently being built by. */
589
- lockedBy?: { [key: string]: unknown }
590
- }
591
- }
600
+ lockedBy?: { [key: string]: unknown };
601
+ }[];
602
+ };
592
603
  /** @description The row to be created/updated, based on the table schema. */
593
- row: { [key: string]: unknown }
604
+ row: { [key: string]: unknown };
594
605
  searchOutput: {
595
606
  /** @description An array of rows, these will each contain an _id field which can be used to update or delete them. */
596
- data: { [key: string]: unknown }[]
607
+ data: { [key: string]: unknown }[];
597
608
  /** @description If pagination in use, this should be provided. */
598
- bookmark?: string | number
609
+ bookmark?: string | number;
599
610
  /** @description If pagination in use, this will determine if there is another page to fetch. */
600
- hasNextPage?: boolean
601
- }
611
+ hasNextPage?: boolean;
612
+ };
602
613
  rowOutput: {
603
614
  /** @description The row to be created/updated, based on the table schema. */
604
615
  data: {
605
616
  /** @description The ID of the row. */
606
- _id: string
617
+ _id: string;
607
618
  /** @description The ID of the table this row comes from. */
608
- tableId: string
609
- } & { [key: string]: unknown }
610
- }
619
+ tableId: string;
620
+ } & { [key: string]: unknown };
621
+ };
611
622
  /** @description The table to be created/updated. */
612
623
  table: {
613
624
  /** @description The name of the table. */
614
- name: string
625
+ name: string;
615
626
  /** @description The name of the column which should be used in relationship tags when relating to this table. */
616
- primaryDisplay?: string
627
+ primaryDisplay?: string;
617
628
  schema: {
618
629
  [key: string]:
619
630
  | {
@@ -621,60 +632,60 @@ export interface components {
621
632
  * @description A relationship column.
622
633
  * @enum {string}
623
634
  */
624
- type?: "link"
635
+ type?: "link";
625
636
  /** @description A constraint can be applied to the column which will be validated against when a row is saved. */
626
637
  constraints?: {
627
638
  /** @enum {string} */
628
- type?: "string" | "number" | "object" | "boolean"
639
+ type?: "string" | "number" | "object" | "boolean";
629
640
  /** @description Defines whether the column is required or not. */
630
- presence?: boolean
631
- }
641
+ presence?: boolean;
642
+ };
632
643
  /** @description The name of the column. */
633
- name?: string
644
+ name?: string;
634
645
  /** @description Defines whether the column is automatically generated. */
635
- autocolumn?: boolean
646
+ autocolumn?: boolean;
636
647
  /** @description The name of the column which a relationship column is related to in another table. */
637
- fieldName?: string
648
+ fieldName?: string;
638
649
  /** @description The ID of the table which a relationship column is related to. */
639
- tableId?: string
650
+ tableId?: string;
640
651
  /**
641
652
  * @description Defines the type of relationship that this column will be used for.
642
653
  * @enum {string}
643
654
  */
644
- relationshipType?: "one-to-many" | "many-to-one" | "many-to-many"
655
+ relationshipType?: "one-to-many" | "many-to-one" | "many-to-many";
645
656
  /** @description When using a SQL table that contains many to many relationships this defines the table the relationships are linked through. */
646
- through?: string
657
+ through?: string;
647
658
  /** @description When using a SQL table that contains a one to many relationship this defines the foreign key. */
648
- foreignKey?: string
659
+ foreignKey?: string;
649
660
  /** @description When using a SQL table that utilises a through table, this defines the primary key in the through table for this table. */
650
- throughFrom?: string
661
+ throughFrom?: string;
651
662
  /** @description When using a SQL table that utilises a through table, this defines the primary key in the through table for the related table. */
652
- throughTo?: string
663
+ throughTo?: string;
653
664
  }
654
665
  | {
655
666
  /**
656
667
  * @description A formula column.
657
668
  * @enum {string}
658
669
  */
659
- type?: "formula"
670
+ type?: "formula";
660
671
  /** @description A constraint can be applied to the column which will be validated against when a row is saved. */
661
672
  constraints?: {
662
673
  /** @enum {string} */
663
- type?: "string" | "number" | "object" | "boolean"
674
+ type?: "string" | "number" | "object" | "boolean";
664
675
  /** @description Defines whether the column is required or not. */
665
- presence?: boolean
666
- }
676
+ presence?: boolean;
677
+ };
667
678
  /** @description The name of the column. */
668
- name?: string
679
+ name?: string;
669
680
  /** @description Defines whether the column is automatically generated. */
670
- autocolumn?: boolean
681
+ autocolumn?: boolean;
671
682
  /** @description Defines a Handlebars or JavaScript formula to use, note that Javascript formulas are expected to be provided in the base64 format. */
672
- formula?: string
683
+ formula?: string;
673
684
  /**
674
685
  * @description Defines whether this is a static or dynamic formula.
675
686
  * @enum {string}
676
687
  */
677
- formulaType?: "static" | "dynamic"
688
+ formulaType?: "static" | "dynamic";
678
689
  }
679
690
  | {
680
691
  /**
@@ -694,28 +705,28 @@ export interface components {
694
705
  | "formula"
695
706
  | "auto"
696
707
  | "json"
697
- | "internal"
708
+ | "internal";
698
709
  /** @description A constraint can be applied to the column which will be validated against when a row is saved. */
699
710
  constraints?: {
700
711
  /** @enum {string} */
701
- type?: "string" | "number" | "object" | "boolean"
712
+ type?: "string" | "number" | "object" | "boolean";
702
713
  /** @description Defines whether the column is required or not. */
703
- presence?: boolean
704
- }
714
+ presence?: boolean;
715
+ };
705
716
  /** @description The name of the column. */
706
- name?: string
717
+ name?: string;
707
718
  /** @description Defines whether the column is automatically generated. */
708
- autocolumn?: boolean
709
- }
710
- }
711
- }
719
+ autocolumn?: boolean;
720
+ };
721
+ };
722
+ };
712
723
  tableOutput: {
713
724
  /** @description The table to be created/updated. */
714
725
  data: {
715
726
  /** @description The name of the table. */
716
- name: string
727
+ name: string;
717
728
  /** @description The name of the column which should be used in relationship tags when relating to this table. */
718
- primaryDisplay?: string
729
+ primaryDisplay?: string;
719
730
  schema: {
720
731
  [key: string]:
721
732
  | {
@@ -723,22 +734,22 @@ export interface components {
723
734
  * @description A relationship column.
724
735
  * @enum {string}
725
736
  */
726
- type?: "link"
737
+ type?: "link";
727
738
  /** @description A constraint can be applied to the column which will be validated against when a row is saved. */
728
739
  constraints?: {
729
740
  /** @enum {string} */
730
- type?: "string" | "number" | "object" | "boolean"
741
+ type?: "string" | "number" | "object" | "boolean";
731
742
  /** @description Defines whether the column is required or not. */
732
- presence?: boolean
733
- }
743
+ presence?: boolean;
744
+ };
734
745
  /** @description The name of the column. */
735
- name?: string
746
+ name?: string;
736
747
  /** @description Defines whether the column is automatically generated. */
737
- autocolumn?: boolean
748
+ autocolumn?: boolean;
738
749
  /** @description The name of the column which a relationship column is related to in another table. */
739
- fieldName?: string
750
+ fieldName?: string;
740
751
  /** @description The ID of the table which a relationship column is related to. */
741
- tableId?: string
752
+ tableId?: string;
742
753
  /**
743
754
  * @description Defines the type of relationship that this column will be used for.
744
755
  * @enum {string}
@@ -746,40 +757,40 @@ export interface components {
746
757
  relationshipType?:
747
758
  | "one-to-many"
748
759
  | "many-to-one"
749
- | "many-to-many"
760
+ | "many-to-many";
750
761
  /** @description When using a SQL table that contains many to many relationships this defines the table the relationships are linked through. */
751
- through?: string
762
+ through?: string;
752
763
  /** @description When using a SQL table that contains a one to many relationship this defines the foreign key. */
753
- foreignKey?: string
764
+ foreignKey?: string;
754
765
  /** @description When using a SQL table that utilises a through table, this defines the primary key in the through table for this table. */
755
- throughFrom?: string
766
+ throughFrom?: string;
756
767
  /** @description When using a SQL table that utilises a through table, this defines the primary key in the through table for the related table. */
757
- throughTo?: string
768
+ throughTo?: string;
758
769
  }
759
770
  | {
760
771
  /**
761
772
  * @description A formula column.
762
773
  * @enum {string}
763
774
  */
764
- type?: "formula"
775
+ type?: "formula";
765
776
  /** @description A constraint can be applied to the column which will be validated against when a row is saved. */
766
777
  constraints?: {
767
778
  /** @enum {string} */
768
- type?: "string" | "number" | "object" | "boolean"
779
+ type?: "string" | "number" | "object" | "boolean";
769
780
  /** @description Defines whether the column is required or not. */
770
- presence?: boolean
771
- }
781
+ presence?: boolean;
782
+ };
772
783
  /** @description The name of the column. */
773
- name?: string
784
+ name?: string;
774
785
  /** @description Defines whether the column is automatically generated. */
775
- autocolumn?: boolean
786
+ autocolumn?: boolean;
776
787
  /** @description Defines a Handlebars or JavaScript formula to use, note that Javascript formulas are expected to be provided in the base64 format. */
777
- formula?: string
788
+ formula?: string;
778
789
  /**
779
790
  * @description Defines whether this is a static or dynamic formula.
780
791
  * @enum {string}
781
792
  */
782
- formulaType?: "static" | "dynamic"
793
+ formulaType?: "static" | "dynamic";
783
794
  }
784
795
  | {
785
796
  /**
@@ -799,143 +810,308 @@ export interface components {
799
810
  | "formula"
800
811
  | "auto"
801
812
  | "json"
802
- | "internal"
813
+ | "internal";
814
+ /** @description A constraint can be applied to the column which will be validated against when a row is saved. */
815
+ constraints?: {
816
+ /** @enum {string} */
817
+ type?: "string" | "number" | "object" | "boolean";
818
+ /** @description Defines whether the column is required or not. */
819
+ presence?: boolean;
820
+ };
821
+ /** @description The name of the column. */
822
+ name?: string;
823
+ /** @description Defines whether the column is automatically generated. */
824
+ autocolumn?: boolean;
825
+ };
826
+ };
827
+ /** @description The ID of the table. */
828
+ _id: string;
829
+ };
830
+ };
831
+ tableSearch: {
832
+ data: {
833
+ /** @description The name of the table. */
834
+ name: string;
835
+ /** @description The name of the column which should be used in relationship tags when relating to this table. */
836
+ primaryDisplay?: string;
837
+ schema: {
838
+ [key: string]:
839
+ | {
840
+ /**
841
+ * @description A relationship column.
842
+ * @enum {string}
843
+ */
844
+ type?: "link";
845
+ /** @description A constraint can be applied to the column which will be validated against when a row is saved. */
846
+ constraints?: {
847
+ /** @enum {string} */
848
+ type?: "string" | "number" | "object" | "boolean";
849
+ /** @description Defines whether the column is required or not. */
850
+ presence?: boolean;
851
+ };
852
+ /** @description The name of the column. */
853
+ name?: string;
854
+ /** @description Defines whether the column is automatically generated. */
855
+ autocolumn?: boolean;
856
+ /** @description The name of the column which a relationship column is related to in another table. */
857
+ fieldName?: string;
858
+ /** @description The ID of the table which a relationship column is related to. */
859
+ tableId?: string;
860
+ /**
861
+ * @description Defines the type of relationship that this column will be used for.
862
+ * @enum {string}
863
+ */
864
+ relationshipType?:
865
+ | "one-to-many"
866
+ | "many-to-one"
867
+ | "many-to-many";
868
+ /** @description When using a SQL table that contains many to many relationships this defines the table the relationships are linked through. */
869
+ through?: string;
870
+ /** @description When using a SQL table that contains a one to many relationship this defines the foreign key. */
871
+ foreignKey?: string;
872
+ /** @description When using a SQL table that utilises a through table, this defines the primary key in the through table for this table. */
873
+ throughFrom?: string;
874
+ /** @description When using a SQL table that utilises a through table, this defines the primary key in the through table for the related table. */
875
+ throughTo?: string;
876
+ }
877
+ | {
878
+ /**
879
+ * @description A formula column.
880
+ * @enum {string}
881
+ */
882
+ type?: "formula";
803
883
  /** @description A constraint can be applied to the column which will be validated against when a row is saved. */
804
884
  constraints?: {
805
885
  /** @enum {string} */
806
- type?: "string" | "number" | "object" | "boolean"
886
+ type?: "string" | "number" | "object" | "boolean";
807
887
  /** @description Defines whether the column is required or not. */
808
- presence?: boolean
809
- }
888
+ presence?: boolean;
889
+ };
810
890
  /** @description The name of the column. */
811
- name?: string
891
+ name?: string;
812
892
  /** @description Defines whether the column is automatically generated. */
813
- autocolumn?: boolean
893
+ autocolumn?: boolean;
894
+ /** @description Defines a Handlebars or JavaScript formula to use, note that Javascript formulas are expected to be provided in the base64 format. */
895
+ formula?: string;
896
+ /**
897
+ * @description Defines whether this is a static or dynamic formula.
898
+ * @enum {string}
899
+ */
900
+ formulaType?: "static" | "dynamic";
814
901
  }
815
- }
902
+ | {
903
+ /**
904
+ * @description Defines the type of the column, most explain themselves, a link column is a relationship.
905
+ * @enum {string}
906
+ */
907
+ type?:
908
+ | "string"
909
+ | "longform"
910
+ | "options"
911
+ | "number"
912
+ | "boolean"
913
+ | "array"
914
+ | "datetime"
915
+ | "attachment"
916
+ | "link"
917
+ | "formula"
918
+ | "auto"
919
+ | "json"
920
+ | "internal";
921
+ /** @description A constraint can be applied to the column which will be validated against when a row is saved. */
922
+ constraints?: {
923
+ /** @enum {string} */
924
+ type?: "string" | "number" | "object" | "boolean";
925
+ /** @description Defines whether the column is required or not. */
926
+ presence?: boolean;
927
+ };
928
+ /** @description The name of the column. */
929
+ name?: string;
930
+ /** @description Defines whether the column is automatically generated. */
931
+ autocolumn?: boolean;
932
+ };
933
+ };
816
934
  /** @description The ID of the table. */
817
- _id: string
818
- }
819
- }
935
+ _id: string;
936
+ }[];
937
+ };
820
938
  /** @description The query body must contain the required parameters for the query, this depends on query type, setup and bindings. */
821
- executeQuery: { [key: string]: unknown }
939
+ executeQuery: { [key: string]: unknown };
822
940
  executeQueryOutput: {
823
941
  /** @description The data response from the query. */
824
- data: { [key: string]: unknown }[]
942
+ data: { [key: string]: unknown }[];
825
943
  /** @description Extra information that is not part of the main data, e.g. headers. */
826
944
  extra?: {
827
945
  /** @description If carrying out a REST request, this will contain the response headers. */
828
- headers?: { [key: string]: unknown }
946
+ headers?: { [key: string]: unknown };
829
947
  /** @description The raw query response, as a string. */
830
- raw?: string
831
- }
948
+ raw?: string;
949
+ };
832
950
  /** @description If pagination is supported, this will contain the bookmark/anchor information for it. */
833
- pagination?: { [key: string]: unknown }
834
- }
951
+ pagination?: { [key: string]: unknown };
952
+ };
835
953
  query: {
836
954
  /** @description The ID of the query. */
837
- _id: string
955
+ _id: string;
838
956
  /** @description The ID of the data source the query belongs to. */
839
- datasourceId?: string
957
+ datasourceId?: string;
840
958
  /** @description The bindings which are required to perform this query. */
841
- parameters?: string[]
959
+ parameters?: string[];
842
960
  /** @description The fields that are used to perform this query, e.g. the sql statement */
843
- fields?: { [key: string]: unknown }
961
+ fields?: { [key: string]: unknown };
844
962
  /**
845
963
  * @description The verb that describes this query.
846
964
  * @enum {undefined}
847
965
  */
848
- queryVerb?: "create" | "read" | "update" | "delete"
966
+ queryVerb?: "create" | "read" | "update" | "delete";
849
967
  /** @description The name of the query. */
850
- name: string
968
+ name: string;
851
969
  /** @description The schema of the data returned when the query is executed. */
852
- schema: { [key: string]: unknown }
970
+ schema: { [key: string]: unknown };
853
971
  /** @description The JavaScript transformer function, applied after the query responds with data. */
854
- transformer?: string
972
+ transformer?: string;
855
973
  /** @description Whether the query has readable data. */
856
- readable?: boolean
857
- }
974
+ readable?: boolean;
975
+ };
976
+ querySearch: {
977
+ data: {
978
+ /** @description The ID of the query. */
979
+ _id: string;
980
+ /** @description The ID of the data source the query belongs to. */
981
+ datasourceId?: string;
982
+ /** @description The bindings which are required to perform this query. */
983
+ parameters?: string[];
984
+ /** @description The fields that are used to perform this query, e.g. the sql statement */
985
+ fields?: { [key: string]: unknown };
986
+ /**
987
+ * @description The verb that describes this query.
988
+ * @enum {undefined}
989
+ */
990
+ queryVerb?: "create" | "read" | "update" | "delete";
991
+ /** @description The name of the query. */
992
+ name: string;
993
+ /** @description The schema of the data returned when the query is executed. */
994
+ schema: { [key: string]: unknown };
995
+ /** @description The JavaScript transformer function, applied after the query responds with data. */
996
+ transformer?: string;
997
+ /** @description Whether the query has readable data. */
998
+ readable?: boolean;
999
+ }[];
1000
+ };
858
1001
  user: {
859
1002
  /** @description The email address of the user, this must be unique. */
860
- email: string
1003
+ email: string;
861
1004
  /** @description The password of the user if using password based login - this will never be returned. This can be left out of subsequent requests (updates) and will be enriched back into the user structure. */
862
- password?: string
1005
+ password?: string;
863
1006
  /**
864
1007
  * @description The status of the user, if they are active.
865
1008
  * @enum {string}
866
1009
  */
867
- status?: "active"
1010
+ status?: "active";
868
1011
  /** @description The first name of the user */
869
- firstName?: string
1012
+ firstName?: string;
870
1013
  /** @description The last name of the user */
871
- lastName?: string
1014
+ lastName?: string;
872
1015
  /** @description If set to true forces the user to reset their password on first login. */
873
- forceResetPassword?: boolean
1016
+ forceResetPassword?: boolean;
874
1017
  /** @description Describes if the user is a builder user or not. */
875
1018
  builder?: {
876
1019
  /** @description If set to true the user will be able to build any app in the system. */
877
- global?: boolean
878
- }
1020
+ global?: boolean;
1021
+ };
879
1022
  /** @description Describes if the user is an admin user or not. */
880
1023
  admin?: {
881
1024
  /** @description If set to true the user will be able to administrate the system. */
882
- global?: boolean
883
- }
1025
+ global?: boolean;
1026
+ };
884
1027
  /** @description Contains the roles of the user per app (assuming they are not a builder user). */
885
- roles: { [key: string]: string }
886
- }
1028
+ roles: { [key: string]: string };
1029
+ };
887
1030
  userOutput: {
888
1031
  data: {
889
1032
  /** @description The email address of the user, this must be unique. */
890
- email: string
1033
+ email: string;
1034
+ /** @description The password of the user if using password based login - this will never be returned. This can be left out of subsequent requests (updates) and will be enriched back into the user structure. */
1035
+ password?: string;
1036
+ /**
1037
+ * @description The status of the user, if they are active.
1038
+ * @enum {string}
1039
+ */
1040
+ status?: "active";
1041
+ /** @description The first name of the user */
1042
+ firstName?: string;
1043
+ /** @description The last name of the user */
1044
+ lastName?: string;
1045
+ /** @description If set to true forces the user to reset their password on first login. */
1046
+ forceResetPassword?: boolean;
1047
+ /** @description Describes if the user is a builder user or not. */
1048
+ builder?: {
1049
+ /** @description If set to true the user will be able to build any app in the system. */
1050
+ global?: boolean;
1051
+ };
1052
+ /** @description Describes if the user is an admin user or not. */
1053
+ admin?: {
1054
+ /** @description If set to true the user will be able to administrate the system. */
1055
+ global?: boolean;
1056
+ };
1057
+ /** @description Contains the roles of the user per app (assuming they are not a builder user). */
1058
+ roles: { [key: string]: string };
1059
+ /** @description The ID of the user. */
1060
+ _id: string;
1061
+ };
1062
+ };
1063
+ userSearch: {
1064
+ data: {
1065
+ /** @description The email address of the user, this must be unique. */
1066
+ email: string;
891
1067
  /** @description The password of the user if using password based login - this will never be returned. This can be left out of subsequent requests (updates) and will be enriched back into the user structure. */
892
- password?: string
1068
+ password?: string;
893
1069
  /**
894
1070
  * @description The status of the user, if they are active.
895
1071
  * @enum {string}
896
1072
  */
897
- status?: "active"
1073
+ status?: "active";
898
1074
  /** @description The first name of the user */
899
- firstName?: string
1075
+ firstName?: string;
900
1076
  /** @description The last name of the user */
901
- lastName?: string
1077
+ lastName?: string;
902
1078
  /** @description If set to true forces the user to reset their password on first login. */
903
- forceResetPassword?: boolean
1079
+ forceResetPassword?: boolean;
904
1080
  /** @description Describes if the user is a builder user or not. */
905
1081
  builder?: {
906
1082
  /** @description If set to true the user will be able to build any app in the system. */
907
- global?: boolean
908
- }
1083
+ global?: boolean;
1084
+ };
909
1085
  /** @description Describes if the user is an admin user or not. */
910
1086
  admin?: {
911
1087
  /** @description If set to true the user will be able to administrate the system. */
912
- global?: boolean
913
- }
1088
+ global?: boolean;
1089
+ };
914
1090
  /** @description Contains the roles of the user per app (assuming they are not a builder user). */
915
- roles: { [key: string]: string }
1091
+ roles: { [key: string]: string };
916
1092
  /** @description The ID of the user. */
917
- _id: string
918
- }
919
- }
1093
+ _id: string;
1094
+ }[];
1095
+ };
920
1096
  nameSearch: {
921
1097
  /** @description The name to be used when searching - this will be used in a case insensitive starts with match. */
922
- name: string
923
- }
924
- }
1098
+ name: string;
1099
+ };
1100
+ };
925
1101
  parameters: {
926
1102
  /** @description The ID of the table which this request is targeting. */
927
- tableId: string
1103
+ tableId: string;
928
1104
  /** @description The ID of the row which this request is targeting. */
929
- rowId: string
1105
+ rowId: string;
930
1106
  /** @description The ID of the app which this request is targeting. */
931
- appId: string
1107
+ appId: string;
932
1108
  /** @description The ID of the app which this request is targeting. */
933
- appIdUrl: string
1109
+ appIdUrl: string;
934
1110
  /** @description The ID of the query which this request is targeting. */
935
- queryId: string
1111
+ queryId: string;
936
1112
  /** @description The ID of the user which this request is targeting. */
937
- userId: string
938
- }
1113
+ userId: string;
1114
+ };
939
1115
  }
940
1116
 
941
1117
  export interface operations {}