Skip to content

Commit 3cd8369

Browse files
authored
chore: add userIsPaying to the env var interface (#415)
Adds `APIFY_USER_IS_PAYING` environmental variable as `userIsPaying` to the `ApifyEnv` interface. PR adding it to the documentation is here: apify/apify-docs#1706
1 parent 256731c commit 3cd8369

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

packages/apify/src/actor.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,11 @@ export interface ApifyEnv {
111111
*/
112112
userId: string | null;
113113

114+
/**
115+
* If it is `1`, it means that the user who started the Actor is a paying user. (APIFY_USER_IS_PAYING)
116+
*/
117+
userIsPaying: string | null;
118+
114119
/**
115120
* Authentication token representing privileges given to the Actor run,
116121
* it can be passed to various Apify APIs (APIFY_TOKEN)

packages/apify/src/configuration.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ export interface ConfigurationOptions extends CoreConfigurationOptions {
106106
* `proxyPort` | `APIFY_PROXY_PORT` | `8000`
107107
* `proxyStatusUrl` | `APIFY_PROXY_STATUS_URL` | `'http://proxy.apify.com'`
108108
* `userId` | `APIFY_USER_ID` | -
109+
* `userIsPaying` | `APIFY_USER_IS_PAYING` | -
109110
* `xvfb` | `APIFY_XVFB` | -
110111
* `standbyPort` | `ACTOR_STANDBY_PORT` | `4321`
111112
* `standbyUrl` | `ACTOR_STANDBY_URL` | -
@@ -151,6 +152,7 @@ export class Configuration extends CoreConfiguration {
151152
APIFY_CONTAINER_PORT: 'containerPort',
152153
APIFY_CONTAINER_URL: 'containerUrl',
153154
APIFY_USER_ID: 'userId',
155+
APIFY_USER_IS_PAYING: 'userIsPaying',
154156
APIFY_PROXY_HOSTNAME: 'proxyHostname',
155157
APIFY_PROXY_PASSWORD: 'proxyPassword',
156158
APIFY_PROXY_STATUS_URL: 'proxyStatusUrl',

0 commit comments

Comments
 (0)