From 30ae2450208eb04079076f7c3415141c42824aa7 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Mon, 11 Mar 2024 03:04:56 +0000
Subject: [PATCH] feat: update via SDK Studio (#134)
---
api.md | 34 ++++++-------
src/index.ts | 14 +++---
src/resources/index.ts | 14 +++---
...tificates.ts => origin-ca-certificates.ts} | 49 ++++++++++---------
src/resources/user/billing/billing.ts | 8 +--
src/resources/user/billing/index.ts | 2 +-
.../user/billing/{profiles.ts => profile.ts} | 8 +--
src/resources/zero-trust/gateway/gateway.ts | 12 ++---
src/resources/zero-trust/gateway/index.ts | 4 +-
.../gateway/{loggings.ts => logging.ts} | 12 ++---
...test.ts => origin-ca-certificates.test.ts} | 16 +++---
.../{profiles.test.ts => profile.test.ts} | 6 +--
.../{loggings.test.ts => logging.test.ts} | 10 ++--
13 files changed, 97 insertions(+), 92 deletions(-)
rename src/resources/{certificates.ts => origin-ca-certificates.ts} (64%)
rename src/resources/user/billing/{profiles.ts => profile.ts} (70%)
rename src/resources/zero-trust/gateway/{loggings.ts => logging.ts} (89%)
rename tests/api-resources/{certificates.test.ts => origin-ca-certificates.test.ts} (81%)
rename tests/api-resources/user/billing/{profiles.test.ts => profile.test.ts} (83%)
rename tests/api-resources/zero-trust/gateway/{loggings.test.ts => logging.test.ts} (91%)
diff --git a/api.md b/api.md
index 7e23d411a3..c4d9227c63 100644
--- a/api.md
+++ b/api.md
@@ -43,22 +43,22 @@ Methods:
- client.accounts.roles.list({ ...params }) -> RoleListResponse | null
- client.accounts.roles.get(roleId, { ...params }) -> RoleGetResponse
-# Certificates
+# OriginCACertificates
Types:
-- OriginCACertificate
-- CertificateCreateResponse
-- CertificateListResponse
-- CertificateDeleteResponse
-- CertificateGetResponse
+- OriginCACertificate
+- OriginCACertificateCreateResponse
+- OriginCACertificateListResponse
+- OriginCACertificateDeleteResponse
+- OriginCACertificateGetResponse
Methods:
-- client.certificates.create({ ...params }) -> CertificateCreateResponse
-- client.certificates.list() -> CertificateListResponse | null
-- client.certificates.delete(certificateId) -> CertificateDeleteResponse
-- client.certificates.get(certificateId) -> CertificateGetResponse
+- client.originCACertificates.create({ ...params }) -> OriginCACertificateCreateResponse
+- client.originCACertificates.list() -> OriginCACertificateListResponse | null
+- client.originCACertificates.delete(certificateId) -> OriginCACertificateDeleteResponse
+- client.originCACertificates.get(certificateId) -> OriginCACertificateGetResponse
# IPs
@@ -124,15 +124,15 @@ Methods:
- client.user.billing.history.get({ ...params }) -> HistoryGetResponse | null
-### Profiles
+### Profile
Types:
-- ProfileGetResponse
+- ProfileGetResponse
Methods:
-- client.user.billing.profiles.get() -> ProfileGetResponse
+- client.user.billing.profile.get() -> ProfileGetResponse
## Firewall
@@ -4926,16 +4926,16 @@ Methods:
- client.zeroTrust.gateway.locations.delete(locationId, { ...params }) -> LocationDeleteResponse
- client.zeroTrust.gateway.locations.get(locationId, { ...params }) -> ZeroTrustGatewayLocations
-### Loggings
+### Logging
Types:
-- ZeroTrustGatewayGatewayAccountLoggingSettings
+- ZeroTrustGatewayGatewayAccountLoggingSettings
Methods:
-- client.zeroTrust.gateway.loggings.update({ ...params }) -> ZeroTrustGatewayGatewayAccountLoggingSettings
-- client.zeroTrust.gateway.loggings.get({ ...params }) -> ZeroTrustGatewayGatewayAccountLoggingSettings
+- client.zeroTrust.gateway.logging.update({ ...params }) -> ZeroTrustGatewayGatewayAccountLoggingSettings
+- client.zeroTrust.gateway.logging.get({ ...params }) -> ZeroTrustGatewayGatewayAccountLoggingSettings
### ProxyEndpoints
diff --git a/src/index.ts b/src/index.ts
index e5b3de8cda..4ecc73c513 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -143,7 +143,7 @@ export class Cloudflare extends Core.APIClient {
}
accounts: API.Accounts = new API.Accounts(this);
- certificates: API.Certificates = new API.Certificates(this);
+ originCACertificates: API.OriginCACertificates = new API.OriginCACertificates(this);
ips: API.IPs = new API.IPs(this);
memberships: API.Memberships = new API.Memberships(this);
user: API.UserResource = new API.UserResource(this);
@@ -396,13 +396,13 @@ export namespace Cloudflare {
export import AccountListParams = API.AccountListParams;
export import AccountGetParams = API.AccountGetParams;
- export import Certificates = API.Certificates;
+ export import OriginCACertificates = API.OriginCACertificates;
export import OriginCACertificate = API.OriginCACertificate;
- export import CertificateCreateResponse = API.CertificateCreateResponse;
- export import CertificateListResponse = API.CertificateListResponse;
- export import CertificateDeleteResponse = API.CertificateDeleteResponse;
- export import CertificateGetResponse = API.CertificateGetResponse;
- export import CertificateCreateParams = API.CertificateCreateParams;
+ export import OriginCACertificateCreateResponse = API.OriginCACertificateCreateResponse;
+ export import OriginCACertificateListResponse = API.OriginCACertificateListResponse;
+ export import OriginCACertificateDeleteResponse = API.OriginCACertificateDeleteResponse;
+ export import OriginCACertificateGetResponse = API.OriginCACertificateGetResponse;
+ export import OriginCACertificateCreateParams = API.OriginCACertificateCreateParams;
export import IPs = API.IPs;
export import JdcloudIPs = API.JdcloudIPs;
diff --git a/src/resources/index.ts b/src/resources/index.ts
index a6fca9ec92..45d5e93199 100644
--- a/src/resources/index.ts
+++ b/src/resources/index.ts
@@ -162,13 +162,13 @@ export {
} from './speed/speed';
export {
OriginCACertificate,
- CertificateCreateResponse,
- CertificateListResponse,
- CertificateDeleteResponse,
- CertificateGetResponse,
- CertificateCreateParams,
- Certificates,
-} from './certificates';
+ OriginCACertificateCreateResponse,
+ OriginCACertificateListResponse,
+ OriginCACertificateDeleteResponse,
+ OriginCACertificateGetResponse,
+ OriginCACertificateCreateParams,
+ OriginCACertificates,
+} from './origin-ca-certificates';
export {
OriginPostQuantumEncryptionUpdateResponse,
OriginPostQuantumEncryptionGetResponse,
diff --git a/src/resources/certificates.ts b/src/resources/origin-ca-certificates.ts
similarity index 64%
rename from src/resources/certificates.ts
rename to src/resources/origin-ca-certificates.ts
index c73830079e..30ddaabc33 100644
--- a/src/resources/certificates.ts
+++ b/src/resources/origin-ca-certificates.ts
@@ -2,20 +2,20 @@
import * as Core from 'cloudflare/core';
import { APIResource } from 'cloudflare/resource';
-import * as CertificatesAPI from 'cloudflare/resources/certificates';
+import * as OriginCACertificatesAPI from 'cloudflare/resources/origin-ca-certificates';
-export class Certificates extends APIResource {
+export class OriginCACertificates extends APIResource {
/**
* Create an Origin CA certificate. Use your Origin CA Key as your User Service Key
* when calling this endpoint ([see above](#requests)).
*/
create(
- body: CertificateCreateParams,
+ body: OriginCACertificateCreateParams,
options?: Core.RequestOptions,
- ): Core.APIPromise {
+ ): Core.APIPromise {
return (
this._client.post('/certificates', { body, ...options }) as Core.APIPromise<{
- result: CertificateCreateResponse;
+ result: OriginCACertificateCreateResponse;
}>
)._thenUnwrap((obj) => obj.result);
}
@@ -25,10 +25,10 @@ export class Certificates extends APIResource {
* Key as your User Service Key when calling this endpoint
* ([see above](#requests)).
*/
- list(options?: Core.RequestOptions): Core.APIPromise {
+ list(options?: Core.RequestOptions): Core.APIPromise {
return (
this._client.get('/certificates', options) as Core.APIPromise<{
- result: CertificateListResponse | null;
+ result: OriginCACertificateListResponse | null;
}>
)._thenUnwrap((obj) => obj.result);
}
@@ -38,10 +38,13 @@ export class Certificates extends APIResource {
* CA Key as your User Service Key when calling this endpoint
* ([see above](#requests)).
*/
- delete(certificateId: string, options?: Core.RequestOptions): Core.APIPromise {
+ delete(
+ certificateId: string,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
return (
this._client.delete(`/certificates/${certificateId}`, options) as Core.APIPromise<{
- result: CertificateDeleteResponse;
+ result: OriginCACertificateDeleteResponse;
}>
)._thenUnwrap((obj) => obj.result);
}
@@ -51,10 +54,10 @@ export class Certificates extends APIResource {
* Key as your User Service Key when calling this endpoint
* ([see above](#requests)).
*/
- get(certificateId: string, options?: Core.RequestOptions): Core.APIPromise {
+ get(certificateId: string, options?: Core.RequestOptions): Core.APIPromise {
return (
this._client.get(`/certificates/${certificateId}`, options) as Core.APIPromise<{
- result: CertificateGetResponse;
+ result: OriginCACertificateGetResponse;
}>
)._thenUnwrap((obj) => obj.result);
}
@@ -99,20 +102,20 @@ export interface OriginCACertificate {
expires_on?: string;
}
-export type CertificateCreateResponse = unknown | string;
+export type OriginCACertificateCreateResponse = unknown | string;
-export type CertificateListResponse = Array;
+export type OriginCACertificateListResponse = Array;
-export interface CertificateDeleteResponse {
+export interface OriginCACertificateDeleteResponse {
/**
* Identifier
*/
id?: string;
}
-export type CertificateGetResponse = unknown | string;
+export type OriginCACertificateGetResponse = unknown | string;
-export interface CertificateCreateParams {
+export interface OriginCACertificateCreateParams {
/**
* The Certificate Signing Request (CSR). Must be newline-encoded.
*/
@@ -136,11 +139,11 @@ export interface CertificateCreateParams {
requested_validity?: 7 | 30 | 90 | 365 | 730 | 1095 | 5475;
}
-export namespace Certificates {
- export import OriginCACertificate = CertificatesAPI.OriginCACertificate;
- export import CertificateCreateResponse = CertificatesAPI.CertificateCreateResponse;
- export import CertificateListResponse = CertificatesAPI.CertificateListResponse;
- export import CertificateDeleteResponse = CertificatesAPI.CertificateDeleteResponse;
- export import CertificateGetResponse = CertificatesAPI.CertificateGetResponse;
- export import CertificateCreateParams = CertificatesAPI.CertificateCreateParams;
+export namespace OriginCACertificates {
+ export import OriginCACertificate = OriginCACertificatesAPI.OriginCACertificate;
+ export import OriginCACertificateCreateResponse = OriginCACertificatesAPI.OriginCACertificateCreateResponse;
+ export import OriginCACertificateListResponse = OriginCACertificatesAPI.OriginCACertificateListResponse;
+ export import OriginCACertificateDeleteResponse = OriginCACertificatesAPI.OriginCACertificateDeleteResponse;
+ export import OriginCACertificateGetResponse = OriginCACertificatesAPI.OriginCACertificateGetResponse;
+ export import OriginCACertificateCreateParams = OriginCACertificatesAPI.OriginCACertificateCreateParams;
}
diff --git a/src/resources/user/billing/billing.ts b/src/resources/user/billing/billing.ts
index d8ad25a2c7..bef24bc9f2 100644
--- a/src/resources/user/billing/billing.ts
+++ b/src/resources/user/billing/billing.ts
@@ -2,11 +2,11 @@
import { APIResource } from 'cloudflare/resource';
import * as HistoryAPI from 'cloudflare/resources/user/billing/history';
-import * as ProfilesAPI from 'cloudflare/resources/user/billing/profiles';
+import * as ProfileAPI from 'cloudflare/resources/user/billing/profile';
export class Billing extends APIResource {
history: HistoryAPI.History = new HistoryAPI.History(this._client);
- profiles: ProfilesAPI.Profiles = new ProfilesAPI.Profiles(this._client);
+ profile: ProfileAPI.Profile = new ProfileAPI.Profile(this._client);
}
export namespace Billing {
@@ -14,6 +14,6 @@ export namespace Billing {
export import BillSubsAPIBillingHistory = HistoryAPI.BillSubsAPIBillingHistory;
export import HistoryGetResponse = HistoryAPI.HistoryGetResponse;
export import HistoryGetParams = HistoryAPI.HistoryGetParams;
- export import Profiles = ProfilesAPI.Profiles;
- export import ProfileGetResponse = ProfilesAPI.ProfileGetResponse;
+ export import Profile = ProfileAPI.Profile;
+ export import ProfileGetResponse = ProfileAPI.ProfileGetResponse;
}
diff --git a/src/resources/user/billing/index.ts b/src/resources/user/billing/index.ts
index ec17806d32..dd3e43cfa4 100644
--- a/src/resources/user/billing/index.ts
+++ b/src/resources/user/billing/index.ts
@@ -2,4 +2,4 @@
export { BillSubsAPIBillingHistory, HistoryGetResponse, HistoryGetParams, History } from './history';
export { Billing } from './billing';
-export { ProfileGetResponse, Profiles } from './profiles';
+export { ProfileGetResponse, Profile } from './profile';
diff --git a/src/resources/user/billing/profiles.ts b/src/resources/user/billing/profile.ts
similarity index 70%
rename from src/resources/user/billing/profiles.ts
rename to src/resources/user/billing/profile.ts
index 2e5f020073..559e8a0035 100644
--- a/src/resources/user/billing/profiles.ts
+++ b/src/resources/user/billing/profile.ts
@@ -2,9 +2,9 @@
import * as Core from 'cloudflare/core';
import { APIResource } from 'cloudflare/resource';
-import * as ProfilesAPI from 'cloudflare/resources/user/billing/profiles';
+import * as ProfileAPI from 'cloudflare/resources/user/billing/profile';
-export class Profiles extends APIResource {
+export class Profile extends APIResource {
/**
* Accesses your billing profile object.
*/
@@ -17,6 +17,6 @@ export class Profiles extends APIResource {
export type ProfileGetResponse = unknown | string | null;
-export namespace Profiles {
- export import ProfileGetResponse = ProfilesAPI.ProfileGetResponse;
+export namespace Profile {
+ export import ProfileGetResponse = ProfileAPI.ProfileGetResponse;
}
diff --git a/src/resources/zero-trust/gateway/gateway.ts b/src/resources/zero-trust/gateway/gateway.ts
index c3609538a6..e4852664a7 100644
--- a/src/resources/zero-trust/gateway/gateway.ts
+++ b/src/resources/zero-trust/gateway/gateway.ts
@@ -8,7 +8,7 @@ import * as AuditSSHSettingsAPI from 'cloudflare/resources/zero-trust/gateway/au
import * as CategoriesAPI from 'cloudflare/resources/zero-trust/gateway/categories';
import * as ConfigurationsAPI from 'cloudflare/resources/zero-trust/gateway/configurations';
import * as LocationsAPI from 'cloudflare/resources/zero-trust/gateway/locations';
-import * as LoggingsAPI from 'cloudflare/resources/zero-trust/gateway/loggings';
+import * as LoggingAPI from 'cloudflare/resources/zero-trust/gateway/logging';
import * as ProxyEndpointsAPI from 'cloudflare/resources/zero-trust/gateway/proxy-endpoints';
import * as RulesAPI from 'cloudflare/resources/zero-trust/gateway/rules';
import * as ListsAPI from 'cloudflare/resources/zero-trust/gateway/lists/lists';
@@ -22,7 +22,7 @@ export class Gateway extends APIResource {
configurations: ConfigurationsAPI.Configurations = new ConfigurationsAPI.Configurations(this._client);
lists: ListsAPI.Lists = new ListsAPI.Lists(this._client);
locations: LocationsAPI.Locations = new LocationsAPI.Locations(this._client);
- loggings: LoggingsAPI.Loggings = new LoggingsAPI.Loggings(this._client);
+ logging: LoggingAPI.Logging = new LoggingAPI.Logging(this._client);
proxyEndpoints: ProxyEndpointsAPI.ProxyEndpoints = new ProxyEndpointsAPI.ProxyEndpoints(this._client);
rules: RulesAPI.Rules = new RulesAPI.Rules(this._client);
@@ -137,10 +137,10 @@ export namespace Gateway {
export import LocationListParams = LocationsAPI.LocationListParams;
export import LocationDeleteParams = LocationsAPI.LocationDeleteParams;
export import LocationGetParams = LocationsAPI.LocationGetParams;
- export import Loggings = LoggingsAPI.Loggings;
- export import ZeroTrustGatewayGatewayAccountLoggingSettings = LoggingsAPI.ZeroTrustGatewayGatewayAccountLoggingSettings;
- export import LoggingUpdateParams = LoggingsAPI.LoggingUpdateParams;
- export import LoggingGetParams = LoggingsAPI.LoggingGetParams;
+ export import Logging = LoggingAPI.Logging;
+ export import ZeroTrustGatewayGatewayAccountLoggingSettings = LoggingAPI.ZeroTrustGatewayGatewayAccountLoggingSettings;
+ export import LoggingUpdateParams = LoggingAPI.LoggingUpdateParams;
+ export import LoggingGetParams = LoggingAPI.LoggingGetParams;
export import ProxyEndpoints = ProxyEndpointsAPI.ProxyEndpoints;
export import ZeroTrustGatewayProxyEndpoints = ProxyEndpointsAPI.ZeroTrustGatewayProxyEndpoints;
export import ProxyEndpointListResponse = ProxyEndpointsAPI.ProxyEndpointListResponse;
diff --git a/src/resources/zero-trust/gateway/index.ts b/src/resources/zero-trust/gateway/index.ts
index a37ee2a652..c6854369a8 100644
--- a/src/resources/zero-trust/gateway/index.ts
+++ b/src/resources/zero-trust/gateway/index.ts
@@ -27,8 +27,8 @@ export {
ZeroTrustGatewayGatewayAccountLoggingSettings,
LoggingUpdateParams,
LoggingGetParams,
- Loggings,
-} from './loggings';
+ Logging,
+} from './logging';
export {
ZeroTrustGatewayLists,
ListCreateResponse,
diff --git a/src/resources/zero-trust/gateway/loggings.ts b/src/resources/zero-trust/gateway/logging.ts
similarity index 89%
rename from src/resources/zero-trust/gateway/loggings.ts
rename to src/resources/zero-trust/gateway/logging.ts
index 1744b98edd..afa14311c2 100644
--- a/src/resources/zero-trust/gateway/loggings.ts
+++ b/src/resources/zero-trust/gateway/logging.ts
@@ -2,9 +2,9 @@
import * as Core from 'cloudflare/core';
import { APIResource } from 'cloudflare/resource';
-import * as LoggingsAPI from 'cloudflare/resources/zero-trust/gateway/loggings';
+import * as LoggingAPI from 'cloudflare/resources/zero-trust/gateway/logging';
-export class Loggings extends APIResource {
+export class Logging extends APIResource {
/**
* Updates logging settings for the current Zero Trust account.
*/
@@ -116,8 +116,8 @@ export interface LoggingGetParams {
account_id: unknown;
}
-export namespace Loggings {
- export import ZeroTrustGatewayGatewayAccountLoggingSettings = LoggingsAPI.ZeroTrustGatewayGatewayAccountLoggingSettings;
- export import LoggingUpdateParams = LoggingsAPI.LoggingUpdateParams;
- export import LoggingGetParams = LoggingsAPI.LoggingGetParams;
+export namespace Logging {
+ export import ZeroTrustGatewayGatewayAccountLoggingSettings = LoggingAPI.ZeroTrustGatewayGatewayAccountLoggingSettings;
+ export import LoggingUpdateParams = LoggingAPI.LoggingUpdateParams;
+ export import LoggingGetParams = LoggingAPI.LoggingGetParams;
}
diff --git a/tests/api-resources/certificates.test.ts b/tests/api-resources/origin-ca-certificates.test.ts
similarity index 81%
rename from tests/api-resources/certificates.test.ts
rename to tests/api-resources/origin-ca-certificates.test.ts
index af78c57a1f..733f7b7873 100644
--- a/tests/api-resources/certificates.test.ts
+++ b/tests/api-resources/origin-ca-certificates.test.ts
@@ -9,10 +9,10 @@ const cloudflare = new Cloudflare({
baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010',
});
-describe('resource certificates', () => {
+describe('resource originCACertificates', () => {
// skipped: tests are disabled for the time being
test.skip('create', async () => {
- const responsePromise = cloudflare.certificates.create({});
+ const responsePromise = cloudflare.originCACertificates.create({});
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
@@ -24,7 +24,7 @@ describe('resource certificates', () => {
// skipped: tests are disabled for the time being
test.skip('list', async () => {
- const responsePromise = cloudflare.certificates.list();
+ const responsePromise = cloudflare.originCACertificates.list();
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
@@ -37,14 +37,14 @@ describe('resource certificates', () => {
// skipped: tests are disabled for the time being
test.skip('list: request options instead of params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
- await expect(cloudflare.certificates.list({ path: '/_stainless_unknown_path' })).rejects.toThrow(
+ await expect(cloudflare.originCACertificates.list({ path: '/_stainless_unknown_path' })).rejects.toThrow(
Cloudflare.NotFoundError,
);
});
// skipped: tests are disabled for the time being
test.skip('delete', async () => {
- const responsePromise = cloudflare.certificates.delete('023e105f4ecef8ad9ca31a8372d0c353');
+ const responsePromise = cloudflare.originCACertificates.delete('023e105f4ecef8ad9ca31a8372d0c353');
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
@@ -56,7 +56,7 @@ describe('resource certificates', () => {
// skipped: tests are disabled for the time being
test.skip('get', async () => {
- const responsePromise = cloudflare.certificates.get('023e105f4ecef8ad9ca31a8372d0c353');
+ const responsePromise = cloudflare.originCACertificates.get('023e105f4ecef8ad9ca31a8372d0c353');
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
@@ -70,7 +70,9 @@ describe('resource certificates', () => {
test.skip('get: request options instead of params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
- cloudflare.certificates.get('023e105f4ecef8ad9ca31a8372d0c353', { path: '/_stainless_unknown_path' }),
+ cloudflare.originCACertificates.get('023e105f4ecef8ad9ca31a8372d0c353', {
+ path: '/_stainless_unknown_path',
+ }),
).rejects.toThrow(Cloudflare.NotFoundError);
});
});
diff --git a/tests/api-resources/user/billing/profiles.test.ts b/tests/api-resources/user/billing/profile.test.ts
similarity index 83%
rename from tests/api-resources/user/billing/profiles.test.ts
rename to tests/api-resources/user/billing/profile.test.ts
index 481ab5be38..4ff0229bae 100644
--- a/tests/api-resources/user/billing/profiles.test.ts
+++ b/tests/api-resources/user/billing/profile.test.ts
@@ -9,10 +9,10 @@ const cloudflare = new Cloudflare({
baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010',
});
-describe('resource profiles', () => {
+describe('resource profile', () => {
// skipped: tests are disabled for the time being
test.skip('get', async () => {
- const responsePromise = cloudflare.user.billing.profiles.get();
+ const responsePromise = cloudflare.user.billing.profile.get();
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
@@ -25,7 +25,7 @@ describe('resource profiles', () => {
// skipped: tests are disabled for the time being
test.skip('get: request options instead of params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
- await expect(cloudflare.user.billing.profiles.get({ path: '/_stainless_unknown_path' })).rejects.toThrow(
+ await expect(cloudflare.user.billing.profile.get({ path: '/_stainless_unknown_path' })).rejects.toThrow(
Cloudflare.NotFoundError,
);
});
diff --git a/tests/api-resources/zero-trust/gateway/loggings.test.ts b/tests/api-resources/zero-trust/gateway/logging.test.ts
similarity index 91%
rename from tests/api-resources/zero-trust/gateway/loggings.test.ts
rename to tests/api-resources/zero-trust/gateway/logging.test.ts
index f772ae0e1e..bf128d9110 100644
--- a/tests/api-resources/zero-trust/gateway/loggings.test.ts
+++ b/tests/api-resources/zero-trust/gateway/logging.test.ts
@@ -9,10 +9,10 @@ const cloudflare = new Cloudflare({
baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010',
});
-describe('resource loggings', () => {
+describe('resource logging', () => {
// skipped: tests are disabled for the time being
test.skip('update: only required params', async () => {
- const responsePromise = cloudflare.zeroTrust.gateway.loggings.update({
+ const responsePromise = cloudflare.zeroTrust.gateway.logging.update({
account_id: '699d98642c564d2e855e9661899b7252',
});
const rawResponse = await responsePromise.asResponse();
@@ -26,7 +26,7 @@ describe('resource loggings', () => {
// skipped: tests are disabled for the time being
test.skip('update: required and optional params', async () => {
- const response = await cloudflare.zeroTrust.gateway.loggings.update({
+ const response = await cloudflare.zeroTrust.gateway.logging.update({
account_id: '699d98642c564d2e855e9661899b7252',
redact_pii: true,
settings_by_rule_type: { dns: {}, http: {}, l4: {} },
@@ -35,7 +35,7 @@ describe('resource loggings', () => {
// skipped: tests are disabled for the time being
test.skip('get: only required params', async () => {
- const responsePromise = cloudflare.zeroTrust.gateway.loggings.get({
+ const responsePromise = cloudflare.zeroTrust.gateway.logging.get({
account_id: '699d98642c564d2e855e9661899b7252',
});
const rawResponse = await responsePromise.asResponse();
@@ -49,7 +49,7 @@ describe('resource loggings', () => {
// skipped: tests are disabled for the time being
test.skip('get: required and optional params', async () => {
- const response = await cloudflare.zeroTrust.gateway.loggings.get({
+ const response = await cloudflare.zeroTrust.gateway.logging.get({
account_id: '699d98642c564d2e855e9661899b7252',
});
});