Skip to content

Commit ca3a4df

Browse files
authored
feat: add ACTOR_PERMISSION_LEVEL to env var interface (#516)
This adds the `ACTOR_PERMISSION_LEVEL` environmental variable as `actorPermissionLevel` to the `ApifyEnv` interface.
1 parent 6d73dd2 commit ca3a4df

File tree

4 files changed

+13
-5
lines changed

4 files changed

+13
-5
lines changed

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/apify/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"access": "public"
5555
},
5656
"dependencies": {
57-
"@apify/consts": "^2.23.0",
57+
"@apify/consts": "^2.47.1",
5858
"@apify/input_secrets": "^1.2.0",
5959
"@apify/log": "^2.4.3",
6060
"@apify/timeout": "^0.3.0",

packages/apify/src/actor.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ import ow from 'ow';
3737

3838
import {
3939
ACTOR_ENV_VARS,
40+
type ACTOR_PERMISSION_LEVEL,
4041
APIFY_ENV_VARS,
4142
INTEGER_ENV_VARS,
4243
} from '@apify/consts';
@@ -106,6 +107,11 @@ export interface ApifyEnv {
106107
*/
107108
actorBuildId: string | null;
108109

110+
/**
111+
* [Permission level](https://docs.apify.com/platform/actors/development/permissions) the Actor is run under. (ACTOR_PERMISSION_LEVEL)
112+
*/
113+
actorPermissionLevel: ACTOR_PERMISSION_LEVEL | null;
114+
109115
/**
110116
* ID of the user who started the Actor - note that it might be
111117
* different than the owner of the Actor (APIFY_USER_ID)

packages/apify/src/configuration.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ export interface ConfigurationOptions extends CoreConfigurationOptions {
9595
* ---|---|---
9696
* `actorEventsWsUrl` | `ACTOR_EVENTS_WEBSOCKET_URL` | -
9797
* `actorId` | `ACTOR_ID` | -
98+
* `actorPermissionLevel` | `ACTOR_PERMISSION_LEVEL` | -
9899
* `actorRunId` | `ACTOR_RUN_ID` | -
99100
* `actorTaskId` | `ACTOR_TASK_ID` | -
100101
* `apiBaseUrl` | `APIFY_API_BASE_URL` | `'https://api.apify.com'`
@@ -172,6 +173,7 @@ export class Configuration extends CoreConfiguration {
172173
ACTOR_ID: 'actorId',
173174
ACTOR_INPUT_KEY: 'inputKey',
174175
ACTOR_MEMORY_MBYTES: 'memoryMbytes',
176+
ACTOR_PERMISSION_LEVEL: 'actorPermissionLevel',
175177
ACTOR_RUN_ID: 'actorRunId',
176178
ACTOR_STANDBY_PORT: 'standbyPort',
177179
ACTOR_STANDBY_URL: 'standbyUrl',

0 commit comments

Comments
 (0)