@budibase/server 2.3.18-alpha.17 → 2.3.18-alpha.19

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 (32) hide show
  1. package/builder/assets/{index.57df7f7b.js → index.db0385d0.js} +300 -300
  2. package/builder/index.html +1 -1
  3. package/dist/api/routes/public/applications.js +7 -7
  4. package/dist/api/routes/public/queries.js +2 -2
  5. package/dist/api/routes/public/rows.js +5 -5
  6. package/dist/api/routes/public/tables.js +5 -5
  7. package/dist/api/routes/public/users.js +5 -5
  8. package/dist/package.json +7 -7
  9. package/dist/tsconfig.build.tsbuildinfo +1 -1
  10. package/package.json +8 -8
  11. package/specs/{generate.js → generate.ts} +7 -9
  12. package/specs/openapi.json +24 -24
  13. package/specs/openapi.yaml +24 -24
  14. package/specs/{parameters.js → parameters.ts} +6 -6
  15. package/specs/resources/{application.js → application.ts} +4 -4
  16. package/specs/resources/{index.js → index.ts} +8 -8
  17. package/specs/resources/{misc.js → misc.ts} +3 -3
  18. package/specs/resources/{query.js → query.ts} +4 -4
  19. package/specs/resources/{row.js → row.ts} +3 -4
  20. package/specs/resources/{table.js → table.ts} +5 -5
  21. package/specs/resources/{user.js → user.ts} +3 -3
  22. package/specs/resources/utils/Resource.ts +39 -0
  23. package/specs/resources/utils/{index.js → index.ts} +1 -1
  24. package/specs/{security.js → security.ts} +1 -1
  25. package/src/api/routes/public/applications.ts +7 -7
  26. package/src/api/routes/public/queries.ts +2 -2
  27. package/src/api/routes/public/rows.ts +5 -5
  28. package/src/api/routes/public/tables.ts +5 -5
  29. package/src/api/routes/public/tests/{compare.spec.js → compare.spec.ts} +44 -25
  30. package/src/api/routes/public/users.ts +5 -5
  31. package/src/definitions/openapi.ts +449 -63
  32. package/specs/resources/utils/Resource.js +0 -26
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.17",
4
+ "version": "2.3.18-alpha.19",
5
5
  "description": "Budibase Web Server",
6
6
  "main": "src/index.ts",
7
7
  "repository": {
@@ -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.js && openapi-typescript specs/openapi.yaml --output src/definitions/openapi.ts",
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.17",
47
- "@budibase/client": "2.3.18-alpha.17",
48
- "@budibase/pro": "2.3.18-alpha.16",
49
- "@budibase/string-templates": "2.3.18-alpha.17",
50
- "@budibase/types": "2.3.18-alpha.17",
46
+ "@budibase/backend-core": "2.3.18-alpha.19",
47
+ "@budibase/client": "2.3.18-alpha.19",
48
+ "@budibase/pro": "2.3.18-alpha.18",
49
+ "@budibase/string-templates": "2.3.18-alpha.19",
50
+ "@budibase/types": "2.3.18-alpha.19",
51
51
  "@bull-board/api": "3.7.0",
52
52
  "@bull-board/koa": "3.9.4",
53
53
  "@elastic/elasticsearch": "7.10.0",
@@ -174,5 +174,5 @@
174
174
  "optionalDependencies": {
175
175
  "oracledb": "5.3.0"
176
176
  },
177
- "gitHead": "f703ebb73409290aa949c240c51b95c7ce3826c8"
177
+ "gitHead": "268860d6e1fe4e151e9144178489d77625225f6a"
178
178
  }
@@ -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
@@ -1829,7 +1829,7 @@
1829
1829
  "paths": {
1830
1830
  "/applications": {
1831
1831
  "post": {
1832
- "operationId": "create",
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": "update",
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": "destroy",
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": "getById",
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": "unpublish",
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": "publish",
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": "search",
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": "execute",
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": "search",
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": "create",
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": "update",
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": "destroy",
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": "getById",
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": "search",
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": "create",
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": "update",
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": "destroy",
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": "getById",
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": "search",
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": "create",
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": "update",
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": "destroy",
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": "getById",
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": "search",
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": [
@@ -1397,7 +1397,7 @@ security:
1397
1397
  paths:
1398
1398
  /applications:
1399
1399
  post:
1400
- operationId: create
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: update
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: destroy
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: getById
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: unpublish
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: publish
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: search
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: execute
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: search
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: create
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: update
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: destroy
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: getById
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: search
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: create
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: update
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: destroy
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: getById
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: search
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: create
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: update
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: destroy
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: getById
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: search
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
- exports.tableId = {
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
- exports.rowId = {
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
- exports.appId = {
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
- exports.appIdUrl = {
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
- exports.queryId = {
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
- exports.userId = {
51
+ export const userId = {
52
52
  in: "path",
53
53
  name: "userId",
54
54
  required: true,
@@ -1,6 +1,6 @@
1
- const userResource = require("./user")
2
- const { object } = require("./utils")
3
- const Resource = require("./utils/Resource")
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
- module.exports = new Resource()
99
+ export default new Resource()
100
100
  .setExamples({
101
101
  application: {
102
102
  value: {
@@ -1,11 +1,11 @@
1
- const application = require("./application")
2
- const row = require("./row")
3
- const table = require("./table")
4
- const query = require("./query")
5
- const user = require("./user")
6
- const misc = require("./misc")
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
- exports.examples = {
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
- exports.schemas = {
17
+ export const schemas = {
18
18
  ...application.getSchemas(),
19
19
  ...row.getSchemas(),
20
20
  ...table.getSchemas(),
@@ -1,7 +1,7 @@
1
- const { object } = require("./utils")
2
- const Resource = require("./utils/Resource")
1
+ import { object } from "./utils"
2
+ import Resource from "./utils/Resource"
3
3
 
4
- module.exports = new Resource().setSchemas({
4
+ export default new Resource().setSchemas({
5
5
  rowSearch: object(
6
6
  {
7
7
  query: {
@@ -1,6 +1,6 @@
1
- const Resource = require("./utils/Resource")
2
- const { object } = require("./utils")
3
- const { BaseQueryVerbs } = require("../../src/constants")
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
- module.exports = new Resource()
192
+ export default new Resource()
193
193
  .setExamples({
194
194
  query: {
195
195
  value: {
@@ -1,5 +1,5 @@
1
- const { object } = require("./utils")
2
- const Resource = require("./utils/Resource")
1
+ import { object } from "./utils"
2
+ import Resource from "./utils/Resource"
3
3
 
4
4
  const baseRow = {
5
5
  _id: "ro_ta_5b1649e42a5b41dea4ef7742a36a7a70_e6dc7e38cf1343b2b56760265201cda4",
@@ -56,7 +56,6 @@ const rowSchema = {
56
56
  const rowOutputSchema = {
57
57
  ...rowSchema,
58
58
  properties: {
59
- ...rowSchema.properties,
60
59
  _id: {
61
60
  description: "The ID of the row.",
62
61
  type: "string",
@@ -93,7 +92,7 @@ const searchOutputSchema = {
93
92
  },
94
93
  }
95
94
 
96
- module.exports = new Resource()
95
+ export default new Resource()
97
96
  .setExamples({
98
97
  inputRow: {
99
98
  value: inputRow,
@@ -1,10 +1,10 @@
1
- const {
1
+ import {
2
2
  FieldTypes,
3
3
  RelationshipTypes,
4
4
  FormulaTypes,
5
- } = require("../../src/constants")
6
- const { object } = require("./utils")
7
- const Resource = require("./utils/Resource")
5
+ } from "../../src/constants"
6
+ import { object } from "./utils"
7
+ import Resource from "./utils/Resource"
8
8
 
9
9
  const table = {
10
10
  _id: "ta_5b1649e42a5b41dea4ef7742a36a7a70",
@@ -170,7 +170,7 @@ const tableOutputSchema = {
170
170
  required: [...tableSchema.required, "_id"],
171
171
  }
172
172
 
173
- module.exports = new Resource()
173
+ export default new Resource()
174
174
  .setExamples({
175
175
  table: {
176
176
  value: {