From 0e6ef82764eb1d70e803659c935d867149e681a8 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Thu, 16 Jan 2025 18:40:32 +0000
Subject: [PATCH] feat(api): api update
---
.stats.yml | 4 +-
api.md | 25 ++---
src/resources/hyperdrive/configs.ts | 103 +++++++++++++----
src/resources/hyperdrive/hyperdrive.ts | 20 +++-
src/resources/hyperdrive/index.ts | 6 +
src/resources/rulesets/rulesets.ts | 26 +++--
.../access/infrastructure/targets.ts | 5 +-
.../zero-trust/dex/commands/commands.ts | 4 +-
.../zero-trust/dex/commands/devices.ts | 10 ++
.../zero-trust/dex/commands/index.ts | 2 +-
.../zero-trust/dex/commands/users.ts | 40 +------
src/resources/zero-trust/gateway/rules.ts | 106 ++++++++++++++++--
.../zero-trust/dex/commands/users.test.ts | 32 ------
.../zero-trust/gateway/rules.test.ts | 30 ++++-
14 files changed, 273 insertions(+), 140 deletions(-)
delete mode 100644 tests/api-resources/zero-trust/dex/commands/users.test.ts
diff --git a/.stats.yml b/.stats.yml
index 3b06a3c53b..f689a46eff 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,2 +1,2 @@
-configured_endpoints: 1494
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-817b1412335b2bc367169247bf8a10b29dbadb82b77df71df5ef5f3470fc974b.yml
+configured_endpoints: 1493
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5e32fa5d8d6040e3c40095cc73f64d0a3b7a88824f57f5a2667663297a9f3113.yml
diff --git a/api.md b/api.md
index cedca7f63e..24480ec45b 100644
--- a/api.md
+++ b/api.md
@@ -2553,7 +2553,7 @@ Methods:
- client.rulesets.create({ ...params }) -> RulesetCreateResponse
- client.rulesets.update(rulesetId, { ...params }) -> RulesetUpdateResponse
-- client.rulesets.list({ ...params }) -> RulesetListResponsesSinglePage
+- client.rulesets.list({ ...params }) -> RulesetListResponsesCursorPagination
- client.rulesets.delete(rulesetId, { ...params }) -> void
- client.rulesets.get(rulesetId, { ...params }) -> RulesetGetResponse
@@ -4910,14 +4910,6 @@ Methods:
#### Users
-Types:
-
-- UserListResponse
-
-Methods:
-
-- client.zeroTrust.dex.commands.users.list({ ...params }) -> UserListResponse
-
#### Devices
Types:
@@ -5651,16 +5643,21 @@ Types:
Types:
+- ConfigCreateResponse
+- ConfigUpdateResponse
+- ConfigListResponse
- ConfigDeleteResponse
+- ConfigEditResponse
+- ConfigGetResponse
Methods:
-- client.hyperdrive.configs.create({ ...params }) -> Hyperdrive
-- client.hyperdrive.configs.update(hyperdriveId, { ...params }) -> Hyperdrive
-- client.hyperdrive.configs.list({ ...params }) -> HyperdrivesSinglePage
+- client.hyperdrive.configs.create({ ...params }) -> ConfigCreateResponse
+- client.hyperdrive.configs.update(hyperdriveId, { ...params }) -> ConfigUpdateResponse
+- client.hyperdrive.configs.list({ ...params }) -> ConfigListResponsesSinglePage
- client.hyperdrive.configs.delete(hyperdriveId, { ...params }) -> ConfigDeleteResponse | null
-- client.hyperdrive.configs.edit(hyperdriveId, { ...params }) -> Hyperdrive
-- client.hyperdrive.configs.get(hyperdriveId, { ...params }) -> Hyperdrive
+- client.hyperdrive.configs.edit(hyperdriveId, { ...params }) -> ConfigEditResponse
+- client.hyperdrive.configs.get(hyperdriveId, { ...params }) -> ConfigGetResponse
# RUM
diff --git a/src/resources/hyperdrive/configs.ts b/src/resources/hyperdrive/configs.ts
index b2184138cc..20f7c0e2b2 100644
--- a/src/resources/hyperdrive/configs.ts
+++ b/src/resources/hyperdrive/configs.ts
@@ -3,22 +3,19 @@
import { APIResource } from '../../resource';
import * as Core from '../../core';
import * as HyperdriveAPI from './hyperdrive';
-import { HyperdrivesSinglePage } from './hyperdrive';
+import { SinglePage } from '../../pagination';
export class Configs extends APIResource {
/**
* Creates and returns a new Hyperdrive configuration.
*/
- create(
- params: ConfigCreateParams,
- options?: Core.RequestOptions,
- ): Core.APIPromise {
+ create(params: ConfigCreateParams, options?: Core.RequestOptions): Core.APIPromise {
const { account_id, ...body } = params;
return (
this._client.post(`/accounts/${account_id}/hyperdrive/configs`, {
body,
...options,
- }) as Core.APIPromise<{ result: HyperdriveAPI.Hyperdrive }>
+ }) as Core.APIPromise<{ result: ConfigCreateResponse }>
)._thenUnwrap((obj) => obj.result);
}
@@ -29,13 +26,13 @@ export class Configs extends APIResource {
hyperdriveId: string,
params: ConfigUpdateParams,
options?: Core.RequestOptions,
- ): Core.APIPromise {
+ ): Core.APIPromise {
const { account_id, ...body } = params;
return (
this._client.put(`/accounts/${account_id}/hyperdrive/configs/${hyperdriveId}`, {
body,
...options,
- }) as Core.APIPromise<{ result: HyperdriveAPI.Hyperdrive }>
+ }) as Core.APIPromise<{ result: ConfigUpdateResponse }>
)._thenUnwrap((obj) => obj.result);
}
@@ -45,11 +42,11 @@ export class Configs extends APIResource {
list(
params: ConfigListParams,
options?: Core.RequestOptions,
- ): Core.PagePromise {
+ ): Core.PagePromise {
const { account_id } = params;
return this._client.getAPIList(
`/accounts/${account_id}/hyperdrive/configs`,
- HyperdrivesSinglePage,
+ ConfigListResponsesSinglePage,
options,
);
}
@@ -79,13 +76,13 @@ export class Configs extends APIResource {
hyperdriveId: string,
params: ConfigEditParams,
options?: Core.RequestOptions,
- ): Core.APIPromise {
+ ): Core.APIPromise {
const { account_id, ...body } = params;
return (
this._client.patch(`/accounts/${account_id}/hyperdrive/configs/${hyperdriveId}`, {
body,
...options,
- }) as Core.APIPromise<{ result: HyperdriveAPI.Hyperdrive }>
+ }) as Core.APIPromise<{ result: ConfigEditResponse }>
)._thenUnwrap((obj) => obj.result);
}
@@ -96,19 +93,81 @@ export class Configs extends APIResource {
hyperdriveId: string,
params: ConfigGetParams,
options?: Core.RequestOptions,
- ): Core.APIPromise {
+ ): Core.APIPromise {
const { account_id } = params;
return (
this._client.get(
`/accounts/${account_id}/hyperdrive/configs/${hyperdriveId}`,
options,
- ) as Core.APIPromise<{ result: HyperdriveAPI.Hyperdrive }>
+ ) as Core.APIPromise<{ result: ConfigGetResponse }>
)._thenUnwrap((obj) => obj.result);
}
}
+export class ConfigListResponsesSinglePage extends SinglePage {}
+
+export interface ConfigCreateResponse extends HyperdriveAPI.Hyperdrive {
+ /**
+ * When the Hyperdrive configuration was created.
+ */
+ created_on?: string;
+
+ /**
+ * When the Hyperdrive configuration was last modified.
+ */
+ modified_on?: string;
+}
+
+export interface ConfigUpdateResponse extends HyperdriveAPI.Hyperdrive {
+ /**
+ * When the Hyperdrive configuration was created.
+ */
+ created_on?: string;
+
+ /**
+ * When the Hyperdrive configuration was last modified.
+ */
+ modified_on?: string;
+}
+
+export interface ConfigListResponse extends HyperdriveAPI.Hyperdrive {
+ /**
+ * When the Hyperdrive configuration was created.
+ */
+ created_on?: string;
+
+ /**
+ * When the Hyperdrive configuration was last modified.
+ */
+ modified_on?: string;
+}
+
export type ConfigDeleteResponse = unknown;
+export interface ConfigEditResponse extends HyperdriveAPI.Hyperdrive {
+ /**
+ * When the Hyperdrive configuration was created.
+ */
+ created_on?: string;
+
+ /**
+ * When the Hyperdrive configuration was last modified.
+ */
+ modified_on?: string;
+}
+
+export interface ConfigGetResponse extends HyperdriveAPI.Hyperdrive {
+ /**
+ * When the Hyperdrive configuration was created.
+ */
+ created_on?: string;
+
+ /**
+ * When the Hyperdrive configuration was last modified.
+ */
+ modified_on?: string;
+}
+
export interface ConfigCreateParams {
/**
* Path param: Identifier
@@ -171,7 +230,7 @@ export namespace ConfigCreateParams {
export interface AccessProtectedDatabaseBehindCloudflareTunnel {
/**
- * The Client ID of the Access token to use when connecting to the origin database
+ * The Client ID of the Access token to use when connecting to the origin database.
*/
access_client_id: string;
@@ -297,7 +356,7 @@ export namespace ConfigUpdateParams {
export interface AccessProtectedDatabaseBehindCloudflareTunnel {
/**
- * The Client ID of the Access token to use when connecting to the origin database
+ * The Client ID of the Access token to use when connecting to the origin database.
*/
access_client_id: string;
@@ -466,7 +525,7 @@ export namespace ConfigEditParams {
export interface HyperdriveHyperdriveOverAccessOrigin {
/**
- * The Client ID of the Access token to use when connecting to the origin database
+ * The Client ID of the Access token to use when connecting to the origin database.
*/
access_client_id: string;
@@ -490,9 +549,17 @@ export interface ConfigGetParams {
account_id: string;
}
+Configs.ConfigListResponsesSinglePage = ConfigListResponsesSinglePage;
+
export declare namespace Configs {
export {
+ type ConfigCreateResponse as ConfigCreateResponse,
+ type ConfigUpdateResponse as ConfigUpdateResponse,
+ type ConfigListResponse as ConfigListResponse,
type ConfigDeleteResponse as ConfigDeleteResponse,
+ type ConfigEditResponse as ConfigEditResponse,
+ type ConfigGetResponse as ConfigGetResponse,
+ ConfigListResponsesSinglePage as ConfigListResponsesSinglePage,
type ConfigCreateParams as ConfigCreateParams,
type ConfigUpdateParams as ConfigUpdateParams,
type ConfigListParams as ConfigListParams,
@@ -501,5 +568,3 @@ export declare namespace Configs {
type ConfigGetParams as ConfigGetParams,
};
}
-
-export { HyperdrivesSinglePage };
diff --git a/src/resources/hyperdrive/hyperdrive.ts b/src/resources/hyperdrive/hyperdrive.ts
index 2077c1ada4..6b5b7a6f01 100644
--- a/src/resources/hyperdrive/hyperdrive.ts
+++ b/src/resources/hyperdrive/hyperdrive.ts
@@ -4,22 +4,25 @@ import { APIResource } from '../../resource';
import * as ConfigsAPI from './configs';
import {
ConfigCreateParams,
+ ConfigCreateResponse,
ConfigDeleteParams,
ConfigDeleteResponse,
ConfigEditParams,
+ ConfigEditResponse,
ConfigGetParams,
+ ConfigGetResponse,
ConfigListParams,
+ ConfigListResponse,
+ ConfigListResponsesSinglePage,
ConfigUpdateParams,
+ ConfigUpdateResponse,
Configs,
} from './configs';
-import { SinglePage } from '../../pagination';
export class HyperdriveResource extends APIResource {
configs: ConfigsAPI.Configs = new ConfigsAPI.Configs(this._client);
}
-export class HyperdrivesSinglePage extends SinglePage {}
-
export type Configuration =
| Configuration.HyperdriveHyperdriveInternetOrigin
| Configuration.HyperdriveHyperdriveOverAccessOrigin;
@@ -54,7 +57,7 @@ export namespace Configuration {
export interface HyperdriveHyperdriveOverAccessOrigin {
/**
- * The Client ID of the Access token to use when connecting to the origin database
+ * The Client ID of the Access token to use when connecting to the origin database.
*/
access_client_id: string;
@@ -123,7 +126,7 @@ export namespace Hyperdrive {
export interface AccessProtectedDatabaseBehindCloudflareTunnel {
/**
- * The Client ID of the Access token to use when connecting to the origin database
+ * The Client ID of the Access token to use when connecting to the origin database.
*/
access_client_id: string;
@@ -176,11 +179,18 @@ export namespace Hyperdrive {
}
HyperdriveResource.Configs = Configs;
+HyperdriveResource.ConfigListResponsesSinglePage = ConfigListResponsesSinglePage;
export declare namespace HyperdriveResource {
export {
Configs as Configs,
+ type ConfigCreateResponse as ConfigCreateResponse,
+ type ConfigUpdateResponse as ConfigUpdateResponse,
+ type ConfigListResponse as ConfigListResponse,
type ConfigDeleteResponse as ConfigDeleteResponse,
+ type ConfigEditResponse as ConfigEditResponse,
+ type ConfigGetResponse as ConfigGetResponse,
+ ConfigListResponsesSinglePage as ConfigListResponsesSinglePage,
type ConfigCreateParams as ConfigCreateParams,
type ConfigUpdateParams as ConfigUpdateParams,
type ConfigListParams as ConfigListParams,
diff --git a/src/resources/hyperdrive/index.ts b/src/resources/hyperdrive/index.ts
index 638a077546..dd168e05ff 100644
--- a/src/resources/hyperdrive/index.ts
+++ b/src/resources/hyperdrive/index.ts
@@ -1,8 +1,14 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
export {
+ ConfigListResponsesSinglePage,
Configs,
+ type ConfigCreateResponse,
+ type ConfigUpdateResponse,
+ type ConfigListResponse,
type ConfigDeleteResponse,
+ type ConfigEditResponse,
+ type ConfigGetResponse,
type ConfigCreateParams,
type ConfigUpdateParams,
type ConfigListParams,
diff --git a/src/resources/rulesets/rulesets.ts b/src/resources/rulesets/rulesets.ts
index 5c5b604cba..9d1a1f803f 100644
--- a/src/resources/rulesets/rulesets.ts
+++ b/src/resources/rulesets/rulesets.ts
@@ -51,7 +51,7 @@ import {
PhaseUpdateResponse,
Phases,
} from './phases/phases';
-import { SinglePage } from '../../pagination';
+import { CursorPagination, type CursorPaginationParams } from '../../pagination';
export class Rulesets extends APIResource {
phases: PhasesAPI.Phases = new PhasesAPI.Phases(this._client);
@@ -126,16 +126,18 @@ export class Rulesets extends APIResource {
list(
params?: RulesetListParams,
options?: Core.RequestOptions,
- ): Core.PagePromise;
- list(options?: Core.RequestOptions): Core.PagePromise;
+ ): Core.PagePromise;
+ list(
+ options?: Core.RequestOptions,
+ ): Core.PagePromise;
list(
params: RulesetListParams | Core.RequestOptions = {},
options?: Core.RequestOptions,
- ): Core.PagePromise {
+ ): Core.PagePromise {
if (isRequestOptions(params)) {
return this.list({}, params);
}
- const { account_id, zone_id } = params;
+ const { account_id, zone_id, ...query } = params;
if (!account_id && !zone_id) {
throw new CloudflareError('You must provide either account_id or zone_id.');
}
@@ -154,8 +156,8 @@ export class Rulesets extends APIResource {
};
return this._client.getAPIList(
`/${accountOrZone}/${accountOrZoneId}/rulesets`,
- RulesetListResponsesSinglePage,
- options,
+ RulesetListResponsesCursorPagination,
+ { query, ...options },
);
}
@@ -242,7 +244,7 @@ export class Rulesets extends APIResource {
}
}
-export class RulesetListResponsesSinglePage extends SinglePage {}
+export class RulesetListResponsesCursorPagination extends CursorPagination {}
/**
* The kind of the ruleset.
@@ -1988,14 +1990,16 @@ export namespace RulesetUpdateParams {
}
}
-export interface RulesetListParams {
+export interface RulesetListParams extends CursorPaginationParams {
/**
- * The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
+ * Path param: 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.
+ * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the
+ * Account ID.
*/
zone_id?: string;
}
diff --git a/src/resources/zero-trust/access/infrastructure/targets.ts b/src/resources/zero-trust/access/infrastructure/targets.ts
index 427e7636e9..2c22f8ba6f 100644
--- a/src/resources/zero-trust/access/infrastructure/targets.ts
+++ b/src/resources/zero-trust/access/infrastructure/targets.ts
@@ -36,9 +36,8 @@ export class Targets extends APIResource {
}
/**
- * Lists and sorts an account’s targets. Filters are optional and are ORed
- * together. However, when a timestamp is specified with both its before and after
- * counterparts, the timestamp filters are ANDed.
+ * Lists and sorts an account’s targets. Filters are optional and are ANDed
+ * together.
*/
list(
params: TargetListParams,
diff --git a/src/resources/zero-trust/dex/commands/commands.ts b/src/resources/zero-trust/dex/commands/commands.ts
index 8936e878d7..b550a6f4c5 100644
--- a/src/resources/zero-trust/dex/commands/commands.ts
+++ b/src/resources/zero-trust/dex/commands/commands.ts
@@ -14,7 +14,7 @@ import { DownloadGetParams, Downloads } from './downloads';
import * as QuotaAPI from './quota';
import { Quota, QuotaGetParams, QuotaGetResponse } from './quota';
import * as UsersAPI from './users';
-import { UserListParams, UserListResponse, Users } from './users';
+import { Users } from './users';
import { V4PagePagination, type V4PagePaginationParams } from '../../../../pagination';
export class Commands extends APIResource {
@@ -234,7 +234,7 @@ export declare namespace Commands {
type CommandListParams as CommandListParams,
};
- export { Users as Users, type UserListResponse as UserListResponse, type UserListParams as UserListParams };
+ export { Users as Users };
export {
Devices as Devices,
diff --git a/src/resources/zero-trust/dex/commands/devices.ts b/src/resources/zero-trust/dex/commands/devices.ts
index 792c89812b..53725108ee 100644
--- a/src/resources/zero-trust/dex/commands/devices.ts
+++ b/src/resources/zero-trust/dex/commands/devices.ts
@@ -43,6 +43,16 @@ export namespace DeviceListResponse {
*/
deviceName?: string;
+ /**
+ * Whether the device is eligible for remote captures
+ */
+ eligible?: boolean;
+
+ /**
+ * If the device is not eligible, the reason why.
+ */
+ ineligibleReason?: string;
+
/**
* User contact email address
*/
diff --git a/src/resources/zero-trust/dex/commands/index.ts b/src/resources/zero-trust/dex/commands/index.ts
index cfe4b86184..a381815430 100644
--- a/src/resources/zero-trust/dex/commands/index.ts
+++ b/src/resources/zero-trust/dex/commands/index.ts
@@ -16,4 +16,4 @@ export {
} from './devices';
export { Downloads, type DownloadGetParams } from './downloads';
export { Quota, type QuotaGetResponse, type QuotaGetParams } from './quota';
-export { Users, type UserListResponse, type UserListParams } from './users';
+export { Users } from './users';
diff --git a/src/resources/zero-trust/dex/commands/users.ts b/src/resources/zero-trust/dex/commands/users.ts
index 869d3e5c0f..8cd42a530a 100644
--- a/src/resources/zero-trust/dex/commands/users.ts
+++ b/src/resources/zero-trust/dex/commands/users.ts
@@ -1,43 +1,5 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from '../../../../resource';
-import * as Core from '../../../../core';
-export class Users extends APIResource {
- /**
- * List users emails associated with devices with WARP client support for remote
- * captures which have been connected in the last 1 hour.
- */
- list(params: UserListParams, options?: Core.RequestOptions): Core.APIPromise {
- const { account_id, ...query } = params;
- return (
- this._client.get(`/accounts/${account_id}/dex/commands/users`, {
- query,
- ...options,
- }) as Core.APIPromise<{ result: UserListResponse }>
- )._thenUnwrap((obj) => obj.result);
- }
-}
-
-export interface UserListResponse {
- /**
- * List of user emails
- */
- userEmails?: Array;
-}
-
-export interface UserListParams {
- /**
- * Path param: unique identifier linked to an account in the API request path
- */
- account_id: string;
-
- /**
- * Query param: filter user emails by search
- */
- search?: string;
-}
-
-export declare namespace Users {
- export { type UserListResponse as UserListResponse, type UserListParams as UserListParams };
-}
+export class Users extends APIResource {}
diff --git a/src/resources/zero-trust/gateway/rules.ts b/src/resources/zero-trust/gateway/rules.ts
index a510672c7f..64e3e178d7 100644
--- a/src/resources/zero-trust/gateway/rules.ts
+++ b/src/resources/zero-trust/gateway/rules.ts
@@ -496,29 +496,72 @@ export namespace RuleSetting {
*/
export interface BISOAdminControls {
/**
- * Set to false to enable copy-pasting.
+ * Configure whether copy is enabled or not. When set with "remote_only", copying
+ * isolated content from the remote browser to the user's local clipboard is
+ * disabled. When absent, copy is enabled. Only applies when `version == "v2"`.
+ */
+ copy?: 'enabled' | 'disabled' | 'remote_only';
+
+ /**
+ * Set to false to enable copy-pasting. Only applies when `version == "v1"`.
*/
dcp?: boolean;
/**
- * Set to false to enable downloading.
+ * Set to false to enable downloading. Only applies when `version == "v1"`.
*/
dd?: boolean;
/**
- * Set to false to enable keyboard usage.
+ * Set to false to enable keyboard usage. Only applies when `version == "v1"`.
*/
dk?: boolean;
/**
- * Set to false to enable printing.
+ * Configure whether downloading enabled or not. When absent, downloading is
+ * enabled. Only applies when `version == "v2"`.
+ */
+ download?: 'enabled' | 'disabled';
+
+ /**
+ * Set to false to enable printing. Only applies when `version == "v1"`.
*/
dp?: boolean;
/**
- * Set to false to enable uploading.
+ * Set to false to enable uploading. Only applies when `version == "v1"`.
*/
du?: boolean;
+
+ /**
+ * Configure whether keyboard usage is enabled or not. When absent, keyboard usage
+ * is enabled. Only applies when `version == "v2"`.
+ */
+ keyboard?: 'enabled' | 'disabled';
+
+ /**
+ * Configure whether pasting is enabled or not. When set with "remote_only",
+ * pasting content from the user's local clipboard into isolated pages is disabled.
+ * When absent, paste is enabled. Only applies when `version == "v2"`.
+ */
+ paste?: 'enabled' | 'disabled' | 'remote_only';
+
+ /**
+ * Configure whether printing is enabled or not. When absent, printing is enabled.
+ * Only applies when `version == "v2"`.
+ */
+ printing?: 'enabled' | 'disabled';
+
+ /**
+ * Configure whether uploading is enabled or not. When absent, uploading is
+ * enabled. Only applies when `version == "v2"`.
+ */
+ upload?: 'enabled' | 'disabled';
+
+ /**
+ * Indicates which version of the browser isolation controls should apply.
+ */
+ version?: 'v1' | 'v2';
}
/**
@@ -829,29 +872,72 @@ export namespace RuleSettingParam {
*/
export interface BISOAdminControls {
/**
- * Set to false to enable copy-pasting.
+ * Configure whether copy is enabled or not. When set with "remote_only", copying
+ * isolated content from the remote browser to the user's local clipboard is
+ * disabled. When absent, copy is enabled. Only applies when `version == "v2"`.
+ */
+ copy?: 'enabled' | 'disabled' | 'remote_only';
+
+ /**
+ * Set to false to enable copy-pasting. Only applies when `version == "v1"`.
*/
dcp?: boolean;
/**
- * Set to false to enable downloading.
+ * Set to false to enable downloading. Only applies when `version == "v1"`.
*/
dd?: boolean;
/**
- * Set to false to enable keyboard usage.
+ * Set to false to enable keyboard usage. Only applies when `version == "v1"`.
*/
dk?: boolean;
/**
- * Set to false to enable printing.
+ * Configure whether downloading enabled or not. When absent, downloading is
+ * enabled. Only applies when `version == "v2"`.
+ */
+ download?: 'enabled' | 'disabled';
+
+ /**
+ * Set to false to enable printing. Only applies when `version == "v1"`.
*/
dp?: boolean;
/**
- * Set to false to enable uploading.
+ * Set to false to enable uploading. Only applies when `version == "v1"`.
*/
du?: boolean;
+
+ /**
+ * Configure whether keyboard usage is enabled or not. When absent, keyboard usage
+ * is enabled. Only applies when `version == "v2"`.
+ */
+ keyboard?: 'enabled' | 'disabled';
+
+ /**
+ * Configure whether pasting is enabled or not. When set with "remote_only",
+ * pasting content from the user's local clipboard into isolated pages is disabled.
+ * When absent, paste is enabled. Only applies when `version == "v2"`.
+ */
+ paste?: 'enabled' | 'disabled' | 'remote_only';
+
+ /**
+ * Configure whether printing is enabled or not. When absent, printing is enabled.
+ * Only applies when `version == "v2"`.
+ */
+ printing?: 'enabled' | 'disabled';
+
+ /**
+ * Configure whether uploading is enabled or not. When absent, uploading is
+ * enabled. Only applies when `version == "v2"`.
+ */
+ upload?: 'enabled' | 'disabled';
+
+ /**
+ * Indicates which version of the browser isolation controls should apply.
+ */
+ version?: 'v1' | 'v2';
}
/**
diff --git a/tests/api-resources/zero-trust/dex/commands/users.test.ts b/tests/api-resources/zero-trust/dex/commands/users.test.ts
deleted file mode 100644
index cac143500a..0000000000
--- a/tests/api-resources/zero-trust/dex/commands/users.test.ts
+++ /dev/null
@@ -1,32 +0,0 @@
-// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-import Cloudflare from 'cloudflare';
-import { Response } from 'node-fetch';
-
-const client = new Cloudflare({
- apiKey: '144c9defac04969c7bfad8efaa8ea194',
- apiEmail: 'user@example.com',
- baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010',
-});
-
-describe('resource users', () => {
- test('list: only required params', async () => {
- const responsePromise = client.zeroTrust.dex.commands.users.list({
- account_id: '01a7362d577a6c3019a474fd6f485823',
- });
- const rawResponse = await responsePromise.asResponse();
- expect(rawResponse).toBeInstanceOf(Response);
- const response = await responsePromise;
- expect(response).not.toBeInstanceOf(Response);
- const dataAndResponse = await responsePromise.withResponse();
- expect(dataAndResponse.data).toBe(response);
- expect(dataAndResponse.response).toBe(rawResponse);
- });
-
- test('list: required and optional params', async () => {
- const response = await client.zeroTrust.dex.commands.users.list({
- account_id: '01a7362d577a6c3019a474fd6f485823',
- search: 'search',
- });
- });
-});
diff --git a/tests/api-resources/zero-trust/gateway/rules.test.ts b/tests/api-resources/zero-trust/gateway/rules.test.ts
index 8f0200cffc..bca8e12bee 100644
--- a/tests/api-resources/zero-trust/gateway/rules.test.ts
+++ b/tests/api-resources/zero-trust/gateway/rules.test.ts
@@ -41,7 +41,20 @@ describe('resource rules', () => {
add_headers: { foo: 'string' },
allow_child_bypass: false,
audit_ssh: { command_logging: false },
- biso_admin_controls: { dcp: false, dd: false, dk: false, dp: false, du: false },
+ biso_admin_controls: {
+ copy: 'enabled',
+ dcp: false,
+ dd: false,
+ dk: false,
+ download: 'enabled',
+ dp: false,
+ du: false,
+ keyboard: 'enabled',
+ paste: 'enabled',
+ printing: 'enabled',
+ upload: 'enabled',
+ version: 'v1',
+ },
block_page_enabled: true,
block_reason: 'This website is a security risk',
bypass_parent_rule: false,
@@ -125,7 +138,20 @@ describe('resource rules', () => {
add_headers: { foo: 'string' },
allow_child_bypass: false,
audit_ssh: { command_logging: false },
- biso_admin_controls: { dcp: false, dd: false, dk: false, dp: false, du: false },
+ biso_admin_controls: {
+ copy: 'enabled',
+ dcp: false,
+ dd: false,
+ dk: false,
+ download: 'enabled',
+ dp: false,
+ du: false,
+ keyboard: 'enabled',
+ paste: 'enabled',
+ printing: 'enabled',
+ upload: 'enabled',
+ version: 'v1',
+ },
block_page_enabled: true,
block_reason: 'This website is a security risk',
bypass_parent_rule: false,