From 3772e495c9aa287782fea3f9c0b34470d888152c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 4 Apr 2025 03:56:31 +0000 Subject: [PATCH] chore(internal): force response_info model generation --- .stats.yml | 4 +- .../addressing/address-maps/accounts.ts | 33 ++----------- .../addressing/address-maps/address-maps.ts | 17 ++----- src/resources/addressing/address-maps/ips.ts | 33 ++----------- .../addressing/address-maps/zones.ts | 33 ++----------- src/resources/addressing/prefixes/prefixes.ts | 17 ++----- .../addressing/prefixes/service-bindings.ts | 19 ++------ .../regional-hostnames/regional-hostnames.ts | 19 ++------ .../alerting/destinations/pagerduty.ts | 17 ++----- .../alerting/destinations/webhooks.ts | 17 ++----- src/resources/alerting/policies.ts | 17 ++----- .../api-gateway/user-schemas/user-schemas.ts | 11 +---- .../cloudforce-one/requests/assets.ts | 19 ++------ .../cloudforce-one/requests/message.ts | 19 ++------ .../cloudforce-one/requests/priority.ts | 19 ++------ .../cloudforce-one/requests/requests.ts | 23 ++-------- src/resources/email-routing/dns.ts | 33 ++----------- .../firewall/waf/packages/packages.ts | 19 ++------ .../intel/attack-surface-report/issues.ts | 19 ++------ src/resources/intel/miscategorizations.ts | 19 ++------ src/resources/queues/consumers.ts | 11 +---- src/resources/queues/queues.ts | 11 +---- .../security-center/insights/insights.ts | 19 ++------ src/resources/security-txt.ts | 37 ++------------- src/resources/shared.ts | 46 ++----------------- src/resources/snippets/rules.ts | 19 ++------ src/resources/snippets/snippets.ts | 19 ++------ src/resources/workers/routes.ts | 37 ++------------- src/resources/workers/scripts/tail.ts | 19 ++------ src/resources/zones/custom-nameservers.ts | 17 ++----- 30 files changed, 101 insertions(+), 541 deletions(-) diff --git a/.stats.yml b/.stats.yml index 8cb8f07c14..30596d343f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1681 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-22aa409339ba3ba4e61a86e7e94dc5a66082c5c20615d1d30e3b9499d6407e31.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1631516c1ab92e01a11fe60f3a9e07ae129cb32efb9e00e2e299d14e854be8d2.yml openapi_spec_hash: e5eb84a55caa82c6dfdc82b7fbe3e8aa -config_hash: c75cf62f6533a283ef6d0a7a6d7e0f9b +config_hash: c8334e5acd4d2d6cdcb6203f2b2235bd diff --git a/src/resources/addressing/address-maps/accounts.ts b/src/resources/addressing/address-maps/accounts.ts index 0f7b110fbf..589190d231 100644 --- a/src/resources/addressing/address-maps/accounts.ts +++ b/src/resources/addressing/address-maps/accounts.ts @@ -2,6 +2,7 @@ import { APIResource } from '../../../resource'; import * as Core from '../../../core'; +import * as Shared from '../../shared'; export class Accounts extends APIResource { /** @@ -36,9 +37,9 @@ export class Accounts extends APIResource { } export interface AccountUpdateResponse { - errors: Array; + errors: Array; - messages: Array; + messages: Array; /** * Whether the API call was successful @@ -49,18 +50,6 @@ export interface AccountUpdateResponse { } export namespace AccountUpdateResponse { - export interface Error { - code: number; - - message: string; - } - - export interface Message { - code: number; - - message: string; - } - export interface ResultInfo { /** * Total number of results for the requested service @@ -85,9 +74,9 @@ export namespace AccountUpdateResponse { } export interface AccountDeleteResponse { - errors: Array; + errors: Array; - messages: Array; + messages: Array; /** * Whether the API call was successful @@ -98,18 +87,6 @@ export interface AccountDeleteResponse { } export namespace AccountDeleteResponse { - export interface Error { - code: number; - - message: string; - } - - export interface Message { - code: number; - - message: string; - } - export interface ResultInfo { /** * Total number of results for the requested service diff --git a/src/resources/addressing/address-maps/address-maps.ts b/src/resources/addressing/address-maps/address-maps.ts index b2932f90d3..c179e49a71 100644 --- a/src/resources/addressing/address-maps/address-maps.ts +++ b/src/resources/addressing/address-maps/address-maps.ts @@ -3,6 +3,7 @@ import { APIResource } from '../../../resource'; import * as Core from '../../../core'; import * as AddressMapsAPI from './address-maps'; +import * as Shared from '../../shared'; import * as AccountsAPI from './accounts'; import { AccountDeleteParams, @@ -243,9 +244,9 @@ export namespace AddressMapCreateResponse { } export interface AddressMapDeleteResponse { - errors: Array; + errors: Array; - messages: Array; + messages: Array; /** * Whether the API call was successful @@ -256,18 +257,6 @@ export interface AddressMapDeleteResponse { } export namespace AddressMapDeleteResponse { - export interface Error { - code: number; - - message: string; - } - - export interface Message { - code: number; - - message: string; - } - export interface ResultInfo { /** * Total number of results for the requested service diff --git a/src/resources/addressing/address-maps/ips.ts b/src/resources/addressing/address-maps/ips.ts index 12fca0ee22..b68855f9bb 100644 --- a/src/resources/addressing/address-maps/ips.ts +++ b/src/resources/addressing/address-maps/ips.ts @@ -2,6 +2,7 @@ import { APIResource } from '../../../resource'; import * as Core from '../../../core'; +import * as Shared from '../../shared'; export class IPs extends APIResource { /** @@ -38,9 +39,9 @@ export class IPs extends APIResource { } export interface IPUpdateResponse { - errors: Array; + errors: Array; - messages: Array; + messages: Array; /** * Whether the API call was successful @@ -51,18 +52,6 @@ export interface IPUpdateResponse { } export namespace IPUpdateResponse { - export interface Error { - code: number; - - message: string; - } - - export interface Message { - code: number; - - message: string; - } - export interface ResultInfo { /** * Total number of results for the requested service @@ -87,9 +76,9 @@ export namespace IPUpdateResponse { } export interface IPDeleteResponse { - errors: Array; + errors: Array; - messages: Array; + messages: Array; /** * Whether the API call was successful @@ -100,18 +89,6 @@ export interface IPDeleteResponse { } export namespace IPDeleteResponse { - export interface Error { - code: number; - - message: string; - } - - export interface Message { - code: number; - - message: string; - } - export interface ResultInfo { /** * Total number of results for the requested service diff --git a/src/resources/addressing/address-maps/zones.ts b/src/resources/addressing/address-maps/zones.ts index ec052261d7..263fc1ee81 100644 --- a/src/resources/addressing/address-maps/zones.ts +++ b/src/resources/addressing/address-maps/zones.ts @@ -2,6 +2,7 @@ import { APIResource } from '../../../resource'; import * as Core from '../../../core'; +import * as Shared from '../../shared'; export class Zones extends APIResource { /** @@ -36,9 +37,9 @@ export class Zones extends APIResource { } export interface ZoneUpdateResponse { - errors: Array; + errors: Array; - messages: Array; + messages: Array; /** * Whether the API call was successful @@ -49,18 +50,6 @@ export interface ZoneUpdateResponse { } export namespace ZoneUpdateResponse { - export interface Error { - code: number; - - message: string; - } - - export interface Message { - code: number; - - message: string; - } - export interface ResultInfo { /** * Total number of results for the requested service @@ -85,9 +74,9 @@ export namespace ZoneUpdateResponse { } export interface ZoneDeleteResponse { - errors: Array; + errors: Array; - messages: Array; + messages: Array; /** * Whether the API call was successful @@ -98,18 +87,6 @@ export interface ZoneDeleteResponse { } export namespace ZoneDeleteResponse { - export interface Error { - code: number; - - message: string; - } - - export interface Message { - code: number; - - message: string; - } - export interface ResultInfo { /** * Total number of results for the requested service diff --git a/src/resources/addressing/prefixes/prefixes.ts b/src/resources/addressing/prefixes/prefixes.ts index 706dad6785..e3389f7360 100644 --- a/src/resources/addressing/prefixes/prefixes.ts +++ b/src/resources/addressing/prefixes/prefixes.ts @@ -2,6 +2,7 @@ import { APIResource } from '../../../resource'; import * as Core from '../../../core'; +import * as Shared from '../../shared'; import * as AdvertisementStatusAPI from './advertisement-status'; import { AdvertisementStatus, @@ -184,9 +185,9 @@ export interface Prefix { } export interface PrefixDeleteResponse { - errors: Array; + errors: Array; - messages: Array; + messages: Array; /** * Whether the API call was successful @@ -197,18 +198,6 @@ export interface PrefixDeleteResponse { } export namespace PrefixDeleteResponse { - export interface Error { - code: number; - - message: string; - } - - export interface Message { - code: number; - - message: string; - } - export interface ResultInfo { /** * Total number of results for the requested service diff --git a/src/resources/addressing/prefixes/service-bindings.ts b/src/resources/addressing/prefixes/service-bindings.ts index 3cdd9008b2..74a046d4e9 100644 --- a/src/resources/addressing/prefixes/service-bindings.ts +++ b/src/resources/addressing/prefixes/service-bindings.ts @@ -2,6 +2,7 @@ import { APIResource } from '../../../resource'; import * as Core from '../../../core'; +import * as Shared from '../../shared'; import { SinglePage } from '../../../pagination'; export class ServiceBindings extends APIResource { @@ -126,9 +127,9 @@ export namespace ServiceBinding { } export interface ServiceBindingDeleteResponse { - errors: Array; + errors: Array; - messages: Array; + messages: Array; /** * Whether the API call was successful @@ -136,20 +137,6 @@ export interface ServiceBindingDeleteResponse { success: true; } -export namespace ServiceBindingDeleteResponse { - export interface Error { - code: number; - - message: string; - } - - export interface Message { - code: number; - - message: string; - } -} - export interface ServiceBindingCreateParams { /** * Path param: Identifier of a Cloudflare account. diff --git a/src/resources/addressing/regional-hostnames/regional-hostnames.ts b/src/resources/addressing/regional-hostnames/regional-hostnames.ts index 988bd4eb27..3c3b0c2162 100644 --- a/src/resources/addressing/regional-hostnames/regional-hostnames.ts +++ b/src/resources/addressing/regional-hostnames/regional-hostnames.ts @@ -2,6 +2,7 @@ import { APIResource } from '../../../resource'; import * as Core from '../../../core'; +import * as Shared from '../../shared'; import * as RegionsAPI from './regions'; import { RegionListParams, RegionListResponse, RegionListResponsesSinglePage, Regions } from './regions'; import { SinglePage } from '../../../pagination'; @@ -130,9 +131,9 @@ export interface RegionalHostnameListResponse { } export interface RegionalHostnameDeleteResponse { - errors: Array; + errors: Array; - messages: Array; + messages: Array; /** * Whether the API call was successful @@ -140,20 +141,6 @@ export interface RegionalHostnameDeleteResponse { success: true; } -export namespace RegionalHostnameDeleteResponse { - export interface Error { - code: number; - - message: string; - } - - export interface Message { - code: number; - - message: string; - } -} - export interface RegionalHostnameEditResponse { /** * When the regional hostname was created diff --git a/src/resources/alerting/destinations/pagerduty.ts b/src/resources/alerting/destinations/pagerduty.ts index 2f34a7c8fb..d229984140 100644 --- a/src/resources/alerting/destinations/pagerduty.ts +++ b/src/resources/alerting/destinations/pagerduty.ts @@ -2,6 +2,7 @@ import { APIResource } from '../../../resource'; import * as Core from '../../../core'; +import * as Shared from '../../shared'; import { SinglePage } from '../../../pagination'; export class PagerdutyResource extends APIResource { @@ -87,9 +88,9 @@ export interface PagerdutyCreateResponse { } export interface PagerdutyDeleteResponse { - errors: Array; + errors: Array; - messages: Array; + messages: Array; /** * Whether the API call was successful @@ -100,18 +101,6 @@ export interface PagerdutyDeleteResponse { } export namespace PagerdutyDeleteResponse { - export interface Error { - code: number; - - message: string; - } - - export interface Message { - code: number; - - message: string; - } - export interface ResultInfo { /** * Total number of results for the requested service diff --git a/src/resources/alerting/destinations/webhooks.ts b/src/resources/alerting/destinations/webhooks.ts index 429f38f0c6..eebca4e092 100644 --- a/src/resources/alerting/destinations/webhooks.ts +++ b/src/resources/alerting/destinations/webhooks.ts @@ -2,6 +2,7 @@ import { APIResource } from '../../../resource'; import * as Core from '../../../core'; +import * as Shared from '../../shared'; import { SinglePage } from '../../../pagination'; export class Webhooks extends APIResource { @@ -136,9 +137,9 @@ export interface WebhookUpdateResponse { } export interface WebhookDeleteResponse { - errors: Array; + errors: Array; - messages: Array; + messages: Array; /** * Whether the API call was successful @@ -149,18 +150,6 @@ export interface WebhookDeleteResponse { } export namespace WebhookDeleteResponse { - export interface Error { - code: number; - - message: string; - } - - export interface Message { - code: number; - - message: string; - } - export interface ResultInfo { /** * Total number of results for the requested service diff --git a/src/resources/alerting/policies.ts b/src/resources/alerting/policies.ts index 9816c99b2d..e209fcaad1 100644 --- a/src/resources/alerting/policies.ts +++ b/src/resources/alerting/policies.ts @@ -2,6 +2,7 @@ import { APIResource } from '../../resource'; import * as Core from '../../core'; +import * as Shared from '../shared'; import { SinglePage } from '../../pagination'; export class Policies extends APIResource { @@ -718,9 +719,9 @@ export interface PolicyUpdateResponse { } export interface PolicyDeleteResponse { - errors: Array; + errors: Array; - messages: Array; + messages: Array; /** * Whether the API call was successful @@ -731,18 +732,6 @@ export interface PolicyDeleteResponse { } export namespace PolicyDeleteResponse { - export interface Error { - code: number; - - message: string; - } - - export interface Message { - code: number; - - message: string; - } - export interface ResultInfo { /** * Total number of results for the requested service diff --git a/src/resources/api-gateway/user-schemas/user-schemas.ts b/src/resources/api-gateway/user-schemas/user-schemas.ts index 86dd56074b..efec1bd24d 100644 --- a/src/resources/api-gateway/user-schemas/user-schemas.ts +++ b/src/resources/api-gateway/user-schemas/user-schemas.ts @@ -2,6 +2,7 @@ import { APIResource } from '../../../resource'; import * as Core from '../../../core'; +import * as Shared from '../../shared'; import * as HostsAPI from './hosts'; import { HostListParams, HostListResponse, HostListResponsesV4PagePaginationArray, Hosts } from './hosts'; import * as OperationsAPI from './operations'; @@ -94,15 +95,7 @@ export class UserSchemas extends APIResource { export class PublicSchemasV4PagePaginationArray extends V4PagePaginationArray {} -export type Message = Array; - -export namespace Message { - export interface MessageItem { - code: number; - - message: string; - } -} +export type Message = Array; export interface PublicSchema { created_at: string; diff --git a/src/resources/cloudforce-one/requests/assets.ts b/src/resources/cloudforce-one/requests/assets.ts index 859223ba58..5f8f861a0d 100644 --- a/src/resources/cloudforce-one/requests/assets.ts +++ b/src/resources/cloudforce-one/requests/assets.ts @@ -2,6 +2,7 @@ import { APIResource } from '../../../resource'; import * as Core from '../../../core'; +import * as Shared from '../../shared'; import { SinglePage } from '../../../pagination'; export class Assets extends APIResource { @@ -130,9 +131,9 @@ export interface AssetUpdateResponse { } export interface AssetDeleteResponse { - errors: Array; + errors: Array; - messages: Array; + messages: Array; /** * Whether the API call was successful @@ -140,20 +141,6 @@ export interface AssetDeleteResponse { success: true; } -export namespace AssetDeleteResponse { - export interface Error { - code: number; - - message: string; - } - - export interface Message { - code: number; - - message: string; - } -} - export interface AssetGetResponse { /** * Asset ID diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index 65cd840cab..9f26c9d4fa 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -2,6 +2,7 @@ import { APIResource } from '../../../resource'; import * as Core from '../../../core'; +import * as Shared from '../../shared'; import { SinglePage } from '../../../pagination'; export class MessageResource extends APIResource { @@ -107,9 +108,9 @@ export interface Message { } export interface MessageDeleteResponse { - errors: Array; + errors: Array; - messages: Array; + messages: Array; /** * Whether the API call was successful @@ -117,20 +118,6 @@ export interface MessageDeleteResponse { success: true; } -export namespace MessageDeleteResponse { - export interface Error { - code: number; - - message: string; - } - - export interface Message { - code: number; - - message: string; - } -} - export interface MessageCreateParams { /** * Content of message diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index e098af25be..23e56fb99d 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -2,6 +2,7 @@ import { APIResource } from '../../../resource'; import * as Core from '../../../core'; +import * as Shared from '../../shared'; import * as RequestsAPI from './requests'; export class PriorityResource extends APIResource { @@ -145,9 +146,9 @@ export interface PriorityEdit { } export interface PriorityDeleteResponse { - errors: Array; + errors: Array; - messages: Array; + messages: Array; /** * Whether the API call was successful @@ -155,20 +156,6 @@ export interface PriorityDeleteResponse { success: true; } -export namespace PriorityDeleteResponse { - export interface Error { - code: number; - - message: string; - } - - export interface Message { - code: number; - - message: string; - } -} - export interface PriorityCreateParams { /** * List of labels diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index 6c0fa4ed07..ae54f02329 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -2,6 +2,7 @@ import { APIResource } from '../../../resource'; import * as Core from '../../../core'; +import * as Shared from '../../shared'; import * as AssetsAPI from './assets'; import { AssetCreateParams, @@ -16,7 +17,7 @@ import { } from './assets'; import * as MessageAPI from './message'; import { - Message as MessageAPIMessage, + Message, MessageCreateParams, MessageDeleteResponse, MessageGetParams, @@ -313,9 +314,9 @@ export interface RequestConstants { export type RequestTypes = Array; export interface RequestDeleteResponse { - errors: Array; + errors: Array; - messages: Array; + messages: Array; /** * Whether the API call was successful @@ -323,20 +324,6 @@ export interface RequestDeleteResponse { success: true; } -export namespace RequestDeleteResponse { - export interface Error { - code: number; - - message: string; - } - - export interface Message { - code: number; - - message: string; - } -} - /** * Request Types */ @@ -475,7 +462,7 @@ export declare namespace Requests { export { MessageResource as MessageResource, - type MessageAPIMessage as Message, + type Message as Message, type MessageDeleteResponse as MessageDeleteResponse, MessagesSinglePage as MessagesSinglePage, type MessageCreateParams as MessageCreateParams, diff --git a/src/resources/email-routing/dns.ts b/src/resources/email-routing/dns.ts index 8fb7382303..1a1035d4cd 100644 --- a/src/resources/email-routing/dns.ts +++ b/src/resources/email-routing/dns.ts @@ -3,6 +3,7 @@ import { APIResource } from '../../resource'; import * as Core from '../../core'; import * as DNSAPI from './dns'; +import * as Shared from '../shared'; import * as EmailRoutingAPI from './email-routing'; import { SinglePage } from '../../pagination'; @@ -113,9 +114,9 @@ export type DNSGetResponse = export namespace DNSGetResponse { export interface EmailEmailRoutingDNSQueryResponse { - errors: Array; + errors: Array; - messages: Array; + messages: Array; /** * Whether the API call was successful @@ -128,18 +129,6 @@ export namespace DNSGetResponse { } export namespace EmailEmailRoutingDNSQueryResponse { - export interface Error { - code: number; - - message: string; - } - - export interface Message { - code: number; - - message: string; - } - export interface Result { errors?: Array; @@ -181,9 +170,9 @@ export namespace DNSGetResponse { } export interface EmailDNSSettingsResponseCollection { - errors: Array; + errors: Array; - messages: Array; + messages: Array; /** * Whether the API call was successful @@ -196,18 +185,6 @@ export namespace DNSGetResponse { } export namespace EmailDNSSettingsResponseCollection { - export interface Error { - code: number; - - message: string; - } - - export interface Message { - code: number; - - message: string; - } - export interface ResultInfo { /** * Total number of results for the requested service diff --git a/src/resources/firewall/waf/packages/packages.ts b/src/resources/firewall/waf/packages/packages.ts index 5c696d6d51..bab75abe14 100644 --- a/src/resources/firewall/waf/packages/packages.ts +++ b/src/resources/firewall/waf/packages/packages.ts @@ -2,6 +2,7 @@ import { APIResource } from '../../../../resource'; import * as Core from '../../../../core'; +import * as Shared from '../../../shared'; import * as GroupsAPI from './groups'; import { Group, @@ -74,9 +75,9 @@ export type PackageGetResponse = PackageGetResponse.FirewallAPIResponseSingle | export namespace PackageGetResponse { export interface FirewallAPIResponseSingle { - errors: Array; + errors: Array; - messages: Array; + messages: Array; result: unknown | string | null; @@ -86,20 +87,6 @@ export namespace PackageGetResponse { success: true; } - export namespace FirewallAPIResponseSingle { - export interface Error { - code: number; - - message: string; - } - - export interface Message { - code: number; - - message: string; - } - } - export interface Result { result?: unknown; } diff --git a/src/resources/intel/attack-surface-report/issues.ts b/src/resources/intel/attack-surface-report/issues.ts index 482b1c2397..5e8e241f83 100644 --- a/src/resources/intel/attack-surface-report/issues.ts +++ b/src/resources/intel/attack-surface-report/issues.ts @@ -3,6 +3,7 @@ import { APIResource } from '../../../resource'; import * as Core from '../../../core'; import * as IssuesAPI from './issues'; +import * as Shared from '../../shared'; import { V4PagePagination, type V4PagePaginationParams } from '../../../pagination'; export class Issues extends APIResource { @@ -155,9 +156,9 @@ export namespace IssueClassResponse { } export interface IssueDismissResponse { - errors: Array; + errors: Array; - messages: Array; + messages: Array; /** * Whether the API call was successful @@ -165,20 +166,6 @@ export interface IssueDismissResponse { success: true; } -export namespace IssueDismissResponse { - export interface Error { - code: number; - - message: string; - } - - export interface Message { - code: number; - - message: string; - } -} - export type IssueSeverityResponse = Array; export namespace IssueSeverityResponse { diff --git a/src/resources/intel/miscategorizations.ts b/src/resources/intel/miscategorizations.ts index b02da8eeb2..077bfb7a0e 100644 --- a/src/resources/intel/miscategorizations.ts +++ b/src/resources/intel/miscategorizations.ts @@ -2,6 +2,7 @@ import { APIResource } from '../../resource'; import * as Core from '../../core'; +import * as Shared from '../shared'; export class Miscategorizations extends APIResource { /** @@ -17,9 +18,9 @@ export class Miscategorizations extends APIResource { } export interface MiscategorizationCreateResponse { - errors: Array; + errors: Array; - messages: Array; + messages: Array; /** * Whether the API call was successful @@ -27,20 +28,6 @@ export interface MiscategorizationCreateResponse { success: true; } -export namespace MiscategorizationCreateResponse { - export interface Error { - code: number; - - message: string; - } - - export interface Message { - code: number; - - message: string; - } -} - export interface MiscategorizationCreateParams { /** * Path param: Identifier diff --git a/src/resources/queues/consumers.ts b/src/resources/queues/consumers.ts index 202d30d264..7fe0776d57 100644 --- a/src/resources/queues/consumers.ts +++ b/src/resources/queues/consumers.ts @@ -2,6 +2,7 @@ import { APIResource } from '../../resource'; import * as Core from '../../core'; +import * as Shared from '../shared'; import { SinglePage } from '../../pagination'; export class Consumers extends APIResource { @@ -176,7 +177,7 @@ export namespace Consumer { } export interface ConsumerDeleteResponse { - errors?: Array; + errors?: Array; messages?: Array; @@ -186,14 +187,6 @@ export interface ConsumerDeleteResponse { success?: true; } -export namespace ConsumerDeleteResponse { - export interface Error { - code: number; - - message: string; - } -} - export type ConsumerCreateParams = | ConsumerCreateParams.MqWorkerConsumer | ConsumerCreateParams.MqHTTPConsumer; diff --git a/src/resources/queues/queues.ts b/src/resources/queues/queues.ts index 9f71ad890b..851d66a154 100644 --- a/src/resources/queues/queues.ts +++ b/src/resources/queues/queues.ts @@ -2,6 +2,7 @@ import { APIResource } from '../../resource'; import * as Core from '../../core'; +import * as Shared from '../shared'; import * as ConsumersAPI from './consumers'; import { Consumer, @@ -157,7 +158,7 @@ export namespace Queue { } export interface QueueDeleteResponse { - errors?: Array; + errors?: Array; messages?: Array; @@ -167,14 +168,6 @@ export interface QueueDeleteResponse { success?: true; } -export namespace QueueDeleteResponse { - export interface Error { - code: number; - - message: string; - } -} - export interface QueueCreateParams { /** * Path param: A Resource identifier. diff --git a/src/resources/security-center/insights/insights.ts b/src/resources/security-center/insights/insights.ts index d9cb410887..ab6294b666 100644 --- a/src/resources/security-center/insights/insights.ts +++ b/src/resources/security-center/insights/insights.ts @@ -3,6 +3,7 @@ import { APIResource } from '../../../resource'; import { isRequestOptions } from '../../../core'; import * as Core from '../../../core'; +import * as Shared from '../../shared'; import * as IssuesAPI from '../../intel/attack-surface-report/issues'; import * as ClassAPI from './class'; import { Class, ClassGetParams, ClassGetResponse } from './class'; @@ -139,9 +140,9 @@ export namespace InsightListResponse { } export interface InsightDismissResponse { - errors: Array; + errors: Array; - messages: Array; + messages: Array; /** * Whether the API call was successful @@ -149,20 +150,6 @@ export interface InsightDismissResponse { success: true; } -export namespace InsightDismissResponse { - export interface Error { - code: number; - - message: string; - } - - export interface Message { - code: number; - - message: string; - } -} - export interface InsightListParams extends V4PagePaginationParams { /** * Path param: The Account ID to use for this endpoint. Mutually exclusive with the diff --git a/src/resources/security-txt.ts b/src/resources/security-txt.ts index febfc43d5d..0b9cacc8e7 100644 --- a/src/resources/security-txt.ts +++ b/src/resources/security-txt.ts @@ -2,6 +2,7 @@ import { APIResource } from '../resource'; import * as Core from '../core'; +import * as Shared from './shared'; export class SecurityTXT extends APIResource { /** @@ -40,9 +41,9 @@ export class SecurityTXT extends APIResource { } export interface SecurityTXTUpdateResponse { - errors: Array; + errors: Array; - messages: Array; + messages: Array; /** * Whether the API call was successful @@ -50,24 +51,10 @@ export interface SecurityTXTUpdateResponse { success: true; } -export namespace SecurityTXTUpdateResponse { - export interface Error { - code: number; - - message: string; - } - - export interface Message { - code: number; - - message: string; - } -} - export interface SecurityTXTDeleteResponse { - errors: Array; + errors: Array; - messages: Array; + messages: Array; /** * Whether the API call was successful @@ -75,20 +62,6 @@ export interface SecurityTXTDeleteResponse { success: true; } -export namespace SecurityTXTDeleteResponse { - export interface Error { - code: number; - - message: string; - } - - export interface Message { - code: number; - - message: string; - } -} - export interface SecurityTXTGetResponse { acknowledgments?: Array; diff --git a/src/resources/shared.ts b/src/resources/shared.ts index df4aca26c1..b848f4747f 100644 --- a/src/resources/shared.ts +++ b/src/resources/shared.ts @@ -599,69 +599,31 @@ export interface ResponseInfo { code: number; message: string; - - documentation_url?: string; - - source?: ResponseInfo.Source; -} - -export namespace ResponseInfo { - export interface Source { - pointer?: string; - } } export type Result = Result.UnionMember0 | Result.AaaAPIResponseCommon; export namespace Result { export interface UnionMember0 { - errors?: Array; + errors?: Array; - messages?: Array; + messages?: Array; result?: Array; success?: boolean; } - export namespace UnionMember0 { - export interface Error { - code: number; - - message: string; - } - - export interface Message { - code: number; - - message: string; - } - } - export interface AaaAPIResponseCommon { - errors: Array; + errors: Array; - messages: Array; + messages: Array; /** * Whether the API call was successful */ success: true; } - - export namespace AaaAPIResponseCommon { - export interface Error { - code: number; - - message: string; - } - - export interface Message { - code: number; - - message: string; - } - } } export interface Role { diff --git a/src/resources/snippets/rules.ts b/src/resources/snippets/rules.ts index 08c14c37fd..3155606849 100644 --- a/src/resources/snippets/rules.ts +++ b/src/resources/snippets/rules.ts @@ -2,6 +2,7 @@ import { APIResource } from '../../resource'; import * as Core from '../../core'; +import * as Shared from '../shared'; import { SinglePage } from '../../pagination'; export class Rules extends APIResource { @@ -75,9 +76,9 @@ export interface RuleListResponse { } export interface RuleDeleteResponse { - errors: Array; + errors: Array; - messages: Array; + messages: Array; /** * Whether the API call was successful @@ -85,20 +86,6 @@ export interface RuleDeleteResponse { success: true; } -export namespace RuleDeleteResponse { - export interface Error { - code: number; - - message: string; - } - - export interface Message { - code: number; - - message: string; - } -} - export interface RuleUpdateParams { /** * Path param: Identifier diff --git a/src/resources/snippets/snippets.ts b/src/resources/snippets/snippets.ts index 69adb5bbd6..56654850fb 100644 --- a/src/resources/snippets/snippets.ts +++ b/src/resources/snippets/snippets.ts @@ -2,6 +2,7 @@ import { APIResource } from '../../resource'; import * as Core from '../../core'; +import * as Shared from '../shared'; import * as ContentAPI from './content'; import { Content, ContentGetParams } from './content'; import * as RulesAPI from './rules'; @@ -102,9 +103,9 @@ export interface Snippet { } export interface SnippetDeleteResponse { - errors: Array; + errors: Array; - messages: Array; + messages: Array; /** * Whether the API call was successful @@ -112,20 +113,6 @@ export interface SnippetDeleteResponse { success: true; } -export namespace SnippetDeleteResponse { - export interface Error { - code: number; - - message: string; - } - - export interface Message { - code: number; - - message: string; - } -} - export interface SnippetUpdateParams { /** * Path param: Identifier diff --git a/src/resources/workers/routes.ts b/src/resources/workers/routes.ts index 71c4f63e8a..a4c38199a7 100644 --- a/src/resources/workers/routes.ts +++ b/src/resources/workers/routes.ts @@ -2,6 +2,7 @@ import { APIResource } from '../../resource'; import * as Core from '../../core'; +import * as Shared from '../shared'; import { SinglePage } from '../../pagination'; export class Routes extends APIResource { @@ -73,9 +74,9 @@ export class Routes extends APIResource { export class RouteListResponsesSinglePage extends SinglePage {} export interface RouteCreateResponse { - errors: Array; + errors: Array; - messages: Array; + messages: Array; /** * Whether the API call was successful @@ -83,20 +84,6 @@ export interface RouteCreateResponse { success: true; } -export namespace RouteCreateResponse { - export interface Error { - code: number; - - message: string; - } - - export interface Message { - code: number; - - message: string; - } -} - export interface RouteUpdateResponse { /** * Identifier @@ -126,9 +113,9 @@ export interface RouteListResponse { } export interface RouteDeleteResponse { - errors: Array; + errors: Array; - messages: Array; + messages: Array; /** * Whether the API call was successful @@ -136,20 +123,6 @@ export interface RouteDeleteResponse { success: true; } -export namespace RouteDeleteResponse { - export interface Error { - code: number; - - message: string; - } - - export interface Message { - code: number; - - message: string; - } -} - export interface RouteGetResponse { /** * Identifier diff --git a/src/resources/workers/scripts/tail.ts b/src/resources/workers/scripts/tail.ts index d83da3a13e..c6e2dc41f2 100644 --- a/src/resources/workers/scripts/tail.ts +++ b/src/resources/workers/scripts/tail.ts @@ -2,6 +2,7 @@ import { APIResource } from '../../../resource'; import * as Core from '../../../core'; +import * as Shared from '../../shared'; export class Tail extends APIResource { /** @@ -101,9 +102,9 @@ export interface TailCreateResponse { } export interface TailDeleteResponse { - errors: Array; + errors: Array; - messages: Array; + messages: Array; /** * Whether the API call was successful @@ -111,20 +112,6 @@ export interface TailDeleteResponse { success: true; } -export namespace TailDeleteResponse { - export interface Error { - code: number; - - message: string; - } - - export interface Message { - code: number; - - message: string; - } -} - export interface TailGetResponse { id?: string; diff --git a/src/resources/zones/custom-nameservers.ts b/src/resources/zones/custom-nameservers.ts index 5be6539019..a24f5a3e4a 100644 --- a/src/resources/zones/custom-nameservers.ts +++ b/src/resources/zones/custom-nameservers.ts @@ -2,6 +2,7 @@ import { APIResource } from '../../resource'; import * as Core from '../../core'; +import * as Shared from '../shared'; import { SinglePage } from '../../pagination'; /** @@ -57,9 +58,9 @@ export class CustomNameserverUpdateResponsesSinglePage extends SinglePage; + errors: Array; - messages: Array; + messages: Array; /** * Whether the API call was successful @@ -80,18 +81,6 @@ export interface CustomNameserverGetResponse { } export namespace CustomNameserverGetResponse { - export interface Error { - code: number; - - message: string; - } - - export interface Message { - code: number; - - message: string; - } - export interface ResultInfo { /** * Total number of results for the requested service