diff --git a/.stats.yml b/.stats.yml index 1765a1fb19..b38eee9f7b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ -configured_endpoints: 1259 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-66dffe82f1ae82ccb13bf0b382257be6906f416a22d1ca4ea74464cfff324775.yml +configured_endpoints: 1258 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-eb69a13d7b51cee2ffd5e3a4a70f4312e20c9830d80be2ecbc7006c8a524d912.yml diff --git a/api.md b/api.md index 19566e4dfb..6b6a6c997f 100644 --- a/api.md +++ b/api.md @@ -3144,10 +3144,6 @@ Types: - Whois -Methods: - -- client.intel.whois.get({ ...params }) -> Whois - ## IndicatorFeeds Types: diff --git a/src/resources/intel/index.ts b/src/resources/intel/index.ts index 093d93ef98..26b82cdef1 100644 --- a/src/resources/intel/index.ts +++ b/src/resources/intel/index.ts @@ -33,4 +33,4 @@ export { Miscategorizations, } from './miscategorizations'; export { Sinkhole, SinkholeListParams, SinkholesSinglePage, Sinkholes } from './sinkholes'; -export { Whois, WhoisGetParams } from './whois'; +export { Whois } from './whois'; diff --git a/src/resources/intel/intel.ts b/src/resources/intel/intel.ts index def3120ee7..fee5316882 100644 --- a/src/resources/intel/intel.ts +++ b/src/resources/intel/intel.ts @@ -58,7 +58,6 @@ export namespace Intel { export import MiscategorizationCreateResponse = MiscategorizationsAPI.MiscategorizationCreateResponse; export import MiscategorizationCreateParams = MiscategorizationsAPI.MiscategorizationCreateParams; export import Whois = WhoisAPI.Whois; - export import WhoisGetParams = WhoisAPI.WhoisGetParams; export import IndicatorFeeds = IndicatorFeedsAPI.IndicatorFeeds; export import IndicatorFeedCreateResponse = IndicatorFeedsAPI.IndicatorFeedCreateResponse; export import IndicatorFeedUpdateResponse = IndicatorFeedsAPI.IndicatorFeedUpdateResponse; diff --git a/src/resources/intel/whois.ts b/src/resources/intel/whois.ts index 783babb77d..7d8d49daae 100644 --- a/src/resources/intel/whois.ts +++ b/src/resources/intel/whois.ts @@ -1,22 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; import * as WhoisAPI from 'cloudflare/resources/intel/whois'; -export class Whois extends APIResource { - /** - * Get WHOIS Record - */ - get(params: WhoisGetParams, options?: Core.RequestOptions): Core.APIPromise { - const { account_id, ...query } = params; - return ( - this._client.get(`/accounts/${account_id}/intel/whois`, { query, ...options }) as Core.APIPromise<{ - result: Whois; - }> - )._thenUnwrap((obj) => obj.result); - } -} +export class Whois extends APIResource {} export interface Whois { created_date?: string; @@ -38,19 +25,6 @@ export interface Whois { updated_date?: string; } -export interface WhoisGetParams { - /** - * Path param: Identifier - */ - account_id: string; - - /** - * Query param: - */ - domain?: string; -} - export namespace Whois { export import Whois = WhoisAPI.Whois; - export import WhoisGetParams = WhoisAPI.WhoisGetParams; } diff --git a/tests/api-resources/intel/whois.test.ts b/tests/api-resources/intel/whois.test.ts deleted file mode 100644 index f7f5c20c12..0000000000 --- a/tests/api-resources/intel/whois.test.ts +++ /dev/null @@ -1,30 +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 cloudflare = new Cloudflare({ - apiKey: '144c9defac04969c7bfad8efaa8ea194', - apiEmail: 'user@example.com', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); - -describe('resource whois', () => { - test('get: only required params', async () => { - const responsePromise = cloudflare.intel.whois.get({ account_id: '023e105f4ecef8ad9ca31a8372d0c353' }); - 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('get: required and optional params', async () => { - const response = await cloudflare.intel.whois.get({ - account_id: '023e105f4ecef8ad9ca31a8372d0c353', - domain: 'string', - }); - }); -});