diff --git a/package-lock.json b/package-lock.json index 4b5c09b4d8..ec9d4bf309 100644 --- a/package-lock.json +++ b/package-lock.json @@ -54,9 +54,9 @@ "license": "MIT" }, "node_modules/@apify/consts": { - "version": "2.47.0", - "resolved": "https://registry.npmjs.org/@apify/consts/-/consts-2.47.0.tgz", - "integrity": "sha512-VFVrNn/S3bLPrS3v9x7Td5b8YtxPbrepuXLWu27n06T34qQeogysbnAWIBNnTQ59qRKlxrAeFR4ezI+fRXTMNQ==", + "version": "2.47.1", + "resolved": "https://registry.npmjs.org/@apify/consts/-/consts-2.47.1.tgz", + "integrity": "sha512-psuf1uZ8E/9YV6cQXWGX18D7k9yCJPOSCdWI3Qgy0cx6yjckgafMBEtIK+o4BlGid58sAwxBC2dtcH7iIYj5uw==", "license": "Apache-2.0" }, "node_modules/@apify/datastructures": { @@ -20496,7 +20496,7 @@ "version": "3.5.2", "license": "Apache-2.0", "dependencies": { - "@apify/consts": "^2.23.0", + "@apify/consts": "^2.47.1", "@apify/input_secrets": "^1.2.0", "@apify/log": "^2.4.3", "@apify/timeout": "^0.3.0", diff --git a/packages/apify/package.json b/packages/apify/package.json index c4dd2dcb3b..183507483f 100644 --- a/packages/apify/package.json +++ b/packages/apify/package.json @@ -54,7 +54,7 @@ "access": "public" }, "dependencies": { - "@apify/consts": "^2.23.0", + "@apify/consts": "^2.47.1", "@apify/input_secrets": "^1.2.0", "@apify/log": "^2.4.3", "@apify/timeout": "^0.3.0", diff --git a/packages/apify/src/actor.ts b/packages/apify/src/actor.ts index 60331eaefa..1b0400ee86 100644 --- a/packages/apify/src/actor.ts +++ b/packages/apify/src/actor.ts @@ -37,6 +37,7 @@ import ow from 'ow'; import { ACTOR_ENV_VARS, + type ACTOR_PERMISSION_LEVEL, APIFY_ENV_VARS, INTEGER_ENV_VARS, } from '@apify/consts'; @@ -106,6 +107,11 @@ export interface ApifyEnv { */ actorBuildId: string | null; + /** + * [Permission level](https://docs.apify.com/platform/actors/development/permissions) the Actor is run under. (ACTOR_PERMISSION_LEVEL) + */ + actorPermissionLevel: ACTOR_PERMISSION_LEVEL | null; + /** * ID of the user who started the Actor - note that it might be * different than the owner of the Actor (APIFY_USER_ID) diff --git a/packages/apify/src/configuration.ts b/packages/apify/src/configuration.ts index 537b865c02..c5bb9f776d 100644 --- a/packages/apify/src/configuration.ts +++ b/packages/apify/src/configuration.ts @@ -95,6 +95,7 @@ export interface ConfigurationOptions extends CoreConfigurationOptions { * ---|---|--- * `actorEventsWsUrl` | `ACTOR_EVENTS_WEBSOCKET_URL` | - * `actorId` | `ACTOR_ID` | - + * `actorPermissionLevel` | `ACTOR_PERMISSION_LEVEL` | - * `actorRunId` | `ACTOR_RUN_ID` | - * `actorTaskId` | `ACTOR_TASK_ID` | - * `apiBaseUrl` | `APIFY_API_BASE_URL` | `'https://api.apify.com'` @@ -172,6 +173,7 @@ export class Configuration extends CoreConfiguration { ACTOR_ID: 'actorId', ACTOR_INPUT_KEY: 'inputKey', ACTOR_MEMORY_MBYTES: 'memoryMbytes', + ACTOR_PERMISSION_LEVEL: 'actorPermissionLevel', ACTOR_RUN_ID: 'actorRunId', ACTOR_STANDBY_PORT: 'standbyPort', ACTOR_STANDBY_URL: 'standbyUrl',