Skip to content

Commit

Permalink
feat(api): api update (#2120)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and meorphis committed Jan 13, 2025
1 parent 5d72e9d commit 55849b2
Show file tree
Hide file tree
Showing 12 changed files with 352 additions and 309 deletions.
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 1365
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-8ab175377b40ec09207fa70914e51f8bec9d6030f6f628635d56f4c3321d4809.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4593529df2c582c5e4de92308af748d9f8abbca6c92fff7e99e08bd463b7271e.yml
12 changes: 4 additions & 8 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,12 @@ Types:
- <code><a href="./src/resources/shared.ts">ErrorData</a></code>
- <code><a href="./src/resources/shared.ts">Identifier</a></code>
- <code><a href="./src/resources/shared.ts">LoadBalancerPreview</a></code>
- <code><a href="./src/resources/shared.ts">Member</a></code>
- <code><a href="./src/resources/shared.ts">PaginationInfo</a></code>
- <code><a href="./src/resources/shared.ts">Permission</a></code>
- <code><a href="./src/resources/shared.ts">PermissionGrant</a></code>
- <code><a href="./src/resources/shared.ts">RatePlan</a></code>
- <code><a href="./src/resources/shared.ts">ResponseInfo</a></code>
- <code><a href="./src/resources/shared.ts">Result</a></code>
- <code><a href="./src/resources/shared.ts">Role</a></code>
- <code><a href="./src/resources/shared.ts">SortDirection</a></code>
- <code><a href="./src/resources/shared.ts">Subscription</a></code>
- <code><a href="./src/resources/shared.ts">SubscriptionComponent</a></code>
Expand All @@ -43,7 +41,6 @@ Methods:
Types:

- <code><a href="./src/resources/accounts/members.ts">Status</a></code>
- <code><a href="./src/resources/accounts/members.ts">UserWithInviteCode</a></code>
- <code><a href="./src/resources/accounts/members.ts">MemberCreateResponse</a></code>
- <code><a href="./src/resources/accounts/members.ts">MemberUpdateResponse</a></code>
- <code><a href="./src/resources/accounts/members.ts">MemberListResponse</a></code>
Expand All @@ -62,11 +59,12 @@ Methods:

Types:

- <code><a href="./src/resources/accounts/roles.ts">RoleListResponse</a></code>
- <code><a href="./src/resources/accounts/roles.ts">RoleGetResponse</a></code>

Methods:

- <code title="get /accounts/{account_id}/roles">client.accounts.roles.<a href="./src/resources/accounts/roles.ts">list</a>({ ...params }) -> RolesSinglePage</code>
- <code title="get /accounts/{account_id}/roles">client.accounts.roles.<a href="./src/resources/accounts/roles.ts">list</a>({ ...params }) -> RoleListResponsesSinglePage</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>

## Subscriptions
Expand Down Expand Up @@ -172,14 +170,12 @@ Methods:
Types:

- <code><a href="./src/resources/user/invites.ts">Invite</a></code>
- <code><a href="./src/resources/user/invites.ts">InviteEditResponse</a></code>
- <code><a href="./src/resources/user/invites.ts">InviteGetResponse</a></code>

Methods:

- <code title="get /user/invites">client.user.invites.<a href="./src/resources/user/invites.ts">list</a>() -> InvitesSinglePage</code>
- <code title="patch /user/invites/{invite_id}">client.user.invites.<a href="./src/resources/user/invites.ts">edit</a>(inviteId, { ...params }) -> InviteEditResponse</code>
- <code title="get /user/invites/{invite_id}">client.user.invites.<a href="./src/resources/user/invites.ts">get</a>(inviteId) -> InviteGetResponse</code>
- <code title="patch /user/invites/{invite_id}">client.user.invites.<a href="./src/resources/user/invites.ts">edit</a>(inviteId, { ...params }) -> Invite</code>
- <code title="get /user/invites/{invite_id}">client.user.invites.<a href="./src/resources/user/invites.ts">get</a>(inviteId) -> Invite</code>

## Organizations

Expand Down
2 changes: 0 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -808,14 +808,12 @@ export declare namespace Cloudflare {
export type ErrorData = API.ErrorData;
export type Identifier = API.Identifier;
export type LoadBalancerPreview = API.LoadBalancerPreview;
export type Member = API.Member;
export type PaginationInfo = API.PaginationInfo;
export type Permission = API.Permission;
export type PermissionGrant = API.PermissionGrant;
export type RatePlan = API.RatePlan;
export type ResponseInfo = API.ResponseInfo;
export type Result = API.Result;
export type Role = API.Role;
export type SortDirection = API.SortDirection;
export type Subscription = API.Subscription;
export type SubscriptionComponent = API.SubscriptionComponent;
Expand Down
34 changes: 25 additions & 9 deletions src/resources/accounts/accounts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,16 @@ import {
MemberUpdateResponse,
Members,
Status,
UserWithInviteCode,
} from './members';
import * as RolesAPI from './roles';
import { RoleGetParams, RoleGetResponse, RoleListParams, Roles } from './roles';
import {
RoleGetParams,
RoleGetResponse,
RoleListParams,
RoleListResponse,
RoleListResponsesSinglePage,
Roles,
} from './roles';
import * as SubscriptionsAPI from './subscriptions';
import {
SubscriptionCreateParams,
Expand Down Expand Up @@ -143,8 +149,8 @@ export namespace Account {
abuse_contact_email?: string;

/**
* Specifies the default nameservers to be used for new zones added to this
* account.
* @deprecated: Specifies the default nameservers to be used for new zones added to
* this account.
*
* - `cloudflare.standard` for Cloudflare-branded nameservers
* - `custom.account` for account custom nameservers
Expand All @@ -153,6 +159,9 @@ export namespace Account {
* See
* [Custom Nameservers](https://developers.cloudflare.com/dns/additional-options/custom-nameservers/)
* for more information.
*
* Deprecated in favor of
* [DNS Settings](https://developers.cloudflare.com/api/operations/dns-settings-for-an-account-update-dns-settings).
*/
default_nameservers?: 'cloudflare.standard' | 'custom.account' | 'custom.tenant';

Expand All @@ -166,7 +175,8 @@ export namespace Account {
* @deprecated: Indicates whether new zones should use the account-level custom
* nameservers by default.
*
* Deprecated in favor of `default_nameservers`.
* Deprecated in favor of
* [DNS Settings](https://developers.cloudflare.com/api/operations/dns-settings-for-an-account-update-dns-settings).
*/
use_account_custom_ns_by_default?: boolean;
}
Expand Down Expand Up @@ -241,8 +251,8 @@ export namespace AccountUpdateParams {
abuse_contact_email?: string;

/**
* Specifies the default nameservers to be used for new zones added to this
* account.
* @deprecated: Specifies the default nameservers to be used for new zones added to
* this account.
*
* - `cloudflare.standard` for Cloudflare-branded nameservers
* - `custom.account` for account custom nameservers
Expand All @@ -251,6 +261,9 @@ export namespace AccountUpdateParams {
* See
* [Custom Nameservers](https://developers.cloudflare.com/dns/additional-options/custom-nameservers/)
* for more information.
*
* Deprecated in favor of
* [DNS Settings](https://developers.cloudflare.com/api/operations/dns-settings-for-an-account-update-dns-settings).
*/
default_nameservers?: 'cloudflare.standard' | 'custom.account' | 'custom.tenant';

Expand All @@ -264,7 +277,8 @@ export namespace AccountUpdateParams {
* @deprecated: Indicates whether new zones should use the account-level custom
* nameservers by default.
*
* Deprecated in favor of `default_nameservers`.
* Deprecated in favor of
* [DNS Settings](https://developers.cloudflare.com/api/operations/dns-settings-for-an-account-update-dns-settings).
*/
use_account_custom_ns_by_default?: boolean;
}
Expand Down Expand Up @@ -299,13 +313,13 @@ export interface AccountGetParams {
Accounts.Members = Members;
Accounts.MemberListResponsesV4PagePaginationArray = MemberListResponsesV4PagePaginationArray;
Accounts.Roles = Roles;
Accounts.RoleListResponsesSinglePage = RoleListResponsesSinglePage;
Accounts.Subscriptions = Subscriptions;

export declare namespace Accounts {
export {
Members as Members,
type Status as Status,
type UserWithInviteCode as UserWithInviteCode,
type MemberCreateResponse as MemberCreateResponse,
type MemberUpdateResponse as MemberUpdateResponse,
type MemberListResponse as MemberListResponse,
Expand All @@ -321,7 +335,9 @@ export declare namespace Accounts {

export {
Roles as Roles,
type RoleListResponse as RoleListResponse,
type RoleGetResponse as RoleGetResponse,
RoleListResponsesSinglePage as RoleListResponsesSinglePage,
type RoleListParams as RoleListParams,
type RoleGetParams as RoleGetParams,
};
Expand Down
10 changes: 8 additions & 2 deletions src/resources/accounts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ export {
MemberListResponsesV4PagePaginationArray,
Members,
type Status,
type UserWithInviteCode,
type MemberCreateResponse,
type MemberUpdateResponse,
type MemberListResponse,
Expand All @@ -17,7 +16,14 @@ export {
type MemberDeleteParams,
type MemberGetParams,
} from './members';
export { Roles, type RoleGetResponse, type RoleListParams, type RoleGetParams } from './roles';
export {
RoleListResponsesSinglePage,
Roles,
type RoleListResponse,
type RoleGetResponse,
type RoleListParams,
type RoleGetParams,
} from './roles';
export {
Subscriptions,
type SubscriptionCreateResponse,
Expand Down
Loading

0 comments on commit 55849b2

Please sign in to comment.