diff --git a/.stats.yml b/.stats.yml index 6ad25796dd..b47d0a34bf 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ -configured_endpoints: 1342 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-02e713089d6f667b3c197d0b2c90547a939434be8f8c458ff007fd5dfc4da058.yml +configured_endpoints: 1336 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-40cba2df64bb65d7c04f311361fd786305223e674540a2c3fc4442b2fba34bd3.yml diff --git a/api.md b/api.md index ba85b9d7e7..32b718197d 100644 --- a/api.md +++ b/api.md @@ -2066,9 +2066,9 @@ Types: Methods: - client.kv.namespaces.create({ ...params }) -> Namespace -- client.kv.namespaces.update(namespaceId, { ...params }) -> NamespaceUpdateResponse +- client.kv.namespaces.update(namespaceId, { ...params }) -> NamespaceUpdateResponse | null - client.kv.namespaces.list({ ...params }) -> NamespacesV4PagePaginationArray -- client.kv.namespaces.delete(namespaceId, { ...params }) -> NamespaceDeleteResponse +- client.kv.namespaces.delete(namespaceId, { ...params }) -> NamespaceDeleteResponse | null - client.kv.namespaces.get(namespaceId, { ...params }) -> Namespace ### Bulk @@ -2080,8 +2080,8 @@ Types: Methods: -- client.kv.namespaces.bulk.update(namespaceId, [ ...body ]) -> BulkUpdateResponse -- client.kv.namespaces.bulk.delete(namespaceId, { ...params }) -> BulkDeleteResponse +- client.kv.namespaces.bulk.update(namespaceId, [ ...body ]) -> BulkUpdateResponse | null +- client.kv.namespaces.bulk.delete(namespaceId, { ...params }) -> BulkDeleteResponse | null ### Keys @@ -2112,8 +2112,8 @@ Types: Methods: -- client.kv.namespaces.values.update(namespaceId, keyName, { ...params }) -> ValueUpdateResponse -- client.kv.namespaces.values.delete(namespaceId, keyName, { ...params }) -> ValueDeleteResponse +- client.kv.namespaces.values.update(namespaceId, keyName, { ...params }) -> ValueUpdateResponse | null +- client.kv.namespaces.values.delete(namespaceId, keyName, { ...params }) -> ValueDeleteResponse | null - client.kv.namespaces.values.get(namespaceId, keyName, { ...params }) -> Response # DurableObjects @@ -3377,10 +3377,10 @@ Methods: - client.pages.projects.create({ ...params }) -> Project - client.pages.projects.list({ ...params }) -> DeploymentsSinglePage -- client.pages.projects.delete(projectName, { ...params }) -> ProjectDeleteResponse +- client.pages.projects.delete(projectName, { ...params }) -> ProjectDeleteResponse | null - client.pages.projects.edit(projectName, { ...params }) -> Project - client.pages.projects.get(projectName, { ...params }) -> Project -- client.pages.projects.purgeBuildCache(projectName, { ...params }) -> ProjectPurgeBuildCacheResponse +- client.pages.projects.purgeBuildCache(projectName, { ...params }) -> ProjectPurgeBuildCacheResponse | null ### Deployments @@ -3392,7 +3392,7 @@ Methods: - client.pages.projects.deployments.create(projectName, { ...params }) -> Deployment - client.pages.projects.deployments.list(projectName, { ...params }) -> DeploymentsSinglePage -- client.pages.projects.deployments.delete(projectName, deploymentId, { ...params }) -> DeploymentDeleteResponse +- client.pages.projects.deployments.delete(projectName, deploymentId, { ...params }) -> DeploymentDeleteResponse | null - client.pages.projects.deployments.get(projectName, deploymentId, { ...params }) -> Deployment - client.pages.projects.deployments.retry(projectName, deploymentId, { ...params }) -> Deployment - client.pages.projects.deployments.rollback(projectName, deploymentId, { ...params }) -> Deployment @@ -3423,7 +3423,7 @@ Methods: - client.pages.projects.domains.create(projectName, { ...params }) -> DomainCreateResponse | null - client.pages.projects.domains.list(projectName, { ...params }) -> DomainListResponsesSinglePage -- client.pages.projects.domains.delete(projectName, domainName, { ...params }) -> DomainDeleteResponse +- client.pages.projects.domains.delete(projectName, domainName, { ...params }) -> DomainDeleteResponse | null - client.pages.projects.domains.edit(projectName, domainName, { ...params }) -> DomainEditResponse | null - client.pages.projects.domains.get(projectName, domainName, { ...params }) -> DomainGetResponse | null @@ -4035,7 +4035,7 @@ Types: Methods: - client.zeroTrust.devices.list({ ...params }) -> DevicesSinglePage -- client.zeroTrust.devices.get(deviceId, { ...params }) -> DeviceGetResponse | null +- client.zeroTrust.devices.get(deviceId, { ...params }) -> DeviceGetResponse ### DEXTests @@ -4094,8 +4094,8 @@ Types: Methods: -- client.zeroTrust.devices.policies.certificates.update(zoneTag, { ...params }) -> CertificateUpdateResponse | null -- client.zeroTrust.devices.policies.certificates.get(zoneTag) -> CertificateGetResponse | null +- client.zeroTrust.devices.policies.certificates.update(zoneTag, { ...params }) -> CertificateUpdateResponse +- client.zeroTrust.devices.policies.certificates.get(zoneTag) -> CertificateGetResponse #### DefaultPolicy @@ -4193,7 +4193,7 @@ Methods: - 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 }) -> IntegrationDeleteResponse | null +- client.zeroTrust.devices.posture.integrations.delete(integrationId, { ...params }) -> IntegrationDeleteResponse - client.zeroTrust.devices.posture.integrations.edit(integrationId, { ...params }) -> Integration | null - client.zeroTrust.devices.posture.integrations.get(integrationId, { ...params }) -> Integration | null @@ -4205,7 +4205,7 @@ Types: Methods: -- client.zeroTrust.devices.revoke.create([ ...body ]) -> RevokeCreateResponse | null +- client.zeroTrust.devices.revoke.create([ ...body ]) -> RevokeCreateResponse ### Settings @@ -4227,7 +4227,7 @@ Types: Methods: -- client.zeroTrust.devices.unrevoke.create([ ...body ]) -> UnrevokeCreateResponse | null +- client.zeroTrust.devices.unrevoke.create([ ...body ]) -> UnrevokeCreateResponse ### OverrideCodes @@ -4368,7 +4368,7 @@ Methods: - client.zeroTrust.access.applications.list({ ...params }) -> ApplicationListResponsesSinglePage - client.zeroTrust.access.applications.delete(appId, { ...params }) -> ApplicationDeleteResponse - client.zeroTrust.access.applications.get(appId, { ...params }) -> ApplicationGetResponse -- client.zeroTrust.access.applications.revokeTokens(appId, { ...params }) -> ApplicationRevokeTokensResponse +- client.zeroTrust.access.applications.revokeTokens(appId, { ...params }) -> ApplicationRevokeTokensResponse | null #### CAs @@ -4918,7 +4918,7 @@ Methods: - client.zeroTrust.dlp.profiles.custom.create({ ...params }) -> CustomCreateResponse - client.zeroTrust.dlp.profiles.custom.update(profileId, { ...params }) -> Profile -- client.zeroTrust.dlp.profiles.custom.delete(profileId, { ...params }) -> CustomDeleteResponse +- client.zeroTrust.dlp.profiles.custom.delete(profileId, { ...params }) -> CustomDeleteResponse | null - client.zeroTrust.dlp.profiles.custom.get(profileId, { ...params }) -> Profile #### Predefined @@ -5191,7 +5191,7 @@ Types: Methods: - client.zeroTrust.riskScoring.get(userId, { ...params }) -> RiskScoringGetResponse -- client.zeroTrust.riskScoring.reset(userId, { ...params }) -> RiskScoringResetResponse +- client.zeroTrust.riskScoring.reset(userId, { ...params }) -> RiskScoringResetResponse | null ### Behaviours @@ -5230,7 +5230,7 @@ Methods: - client.zeroTrust.riskScoring.integrations.create({ ...params }) -> IntegrationCreateResponse - client.zeroTrust.riskScoring.integrations.update(integrationId, { ...params }) -> IntegrationUpdateResponse - client.zeroTrust.riskScoring.integrations.list({ ...params }) -> IntegrationListResponsesSinglePage -- client.zeroTrust.riskScoring.integrations.delete(integrationId, { ...params }) -> IntegrationDeleteResponse +- client.zeroTrust.riskScoring.integrations.delete(integrationId, { ...params }) -> IntegrationDeleteResponse | null - client.zeroTrust.riskScoring.integrations.get(integrationId, { ...params }) -> IntegrationGetResponse #### References @@ -5280,7 +5280,7 @@ Methods: - client.hyperdrive.configs.create({ ...params }) -> Hyperdrive | null - client.hyperdrive.configs.update(hyperdriveId, { ...params }) -> Hyperdrive | null - client.hyperdrive.configs.list({ ...params }) -> HyperdrivesSinglePage -- client.hyperdrive.configs.delete(hyperdriveId, { ...params }) -> ConfigDeleteResponse | null +- client.hyperdrive.configs.delete(hyperdriveId, { ...params }) -> ConfigDeleteResponse - client.hyperdrive.configs.edit(hyperdriveId, { ...params }) -> Hyperdrive | null - client.hyperdrive.configs.get(hyperdriveId, { ...params }) -> Hyperdrive | null @@ -5340,7 +5340,7 @@ Methods: - client.vectorize.indexes.create({ ...params }) -> CreateIndex | null - client.vectorize.indexes.list({ ...params }) -> CreateIndicesSinglePage -- client.vectorize.indexes.delete(indexName, { ...params }) -> IndexDeleteResponse | null +- client.vectorize.indexes.delete(indexName, { ...params }) -> IndexDeleteResponse - client.vectorize.indexes.deleteByIds(indexName, { ...params }) -> IndexDeleteByIDsResponse | null - client.vectorize.indexes.get(indexName, { ...params }) -> CreateIndex | null - client.vectorize.indexes.getByIds(indexName, { ...params }) -> IndexGetByIDsResponse | null @@ -5398,32 +5398,8 @@ Methods: #### Summary -Types: - -- SummaryModelResponse -- SummaryProviderResponse -- SummaryTaskResponse - -Methods: - -- client.radar.ai.gateway.summary.model({ ...params }) -> SummaryModelResponse -- client.radar.ai.gateway.summary.provider({ ...params }) -> SummaryProviderResponse -- client.radar.ai.gateway.summary.task({ ...params }) -> SummaryTaskResponse - #### TimeseriesGroups -Types: - -- TimeseriesGroupModelResponse -- TimeseriesGroupProviderResponse -- TimeseriesGroupTaskResponse - -Methods: - -- client.radar.ai.gateway.timeseriesGroups.model({ ...params }) -> TimeseriesGroupModelResponse -- client.radar.ai.gateway.timeseriesGroups.provider({ ...params }) -> TimeseriesGroupProviderResponse -- client.radar.ai.gateway.timeseriesGroups.task({ ...params }) -> TimeseriesGroupTaskResponse - ## Annotations Types: diff --git a/src/resources/dns/records.ts b/src/resources/dns/records.ts index 20b8222501..2f440f26de 100644 --- a/src/resources/dns/records.ts +++ b/src/resources/dns/records.ts @@ -27,7 +27,9 @@ export class Records extends APIResource { } /** - * Overwrite an existing DNS record. Notes: + * Overwrite an existing DNS record. + * + * Notes: * * - A/AAAA records cannot exist on the same name as CNAME records. * - NS records cannot exist on the same name as any other record type. @@ -80,7 +82,9 @@ export class Records extends APIResource { } /** - * Update an existing DNS record. Notes: + * Update an existing DNS record. + * + * Notes: * * - A/AAAA records cannot exist on the same name as CNAME records. * - NS records cannot exist on the same name as any other record type. diff --git a/src/resources/hyperdrive/configs.ts b/src/resources/hyperdrive/configs.ts index e8a8fc9f01..66a42b6f68 100644 --- a/src/resources/hyperdrive/configs.ts +++ b/src/resources/hyperdrive/configs.ts @@ -62,13 +62,13 @@ export class Configs extends APIResource { hyperdriveId: string, params: ConfigDeleteParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { account_id } = params; return ( this._client.delete( `/accounts/${account_id}/hyperdrive/configs/${hyperdriveId}`, options, - ) as Core.APIPromise<{ result: ConfigDeleteResponse | null }> + ) as Core.APIPromise<{ result: ConfigDeleteResponse }> )._thenUnwrap((obj) => obj.result); } @@ -108,7 +108,7 @@ export class Configs extends APIResource { } } -export type ConfigDeleteResponse = unknown | string; +export type ConfigDeleteResponse = unknown | string | null; export interface ConfigCreateParams { /** diff --git a/src/resources/images/v1/v1.ts b/src/resources/images/v1/v1.ts index 427bda80b7..ababb3d7bd 100644 --- a/src/resources/images/v1/v1.ts +++ b/src/resources/images/v1/v1.ts @@ -145,7 +145,7 @@ export namespace V1ListResponse { } } -export type V1DeleteResponse = unknown | string; +export type V1DeleteResponse = unknown | string | null; export interface V1CreateParams { /** diff --git a/src/resources/images/v1/variants.ts b/src/resources/images/v1/variants.ts index 44a30e5a82..341ade6c7d 100644 --- a/src/resources/images/v1/variants.ts +++ b/src/resources/images/v1/variants.ts @@ -186,7 +186,7 @@ export namespace VariantCreateResponse { } } -export type VariantDeleteResponse = unknown | string; +export type VariantDeleteResponse = unknown | string | null; export interface VariantEditResponse { variant?: VariantEditResponse.Variant; diff --git a/src/resources/kv/namespaces/bulk.ts b/src/resources/kv/namespaces/bulk.ts index 0c0f9f9c84..ed8f88a230 100644 --- a/src/resources/kv/namespaces/bulk.ts +++ b/src/resources/kv/namespaces/bulk.ts @@ -17,13 +17,13 @@ export class Bulk extends APIResource { namespaceId: string, params: BulkUpdateParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { account_id, body } = params; return ( this._client.put(`/accounts/${account_id}/storage/kv/namespaces/${namespaceId}/bulk`, { body: body, ...options, - }) as Core.APIPromise<{ result: BulkUpdateResponse }> + }) as Core.APIPromise<{ result: BulkUpdateResponse | null }> )._thenUnwrap((obj) => obj.result); } @@ -35,20 +35,20 @@ export class Bulk extends APIResource { namespaceId: string, params: BulkDeleteParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { account_id } = params; return ( this._client.delete( `/accounts/${account_id}/storage/kv/namespaces/${namespaceId}/bulk`, options, - ) as Core.APIPromise<{ result: BulkDeleteResponse }> + ) as Core.APIPromise<{ result: BulkDeleteResponse | null }> )._thenUnwrap((obj) => obj.result); } } -export type BulkUpdateResponse = unknown; +export interface BulkUpdateResponse {} -export type BulkDeleteResponse = unknown; +export interface BulkDeleteResponse {} export interface BulkUpdateParams { /** diff --git a/src/resources/kv/namespaces/namespaces.ts b/src/resources/kv/namespaces/namespaces.ts index c6d6e11476..4a240ebc3c 100644 --- a/src/resources/kv/namespaces/namespaces.ts +++ b/src/resources/kv/namespaces/namespaces.ts @@ -37,13 +37,13 @@ export class Namespaces extends APIResource { namespaceId: string, params: NamespaceUpdateParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { account_id, ...body } = params; return ( this._client.put(`/accounts/${account_id}/storage/kv/namespaces/${namespaceId}`, { body, ...options, - }) as Core.APIPromise<{ result: NamespaceUpdateResponse }> + }) as Core.APIPromise<{ result: NamespaceUpdateResponse | null }> )._thenUnwrap((obj) => obj.result); } @@ -69,13 +69,13 @@ export class Namespaces extends APIResource { namespaceId: string, params: NamespaceDeleteParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { account_id } = params; return ( this._client.delete( `/accounts/${account_id}/storage/kv/namespaces/${namespaceId}`, options, - ) as Core.APIPromise<{ result: NamespaceDeleteResponse }> + ) as Core.APIPromise<{ result: NamespaceDeleteResponse | null }> )._thenUnwrap((obj) => obj.result); } @@ -117,9 +117,9 @@ export interface Namespace { supports_url_encoding?: boolean; } -export type NamespaceUpdateResponse = unknown; +export interface NamespaceUpdateResponse {} -export type NamespaceDeleteResponse = unknown; +export interface NamespaceDeleteResponse {} export interface NamespaceCreateParams { /** diff --git a/src/resources/kv/namespaces/values.ts b/src/resources/kv/namespaces/values.ts index f0f6c004fc..698d98c877 100644 --- a/src/resources/kv/namespaces/values.ts +++ b/src/resources/kv/namespaces/values.ts @@ -19,7 +19,7 @@ export class Values extends APIResource { keyName: string, params: ValueUpdateParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { account_id, ...body } = params; return ( this._client.put( @@ -29,7 +29,7 @@ export class Values extends APIResource { ...options, headers: { 'Content-Type': '*/*', ...options?.headers }, }), - ) as Core.APIPromise<{ result: ValueUpdateResponse }> + ) as Core.APIPromise<{ result: ValueUpdateResponse | null }> )._thenUnwrap((obj) => obj.result); } @@ -42,13 +42,13 @@ export class Values extends APIResource { keyName: string, params: ValueDeleteParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { account_id } = params; return ( this._client.delete( `/accounts/${account_id}/storage/kv/namespaces/${namespaceId}/values/${keyName}`, options, - ) as Core.APIPromise<{ result: ValueDeleteResponse }> + ) as Core.APIPromise<{ result: ValueDeleteResponse | null }> )._thenUnwrap((obj) => obj.result); } @@ -73,9 +73,9 @@ export class Values extends APIResource { } } -export type ValueUpdateResponse = unknown; +export interface ValueUpdateResponse {} -export type ValueDeleteResponse = unknown; +export interface ValueDeleteResponse {} export interface ValueUpdateParams { /** diff --git a/src/resources/origin-post-quantum-encryption.ts b/src/resources/origin-post-quantum-encryption.ts index 24527d2753..21d625df12 100644 --- a/src/resources/origin-post-quantum-encryption.ts +++ b/src/resources/origin-post-quantum-encryption.ts @@ -46,9 +46,9 @@ export class OriginPostQuantumEncryption extends APIResource { } } -export type OriginPostQuantumEncryptionUpdateResponse = unknown; +export type OriginPostQuantumEncryptionUpdateResponse = unknown | string | null; -export type OriginPostQuantumEncryptionGetResponse = unknown; +export type OriginPostQuantumEncryptionGetResponse = unknown | string | null; export interface OriginPostQuantumEncryptionUpdateParams { /** diff --git a/src/resources/pagerules/pagerules.ts b/src/resources/pagerules/pagerules.ts index f2aa008103..491a711027 100644 --- a/src/resources/pagerules/pagerules.ts +++ b/src/resources/pagerules/pagerules.ts @@ -274,9 +274,9 @@ export namespace TargetParam { } } -export type PageruleCreateResponse = unknown | string; +export type PageruleCreateResponse = unknown | string | null; -export type PageruleUpdateResponse = unknown | string; +export type PageruleUpdateResponse = unknown | string | null; export type PageruleListResponse = Array; @@ -287,9 +287,9 @@ export interface PageruleDeleteResponse { id: string; } -export type PageruleEditResponse = unknown | string; +export type PageruleEditResponse = unknown | string | null; -export type PageruleGetResponse = unknown | string; +export type PageruleGetResponse = unknown | string | null; export interface PageruleCreateParams { /** diff --git a/src/resources/pages/projects/deployments/deployments.ts b/src/resources/pages/projects/deployments/deployments.ts index ab98f10fce..a30a622c21 100644 --- a/src/resources/pages/projects/deployments/deployments.ts +++ b/src/resources/pages/projects/deployments/deployments.ts @@ -52,13 +52,13 @@ export class Deployments extends APIResource { deploymentId: string, params: DeploymentDeleteParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { account_id } = params; return ( this._client.delete( `/accounts/${account_id}/pages/projects/${projectName}/deployments/${deploymentId}`, options, - ) as Core.APIPromise<{ result: DeploymentDeleteResponse }> + ) as Core.APIPromise<{ result: DeploymentDeleteResponse | null }> )._thenUnwrap((obj) => obj.result); } diff --git a/src/resources/pages/projects/domains.ts b/src/resources/pages/projects/domains.ts index d826ee6e2b..536eadfea6 100644 --- a/src/resources/pages/projects/domains.ts +++ b/src/resources/pages/projects/domains.ts @@ -47,13 +47,13 @@ export class Domains extends APIResource { domainName: string, params: DomainDeleteParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { account_id } = params; return ( this._client.delete( `/accounts/${account_id}/pages/projects/${projectName}/domains/${domainName}`, options, - ) as Core.APIPromise<{ result: DomainDeleteResponse }> + ) as Core.APIPromise<{ result: DomainDeleteResponse | null }> )._thenUnwrap((obj) => obj.result); } diff --git a/src/resources/pages/projects/projects.ts b/src/resources/pages/projects/projects.ts index 0297e8fb6c..87d2559c4a 100644 --- a/src/resources/pages/projects/projects.ts +++ b/src/resources/pages/projects/projects.ts @@ -41,13 +41,13 @@ export class Projects extends APIResource { projectName: string, params: ProjectDeleteParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { account_id } = params; return ( this._client.delete( `/accounts/${account_id}/pages/projects/${projectName}`, options, - ) as Core.APIPromise<{ result: ProjectDeleteResponse }> + ) as Core.APIPromise<{ result: ProjectDeleteResponse | null }> )._thenUnwrap((obj) => obj.result); } @@ -92,13 +92,13 @@ export class Projects extends APIResource { projectName: string, params: ProjectPurgeBuildCacheParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { account_id } = params; return ( this._client.post( `/accounts/${account_id}/pages/projects/${projectName}/purge_build_cache`, options, - ) as Core.APIPromise<{ result: ProjectPurgeBuildCacheResponse }> + ) as Core.APIPromise<{ result: ProjectPurgeBuildCacheResponse | null }> )._thenUnwrap((obj) => obj.result); } } diff --git a/src/resources/radar/ai/gateway/gateway.ts b/src/resources/radar/ai/gateway/gateway.ts index 01a97731ee..ba78ad3671 100755 --- a/src/resources/radar/ai/gateway/gateway.ts +++ b/src/resources/radar/ai/gateway/gateway.ts @@ -13,17 +13,5 @@ export class Gateway extends APIResource { export namespace Gateway { export import Summary = SummaryAPI.Summary; - export import SummaryModelResponse = SummaryAPI.SummaryModelResponse; - export import SummaryProviderResponse = SummaryAPI.SummaryProviderResponse; - export import SummaryTaskResponse = SummaryAPI.SummaryTaskResponse; - export import SummaryModelParams = SummaryAPI.SummaryModelParams; - export import SummaryProviderParams = SummaryAPI.SummaryProviderParams; - export import SummaryTaskParams = SummaryAPI.SummaryTaskParams; export import TimeseriesGroups = TimeseriesGroupsAPI.TimeseriesGroups; - export import TimeseriesGroupModelResponse = TimeseriesGroupsAPI.TimeseriesGroupModelResponse; - export import TimeseriesGroupProviderResponse = TimeseriesGroupsAPI.TimeseriesGroupProviderResponse; - export import TimeseriesGroupTaskResponse = TimeseriesGroupsAPI.TimeseriesGroupTaskResponse; - export import TimeseriesGroupModelParams = TimeseriesGroupsAPI.TimeseriesGroupModelParams; - export import TimeseriesGroupProviderParams = TimeseriesGroupsAPI.TimeseriesGroupProviderParams; - export import TimeseriesGroupTaskParams = TimeseriesGroupsAPI.TimeseriesGroupTaskParams; } diff --git a/src/resources/radar/ai/gateway/index.ts b/src/resources/radar/ai/gateway/index.ts index 0878e6098a..f0648d4d75 100755 --- a/src/resources/radar/ai/gateway/index.ts +++ b/src/resources/radar/ai/gateway/index.ts @@ -1,21 +1,5 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. export { Gateway } from './gateway'; -export { - SummaryModelResponse, - SummaryProviderResponse, - SummaryTaskResponse, - SummaryModelParams, - SummaryProviderParams, - SummaryTaskParams, - Summary, -} from './summary'; -export { - TimeseriesGroupModelResponse, - TimeseriesGroupProviderResponse, - TimeseriesGroupTaskResponse, - TimeseriesGroupModelParams, - TimeseriesGroupProviderParams, - TimeseriesGroupTaskParams, - TimeseriesGroups, -} from './timeseries-groups'; +export { Summary } from './summary'; +export { TimeseriesGroups } from './timeseries-groups'; diff --git a/src/resources/radar/ai/gateway/summary.ts b/src/resources/radar/ai/gateway/summary.ts index 85852ea283..5abd36afe8 100755 --- a/src/resources/radar/ai/gateway/summary.ts +++ b/src/resources/radar/ai/gateway/summary.ts @@ -1,332 +1,5 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from '../../../../resource'; -import { isRequestOptions } from '../../../../core'; -import * as Core from '../../../../core'; -import * as SummaryAPI from './summary'; -export class Summary extends APIResource { - /** - * Percentage distribution of unique accounts per model. - */ - model(query?: SummaryModelParams, options?: Core.RequestOptions): Core.APIPromise; - model(options?: Core.RequestOptions): Core.APIPromise; - model( - query: SummaryModelParams | Core.RequestOptions = {}, - options?: Core.RequestOptions, - ): Core.APIPromise { - if (isRequestOptions(query)) { - return this.model({}, query); - } - return ( - this._client.get('/radar/ai/inference/summary/model', { query, ...options }) as Core.APIPromise<{ - result: SummaryModelResponse; - }> - )._thenUnwrap((obj) => obj.result); - } - - /** - * Percentage distribution of unique accounts per provider. - */ - provider( - query?: SummaryProviderParams, - options?: Core.RequestOptions, - ): Core.APIPromise; - provider(options?: Core.RequestOptions): Core.APIPromise; - provider( - query: SummaryProviderParams | Core.RequestOptions = {}, - options?: Core.RequestOptions, - ): Core.APIPromise { - if (isRequestOptions(query)) { - return this.provider({}, query); - } - return ( - this._client.get('/radar/ai/gateway/summary/provider', { query, ...options }) as Core.APIPromise<{ - result: SummaryProviderResponse; - }> - )._thenUnwrap((obj) => obj.result); - } - - /** - * Percentage distribution of unique accounts per task. - */ - task(query?: SummaryTaskParams, options?: Core.RequestOptions): Core.APIPromise; - task(options?: Core.RequestOptions): Core.APIPromise; - task( - query: SummaryTaskParams | Core.RequestOptions = {}, - options?: Core.RequestOptions, - ): Core.APIPromise { - if (isRequestOptions(query)) { - return this.task({}, query); - } - return ( - this._client.get('/radar/ai/inference/summary/task', { query, ...options }) as Core.APIPromise<{ - result: SummaryTaskResponse; - }> - )._thenUnwrap((obj) => obj.result); - } -} - -export interface SummaryModelResponse { - meta: SummaryModelResponse.Meta; - - summary_0: Record>; -} - -export namespace SummaryModelResponse { - export interface Meta { - dateRange: Array; - - lastUpdated: string; - - normalization: string; - - confidenceInfo?: Meta.ConfidenceInfo; - } - - export namespace Meta { - export interface DateRange { - /** - * Adjusted end of date range. - */ - endTime: string; - - /** - * Adjusted start of date range. - */ - startTime: string; - } - - export interface ConfidenceInfo { - annotations?: Array; - - level?: number; - } - - export namespace ConfidenceInfo { - export interface Annotation { - dataSource: string; - - description: string; - - eventType: string; - - isInstantaneous: boolean; - - endTime?: string; - - linkedUrl?: string; - - startTime?: string; - } - } - } -} - -export interface SummaryProviderResponse { - meta: SummaryProviderResponse.Meta; - - summary_0: Record>; -} - -export namespace SummaryProviderResponse { - export interface Meta { - dateRange: Array; - - lastUpdated: string; - - normalization: string; - - confidenceInfo?: Meta.ConfidenceInfo; - } - - export namespace Meta { - export interface DateRange { - /** - * Adjusted end of date range. - */ - endTime: string; - - /** - * Adjusted start of date range. - */ - startTime: string; - } - - export interface ConfidenceInfo { - annotations?: Array; - - level?: number; - } - - export namespace ConfidenceInfo { - export interface Annotation { - dataSource: string; - - description: string; - - eventType: string; - - isInstantaneous: boolean; - - endTime?: string; - - linkedUrl?: string; - - startTime?: string; - } - } - } -} - -export interface SummaryTaskResponse { - meta: SummaryTaskResponse.Meta; - - summary_0: Record>; -} - -export namespace SummaryTaskResponse { - export interface Meta { - dateRange: Array; - - lastUpdated: string; - - normalization: string; - - confidenceInfo?: Meta.ConfidenceInfo; - } - - export namespace Meta { - export interface DateRange { - /** - * Adjusted end of date range. - */ - endTime: string; - - /** - * Adjusted start of date range. - */ - startTime: string; - } - - export interface ConfidenceInfo { - annotations?: Array; - - level?: number; - } - - export namespace ConfidenceInfo { - export interface Annotation { - dataSource: string; - - description: string; - - eventType: string; - - isInstantaneous: boolean; - - endTime?: string; - - linkedUrl?: string; - - startTime?: string; - } - } - } -} - -export interface SummaryModelParams { - /** - * End of the date range (inclusive). - */ - dateEnd?: Array; - - /** - * For example, use `7d` and `7dControl` to compare this week with the previous - * week. Use this parameter or set specific start and end dates (`dateStart` and - * `dateEnd` parameters). - */ - dateRange?: Array; - - /** - * Array of datetimes to filter the start of a series. - */ - dateStart?: Array; - - /** - * Format results are returned in. - */ - format?: 'JSON' | 'CSV'; - - /** - * Array of names that will be used to name the series in responses. - */ - name?: Array; -} - -export interface SummaryProviderParams { - /** - * End of the date range (inclusive). - */ - dateEnd?: Array; - - /** - * For example, use `7d` and `7dControl` to compare this week with the previous - * week. Use this parameter or set specific start and end dates (`dateStart` and - * `dateEnd` parameters). - */ - dateRange?: Array; - - /** - * Array of datetimes to filter the start of a series. - */ - dateStart?: Array; - - /** - * Format results are returned in. - */ - format?: 'JSON' | 'CSV'; - - /** - * Array of names that will be used to name the series in responses. - */ - name?: Array; -} - -export interface SummaryTaskParams { - /** - * End of the date range (inclusive). - */ - dateEnd?: Array; - - /** - * For example, use `7d` and `7dControl` to compare this week with the previous - * week. Use this parameter or set specific start and end dates (`dateStart` and - * `dateEnd` parameters). - */ - dateRange?: Array; - - /** - * Array of datetimes to filter the start of a series. - */ - dateStart?: Array; - - /** - * Format results are returned in. - */ - format?: 'JSON' | 'CSV'; - - /** - * Array of names that will be used to name the series in responses. - */ - name?: Array; -} - -export namespace Summary { - export import SummaryModelResponse = SummaryAPI.SummaryModelResponse; - export import SummaryProviderResponse = SummaryAPI.SummaryProviderResponse; - export import SummaryTaskResponse = SummaryAPI.SummaryTaskResponse; - export import SummaryModelParams = SummaryAPI.SummaryModelParams; - export import SummaryProviderParams = SummaryAPI.SummaryProviderParams; - export import SummaryTaskParams = SummaryAPI.SummaryTaskParams; -} +export class Summary extends APIResource {} diff --git a/src/resources/radar/ai/gateway/timeseries-groups.ts b/src/resources/radar/ai/gateway/timeseries-groups.ts index 75ea50d215..49ff463e0d 100755 --- a/src/resources/radar/ai/gateway/timeseries-groups.ts +++ b/src/resources/radar/ai/gateway/timeseries-groups.ts @@ -1,251 +1,5 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from '../../../../resource'; -import { isRequestOptions } from '../../../../core'; -import * as Core from '../../../../core'; -import * as TimeseriesGroupsAPI from './timeseries-groups'; -export class TimeseriesGroups extends APIResource { - /** - * Percentage distribution of unique accounts per model over time. - */ - model( - query?: TimeseriesGroupModelParams, - options?: Core.RequestOptions, - ): Core.APIPromise; - model(options?: Core.RequestOptions): Core.APIPromise; - model( - query: TimeseriesGroupModelParams | Core.RequestOptions = {}, - options?: Core.RequestOptions, - ): Core.APIPromise { - if (isRequestOptions(query)) { - return this.model({}, query); - } - return ( - this._client.get('/radar/ai/inference/timeseries_groups/model', { - query, - ...options, - }) as Core.APIPromise<{ result: TimeseriesGroupModelResponse }> - )._thenUnwrap((obj) => obj.result); - } - - /** - * Percentage distribution of unique accounts per provider over time. - */ - provider( - query?: TimeseriesGroupProviderParams, - options?: Core.RequestOptions, - ): Core.APIPromise; - provider(options?: Core.RequestOptions): Core.APIPromise; - provider( - query: TimeseriesGroupProviderParams | Core.RequestOptions = {}, - options?: Core.RequestOptions, - ): Core.APIPromise { - if (isRequestOptions(query)) { - return this.provider({}, query); - } - return ( - this._client.get('/radar/ai/gateway/timeseries_groups/provider', { - query, - ...options, - }) as Core.APIPromise<{ result: TimeseriesGroupProviderResponse }> - )._thenUnwrap((obj) => obj.result); - } - - /** - * Percentage distribution of unique accounts per task over time. - */ - task( - query?: TimeseriesGroupTaskParams, - options?: Core.RequestOptions, - ): Core.APIPromise; - task(options?: Core.RequestOptions): Core.APIPromise; - task( - query: TimeseriesGroupTaskParams | Core.RequestOptions = {}, - options?: Core.RequestOptions, - ): Core.APIPromise { - if (isRequestOptions(query)) { - return this.task({}, query); - } - return ( - this._client.get('/radar/ai/inference/timeseries_groups/task', { - query, - ...options, - }) as Core.APIPromise<{ result: TimeseriesGroupTaskResponse }> - )._thenUnwrap((obj) => obj.result); - } -} - -export interface TimeseriesGroupModelResponse { - meta: unknown; - - serie_0: TimeseriesGroupModelResponse.Serie0; -} - -export namespace TimeseriesGroupModelResponse { - export interface Serie0 { - timestamps: Array; - [k: string]: Array | undefined; - } -} - -export interface TimeseriesGroupProviderResponse { - meta: unknown; - - serie_0: TimeseriesGroupProviderResponse.Serie0; -} - -export namespace TimeseriesGroupProviderResponse { - export interface Serie0 { - timestamps: Array; - [k: string]: Array | undefined; - } -} - -export interface TimeseriesGroupTaskResponse { - meta: unknown; - - serie_0: TimeseriesGroupTaskResponse.Serie0; -} - -export namespace TimeseriesGroupTaskResponse { - export interface Serie0 { - timestamps: Array; - [k: string]: Array | undefined; - } -} - -export interface TimeseriesGroupModelParams { - /** - * Aggregation interval results should be returned in (for example, in 15 minutes - * or 1 hour intervals). Refer to - * [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). - */ - aggInterval?: '15m' | '1h' | '1d' | '1w'; - - /** - * End of the date range (inclusive). - */ - dateEnd?: Array; - - /** - * For example, use `7d` and `7dControl` to compare this week with the previous - * week. Use this parameter or set specific start and end dates (`dateStart` and - * `dateEnd` parameters). - */ - dateRange?: Array; - - /** - * Array of datetimes to filter the start of a series. - */ - dateStart?: Array; - - /** - * Format results are returned in. - */ - format?: 'JSON' | 'CSV'; - - /** - * Limit the number of objects (eg browsers, verticals, etc) to the top items over - * the time range. - */ - limitPerGroup?: number; - - /** - * Array of names that will be used to name the series in responses. - */ - name?: Array; -} - -export interface TimeseriesGroupProviderParams { - /** - * Aggregation interval results should be returned in (for example, in 15 minutes - * or 1 hour intervals). Refer to - * [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). - */ - aggInterval?: '15m' | '1h' | '1d' | '1w'; - - /** - * End of the date range (inclusive). - */ - dateEnd?: Array; - - /** - * For example, use `7d` and `7dControl` to compare this week with the previous - * week. Use this parameter or set specific start and end dates (`dateStart` and - * `dateEnd` parameters). - */ - dateRange?: Array; - - /** - * Array of datetimes to filter the start of a series. - */ - dateStart?: Array; - - /** - * Format results are returned in. - */ - format?: 'JSON' | 'CSV'; - - /** - * Limit the number of objects (eg browsers, verticals, etc) to the top items over - * the time range. - */ - limitPerGroup?: number; - - /** - * Array of names that will be used to name the series in responses. - */ - name?: Array; -} - -export interface TimeseriesGroupTaskParams { - /** - * Aggregation interval results should be returned in (for example, in 15 minutes - * or 1 hour intervals). Refer to - * [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). - */ - aggInterval?: '15m' | '1h' | '1d' | '1w'; - - /** - * End of the date range (inclusive). - */ - dateEnd?: Array; - - /** - * For example, use `7d` and `7dControl` to compare this week with the previous - * week. Use this parameter or set specific start and end dates (`dateStart` and - * `dateEnd` parameters). - */ - dateRange?: Array; - - /** - * Array of datetimes to filter the start of a series. - */ - dateStart?: Array; - - /** - * Format results are returned in. - */ - format?: 'JSON' | 'CSV'; - - /** - * Limit the number of objects (eg browsers, verticals, etc) to the top items over - * the time range. - */ - limitPerGroup?: number; - - /** - * Array of names that will be used to name the series in responses. - */ - name?: Array; -} - -export namespace TimeseriesGroups { - export import TimeseriesGroupModelResponse = TimeseriesGroupsAPI.TimeseriesGroupModelResponse; - export import TimeseriesGroupProviderResponse = TimeseriesGroupsAPI.TimeseriesGroupProviderResponse; - export import TimeseriesGroupTaskResponse = TimeseriesGroupsAPI.TimeseriesGroupTaskResponse; - export import TimeseriesGroupModelParams = TimeseriesGroupsAPI.TimeseriesGroupModelParams; - export import TimeseriesGroupProviderParams = TimeseriesGroupsAPI.TimeseriesGroupProviderParams; - export import TimeseriesGroupTaskParams = TimeseriesGroupsAPI.TimeseriesGroupTaskParams; -} +export class TimeseriesGroups extends APIResource {} diff --git a/src/resources/radar/annotations/annotations.ts b/src/resources/radar/annotations/annotations.ts index 5152a3ce9b..bbc356ed10 100644 --- a/src/resources/radar/annotations/annotations.ts +++ b/src/resources/radar/annotations/annotations.ts @@ -10,7 +10,7 @@ export class Annotations extends APIResource { outages: OutagesAPI.Outages = new OutagesAPI.Outages(this._client); /** - * Get latest annotations. + * Get the latest annotations. */ list(query?: AnnotationListParams, options?: Core.RequestOptions): Core.APIPromise; list(options?: Core.RequestOptions): Core.APIPromise; diff --git a/src/resources/radar/annotations/outages.ts b/src/resources/radar/annotations/outages.ts index 5d486e6f79..cbc265c7f1 100644 --- a/src/resources/radar/annotations/outages.ts +++ b/src/resources/radar/annotations/outages.ts @@ -26,7 +26,7 @@ export class Outages extends APIResource { } /** - * Get the number of outages for locations. + * Get the number of outages by location. */ locations( query?: OutageLocationsParams, diff --git a/src/resources/radar/as112/summary.ts b/src/resources/radar/as112/summary.ts index 2b7b567086..703a98a4e3 100644 --- a/src/resources/radar/as112/summary.ts +++ b/src/resources/radar/as112/summary.ts @@ -26,7 +26,7 @@ export class Summary extends APIResource { } /** - * Percentage distribution of DNS queries, to AS112, by EDNS support. + * Percentage distribution of DNS queries to AS112 by EDNS support. */ edns(query?: SummaryEdnsParams, options?: Core.RequestOptions): Core.APIPromise; edns(options?: Core.RequestOptions): Core.APIPromise; @@ -89,7 +89,7 @@ export class Summary extends APIResource { } /** - * Percentage distribution of DNS queries to AS112 by Query Type. + * Percentage distribution of DNS queries to AS112 by query type. */ queryType( query?: SummaryQueryTypeParams, @@ -111,7 +111,7 @@ export class Summary extends APIResource { } /** - * Percentage distribution of AS112 dns requests classified per Response Codes. + * Percentage distribution of AS112 DNS requests classified by response code. */ responseCodes( query?: SummaryResponseCodesParams, diff --git a/src/resources/radar/as112/timeseries-groups.ts b/src/resources/radar/as112/timeseries-groups.ts index 852a124579..297c7d66a2 100644 --- a/src/resources/radar/as112/timeseries-groups.ts +++ b/src/resources/radar/as112/timeseries-groups.ts @@ -51,7 +51,7 @@ export class TimeseriesGroups extends APIResource { } /** - * Percentage distribution of AS112 DNS queries by IP Version over time. + * Percentage distribution of AS112 DNS queries by IP version over time. */ ipVersion( query?: TimeseriesGroupIPVersionParams, @@ -74,7 +74,7 @@ export class TimeseriesGroups extends APIResource { } /** - * Percentage distribution of AS112 dns requests classified per Protocol over time. + * Percentage distribution of AS112 DNS requests classified by protocol over time. */ protocol( query?: TimeseriesGroupProtocolParams, @@ -96,7 +96,7 @@ export class TimeseriesGroups extends APIResource { } /** - * Percentage distribution of AS112 DNS queries by Query Type over time. + * Percentage distribution of AS112 DNS queries by query type over time. */ queryType( query?: TimeseriesGroupQueryTypeParams, @@ -119,7 +119,7 @@ export class TimeseriesGroups extends APIResource { } /** - * Percentage distribution of AS112 dns requests classified per Response Codes over + * Percentage distribution of AS112 DNS requests classified by response code over * time. */ responseCodes( diff --git a/src/resources/radar/as112/top.ts b/src/resources/radar/as112/top.ts index 66fc5d4d65..14a6724cfa 100644 --- a/src/resources/radar/as112/top.ts +++ b/src/resources/radar/as112/top.ts @@ -7,7 +7,7 @@ import * as TopAPI from './top'; export class Top extends APIResource { /** - * Get the top locations by DNS queries DNSSEC support to AS112. + * Get the top locations of DNS queries to AS112 with DNSSEC. */ dnssec( dnssec: 'SUPPORTED' | 'NOT_SUPPORTED', @@ -35,7 +35,7 @@ export class Top extends APIResource { } /** - * Get the top locations, by DNS queries EDNS support to AS112. + * Get the top locations of DNS queries to AS112 with EDNS support. */ edns( edns: 'SUPPORTED' | 'NOT_SUPPORTED', @@ -59,7 +59,7 @@ export class Top extends APIResource { } /** - * Get the top locations by DNS queries IP version to AS112. + * Get the top locations of DNS queries to AS112 by IP version. */ ipVersion( ipVersion: 'IPv4' | 'IPv6', diff --git a/src/resources/radar/attacks/layer3/summary.ts b/src/resources/radar/attacks/layer3/summary.ts index d3d2863023..3d62795ec8 100644 --- a/src/resources/radar/attacks/layer3/summary.ts +++ b/src/resources/radar/attacks/layer3/summary.ts @@ -51,7 +51,7 @@ export class Summary extends APIResource { } /** - * Percentage distribution of network protocols in layer 3/4 attacks over a given + * Percentage distribution of network protocols in Layer 3/4 attacks over a given * time period. */ get(query?: SummaryGetParams, options?: Core.RequestOptions): Core.APIPromise; diff --git a/src/resources/radar/attacks/layer3/timeseries-groups.ts b/src/resources/radar/attacks/layer3/timeseries-groups.ts index 71a89d3b4a..42db7b96dc 100644 --- a/src/resources/radar/attacks/layer3/timeseries-groups.ts +++ b/src/resources/radar/attacks/layer3/timeseries-groups.ts @@ -53,7 +53,7 @@ export class TimeseriesGroups extends APIResource { } /** - * Get a timeseries of the percentage distribution of network protocols in Layer + * Get a time series of the percentage distribution of network protocols in Layer * 3/4 attacks. */ get( diff --git a/src/resources/radar/attacks/layer3/top/top.ts b/src/resources/radar/attacks/layer3/top/top.ts index d9f56fe26d..f1e7ad8db1 100644 --- a/src/resources/radar/attacks/layer3/top/top.ts +++ b/src/resources/radar/attacks/layer3/top/top.ts @@ -32,7 +32,7 @@ export class Top extends APIResource { } /** - * Get the Industry of attacks. + * Get the industries targeted by attacks. */ industry(query?: TopIndustryParams, options?: Core.RequestOptions): Core.APIPromise; industry(options?: Core.RequestOptions): Core.APIPromise; @@ -51,7 +51,7 @@ export class Top extends APIResource { } /** - * Get the Verticals of attacks. + * Get the verticals targeted by attacks. */ vertical(query?: TopVerticalParams, options?: Core.RequestOptions): Core.APIPromise; vertical(options?: Core.RequestOptions): Core.APIPromise; diff --git a/src/resources/radar/attacks/layer7/timeseries-groups.ts b/src/resources/radar/attacks/layer7/timeseries-groups.ts index 7386034497..bbdaa5a1b5 100644 --- a/src/resources/radar/attacks/layer7/timeseries-groups.ts +++ b/src/resources/radar/attacks/layer7/timeseries-groups.ts @@ -7,8 +7,7 @@ import * as TimeseriesGroupsAPI from './timeseries-groups'; export class TimeseriesGroups extends APIResource { /** - * Get a time series of the percentual distribution of mitigation techniques, over - * time. + * Get a time series of the distribution of mitigation techniques over time. */ get( query?: TimeseriesGroupGetParams, @@ -76,7 +75,7 @@ export class TimeseriesGroups extends APIResource { } /** - * Percentage distribution of attacks by industry used over time. + * Percentage distribution of attacks by targeted industry over time. */ industry( query?: TimeseriesGroupIndustryParams, @@ -168,7 +167,7 @@ export class TimeseriesGroups extends APIResource { } /** - * Percentage distribution of attacks by vertical used over time. + * Percentage distribution of attacks by targeted vertical over time. */ vertical( query?: TimeseriesGroupVerticalParams, diff --git a/src/resources/radar/attacks/layer7/top/ases.ts b/src/resources/radar/attacks/layer7/top/ases.ts index 97b63cde5d..1d594b6d4e 100644 --- a/src/resources/radar/attacks/layer7/top/ases.ts +++ b/src/resources/radar/attacks/layer7/top/ases.ts @@ -7,9 +7,9 @@ import * as AsesAPI from './ases'; export class Ases extends APIResource { /** - * Get the top origin Autonomous Systems of and by layer 7 attacks. Values are a - * percentage out of the total layer 7 attacks. The origin Autonomous Systems is - * determined by the client IP. + * Get the top origin Autonomous Systems of and by Layer 7 attacks. Values are a + * percentage out of the total Layer 7 attacks. The origin Autonomous Systems is + * determined by the client IP address. */ origin(query?: AseOriginParams, options?: Core.RequestOptions): Core.APIPromise; origin(options?: Core.RequestOptions): Core.APIPromise; diff --git a/src/resources/radar/attacks/layer7/top/locations.ts b/src/resources/radar/attacks/layer7/top/locations.ts index 5e34e10919..da10c2a03f 100644 --- a/src/resources/radar/attacks/layer7/top/locations.ts +++ b/src/resources/radar/attacks/layer7/top/locations.ts @@ -7,9 +7,9 @@ import * as LocationsAPI from './locations'; export class Locations extends APIResource { /** - * Get the top origin locations of and by layer 7 attacks. Values are a percentage - * out of the total layer 7 attacks. The origin location is determined by the - * client IP. + * Get the top origin locations of and by Layer 7 attacks. Values are a percentage + * out of the total Layer 7 attacks. The origin location is determined by the + * client IP address. */ origin( query?: LocationOriginParams, diff --git a/src/resources/radar/attacks/layer7/top/top.ts b/src/resources/radar/attacks/layer7/top/top.ts index 1a845fd373..f767063087 100644 --- a/src/resources/radar/attacks/layer7/top/top.ts +++ b/src/resources/radar/attacks/layer7/top/top.ts @@ -13,10 +13,10 @@ export class Top extends APIResource { /** * Get the top attacks from origin to target location. Values are a percentage out - * of the total layer 7 attacks (with billing country). The attack magnitude can be + * of the total Layer 7 attacks (with billing country). The attack magnitude can be * defined by the number of mitigated requests or by the number of zones affected. - * You can optionally limit the number of attacks per origin/target location - * (useful if all the top attacks are from or to the same location). + * You can optionally limit the number of attacks by origin/target location (useful + * if all the top attacks are from or to the same location). */ attacks(query?: TopAttacksParams, options?: Core.RequestOptions): Core.APIPromise; attacks(options?: Core.RequestOptions): Core.APIPromise; @@ -35,7 +35,7 @@ export class Top extends APIResource { } /** - * Get the Industry of attacks. + * Get the industries targeted by attacks. */ industry(query?: TopIndustryParams, options?: Core.RequestOptions): Core.APIPromise; industry(options?: Core.RequestOptions): Core.APIPromise; @@ -54,7 +54,7 @@ export class Top extends APIResource { } /** - * Get the Verticals of attacks. + * Get the verticals targeted by attacks. */ vertical(query?: TopVerticalParams, options?: Core.RequestOptions): Core.APIPromise; vertical(options?: Core.RequestOptions): Core.APIPromise; diff --git a/src/resources/radar/bgp/bgp.ts b/src/resources/radar/bgp/bgp.ts index 3a81d5d506..2943dbb667 100644 --- a/src/resources/radar/bgp/bgp.ts +++ b/src/resources/radar/bgp/bgp.ts @@ -18,8 +18,8 @@ export class BGP extends APIResource { ips: IPsAPI.IPs = new IPsAPI.IPs(this._client); /** - * Gets BGP updates change over time. Raw values are returned. When requesting - * updates of an autonomous system (AS), only BGP updates of type announcement are + * Get BGP updates change over time. Raw values are returned. When requesting + * updates for an autonomous system (AS), only BGP updates of type announcement are * returned. */ timeseries( diff --git a/src/resources/radar/bgp/ips.ts b/src/resources/radar/bgp/ips.ts index a6660136a3..e773d52298 100644 --- a/src/resources/radar/bgp/ips.ts +++ b/src/resources/radar/bgp/ips.ts @@ -7,8 +7,8 @@ import * as IPsAPI from './ips'; export class IPs extends APIResource { /** - * Gets time-series data for the announced IP space count, represented as the - * number of IPv4 /24s and IPv6 /48s, for a given ASN. + * Get time series data for the announced IP space count, represented as the number + * of IPv4 /24s and IPv6 /48s, for a given ASN. */ timeseries( query?: IPTimeseriesParams, diff --git a/src/resources/radar/bgp/routes.ts b/src/resources/radar/bgp/routes.ts index c86f53d312..00cafcea40 100644 --- a/src/resources/radar/bgp/routes.ts +++ b/src/resources/radar/bgp/routes.ts @@ -7,7 +7,7 @@ import * as RoutesAPI from './routes'; export class Routes extends APIResource { /** - * List all ASes on current global routing tables with routing statistics + * List all ASes in current global routing tables with routing statistics */ ases(query?: RouteAsesParams, options?: Core.RequestOptions): Core.APIPromise; ases(options?: Core.RequestOptions): Core.APIPromise; @@ -26,7 +26,7 @@ export class Routes extends APIResource { } /** - * List all Multi-origin AS (MOAS) prefixes on the global routing tables. + * List all Multi-Origin AS (MOAS) prefixes on the global routing tables. */ moas(query?: RouteMoasParams, options?: Core.RequestOptions): Core.APIPromise; moas(options?: Core.RequestOptions): Core.APIPromise; diff --git a/src/resources/radar/bgp/top/ases.ts b/src/resources/radar/bgp/top/ases.ts index 99b08ce78e..6c47e3e048 100644 --- a/src/resources/radar/bgp/top/ases.ts +++ b/src/resources/radar/bgp/top/ases.ts @@ -7,8 +7,8 @@ import * as AsesAPI from './ases'; export class Ases extends APIResource { /** - * Get the top autonomous systems (AS) by BGP updates (announcements only). Values - * are a percentage out of the total updates. + * Get the top autonomous systems (ASes) by BGP updates (announcements only). + * Values are a percentage out of the total updates. */ get(query?: AseGetParams, options?: Core.RequestOptions): Core.APIPromise; get(options?: Core.RequestOptions): Core.APIPromise; diff --git a/src/resources/radar/datasets.ts b/src/resources/radar/datasets.ts index c88034e95d..deb733dc13 100644 --- a/src/resources/radar/datasets.ts +++ b/src/resources/radar/datasets.ts @@ -43,7 +43,7 @@ export class Datasets extends APIResource { } /** - * Get the csv content of a given dataset by alias or id. When getting the content + * Get the CSV content of a given dataset by alias or ID. When getting the content * by alias the latest dataset is returned, optionally filtered by the latest * available at a given date. */ diff --git a/src/resources/radar/email/routing/summary.ts b/src/resources/radar/email/routing/summary.ts index da866977b2..cc37ac6ec6 100644 --- a/src/resources/radar/email/routing/summary.ts +++ b/src/resources/radar/email/routing/summary.ts @@ -8,7 +8,7 @@ import * as EmailAPI from '../email'; export class Summary extends APIResource { /** - * Percentage distribution of emails classified per ARC validation. + * Percentage distribution of emails classified by ARC validation. */ arc(query?: SummaryARCParams, options?: Core.RequestOptions): Core.APIPromise; arc(options?: Core.RequestOptions): Core.APIPromise; @@ -27,7 +27,7 @@ export class Summary extends APIResource { } /** - * Percentage distribution of emails classified per DKIM validation. + * Percentage distribution of emails classified by DKIM validation. */ dkim(query?: SummaryDKIMParams, options?: Core.RequestOptions): Core.APIPromise; dkim(options?: Core.RequestOptions): Core.APIPromise; @@ -46,7 +46,7 @@ export class Summary extends APIResource { } /** - * Percentage distribution of emails classified per DMARC validation. + * Percentage distribution of emails classified by DMARC validation. */ dmarc(query?: SummaryDMARCParams, options?: Core.RequestOptions): Core.APIPromise; dmarc(options?: Core.RequestOptions): Core.APIPromise; @@ -65,7 +65,7 @@ export class Summary extends APIResource { } /** - * Percentage distribution of emails by Encrypted + * Percentage distribution of emails by encryption status. */ encrypted( query?: SummaryEncryptedParams, @@ -87,7 +87,7 @@ export class Summary extends APIResource { } /** - * Percentage distribution of emails by Ip Version. + * Percentage distribution of emails by IP version. */ ipVersion( query?: SummaryIPVersionParams, @@ -109,7 +109,7 @@ export class Summary extends APIResource { } /** - * Percentage distribution of emails classified per SPF validation. + * Percentage distribution of emails classified by SPF validation. */ spf(query?: SummarySPFParams, options?: Core.RequestOptions): Core.APIPromise; spf(options?: Core.RequestOptions): Core.APIPromise; diff --git a/src/resources/radar/email/routing/timeseries-groups.ts b/src/resources/radar/email/routing/timeseries-groups.ts index 4f50e19810..64bf6931bc 100644 --- a/src/resources/radar/email/routing/timeseries-groups.ts +++ b/src/resources/radar/email/routing/timeseries-groups.ts @@ -8,7 +8,7 @@ import * as EmailAPI from '../email'; export class TimeseriesGroups extends APIResource { /** - * Percentage distribution of emails classified per Arc validation over time. + * Percentage distribution of emails classified by ARC validation over time. */ arc( query?: TimeseriesGroupARCParams, @@ -31,7 +31,7 @@ export class TimeseriesGroups extends APIResource { } /** - * Percentage distribution of emails classified per DKIM validation over time. + * Percentage distribution of emails classified by DKIM validation over time. */ dkim( query?: TimeseriesGroupDKIMParams, @@ -54,7 +54,7 @@ export class TimeseriesGroups extends APIResource { } /** - * Percentage distribution of emails classified per DMARC validation over time. + * Percentage distribution of emails classified by DMARC validation over time. */ dmarc( query?: TimeseriesGroupDMARCParams, @@ -77,7 +77,7 @@ export class TimeseriesGroups extends APIResource { } /** - * Percentage distribution of emails by Encrypted over time. + * Percentage distribution of emails by encryption status over time. */ encrypted( query?: TimeseriesGroupEncryptedParams, @@ -100,7 +100,7 @@ export class TimeseriesGroups extends APIResource { } /** - * Percentage distribution of emails by Ip Version over time. + * Percentage distribution of emails by IP version over time. */ ipVersion( query?: TimeseriesGroupIPVersionParams, @@ -123,7 +123,7 @@ export class TimeseriesGroups extends APIResource { } /** - * Percentage distribution of emails classified per SPF validation over time. + * Percentage distribution of emails classified by SPF validation over time. */ spf( query?: TimeseriesGroupSPFParams, diff --git a/src/resources/radar/email/security/summary.ts b/src/resources/radar/email/security/summary.ts index bc1dbb1f18..6c5766122c 100644 --- a/src/resources/radar/email/security/summary.ts +++ b/src/resources/radar/email/security/summary.ts @@ -8,7 +8,7 @@ import * as EmailAPI from '../email'; export class Summary extends APIResource { /** - * Percentage distribution of emails classified per ARC validation. + * Percentage distribution of emails classified by ARC validation. */ arc(query?: SummaryARCParams, options?: Core.RequestOptions): Core.APIPromise; arc(options?: Core.RequestOptions): Core.APIPromise; @@ -27,7 +27,7 @@ export class Summary extends APIResource { } /** - * Percentage distribution of emails classified per DKIM validation. + * Percentage distribution of emails classified by DKIM validation. */ dkim(query?: SummaryDKIMParams, options?: Core.RequestOptions): Core.APIPromise; dkim(options?: Core.RequestOptions): Core.APIPromise; @@ -46,7 +46,7 @@ export class Summary extends APIResource { } /** - * Percentage distribution of emails classified per DMARC validation. + * Percentage distribution of emails classified by DMARC validation. */ dmarc(query?: SummaryDMARCParams, options?: Core.RequestOptions): Core.APIPromise; dmarc(options?: Core.RequestOptions): Core.APIPromise; @@ -106,7 +106,7 @@ export class Summary extends APIResource { } /** - * Percentage distribution of emails classified per SPF validation. + * Percentage distribution of emails classified by SPF validation. */ spf(query?: SummarySPFParams, options?: Core.RequestOptions): Core.APIPromise; spf(options?: Core.RequestOptions): Core.APIPromise; @@ -167,7 +167,7 @@ export class Summary extends APIResource { } /** - * Percentage distribution of emails classified per TLS Version. + * Percentage distribution of emails classified by TLS version. */ tlsVersion( query?: SummaryTLSVersionParams, diff --git a/src/resources/radar/email/security/timeseries-groups.ts b/src/resources/radar/email/security/timeseries-groups.ts index 194b1cac64..0e29ec0756 100644 --- a/src/resources/radar/email/security/timeseries-groups.ts +++ b/src/resources/radar/email/security/timeseries-groups.ts @@ -8,7 +8,7 @@ import * as EmailAPI from '../email'; export class TimeseriesGroups extends APIResource { /** - * Percentage distribution of emails classified per Arc validation over time. + * Percentage distribution of emails classified by ARC validation over time. */ arc( query?: TimeseriesGroupARCParams, @@ -31,7 +31,7 @@ export class TimeseriesGroups extends APIResource { } /** - * Percentage distribution of emails classified per DKIM validation over time. + * Percentage distribution of emails classified by DKIM validation over time. */ dkim( query?: TimeseriesGroupDKIMParams, @@ -54,7 +54,7 @@ export class TimeseriesGroups extends APIResource { } /** - * Percentage distribution of emails classified per DMARC validation over time. + * Percentage distribution of emails classified by DMARC validation over time. */ dmarc( query?: TimeseriesGroupDMARCParams, @@ -123,7 +123,7 @@ export class TimeseriesGroups extends APIResource { } /** - * Percentage distribution of emails classified per SPF validation over time. + * Percentage distribution of emails classified by SPF validation over time. */ spf( query?: TimeseriesGroupSPFParams, @@ -169,7 +169,7 @@ export class TimeseriesGroups extends APIResource { } /** - * Percentage distribution of emails classified in Threat Categories over time. + * Percentage distribution of emails classified by threat category over time. */ threatCategory( query?: TimeseriesGroupThreatCategoryParams, @@ -192,7 +192,7 @@ export class TimeseriesGroups extends APIResource { } /** - * Percentage distribution of emails classified per TLS Version over time. + * Percentage distribution of emails classified by TLS version over time. */ tlsVersion( query?: TimeseriesGroupTLSVersionParams, diff --git a/src/resources/radar/email/security/top/tlds/spam.ts b/src/resources/radar/email/security/top/tlds/spam.ts index 0f5d48d8d6..da1ad717c1 100644 --- a/src/resources/radar/email/security/top/tlds/spam.ts +++ b/src/resources/radar/email/security/top/tlds/spam.ts @@ -7,7 +7,7 @@ import * as SpamAPI from './spam'; export class Spam extends APIResource { /** - * Get the top TLDs by emails classified as Spam or not. + * Get the top TLDs by emails classified as spam or not. */ get( spam: 'SPAM' | 'NOT_SPAM', diff --git a/src/resources/radar/email/security/top/tlds/tlds.ts b/src/resources/radar/email/security/top/tlds/tlds.ts index 9f8bfb9998..4e49eecba6 100644 --- a/src/resources/radar/email/security/top/tlds/tlds.ts +++ b/src/resources/radar/email/security/top/tlds/tlds.ts @@ -14,8 +14,8 @@ export class Tlds extends APIResource { spoof: SpoofAPI.Spoof = new SpoofAPI.Spoof(this._client); /** - * Get the top TLDs by email messages. Values are a percentage out of the total - * emails. + * Get the top TLDs by email messages. Values are a percentage out of total email + * volume. */ get(query?: TldGetParams, options?: Core.RequestOptions): Core.APIPromise; get(options?: Core.RequestOptions): Core.APIPromise; diff --git a/src/resources/radar/entities/asns.ts b/src/resources/radar/entities/asns.ts index 312e73da02..95c181c3ca 100644 --- a/src/resources/radar/entities/asns.ts +++ b/src/resources/radar/entities/asns.ts @@ -7,7 +7,7 @@ import * as ASNsAPI from './asns'; export class ASNs extends APIResource { /** - * Gets a list of autonomous systems (AS). + * Get a list of autonomous systems (ASes). */ list(query?: ASNListParams, options?: Core.RequestOptions): Core.APIPromise; list(options?: Core.RequestOptions): Core.APIPromise; diff --git a/src/resources/radar/http/ases/http-method.ts b/src/resources/radar/http/ases/http-method.ts index b6e6efb3d0..9aa24d05e0 100644 --- a/src/resources/radar/http/ases/http-method.ts +++ b/src/resources/radar/http/ases/http-method.ts @@ -8,7 +8,7 @@ import * as HTTPMethodAPI from './http-method'; export class HTTPMethod extends APIResource { /** * Get the top autonomous systems (AS), by HTTP traffic, of the requested HTTP - * protocol version. Values are a percentage out of the total traffic. + * version. Values are a percentage out of the total traffic. */ get( httpVersion: 'HTTPv1' | 'HTTPv2' | 'HTTPv3', diff --git a/src/resources/radar/http/ases/ip-version.ts b/src/resources/radar/http/ases/ip-version.ts index 6a897f7bb0..523b6f19df 100644 --- a/src/resources/radar/http/ases/ip-version.ts +++ b/src/resources/radar/http/ases/ip-version.ts @@ -7,8 +7,8 @@ import * as IPVersionAPI from './ip-version'; export class IPVersion extends APIResource { /** - * Get the top autonomous systems, by HTTP traffic, of the requested IP protocol - * version. Values are a percentage out of the total traffic. + * Get the top autonomous systems, by HTTP traffic, of the requested IP version. + * Values are a percentage out of the total traffic. */ get( ipVersion: 'IPv4' | 'IPv6', diff --git a/src/resources/radar/http/locations/http-method.ts b/src/resources/radar/http/locations/http-method.ts index 27add60ece..0b5c712bb9 100644 --- a/src/resources/radar/http/locations/http-method.ts +++ b/src/resources/radar/http/locations/http-method.ts @@ -7,7 +7,7 @@ import * as HTTPMethodAPI from './http-method'; export class HTTPMethod extends APIResource { /** - * Get the top locations, by HTTP traffic, of the requested HTTP protocol. Values + * Get the top locations, by HTTP traffic, of the requested HTTP version. Values * are a percentage out of the total traffic. */ get( diff --git a/src/resources/radar/http/locations/ip-version.ts b/src/resources/radar/http/locations/ip-version.ts index bedb0719e9..e8c2f34c7b 100644 --- a/src/resources/radar/http/locations/ip-version.ts +++ b/src/resources/radar/http/locations/ip-version.ts @@ -7,8 +7,8 @@ import * as IPVersionAPI from './ip-version'; export class IPVersion extends APIResource { /** - * Get the top locations, by HTTP traffic, of the requested IP protocol version. - * Values are a percentage out of the total traffic. + * Get the top locations, by HTTP traffic, of the requested IP version. Values are + * a percentage out of the total traffic. */ get( ipVersion: 'IPv4' | 'IPv6', diff --git a/src/resources/radar/http/summary.ts b/src/resources/radar/http/summary.ts index 246143509c..ed14bd50db 100644 --- a/src/resources/radar/http/summary.ts +++ b/src/resources/radar/http/summary.ts @@ -33,7 +33,7 @@ export class Summary extends APIResource { /** * Percentage of Internet traffic generated by mobile, desktop, and other types of - * devices, over a given time period. + * devices over a given time period. */ deviceType( query?: SummaryDeviceTypeParams, @@ -55,7 +55,7 @@ export class Summary extends APIResource { } /** - * Percentage distribution of traffic per HTTP protocol over a given time period. + * Percentage distribution of traffic by HTTP protocol over a given time period. */ httpProtocol( query?: SummaryHTTPProtocolParams, @@ -77,8 +77,7 @@ export class Summary extends APIResource { } /** - * Percentage distribution of traffic per HTTP protocol version over a given time - * period. + * Percentage distribution of traffic by HTTP version over a given time period. */ httpVersion( query?: SummaryHTTPVersionParams, @@ -100,8 +99,8 @@ export class Summary extends APIResource { } /** - * Percentage distribution of Internet traffic based on IP protocol versions, such - * as IPv4 and IPv6, over a given time period. + * Percentage distribution of Internet traffic based on IP versions (IPv4 and IPv6) + * over a given time period. */ ipVersion( query?: SummaryIPVersionParams, @@ -143,7 +142,7 @@ export class Summary extends APIResource { } /** - * Percentage distribution of traffic per Post Quantum support over a given time + * Percentage distribution of traffic by post-quantum support over a given time * period. */ postQuantum( @@ -166,7 +165,7 @@ export class Summary extends APIResource { } /** - * Percentage distribution of traffic per TLS protocol version, over a given time + * Percentage distribution of traffic by TLS protocol version, over a given time * period. */ tlsVersion( diff --git a/src/resources/radar/http/timeseries-groups.ts b/src/resources/radar/http/timeseries-groups.ts index fe8a78cd19..742fe1e31e 100644 --- a/src/resources/radar/http/timeseries-groups.ts +++ b/src/resources/radar/http/timeseries-groups.ts @@ -79,7 +79,7 @@ export class TimeseriesGroups extends APIResource { } /** - * Get a time series of the percentage distribution of traffic per device type. + * Get a time series of the percentage distribution of traffic by device type. */ deviceType( query?: TimeseriesGroupDeviceTypeParams, @@ -102,7 +102,7 @@ export class TimeseriesGroups extends APIResource { } /** - * Get a time series of the percentage distribution of traffic per HTTP protocol. + * Get a time series of the percentage distribution of traffic by HTTP protocol. */ httpProtocol( query?: TimeseriesGroupHTTPProtocolParams, @@ -125,8 +125,7 @@ export class TimeseriesGroups extends APIResource { } /** - * Get a time series of the percentage distribution of traffic per HTTP protocol - * version. + * Get a time series of the percentage distribution of traffic by HTTP version. */ httpVersion( query?: TimeseriesGroupHTTPVersionParams, @@ -149,8 +148,7 @@ export class TimeseriesGroups extends APIResource { } /** - * Get a time series of the percentage distribution of traffic per IP protocol - * version. + * Get a time series of the percentage distribution of traffic by IP version. */ ipVersion( query?: TimeseriesGroupIPVersionParams, @@ -195,7 +193,7 @@ export class TimeseriesGroups extends APIResource { } /** - * Get a time series of the percentage distribution of traffic per Post Quantum + * Get a time series of the percentage distribution of traffic by post-quantum * suport. */ postQuantum( @@ -219,7 +217,7 @@ export class TimeseriesGroups extends APIResource { } /** - * Get a time series of the percentage distribution of traffic per TLS protocol + * Get a time series of the percentage distribution of traffic by TLS protocol * version. */ tlsVersion( diff --git a/src/resources/radar/search.ts b/src/resources/radar/search.ts index cc0bd31f45..9e5b337ec2 100644 --- a/src/resources/radar/search.ts +++ b/src/resources/radar/search.ts @@ -6,7 +6,7 @@ import * as SearchAPI from './search'; export class Search extends APIResource { /** - * Lets you search for locations, autonomous systems (AS) and reports. + * Lets you search for locations, autonomous systems (ASes), and reports. */ global(query: SearchGlobalParams, options?: Core.RequestOptions): Core.APIPromise { return ( diff --git a/src/resources/radar/traffic-anomalies/locations.ts b/src/resources/radar/traffic-anomalies/locations.ts index d9a47f375f..be0181ef12 100644 --- a/src/resources/radar/traffic-anomalies/locations.ts +++ b/src/resources/radar/traffic-anomalies/locations.ts @@ -7,7 +7,7 @@ import * as LocationsAPI from './locations'; export class Locations extends APIResource { /** - * Internet traffic anomalies are signals that might point to an outage, These + * Internet traffic anomalies are signals that might point to an outage. These * alerts are automatically detected by Radar and then manually verified by our * team. This endpoint returns the sum of alerts grouped by location. */ diff --git a/src/resources/radar/traffic-anomalies/traffic-anomalies.ts b/src/resources/radar/traffic-anomalies/traffic-anomalies.ts index 202f42bc72..c09ba873c3 100644 --- a/src/resources/radar/traffic-anomalies/traffic-anomalies.ts +++ b/src/resources/radar/traffic-anomalies/traffic-anomalies.ts @@ -10,7 +10,7 @@ export class TrafficAnomalies extends APIResource { locations: LocationsAPI.Locations = new LocationsAPI.Locations(this._client); /** - * Internet traffic anomalies are signals that might point to an outage, These + * Internet traffic anomalies are signals that might point to an outage. These * alerts are automatically detected by Radar and then manually verified by our * team. This endpoint returns the latest alerts. */ diff --git a/src/resources/vectorize/indexes/indexes.ts b/src/resources/vectorize/indexes/indexes.ts index ecc866d3a7..161e4a6e01 100644 --- a/src/resources/vectorize/indexes/indexes.ts +++ b/src/resources/vectorize/indexes/indexes.ts @@ -44,13 +44,13 @@ export class Indexes extends APIResource { indexName: string, params: IndexDeleteParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { account_id } = params; return ( this._client.delete( `/accounts/${account_id}/vectorize/v2/indexes/${indexName}`, options, - ) as Core.APIPromise<{ result: IndexDeleteResponse | null }> + ) as Core.APIPromise<{ result: IndexDeleteResponse }> )._thenUnwrap((obj) => obj.result); } @@ -273,7 +273,7 @@ export namespace IndexQuery { */ id?: string; - metadata?: unknown; + metadata?: unknown | null; /** * The score of the vector according to the index's distance metric @@ -296,7 +296,7 @@ export interface IndexUpsert { ids?: Array; } -export type IndexDeleteResponse = unknown | string; +export type IndexDeleteResponse = unknown | string | null; export interface IndexDeleteByIDsResponse { /** @@ -359,7 +359,7 @@ export namespace IndexQueryResponse { */ id?: string; - metadata?: unknown; + metadata?: unknown | null; namespace?: string | null; diff --git a/src/resources/zero-trust/access/applications/applications.ts b/src/resources/zero-trust/access/applications/applications.ts index c19078d06e..d9e776ec17 100644 --- a/src/resources/zero-trust/access/applications/applications.ts +++ b/src/resources/zero-trust/access/applications/applications.ts @@ -217,16 +217,16 @@ export class Applications extends APIResource { appId: AppIDParam, params?: ApplicationRevokeTokensParams, options?: Core.RequestOptions, - ): Core.APIPromise; + ): Core.APIPromise; revokeTokens( appId: AppIDParam, options?: Core.RequestOptions, - ): Core.APIPromise; + ): Core.APIPromise; revokeTokens( appId: AppIDParam, params: ApplicationRevokeTokensParams | Core.RequestOptions = {}, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { if (isRequestOptions(params)) { return this.revokeTokens(appId, {}, params); } @@ -251,7 +251,7 @@ export class Applications extends APIResource { this._client.post( `/${accountOrZone}/${accountOrZoneId}/access/apps/${appId}/revoke_tokens`, options, - ) as Core.APIPromise<{ result: ApplicationRevokeTokensResponse }> + ) as Core.APIPromise<{ result: ApplicationRevokeTokensResponse | null }> )._thenUnwrap((obj) => obj.result); } } diff --git a/src/resources/zero-trust/devices/devices.ts b/src/resources/zero-trust/devices/devices.ts index b18a46bb32..0f32593b6f 100644 --- a/src/resources/zero-trust/devices/devices.ts +++ b/src/resources/zero-trust/devices/devices.ts @@ -38,11 +38,11 @@ export class Devices extends APIResource { deviceId: string, params: DeviceGetParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { account_id } = params; return ( this._client.get(`/accounts/${account_id}/devices/${deviceId}`, options) as Core.APIPromise<{ - result: DeviceGetResponse | null; + result: DeviceGetResponse; }> )._thenUnwrap((obj) => obj.result); } @@ -165,7 +165,7 @@ export namespace Device { } } -export type DeviceGetResponse = unknown | string; +export type DeviceGetResponse = unknown | string | null; export interface DeviceListParams { account_id: string; diff --git a/src/resources/zero-trust/devices/policies/certificates.ts b/src/resources/zero-trust/devices/policies/certificates.ts index 1e5bb99ced..4b20c834fe 100755 --- a/src/resources/zero-trust/devices/policies/certificates.ts +++ b/src/resources/zero-trust/devices/policies/certificates.ts @@ -14,22 +14,22 @@ export class Certificates extends APIResource { zoneTag: string, body: CertificateUpdateParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { return ( this._client.patch(`/zones/${zoneTag}/devices/policy/certificates`, { body, ...options, - }) as Core.APIPromise<{ result: CertificateUpdateResponse | null }> + }) as Core.APIPromise<{ result: CertificateUpdateResponse }> )._thenUnwrap((obj) => obj.result); } /** * Fetches device certificate provisioning */ - get(zoneTag: string, options?: Core.RequestOptions): Core.APIPromise { + get(zoneTag: string, options?: Core.RequestOptions): Core.APIPromise { return ( this._client.get(`/zones/${zoneTag}/devices/policy/certificates`, options) as Core.APIPromise<{ - result: CertificateGetResponse | null; + result: CertificateGetResponse; }> )._thenUnwrap((obj) => obj.result); } @@ -43,9 +43,9 @@ export interface DevicePolicyCertificates { enabled: boolean; } -export type CertificateUpdateResponse = unknown | string; +export type CertificateUpdateResponse = unknown | string | null; -export type CertificateGetResponse = unknown | string; +export type CertificateGetResponse = unknown | string | null; export interface CertificateUpdateParams { /** diff --git a/src/resources/zero-trust/devices/posture/integrations.ts b/src/resources/zero-trust/devices/posture/integrations.ts index 2a44ac9142..c7638c65dc 100644 --- a/src/resources/zero-trust/devices/posture/integrations.ts +++ b/src/resources/zero-trust/devices/posture/integrations.ts @@ -44,13 +44,13 @@ export class Integrations extends APIResource { integrationId: string, params: IntegrationDeleteParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { account_id } = params; return ( this._client.delete( `/accounts/${account_id}/devices/posture/integration/${integrationId}`, options, - ) as Core.APIPromise<{ result: IntegrationDeleteResponse | null }> + ) as Core.APIPromise<{ result: IntegrationDeleteResponse }> )._thenUnwrap((obj) => obj.result); } @@ -149,7 +149,7 @@ export namespace Integration { } } -export type IntegrationDeleteResponse = unknown | string; +export type IntegrationDeleteResponse = unknown | string | null; export interface IntegrationCreateParams { /** diff --git a/src/resources/zero-trust/devices/revoke.ts b/src/resources/zero-trust/devices/revoke.ts index a482f3b192..8d39bd7921 100644 --- a/src/resources/zero-trust/devices/revoke.ts +++ b/src/resources/zero-trust/devices/revoke.ts @@ -8,21 +8,18 @@ export class Revoke extends APIResource { /** * Revokes a list of devices. */ - create( - params: RevokeCreateParams, - options?: Core.RequestOptions, - ): Core.APIPromise { + create(params: RevokeCreateParams, options?: Core.RequestOptions): Core.APIPromise { const { account_id, body } = params; return ( this._client.post(`/accounts/${account_id}/devices/revoke`, { body: body, ...options, - }) as Core.APIPromise<{ result: RevokeCreateResponse | null }> + }) as Core.APIPromise<{ result: RevokeCreateResponse }> )._thenUnwrap((obj) => obj.result); } } -export type RevokeCreateResponse = unknown | string; +export type RevokeCreateResponse = unknown | string | null; export interface RevokeCreateParams { /** diff --git a/src/resources/zero-trust/devices/unrevoke.ts b/src/resources/zero-trust/devices/unrevoke.ts index 21c5ce6a93..dad9a15d9b 100644 --- a/src/resources/zero-trust/devices/unrevoke.ts +++ b/src/resources/zero-trust/devices/unrevoke.ts @@ -11,18 +11,18 @@ export class Unrevoke extends APIResource { create( params: UnrevokeCreateParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { account_id, body } = params; return ( this._client.post(`/accounts/${account_id}/devices/unrevoke`, { body: body, ...options, - }) as Core.APIPromise<{ result: UnrevokeCreateResponse | null }> + }) as Core.APIPromise<{ result: UnrevokeCreateResponse }> )._thenUnwrap((obj) => obj.result); } } -export type UnrevokeCreateResponse = unknown | string; +export type UnrevokeCreateResponse = unknown | string | null; export interface UnrevokeCreateParams { /** diff --git a/src/resources/zero-trust/dlp/profiles/custom.ts b/src/resources/zero-trust/dlp/profiles/custom.ts index dc0702dc5c..3036ac3327 100644 --- a/src/resources/zero-trust/dlp/profiles/custom.ts +++ b/src/resources/zero-trust/dlp/profiles/custom.ts @@ -43,13 +43,13 @@ export class Custom extends APIResource { profileId: string, params: CustomDeleteParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { account_id } = params; return ( this._client.delete( `/accounts/${account_id}/dlp/profiles/custom/${profileId}`, options, - ) as Core.APIPromise<{ result: CustomDeleteResponse }> + ) as Core.APIPromise<{ result: CustomDeleteResponse | null }> )._thenUnwrap((obj) => obj.result); } diff --git a/src/resources/zero-trust/risk-scoring/integrations/integrations.ts b/src/resources/zero-trust/risk-scoring/integrations/integrations.ts index 9f923109a9..1cf3aeef31 100644 --- a/src/resources/zero-trust/risk-scoring/integrations/integrations.ts +++ b/src/resources/zero-trust/risk-scoring/integrations/integrations.ts @@ -64,13 +64,13 @@ export class Integrations extends APIResource { integrationId: string, params: IntegrationDeleteParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { account_id } = params; return ( this._client.delete( `/accounts/${account_id}/zt_risk_scoring/integrations/${integrationId}`, options, - ) as Core.APIPromise<{ result: IntegrationDeleteResponse }> + ) as Core.APIPromise<{ result: IntegrationDeleteResponse | null }> )._thenUnwrap((obj) => obj.result); } diff --git a/src/resources/zero-trust/risk-scoring/risk-scoring.ts b/src/resources/zero-trust/risk-scoring/risk-scoring.ts index 76c89347dc..71efb57419 100644 --- a/src/resources/zero-trust/risk-scoring/risk-scoring.ts +++ b/src/resources/zero-trust/risk-scoring/risk-scoring.ts @@ -35,13 +35,13 @@ export class RiskScoring extends APIResource { userId: string, params: RiskScoringResetParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { account_id } = params; return ( this._client.post( `/accounts/${account_id}/zt_risk_scoring/${userId}/reset`, options, - ) as Core.APIPromise<{ result: RiskScoringResetResponse }> + ) as Core.APIPromise<{ result: RiskScoringResetResponse | null }> )._thenUnwrap((obj) => obj.result); } } diff --git a/tests/api-resources/radar/ai/gateway/summary.test.ts b/tests/api-resources/radar/ai/gateway/summary.test.ts deleted file mode 100755 index d3c6a4222d..0000000000 --- a/tests/api-resources/radar/ai/gateway/summary.test.ts +++ /dev/null @@ -1,114 +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 summary', () => { - test('model', async () => { - const responsePromise = client.radar.ai.gateway.summary.model(); - 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('model: request options instead of params are passed correctly', async () => { - // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect(client.radar.ai.gateway.summary.model({ path: '/_stainless_unknown_path' })).rejects.toThrow( - Cloudflare.NotFoundError, - ); - }); - - test('model: request options and params are passed correctly', async () => { - // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.radar.ai.gateway.summary.model( - { - dateEnd: ['2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z'], - dateRange: ['7d', '7d', '7d'], - dateStart: ['2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z'], - format: 'JSON', - name: ['string', 'string', 'string'], - }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Cloudflare.NotFoundError); - }); - - test('provider', async () => { - const responsePromise = client.radar.ai.gateway.summary.provider(); - 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('provider: request options instead of params are passed correctly', async () => { - // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.radar.ai.gateway.summary.provider({ path: '/_stainless_unknown_path' }), - ).rejects.toThrow(Cloudflare.NotFoundError); - }); - - test('provider: request options and params are passed correctly', async () => { - // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.radar.ai.gateway.summary.provider( - { - dateEnd: ['2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z'], - dateRange: ['7d', '7d', '7d'], - dateStart: ['2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z'], - format: 'JSON', - name: ['string', 'string', 'string'], - }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Cloudflare.NotFoundError); - }); - - test('task', async () => { - const responsePromise = client.radar.ai.gateway.summary.task(); - 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('task: request options instead of params are passed correctly', async () => { - // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect(client.radar.ai.gateway.summary.task({ path: '/_stainless_unknown_path' })).rejects.toThrow( - Cloudflare.NotFoundError, - ); - }); - - test('task: request options and params are passed correctly', async () => { - // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.radar.ai.gateway.summary.task( - { - dateEnd: ['2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z'], - dateRange: ['7d', '7d', '7d'], - dateStart: ['2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z'], - format: 'JSON', - name: ['string', 'string', 'string'], - }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Cloudflare.NotFoundError); - }); -}); diff --git a/tests/api-resources/radar/ai/gateway/timeseries-groups.test.ts b/tests/api-resources/radar/ai/gateway/timeseries-groups.test.ts deleted file mode 100755 index 8222994fe7..0000000000 --- a/tests/api-resources/radar/ai/gateway/timeseries-groups.test.ts +++ /dev/null @@ -1,120 +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 timeseriesGroups', () => { - test('model', async () => { - const responsePromise = client.radar.ai.gateway.timeseriesGroups.model(); - 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('model: request options instead of params are passed correctly', async () => { - // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.radar.ai.gateway.timeseriesGroups.model({ path: '/_stainless_unknown_path' }), - ).rejects.toThrow(Cloudflare.NotFoundError); - }); - - test('model: request options and params are passed correctly', async () => { - // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.radar.ai.gateway.timeseriesGroups.model( - { - aggInterval: '15m', - dateEnd: ['2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z'], - dateRange: ['7d', '7d', '7d'], - dateStart: ['2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z'], - format: 'JSON', - limitPerGroup: 4, - name: ['string', 'string', 'string'], - }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Cloudflare.NotFoundError); - }); - - test('provider', async () => { - const responsePromise = client.radar.ai.gateway.timeseriesGroups.provider(); - 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('provider: request options instead of params are passed correctly', async () => { - // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.radar.ai.gateway.timeseriesGroups.provider({ path: '/_stainless_unknown_path' }), - ).rejects.toThrow(Cloudflare.NotFoundError); - }); - - test('provider: request options and params are passed correctly', async () => { - // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.radar.ai.gateway.timeseriesGroups.provider( - { - aggInterval: '15m', - dateEnd: ['2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z'], - dateRange: ['7d', '7d', '7d'], - dateStart: ['2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z'], - format: 'JSON', - limitPerGroup: 4, - name: ['string', 'string', 'string'], - }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Cloudflare.NotFoundError); - }); - - test('task', async () => { - const responsePromise = client.radar.ai.gateway.timeseriesGroups.task(); - 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('task: request options instead of params are passed correctly', async () => { - // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.radar.ai.gateway.timeseriesGroups.task({ path: '/_stainless_unknown_path' }), - ).rejects.toThrow(Cloudflare.NotFoundError); - }); - - test('task: request options and params are passed correctly', async () => { - // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.radar.ai.gateway.timeseriesGroups.task( - { - aggInterval: '15m', - dateEnd: ['2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z'], - dateRange: ['7d', '7d', '7d'], - dateStart: ['2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z', '2019-12-27T18:11:19.117Z'], - format: 'JSON', - limitPerGroup: 4, - name: ['string', 'string', 'string'], - }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Cloudflare.NotFoundError); - }); -});