Skip to content

Commit

Permalink
feat: update via SDK Studio (#121)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored Mar 8, 2024
1 parent 8378402 commit 67434b5
Show file tree
Hide file tree
Showing 454 changed files with 8,184 additions and 59,158 deletions.
1,760 changes: 747 additions & 1,013 deletions api.md

Large diffs are not rendered by default.

89 changes: 37 additions & 52 deletions src/index.ts

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/resources/accounts/accounts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ export namespace Accounts {
export import MemberDeleteParams = MembersAPI.MemberDeleteParams;
export import MemberGetParams = MembersAPI.MemberGetParams;
export import Roles = RolesAPI.Roles;
export import IamSchemasRole = RolesAPI.IamSchemasRole;
export import RoleListResponse = RolesAPI.RoleListResponse;
export import RoleGetResponse = RolesAPI.RoleGetResponse;
export import RoleListParams = RolesAPI.RoleListParams;
Expand Down
9 changes: 8 additions & 1 deletion src/resources/accounts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,11 @@ export {
MemberListResponsesV4PagePaginationArray,
Members,
} from './members';
export { RoleListResponse, RoleGetResponse, RoleListParams, RoleGetParams, Roles } from './roles';
export {
IamSchemasRole,
RoleListResponse,
RoleGetResponse,
RoleListParams,
RoleGetParams,
Roles,
} from './roles';
27 changes: 2 additions & 25 deletions src/resources/accounts/members.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import * as Core from 'cloudflare/core';
import { APIResource } from 'cloudflare/resource';
import * as MembersAPI from 'cloudflare/resources/accounts/members';
import * as RolesAPI from 'cloudflare/resources/accounts/roles';
import { V4PagePaginationArray, type V4PagePaginationArrayParams } from 'cloudflare/pagination';

export class Members extends APIResource {
Expand Down Expand Up @@ -443,38 +444,14 @@ export interface MemberListResponse {
/**
* Roles assigned to this Member.
*/
roles: Array<MemberListResponse.Role>;
roles: Array<RolesAPI.IamSchemasRole>;

/**
* A member's status in the organization.
*/
status: 'accepted' | 'invited';
}

export namespace MemberListResponse {
export interface Role {
/**
* Role identifier tag.
*/
id: string;

/**
* Description of role's permissions.
*/
description: string;

/**
* Role Name.
*/
name: string;

/**
* Access permissions for this User.
*/
permissions: Array<string>;
}
}

export interface MemberDeleteResponse {
/**
* Identifier
Expand Down
41 changes: 20 additions & 21 deletions src/resources/accounts/roles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,32 +34,30 @@ export class Roles extends APIResource {
}
}

export type RoleListResponse = Array<RoleListResponse.RoleListResponseItem>;

export namespace RoleListResponse {
export interface RoleListResponseItem {
/**
* Role identifier tag.
*/
id: string;
export interface IamSchemasRole {
/**
* Role identifier tag.
*/
id: string;

/**
* Description of role's permissions.
*/
description: string;
/**
* Description of role's permissions.
*/
description: string;

/**
* Role Name.
*/
name: string;
/**
* Role Name.
*/
name: string;

/**
* Access permissions for this User.
*/
permissions: Array<string>;
}
/**
* Access permissions for this User.
*/
permissions: Array<string>;
}

export type RoleListResponse = Array<IamSchemasRole>;

export type RoleGetResponse = unknown | string | null;

export interface RoleListParams {
Expand All @@ -71,6 +69,7 @@ export interface RoleGetParams {
}

export namespace Roles {
export import IamSchemasRole = RolesAPI.IamSchemasRole;
export import RoleListResponse = RolesAPI.RoleListResponse;
export import RoleGetResponse = RolesAPI.RoleGetResponse;
export import RoleListParams = RolesAPI.RoleListParams;
Expand Down
142 changes: 48 additions & 94 deletions src/resources/addressing/address-maps/address-maps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@ export class AddressMaps extends APIResource {
addressMapId: string,
params: AddressMapEditParams,
options?: Core.RequestOptions,
): Core.APIPromise<AddressMapEditResponse> {
): Core.APIPromise<AddressingAddressMaps> {
const { account_id, ...body } = params;
return (
this._client.patch(`/accounts/${account_id}/addressing/address_maps/${addressMapId}`, {
body,
...options,
}) as Core.APIPromise<{ result: AddressMapEditResponse }>
}) as Core.APIPromise<{ result: AddressingAddressMaps }>
)._thenUnwrap((obj) => obj.result);
}

Expand All @@ -96,6 +96,50 @@ export class AddressMaps extends APIResource {
}
}

export interface AddressingAddressMaps {
/**
* Identifier
*/
id?: string;

/**
* If set to false, then the Address Map cannot be deleted via API. This is true
* for Cloudflare-managed maps.
*/
can_delete?: boolean;

/**
* If set to false, then the IPs on the Address Map cannot be modified via the API.
* This is true for Cloudflare-managed maps.
*/
can_modify_ips?: boolean;

created_at?: string;

/**
* If you have legacy TLS clients which do not send the TLS server name indicator,
* then you can specify one default SNI on the map. If Cloudflare receives a TLS
* handshake from a client without an SNI, it will respond with the default SNI on
* those IPs. The default SNI can be any valid zone or subdomain owned by the
* account.
*/
default_sni?: string | null;

/**
* An optional description field which may be used to describe the types of IPs or
* zones on the map.
*/
description?: string | null;

/**
* Whether the Address Map is enabled or not. Cloudflare's DNS will not respond
* with IP addresses on an Address Map until the map is enabled.
*/
enabled?: boolean | null;

modified_at?: string;
}

export interface AddressMapCreateResponse {
/**
* Identifier
Expand Down Expand Up @@ -181,100 +225,10 @@ export namespace AddressMapCreateResponse {
}
}

export type AddressMapListResponse = Array<AddressMapListResponse.AddressMapListResponseItem>;

export namespace AddressMapListResponse {
export interface AddressMapListResponseItem {
/**
* Identifier
*/
id?: string;

/**
* If set to false, then the Address Map cannot be deleted via API. This is true
* for Cloudflare-managed maps.
*/
can_delete?: boolean;

/**
* If set to false, then the IPs on the Address Map cannot be modified via the API.
* This is true for Cloudflare-managed maps.
*/
can_modify_ips?: boolean;

created_at?: string;

/**
* If you have legacy TLS clients which do not send the TLS server name indicator,
* then you can specify one default SNI on the map. If Cloudflare receives a TLS
* handshake from a client without an SNI, it will respond with the default SNI on
* those IPs. The default SNI can be any valid zone or subdomain owned by the
* account.
*/
default_sni?: string | null;

/**
* An optional description field which may be used to describe the types of IPs or
* zones on the map.
*/
description?: string | null;

/**
* Whether the Address Map is enabled or not. Cloudflare's DNS will not respond
* with IP addresses on an Address Map until the map is enabled.
*/
enabled?: boolean | null;

modified_at?: string;
}
}
export type AddressMapListResponse = Array<AddressingAddressMaps>;

export type AddressMapDeleteResponse = unknown | Array<unknown> | string;

export interface AddressMapEditResponse {
/**
* Identifier
*/
id?: string;

/**
* If set to false, then the Address Map cannot be deleted via API. This is true
* for Cloudflare-managed maps.
*/
can_delete?: boolean;

/**
* If set to false, then the IPs on the Address Map cannot be modified via the API.
* This is true for Cloudflare-managed maps.
*/
can_modify_ips?: boolean;

created_at?: string;

/**
* If you have legacy TLS clients which do not send the TLS server name indicator,
* then you can specify one default SNI on the map. If Cloudflare receives a TLS
* handshake from a client without an SNI, it will respond with the default SNI on
* those IPs. The default SNI can be any valid zone or subdomain owned by the
* account.
*/
default_sni?: string | null;

/**
* An optional description field which may be used to describe the types of IPs or
* zones on the map.
*/
description?: string | null;

/**
* Whether the Address Map is enabled or not. Cloudflare's DNS will not respond
* with IP addresses on an Address Map until the map is enabled.
*/
enabled?: boolean | null;

modified_at?: string;
}

export interface AddressMapGetResponse {
/**
* Identifier
Expand Down Expand Up @@ -429,10 +383,10 @@ export interface AddressMapGetParams {
}

export namespace AddressMaps {
export import AddressingAddressMaps = AddressMapsAPI.AddressingAddressMaps;
export import AddressMapCreateResponse = AddressMapsAPI.AddressMapCreateResponse;
export import AddressMapListResponse = AddressMapsAPI.AddressMapListResponse;
export import AddressMapDeleteResponse = AddressMapsAPI.AddressMapDeleteResponse;
export import AddressMapEditResponse = AddressMapsAPI.AddressMapEditResponse;
export import AddressMapGetResponse = AddressMapsAPI.AddressMapGetResponse;
export import AddressMapCreateParams = AddressMapsAPI.AddressMapCreateParams;
export import AddressMapListParams = AddressMapsAPI.AddressMapListParams;
Expand Down
2 changes: 1 addition & 1 deletion src/resources/addressing/address-maps/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ export {
Accounts,
} from './accounts';
export {
AddressingAddressMaps,
AddressMapCreateResponse,
AddressMapListResponse,
AddressMapDeleteResponse,
AddressMapEditResponse,
AddressMapGetResponse,
AddressMapCreateParams,
AddressMapListParams,
Expand Down
6 changes: 2 additions & 4 deletions src/resources/addressing/addressing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ export namespace Addressing {
export import ServiceListResponse = ServicesAPI.ServiceListResponse;
export import ServiceListParams = ServicesAPI.ServiceListParams;
export import AddressMaps = AddressMapsAPI.AddressMaps;
export import AddressingAddressMaps = AddressMapsAPI.AddressingAddressMaps;
export import AddressMapCreateResponse = AddressMapsAPI.AddressMapCreateResponse;
export import AddressMapListResponse = AddressMapsAPI.AddressMapListResponse;
export import AddressMapDeleteResponse = AddressMapsAPI.AddressMapDeleteResponse;
export import AddressMapEditResponse = AddressMapsAPI.AddressMapEditResponse;
export import AddressMapGetResponse = AddressMapsAPI.AddressMapGetResponse;
export import AddressMapCreateParams = AddressMapsAPI.AddressMapCreateParams;
export import AddressMapListParams = AddressMapsAPI.AddressMapListParams;
Expand All @@ -32,11 +32,9 @@ export namespace Addressing {
export import LOADocumentCreateResponse = LOADocumentsAPI.LOADocumentCreateResponse;
export import LOADocumentCreateParams = LOADocumentsAPI.LOADocumentCreateParams;
export import Prefixes = PrefixesAPI.Prefixes;
export import PrefixCreateResponse = PrefixesAPI.PrefixCreateResponse;
export import AddressingIpamPrefixes = PrefixesAPI.AddressingIpamPrefixes;
export import PrefixListResponse = PrefixesAPI.PrefixListResponse;
export import PrefixDeleteResponse = PrefixesAPI.PrefixDeleteResponse;
export import PrefixEditResponse = PrefixesAPI.PrefixEditResponse;
export import PrefixGetResponse = PrefixesAPI.PrefixGetResponse;
export import PrefixCreateParams = PrefixesAPI.PrefixCreateParams;
export import PrefixListParams = PrefixesAPI.PrefixListParams;
export import PrefixDeleteParams = PrefixesAPI.PrefixDeleteParams;
Expand Down
10 changes: 4 additions & 6 deletions src/resources/addressing/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
// File generated from our OpenAPI spec by Stainless.

export { Addressing } from './addressing';
export {
AddressingAddressMaps,
AddressMapCreateResponse,
AddressMapListResponse,
AddressMapDeleteResponse,
AddressMapEditResponse,
AddressMapGetResponse,
AddressMapCreateParams,
AddressMapListParams,
Expand All @@ -13,19 +14,16 @@ export {
AddressMapGetParams,
AddressMaps,
} from './address-maps/index';
export { Addressing } from './addressing';
export { LOADocumentCreateResponse, LOADocumentCreateParams, LOADocuments } from './loa-documents/index';
export {
PrefixCreateResponse,
AddressingIpamPrefixes,
PrefixListResponse,
PrefixDeleteResponse,
PrefixEditResponse,
PrefixGetResponse,
PrefixCreateParams,
PrefixListParams,
PrefixDeleteParams,
PrefixEditParams,
PrefixGetParams,
Prefixes,
} from './prefixes/index';
export { LOADocumentCreateResponse, LOADocumentCreateParams, LOADocuments } from './loa-documents/index';
export { ServiceListResponse, ServiceListParams, Services } from './services';
Loading

0 comments on commit 67434b5

Please sign in to comment.