diff --git a/.stats.yml b/.stats.yml index baf1304772..d0c74d2b89 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ -configured_endpoints: 1493 +configured_endpoints: 1508 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4d2ad2efc7849cfa1f1205e3d2b513df805aae225cc968df751a60ecd902d1ab.yml diff --git a/api.md b/api.md index 4870cd84e4..6085da10b6 100644 --- a/api.md +++ b/api.md @@ -3485,6 +3485,67 @@ Methods: - client.magicNetworkMonitoring.rules.advertisements.edit(ruleId, { ...params }) -> Advertisement | null +# NetworkInterconnects + +## CNIs + +Types: + +- CNICreateResponse +- CNIUpdateResponse +- CNIListResponse +- CNIGetResponse + +Methods: + +- client.networkInterconnects.cnis.create({ ...params }) -> CNICreateResponse +- client.networkInterconnects.cnis.update(cni, { ...params }) -> CNIUpdateResponse +- client.networkInterconnects.cnis.list({ ...params }) -> CNIListResponse +- client.networkInterconnects.cnis.delete(cni, { ...params }) -> void +- client.networkInterconnects.cnis.get(cni, { ...params }) -> CNIGetResponse + +## Interconnects + +Types: + +- InterconnectCreateResponse +- InterconnectListResponse +- InterconnectGetResponse +- InterconnectStatusResponse + +Methods: + +- client.networkInterconnects.interconnects.create({ ...params }) -> InterconnectCreateResponse +- client.networkInterconnects.interconnects.list({ ...params }) -> InterconnectListResponse +- client.networkInterconnects.interconnects.delete(icon, { ...params }) -> void +- client.networkInterconnects.interconnects.get(icon, { ...params }) -> InterconnectGetResponse +- client.networkInterconnects.interconnects.loa(icon, { ...params }) -> void +- client.networkInterconnects.interconnects.status(icon, { ...params }) -> InterconnectStatusResponse + +## Settings + +Types: + +- SettingUpdateResponse +- SettingGetResponse + +Methods: + +- client.networkInterconnects.settings.update({ ...params }) -> SettingUpdateResponse +- client.networkInterconnects.settings.get({ ...params }) -> SettingGetResponse + +## Slots + +Types: + +- SlotListResponse +- SlotGetResponse + +Methods: + +- client.networkInterconnects.slots.list({ ...params }) -> SlotListResponse +- client.networkInterconnects.slots.get(slot, { ...params }) -> SlotGetResponse + # MTLSCertificates Types: diff --git a/src/index.ts b/src/index.ts index 7d1a615dba..42738bd8d0 100644 --- a/src/index.ts +++ b/src/index.ts @@ -76,6 +76,7 @@ import { Logs } from './resources/logs/logs'; import { MagicNetworkMonitoring } from './resources/magic-network-monitoring/magic-network-monitoring'; import { MagicTransit } from './resources/magic-transit/magic-transit'; import { MTLSCertificates } from './resources/mtls-certificates/mtls-certificates'; +import { NetworkInterconnects } from './resources/network-interconnects/network-interconnects'; import { OriginTLSClientAuth } from './resources/origin-tls-client-auth/origin-tls-client-auth'; import { PageShield } from './resources/page-shield/page-shield'; import { Pages } from './resources/pages/pages'; @@ -292,6 +293,7 @@ export class Cloudflare extends Core.APIClient { intel: API.Intel = new API.Intel(this); magicTransit: API.MagicTransit = new API.MagicTransit(this); magicNetworkMonitoring: API.MagicNetworkMonitoring = new API.MagicNetworkMonitoring(this); + networkInterconnects: API.NetworkInterconnects = new API.NetworkInterconnects(this); mtlsCertificates: API.MTLSCertificates = new API.MTLSCertificates(this); pages: API.Pages = new API.Pages(this); registrar: API.Registrar = new API.Registrar(this); @@ -504,6 +506,7 @@ Cloudflare.Images = Images; Cloudflare.Intel = Intel; Cloudflare.MagicTransit = MagicTransit; Cloudflare.MagicNetworkMonitoring = MagicNetworkMonitoring; +Cloudflare.NetworkInterconnects = NetworkInterconnects; Cloudflare.MTLSCertificates = MTLSCertificates; Cloudflare.Pages = Pages; Cloudflare.Registrar = Registrar; @@ -670,6 +673,8 @@ export declare namespace Cloudflare { export { MagicNetworkMonitoring as MagicNetworkMonitoring }; + export { NetworkInterconnects as NetworkInterconnects }; + export { MTLSCertificates as MTLSCertificates }; export { Pages as Pages }; diff --git a/src/resources/index.ts b/src/resources/index.ts index aa3b916fc7..f01d03ebcd 100644 --- a/src/resources/index.ts +++ b/src/resources/index.ts @@ -53,6 +53,7 @@ export { MagicNetworkMonitoring } from './magic-network-monitoring/magic-network export { MagicTransit } from './magic-transit/magic-transit'; export { ManagedTransforms } from './managed-transforms'; export { Memberships } from './memberships'; +export { NetworkInterconnects } from './network-interconnects/network-interconnects'; export { OriginCACertificates } from './origin-ca-certificates'; export { OriginPostQuantumEncryption } from './origin-post-quantum-encryption'; export { OriginTLSClientAuth } from './origin-tls-client-auth/origin-tls-client-auth'; diff --git a/src/resources/network-interconnects/cnis.ts b/src/resources/network-interconnects/cnis.ts new file mode 100644 index 0000000000..1574b35ee1 --- /dev/null +++ b/src/resources/network-interconnects/cnis.ts @@ -0,0 +1,566 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import { APIResource } from '../../resource'; +import * as Core from '../../core'; + +export class CNIs extends APIResource { + /** + * Create a new CNI object + */ + create(params: CNICreateParams, options?: Core.RequestOptions): Core.APIPromise { + const { account_id, ...body } = params; + return this._client.post(`/accounts/${account_id}/cni/cnis`, { body, ...options }); + } + + /** + * Modify stored information about a CNI object + */ + update( + cni: string, + params: CNIUpdateParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { account_id, ...body } = params; + return this._client.put(`/accounts/${account_id}/cni/cnis/${cni}`, { body, ...options }); + } + + /** + * List existing CNI objects + */ + list(params: CNIListParams, options?: Core.RequestOptions): Core.APIPromise { + const { account_id, ...query } = params; + return this._client.get(`/accounts/${account_id}/cni/cnis`, { query, ...options }); + } + + /** + * Delete a specified CNI object + */ + delete(cni: string, params: CNIDeleteParams, options?: Core.RequestOptions): Core.APIPromise { + const { account_id } = params; + return this._client.delete(`/accounts/${account_id}/cni/cnis/${cni}`, { + ...options, + headers: { Accept: '*/*', ...options?.headers }, + }); + } + + /** + * Get information about a CNI object + */ + get(cni: string, params: CNIGetParams, options?: Core.RequestOptions): Core.APIPromise { + const { account_id } = params; + return this._client.get(`/accounts/${account_id}/cni/cnis/${cni}`, options); + } +} + +export interface CNICreateResponse { + id: string; + + /** + * Customer account tag + */ + account: string; + + /** + * Customer end of the point-to-point link + * + * This should always be inside the same prefix as `p2p_ip`. + */ + cust_ip: string; + + /** + * Interconnect identifier hosting this CNI + */ + interconnect: string; + + magic: CNICreateResponse.Magic; + + /** + * Cloudflare end of the point-to-point link + */ + p2p_ip: string; + + bgp?: CNICreateResponse.BGP; +} + +export namespace CNICreateResponse { + export interface Magic { + conduit_name: string; + + description: string; + + mtu: number; + } + + export interface BGP { + /** + * ASN used on the customer end of the BGP session + */ + customer_asn: number; + + /** + * Extra set of static prefixes to advertise to the customer's end of the session + */ + extra_prefixes: Array; + + /** + * MD5 key to use for session authentication. + * + * Note that _this is not a security measure_. MD5 is not a valid security + * mechanism, and the key is not treated as a secret value. This is _only_ + * supported for preventing misconfiguration, not for defending against malicious + * attacks. + * + * The MD5 key, if set, must be of non-zero length and consist only of the + * following types of character: + * + * - ASCII alphanumerics: `[a-zA-Z0-9]` + * - Special characters in the set `'!@#$%^&*()+[]{}<>/.,;:_-~`= \|` + * + * In other words, MD5 keys may contain any printable ASCII character aside from + * newline (0x0A), quotation mark (`"`), vertical tab (0x0B), carriage return + * (0x0D), tab (0x09), form feed (0x0C), and the question mark (`?`). Requests + * specifying an MD5 key with one or more of these disallowed characters will be + * rejected. + */ + md5_key?: string | null; + } +} + +export interface CNIUpdateResponse { + id: string; + + /** + * Customer account tag + */ + account: string; + + /** + * Customer end of the point-to-point link + * + * This should always be inside the same prefix as `p2p_ip`. + */ + cust_ip: string; + + /** + * Interconnect identifier hosting this CNI + */ + interconnect: string; + + magic: CNIUpdateResponse.Magic; + + /** + * Cloudflare end of the point-to-point link + */ + p2p_ip: string; + + bgp?: CNIUpdateResponse.BGP; +} + +export namespace CNIUpdateResponse { + export interface Magic { + conduit_name: string; + + description: string; + + mtu: number; + } + + export interface BGP { + /** + * ASN used on the customer end of the BGP session + */ + customer_asn: number; + + /** + * Extra set of static prefixes to advertise to the customer's end of the session + */ + extra_prefixes: Array; + + /** + * MD5 key to use for session authentication. + * + * Note that _this is not a security measure_. MD5 is not a valid security + * mechanism, and the key is not treated as a secret value. This is _only_ + * supported for preventing misconfiguration, not for defending against malicious + * attacks. + * + * The MD5 key, if set, must be of non-zero length and consist only of the + * following types of character: + * + * - ASCII alphanumerics: `[a-zA-Z0-9]` + * - Special characters in the set `'!@#$%^&*()+[]{}<>/.,;:_-~`= \|` + * + * In other words, MD5 keys may contain any printable ASCII character aside from + * newline (0x0A), quotation mark (`"`), vertical tab (0x0B), carriage return + * (0x0D), tab (0x09), form feed (0x0C), and the question mark (`?`). Requests + * specifying an MD5 key with one or more of these disallowed characters will be + * rejected. + */ + md5_key?: string | null; + } +} + +export interface CNIListResponse { + items: Array; + + next?: number | null; +} + +export namespace CNIListResponse { + export interface Item { + id: string; + + /** + * Customer account tag + */ + account: string; + + /** + * Customer end of the point-to-point link + * + * This should always be inside the same prefix as `p2p_ip`. + */ + cust_ip: string; + + /** + * Interconnect identifier hosting this CNI + */ + interconnect: string; + + magic: Item.Magic; + + /** + * Cloudflare end of the point-to-point link + */ + p2p_ip: string; + + bgp?: Item.BGP; + } + + export namespace Item { + export interface Magic { + conduit_name: string; + + description: string; + + mtu: number; + } + + export interface BGP { + /** + * ASN used on the customer end of the BGP session + */ + customer_asn: number; + + /** + * Extra set of static prefixes to advertise to the customer's end of the session + */ + extra_prefixes: Array; + + /** + * MD5 key to use for session authentication. + * + * Note that _this is not a security measure_. MD5 is not a valid security + * mechanism, and the key is not treated as a secret value. This is _only_ + * supported for preventing misconfiguration, not for defending against malicious + * attacks. + * + * The MD5 key, if set, must be of non-zero length and consist only of the + * following types of character: + * + * - ASCII alphanumerics: `[a-zA-Z0-9]` + * - Special characters in the set `'!@#$%^&*()+[]{}<>/.,;:_-~`= \|` + * + * In other words, MD5 keys may contain any printable ASCII character aside from + * newline (0x0A), quotation mark (`"`), vertical tab (0x0B), carriage return + * (0x0D), tab (0x09), form feed (0x0C), and the question mark (`?`). Requests + * specifying an MD5 key with one or more of these disallowed characters will be + * rejected. + */ + md5_key?: string | null; + } + } +} + +export interface CNIGetResponse { + id: string; + + /** + * Customer account tag + */ + account: string; + + /** + * Customer end of the point-to-point link + * + * This should always be inside the same prefix as `p2p_ip`. + */ + cust_ip: string; + + /** + * Interconnect identifier hosting this CNI + */ + interconnect: string; + + magic: CNIGetResponse.Magic; + + /** + * Cloudflare end of the point-to-point link + */ + p2p_ip: string; + + bgp?: CNIGetResponse.BGP; +} + +export namespace CNIGetResponse { + export interface Magic { + conduit_name: string; + + description: string; + + mtu: number; + } + + export interface BGP { + /** + * ASN used on the customer end of the BGP session + */ + customer_asn: number; + + /** + * Extra set of static prefixes to advertise to the customer's end of the session + */ + extra_prefixes: Array; + + /** + * MD5 key to use for session authentication. + * + * Note that _this is not a security measure_. MD5 is not a valid security + * mechanism, and the key is not treated as a secret value. This is _only_ + * supported for preventing misconfiguration, not for defending against malicious + * attacks. + * + * The MD5 key, if set, must be of non-zero length and consist only of the + * following types of character: + * + * - ASCII alphanumerics: `[a-zA-Z0-9]` + * - Special characters in the set `'!@#$%^&*()+[]{}<>/.,;:_-~`= \|` + * + * In other words, MD5 keys may contain any printable ASCII character aside from + * newline (0x0A), quotation mark (`"`), vertical tab (0x0B), carriage return + * (0x0D), tab (0x09), form feed (0x0C), and the question mark (`?`). Requests + * specifying an MD5 key with one or more of these disallowed characters will be + * rejected. + */ + md5_key?: string | null; + } +} + +export interface CNICreateParams { + /** + * Path param: Customer account tag + */ + account_id: string; + + /** + * Body param: Customer account tag + */ + account: string; + + /** + * Body param: + */ + interconnect: string; + + /** + * Body param: + */ + magic: CNICreateParams.Magic; + + /** + * Body param: + */ + bgp?: CNICreateParams.BGP; +} + +export namespace CNICreateParams { + export interface Magic { + conduit_name: string; + + description: string; + + mtu: number; + } + + export interface BGP { + /** + * ASN used on the customer end of the BGP session + */ + customer_asn: number; + + /** + * Extra set of static prefixes to advertise to the customer's end of the session + */ + extra_prefixes: Array; + + /** + * MD5 key to use for session authentication. + * + * Note that _this is not a security measure_. MD5 is not a valid security + * mechanism, and the key is not treated as a secret value. This is _only_ + * supported for preventing misconfiguration, not for defending against malicious + * attacks. + * + * The MD5 key, if set, must be of non-zero length and consist only of the + * following types of character: + * + * - ASCII alphanumerics: `[a-zA-Z0-9]` + * - Special characters in the set `'!@#$%^&*()+[]{}<>/.,;:_-~`= \|` + * + * In other words, MD5 keys may contain any printable ASCII character aside from + * newline (0x0A), quotation mark (`"`), vertical tab (0x0B), carriage return + * (0x0D), tab (0x09), form feed (0x0C), and the question mark (`?`). Requests + * specifying an MD5 key with one or more of these disallowed characters will be + * rejected. + */ + md5_key?: string | null; + } +} + +export interface CNIUpdateParams { + /** + * Path param: Customer account tag + */ + account_id: string; + + /** + * Body param: + */ + id: string; + + /** + * Body param: Customer account tag + */ + account: string; + + /** + * Body param: Customer end of the point-to-point link + * + * This should always be inside the same prefix as `p2p_ip`. + */ + cust_ip: string; + + /** + * Body param: Interconnect identifier hosting this CNI + */ + interconnect: string; + + /** + * Body param: + */ + magic: CNIUpdateParams.Magic; + + /** + * Body param: Cloudflare end of the point-to-point link + */ + p2p_ip: string; + + /** + * Body param: + */ + bgp?: CNIUpdateParams.BGP; +} + +export namespace CNIUpdateParams { + export interface Magic { + conduit_name: string; + + description: string; + + mtu: number; + } + + export interface BGP { + /** + * ASN used on the customer end of the BGP session + */ + customer_asn: number; + + /** + * Extra set of static prefixes to advertise to the customer's end of the session + */ + extra_prefixes: Array; + + /** + * MD5 key to use for session authentication. + * + * Note that _this is not a security measure_. MD5 is not a valid security + * mechanism, and the key is not treated as a secret value. This is _only_ + * supported for preventing misconfiguration, not for defending against malicious + * attacks. + * + * The MD5 key, if set, must be of non-zero length and consist only of the + * following types of character: + * + * - ASCII alphanumerics: `[a-zA-Z0-9]` + * - Special characters in the set `'!@#$%^&*()+[]{}<>/.,;:_-~`= \|` + * + * In other words, MD5 keys may contain any printable ASCII character aside from + * newline (0x0A), quotation mark (`"`), vertical tab (0x0B), carriage return + * (0x0D), tab (0x09), form feed (0x0C), and the question mark (`?`). Requests + * specifying an MD5 key with one or more of these disallowed characters will be + * rejected. + */ + md5_key?: string | null; + } +} + +export interface CNIListParams { + /** + * Path param: Customer account tag + */ + account_id: string; + + /** + * Query param: + */ + cursor?: number | null; + + /** + * Query param: + */ + limit?: number | null; + + /** + * Query param: If specified, only show CNIs associated with the specified slot + */ + slot?: string | null; +} + +export interface CNIDeleteParams { + /** + * Customer account tag + */ + account_id: string; +} + +export interface CNIGetParams { + /** + * Customer account tag + */ + account_id: string; +} + +export declare namespace CNIs { + export { + type CNICreateResponse as CNICreateResponse, + type CNIUpdateResponse as CNIUpdateResponse, + type CNIListResponse as CNIListResponse, + type CNIGetResponse as CNIGetResponse, + type CNICreateParams as CNICreateParams, + type CNIUpdateParams as CNIUpdateParams, + type CNIListParams as CNIListParams, + type CNIDeleteParams as CNIDeleteParams, + type CNIGetParams as CNIGetParams, + }; +} diff --git a/src/resources/network-interconnects/index.ts b/src/resources/network-interconnects/index.ts new file mode 100644 index 0000000000..0088752edc --- /dev/null +++ b/src/resources/network-interconnects/index.ts @@ -0,0 +1,42 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +export { + CNIs, + type CNICreateResponse, + type CNIUpdateResponse, + type CNIListResponse, + type CNIGetResponse, + type CNICreateParams, + type CNIUpdateParams, + type CNIListParams, + type CNIDeleteParams, + type CNIGetParams, +} from './cnis'; +export { + Interconnects, + type InterconnectCreateResponse, + type InterconnectListResponse, + type InterconnectGetResponse, + type InterconnectStatusResponse, + type InterconnectCreateParams, + type InterconnectListParams, + type InterconnectDeleteParams, + type InterconnectGetParams, + type InterconnectLOAParams, + type InterconnectStatusParams, +} from './interconnects'; +export { NetworkInterconnects } from './network-interconnects'; +export { + Settings, + type SettingUpdateResponse, + type SettingGetResponse, + type SettingUpdateParams, + type SettingGetParams, +} from './settings'; +export { + Slots, + type SlotListResponse, + type SlotGetResponse, + type SlotListParams, + type SlotGetParams, +} from './slots'; diff --git a/src/resources/network-interconnects/interconnects.ts b/src/resources/network-interconnects/interconnects.ts new file mode 100644 index 0000000000..7a9cd9b714 --- /dev/null +++ b/src/resources/network-interconnects/interconnects.ts @@ -0,0 +1,400 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import { APIResource } from '../../resource'; +import * as Core from '../../core'; + +export class Interconnects extends APIResource { + /** + * Create a new interconnect + */ + create( + params: InterconnectCreateParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { account_id, ...body } = params; + return this._client.post(`/accounts/${account_id}/cni/interconnects`, { body, ...options }); + } + + /** + * List existing interconnects + */ + list( + params: InterconnectListParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { account_id, ...query } = params; + return this._client.get(`/accounts/${account_id}/cni/interconnects`, { query, ...options }); + } + + /** + * Delete an interconnect object + */ + delete( + icon: string, + params: InterconnectDeleteParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { account_id } = params; + return this._client.delete(`/accounts/${account_id}/cni/interconnects/${icon}`, { + ...options, + headers: { Accept: '*/*', ...options?.headers }, + }); + } + + /** + * Get information about an interconnect object + */ + get( + icon: string, + params: InterconnectGetParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { account_id } = params; + return this._client.get(`/accounts/${account_id}/cni/interconnects/${icon}`, options); + } + + /** + * Generate the Letter of Authorization (LOA) for a given interconnect + */ + loa(icon: string, params: InterconnectLOAParams, options?: Core.RequestOptions): Core.APIPromise { + const { account_id } = params; + return this._client.get(`/accounts/${account_id}/cni/interconnects/${icon}/loa`, { + ...options, + headers: { Accept: '*/*', ...options?.headers }, + }); + } + + /** + * Get the current status of an interconnect object + */ + status( + icon: string, + params: InterconnectStatusParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { account_id } = params; + return this._client.get(`/accounts/${account_id}/cni/interconnects/${icon}/status`, options); + } +} + +export type InterconnectCreateResponse = + | InterconnectCreateResponse.NscInterconnectPhysicalBody + | InterconnectCreateResponse.NscInterconnectGcpPartnerBody; + +export namespace InterconnectCreateResponse { + export interface NscInterconnectPhysicalBody { + account: string; + + facility: NscInterconnectPhysicalBody.Facility; + + name: string; + + /** + * A Cloudflare site name. + */ + site: string; + + slot_id: string; + + speed: string; + + type: string; + + owner?: string; + } + + export namespace NscInterconnectPhysicalBody { + export interface Facility { + address: Array; + + name: string; + } + } + + export interface NscInterconnectGcpPartnerBody { + account: string; + + name: string; + + region: string; + + type: string; + + owner?: string; + } +} + +export interface InterconnectListResponse { + items: Array< + | InterconnectListResponse.NscInterconnectPhysicalBody + | InterconnectListResponse.NscInterconnectGcpPartnerBody + >; + + next?: number | null; +} + +export namespace InterconnectListResponse { + export interface NscInterconnectPhysicalBody { + account: string; + + facility: NscInterconnectPhysicalBody.Facility; + + name: string; + + /** + * A Cloudflare site name. + */ + site: string; + + slot_id: string; + + speed: string; + + type: string; + + owner?: string; + } + + export namespace NscInterconnectPhysicalBody { + export interface Facility { + address: Array; + + name: string; + } + } + + export interface NscInterconnectGcpPartnerBody { + account: string; + + name: string; + + region: string; + + type: string; + + owner?: string; + } +} + +export type InterconnectGetResponse = + | InterconnectGetResponse.NscInterconnectPhysicalBody + | InterconnectGetResponse.NscInterconnectGcpPartnerBody; + +export namespace InterconnectGetResponse { + export interface NscInterconnectPhysicalBody { + account: string; + + facility: NscInterconnectPhysicalBody.Facility; + + name: string; + + /** + * A Cloudflare site name. + */ + site: string; + + slot_id: string; + + speed: string; + + type: string; + + owner?: string; + } + + export namespace NscInterconnectPhysicalBody { + export interface Facility { + address: Array; + + name: string; + } + } + + export interface NscInterconnectGcpPartnerBody { + account: string; + + name: string; + + region: string; + + type: string; + + owner?: string; + } +} + +export type InterconnectStatusResponse = + | InterconnectStatusResponse.Pending + | InterconnectStatusResponse.Down + | InterconnectStatusResponse.Unhealthy + | InterconnectStatusResponse.Healthy; + +export namespace InterconnectStatusResponse { + export interface Pending { + state: 'Pending'; + } + + export interface Down { + state: 'Down'; + + /** + * Diagnostic information, if available + */ + reason?: string | null; + } + + export interface Unhealthy { + state: 'Unhealthy'; + + /** + * Diagnostic information, if available + */ + reason?: string | null; + } + + export interface Healthy { + state: 'Healthy'; + } +} + +export type InterconnectCreateParams = + | InterconnectCreateParams.NscInterconnectCreatePhysicalBody + | InterconnectCreateParams.NscInterconnectCreateGcpPartnerBody; + +export declare namespace InterconnectCreateParams { + export interface NscInterconnectCreatePhysicalBody { + /** + * Path param: Customer account tag + */ + account_id: string; + + /** + * Body param: + */ + account: string; + + /** + * Body param: + */ + slot_id: string; + + /** + * Body param: + */ + type: string; + + /** + * Body param: + */ + speed?: string | null; + } + + export interface NscInterconnectCreateGcpPartnerBody { + /** + * Path param: Customer account tag + */ + account_id: string; + + /** + * Body param: + */ + account: string; + + /** + * Body param: Bandwidth structure as visible through the customer-facing API. + */ + bandwidth: + | '50M' + | '100M' + | '200M' + | '300M' + | '400M' + | '500M' + | '1G' + | '2G' + | '5G' + | '10G' + | '20G' + | '50G'; + + /** + * Body param: Pairing key provided by GCP + */ + pairing_key: string; + + /** + * Body param: + */ + type: string; + } +} + +export interface InterconnectListParams { + /** + * Path param: Customer account tag + */ + account_id: string; + + /** + * Query param: + */ + cursor?: number | null; + + /** + * Query param: + */ + limit?: number | null; + + /** + * Query param: If specified, only show interconnects located at the given site + */ + site?: string | null; + + /** + * Query param: If specified, only show interconnects of the given type + */ + type?: string | null; +} + +export interface InterconnectDeleteParams { + /** + * Customer account tag + */ + account_id: string; +} + +export interface InterconnectGetParams { + /** + * Customer account tag + */ + account_id: string; +} + +export interface InterconnectLOAParams { + /** + * Customer account tag + */ + account_id: string; +} + +export interface InterconnectStatusParams { + /** + * Customer account tag + */ + account_id: string; +} + +export declare namespace Interconnects { + export { + type InterconnectCreateResponse as InterconnectCreateResponse, + type InterconnectListResponse as InterconnectListResponse, + type InterconnectGetResponse as InterconnectGetResponse, + type InterconnectStatusResponse as InterconnectStatusResponse, + type InterconnectCreateParams as InterconnectCreateParams, + type InterconnectListParams as InterconnectListParams, + type InterconnectDeleteParams as InterconnectDeleteParams, + type InterconnectGetParams as InterconnectGetParams, + type InterconnectLOAParams as InterconnectLOAParams, + type InterconnectStatusParams as InterconnectStatusParams, + }; +} diff --git a/src/resources/network-interconnects/network-interconnects.ts b/src/resources/network-interconnects/network-interconnects.ts new file mode 100644 index 0000000000..d69eb38cc9 --- /dev/null +++ b/src/resources/network-interconnects/network-interconnects.ts @@ -0,0 +1,97 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import { APIResource } from '../../resource'; +import * as CNIsAPI from './cnis'; +import { + CNICreateParams, + CNICreateResponse, + CNIDeleteParams, + CNIGetParams, + CNIGetResponse, + CNIListParams, + CNIListResponse, + CNIUpdateParams, + CNIUpdateResponse, + CNIs, +} from './cnis'; +import * as InterconnectsAPI from './interconnects'; +import { + InterconnectCreateParams, + InterconnectCreateResponse, + InterconnectDeleteParams, + InterconnectGetParams, + InterconnectGetResponse, + InterconnectLOAParams, + InterconnectListParams, + InterconnectListResponse, + InterconnectStatusParams, + InterconnectStatusResponse, + Interconnects, +} from './interconnects'; +import * as SettingsAPI from './settings'; +import { + SettingGetParams, + SettingGetResponse, + SettingUpdateParams, + SettingUpdateResponse, + Settings, +} from './settings'; +import * as SlotsAPI from './slots'; +import { SlotGetParams, SlotGetResponse, SlotListParams, SlotListResponse, Slots } from './slots'; + +export class NetworkInterconnects extends APIResource { + cnis: CNIsAPI.CNIs = new CNIsAPI.CNIs(this._client); + interconnects: InterconnectsAPI.Interconnects = new InterconnectsAPI.Interconnects(this._client); + settings: SettingsAPI.Settings = new SettingsAPI.Settings(this._client); + slots: SlotsAPI.Slots = new SlotsAPI.Slots(this._client); +} + +NetworkInterconnects.CNIs = CNIs; +NetworkInterconnects.Interconnects = Interconnects; +NetworkInterconnects.Settings = Settings; +NetworkInterconnects.Slots = Slots; + +export declare namespace NetworkInterconnects { + export { + CNIs as CNIs, + type CNICreateResponse as CNICreateResponse, + type CNIUpdateResponse as CNIUpdateResponse, + type CNIListResponse as CNIListResponse, + type CNIGetResponse as CNIGetResponse, + type CNICreateParams as CNICreateParams, + type CNIUpdateParams as CNIUpdateParams, + type CNIListParams as CNIListParams, + type CNIDeleteParams as CNIDeleteParams, + type CNIGetParams as CNIGetParams, + }; + + export { + Interconnects as Interconnects, + type InterconnectCreateResponse as InterconnectCreateResponse, + type InterconnectListResponse as InterconnectListResponse, + type InterconnectGetResponse as InterconnectGetResponse, + type InterconnectStatusResponse as InterconnectStatusResponse, + type InterconnectCreateParams as InterconnectCreateParams, + type InterconnectListParams as InterconnectListParams, + type InterconnectDeleteParams as InterconnectDeleteParams, + type InterconnectGetParams as InterconnectGetParams, + type InterconnectLOAParams as InterconnectLOAParams, + type InterconnectStatusParams as InterconnectStatusParams, + }; + + export { + Settings as Settings, + type SettingUpdateResponse as SettingUpdateResponse, + type SettingGetResponse as SettingGetResponse, + type SettingUpdateParams as SettingUpdateParams, + type SettingGetParams as SettingGetParams, + }; + + export { + Slots as Slots, + type SlotListResponse as SlotListResponse, + type SlotGetResponse as SlotGetResponse, + type SlotListParams as SlotListParams, + type SlotGetParams as SlotGetParams, + }; +} diff --git a/src/resources/network-interconnects/settings.ts b/src/resources/network-interconnects/settings.ts new file mode 100644 index 0000000000..264cbefc9c --- /dev/null +++ b/src/resources/network-interconnects/settings.ts @@ -0,0 +1,58 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import { APIResource } from '../../resource'; +import * as Core from '../../core'; + +export class Settings extends APIResource { + /** + * Update the current settings for the active account + */ + update(params: SettingUpdateParams, options?: Core.RequestOptions): Core.APIPromise { + const { account_id, ...body } = params; + return this._client.put(`/accounts/${account_id}/cni/settings`, { body, ...options }); + } + + /** + * Get the current settings for the active account + */ + get(params: SettingGetParams, options?: Core.RequestOptions): Core.APIPromise { + const { account_id } = params; + return this._client.get(`/accounts/${account_id}/cni/settings`, options); + } +} + +export interface SettingUpdateResponse { + default_asn?: number | null; +} + +export interface SettingGetResponse { + default_asn?: number | null; +} + +export interface SettingUpdateParams { + /** + * Path param: Account tag to update settings for + */ + account_id: string; + + /** + * Body param: + */ + default_asn?: number | null; +} + +export interface SettingGetParams { + /** + * Account tag to retrieve settings for + */ + account_id: string; +} + +export declare namespace Settings { + export { + type SettingUpdateResponse as SettingUpdateResponse, + type SettingGetResponse as SettingGetResponse, + type SettingUpdateParams as SettingUpdateParams, + type SettingGetParams as SettingGetParams, + }; +} diff --git a/src/resources/network-interconnects/slots.ts b/src/resources/network-interconnects/slots.ts new file mode 100644 index 0000000000..aaa0db104e --- /dev/null +++ b/src/resources/network-interconnects/slots.ts @@ -0,0 +1,147 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import { APIResource } from '../../resource'; +import * as Core from '../../core'; + +export class Slots extends APIResource { + /** + * Retrieve a list of all slots matching the specified parameters + */ + list(params: SlotListParams, options?: Core.RequestOptions): Core.APIPromise { + const { account_id, ...query } = params; + return this._client.get(`/accounts/${account_id}/cni/slots`, { query, ...options }); + } + + /** + * Get information about the specified slot + */ + get(slot: string, params: SlotGetParams, options?: Core.RequestOptions): Core.APIPromise { + const { account_id } = params; + return this._client.get(`/accounts/${account_id}/cni/slots/${slot}`, options); + } +} + +export interface SlotListResponse { + items: Array; + + next?: number | null; +} + +export namespace SlotListResponse { + export interface Item { + /** + * Slot ID + */ + id: string; + + facility: Item.Facility; + + /** + * Whether the slot is occupied or not + */ + occupied: boolean; + + site: string; + + speed: string; + + /** + * Customer account tag + */ + account?: string; + } + + export namespace Item { + export interface Facility { + address: Array; + + name: string; + } + } +} + +export interface SlotGetResponse { + /** + * Slot ID + */ + id: string; + + facility: SlotGetResponse.Facility; + + /** + * Whether the slot is occupied or not + */ + occupied: boolean; + + site: string; + + speed: string; + + /** + * Customer account tag + */ + account?: string; +} + +export namespace SlotGetResponse { + export interface Facility { + address: Array; + + name: string; + } +} + +export interface SlotListParams { + /** + * Path param: Customer account tag + */ + account_id: string; + + /** + * Query param: If specified, only show slots with the given text in their address + * field + */ + address_contains?: string | null; + + /** + * Query param: + */ + cursor?: number | null; + + /** + * Query param: + */ + limit?: number | null; + + /** + * Query param: If specified, only show slots with a specific occupied/unoccupied + * state + */ + occupied?: boolean | null; + + /** + * Query param: If specified, only show slots located at the given site + */ + site?: string | null; + + /** + * Query param: If specified, only show slots that support the given speed + */ + speed?: string | null; +} + +export interface SlotGetParams { + /** + * Customer account tag + */ + account_id: string; +} + +export declare namespace Slots { + export { + type SlotListResponse as SlotListResponse, + type SlotGetResponse as SlotGetResponse, + type SlotListParams as SlotListParams, + type SlotGetParams as SlotGetParams, + }; +} diff --git a/tests/api-resources/network-interconnects/cnis.test.ts b/tests/api-resources/network-interconnects/cnis.test.ts new file mode 100644 index 0000000000..5d4f92441d --- /dev/null +++ b/tests/api-resources/network-interconnects/cnis.test.ts @@ -0,0 +1,128 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import Cloudflare from 'cloudflare'; +import { Response } from 'node-fetch'; + +const client = new Cloudflare({ + apiKey: '144c9defac04969c7bfad8efaa8ea194', + apiEmail: 'user@example.com', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); + +describe('resource cnis', () => { + test('create: only required params', async () => { + const responsePromise = client.networkInterconnects.cnis.create({ + account_id: 'account_id', + account: 'account', + interconnect: 'interconnect', + magic: { conduit_name: 'conduit_name', description: 'description', mtu: 0 }, + }); + 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('create: required and optional params', async () => { + const response = await client.networkInterconnects.cnis.create({ + account_id: 'account_id', + account: 'account', + interconnect: 'interconnect', + magic: { conduit_name: 'conduit_name', description: 'description', mtu: 0 }, + bgp: { customer_asn: 0, extra_prefixes: ['string'], md5_key: 'md5_key' }, + }); + }); + + test('update: only required params', async () => { + const responsePromise = client.networkInterconnects.cnis.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { + account_id: 'account_id', + id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', + account: 'account', + cust_ip: '192.168.3.4/31', + interconnect: 'interconnect', + magic: { conduit_name: 'conduit_name', description: 'description', mtu: 0 }, + p2p_ip: '192.168.3.4/31', + }); + 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('update: required and optional params', async () => { + const response = await client.networkInterconnects.cnis.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { + account_id: 'account_id', + id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', + account: 'account', + cust_ip: '192.168.3.4/31', + interconnect: 'interconnect', + magic: { conduit_name: 'conduit_name', description: 'description', mtu: 0 }, + p2p_ip: '192.168.3.4/31', + bgp: { customer_asn: 0, extra_prefixes: ['string'], md5_key: 'md5_key' }, + }); + }); + + test('list: only required params', async () => { + const responsePromise = client.networkInterconnects.cnis.list({ account_id: 'account_id' }); + 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('list: required and optional params', async () => { + const response = await client.networkInterconnects.cnis.list({ + account_id: 'account_id', + cursor: 0, + limit: 0, + slot: 'slot', + }); + }); + + test('delete: only required params', async () => { + const responsePromise = client.networkInterconnects.cnis.delete('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { + account_id: 'account_id', + }); + 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('delete: required and optional params', async () => { + const response = await client.networkInterconnects.cnis.delete('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { + account_id: 'account_id', + }); + }); + + test('get: only required params', async () => { + const responsePromise = client.networkInterconnects.cnis.get('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { + account_id: 'account_id', + }); + 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 client.networkInterconnects.cnis.get('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { + account_id: 'account_id', + }); + }); +}); diff --git a/tests/api-resources/network-interconnects/interconnects.test.ts b/tests/api-resources/network-interconnects/interconnects.test.ts new file mode 100644 index 0000000000..c38f850f2b --- /dev/null +++ b/tests/api-resources/network-interconnects/interconnects.test.ts @@ -0,0 +1,135 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import Cloudflare from 'cloudflare'; +import { Response } from 'node-fetch'; + +const client = new Cloudflare({ + apiKey: '144c9defac04969c7bfad8efaa8ea194', + apiEmail: 'user@example.com', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); + +describe('resource interconnects', () => { + test('create: only required params', async () => { + const responsePromise = client.networkInterconnects.interconnects.create({ + account_id: 'account_id', + account: 'account', + slot_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', + type: 'type', + }); + 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('create: required and optional params', async () => { + const response = await client.networkInterconnects.interconnects.create({ + account_id: 'account_id', + account: 'account', + slot_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', + type: 'type', + speed: 'speed', + }); + }); + + test('list: only required params', async () => { + const responsePromise = client.networkInterconnects.interconnects.list({ account_id: 'account_id' }); + 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('list: required and optional params', async () => { + const response = await client.networkInterconnects.interconnects.list({ + account_id: 'account_id', + cursor: 0, + limit: 0, + site: 'site', + type: 'type', + }); + }); + + test('delete: only required params', async () => { + const responsePromise = client.networkInterconnects.interconnects.delete('icon', { + account_id: 'account_id', + }); + 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('delete: required and optional params', async () => { + const response = await client.networkInterconnects.interconnects.delete('icon', { + account_id: 'account_id', + }); + }); + + test('get: only required params', async () => { + const responsePromise = client.networkInterconnects.interconnects.get('icon', { + account_id: 'account_id', + }); + 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 client.networkInterconnects.interconnects.get('icon', { + account_id: 'account_id', + }); + }); + + test('loa: only required params', async () => { + const responsePromise = client.networkInterconnects.interconnects.loa('icon', { + account_id: 'account_id', + }); + 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('loa: required and optional params', async () => { + const response = await client.networkInterconnects.interconnects.loa('icon', { + account_id: 'account_id', + }); + }); + + test('status: only required params', async () => { + const responsePromise = client.networkInterconnects.interconnects.status('icon', { + account_id: 'account_id', + }); + 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('status: required and optional params', async () => { + const response = await client.networkInterconnects.interconnects.status('icon', { + account_id: 'account_id', + }); + }); +}); diff --git a/tests/api-resources/network-interconnects/settings.test.ts b/tests/api-resources/network-interconnects/settings.test.ts new file mode 100644 index 0000000000..8be3cca819 --- /dev/null +++ b/tests/api-resources/network-interconnects/settings.test.ts @@ -0,0 +1,45 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import Cloudflare from 'cloudflare'; +import { Response } from 'node-fetch'; + +const client = new Cloudflare({ + apiKey: '144c9defac04969c7bfad8efaa8ea194', + apiEmail: 'user@example.com', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); + +describe('resource settings', () => { + test('update: only required params', async () => { + const responsePromise = client.networkInterconnects.settings.update({ account_id: 'account_id' }); + 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('update: required and optional params', async () => { + const response = await client.networkInterconnects.settings.update({ + account_id: 'account_id', + default_asn: 0, + }); + }); + + test('get: only required params', async () => { + const responsePromise = client.networkInterconnects.settings.get({ account_id: 'account_id' }); + 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 client.networkInterconnects.settings.get({ account_id: 'account_id' }); + }); +}); diff --git a/tests/api-resources/network-interconnects/slots.test.ts b/tests/api-resources/network-interconnects/slots.test.ts new file mode 100644 index 0000000000..61429b8914 --- /dev/null +++ b/tests/api-resources/network-interconnects/slots.test.ts @@ -0,0 +1,54 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import Cloudflare from 'cloudflare'; +import { Response } from 'node-fetch'; + +const client = new Cloudflare({ + apiKey: '144c9defac04969c7bfad8efaa8ea194', + apiEmail: 'user@example.com', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); + +describe('resource slots', () => { + test('list: only required params', async () => { + const responsePromise = client.networkInterconnects.slots.list({ account_id: 'account_id' }); + 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('list: required and optional params', async () => { + const response = await client.networkInterconnects.slots.list({ + account_id: 'account_id', + address_contains: 'address_contains', + cursor: 0, + limit: 0, + occupied: true, + site: 'site', + speed: 'speed', + }); + }); + + test('get: only required params', async () => { + const responsePromise = client.networkInterconnects.slots.get('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { + account_id: 'account_id', + }); + 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 client.networkInterconnects.slots.get('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { + account_id: 'account_id', + }); + }); +});