@teamkeel/functions-runtime 0.363.1 → 0.364.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teamkeel/functions-runtime",
3
- "version": "0.363.1",
3
+ "version": "0.364.0",
4
4
  "description": "Internal package used by @teamkeel/sdk",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
package/src/consts.js CHANGED
@@ -1,12 +1,12 @@
1
1
  const PROTO_ACTION_TYPES = {
2
- UNKNOWN: "OPERATION_TYPE_UNKNOWN",
3
- CREATE: "OPERATION_TYPE_CREATE",
4
- GET: "OPERATION_TYPE_GET",
5
- LIST: "OPERATION_TYPE_LIST",
6
- UPDATE: "OPERATION_TYPE_UPDATE",
7
- DELETE: "OPERATION_TYPE_DELETE",
8
- READ: "OPERATION_TYPE_READ",
9
- WRITE: "OPERATION_TYPE_WRITE",
2
+ UNKNOWN: "ACTION_TYPE_UNKNOWN",
3
+ CREATE: "ACTION_TYPE_CREATE",
4
+ GET: "ACTION_TYPE_GET",
5
+ LIST: "ACTION_TYPE_LIST",
6
+ UPDATE: "ACTION_TYPE_UPDATE",
7
+ DELETE: "ACTION_TYPE_DELETE",
8
+ READ: "ACTION_TYPE_READ",
9
+ WRITE: "ACTION_TYPE_WRITE",
10
10
  JOB: "JOB_TYPE",
11
11
  };
12
12
 
@@ -16,7 +16,7 @@ function tryExecuteFunction(
16
16
  return withPermissions(permitted, async ({ getPermissionState }) => {
17
17
  return withDatabase(db, actionType, async ({ transaction }) => {
18
18
  const fnResult = await cb();
19
- // api.permissions maintains an internal state of whether the current operation has been *explicitly* permitted/denied by the user in the course of their custom function, or if execution has already been permitted by a role based permission (evaluated in the main runtime).
19
+ // api.permissions maintains an internal state of whether the current function has been *explicitly* permitted/denied by the user in the course of their custom function, or if execution has already been permitted by a role based permission (evaluated in the main runtime).
20
20
  // we need to check that the final state is permitted or unpermitted. if it's not, then it means that the user has taken no explicit action to permit/deny
21
21
  // and therefore we default to checking the permissions defined in the schema automatically.
22
22
  switch (getPermissionState()) {