cloudflare
Version:
The official TypeScript library for the Cloudflare API
74 lines • 2.45 kB
TypeScript
import { APIResource } from "../../../../core/resource.js";
import * as ApplicationsAPI from "./applications.js";
import { APIPromise } from "../../../../core/api-promise.js";
import { RequestOptions } from "../../../../internal/request-options.js";
export declare class BaseUserPolicyChecks extends APIResource {
static readonly _key: readonly ['zeroTrust', 'access', 'applications', 'userPolicyChecks'];
/**
* Tests if a specific user has permission to access an application.
*
* @example
* ```ts
* const userPolicyChecks =
* await client.zeroTrust.access.applications.userPolicyChecks.list(
* '023e105f4ecef8ad9ca31a8372d0c353',
* { account_id: 'account_id' },
* );
* ```
*/
list(appID: ApplicationsAPI.AppIDParam, params?: UserPolicyCheckListParams | null | undefined, options?: RequestOptions): APIPromise<UserPolicyCheckListResponse>;
}
export declare class UserPolicyChecks extends BaseUserPolicyChecks {
}
export interface UserPolicyCheckListResponse {
app_state?: UserPolicyCheckListResponse.AppState;
user_identity?: UserPolicyCheckListResponse.UserIdentity;
}
export declare namespace UserPolicyCheckListResponse {
interface AppState {
/**
* UUID.
*/
app_uid?: string;
aud?: string;
hostname?: string;
name?: string;
policies?: Array<unknown>;
status?: string;
}
interface UserIdentity {
id?: string;
account_id?: string;
device_sessions?: unknown;
email?: string;
geo?: UserIdentity.Geo;
iat?: number;
is_gateway?: boolean;
is_warp?: boolean;
name?: string;
/**
* UUID.
*/
user_uuid?: string;
version?: number;
}
namespace UserIdentity {
interface Geo {
country?: string;
}
}
}
export interface UserPolicyCheckListParams {
/**
* The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
*/
account_id?: string;
/**
* The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
*/
zone_id?: string;
}
export declare namespace UserPolicyChecks {
export { type UserPolicyCheckListResponse as UserPolicyCheckListResponse, type UserPolicyCheckListParams as UserPolicyCheckListParams, };
}
//# sourceMappingURL=user-policy-checks.d.ts.map