Skip to content

Commit

Permalink
feat: OpenAPI spec update via Stainless API (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored Feb 16, 2024
1 parent 63656ab commit 36f3d4d
Show file tree
Hide file tree
Showing 10 changed files with 54 additions and 157 deletions.
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
configured_endpoints: 1138
configured_endpoints: 1137
8 changes: 0 additions & 8 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -5286,14 +5286,6 @@ Methods:

## Sinkholes

Types:

- <code><a href="./src/resources/intel/sinkholes.ts">SinkholeListResponse</a></code>

Methods:

- <code title="get /accounts/{account_identifier}/intel/sinkholes">client.intel.sinkholes.<a href="./src/resources/intel/sinkholes.ts">list</a>(accountIdentifier) -> SinkholeListResponse</code>

# Rum

## SiteInfos
Expand Down
10 changes: 5 additions & 5 deletions src/resources/audit-logs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export class AuditLogs extends APIResource {

export type AuditLogAuditLogsGetAccountAuditLogsResponse =
| AuditLogAuditLogsGetAccountAuditLogsResponse.UnionMember0
| AuditLogAuditLogsGetAccountAuditLogsResponse.HfiuwHe4APIResponseCommon;
| AuditLogAuditLogsGetAccountAuditLogsResponse.ZpUfpni7APIResponseCommon;

export namespace AuditLogAuditLogsGetAccountAuditLogsResponse {
export interface UnionMember0 {
Expand Down Expand Up @@ -145,10 +145,10 @@ export namespace AuditLogAuditLogsGetAccountAuditLogsResponse {
}
}

export interface HfiuwHe4APIResponseCommon {
errors: Array<HfiuwHe4APIResponseCommon.Error>;
export interface ZpUfpni7APIResponseCommon {
errors: Array<ZpUfpni7APIResponseCommon.Error>;

messages: Array<HfiuwHe4APIResponseCommon.Message>;
messages: Array<ZpUfpni7APIResponseCommon.Message>;

result: unknown | Array<unknown> | string;

Expand All @@ -158,7 +158,7 @@ export namespace AuditLogAuditLogsGetAccountAuditLogsResponse {
success: true;
}

export namespace HfiuwHe4APIResponseCommon {
export namespace ZpUfpni7APIResponseCommon {
export interface Error {
code: number;

Expand Down
2 changes: 1 addition & 1 deletion src/resources/intel/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

export { IndicatorFeeds } from './indicator-feeds';
export { Intel } from './intel';
export { SinkholeListResponse, Sinkholes } from './sinkholes';
export { Sinkholes } from './sinkholes';
1 change: 0 additions & 1 deletion src/resources/intel/intel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
60 changes: 1 addition & 59 deletions src/resources/intel/sinkholes.ts
Original file line number Diff line number Diff line change
@@ -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<SinkholeListResponse> {
return (
this._client.get(`/accounts/${accountIdentifier}/intel/sinkholes`, options) as Core.APIPromise<{
result: SinkholeListResponse;
}>
)._thenUnwrap((obj) => obj.result);
}
}

export type SinkholeListResponse = Array<SinkholeListResponse.SinkholeListResponseItem>;

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 {}
64 changes: 32 additions & 32 deletions src/resources/pcaps/pcaps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand All @@ -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.
Expand Down Expand Up @@ -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.
*/
Expand Down Expand Up @@ -138,7 +138,7 @@ export namespace PcapGetResponse {
}
}

export interface G2LPwcp9PcapsResponseFull {
export interface SjCkNizoPcapsResponseFull {
/**
* The ID for the packet capture.
*/
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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.
*/
Expand All @@ -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.
Expand Down Expand Up @@ -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.
*/
Expand Down Expand Up @@ -324,7 +324,7 @@ export namespace PcapMagicPcapCollectionCreatePcapRequestResponse {
}
}

export interface G2LPwcp9PcapsResponseFull {
export interface SjCkNizoPcapsResponseFull {
/**
* The ID for the packet capture.
*/
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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.
*/
Expand All @@ -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.
Expand Down Expand Up @@ -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.
*/
Expand Down Expand Up @@ -511,7 +511,7 @@ export namespace PcapMagicPcapCollectionListPacketCaptureRequestsResponse {
}
}

export interface G2LPwcp9PcapsResponseFull {
export interface SjCkNizoPcapsResponseFull {
/**
* The ID for the packet capture.
*/
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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.
*/
Expand All @@ -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.
*/
Expand Down Expand Up @@ -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`
Expand Down Expand Up @@ -717,15 +717,15 @@ 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.
*/
packet_limit?: number;
}

export namespace G2LPwcp9PcapsRequestFull {
export namespace SjCkNizoPcapsRequestFull {
/**
* The packet capture filter. When this field is empty, all packets are captured.
*/
Expand Down
Loading

0 comments on commit 36f3d4d

Please sign in to comment.