diff --git a/.stats.yml b/.stats.yml index 61d343ad6f..b1ce07df11 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1 +1 @@ -configured_endpoints: 1138 +configured_endpoints: 1137 diff --git a/api.md b/api.md index 27f5e60d9c..7041e16c9a 100644 --- a/api.md +++ b/api.md @@ -5286,14 +5286,6 @@ Methods: ## Sinkholes -Types: - -- SinkholeListResponse - -Methods: - -- client.intel.sinkholes.list(accountIdentifier) -> SinkholeListResponse - # Rum ## SiteInfos diff --git a/src/resources/audit-logs.ts b/src/resources/audit-logs.ts index 427efc5b10..e152dc2f85 100644 --- a/src/resources/audit-logs.ts +++ b/src/resources/audit-logs.ts @@ -33,7 +33,7 @@ export class AuditLogs extends APIResource { export type AuditLogAuditLogsGetAccountAuditLogsResponse = | AuditLogAuditLogsGetAccountAuditLogsResponse.UnionMember0 - | AuditLogAuditLogsGetAccountAuditLogsResponse.HfiuwHe4APIResponseCommon; + | AuditLogAuditLogsGetAccountAuditLogsResponse.ZpUfpni7APIResponseCommon; export namespace AuditLogAuditLogsGetAccountAuditLogsResponse { export interface UnionMember0 { @@ -145,10 +145,10 @@ export namespace AuditLogAuditLogsGetAccountAuditLogsResponse { } } - export interface HfiuwHe4APIResponseCommon { - errors: Array; + export interface ZpUfpni7APIResponseCommon { + errors: Array; - messages: Array; + messages: Array; result: unknown | Array | string; @@ -158,7 +158,7 @@ export namespace AuditLogAuditLogsGetAccountAuditLogsResponse { success: true; } - export namespace HfiuwHe4APIResponseCommon { + export namespace ZpUfpni7APIResponseCommon { export interface Error { code: number; diff --git a/src/resources/intel/index.ts b/src/resources/intel/index.ts index d637086f3b..e508bcb3b2 100644 --- a/src/resources/intel/index.ts +++ b/src/resources/intel/index.ts @@ -2,4 +2,4 @@ export { IndicatorFeeds } from './indicator-feeds'; export { Intel } from './intel'; -export { SinkholeListResponse, Sinkholes } from './sinkholes'; +export { Sinkholes } from './sinkholes'; diff --git a/src/resources/intel/intel.ts b/src/resources/intel/intel.ts index 4a539ad950..849f8e86ae 100644 --- a/src/resources/intel/intel.ts +++ b/src/resources/intel/intel.ts @@ -12,5 +12,4 @@ export class Intel extends APIResource { export namespace Intel { export import IndicatorFeeds = IndicatorFeedsAPI.IndicatorFeeds; export import Sinkholes = SinkholesAPI.Sinkholes; - export import SinkholeListResponse = SinkholesAPI.SinkholeListResponse; } diff --git a/src/resources/intel/sinkholes.ts b/src/resources/intel/sinkholes.ts index e85624070c..97435e0d3c 100644 --- a/src/resources/intel/sinkholes.ts +++ b/src/resources/intel/sinkholes.ts @@ -1,63 +1,5 @@ // File generated from our OpenAPI spec by Stainless. -import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; -import * as SinkholesAPI from 'cloudflare/resources/intel/sinkholes'; -export class Sinkholes extends APIResource { - /** - * List sinkholes owned by this account - */ - list(accountIdentifier: string, options?: Core.RequestOptions): Core.APIPromise { - return ( - this._client.get(`/accounts/${accountIdentifier}/intel/sinkholes`, options) as Core.APIPromise<{ - result: SinkholeListResponse; - }> - )._thenUnwrap((obj) => obj.result); - } -} - -export type SinkholeListResponse = Array; - -export namespace SinkholeListResponse { - export interface SinkholeListResponseItem { - /** - * The unique identifier for the sinkhole - */ - id?: number; - - /** - * The account tag that owns this sinkhole - */ - account_tag?: string; - - /** - * The date and time when the sinkhole was created - */ - created_on?: string; - - /** - * The date and time when the sinkhole was last modified - */ - modified_on?: string; - - /** - * The name of the sinkhole - */ - name?: string; - - /** - * The name of the R2 bucket to store results - */ - r2_bucket?: string; - - /** - * The id of the R2 instance - */ - r2_id?: string; - } -} - -export namespace Sinkholes { - export import SinkholeListResponse = SinkholesAPI.SinkholeListResponse; -} +export class Sinkholes extends APIResource {} diff --git a/src/resources/pcaps/pcaps.ts b/src/resources/pcaps/pcaps.ts index 5009dcf264..00d1febd33 100644 --- a/src/resources/pcaps/pcaps.ts +++ b/src/resources/pcaps/pcaps.ts @@ -56,11 +56,11 @@ export class Pcaps extends APIResource { } export type PcapGetResponse = - | PcapGetResponse.G2LPwcp9PcapsResponseSimple - | PcapGetResponse.G2LPwcp9PcapsResponseFull; + | PcapGetResponse.SjCkNizoPcapsResponseSimple + | PcapGetResponse.SjCkNizoPcapsResponseFull; export namespace PcapGetResponse { - export interface G2LPwcp9PcapsResponseSimple { + export interface SjCkNizoPcapsResponseSimple { /** * The ID for the packet capture. */ @@ -69,7 +69,7 @@ export namespace PcapGetResponse { /** * The packet capture filter. When this field is empty, all packets are captured. */ - filter_v1?: G2LPwcp9PcapsResponseSimple.FilterV1; + filter_v1?: SjCkNizoPcapsResponseSimple.FilterV1; /** * The status of the packet capture request. @@ -106,7 +106,7 @@ export namespace PcapGetResponse { type?: 'simple' | 'full'; } - export namespace G2LPwcp9PcapsResponseSimple { + export namespace SjCkNizoPcapsResponseSimple { /** * The packet capture filter. When this field is empty, all packets are captured. */ @@ -138,7 +138,7 @@ export namespace PcapGetResponse { } } - export interface G2LPwcp9PcapsResponseFull { + export interface SjCkNizoPcapsResponseFull { /** * The ID for the packet capture. */ @@ -171,7 +171,7 @@ export namespace PcapGetResponse { /** * The packet capture filter. When this field is empty, all packets are captured. */ - filter_v1?: G2LPwcp9PcapsResponseFull.FilterV1; + filter_v1?: SjCkNizoPcapsResponseFull.FilterV1; /** * The status of the packet capture request. @@ -208,7 +208,7 @@ export namespace PcapGetResponse { type?: 'simple' | 'full'; } - export namespace G2LPwcp9PcapsResponseFull { + export namespace SjCkNizoPcapsResponseFull { /** * The packet capture filter. When this field is empty, all packets are captured. */ @@ -242,11 +242,11 @@ export namespace PcapGetResponse { } export type PcapMagicPcapCollectionCreatePcapRequestResponse = - | PcapMagicPcapCollectionCreatePcapRequestResponse.G2LPwcp9PcapsResponseSimple - | PcapMagicPcapCollectionCreatePcapRequestResponse.G2LPwcp9PcapsResponseFull; + | PcapMagicPcapCollectionCreatePcapRequestResponse.SjCkNizoPcapsResponseSimple + | PcapMagicPcapCollectionCreatePcapRequestResponse.SjCkNizoPcapsResponseFull; export namespace PcapMagicPcapCollectionCreatePcapRequestResponse { - export interface G2LPwcp9PcapsResponseSimple { + export interface SjCkNizoPcapsResponseSimple { /** * The ID for the packet capture. */ @@ -255,7 +255,7 @@ export namespace PcapMagicPcapCollectionCreatePcapRequestResponse { /** * The packet capture filter. When this field is empty, all packets are captured. */ - filter_v1?: G2LPwcp9PcapsResponseSimple.FilterV1; + filter_v1?: SjCkNizoPcapsResponseSimple.FilterV1; /** * The status of the packet capture request. @@ -292,7 +292,7 @@ export namespace PcapMagicPcapCollectionCreatePcapRequestResponse { type?: 'simple' | 'full'; } - export namespace G2LPwcp9PcapsResponseSimple { + export namespace SjCkNizoPcapsResponseSimple { /** * The packet capture filter. When this field is empty, all packets are captured. */ @@ -324,7 +324,7 @@ export namespace PcapMagicPcapCollectionCreatePcapRequestResponse { } } - export interface G2LPwcp9PcapsResponseFull { + export interface SjCkNizoPcapsResponseFull { /** * The ID for the packet capture. */ @@ -357,7 +357,7 @@ export namespace PcapMagicPcapCollectionCreatePcapRequestResponse { /** * The packet capture filter. When this field is empty, all packets are captured. */ - filter_v1?: G2LPwcp9PcapsResponseFull.FilterV1; + filter_v1?: SjCkNizoPcapsResponseFull.FilterV1; /** * The status of the packet capture request. @@ -394,7 +394,7 @@ export namespace PcapMagicPcapCollectionCreatePcapRequestResponse { type?: 'simple' | 'full'; } - export namespace G2LPwcp9PcapsResponseFull { + export namespace SjCkNizoPcapsResponseFull { /** * The packet capture filter. When this field is empty, all packets are captured. */ @@ -428,12 +428,12 @@ export namespace PcapMagicPcapCollectionCreatePcapRequestResponse { } export type PcapMagicPcapCollectionListPacketCaptureRequestsResponse = Array< - | PcapMagicPcapCollectionListPacketCaptureRequestsResponse.G2LPwcp9PcapsResponseSimple - | PcapMagicPcapCollectionListPacketCaptureRequestsResponse.G2LPwcp9PcapsResponseFull + | PcapMagicPcapCollectionListPacketCaptureRequestsResponse.SjCkNizoPcapsResponseSimple + | PcapMagicPcapCollectionListPacketCaptureRequestsResponse.SjCkNizoPcapsResponseFull >; export namespace PcapMagicPcapCollectionListPacketCaptureRequestsResponse { - export interface G2LPwcp9PcapsResponseSimple { + export interface SjCkNizoPcapsResponseSimple { /** * The ID for the packet capture. */ @@ -442,7 +442,7 @@ export namespace PcapMagicPcapCollectionListPacketCaptureRequestsResponse { /** * The packet capture filter. When this field is empty, all packets are captured. */ - filter_v1?: G2LPwcp9PcapsResponseSimple.FilterV1; + filter_v1?: SjCkNizoPcapsResponseSimple.FilterV1; /** * The status of the packet capture request. @@ -479,7 +479,7 @@ export namespace PcapMagicPcapCollectionListPacketCaptureRequestsResponse { type?: 'simple' | 'full'; } - export namespace G2LPwcp9PcapsResponseSimple { + export namespace SjCkNizoPcapsResponseSimple { /** * The packet capture filter. When this field is empty, all packets are captured. */ @@ -511,7 +511,7 @@ export namespace PcapMagicPcapCollectionListPacketCaptureRequestsResponse { } } - export interface G2LPwcp9PcapsResponseFull { + export interface SjCkNizoPcapsResponseFull { /** * The ID for the packet capture. */ @@ -544,7 +544,7 @@ export namespace PcapMagicPcapCollectionListPacketCaptureRequestsResponse { /** * The packet capture filter. When this field is empty, all packets are captured. */ - filter_v1?: G2LPwcp9PcapsResponseFull.FilterV1; + filter_v1?: SjCkNizoPcapsResponseFull.FilterV1; /** * The status of the packet capture request. @@ -581,7 +581,7 @@ export namespace PcapMagicPcapCollectionListPacketCaptureRequestsResponse { type?: 'simple' | 'full'; } - export namespace G2LPwcp9PcapsResponseFull { + export namespace SjCkNizoPcapsResponseFull { /** * The packet capture filter. When this field is empty, all packets are captured. */ @@ -615,11 +615,11 @@ export namespace PcapMagicPcapCollectionListPacketCaptureRequestsResponse { } export type PcapMagicPcapCollectionCreatePcapRequestParams = - | PcapMagicPcapCollectionCreatePcapRequestParams.G2LPwcp9PcapsRequestSimple - | PcapMagicPcapCollectionCreatePcapRequestParams.G2LPwcp9PcapsRequestFull; + | PcapMagicPcapCollectionCreatePcapRequestParams.SjCkNizoPcapsRequestSimple + | PcapMagicPcapCollectionCreatePcapRequestParams.SjCkNizoPcapsRequestFull; export namespace PcapMagicPcapCollectionCreatePcapRequestParams { - export interface G2LPwcp9PcapsRequestSimple { + export interface SjCkNizoPcapsRequestSimple { /** * The limit of packets contained in a packet capture. */ @@ -644,10 +644,10 @@ export namespace PcapMagicPcapCollectionCreatePcapRequestParams { /** * The packet capture filter. When this field is empty, all packets are captured. */ - filter_v1?: PcapMagicPcapCollectionCreatePcapRequestParams.G2LPwcp9PcapsRequestSimple.FilterV1; + filter_v1?: PcapMagicPcapCollectionCreatePcapRequestParams.SjCkNizoPcapsRequestSimple.FilterV1; } - export namespace G2LPwcp9PcapsRequestSimple { + export namespace SjCkNizoPcapsRequestSimple { /** * The packet capture filter. When this field is empty, all packets are captured. */ @@ -679,7 +679,7 @@ export namespace PcapMagicPcapCollectionCreatePcapRequestParams { } } - export interface G2LPwcp9PcapsRequestFull { + export interface SjCkNizoPcapsRequestFull { /** * The name of the data center used for the packet capture. This can be a specific * colo (ord02) or a multi-colo name (ORD). This field only applies to `full` @@ -717,7 +717,7 @@ export namespace PcapMagicPcapCollectionCreatePcapRequestParams { /** * The packet capture filter. When this field is empty, all packets are captured. */ - filter_v1?: PcapMagicPcapCollectionCreatePcapRequestParams.G2LPwcp9PcapsRequestFull.FilterV1; + filter_v1?: PcapMagicPcapCollectionCreatePcapRequestParams.SjCkNizoPcapsRequestFull.FilterV1; /** * The limit of packets contained in a packet capture. @@ -725,7 +725,7 @@ export namespace PcapMagicPcapCollectionCreatePcapRequestParams { packet_limit?: number; } - export namespace G2LPwcp9PcapsRequestFull { + export namespace SjCkNizoPcapsRequestFull { /** * The packet capture filter. When this field is empty, all packets are captured. */ diff --git a/src/resources/purge-caches.ts b/src/resources/purge-caches.ts index 33b11dc42a..01089f7a63 100644 --- a/src/resources/purge-caches.ts +++ b/src/resources/purge-caches.ts @@ -56,12 +56,12 @@ export interface PurgeCachZonePurgeResponse { } export type PurgeCachZonePurgeParams = - | PurgeCachZonePurgeParams.N9GwanY5Flex - | PurgeCachZonePurgeParams.N9GwanY5Everything - | PurgeCachZonePurgeParams.N9GwanY5Files; + | PurgeCachZonePurgeParams.GmuAcovcFlex + | PurgeCachZonePurgeParams.GmuAcovcEverything + | PurgeCachZonePurgeParams.GmuAcovcFiles; export namespace PurgeCachZonePurgeParams { - export interface N9GwanY5Flex { + export interface GmuAcovcFlex { hosts?: Array; prefixes?: Array; @@ -69,16 +69,16 @@ export namespace PurgeCachZonePurgeParams { tags?: Array; } - export interface N9GwanY5Everything { + export interface GmuAcovcEverything { purge_everything?: boolean; } - export interface N9GwanY5Files { - files?: Array; + export interface GmuAcovcFiles { + files?: Array; } - export namespace N9GwanY5Files { - export interface N9GwanY5URLAndHeaders { + export namespace GmuAcovcFiles { + export interface GmuAcovcURLAndHeaders { headers?: unknown; url?: string; diff --git a/src/resources/users/audit-logs.ts b/src/resources/users/audit-logs.ts index e05dc666ea..c29f73c4e1 100644 --- a/src/resources/users/audit-logs.ts +++ b/src/resources/users/audit-logs.ts @@ -25,7 +25,7 @@ export class AuditLogs extends APIResource { export type AuditLogListResponse = | AuditLogListResponse.UnionMember0 - | AuditLogListResponse.HfiuwHe4APIResponseCommon; + | AuditLogListResponse.ZpUfpni7APIResponseCommon; export namespace AuditLogListResponse { export interface UnionMember0 { @@ -137,10 +137,10 @@ export namespace AuditLogListResponse { } } - export interface HfiuwHe4APIResponseCommon { - errors: Array; + export interface ZpUfpni7APIResponseCommon { + errors: Array; - messages: Array; + messages: Array; result: unknown | Array | string; @@ -150,7 +150,7 @@ export namespace AuditLogListResponse { success: true; } - export namespace HfiuwHe4APIResponseCommon { + export namespace ZpUfpni7APIResponseCommon { export interface Error { code: number; diff --git a/tests/api-resources/intel/sinkholes.test.ts b/tests/api-resources/intel/sinkholes.test.ts deleted file mode 100644 index c312bb99a2..0000000000 --- a/tests/api-resources/intel/sinkholes.test.ts +++ /dev/null @@ -1,36 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -import Cloudflare from 'cloudflare'; -import { Response } from 'node-fetch'; - -const cloudflare = new Cloudflare({ - apiKey: '144c9defac04969c7bfad8efaa8ea194', - apiEmail: 'dev@cloudflare.com', - apiToken: 'Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY', - userServiceKey: 'My User Service Key', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); - -describe('resource sinkholes', () => { - // skipped: tests are disabled for the time being - test.skip('list', async () => { - const responsePromise = cloudflare.intel.sinkholes.list('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); - }); - - // skipped: tests are disabled for the time being - test.skip('list: 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( - cloudflare.intel.sinkholes.list('023e105f4ecef8ad9ca31a8372d0c353', { - path: '/_stainless_unknown_path', - }), - ).rejects.toThrow(Cloudflare.NotFoundError); - }); -});