Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 26 additions & 1 deletion src/resource_clients/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ export class UserClient extends ResourceClient {
}

//
// Response interface for /users/:userId
// Response interface for /users/:userId and /users/me
// Using token will return private user data
//

export interface User {
Expand All @@ -102,6 +103,9 @@ export interface User {
email?: string;
proxy?: UserProxy;
plan?: UserPlan;
effectivePlatformFeatures?: EffectivePlatformFeatures;
createdAt?: Date;
isPaying?: boolean;
}

export interface UserProxy {
Expand Down Expand Up @@ -148,6 +152,27 @@ export enum PlatformFeature {
ProxyExternalAccess = 'PROXY_EXTERNAL_ACCESS',
}

interface EffectivePlatformFeature {
isEnabled: boolean;
disabledReason: string | null;
disabledReasonType: string | null;
isTrial: boolean;
trialExpirationAt: Date | null;
}

interface EffectivePlatformFeatures {
ACTORS: EffectivePlatformFeature;
STORAGE: EffectivePlatformFeature;
SCHEDULER: EffectivePlatformFeature;
PROXY: EffectivePlatformFeature;
PROXY_EXTERNAL_ACCESS: EffectivePlatformFeature;
PROXY_RESIDENTIAL: EffectivePlatformFeature;
PROXY_SERPS: EffectivePlatformFeature;
WEBHOOKS: EffectivePlatformFeature;
ACTORS_PUBLIC_ALL: EffectivePlatformFeature;
ACTORS_PUBLIC_DEVELOPER: EffectivePlatformFeature;
}

//
// Response interface for /users/:userId/usage/monthly
//
Expand Down
Loading