@budibase/server 1.4.17 → 1.4.18
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/Dockerfile +2 -0
- package/builder/assets/{index.2062efc5.js → index.1f3e9e95.js} +296 -292
- package/builder/assets/index.ffaba7b0.css +6 -0
- package/builder/index.html +2 -2
- package/coverage/clover.xml +144 -182
- package/coverage/coverage-final.json +34 -36
- package/coverage/lcov-report/api/controllers/apikeys.js.html +1 -1
- package/coverage/lcov-report/api/controllers/automation.js.html +1 -1
- package/coverage/lcov-report/api/controllers/backup.js.html +1 -1
- package/coverage/lcov-report/api/controllers/cloud.js.html +1 -1
- package/coverage/lcov-report/api/controllers/datasource.js.html +1 -1
- package/coverage/lcov-report/api/controllers/dev.js.html +1 -1
- package/coverage/lcov-report/api/controllers/index.html +9 -24
- package/coverage/lcov-report/api/controllers/integration.js.html +2 -2
- package/coverage/lcov-report/api/controllers/layout.js.html +1 -1
- package/coverage/lcov-report/api/controllers/metadata.js.html +1 -1
- package/coverage/lcov-report/api/controllers/migrations.js.html +1 -1
- package/coverage/lcov-report/api/controllers/permission.js.html +1 -1
- package/coverage/lcov-report/api/controllers/query/index.html +1 -1
- package/coverage/lcov-report/api/controllers/query/validation.js.html +1 -1
- package/coverage/lcov-report/api/controllers/role.js.html +1 -1
- package/coverage/lcov-report/api/controllers/routing.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/external.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/index.html +5 -5
- package/coverage/lcov-report/api/controllers/row/internal.js.html +4 -4
- package/coverage/lcov-report/api/controllers/row/internalSearch.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/staticFormula.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/utils.js.html +1 -1
- package/coverage/lcov-report/api/controllers/script.js.html +1 -1
- package/coverage/lcov-report/api/controllers/table/bulkFormula.js.html +1 -1
- package/coverage/lcov-report/api/controllers/table/external.js.html +1 -1
- package/coverage/lcov-report/api/controllers/table/index.html +1 -1
- package/coverage/lcov-report/api/controllers/table/index.js.html +1 -1
- package/coverage/lcov-report/api/controllers/templates.js.html +1 -1
- package/coverage/lcov-report/api/controllers/user.js.html +1 -1
- package/coverage/lcov-report/api/controllers/view/exporters.js.html +1 -1
- package/coverage/lcov-report/api/controllers/view/index.html +1 -1
- package/coverage/lcov-report/api/controllers/view/index.js.html +1 -1
- package/coverage/lcov-report/api/controllers/view/utils.js.html +1 -1
- package/coverage/lcov-report/api/controllers/view/viewBuilder.js.html +1 -1
- package/coverage/lcov-report/api/controllers/webhook.js.html +1 -1
- package/coverage/lcov-report/api/index.html +1 -1
- package/coverage/lcov-report/api/index.js.html +1 -1
- package/coverage/lcov-report/api/routes/analytics.js.html +2 -2
- package/coverage/lcov-report/api/routes/apikeys.js.html +2 -2
- package/coverage/lcov-report/api/routes/automation.js.html +2 -2
- package/coverage/lcov-report/api/routes/backup.js.html +2 -2
- package/coverage/lcov-report/api/routes/cloud.js.html +2 -2
- package/coverage/lcov-report/api/routes/component.js.html +2 -2
- package/coverage/lcov-report/api/routes/datasource.js.html +2 -2
- package/coverage/lcov-report/api/routes/deploy.js.html +2 -2
- package/coverage/lcov-report/api/routes/dev.js.html +2 -2
- package/coverage/lcov-report/api/routes/index.html +5 -20
- package/coverage/lcov-report/api/routes/integration.js.html +2 -2
- package/coverage/lcov-report/api/routes/layout.js.html +2 -2
- package/coverage/lcov-report/api/routes/metadata.js.html +2 -2
- package/coverage/lcov-report/api/routes/migrations.js.html +2 -2
- package/coverage/lcov-report/api/routes/permission.js.html +2 -2
- package/coverage/lcov-report/api/routes/query.js.html +2 -2
- package/coverage/lcov-report/api/routes/role.js.html +2 -2
- package/coverage/lcov-report/api/routes/routing.js.html +2 -2
- package/coverage/lcov-report/api/routes/screen.js.html +2 -2
- package/coverage/lcov-report/api/routes/script.js.html +2 -2
- package/coverage/lcov-report/api/routes/table.js.html +2 -2
- package/coverage/lcov-report/api/routes/templates.js.html +2 -2
- package/coverage/lcov-report/api/routes/user.js.html +2 -2
- package/coverage/lcov-report/api/routes/utils/index.html +1 -1
- package/coverage/lcov-report/api/routes/utils/validators.js.html +1 -1
- package/coverage/lcov-report/api/routes/view.js.html +2 -2
- package/coverage/lcov-report/api/routes/webhook.js.html +2 -2
- package/coverage/lcov-report/automations/actions.js.html +1 -1
- package/coverage/lcov-report/automations/automationUtils.js.html +1 -1
- package/coverage/lcov-report/automations/bullboard.js.html +1 -1
- package/coverage/lcov-report/automations/index.html +1 -1
- package/coverage/lcov-report/automations/index.js.html +1 -1
- package/coverage/lcov-report/automations/steps/bash.js.html +1 -1
- package/coverage/lcov-report/automations/steps/delay.js.html +1 -1
- package/coverage/lcov-report/automations/steps/discord.js.html +1 -1
- package/coverage/lcov-report/automations/steps/executeQuery.js.html +1 -1
- package/coverage/lcov-report/automations/steps/executeScript.js.html +1 -1
- package/coverage/lcov-report/automations/steps/filter.js.html +1 -1
- package/coverage/lcov-report/automations/steps/index.html +1 -1
- package/coverage/lcov-report/automations/steps/integromat.js.html +1 -1
- package/coverage/lcov-report/automations/steps/loop.js.html +1 -1
- package/coverage/lcov-report/automations/steps/outgoingWebhook.js.html +1 -1
- package/coverage/lcov-report/automations/steps/queryRows.js.html +1 -1
- package/coverage/lcov-report/automations/steps/sendSmtpEmail.js.html +52 -4
- package/coverage/lcov-report/automations/steps/serverLog.js.html +1 -1
- package/coverage/lcov-report/automations/steps/slack.js.html +1 -1
- package/coverage/lcov-report/automations/steps/updateRow.js.html +1 -1
- package/coverage/lcov-report/automations/steps/utils.js.html +1 -1
- package/coverage/lcov-report/automations/steps/zapier.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/app.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/cron.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/index.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/index.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/rowDeleted.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/rowSaved.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/rowUpdated.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/webhook.js.html +1 -1
- package/coverage/lcov-report/automations/triggers.js.html +1 -1
- package/coverage/lcov-report/constants/index.html +1 -1
- package/coverage/lcov-report/constants/index.js.html +1 -1
- package/coverage/lcov-report/constants/layouts.js.html +1 -1
- package/coverage/lcov-report/constants/screens.js.html +1 -1
- package/coverage/lcov-report/db/inMemoryView.js.html +1 -1
- package/coverage/lcov-report/db/index.html +5 -5
- package/coverage/lcov-report/db/index.js.html +4 -4
- package/coverage/lcov-report/db/linkedRows/LinkController.js.html +1 -1
- package/coverage/lcov-report/db/linkedRows/index.html +1 -1
- package/coverage/lcov-report/db/linkedRows/index.js.html +11 -11
- package/coverage/lcov-report/db/linkedRows/linkUtils.js.html +7 -7
- package/coverage/lcov-report/db/newid.js.html +1 -1
- package/coverage/lcov-report/db/utils.js.html +1 -1
- package/coverage/lcov-report/events/AutomationEmitter.js.html +1 -1
- package/coverage/lcov-report/events/index.html +1 -1
- package/coverage/lcov-report/events/index.js.html +1 -1
- package/coverage/lcov-report/events/utils.js.html +1 -1
- package/coverage/lcov-report/index.html +34 -34
- package/coverage/lcov-report/integrations/tests/TestConfiguration.js.html +1 -1
- package/coverage/lcov-report/integrations/tests/index.html +1 -1
- package/coverage/lcov-report/middleware/appInfo.js.html +1 -1
- package/coverage/lcov-report/middleware/builder.js.html +1 -1
- package/coverage/lcov-report/middleware/currentapp.js.html +1 -1
- package/coverage/lcov-report/middleware/index.html +1 -1
- package/coverage/lcov-report/middleware/joi-validator.js.html +1 -1
- package/coverage/lcov-report/middleware/publicApi.js.html +1 -1
- package/coverage/lcov-report/middleware/resourceId.js.html +1 -1
- package/coverage/lcov-report/middleware/selfhost.js.html +1 -1
- package/coverage/lcov-report/middleware/utils.js.html +1 -1
- package/coverage/lcov-report/utilities/budibaseDir.js.html +1 -1
- package/coverage/lcov-report/utilities/centralPath.js.html +1 -1
- package/coverage/lcov-report/utilities/csvParser.js.html +1 -1
- package/coverage/lcov-report/utilities/global.js.html +19 -13
- package/coverage/lcov-report/utilities/index.html +24 -24
- package/coverage/lcov-report/utilities/index.js.html +1 -1
- package/coverage/lcov-report/utilities/queue/inMemoryQueue.js.html +1 -1
- package/coverage/lcov-report/utilities/queue/index.html +1 -1
- package/coverage/lcov-report/utilities/routing/index.html +1 -1
- package/coverage/lcov-report/utilities/routing/index.js.html +1 -1
- package/coverage/lcov-report/utilities/rowProcessor/index.html +1 -1
- package/coverage/lcov-report/utilities/rowProcessor/index.js.html +12 -12
- package/coverage/lcov-report/utilities/rowProcessor/utils.js.html +8 -8
- package/coverage/lcov-report/utilities/scriptRunner.js.html +1 -1
- package/coverage/lcov-report/utilities/security.js.html +1 -1
- package/coverage/lcov-report/utilities/statusCodes.js.html +1 -1
- package/coverage/lcov-report/utilities/usageQuota/index.html +1 -1
- package/coverage/lcov-report/utilities/usageQuota/rows.js.html +1 -1
- package/coverage/lcov-report/utilities/usageQuota/usageQuoteReset.js.html +1 -1
- package/coverage/lcov-report/utilities/users.js.html +21 -12
- package/coverage/lcov-report/utilities/workerRequests.js.html +33 -3
- package/coverage/lcov.info +236 -290
- package/dist/api/controllers/application.js +2 -0
- package/dist/api/controllers/auth.js +58 -49
- package/dist/api/controllers/integration.js +1 -1
- package/dist/api/controllers/row/internal.js +1 -1
- package/dist/api/routes/analytics.js +1 -1
- package/dist/api/routes/apikeys.js +1 -1
- package/dist/api/routes/auth.js +31 -4
- package/dist/api/routes/automation.js +1 -1
- package/dist/api/routes/backup.js +1 -1
- package/dist/api/routes/cloud.js +1 -1
- package/dist/api/routes/component.js +1 -1
- package/dist/api/routes/datasource.js +1 -1
- package/dist/api/routes/deploy.js +1 -1
- package/dist/api/routes/dev.js +1 -1
- package/dist/api/routes/integration.js +1 -1
- package/dist/api/routes/layout.js +1 -1
- package/dist/api/routes/metadata.js +1 -1
- package/dist/api/routes/migrations.js +1 -1
- package/dist/api/routes/permission.js +1 -1
- package/dist/api/routes/public/applications.js +5 -0
- package/dist/api/routes/public/queries.js +2 -0
- package/dist/api/routes/public/rows.js +5 -0
- package/dist/api/routes/public/tables.js +5 -0
- package/dist/api/routes/public/users.js +5 -0
- package/dist/api/routes/query.js +1 -1
- package/dist/api/routes/role.js +1 -1
- package/dist/api/routes/routing.js +1 -1
- package/dist/api/routes/screen.js +1 -1
- package/dist/api/routes/script.js +1 -1
- package/dist/api/routes/table.js +1 -1
- package/dist/api/routes/templates.js +1 -1
- package/dist/api/routes/user.js +1 -1
- package/dist/api/routes/view.js +1 -1
- package/dist/api/routes/webhook.js +1 -1
- package/dist/automations/steps/sendSmtpEmail.js +10 -2
- package/dist/db/index.js +1 -1
- package/dist/middleware/authorized.js +2 -2
- package/dist/migrations/functions/usageQuotas/syncApps.js +2 -1
- package/dist/migrations/functions/usageQuotas/syncRows.js +2 -1
- package/dist/package.json +6 -6
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/utilities/global.js +6 -3
- package/dist/utilities/users.js +4 -2
- package/dist/utilities/workerRequests.js +3 -1
- package/package.json +7 -7
- package/scripts/dev/manage.js +1 -0
- package/specs/openapi.json +22 -0
- package/specs/openapi.yaml +22 -0
- package/src/api/controllers/application.ts +3 -7
- package/src/api/controllers/{auth.js → auth.ts} +20 -18
- package/src/api/controllers/integration.js +1 -1
- package/src/api/controllers/row/internal.js +1 -1
- package/src/api/routes/analytics.js +1 -1
- package/src/api/routes/apikeys.js +1 -1
- package/src/api/routes/auth.ts +8 -0
- package/src/api/routes/automation.js +1 -1
- package/src/api/routes/backup.js +1 -1
- package/src/api/routes/cloud.js +1 -1
- package/src/api/routes/component.js +1 -1
- package/src/api/routes/datasource.js +1 -1
- package/src/api/routes/deploy.js +1 -1
- package/src/api/routes/dev.js +1 -1
- package/src/api/routes/integration.js +1 -1
- package/src/api/routes/layout.js +1 -1
- package/src/api/routes/metadata.js +1 -1
- package/src/api/routes/migrations.js +1 -1
- package/src/api/routes/permission.js +1 -1
- package/src/api/routes/public/applications.ts +5 -0
- package/src/api/routes/public/queries.ts +2 -0
- package/src/api/routes/public/rows.ts +5 -0
- package/src/api/routes/public/tables.ts +5 -0
- package/src/api/routes/public/users.ts +5 -0
- package/src/api/routes/query.js +1 -1
- package/src/api/routes/role.js +1 -1
- package/src/api/routes/routing.js +1 -1
- package/src/api/routes/screen.js +1 -1
- package/src/api/routes/script.js +1 -1
- package/src/api/routes/table.js +1 -1
- package/src/api/routes/templates.js +1 -1
- package/src/api/routes/tests/row.spec.js +3 -1
- package/src/api/routes/user.js +1 -1
- package/src/api/routes/view.js +1 -1
- package/src/api/routes/webhook.js +1 -1
- package/src/automations/steps/sendSmtpEmail.js +18 -2
- package/src/db/index.js +1 -1
- package/src/definitions/openapi.ts +134 -447
- package/src/middleware/authorized.ts +2 -2
- package/src/migrations/functions/usageQuotas/syncApps.ts +2 -1
- package/src/migrations/functions/usageQuotas/syncRows.ts +2 -1
- package/src/migrations/functions/usageQuotas/tests/syncApps.spec.ts +2 -1
- package/src/migrations/functions/usageQuotas/tests/syncRows.spec.ts +2 -1
- package/src/utilities/global.js +6 -4
- package/src/utilities/users.js +5 -2
- package/src/utilities/workerRequests.js +11 -1
- package/builder/assets/index.91c8117f.css +0 -6
- package/coverage/lcov-report/api/controllers/auth.js.html +0 -292
- package/coverage/lcov-report/api/routes/auth.js.html +0 -109
- package/src/api/routes/auth.js +0 -8
package/src/api/routes/layout.js
CHANGED
|
@@ -3,7 +3,7 @@ const authorized = require("../../middleware/authorized")
|
|
|
3
3
|
const { BUILDER } = require("@budibase/backend-core/permissions")
|
|
4
4
|
const controller = require("../controllers/layout")
|
|
5
5
|
|
|
6
|
-
const router = Router()
|
|
6
|
+
const router = new Router()
|
|
7
7
|
|
|
8
8
|
router
|
|
9
9
|
.post("/api/layouts", authorized(BUILDER), controller.save)
|
|
@@ -4,7 +4,7 @@ const authorized = require("../../middleware/authorized")
|
|
|
4
4
|
const { BUILDER } = require("@budibase/backend-core/permissions")
|
|
5
5
|
const { permissionValidator } = require("./utils/validators")
|
|
6
6
|
|
|
7
|
-
const router = Router()
|
|
7
|
+
const router = new Router()
|
|
8
8
|
|
|
9
9
|
router
|
|
10
10
|
.get("/api/permission/builtin", authorized(BUILDER), controller.fetchBuiltin)
|
|
@@ -9,6 +9,7 @@ const read = [],
|
|
|
9
9
|
* @openapi
|
|
10
10
|
* /applications:
|
|
11
11
|
* post:
|
|
12
|
+
* operationId: create
|
|
12
13
|
* summary: Create an application
|
|
13
14
|
* tags:
|
|
14
15
|
* - applications
|
|
@@ -41,6 +42,7 @@ write.push(
|
|
|
41
42
|
* @openapi
|
|
42
43
|
* /applications/{appId}:
|
|
43
44
|
* put:
|
|
45
|
+
* operationId: update
|
|
44
46
|
* summary: Update an application
|
|
45
47
|
* tags:
|
|
46
48
|
* - applications
|
|
@@ -73,6 +75,7 @@ write.push(
|
|
|
73
75
|
* @openapi
|
|
74
76
|
* /applications/{appId}:
|
|
75
77
|
* delete:
|
|
78
|
+
* operationId: destroy
|
|
76
79
|
* summary: Delete an application
|
|
77
80
|
* tags:
|
|
78
81
|
* - applications
|
|
@@ -95,6 +98,7 @@ write.push(new Endpoint("delete", "/applications/:appId", controller.destroy))
|
|
|
95
98
|
* @openapi
|
|
96
99
|
* /applications/{appId}:
|
|
97
100
|
* get:
|
|
101
|
+
* operationId: getById
|
|
98
102
|
* summary: Retrieve an application
|
|
99
103
|
* tags:
|
|
100
104
|
* - applications
|
|
@@ -117,6 +121,7 @@ read.push(new Endpoint("get", "/applications/:appId", controller.read))
|
|
|
117
121
|
* @openapi
|
|
118
122
|
* /applications/search:
|
|
119
123
|
* post:
|
|
124
|
+
* operationId: search
|
|
120
125
|
* summary: Search for applications
|
|
121
126
|
* description: Based on application properties (currently only name) search for applications.
|
|
122
127
|
* tags:
|
|
@@ -9,6 +9,7 @@ const read = [],
|
|
|
9
9
|
* @openapi
|
|
10
10
|
* /queries/{queryId}:
|
|
11
11
|
* post:
|
|
12
|
+
* operationId: execute
|
|
12
13
|
* summary: Execute a query
|
|
13
14
|
* description: Queries which have been created within a Budibase app can be executed using this,
|
|
14
15
|
* tags:
|
|
@@ -42,6 +43,7 @@ write.push(new Endpoint("post", "/queries/:queryId", controller.execute))
|
|
|
42
43
|
* @openapi
|
|
43
44
|
* /queries/search:
|
|
44
45
|
* post:
|
|
46
|
+
* operationId: search
|
|
45
47
|
* summary: Search for queries
|
|
46
48
|
* description: Based on query properties (currently only name) search for queries.
|
|
47
49
|
* tags:
|
|
@@ -9,6 +9,7 @@ const read = [],
|
|
|
9
9
|
* @openapi
|
|
10
10
|
* /tables/{tableId}/rows:
|
|
11
11
|
* post:
|
|
12
|
+
* operationId: create
|
|
12
13
|
* summary: Create a row
|
|
13
14
|
* description: Creates a row within the specified table.
|
|
14
15
|
* tags:
|
|
@@ -43,6 +44,7 @@ write.push(new Endpoint("post", "/tables/:tableId/rows", controller.create))
|
|
|
43
44
|
* @openapi
|
|
44
45
|
* /tables/{tableId}/rows/{rowId}:
|
|
45
46
|
* put:
|
|
47
|
+
* operationId: update
|
|
46
48
|
* summary: Update a row
|
|
47
49
|
* description: Updates a row within the specified table.
|
|
48
50
|
* tags:
|
|
@@ -79,6 +81,7 @@ write.push(
|
|
|
79
81
|
* @openapi
|
|
80
82
|
* /tables/{tableId}/rows/{rowId}:
|
|
81
83
|
* delete:
|
|
84
|
+
* operationId: destroy
|
|
82
85
|
* summary: Delete a row
|
|
83
86
|
* description: Deletes a row within the specified table.
|
|
84
87
|
* tags:
|
|
@@ -106,6 +109,7 @@ write.push(
|
|
|
106
109
|
* @openapi
|
|
107
110
|
* /tables/{tableId}/rows/{rowId}:
|
|
108
111
|
* get:
|
|
112
|
+
* operationId: getById
|
|
109
113
|
* summary: Retrieve a row
|
|
110
114
|
* description: This gets a single row, it will be enriched with the full related rows, rather than
|
|
111
115
|
* the squashed "primaryDisplay" format returned by the search endpoint.
|
|
@@ -132,6 +136,7 @@ read.push(new Endpoint("get", "/tables/:tableId/rows/:rowId", controller.read))
|
|
|
132
136
|
* @openapi
|
|
133
137
|
* /tables/{tableId}/rows/search:
|
|
134
138
|
* post:
|
|
139
|
+
* operationId: search
|
|
135
140
|
* summary: Search for rows
|
|
136
141
|
* tags:
|
|
137
142
|
* - rows
|
|
@@ -9,6 +9,7 @@ const read = [],
|
|
|
9
9
|
* @openapi
|
|
10
10
|
* /tables:
|
|
11
11
|
* post:
|
|
12
|
+
* operationId: create
|
|
12
13
|
* summary: Create a table
|
|
13
14
|
* description: Create a table, this could be internal or external.
|
|
14
15
|
* tags:
|
|
@@ -45,6 +46,7 @@ write.push(
|
|
|
45
46
|
* @openapi
|
|
46
47
|
* /tables/{tableId}:
|
|
47
48
|
* put:
|
|
49
|
+
* operationId: update
|
|
48
50
|
* summary: Update a table
|
|
49
51
|
* description: Update a table, this could be internal or external.
|
|
50
52
|
* tags:
|
|
@@ -81,6 +83,7 @@ write.push(
|
|
|
81
83
|
* @openapi
|
|
82
84
|
* /tables/{tableId}:
|
|
83
85
|
* delete:
|
|
86
|
+
* operationId: destroy
|
|
84
87
|
* summary: Delete a table
|
|
85
88
|
* description: Delete a table, this could be internal or external.
|
|
86
89
|
* tags:
|
|
@@ -105,6 +108,7 @@ write.push(new Endpoint("delete", "/tables/:tableId", controller.destroy))
|
|
|
105
108
|
* @openapi
|
|
106
109
|
* /tables/{tableId}:
|
|
107
110
|
* get:
|
|
111
|
+
* operationId: getById
|
|
108
112
|
* summary: Retrieve a table
|
|
109
113
|
* description: Lookup a table, this could be internal or external.
|
|
110
114
|
* tags:
|
|
@@ -129,6 +133,7 @@ read.push(new Endpoint("get", "/tables/:tableId", controller.read))
|
|
|
129
133
|
* @openapi
|
|
130
134
|
* /tables/search:
|
|
131
135
|
* post:
|
|
136
|
+
* operationId: search
|
|
132
137
|
* summary: Search for tables
|
|
133
138
|
* description: Based on table properties (currently only name) search for tables. This could be
|
|
134
139
|
* an internal or an external table.
|
|
@@ -9,6 +9,7 @@ const read = [],
|
|
|
9
9
|
* @openapi
|
|
10
10
|
* /users:
|
|
11
11
|
* post:
|
|
12
|
+
* operationId: create
|
|
12
13
|
* summary: Create a user
|
|
13
14
|
* tags:
|
|
14
15
|
* - users
|
|
@@ -35,6 +36,7 @@ write.push(new Endpoint("post", "/users", controller.create))
|
|
|
35
36
|
* @openapi
|
|
36
37
|
* /users/{userId}:
|
|
37
38
|
* put:
|
|
39
|
+
* operationId: update
|
|
38
40
|
* summary: Update a user
|
|
39
41
|
* tags:
|
|
40
42
|
* - users
|
|
@@ -63,6 +65,7 @@ write.push(new Endpoint("put", "/users/:userId", controller.update))
|
|
|
63
65
|
* @openapi
|
|
64
66
|
* /users/{userId}:
|
|
65
67
|
* delete:
|
|
68
|
+
* operationId: destroy
|
|
66
69
|
* summary: Delete a user
|
|
67
70
|
* tags:
|
|
68
71
|
* - users
|
|
@@ -85,6 +88,7 @@ write.push(new Endpoint("delete", "/users/:userId", controller.destroy))
|
|
|
85
88
|
* @openapi
|
|
86
89
|
* /users/{userId}:
|
|
87
90
|
* get:
|
|
91
|
+
* operationId: getById
|
|
88
92
|
* summary: Retrieve a user
|
|
89
93
|
* tags:
|
|
90
94
|
* - users
|
|
@@ -107,6 +111,7 @@ read.push(new Endpoint("get", "/users/:userId", controller.read))
|
|
|
107
111
|
* @openapi
|
|
108
112
|
* /users/search:
|
|
109
113
|
* post:
|
|
114
|
+
* operationId: search
|
|
110
115
|
* summary: Search for users
|
|
111
116
|
* description: Based on user properties (currently only name) search for users.
|
|
112
117
|
* tags:
|
package/src/api/routes/query.js
CHANGED
package/src/api/routes/role.js
CHANGED
|
@@ -4,7 +4,7 @@ const authorized = require("../../middleware/authorized")
|
|
|
4
4
|
const { BUILDER } = require("@budibase/backend-core/permissions")
|
|
5
5
|
const { roleValidator } = require("./utils/validators")
|
|
6
6
|
|
|
7
|
-
const router = Router()
|
|
7
|
+
const router = new Router()
|
|
8
8
|
|
|
9
9
|
router
|
|
10
10
|
.post("/api/roles", authorized(BUILDER), roleValidator(), controller.save)
|
|
@@ -3,7 +3,7 @@ const authorized = require("../../middleware/authorized")
|
|
|
3
3
|
const { BUILDER } = require("@budibase/backend-core/permissions")
|
|
4
4
|
const controller = require("../controllers/routing")
|
|
5
5
|
|
|
6
|
-
const router = Router()
|
|
6
|
+
const router = new Router()
|
|
7
7
|
|
|
8
8
|
router
|
|
9
9
|
// gets correct structure for user role
|
package/src/api/routes/screen.js
CHANGED
|
@@ -4,7 +4,7 @@ const authorized = require("../../middleware/authorized")
|
|
|
4
4
|
const { BUILDER } = require("@budibase/backend-core/permissions")
|
|
5
5
|
const { screenValidator } = require("./utils/validators")
|
|
6
6
|
|
|
7
|
-
const router = Router()
|
|
7
|
+
const router = new Router()
|
|
8
8
|
|
|
9
9
|
router
|
|
10
10
|
.get("/api/screens", authorized(BUILDER), controller.fetch)
|
package/src/api/routes/script.js
CHANGED
|
@@ -3,7 +3,7 @@ const controller = require("../controllers/script")
|
|
|
3
3
|
const authorized = require("../../middleware/authorized")
|
|
4
4
|
const { BUILDER } = require("@budibase/backend-core/permissions")
|
|
5
5
|
|
|
6
|
-
const router = Router()
|
|
6
|
+
const router = new Router()
|
|
7
7
|
|
|
8
8
|
router.post("/api/script", authorized(BUILDER), controller.save)
|
|
9
9
|
|
package/src/api/routes/table.js
CHANGED
|
@@ -3,7 +3,7 @@ const controller = require("../controllers/templates")
|
|
|
3
3
|
const authorized = require("../../middleware/authorized")
|
|
4
4
|
const { BUILDER } = require("@budibase/backend-core/permissions")
|
|
5
5
|
|
|
6
|
-
const router = Router()
|
|
6
|
+
const router = new Router()
|
|
7
7
|
|
|
8
8
|
router
|
|
9
9
|
.get("/api/templates", authorized(BUILDER), controller.fetch)
|
|
@@ -5,10 +5,12 @@ const { doInAppContext } = require("@budibase/backend-core/context")
|
|
|
5
5
|
const { doInTenant } = require("@budibase/backend-core/tenancy")
|
|
6
6
|
const {
|
|
7
7
|
quotas,
|
|
8
|
+
} = require("@budibase/pro")
|
|
9
|
+
const {
|
|
8
10
|
QuotaUsageType,
|
|
9
11
|
StaticQuotaName,
|
|
10
12
|
MonthlyQuotaName,
|
|
11
|
-
} = require("@budibase/
|
|
13
|
+
} = require("@budibase/types")
|
|
12
14
|
|
|
13
15
|
describe("/rows", () => {
|
|
14
16
|
let request = setup.getRequest()
|
package/src/api/routes/user.js
CHANGED
package/src/api/routes/view.js
CHANGED
|
@@ -4,7 +4,7 @@ const authorized = require("../../middleware/authorized")
|
|
|
4
4
|
const { BUILDER } = require("@budibase/backend-core/permissions")
|
|
5
5
|
const { webhookValidator } = require("./utils/validators")
|
|
6
6
|
|
|
7
|
-
const router = Router()
|
|
7
|
+
const router = new Router()
|
|
8
8
|
|
|
9
9
|
router
|
|
10
10
|
.get("/api/webhooks", authorized(BUILDER), controller.fetch)
|
|
@@ -21,6 +21,14 @@ exports.definition = {
|
|
|
21
21
|
type: "string",
|
|
22
22
|
title: "Send From",
|
|
23
23
|
},
|
|
24
|
+
cc: {
|
|
25
|
+
type: "string",
|
|
26
|
+
title: "CC",
|
|
27
|
+
},
|
|
28
|
+
bcc: {
|
|
29
|
+
type: "string",
|
|
30
|
+
title: "BCC",
|
|
31
|
+
},
|
|
24
32
|
subject: {
|
|
25
33
|
type: "string",
|
|
26
34
|
title: "Email Subject",
|
|
@@ -49,13 +57,21 @@ exports.definition = {
|
|
|
49
57
|
}
|
|
50
58
|
|
|
51
59
|
exports.run = async function ({ inputs }) {
|
|
52
|
-
let { to, from, subject, contents } = inputs
|
|
60
|
+
let { to, from, subject, contents, cc, bcc } = inputs
|
|
53
61
|
if (!contents) {
|
|
54
62
|
contents = "<h1>No content</h1>"
|
|
55
63
|
}
|
|
56
64
|
to = to || undefined
|
|
57
65
|
try {
|
|
58
|
-
let response = await sendSmtpEmail(
|
|
66
|
+
let response = await sendSmtpEmail(
|
|
67
|
+
to,
|
|
68
|
+
from,
|
|
69
|
+
subject,
|
|
70
|
+
contents,
|
|
71
|
+
cc,
|
|
72
|
+
bcc,
|
|
73
|
+
true
|
|
74
|
+
)
|
|
59
75
|
return {
|
|
60
76
|
success: true,
|
|
61
77
|
response,
|