Skip to content

Commit

Permalink
feat: update via SDK Studio (#134)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored Mar 11, 2024
1 parent 40efa01 commit 30ae245
Show file tree
Hide file tree
Showing 13 changed files with 97 additions and 92 deletions.
34 changes: 17 additions & 17 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,22 +43,22 @@ Methods:
- <code title="get /accounts/{account_id}/roles">client.accounts.roles.<a href="./src/resources/accounts/roles.ts">list</a>({ ...params }) -> RoleListResponse | null</code>
- <code title="get /accounts/{account_id}/roles/{role_id}">client.accounts.roles.<a href="./src/resources/accounts/roles.ts">get</a>(roleId, { ...params }) -> RoleGetResponse</code>

# Certificates
# OriginCACertificates

Types:

- <code><a href="./src/resources/certificates.ts">OriginCACertificate</a></code>
- <code><a href="./src/resources/certificates.ts">CertificateCreateResponse</a></code>
- <code><a href="./src/resources/certificates.ts">CertificateListResponse</a></code>
- <code><a href="./src/resources/certificates.ts">CertificateDeleteResponse</a></code>
- <code><a href="./src/resources/certificates.ts">CertificateGetResponse</a></code>
- <code><a href="./src/resources/origin-ca-certificates.ts">OriginCACertificate</a></code>
- <code><a href="./src/resources/origin-ca-certificates.ts">OriginCACertificateCreateResponse</a></code>
- <code><a href="./src/resources/origin-ca-certificates.ts">OriginCACertificateListResponse</a></code>
- <code><a href="./src/resources/origin-ca-certificates.ts">OriginCACertificateDeleteResponse</a></code>
- <code><a href="./src/resources/origin-ca-certificates.ts">OriginCACertificateGetResponse</a></code>

Methods:

- <code title="post /certificates">client.certificates.<a href="./src/resources/certificates.ts">create</a>({ ...params }) -> CertificateCreateResponse</code>
- <code title="get /certificates">client.certificates.<a href="./src/resources/certificates.ts">list</a>() -> CertificateListResponse | null</code>
- <code title="delete /certificates/{certificate_id}">client.certificates.<a href="./src/resources/certificates.ts">delete</a>(certificateId) -> CertificateDeleteResponse</code>
- <code title="get /certificates/{certificate_id}">client.certificates.<a href="./src/resources/certificates.ts">get</a>(certificateId) -> CertificateGetResponse</code>
- <code title="post /certificates">client.originCACertificates.<a href="./src/resources/origin-ca-certificates.ts">create</a>({ ...params }) -> OriginCACertificateCreateResponse</code>
- <code title="get /certificates">client.originCACertificates.<a href="./src/resources/origin-ca-certificates.ts">list</a>() -> OriginCACertificateListResponse | null</code>
- <code title="delete /certificates/{certificate_id}">client.originCACertificates.<a href="./src/resources/origin-ca-certificates.ts">delete</a>(certificateId) -> OriginCACertificateDeleteResponse</code>
- <code title="get /certificates/{certificate_id}">client.originCACertificates.<a href="./src/resources/origin-ca-certificates.ts">get</a>(certificateId) -> OriginCACertificateGetResponse</code>

# IPs

Expand Down Expand Up @@ -124,15 +124,15 @@ Methods:

- <code title="get /user/billing/history">client.user.billing.history.<a href="./src/resources/user/billing/history.ts">get</a>({ ...params }) -> HistoryGetResponse | null</code>

### Profiles
### Profile

Types:

- <code><a href="./src/resources/user/billing/profiles.ts">ProfileGetResponse</a></code>
- <code><a href="./src/resources/user/billing/profile.ts">ProfileGetResponse</a></code>

Methods:

- <code title="get /user/billing/profile">client.user.billing.profiles.<a href="./src/resources/user/billing/profiles.ts">get</a>() -> ProfileGetResponse</code>
- <code title="get /user/billing/profile">client.user.billing.profile.<a href="./src/resources/user/billing/profile.ts">get</a>() -> ProfileGetResponse</code>

## Firewall

Expand Down Expand Up @@ -4926,16 +4926,16 @@ Methods:
- <code title="delete /accounts/{account_id}/gateway/locations/{location_id}">client.zeroTrust.gateway.locations.<a href="./src/resources/zero-trust/gateway/locations.ts">delete</a>(locationId, { ...params }) -> LocationDeleteResponse</code>
- <code title="get /accounts/{account_id}/gateway/locations/{location_id}">client.zeroTrust.gateway.locations.<a href="./src/resources/zero-trust/gateway/locations.ts">get</a>(locationId, { ...params }) -> ZeroTrustGatewayLocations</code>

### Loggings
### Logging

Types:

- <code><a href="./src/resources/zero-trust/gateway/loggings.ts">ZeroTrustGatewayGatewayAccountLoggingSettings</a></code>
- <code><a href="./src/resources/zero-trust/gateway/logging.ts">ZeroTrustGatewayGatewayAccountLoggingSettings</a></code>

Methods:

- <code title="put /accounts/{account_id}/gateway/logging">client.zeroTrust.gateway.loggings.<a href="./src/resources/zero-trust/gateway/loggings.ts">update</a>({ ...params }) -> ZeroTrustGatewayGatewayAccountLoggingSettings</code>
- <code title="get /accounts/{account_id}/gateway/logging">client.zeroTrust.gateway.loggings.<a href="./src/resources/zero-trust/gateway/loggings.ts">get</a>({ ...params }) -> ZeroTrustGatewayGatewayAccountLoggingSettings</code>
- <code title="put /accounts/{account_id}/gateway/logging">client.zeroTrust.gateway.logging.<a href="./src/resources/zero-trust/gateway/logging.ts">update</a>({ ...params }) -> ZeroTrustGatewayGatewayAccountLoggingSettings</code>
- <code title="get /accounts/{account_id}/gateway/logging">client.zeroTrust.gateway.logging.<a href="./src/resources/zero-trust/gateway/logging.ts">get</a>({ ...params }) -> ZeroTrustGatewayGatewayAccountLoggingSettings</code>

### ProxyEndpoints

Expand Down
14 changes: 7 additions & 7 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down
14 changes: 7 additions & 7 deletions src/resources/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<CertificateCreateResponse> {
): Core.APIPromise<OriginCACertificateCreateResponse> {
return (
this._client.post('/certificates', { body, ...options }) as Core.APIPromise<{
result: CertificateCreateResponse;
result: OriginCACertificateCreateResponse;
}>
)._thenUnwrap((obj) => obj.result);
}
Expand All @@ -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<CertificateListResponse | null> {
list(options?: Core.RequestOptions): Core.APIPromise<OriginCACertificateListResponse | null> {
return (
this._client.get('/certificates', options) as Core.APIPromise<{
result: CertificateListResponse | null;
result: OriginCACertificateListResponse | null;
}>
)._thenUnwrap((obj) => obj.result);
}
Expand All @@ -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<CertificateDeleteResponse> {
delete(
certificateId: string,
options?: Core.RequestOptions,
): Core.APIPromise<OriginCACertificateDeleteResponse> {
return (
this._client.delete(`/certificates/${certificateId}`, options) as Core.APIPromise<{
result: CertificateDeleteResponse;
result: OriginCACertificateDeleteResponse;
}>
)._thenUnwrap((obj) => obj.result);
}
Expand All @@ -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<CertificateGetResponse> {
get(certificateId: string, options?: Core.RequestOptions): Core.APIPromise<OriginCACertificateGetResponse> {
return (
this._client.get(`/certificates/${certificateId}`, options) as Core.APIPromise<{
result: CertificateGetResponse;
result: OriginCACertificateGetResponse;
}>
)._thenUnwrap((obj) => obj.result);
}
Expand Down Expand Up @@ -99,20 +102,20 @@ export interface OriginCACertificate {
expires_on?: string;
}

export type CertificateCreateResponse = unknown | string;
export type OriginCACertificateCreateResponse = unknown | string;

export type CertificateListResponse = Array<OriginCACertificate>;
export type OriginCACertificateListResponse = Array<OriginCACertificate>;

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.
*/
Expand All @@ -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;
}
8 changes: 4 additions & 4 deletions src/resources/user/billing/billing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@

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 {
export import History = HistoryAPI.History;
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;
}
2 changes: 1 addition & 1 deletion src/resources/user/billing/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand All @@ -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;
}
12 changes: 6 additions & 6 deletions src/resources/zero-trust/gateway/gateway.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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);

Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/resources/zero-trust/gateway/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ export {
ZeroTrustGatewayGatewayAccountLoggingSettings,
LoggingUpdateParams,
LoggingGetParams,
Loggings,
} from './loggings';
Logging,
} from './logging';
export {
ZeroTrustGatewayLists,
ListCreateResponse,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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;
}
Loading

0 comments on commit 30ae245

Please sign in to comment.