@budibase/server 2.3.18-alpha.2 → 2.3.18-alpha.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/__mocks__/node-fetch.ts +3 -0
- package/builder/assets/blankScreenPreview.72634dd1.png +0 -0
- package/builder/assets/{index.bbe4c16b.js → index.baf0ac34.js} +430 -417
- package/builder/assets/index.dc0472d8.css +6 -0
- package/builder/assets/listScreenPreview.599c0aae.png +0 -0
- package/builder/index.html +2 -2
- package/dist/api/controllers/automation.js +11 -2
- package/dist/api/controllers/cloud.js +2 -2
- package/dist/api/controllers/row/ExternalRequest.js +49 -24
- package/dist/api/controllers/row/external.js +1 -1
- package/dist/api/controllers/row/internalSearch.js +6 -450
- package/dist/api/controllers/row/utils.js +1 -3
- package/dist/api/routes/automation.js +1 -1
- package/dist/api/routes/public/applications.js +7 -7
- package/dist/api/routes/public/queries.js +2 -2
- package/dist/api/routes/public/rows.js +5 -5
- package/dist/api/routes/public/tables.js +5 -5
- package/dist/api/routes/public/users.js +5 -5
- package/dist/app.js +2 -0
- package/dist/db/index.js +25 -2
- package/dist/db/utils.js +2 -5
- package/dist/db/views/staticViews.js +2 -1
- package/dist/integrations/base/sql.js +4 -8
- package/dist/integrations/googlesheets.js +17 -20
- package/dist/middleware/authorized.js +5 -3
- package/dist/middleware/builder.js +6 -3
- package/dist/migrations/functions/backfill/global/configs.js +10 -4
- package/dist/migrations/tests/helpers.js +1 -1
- package/dist/migrations/tests/structures.js +1 -1
- package/dist/package.json +9 -8
- package/dist/startup.js +3 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/jest.config.ts +1 -0
- package/package.json +10 -9
- package/scripts/test.sh +12 -0
- package/specs/{generate.js → generate.ts} +7 -9
- package/specs/openapi.json +24 -24
- package/specs/openapi.yaml +24 -24
- package/specs/{parameters.js → parameters.ts} +6 -6
- package/specs/resources/{application.js → application.ts} +4 -4
- package/specs/resources/{index.js → index.ts} +8 -8
- package/specs/resources/{misc.js → misc.ts} +3 -3
- package/specs/resources/{query.js → query.ts} +4 -4
- package/specs/resources/{row.js → row.ts} +3 -4
- package/specs/resources/{table.js → table.ts} +5 -5
- package/specs/resources/{user.js → user.ts} +3 -3
- package/specs/resources/utils/Resource.ts +39 -0
- package/specs/resources/utils/{index.js → index.ts} +1 -1
- package/specs/{security.js → security.ts} +1 -1
- package/src/api/controllers/automation.ts +13 -2
- package/src/api/controllers/cloud.ts +2 -2
- package/src/api/controllers/row/ExternalRequest.ts +95 -28
- package/src/api/controllers/row/external.ts +1 -1
- package/src/api/controllers/row/internalSearch.ts +11 -524
- package/src/api/controllers/row/utils.ts +1 -2
- package/src/api/routes/automation.ts +1 -1
- package/src/api/routes/public/applications.ts +7 -7
- package/src/api/routes/public/queries.ts +2 -2
- package/src/api/routes/public/rows.ts +5 -5
- package/src/api/routes/public/tables.ts +5 -5
- package/src/api/routes/public/tests/{compare.spec.js → compare.spec.ts} +44 -25
- package/src/api/routes/public/users.ts +5 -5
- package/src/api/routes/tests/{cloud.seq.spec.ts → cloud.spec.ts} +13 -20
- package/src/api/routes/tests/utilities/TestFunctions.ts +1 -2
- package/src/app.ts +2 -0
- package/src/db/index.ts +2 -2
- package/src/db/utils.ts +0 -4
- package/src/db/views/staticViews.ts +3 -3
- package/src/definitions/openapi.ts +449 -63
- package/src/integration-test/postgres.spec.ts +351 -81
- package/src/integrations/base/sql.ts +4 -8
- package/src/integrations/googlesheets.ts +21 -22
- package/src/integrations/tests/googlesheets.spec.ts +122 -0
- package/src/middleware/authorized.ts +6 -4
- package/src/middleware/builder.ts +8 -3
- package/src/migrations/functions/backfill/global/configs.ts +15 -9
- package/src/migrations/functions/tests/userEmailViewCasing.spec.js +3 -4
- package/src/migrations/tests/helpers.ts +2 -2
- package/src/migrations/tests/structures.ts +1 -0
- package/src/startup.ts +4 -1
- package/src/tests/jestEnv.ts +1 -0
- package/src/tests/utilities/TestConfiguration.ts +42 -30
- package/src/tests/utilities/structures.ts +0 -2
- package/builder/assets/index.7e76c039.css +0 -6
- package/dist/integrations/base/utils.js +0 -16
- package/specs/resources/utils/Resource.js +0 -26
- package/src/integrations/base/utils.ts +0 -12
package/jest.config.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@budibase/server",
|
|
3
3
|
"email": "hi@budibase.com",
|
|
4
|
-
"version": "2.3.18-alpha.
|
|
4
|
+
"version": "2.3.18-alpha.21",
|
|
5
5
|
"description": "Budibase Web Server",
|
|
6
6
|
"main": "src/index.ts",
|
|
7
7
|
"repository": {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"build:dev": "yarn prebuild && tsc --build --watch --preserveWatchOutput",
|
|
15
15
|
"debug": "yarn build && node --expose-gc --inspect=9222 dist/index.js",
|
|
16
16
|
"postbuild": "copyfiles -u 1 src/**/*.svelte dist/ && copyfiles -u 1 src/**/*.hbs dist/ && copyfiles -u 1 src/**/*.json dist/",
|
|
17
|
-
"test": "
|
|
17
|
+
"test": "bash scripts/test.sh",
|
|
18
18
|
"test:watch": "jest --watch",
|
|
19
19
|
"predocker": "copyfiles -f ../client/dist/budibase-client.js ../client/manifest.json client",
|
|
20
20
|
"build:docker": "yarn run predocker && docker build . -t app-service --label version=$BUDIBASE_RELEASE_VERSION",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"dev:stack:down": "node scripts/dev/manage.js down",
|
|
26
26
|
"dev:stack:nuke": "node scripts/dev/manage.js nuke",
|
|
27
27
|
"dev:builder": "yarn run dev:stack:up && nodemon",
|
|
28
|
-
"specs": "node specs/generate.
|
|
28
|
+
"specs": "ts-node specs/generate.ts && openapi-typescript specs/openapi.yaml --output src/definitions/openapi.ts",
|
|
29
29
|
"initialise": "node scripts/initialise.js",
|
|
30
30
|
"env:multi:enable": "node scripts/multiTenancy.js enable",
|
|
31
31
|
"env:multi:disable": "node scripts/multiTenancy.js disable",
|
|
@@ -43,11 +43,11 @@
|
|
|
43
43
|
"license": "GPL-3.0",
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@apidevtools/swagger-parser": "10.0.3",
|
|
46
|
-
"@budibase/backend-core": "2.3.18-alpha.
|
|
47
|
-
"@budibase/client": "2.3.18-alpha.
|
|
48
|
-
"@budibase/pro": "2.3.18-alpha.
|
|
49
|
-
"@budibase/string-templates": "2.3.18-alpha.
|
|
50
|
-
"@budibase/types": "2.3.18-alpha.
|
|
46
|
+
"@budibase/backend-core": "2.3.18-alpha.21",
|
|
47
|
+
"@budibase/client": "2.3.18-alpha.21",
|
|
48
|
+
"@budibase/pro": "2.3.18-alpha.20",
|
|
49
|
+
"@budibase/string-templates": "2.3.18-alpha.21",
|
|
50
|
+
"@budibase/types": "2.3.18-alpha.21",
|
|
51
51
|
"@bull-board/api": "3.7.0",
|
|
52
52
|
"@bull-board/koa": "3.9.4",
|
|
53
53
|
"@elastic/elasticsearch": "7.10.0",
|
|
@@ -87,6 +87,7 @@
|
|
|
87
87
|
"koa-send": "5.0.0",
|
|
88
88
|
"koa-session": "5.12.0",
|
|
89
89
|
"koa-static": "5.0.0",
|
|
90
|
+
"koa-useragent": "^4.1.0",
|
|
90
91
|
"koa2-ratelimit": "1.1.1",
|
|
91
92
|
"lodash": "4.17.21",
|
|
92
93
|
"memorystream": "0.3.1",
|
|
@@ -173,5 +174,5 @@
|
|
|
173
174
|
"optionalDependencies": {
|
|
174
175
|
"oracledb": "5.3.0"
|
|
175
176
|
},
|
|
176
|
-
"gitHead": "
|
|
177
|
+
"gitHead": "2dfb0df2890303846ae7e6835b7d570aad57f775"
|
|
177
178
|
}
|
package/scripts/test.sh
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
if [[ -n $CI ]]
|
|
4
|
+
then
|
|
5
|
+
# --runInBand performs better in ci where resources are limited
|
|
6
|
+
echo "jest --coverage --runInBand"
|
|
7
|
+
jest --coverage --runInBand
|
|
8
|
+
else
|
|
9
|
+
# --maxWorkers performs better in development
|
|
10
|
+
echo "jest --coverage --maxWorkers=2"
|
|
11
|
+
jest --coverage --maxWorkers=2
|
|
12
|
+
fi
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { join } from "path"
|
|
2
|
+
import { writeFileSync } from "fs"
|
|
3
|
+
import { examples, schemas } from "./resources"
|
|
4
|
+
import * as parameters from "./parameters"
|
|
5
|
+
import * as security from "./security"
|
|
1
6
|
const swaggerJsdoc = require("swagger-jsdoc")
|
|
2
|
-
const { join } = require("path")
|
|
3
|
-
const { writeFileSync } = require("fs")
|
|
4
|
-
const { examples, schemas } = require("./resources")
|
|
5
|
-
const parameters = require("./parameters")
|
|
6
|
-
const security = require("./security")
|
|
7
7
|
|
|
8
8
|
const VARIABLES = {}
|
|
9
9
|
|
|
@@ -60,7 +60,7 @@ const options = {
|
|
|
60
60
|
apis: [join(__dirname, "..", "src", "api", "routes", "public", "*.ts")],
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
function writeFile(output, filename) {
|
|
63
|
+
function writeFile(output: any, filename: string) {
|
|
64
64
|
try {
|
|
65
65
|
const path = join(__dirname, filename)
|
|
66
66
|
let spec = output
|
|
@@ -79,7 +79,7 @@ function writeFile(output, filename) {
|
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
function run() {
|
|
82
|
+
export function run() {
|
|
83
83
|
const outputJSON = swaggerJsdoc(options)
|
|
84
84
|
options.format = ".yaml"
|
|
85
85
|
const outputYAML = swaggerJsdoc(options)
|
|
@@ -90,5 +90,3 @@ function run() {
|
|
|
90
90
|
if (require.main === module) {
|
|
91
91
|
run()
|
|
92
92
|
}
|
|
93
|
-
|
|
94
|
-
module.exports = run
|
package/specs/openapi.json
CHANGED
|
@@ -1829,7 +1829,7 @@
|
|
|
1829
1829
|
"paths": {
|
|
1830
1830
|
"/applications": {
|
|
1831
1831
|
"post": {
|
|
1832
|
-
"operationId": "
|
|
1832
|
+
"operationId": "appCreate",
|
|
1833
1833
|
"summary": "Create an application",
|
|
1834
1834
|
"tags": [
|
|
1835
1835
|
"applications"
|
|
@@ -1870,7 +1870,7 @@
|
|
|
1870
1870
|
},
|
|
1871
1871
|
"/applications/{appId}": {
|
|
1872
1872
|
"put": {
|
|
1873
|
-
"operationId": "
|
|
1873
|
+
"operationId": "appUpdate",
|
|
1874
1874
|
"summary": "Update an application",
|
|
1875
1875
|
"tags": [
|
|
1876
1876
|
"applications"
|
|
@@ -1909,7 +1909,7 @@
|
|
|
1909
1909
|
}
|
|
1910
1910
|
},
|
|
1911
1911
|
"delete": {
|
|
1912
|
-
"operationId": "
|
|
1912
|
+
"operationId": "appDestroy",
|
|
1913
1913
|
"summary": "Delete an application",
|
|
1914
1914
|
"tags": [
|
|
1915
1915
|
"applications"
|
|
@@ -1938,7 +1938,7 @@
|
|
|
1938
1938
|
}
|
|
1939
1939
|
},
|
|
1940
1940
|
"get": {
|
|
1941
|
-
"operationId": "
|
|
1941
|
+
"operationId": "appGetById",
|
|
1942
1942
|
"summary": "Retrieve an application",
|
|
1943
1943
|
"tags": [
|
|
1944
1944
|
"applications"
|
|
@@ -1969,7 +1969,7 @@
|
|
|
1969
1969
|
},
|
|
1970
1970
|
"/applications/{appId}/unpublish": {
|
|
1971
1971
|
"post": {
|
|
1972
|
-
"operationId": "
|
|
1972
|
+
"operationId": "appUnpublish",
|
|
1973
1973
|
"summary": "Unpublish an application",
|
|
1974
1974
|
"tags": [
|
|
1975
1975
|
"applications"
|
|
@@ -1988,7 +1988,7 @@
|
|
|
1988
1988
|
},
|
|
1989
1989
|
"/applications/{appId}/publish": {
|
|
1990
1990
|
"post": {
|
|
1991
|
-
"operationId": "
|
|
1991
|
+
"operationId": "appPublish",
|
|
1992
1992
|
"summary": "Unpublish an application",
|
|
1993
1993
|
"tags": [
|
|
1994
1994
|
"applications"
|
|
@@ -2019,7 +2019,7 @@
|
|
|
2019
2019
|
},
|
|
2020
2020
|
"/applications/search": {
|
|
2021
2021
|
"post": {
|
|
2022
|
-
"operationId": "
|
|
2022
|
+
"operationId": "appSearch",
|
|
2023
2023
|
"summary": "Search for applications",
|
|
2024
2024
|
"description": "Based on application properties (currently only name) search for applications.",
|
|
2025
2025
|
"tags": [
|
|
@@ -2056,7 +2056,7 @@
|
|
|
2056
2056
|
},
|
|
2057
2057
|
"/queries/{queryId}": {
|
|
2058
2058
|
"post": {
|
|
2059
|
-
"operationId": "
|
|
2059
|
+
"operationId": "queryExecute",
|
|
2060
2060
|
"summary": "Execute a query",
|
|
2061
2061
|
"description": "Queries which have been created within a Budibase app can be executed using this,",
|
|
2062
2062
|
"tags": [
|
|
@@ -2104,7 +2104,7 @@
|
|
|
2104
2104
|
},
|
|
2105
2105
|
"/queries/search": {
|
|
2106
2106
|
"post": {
|
|
2107
|
-
"operationId": "
|
|
2107
|
+
"operationId": "querySearch",
|
|
2108
2108
|
"summary": "Search for queries",
|
|
2109
2109
|
"description": "Based on query properties (currently only name) search for queries.",
|
|
2110
2110
|
"tags": [
|
|
@@ -2146,7 +2146,7 @@
|
|
|
2146
2146
|
},
|
|
2147
2147
|
"/tables/{tableId}/rows": {
|
|
2148
2148
|
"post": {
|
|
2149
|
-
"operationId": "
|
|
2149
|
+
"operationId": "rowCreate",
|
|
2150
2150
|
"summary": "Create a row",
|
|
2151
2151
|
"description": "Creates a row within the specified table.",
|
|
2152
2152
|
"tags": [
|
|
@@ -2196,7 +2196,7 @@
|
|
|
2196
2196
|
},
|
|
2197
2197
|
"/tables/{tableId}/rows/{rowId}": {
|
|
2198
2198
|
"put": {
|
|
2199
|
-
"operationId": "
|
|
2199
|
+
"operationId": "rowUpdate",
|
|
2200
2200
|
"summary": "Update a row",
|
|
2201
2201
|
"description": "Updates a row within the specified table.",
|
|
2202
2202
|
"tags": [
|
|
@@ -2247,7 +2247,7 @@
|
|
|
2247
2247
|
}
|
|
2248
2248
|
},
|
|
2249
2249
|
"delete": {
|
|
2250
|
-
"operationId": "
|
|
2250
|
+
"operationId": "rowDestroy",
|
|
2251
2251
|
"summary": "Delete a row",
|
|
2252
2252
|
"description": "Deletes a row within the specified table.",
|
|
2253
2253
|
"tags": [
|
|
@@ -2283,7 +2283,7 @@
|
|
|
2283
2283
|
}
|
|
2284
2284
|
},
|
|
2285
2285
|
"get": {
|
|
2286
|
-
"operationId": "
|
|
2286
|
+
"operationId": "rowGetById",
|
|
2287
2287
|
"summary": "Retrieve a row",
|
|
2288
2288
|
"description": "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.",
|
|
2289
2289
|
"tags": [
|
|
@@ -2321,7 +2321,7 @@
|
|
|
2321
2321
|
},
|
|
2322
2322
|
"/tables/{tableId}/rows/search": {
|
|
2323
2323
|
"post": {
|
|
2324
|
-
"operationId": "
|
|
2324
|
+
"operationId": "rowSearch",
|
|
2325
2325
|
"summary": "Search for rows",
|
|
2326
2326
|
"tags": [
|
|
2327
2327
|
"rows"
|
|
@@ -2365,7 +2365,7 @@
|
|
|
2365
2365
|
},
|
|
2366
2366
|
"/tables": {
|
|
2367
2367
|
"post": {
|
|
2368
|
-
"operationId": "
|
|
2368
|
+
"operationId": "tableCreate",
|
|
2369
2369
|
"summary": "Create a table",
|
|
2370
2370
|
"description": "Create a table, this could be internal or external.",
|
|
2371
2371
|
"tags": [
|
|
@@ -2411,7 +2411,7 @@
|
|
|
2411
2411
|
},
|
|
2412
2412
|
"/tables/{tableId}": {
|
|
2413
2413
|
"put": {
|
|
2414
|
-
"operationId": "
|
|
2414
|
+
"operationId": "tableUpdate",
|
|
2415
2415
|
"summary": "Update a table",
|
|
2416
2416
|
"description": "Update a table, this could be internal or external.",
|
|
2417
2417
|
"tags": [
|
|
@@ -2458,7 +2458,7 @@
|
|
|
2458
2458
|
}
|
|
2459
2459
|
},
|
|
2460
2460
|
"delete": {
|
|
2461
|
-
"operationId": "
|
|
2461
|
+
"operationId": "tableDestroy",
|
|
2462
2462
|
"summary": "Delete a table",
|
|
2463
2463
|
"description": "Delete a table, this could be internal or external.",
|
|
2464
2464
|
"tags": [
|
|
@@ -2491,7 +2491,7 @@
|
|
|
2491
2491
|
}
|
|
2492
2492
|
},
|
|
2493
2493
|
"get": {
|
|
2494
|
-
"operationId": "
|
|
2494
|
+
"operationId": "tableGetById",
|
|
2495
2495
|
"summary": "Retrieve a table",
|
|
2496
2496
|
"description": "Lookup a table, this could be internal or external.",
|
|
2497
2497
|
"tags": [
|
|
@@ -2526,7 +2526,7 @@
|
|
|
2526
2526
|
},
|
|
2527
2527
|
"/tables/search": {
|
|
2528
2528
|
"post": {
|
|
2529
|
-
"operationId": "
|
|
2529
|
+
"operationId": "tableSearch",
|
|
2530
2530
|
"summary": "Search for tables",
|
|
2531
2531
|
"description": "Based on table properties (currently only name) search for tables. This could be an internal or an external table.",
|
|
2532
2532
|
"tags": [
|
|
@@ -2568,7 +2568,7 @@
|
|
|
2568
2568
|
},
|
|
2569
2569
|
"/users": {
|
|
2570
2570
|
"post": {
|
|
2571
|
-
"operationId": "
|
|
2571
|
+
"operationId": "userCreate",
|
|
2572
2572
|
"summary": "Create a user",
|
|
2573
2573
|
"tags": [
|
|
2574
2574
|
"users"
|
|
@@ -2604,7 +2604,7 @@
|
|
|
2604
2604
|
},
|
|
2605
2605
|
"/users/{userId}": {
|
|
2606
2606
|
"put": {
|
|
2607
|
-
"operationId": "
|
|
2607
|
+
"operationId": "userUpdate",
|
|
2608
2608
|
"summary": "Update a user",
|
|
2609
2609
|
"tags": [
|
|
2610
2610
|
"users"
|
|
@@ -2643,7 +2643,7 @@
|
|
|
2643
2643
|
}
|
|
2644
2644
|
},
|
|
2645
2645
|
"delete": {
|
|
2646
|
-
"operationId": "
|
|
2646
|
+
"operationId": "userDestroy",
|
|
2647
2647
|
"summary": "Delete a user",
|
|
2648
2648
|
"tags": [
|
|
2649
2649
|
"users"
|
|
@@ -2672,7 +2672,7 @@
|
|
|
2672
2672
|
}
|
|
2673
2673
|
},
|
|
2674
2674
|
"get": {
|
|
2675
|
-
"operationId": "
|
|
2675
|
+
"operationId": "userGetById",
|
|
2676
2676
|
"summary": "Retrieve a user",
|
|
2677
2677
|
"tags": [
|
|
2678
2678
|
"users"
|
|
@@ -2703,7 +2703,7 @@
|
|
|
2703
2703
|
},
|
|
2704
2704
|
"/users/search": {
|
|
2705
2705
|
"post": {
|
|
2706
|
-
"operationId": "
|
|
2706
|
+
"operationId": "userSearch",
|
|
2707
2707
|
"summary": "Search for users",
|
|
2708
2708
|
"description": "Based on user properties (currently only name) search for users.",
|
|
2709
2709
|
"tags": [
|
package/specs/openapi.yaml
CHANGED
|
@@ -1397,7 +1397,7 @@ security:
|
|
|
1397
1397
|
paths:
|
|
1398
1398
|
/applications:
|
|
1399
1399
|
post:
|
|
1400
|
-
operationId:
|
|
1400
|
+
operationId: appCreate
|
|
1401
1401
|
summary: Create an application
|
|
1402
1402
|
tags:
|
|
1403
1403
|
- applications
|
|
@@ -1421,7 +1421,7 @@ paths:
|
|
|
1421
1421
|
$ref: "#/components/examples/application"
|
|
1422
1422
|
"/applications/{appId}":
|
|
1423
1423
|
put:
|
|
1424
|
-
operationId:
|
|
1424
|
+
operationId: appUpdate
|
|
1425
1425
|
summary: Update an application
|
|
1426
1426
|
tags:
|
|
1427
1427
|
- applications
|
|
@@ -1444,7 +1444,7 @@ paths:
|
|
|
1444
1444
|
application:
|
|
1445
1445
|
$ref: "#/components/examples/application"
|
|
1446
1446
|
delete:
|
|
1447
|
-
operationId:
|
|
1447
|
+
operationId: appDestroy
|
|
1448
1448
|
summary: Delete an application
|
|
1449
1449
|
tags:
|
|
1450
1450
|
- applications
|
|
@@ -1461,7 +1461,7 @@ paths:
|
|
|
1461
1461
|
application:
|
|
1462
1462
|
$ref: "#/components/examples/application"
|
|
1463
1463
|
get:
|
|
1464
|
-
operationId:
|
|
1464
|
+
operationId: appGetById
|
|
1465
1465
|
summary: Retrieve an application
|
|
1466
1466
|
tags:
|
|
1467
1467
|
- applications
|
|
@@ -1479,7 +1479,7 @@ paths:
|
|
|
1479
1479
|
$ref: "#/components/examples/application"
|
|
1480
1480
|
"/applications/{appId}/unpublish":
|
|
1481
1481
|
post:
|
|
1482
|
-
operationId:
|
|
1482
|
+
operationId: appUnpublish
|
|
1483
1483
|
summary: Unpublish an application
|
|
1484
1484
|
tags:
|
|
1485
1485
|
- applications
|
|
@@ -1490,7 +1490,7 @@ paths:
|
|
|
1490
1490
|
description: The app was published successfully.
|
|
1491
1491
|
"/applications/{appId}/publish":
|
|
1492
1492
|
post:
|
|
1493
|
-
operationId:
|
|
1493
|
+
operationId: appPublish
|
|
1494
1494
|
summary: Unpublish an application
|
|
1495
1495
|
tags:
|
|
1496
1496
|
- applications
|
|
@@ -1508,7 +1508,7 @@ paths:
|
|
|
1508
1508
|
$ref: "#/components/examples/deploymentOutput"
|
|
1509
1509
|
/applications/search:
|
|
1510
1510
|
post:
|
|
1511
|
-
operationId:
|
|
1511
|
+
operationId: appSearch
|
|
1512
1512
|
summary: Search for applications
|
|
1513
1513
|
description: Based on application properties (currently only name) search for
|
|
1514
1514
|
applications.
|
|
@@ -1533,7 +1533,7 @@ paths:
|
|
|
1533
1533
|
$ref: "#/components/examples/applications"
|
|
1534
1534
|
"/queries/{queryId}":
|
|
1535
1535
|
post:
|
|
1536
|
-
operationId:
|
|
1536
|
+
operationId: queryExecute
|
|
1537
1537
|
summary: Execute a query
|
|
1538
1538
|
description: Queries which have been created within a Budibase app can be
|
|
1539
1539
|
executed using this,
|
|
@@ -1562,7 +1562,7 @@ paths:
|
|
|
1562
1562
|
$ref: "#/components/examples/sqlResponse"
|
|
1563
1563
|
/queries/search:
|
|
1564
1564
|
post:
|
|
1565
|
-
operationId:
|
|
1565
|
+
operationId: querySearch
|
|
1566
1566
|
summary: Search for queries
|
|
1567
1567
|
description: Based on query properties (currently only name) search for queries.
|
|
1568
1568
|
tags:
|
|
@@ -1587,7 +1587,7 @@ paths:
|
|
|
1587
1587
|
$ref: "#/components/examples/queries"
|
|
1588
1588
|
"/tables/{tableId}/rows":
|
|
1589
1589
|
post:
|
|
1590
|
-
operationId:
|
|
1590
|
+
operationId: rowCreate
|
|
1591
1591
|
summary: Create a row
|
|
1592
1592
|
description: Creates a row within the specified table.
|
|
1593
1593
|
tags:
|
|
@@ -1618,7 +1618,7 @@ paths:
|
|
|
1618
1618
|
$ref: "#/components/examples/row"
|
|
1619
1619
|
"/tables/{tableId}/rows/{rowId}":
|
|
1620
1620
|
put:
|
|
1621
|
-
operationId:
|
|
1621
|
+
operationId: rowUpdate
|
|
1622
1622
|
summary: Update a row
|
|
1623
1623
|
description: Updates a row within the specified table.
|
|
1624
1624
|
tags:
|
|
@@ -1648,7 +1648,7 @@ paths:
|
|
|
1648
1648
|
row:
|
|
1649
1649
|
$ref: "#/components/examples/row"
|
|
1650
1650
|
delete:
|
|
1651
|
-
operationId:
|
|
1651
|
+
operationId: rowDestroy
|
|
1652
1652
|
summary: Delete a row
|
|
1653
1653
|
description: Deletes a row within the specified table.
|
|
1654
1654
|
tags:
|
|
@@ -1669,7 +1669,7 @@ paths:
|
|
|
1669
1669
|
row:
|
|
1670
1670
|
$ref: "#/components/examples/row"
|
|
1671
1671
|
get:
|
|
1672
|
-
operationId:
|
|
1672
|
+
operationId: rowGetById
|
|
1673
1673
|
summary: Retrieve a row
|
|
1674
1674
|
description: This gets a single row, it will be enriched with the full related
|
|
1675
1675
|
rows, rather than the squashed "primaryDisplay" format returned by the
|
|
@@ -1692,7 +1692,7 @@ paths:
|
|
|
1692
1692
|
$ref: "#/components/examples/enrichedRow"
|
|
1693
1693
|
"/tables/{tableId}/rows/search":
|
|
1694
1694
|
post:
|
|
1695
|
-
operationId:
|
|
1695
|
+
operationId: rowSearch
|
|
1696
1696
|
summary: Search for rows
|
|
1697
1697
|
tags:
|
|
1698
1698
|
- rows
|
|
@@ -1718,7 +1718,7 @@ paths:
|
|
|
1718
1718
|
$ref: "#/components/examples/rows"
|
|
1719
1719
|
/tables:
|
|
1720
1720
|
post:
|
|
1721
|
-
operationId:
|
|
1721
|
+
operationId: tableCreate
|
|
1722
1722
|
summary: Create a table
|
|
1723
1723
|
description: Create a table, this could be internal or external.
|
|
1724
1724
|
tags:
|
|
@@ -1746,7 +1746,7 @@ paths:
|
|
|
1746
1746
|
$ref: "#/components/examples/table"
|
|
1747
1747
|
"/tables/{tableId}":
|
|
1748
1748
|
put:
|
|
1749
|
-
operationId:
|
|
1749
|
+
operationId: tableUpdate
|
|
1750
1750
|
summary: Update a table
|
|
1751
1751
|
description: Update a table, this could be internal or external.
|
|
1752
1752
|
tags:
|
|
@@ -1773,7 +1773,7 @@ paths:
|
|
|
1773
1773
|
table:
|
|
1774
1774
|
$ref: "#/components/examples/table"
|
|
1775
1775
|
delete:
|
|
1776
|
-
operationId:
|
|
1776
|
+
operationId: tableDestroy
|
|
1777
1777
|
summary: Delete a table
|
|
1778
1778
|
description: Delete a table, this could be internal or external.
|
|
1779
1779
|
tags:
|
|
@@ -1792,7 +1792,7 @@ paths:
|
|
|
1792
1792
|
table:
|
|
1793
1793
|
$ref: "#/components/examples/table"
|
|
1794
1794
|
get:
|
|
1795
|
-
operationId:
|
|
1795
|
+
operationId: tableGetById
|
|
1796
1796
|
summary: Retrieve a table
|
|
1797
1797
|
description: Lookup a table, this could be internal or external.
|
|
1798
1798
|
tags:
|
|
@@ -1812,7 +1812,7 @@ paths:
|
|
|
1812
1812
|
$ref: "#/components/examples/table"
|
|
1813
1813
|
/tables/search:
|
|
1814
1814
|
post:
|
|
1815
|
-
operationId:
|
|
1815
|
+
operationId: tableSearch
|
|
1816
1816
|
summary: Search for tables
|
|
1817
1817
|
description: Based on table properties (currently only name) search for tables.
|
|
1818
1818
|
This could be an internal or an external table.
|
|
@@ -1838,7 +1838,7 @@ paths:
|
|
|
1838
1838
|
$ref: "#/components/examples/tables"
|
|
1839
1839
|
/users:
|
|
1840
1840
|
post:
|
|
1841
|
-
operationId:
|
|
1841
|
+
operationId: userCreate
|
|
1842
1842
|
summary: Create a user
|
|
1843
1843
|
tags:
|
|
1844
1844
|
- users
|
|
@@ -1860,7 +1860,7 @@ paths:
|
|
|
1860
1860
|
$ref: "#/components/examples/user"
|
|
1861
1861
|
"/users/{userId}":
|
|
1862
1862
|
put:
|
|
1863
|
-
operationId:
|
|
1863
|
+
operationId: userUpdate
|
|
1864
1864
|
summary: Update a user
|
|
1865
1865
|
tags:
|
|
1866
1866
|
- users
|
|
@@ -1883,7 +1883,7 @@ paths:
|
|
|
1883
1883
|
user:
|
|
1884
1884
|
$ref: "#/components/examples/user"
|
|
1885
1885
|
delete:
|
|
1886
|
-
operationId:
|
|
1886
|
+
operationId: userDestroy
|
|
1887
1887
|
summary: Delete a user
|
|
1888
1888
|
tags:
|
|
1889
1889
|
- users
|
|
@@ -1900,7 +1900,7 @@ paths:
|
|
|
1900
1900
|
user:
|
|
1901
1901
|
$ref: "#/components/examples/user"
|
|
1902
1902
|
get:
|
|
1903
|
-
operationId:
|
|
1903
|
+
operationId: userGetById
|
|
1904
1904
|
summary: Retrieve a user
|
|
1905
1905
|
tags:
|
|
1906
1906
|
- users
|
|
@@ -1918,7 +1918,7 @@ paths:
|
|
|
1918
1918
|
$ref: "#/components/examples/user"
|
|
1919
1919
|
/users/search:
|
|
1920
1920
|
post:
|
|
1921
|
-
operationId:
|
|
1921
|
+
operationId: userSearch
|
|
1922
1922
|
summary: Search for users
|
|
1923
1923
|
description: Based on user properties (currently only name) search for users.
|
|
1924
1924
|
tags:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
export const tableId = {
|
|
2
2
|
in: "path",
|
|
3
3
|
name: "tableId",
|
|
4
4
|
required: true,
|
|
@@ -8,7 +8,7 @@ exports.tableId = {
|
|
|
8
8
|
},
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
export const rowId = {
|
|
12
12
|
in: "path",
|
|
13
13
|
name: "rowId",
|
|
14
14
|
required: true,
|
|
@@ -18,7 +18,7 @@ exports.rowId = {
|
|
|
18
18
|
},
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
export const appId = {
|
|
22
22
|
in: "header",
|
|
23
23
|
name: "x-budibase-app-id",
|
|
24
24
|
required: true,
|
|
@@ -28,7 +28,7 @@ exports.appId = {
|
|
|
28
28
|
},
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
export const appIdUrl = {
|
|
32
32
|
in: "path",
|
|
33
33
|
name: "appId",
|
|
34
34
|
required: true,
|
|
@@ -38,7 +38,7 @@ exports.appIdUrl = {
|
|
|
38
38
|
},
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
export const queryId = {
|
|
42
42
|
in: "path",
|
|
43
43
|
name: "queryId",
|
|
44
44
|
required: true,
|
|
@@ -48,7 +48,7 @@ exports.queryId = {
|
|
|
48
48
|
},
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
export const userId = {
|
|
52
52
|
in: "path",
|
|
53
53
|
name: "userId",
|
|
54
54
|
required: true,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import userResource from "./user"
|
|
2
|
+
import { object } from "./utils"
|
|
3
|
+
import Resource from "./utils/Resource"
|
|
4
4
|
|
|
5
5
|
const application = {
|
|
6
6
|
_id: "app_metadata",
|
|
@@ -96,7 +96,7 @@ const deploymentOutputSchema = object({
|
|
|
96
96
|
},
|
|
97
97
|
})
|
|
98
98
|
|
|
99
|
-
|
|
99
|
+
export default new Resource()
|
|
100
100
|
.setExamples({
|
|
101
101
|
application: {
|
|
102
102
|
value: {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import application from "./application"
|
|
2
|
+
import row from "./row"
|
|
3
|
+
import table from "./table"
|
|
4
|
+
import query from "./query"
|
|
5
|
+
import user from "./user"
|
|
6
|
+
import misc from "./misc"
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
export const examples = {
|
|
9
9
|
...application.getExamples(),
|
|
10
10
|
...row.getExamples(),
|
|
11
11
|
...table.getExamples(),
|
|
@@ -14,7 +14,7 @@ exports.examples = {
|
|
|
14
14
|
...misc.getExamples(),
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
export const schemas = {
|
|
18
18
|
...application.getSchemas(),
|
|
19
19
|
...row.getSchemas(),
|
|
20
20
|
...table.getSchemas(),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { object } from "./utils"
|
|
2
|
+
import Resource from "./utils/Resource"
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
export default new Resource().setSchemas({
|
|
5
5
|
rowSearch: object(
|
|
6
6
|
{
|
|
7
7
|
query: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import Resource from "./utils/Resource"
|
|
2
|
+
import { object } from "./utils"
|
|
3
|
+
import { BaseQueryVerbs } from "../../src/constants"
|
|
4
4
|
|
|
5
5
|
const query = {
|
|
6
6
|
_id: "query_datasource_plus_4d8be0c506b9465daf4bf84d890fdab6_454854487c574d45bc4029b1e153219e",
|
|
@@ -189,7 +189,7 @@ const executeQueryOutputSchema = object(
|
|
|
189
189
|
{ required: ["data"] }
|
|
190
190
|
)
|
|
191
191
|
|
|
192
|
-
|
|
192
|
+
export default new Resource()
|
|
193
193
|
.setExamples({
|
|
194
194
|
query: {
|
|
195
195
|
value: {
|