diff --git a/api.md b/api.md index c891058e95..ba957aca64 100644 --- a/api.md +++ b/api.md @@ -4027,17 +4027,17 @@ Methods: Types: -- Network +- DeviceNetwork - UnnamedSchemaRefD2b048663faf5e0cd5c90501b71171de - NetworkDeleteResponse Methods: -- client.zeroTrust.devices.networks.create({ ...params }) -> Network | null -- client.zeroTrust.devices.networks.update(networkId, { ...params }) -> Network | null -- client.zeroTrust.devices.networks.list({ ...params }) -> NetworksSinglePage +- client.zeroTrust.devices.networks.create({ ...params }) -> DeviceNetwork | null +- client.zeroTrust.devices.networks.update(networkId, { ...params }) -> DeviceNetwork | null +- client.zeroTrust.devices.networks.list({ ...params }) -> DeviceNetworksSinglePage - client.zeroTrust.devices.networks.delete(networkId, { ...params }) -> NetworkDeleteResponse | null -- client.zeroTrust.devices.networks.get(networkId, { ...params }) -> Network | null +- client.zeroTrust.devices.networks.get(networkId, { ...params }) -> DeviceNetwork | null ### Policies @@ -4114,9 +4114,9 @@ Methods: Types: +- DeviceInput +- DeviceMatch - DevicePostureRule -- Input -- Match - UnnamedSchemaRef34ef0ad73a63c3f76ed170adca181930 - UnnamedSchemaRef41885dd46b9e0294254c49305a273681 - UnnamedSchemaRef9e35ef84511131488ae286ce78ac4b27 @@ -4134,16 +4134,16 @@ Methods: Types: -- Integrations +- Integration - UnnamedSchemaRefB84b377dfc9454d455b646d4bc9ab507 Methods: -- client.zeroTrust.devices.posture.integrations.create({ ...params }) -> Integrations | null +- client.zeroTrust.devices.posture.integrations.create({ ...params }) -> Integration | null - client.zeroTrust.devices.posture.integrations.list({ ...params }) -> IntegrationsSinglePage - client.zeroTrust.devices.posture.integrations.delete(integrationId, { ...params }) -> UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716a -- client.zeroTrust.devices.posture.integrations.edit(integrationId, { ...params }) -> Integrations | null -- client.zeroTrust.devices.posture.integrations.get(integrationId, { ...params }) -> Integrations | null +- client.zeroTrust.devices.posture.integrations.edit(integrationId, { ...params }) -> Integration | null +- client.zeroTrust.devices.posture.integrations.get(integrationId, { ...params }) -> Integration | null ### Revoke @@ -4363,33 +4363,33 @@ Methods: Types: -- ErviceToken +- ServiceToken - ServiceTokenCreateResponse - ServiceTokenRotateResponse Methods: - client.zeroTrust.access.serviceTokens.create({ ...params }) -> ServiceTokenCreateResponse -- client.zeroTrust.access.serviceTokens.update(uuid, { ...params }) -> ErviceToken -- client.zeroTrust.access.serviceTokens.list({ ...params }) -> ErviceTokensSinglePage -- client.zeroTrust.access.serviceTokens.delete(uuid, { ...params }) -> ErviceToken -- client.zeroTrust.access.serviceTokens.refresh(identifier, uuid) -> ErviceToken +- client.zeroTrust.access.serviceTokens.update(uuid, { ...params }) -> ServiceToken +- client.zeroTrust.access.serviceTokens.list({ ...params }) -> ServiceTokensSinglePage +- client.zeroTrust.access.serviceTokens.delete(uuid, { ...params }) -> ServiceToken +- client.zeroTrust.access.serviceTokens.refresh(identifier, uuid) -> ServiceToken - client.zeroTrust.access.serviceTokens.rotate(identifier, uuid) -> ServiceTokenRotateResponse ### Bookmarks Types: -- Bookmarks +- Bookmark - BookmarkDeleteResponse Methods: -- client.zeroTrust.access.bookmarks.create(identifier, uuid, { ...params }) -> Bookmarks -- client.zeroTrust.access.bookmarks.update(identifier, uuid, { ...params }) -> Bookmarks +- client.zeroTrust.access.bookmarks.create(identifier, uuid, { ...params }) -> Bookmark +- client.zeroTrust.access.bookmarks.update(identifier, uuid, { ...params }) -> Bookmark - client.zeroTrust.access.bookmarks.list(identifier) -> BookmarksSinglePage - client.zeroTrust.access.bookmarks.delete(identifier, uuid, { ...params }) -> BookmarkDeleteResponse -- client.zeroTrust.access.bookmarks.get(identifier, uuid) -> Bookmarks +- client.zeroTrust.access.bookmarks.get(identifier, uuid) -> Bookmark ### Keys @@ -4495,6 +4495,7 @@ Methods: Types: +- NetworkPath - Percentiles - UnnamedSchemaRefBf9e2abcf1b78a6cab8e6e29e2228a11 @@ -4579,17 +4580,16 @@ Methods: Types: -- NetworkPath +- NetworkPathGetResponse Methods: -- client.zeroTrust.dex.tracerouteTestResults.networkPath.get(testResultId, { ...params }) -> NetworkPath +- client.zeroTrust.dex.tracerouteTestResults.networkPath.get(testResultId, { ...params }) -> NetworkPathGetResponse ### TracerouteTests Types: -- NetworkPath - Traceroute - TracerouteTestPercentilesResponse diff --git a/src/resources/zero-trust/access/access.ts b/src/resources/zero-trust/access/access.ts index 10acde4643..12973630c6 100644 --- a/src/resources/zero-trust/access/access.ts +++ b/src/resources/zero-trust/access/access.ts @@ -426,15 +426,16 @@ export namespace Access { export import GroupDeleteParams = GroupsAPI.GroupDeleteParams; export import GroupGetParams = GroupsAPI.GroupGetParams; export import ServiceTokens = ServiceTokensAPI.ServiceTokens; - export import ErviceToken = ServiceTokensAPI.ErviceToken; + export import ServiceToken = ServiceTokensAPI.ServiceToken; export import ServiceTokenCreateResponse = ServiceTokensAPI.ServiceTokenCreateResponse; export import ServiceTokenRotateResponse = ServiceTokensAPI.ServiceTokenRotateResponse; - export import ErviceTokensSinglePage = ServiceTokensAPI.ErviceTokensSinglePage; + export import ServiceTokensSinglePage = ServiceTokensAPI.ServiceTokensSinglePage; export import ServiceTokenCreateParams = ServiceTokensAPI.ServiceTokenCreateParams; export import ServiceTokenUpdateParams = ServiceTokensAPI.ServiceTokenUpdateParams; export import ServiceTokenListParams = ServiceTokensAPI.ServiceTokenListParams; export import ServiceTokenDeleteParams = ServiceTokensAPI.ServiceTokenDeleteParams; export import Bookmarks = BookmarksAPI.Bookmarks; + export import Bookmark = BookmarksAPI.Bookmark; export import BookmarkDeleteResponse = BookmarksAPI.BookmarkDeleteResponse; export import BookmarksSinglePage = BookmarksAPI.BookmarksSinglePage; export import BookmarkCreateParams = BookmarksAPI.BookmarkCreateParams; diff --git a/src/resources/zero-trust/access/bookmarks.ts b/src/resources/zero-trust/access/bookmarks.ts index 5ae117077d..3f86b116a3 100644 --- a/src/resources/zero-trust/access/bookmarks.ts +++ b/src/resources/zero-trust/access/bookmarks.ts @@ -14,12 +14,12 @@ export class Bookmarks extends APIResource { uuid: string, body: BookmarkCreateParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { return ( this._client.post(`/accounts/${identifier}/access/bookmarks/${uuid}`, { body, ...options, - }) as Core.APIPromise<{ result: Bookmarks }> + }) as Core.APIPromise<{ result: Bookmark }> )._thenUnwrap((obj) => obj.result); } @@ -31,19 +31,19 @@ export class Bookmarks extends APIResource { uuid: string, body: BookmarkUpdateParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { return ( this._client.put(`/accounts/${identifier}/access/bookmarks/${uuid}`, { body, ...options, - }) as Core.APIPromise<{ result: Bookmarks }> + }) as Core.APIPromise<{ result: Bookmark }> )._thenUnwrap((obj) => obj.result); } /** * Lists Bookmark applications. */ - list(identifier: string, options?: Core.RequestOptions): Core.PagePromise { + list(identifier: string, options?: Core.RequestOptions): Core.PagePromise { return this._client.getAPIList(`/accounts/${identifier}/access/bookmarks`, BookmarksSinglePage, options); } @@ -67,18 +67,18 @@ export class Bookmarks extends APIResource { /** * Fetches a single Bookmark application. */ - get(identifier: string, uuid: string, options?: Core.RequestOptions): Core.APIPromise { + get(identifier: string, uuid: string, options?: Core.RequestOptions): Core.APIPromise { return ( this._client.get(`/accounts/${identifier}/access/bookmarks/${uuid}`, options) as Core.APIPromise<{ - result: Bookmarks; + result: Bookmark; }> )._thenUnwrap((obj) => obj.result); } } -export class BookmarksSinglePage extends SinglePage {} +export class BookmarksSinglePage extends SinglePage {} -export interface Bookmarks { +export interface Bookmark { /** * The unique identifier for the Bookmark application. */ @@ -123,7 +123,7 @@ export type BookmarkUpdateParams = unknown; export type BookmarkDeleteParams = unknown; export namespace Bookmarks { - export import Bookmarks = BookmarksAPI.Bookmarks; + export import Bookmark = BookmarksAPI.Bookmark; export import BookmarkDeleteResponse = BookmarksAPI.BookmarkDeleteResponse; export import BookmarksSinglePage = BookmarksAPI.BookmarksSinglePage; export import BookmarkCreateParams = BookmarksAPI.BookmarkCreateParams; diff --git a/src/resources/zero-trust/access/index.ts b/src/resources/zero-trust/access/index.ts index e44bc96e3d..a85d79e436 100644 --- a/src/resources/zero-trust/access/index.ts +++ b/src/resources/zero-trust/access/index.ts @@ -58,12 +58,13 @@ export { Certificates, } from './certificates/index'; export { - Bookmarks, + Bookmark, BookmarkDeleteResponse, BookmarkCreateParams, BookmarkUpdateParams, BookmarkDeleteParams, BookmarksSinglePage, + Bookmarks, } from './bookmarks'; export { CustomPage, @@ -74,19 +75,19 @@ export { CustomPageWithoutHTMLsSinglePage, CustomPages, } from './custom-pages'; +export { KeyUpdateResponse, KeyGetResponse, KeyRotateResponse, KeyUpdateParams, Keys } from './keys'; +export { Logs } from './logs/index'; export { - ErviceToken, + ServiceToken, ServiceTokenCreateResponse, ServiceTokenRotateResponse, ServiceTokenCreateParams, ServiceTokenUpdateParams, ServiceTokenListParams, ServiceTokenDeleteParams, - ErviceTokensSinglePage, + ServiceTokensSinglePage, ServiceTokens, } from './service-tokens'; -export { KeyUpdateResponse, KeyGetResponse, KeyRotateResponse, KeyUpdateParams, Keys } from './keys'; -export { Logs } from './logs/index'; export { Tag, TagDeleteResponse, TagCreateParams, TagUpdateParams, TagsSinglePage, Tags } from './tags'; export { User, UsersSinglePage, Users } from './users/index'; export { diff --git a/src/resources/zero-trust/access/service-tokens.ts b/src/resources/zero-trust/access/service-tokens.ts index a118ba37e1..fdf9fb5233 100644 --- a/src/resources/zero-trust/access/service-tokens.ts +++ b/src/resources/zero-trust/access/service-tokens.ts @@ -49,7 +49,7 @@ export class ServiceTokens extends APIResource { uuid: string, params: ServiceTokenUpdateParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { account_id, zone_id, ...body } = params; if (!account_id && !zone_id) { throw new CloudflareError('You must provide either account_id or zone_id.'); @@ -71,7 +71,7 @@ export class ServiceTokens extends APIResource { this._client.put(`/${accountOrZone}/${accountOrZoneId}/access/service_tokens/${uuid}`, { body, ...options, - }) as Core.APIPromise<{ result: ErviceToken }> + }) as Core.APIPromise<{ result: ServiceToken }> )._thenUnwrap((obj) => obj.result); } @@ -81,12 +81,12 @@ export class ServiceTokens extends APIResource { list( params?: ServiceTokenListParams, options?: Core.RequestOptions, - ): Core.PagePromise; - list(options?: Core.RequestOptions): Core.PagePromise; + ): Core.PagePromise; + list(options?: Core.RequestOptions): Core.PagePromise; list( params: ServiceTokenListParams | Core.RequestOptions = {}, options?: Core.RequestOptions, - ): Core.PagePromise { + ): Core.PagePromise { if (isRequestOptions(params)) { return this.list({}, params); } @@ -109,7 +109,7 @@ export class ServiceTokens extends APIResource { }; return this._client.getAPIList( `/${accountOrZone}/${accountOrZoneId}/access/service_tokens`, - ErviceTokensSinglePage, + ServiceTokensSinglePage, options, ); } @@ -121,13 +121,13 @@ export class ServiceTokens extends APIResource { uuid: string, params?: ServiceTokenDeleteParams, options?: Core.RequestOptions, - ): Core.APIPromise; - delete(uuid: string, options?: Core.RequestOptions): Core.APIPromise; + ): Core.APIPromise; + delete(uuid: string, options?: Core.RequestOptions): Core.APIPromise; delete( uuid: string, params: ServiceTokenDeleteParams | Core.RequestOptions = {}, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { if (isRequestOptions(params)) { return this.delete(uuid, {}, params); } @@ -152,19 +152,19 @@ export class ServiceTokens extends APIResource { this._client.delete( `/${accountOrZone}/${accountOrZoneId}/access/service_tokens/${uuid}`, options, - ) as Core.APIPromise<{ result: ErviceToken }> + ) as Core.APIPromise<{ result: ServiceToken }> )._thenUnwrap((obj) => obj.result); } /** * Refreshes the expiration of a service token. */ - refresh(identifier: string, uuid: string, options?: Core.RequestOptions): Core.APIPromise { + refresh(identifier: string, uuid: string, options?: Core.RequestOptions): Core.APIPromise { return ( this._client.post( `/accounts/${identifier}/access/service_tokens/${uuid}/refresh`, options, - ) as Core.APIPromise<{ result: ErviceToken }> + ) as Core.APIPromise<{ result: ServiceToken }> )._thenUnwrap((obj) => obj.result); } @@ -185,9 +185,9 @@ export class ServiceTokens extends APIResource { } } -export class ErviceTokensSinglePage extends SinglePage {} +export class ServiceTokensSinglePage extends SinglePage {} -export interface ErviceToken { +export interface ServiceToken { /** * The ID of the service token. */ @@ -363,10 +363,10 @@ export interface ServiceTokenDeleteParams { } export namespace ServiceTokens { - export import ErviceToken = ServiceTokensAPI.ErviceToken; + export import ServiceToken = ServiceTokensAPI.ServiceToken; export import ServiceTokenCreateResponse = ServiceTokensAPI.ServiceTokenCreateResponse; export import ServiceTokenRotateResponse = ServiceTokensAPI.ServiceTokenRotateResponse; - export import ErviceTokensSinglePage = ServiceTokensAPI.ErviceTokensSinglePage; + export import ServiceTokensSinglePage = ServiceTokensAPI.ServiceTokensSinglePage; export import ServiceTokenCreateParams = ServiceTokensAPI.ServiceTokenCreateParams; export import ServiceTokenUpdateParams = ServiceTokensAPI.ServiceTokenUpdateParams; export import ServiceTokenListParams = ServiceTokensAPI.ServiceTokenListParams; diff --git a/src/resources/zero-trust/devices/devices.ts b/src/resources/zero-trust/devices/devices.ts index fd65a35e4c..773f6fbadb 100644 --- a/src/resources/zero-trust/devices/devices.ts +++ b/src/resources/zero-trust/devices/devices.ts @@ -191,10 +191,10 @@ export namespace Devices { export import DEXTestDeleteParams = DEXTestsAPI.DEXTestDeleteParams; export import DEXTestGetParams = DEXTestsAPI.DEXTestGetParams; export import Networks = NetworksAPI.Networks; - export import Network = NetworksAPI.Network; + export import DeviceNetwork = NetworksAPI.DeviceNetwork; export import UnnamedSchemaRefD2b048663faf5e0cd5c90501b71171de = NetworksAPI.UnnamedSchemaRefD2b048663faf5e0cd5c90501b71171de; export import NetworkDeleteResponse = NetworksAPI.NetworkDeleteResponse; - export import NetworksSinglePage = NetworksAPI.NetworksSinglePage; + export import DeviceNetworksSinglePage = NetworksAPI.DeviceNetworksSinglePage; export import NetworkCreateParams = NetworksAPI.NetworkCreateParams; export import NetworkUpdateParams = NetworksAPI.NetworkUpdateParams; export import NetworkListParams = NetworksAPI.NetworkListParams; @@ -211,9 +211,9 @@ export namespace Devices { export import PolicyEditParams = PoliciesAPI.PolicyEditParams; export import PolicyGetParams = PoliciesAPI.PolicyGetParams; export import Posture = PostureAPI.Posture; + export import DeviceInput = PostureAPI.DeviceInput; + export import DeviceMatch = PostureAPI.DeviceMatch; export import DevicePostureRule = PostureAPI.DevicePostureRule; - export import Input = PostureAPI.Input; - export import Match = PostureAPI.Match; export import UnnamedSchemaRef34ef0ad73a63c3f76ed170adca181930 = PostureAPI.UnnamedSchemaRef34ef0ad73a63c3f76ed170adca181930; export import UnnamedSchemaRef41885dd46b9e0294254c49305a273681 = PostureAPI.UnnamedSchemaRef41885dd46b9e0294254c49305a273681; export import UnnamedSchemaRef9e35ef84511131488ae286ce78ac4b27 = PostureAPI.UnnamedSchemaRef9e35ef84511131488ae286ce78ac4b27; diff --git a/src/resources/zero-trust/devices/index.ts b/src/resources/zero-trust/devices/index.ts index ca0ff6a819..c42023e66c 100644 --- a/src/resources/zero-trust/devices/index.ts +++ b/src/resources/zero-trust/devices/index.ts @@ -2,9 +2,9 @@ export { Device, DeviceListParams, DeviceGetParams, DevicesSinglePage, Devices } from './devices'; export { + DeviceInput, + DeviceMatch, DevicePostureRule, - Input, - Match, UnnamedSchemaRef34ef0ad73a63c3f76ed170adca181930, UnnamedSchemaRef41885dd46b9e0294254c49305a273681, UnnamedSchemaRef9e35ef84511131488ae286ce78ac4b27, @@ -17,9 +17,8 @@ export { DevicePostureRulesSinglePage, Posture, } from './posture/index'; -export { DeviceSettings, SettingUpdateParams, SettingListParams, Settings } from './settings'; export { - Network, + DeviceNetwork, UnnamedSchemaRefD2b048663faf5e0cd5c90501b71171de, NetworkDeleteResponse, NetworkCreateParams, @@ -27,9 +26,10 @@ export { NetworkListParams, NetworkDeleteParams, NetworkGetParams, - NetworksSinglePage, + DeviceNetworksSinglePage, Networks, } from './networks'; +export { DeviceSettings, SettingUpdateParams, SettingListParams, Settings } from './settings'; export { OverrideCodeListResponse, OverrideCodeListParams, OverrideCodes } from './override-codes'; export { RevokeCreateParams, Revoke } from './revoke'; export { diff --git a/src/resources/zero-trust/devices/networks.ts b/src/resources/zero-trust/devices/networks.ts index 66fa37c1ff..e497bb644f 100644 --- a/src/resources/zero-trust/devices/networks.ts +++ b/src/resources/zero-trust/devices/networks.ts @@ -9,11 +9,11 @@ export class Networks extends APIResource { /** * Creates a new device managed network. */ - create(params: NetworkCreateParams, options?: Core.RequestOptions): Core.APIPromise { + create(params: NetworkCreateParams, options?: Core.RequestOptions): Core.APIPromise { const { account_id, ...body } = params; return ( this._client.post(`/accounts/${account_id}/devices/networks`, { body, ...options }) as Core.APIPromise<{ - result: Network | null; + result: DeviceNetwork | null; }> )._thenUnwrap((obj) => obj.result); } @@ -25,13 +25,13 @@ export class Networks extends APIResource { networkId: string, params: NetworkUpdateParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { account_id, ...body } = params; return ( this._client.put(`/accounts/${account_id}/devices/networks/${networkId}`, { body, ...options, - }) as Core.APIPromise<{ result: Network | null }> + }) as Core.APIPromise<{ result: DeviceNetwork | null }> )._thenUnwrap((obj) => obj.result); } @@ -41,9 +41,13 @@ export class Networks extends APIResource { list( params: NetworkListParams, options?: Core.RequestOptions, - ): Core.PagePromise { + ): Core.PagePromise { const { account_id } = params; - return this._client.getAPIList(`/accounts/${account_id}/devices/networks`, NetworksSinglePage, options); + return this._client.getAPIList( + `/accounts/${account_id}/devices/networks`, + DeviceNetworksSinglePage, + options, + ); } /** @@ -71,24 +75,24 @@ export class Networks extends APIResource { networkId: string, params: NetworkGetParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { account_id } = params; return ( this._client.get(`/accounts/${account_id}/devices/networks/${networkId}`, options) as Core.APIPromise<{ - result: Network | null; + result: DeviceNetwork | null; }> )._thenUnwrap((obj) => obj.result); } } -export class NetworksSinglePage extends SinglePage {} +export class DeviceNetworksSinglePage extends SinglePage {} -export interface Network { +export interface DeviceNetwork { /** * The configuration object containing information for the WARP client to detect * the managed network. */ - config?: Network.Config; + config?: DeviceNetwork.Config; /** * The name of the device managed network. This name must be unique. @@ -106,7 +110,7 @@ export interface Network { type?: 'tls'; } -export namespace Network { +export namespace DeviceNetwork { /** * The configuration object containing information for the WARP client to detect * the managed network. @@ -171,7 +175,7 @@ export namespace UnnamedSchemaRefD2b048663faf5e0cd5c90501b71171de { } } -export type NetworkDeleteResponse = Array; +export type NetworkDeleteResponse = Array; export interface NetworkCreateParams { /** @@ -282,10 +286,10 @@ export interface NetworkGetParams { } export namespace Networks { - export import Network = NetworksAPI.Network; + export import DeviceNetwork = NetworksAPI.DeviceNetwork; export import UnnamedSchemaRefD2b048663faf5e0cd5c90501b71171de = NetworksAPI.UnnamedSchemaRefD2b048663faf5e0cd5c90501b71171de; export import NetworkDeleteResponse = NetworksAPI.NetworkDeleteResponse; - export import NetworksSinglePage = NetworksAPI.NetworksSinglePage; + export import DeviceNetworksSinglePage = NetworksAPI.DeviceNetworksSinglePage; export import NetworkCreateParams = NetworksAPI.NetworkCreateParams; export import NetworkUpdateParams = NetworksAPI.NetworkUpdateParams; export import NetworkListParams = NetworksAPI.NetworkListParams; diff --git a/src/resources/zero-trust/devices/posture/index.ts b/src/resources/zero-trust/devices/posture/index.ts index fd573939af..c7c3f4c956 100644 --- a/src/resources/zero-trust/devices/posture/index.ts +++ b/src/resources/zero-trust/devices/posture/index.ts @@ -1,9 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. export { + DeviceInput, + DeviceMatch, DevicePostureRule, - Input, - Match, UnnamedSchemaRef34ef0ad73a63c3f76ed170adca181930, UnnamedSchemaRef41885dd46b9e0294254c49305a273681, UnnamedSchemaRef9e35ef84511131488ae286ce78ac4b27, @@ -17,7 +17,7 @@ export { Posture, } from './posture'; export { - Integrations, + Integration, UnnamedSchemaRefB84b377dfc9454d455b646d4bc9ab507, IntegrationCreateParams, IntegrationListParams, @@ -25,4 +25,5 @@ export { IntegrationEditParams, IntegrationGetParams, IntegrationsSinglePage, + Integrations, } from './integrations'; diff --git a/src/resources/zero-trust/devices/posture/integrations.ts b/src/resources/zero-trust/devices/posture/integrations.ts index 924655ae47..27c4f08226 100644 --- a/src/resources/zero-trust/devices/posture/integrations.ts +++ b/src/resources/zero-trust/devices/posture/integrations.ts @@ -13,13 +13,13 @@ export class Integrations extends APIResource { create( params: IntegrationCreateParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { account_id, ...body } = params; return ( this._client.post(`/accounts/${account_id}/devices/posture/integration`, { body, ...options, - }) as Core.APIPromise<{ result: Integrations | null }> + }) as Core.APIPromise<{ result: Integration | null }> )._thenUnwrap((obj) => obj.result); } @@ -29,7 +29,7 @@ export class Integrations extends APIResource { list( params: IntegrationListParams, options?: Core.RequestOptions, - ): Core.PagePromise { + ): Core.PagePromise { const { account_id } = params; return this._client.getAPIList( `/accounts/${account_id}/devices/posture/integration`, @@ -62,13 +62,13 @@ export class Integrations extends APIResource { integrationId: string, params: IntegrationEditParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { account_id, ...body } = params; return ( this._client.patch(`/accounts/${account_id}/devices/posture/integration/${integrationId}`, { body, ...options, - }) as Core.APIPromise<{ result: Integrations | null }> + }) as Core.APIPromise<{ result: Integration | null }> )._thenUnwrap((obj) => obj.result); } @@ -79,20 +79,20 @@ export class Integrations extends APIResource { integrationId: string, params: IntegrationGetParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { account_id } = params; return ( this._client.get( `/accounts/${account_id}/devices/posture/integration/${integrationId}`, options, - ) as Core.APIPromise<{ result: Integrations | null }> + ) as Core.APIPromise<{ result: Integration | null }> )._thenUnwrap((obj) => obj.result); } } -export class IntegrationsSinglePage extends SinglePage {} +export class IntegrationsSinglePage extends SinglePage {} -export interface Integrations { +export interface Integration { /** * API UUID. */ @@ -101,7 +101,7 @@ export interface Integrations { /** * The configuration object containing third-party integration information. */ - config?: Integrations.Config; + config?: Integration.Config; /** * The interval between each posture check with the third-party API. Use `m` for @@ -120,7 +120,7 @@ export interface Integrations { type?: 'workspace_one' | 'crowdstrike_s2s' | 'uptycs' | 'intune' | 'kolide' | 'tanium' | 'sentinelone_s2s'; } -export namespace Integrations { +export namespace Integration { /** * The configuration object containing third-party integration information. */ @@ -551,7 +551,7 @@ export interface IntegrationGetParams { } export namespace Integrations { - export import Integrations = IntegrationsAPI.Integrations; + export import Integration = IntegrationsAPI.Integration; export import UnnamedSchemaRefB84b377dfc9454d455b646d4bc9ab507 = IntegrationsAPI.UnnamedSchemaRefB84b377dfc9454d455b646d4bc9ab507; export import IntegrationsSinglePage = IntegrationsAPI.IntegrationsSinglePage; export import IntegrationCreateParams = IntegrationsAPI.IntegrationCreateParams; diff --git a/src/resources/zero-trust/devices/posture/posture.ts b/src/resources/zero-trust/devices/posture/posture.ts index 4bb511e7b5..cd5f96e967 100644 --- a/src/resources/zero-trust/devices/posture/posture.ts +++ b/src/resources/zero-trust/devices/posture/posture.ts @@ -92,91 +92,28 @@ export class Posture extends APIResource { export class DevicePostureRulesSinglePage extends SinglePage {} -export interface DevicePostureRule { - /** - * API UUID. - */ - id?: string; - - /** - * The description of the device posture rule. - */ - description?: string; - - /** - * Sets the expiration time for a posture check result. If empty, the result - * remains valid until it is overwritten by new data from the WARP client. - */ - expiration?: string; - - /** - * The value to be checked against. - */ - input?: Input; - - /** - * The conditions that the client must match to run the rule. - */ - match?: Array; - - /** - * The name of the device posture rule. - */ - name?: string; - - /** - * Polling frequency for the WARP client posture check. Default: `5m` (poll every - * five minutes). Minimum: `1m`. - */ - schedule?: string; - - /** - * The type of device posture rule. - */ - type?: - | 'file' - | 'application' - | 'tanium' - | 'gateway' - | 'warp' - | 'disk_encryption' - | 'sentinelone' - | 'carbonblack' - | 'firewall' - | 'os_version' - | 'domain_joined' - | 'client_certificate' - | 'unique_client_id' - | 'kolide' - | 'tanium_s2s' - | 'crowdstrike_s2s' - | 'intune' - | 'workspace_one' - | 'sentinelone_s2s'; -} - /** * The value to be checked against. */ -export type Input = - | Input.TeamsDevicesFileInputRequest - | Input.TeamsDevicesUniqueClientIDInputRequest - | Input.TeamsDevicesDomainJoinedInputRequest - | Input.TeamsDevicesOSVersionInputRequest - | Input.TeamsDevicesFirewallInputRequest - | Input.TeamsDevicesSentineloneInputRequest - | Input.TeamsDevicesCarbonblackInputRequest - | Input.TeamsDevicesDiskEncryptionInputRequest - | Input.TeamsDevicesApplicationInputRequest - | Input.TeamsDevicesClientCertificateInputRequest - | Input.TeamsDevicesWorkspaceOneInputRequest - | Input.TeamsDevicesCrowdstrikeInputRequest - | Input.TeamsDevicesIntuneInputRequest - | Input.TeamsDevicesKolideInputRequest - | Input.TeamsDevicesTaniumInputRequest - | Input.TeamsDevicesSentineloneS2sInputRequest; - -export namespace Input { +export type DeviceInput = + | DeviceInput.TeamsDevicesFileInputRequest + | DeviceInput.TeamsDevicesUniqueClientIDInputRequest + | DeviceInput.TeamsDevicesDomainJoinedInputRequest + | DeviceInput.TeamsDevicesOSVersionInputRequest + | DeviceInput.TeamsDevicesFirewallInputRequest + | DeviceInput.TeamsDevicesSentineloneInputRequest + | DeviceInput.TeamsDevicesCarbonblackInputRequest + | DeviceInput.TeamsDevicesDiskEncryptionInputRequest + | DeviceInput.TeamsDevicesApplicationInputRequest + | DeviceInput.TeamsDevicesClientCertificateInputRequest + | DeviceInput.TeamsDevicesWorkspaceOneInputRequest + | DeviceInput.TeamsDevicesCrowdstrikeInputRequest + | DeviceInput.TeamsDevicesIntuneInputRequest + | DeviceInput.TeamsDevicesKolideInputRequest + | DeviceInput.TeamsDevicesTaniumInputRequest + | DeviceInput.TeamsDevicesSentineloneS2sInputRequest; + +export namespace DeviceInput { export interface TeamsDevicesFileInputRequest { /** * Operating system @@ -516,10 +453,73 @@ export namespace Input { } } -export interface Match { +export interface DeviceMatch { platform?: 'windows' | 'mac' | 'linux' | 'android' | 'ios'; } +export interface DevicePostureRule { + /** + * API UUID. + */ + id?: string; + + /** + * The description of the device posture rule. + */ + description?: string; + + /** + * Sets the expiration time for a posture check result. If empty, the result + * remains valid until it is overwritten by new data from the WARP client. + */ + expiration?: string; + + /** + * The value to be checked against. + */ + input?: DeviceInput; + + /** + * The conditions that the client must match to run the rule. + */ + match?: Array; + + /** + * The name of the device posture rule. + */ + name?: string; + + /** + * Polling frequency for the WARP client posture check. Default: `5m` (poll every + * five minutes). Minimum: `1m`. + */ + schedule?: string; + + /** + * The type of device posture rule. + */ + type?: + | 'file' + | 'application' + | 'tanium' + | 'gateway' + | 'warp' + | 'disk_encryption' + | 'sentinelone' + | 'carbonblack' + | 'firewall' + | 'os_version' + | 'domain_joined' + | 'client_certificate' + | 'unique_client_id' + | 'kolide' + | 'tanium_s2s' + | 'crowdstrike_s2s' + | 'intune' + | 'workspace_one' + | 'sentinelone_s2s'; +} + /** * operator */ @@ -550,12 +550,12 @@ export interface UnnamedSchemaRef9e35ef84511131488ae286ce78ac4b27 { /** * The value to be checked against. */ - input?: Input; + input?: DeviceInput; /** * The conditions that the client must match to run the rule. */ - match?: Array; + match?: Array; /** * The name of the device posture rule. @@ -649,12 +649,12 @@ export interface PostureCreateParams { /** * Body param: The value to be checked against. */ - input?: Input; + input?: DeviceInput; /** * Body param: The conditions that the client must match to run the rule. */ - match?: Array; + match?: Array; /** * Body param: Polling frequency for the WARP client posture check. Default: `5m` @@ -712,12 +712,12 @@ export interface PostureUpdateParams { /** * Body param: The value to be checked against. */ - input?: Input; + input?: DeviceInput; /** * Body param: The conditions that the client must match to run the rule. */ - match?: Array; + match?: Array; /** * Body param: Polling frequency for the WARP client posture check. Default: `5m` @@ -747,9 +747,9 @@ export interface PostureGetParams { } export namespace Posture { + export import DeviceInput = PostureAPI.DeviceInput; + export import DeviceMatch = PostureAPI.DeviceMatch; export import DevicePostureRule = PostureAPI.DevicePostureRule; - export import Input = PostureAPI.Input; - export import Match = PostureAPI.Match; export import UnnamedSchemaRef34ef0ad73a63c3f76ed170adca181930 = PostureAPI.UnnamedSchemaRef34ef0ad73a63c3f76ed170adca181930; export import UnnamedSchemaRef41885dd46b9e0294254c49305a273681 = PostureAPI.UnnamedSchemaRef41885dd46b9e0294254c49305a273681; export import UnnamedSchemaRef9e35ef84511131488ae286ce78ac4b27 = PostureAPI.UnnamedSchemaRef9e35ef84511131488ae286ce78ac4b27; @@ -761,6 +761,7 @@ export namespace Posture { export import PostureDeleteParams = PostureAPI.PostureDeleteParams; export import PostureGetParams = PostureAPI.PostureGetParams; export import Integrations = IntegrationsAPI.Integrations; + export import Integration = IntegrationsAPI.Integration; export import UnnamedSchemaRefB84b377dfc9454d455b646d4bc9ab507 = IntegrationsAPI.UnnamedSchemaRefB84b377dfc9454d455b646d4bc9ab507; export import IntegrationsSinglePage = IntegrationsAPI.IntegrationsSinglePage; export import IntegrationCreateParams = IntegrationsAPI.IntegrationCreateParams; diff --git a/src/resources/zero-trust/dex/dex.ts b/src/resources/zero-trust/dex/dex.ts index 5ac9ca7043..e971085326 100644 --- a/src/resources/zero-trust/dex/dex.ts +++ b/src/resources/zero-trust/dex/dex.ts @@ -19,6 +19,86 @@ export class DEX extends APIResource { tracerouteTests: TracerouteTestsAPI.TracerouteTests = new TracerouteTestsAPI.TracerouteTests(this._client); } +export interface NetworkPath { + /** + * API Resource UUID tag. + */ + id: string; + + deviceName?: string; + + /** + * The interval at which the Traceroute synthetic application test is set to run. + */ + interval?: string; + + kind?: 'traceroute'; + + name?: string; + + networkPath?: NetworkPath.NetworkPath | null; + + /** + * The host of the Traceroute synthetic application test + */ + url?: string; +} + +export namespace NetworkPath { + export interface NetworkPath { + slots: Array; + + /** + * Specifies the sampling applied, if any, to the slots response. When sampled, + * results shown represent the first test run to the start of each sampling + * interval. + */ + sampling?: NetworkPath.Sampling | null; + } + + export namespace NetworkPath { + export interface Slot { + /** + * API Resource UUID tag. + */ + id: string; + + /** + * Round trip time in ms of the client to app mile + */ + clientToAppRttMs: number | null; + + /** + * Round trip time in ms of the client to Cloudflare egress mile + */ + clientToCfEgressRttMs: number | null; + + /** + * Round trip time in ms of the client to Cloudflare ingress mile + */ + clientToCfIngressRttMs: number | null; + + timestamp: string; + + /** + * Round trip time in ms of the client to ISP mile + */ + clientToIspRttMs?: number | null; + } + + /** + * Specifies the sampling applied, if any, to the slots response. When sampled, + * results shown represent the first test run to the start of each sampling + * interval. + */ + export interface Sampling { + unit: 'hours'; + + value: number; + } + } +} + export interface Percentiles { /** * p50 observed in the time period @@ -53,6 +133,7 @@ export interface UnnamedSchemaRefBf9e2abcf1b78a6cab8e6e29e2228a11 { } export namespace DEX { + export import NetworkPath = DEXAPI.NetworkPath; export import Percentiles = DEXAPI.Percentiles; export import UnnamedSchemaRefBf9e2abcf1b78a6cab8e6e29e2228a11 = DEXAPI.UnnamedSchemaRefBf9e2abcf1b78a6cab8e6e29e2228a11; export import Colos = ColosAPI.Colos; @@ -74,7 +155,6 @@ export namespace DEX { export import TestListParams = TestsAPI.TestListParams; export import TracerouteTestResults = TracerouteTestResultsAPI.TracerouteTestResults; export import TracerouteTests = TracerouteTestsAPI.TracerouteTests; - export import NetworkPath = TracerouteTestsAPI.NetworkPath; export import Traceroute = TracerouteTestsAPI.Traceroute; export import TracerouteTestPercentilesResponse = TracerouteTestsAPI.TracerouteTestPercentilesResponse; export import TracerouteTestGetParams = TracerouteTestsAPI.TracerouteTestGetParams; diff --git a/src/resources/zero-trust/dex/index.ts b/src/resources/zero-trust/dex/index.ts index 5dab99b530..74297d55ca 100644 --- a/src/resources/zero-trust/dex/index.ts +++ b/src/resources/zero-trust/dex/index.ts @@ -16,8 +16,8 @@ export { FleetStatusOverTimeParams, FleetStatus, } from './fleet-status/index'; +export { NetworkPath, Percentiles, UnnamedSchemaRefBf9e2abcf1b78a6cab8e6e29e2228a11, DEX } from './dex'; export { - NetworkPath, Traceroute, TracerouteTestPercentilesResponse, TracerouteTestGetParams, @@ -25,5 +25,4 @@ export { TracerouteTestPercentilesParams, TracerouteTests, } from './traceroute-tests'; -export { Percentiles, UnnamedSchemaRefBf9e2abcf1b78a6cab8e6e29e2228a11, DEX } from './dex'; export { TracerouteTestResults } from './traceroute-test-results/index'; diff --git a/src/resources/zero-trust/dex/traceroute-test-results/index.ts b/src/resources/zero-trust/dex/traceroute-test-results/index.ts index baaf1b9e1e..34ddb15916 100644 --- a/src/resources/zero-trust/dex/traceroute-test-results/index.ts +++ b/src/resources/zero-trust/dex/traceroute-test-results/index.ts @@ -1,4 +1,4 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { NetworkPath, NetworkPathGetParams, NetworkPathResource } from './network-path'; +export { NetworkPathGetResponse, NetworkPathGetParams, NetworkPath } from './network-path'; export { TracerouteTestResults } from './traceroute-test-results'; diff --git a/src/resources/zero-trust/dex/traceroute-test-results/network-path.ts b/src/resources/zero-trust/dex/traceroute-test-results/network-path.ts index 12c55b446a..a297dd4b7c 100644 --- a/src/resources/zero-trust/dex/traceroute-test-results/network-path.ts +++ b/src/resources/zero-trust/dex/traceroute-test-results/network-path.ts @@ -4,7 +4,7 @@ import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; import * as NetworkPathAPI from 'cloudflare/resources/zero-trust/dex/traceroute-test-results/network-path'; -export class NetworkPathResource extends APIResource { +export class NetworkPath extends APIResource { /** * Get a breakdown of hops and performance metrics for a specific traceroute test * run @@ -13,22 +13,22 @@ export class NetworkPathResource extends APIResource { testResultId: string, params: NetworkPathGetParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { account_id } = params; return ( this._client.get( `/accounts/${account_id}/dex/traceroute-test-results/${testResultId}/network-path`, options, - ) as Core.APIPromise<{ result: NetworkPath }> + ) as Core.APIPromise<{ result: NetworkPathGetResponse }> )._thenUnwrap((obj) => obj.result); } } -export interface NetworkPath { +export interface NetworkPathGetResponse { /** * an array of the hops taken by the device to reach the end destination */ - hops: Array; + hops: Array; /** * API Resource UUID tag. @@ -56,7 +56,7 @@ export interface NetworkPath { testName?: string; } -export namespace NetworkPath { +export namespace NetworkPathGetResponse { export interface Hop { ttl: number; @@ -95,7 +95,7 @@ export interface NetworkPathGetParams { account_id: string; } -export namespace NetworkPathResource { - export import NetworkPath = NetworkPathAPI.NetworkPath; +export namespace NetworkPath { + export import NetworkPathGetResponse = NetworkPathAPI.NetworkPathGetResponse; export import NetworkPathGetParams = NetworkPathAPI.NetworkPathGetParams; } diff --git a/src/resources/zero-trust/dex/traceroute-test-results/traceroute-test-results.ts b/src/resources/zero-trust/dex/traceroute-test-results/traceroute-test-results.ts index 2139c3d676..c07cf93e2b 100644 --- a/src/resources/zero-trust/dex/traceroute-test-results/traceroute-test-results.ts +++ b/src/resources/zero-trust/dex/traceroute-test-results/traceroute-test-results.ts @@ -4,11 +4,11 @@ import { APIResource } from 'cloudflare/resource'; import * as NetworkPathAPI from 'cloudflare/resources/zero-trust/dex/traceroute-test-results/network-path'; export class TracerouteTestResults extends APIResource { - networkPath: NetworkPathAPI.NetworkPathResource = new NetworkPathAPI.NetworkPathResource(this._client); + networkPath: NetworkPathAPI.NetworkPath = new NetworkPathAPI.NetworkPath(this._client); } export namespace TracerouteTestResults { - export import NetworkPathResource = NetworkPathAPI.NetworkPathResource; export import NetworkPath = NetworkPathAPI.NetworkPath; + export import NetworkPathGetResponse = NetworkPathAPI.NetworkPathGetResponse; export import NetworkPathGetParams = NetworkPathAPI.NetworkPathGetParams; } diff --git a/src/resources/zero-trust/dex/traceroute-tests.ts b/src/resources/zero-trust/dex/traceroute-tests.ts index 0a6f227e41..311a80ca95 100644 --- a/src/resources/zero-trust/dex/traceroute-tests.ts +++ b/src/resources/zero-trust/dex/traceroute-tests.ts @@ -32,13 +32,13 @@ export class TracerouteTests extends APIResource { testId: string, params: TracerouteTestNetworkPathParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { account_id, ...query } = params; return ( this._client.get(`/accounts/${account_id}/dex/traceroute-tests/${testId}/network-path`, { query, ...options, - }) as Core.APIPromise<{ result: NetworkPath }> + }) as Core.APIPromise<{ result: DEXAPI.NetworkPath }> )._thenUnwrap((obj) => obj.result); } @@ -61,86 +61,6 @@ export class TracerouteTests extends APIResource { } } -export interface NetworkPath { - /** - * API Resource UUID tag. - */ - id: string; - - deviceName?: string; - - /** - * The interval at which the Traceroute synthetic application test is set to run. - */ - interval?: string; - - kind?: 'traceroute'; - - name?: string; - - networkPath?: NetworkPath.NetworkPath | null; - - /** - * The host of the Traceroute synthetic application test - */ - url?: string; -} - -export namespace NetworkPath { - export interface NetworkPath { - slots: Array; - - /** - * Specifies the sampling applied, if any, to the slots response. When sampled, - * results shown represent the first test run to the start of each sampling - * interval. - */ - sampling?: NetworkPath.Sampling | null; - } - - export namespace NetworkPath { - export interface Slot { - /** - * API Resource UUID tag. - */ - id: string; - - /** - * Round trip time in ms of the client to app mile - */ - clientToAppRttMs: number | null; - - /** - * Round trip time in ms of the client to Cloudflare egress mile - */ - clientToCfEgressRttMs: number | null; - - /** - * Round trip time in ms of the client to Cloudflare ingress mile - */ - clientToCfIngressRttMs: number | null; - - timestamp: string; - - /** - * Round trip time in ms of the client to ISP mile - */ - clientToIspRttMs?: number | null; - } - - /** - * Specifies the sampling applied, if any, to the slots response. When sampled, - * results shown represent the first test run to the start of each sampling - * interval. - */ - export interface Sampling { - unit: 'hours'; - - value: number; - } - } -} - export interface Traceroute { /** * The host of the Traceroute synthetic application test @@ -413,7 +333,6 @@ export interface TracerouteTestPercentilesParams { } export namespace TracerouteTests { - export import NetworkPath = TracerouteTestsAPI.NetworkPath; export import Traceroute = TracerouteTestsAPI.Traceroute; export import TracerouteTestPercentilesResponse = TracerouteTestsAPI.TracerouteTestPercentilesResponse; export import TracerouteTestGetParams = TracerouteTestsAPI.TracerouteTestGetParams; diff --git a/src/resources/zero-trust/index.ts b/src/resources/zero-trust/index.ts index 8cd9e17e0a..30fb2c230e 100644 --- a/src/resources/zero-trust/index.ts +++ b/src/resources/zero-trust/index.ts @@ -65,8 +65,8 @@ export { OrganizationRevokeUsersParams, Organizations, } from './organizations'; +export { NetworkPath, Percentiles, UnnamedSchemaRefBf9e2abcf1b78a6cab8e6e29e2228a11, DEX } from './dex/index'; export { Networks } from './networks/index'; -export { Percentiles, UnnamedSchemaRefBf9e2abcf1b78a6cab8e6e29e2228a11, DEX } from './dex/index'; export { Seat, SeatEditResponse, SeatEditParams, Seats } from './seats'; export { Tunnel, diff --git a/src/resources/zero-trust/zero-trust.ts b/src/resources/zero-trust/zero-trust.ts index 556dd7de76..cb24db6dcc 100644 --- a/src/resources/zero-trust/zero-trust.ts +++ b/src/resources/zero-trust/zero-trust.ts @@ -84,6 +84,7 @@ export namespace ZeroTrust { export import SAMLGroupRule = AccessAPI.SAMLGroupRule; export import ServiceTokenRule = AccessAPI.ServiceTokenRule; export import DEX = DEXAPI.DEX; + export import NetworkPath = DEXAPI.NetworkPath; export import Percentiles = DEXAPI.Percentiles; export import UnnamedSchemaRefBf9e2abcf1b78a6cab8e6e29e2228a11 = DEXAPI.UnnamedSchemaRefBf9e2abcf1b78a6cab8e6e29e2228a11; export import Tunnels = TunnelsAPI.Tunnels;