From 625ce8fb17f1a19b7ad8168326930c0c5eae7679 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 22 Apr 2024 05:06:37 +0000 Subject: [PATCH] feat(api): update via SDK Studio (#361) --- api.md | 7 ++----- src/index.ts | 1 + src/resources/intel/asn/asn.ts | 8 +++----- src/resources/intel/asn/index.ts | 2 +- src/resources/intel/asn/subnets.ts | 6 +++--- src/resources/intel/index.ts | 2 +- src/resources/intel/intel.ts | 1 - src/resources/shared.ts | 2 ++ 8 files changed, 13 insertions(+), 16 deletions(-) diff --git a/api.md b/api.md index 4e75ea231a..12023f84f8 100644 --- a/api.md +++ b/api.md @@ -2,6 +2,7 @@ Types: +- ASN - AuditLog - CloudflareTunnel - ErrorData @@ -3049,13 +3050,9 @@ Methods: ## ASN -Types: - -- IntelASN - Methods: -- client.intel.asn.get(asn, { ...params }) -> IntelASN +- client.intel.asn.get(asn, { ...params }) -> ASN ### Subnets diff --git a/src/index.ts b/src/index.ts index 1f5f28f6ac..7a96efaa7e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -552,6 +552,7 @@ export namespace Cloudflare { export import EventNotifications = API.EventNotifications; + export import ASN = API.ASN; export import AuditLog = API.AuditLog; export import CloudflareTunnel = API.CloudflareTunnel; export import ErrorData = API.ErrorData; diff --git a/src/resources/intel/asn/asn.ts b/src/resources/intel/asn/asn.ts index ffa9bff7ab..957a4de636 100644 --- a/src/resources/intel/asn/asn.ts +++ b/src/resources/intel/asn/asn.ts @@ -3,6 +3,7 @@ import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; import * as ASNAPI from 'cloudflare/resources/intel/asn/asn'; +import * as Shared from 'cloudflare/resources/shared'; import * as SubnetsAPI from 'cloudflare/resources/intel/asn/subnets'; export class ASN extends APIResource { @@ -11,18 +12,16 @@ export class ASN extends APIResource { /** * Get ASN Overview */ - get(asn: IntelASN, params: ASNGetParams, options?: Core.RequestOptions): Core.APIPromise { + get(asn: Shared.ASN, params: ASNGetParams, options?: Core.RequestOptions): Core.APIPromise { const { account_id } = params; return ( this._client.get(`/accounts/${account_id}/intel/asn/${asn}`, options) as Core.APIPromise<{ - result: IntelASN; + result: Shared.ASN; }> )._thenUnwrap((obj) => obj.result); } } -export type IntelASN = number; - export interface ASNGetParams { /** * Identifier @@ -31,7 +30,6 @@ export interface ASNGetParams { } export namespace ASN { - export import IntelASN = ASNAPI.IntelASN; export import ASNGetParams = ASNAPI.ASNGetParams; export import Subnets = SubnetsAPI.Subnets; export import SubnetGetResponse = SubnetsAPI.SubnetGetResponse; diff --git a/src/resources/intel/asn/index.ts b/src/resources/intel/asn/index.ts index 3480c3b5e9..93306f3866 100644 --- a/src/resources/intel/asn/index.ts +++ b/src/resources/intel/asn/index.ts @@ -1,4 +1,4 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { IntelASN, ASNGetParams, ASN } from './asn'; +export { ASNGetParams, ASN } from './asn'; export { SubnetGetResponse, SubnetGetParams, Subnets } from './subnets'; diff --git a/src/resources/intel/asn/subnets.ts b/src/resources/intel/asn/subnets.ts index 1adc575f5c..6aac62f954 100644 --- a/src/resources/intel/asn/subnets.ts +++ b/src/resources/intel/asn/subnets.ts @@ -3,14 +3,14 @@ import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; import * as SubnetsAPI from 'cloudflare/resources/intel/asn/subnets'; -import * as ASNAPI from 'cloudflare/resources/intel/asn/asn'; +import * as Shared from 'cloudflare/resources/shared'; export class Subnets extends APIResource { /** * Get ASN Subnets */ get( - asn: ASNAPI.IntelASN, + asn: Shared.ASN, params: SubnetGetParams, options?: Core.RequestOptions, ): Core.APIPromise { @@ -20,7 +20,7 @@ export class Subnets extends APIResource { } export interface SubnetGetResponse { - asn?: ASNAPI.IntelASN; + asn?: Shared.ASN; /** * Total results returned based on your search parameters. diff --git a/src/resources/intel/index.ts b/src/resources/intel/index.ts index c1e8f55e60..093d93ef98 100644 --- a/src/resources/intel/index.ts +++ b/src/resources/intel/index.ts @@ -1,5 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +export { ASNGetParams, ASN } from './asn/index'; export { AttackSurfaceReport } from './attack-surface-report/index'; export { DNS, DNSListResponse, DNSListParams, DNSListResponsesV4PagePagination } from './dns'; export { Domain, DomainGetParams, Domains } from './domains/index'; @@ -26,7 +27,6 @@ export { IndicatorFeeds, } from './indicator-feeds/index'; export { Intel } from './intel'; -export { IntelASN, ASNGetParams, ASN } from './asn/index'; export { MiscategorizationCreateResponse, MiscategorizationCreateParams, diff --git a/src/resources/intel/intel.ts b/src/resources/intel/intel.ts index 16f86bc640..def3120ee7 100644 --- a/src/resources/intel/intel.ts +++ b/src/resources/intel/intel.ts @@ -34,7 +34,6 @@ export class Intel extends APIResource { export namespace Intel { export import ASN = ASNAPI.ASN; - export import IntelASN = ASNAPI.IntelASN; export import ASNGetParams = ASNAPI.ASNGetParams; export import DNS = DNSAPI.DNS; export import DNSListResponse = DNSAPI.DNSListResponse; diff --git a/src/resources/shared.ts b/src/resources/shared.ts index 3d389dc57e..5d4a49664e 100644 --- a/src/resources/shared.ts +++ b/src/resources/shared.ts @@ -3,6 +3,8 @@ import * as Shared from 'cloudflare/resources/shared'; import { SinglePage, V4PagePaginationArray } from 'cloudflare/pagination'; +export type ASN = number; + export interface AuditLog { /** * A string that uniquely identifies the audit log.