Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release: 3.0.0-beta.3 #152

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "3.0.0-beta.2"
".": "3.0.0-beta.3"
}
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## 3.0.0-beta.3 (2024-03-15)

Full Changelog: [v3.0.0-beta.2...v3.0.0-beta.3](https://github.com/cloudflare/cloudflare-typescript/compare/v3.0.0-beta.2...v3.0.0-beta.3)

### Features

* **api:** update via SDK Studio ([#154](https://github.com/cloudflare/cloudflare-typescript/issues/154)) ([7da6798](https://github.com/cloudflare/cloudflare-typescript/commit/7da6798ec1aea235d24e4f7911e8676db296ed8f))
* update via SDK Studio ([#151](https://github.com/cloudflare/cloudflare-typescript/issues/151)) ([70fd3ba](https://github.com/cloudflare/cloudflare-typescript/commit/70fd3ba749b68b8b1dae45ca04dcd867d68c39b1))
* update via SDK Studio ([#153](https://github.com/cloudflare/cloudflare-typescript/issues/153)) ([fdbf303](https://github.com/cloudflare/cloudflare-typescript/commit/fdbf303cc41bf4fbfda6158a16a0c1c55ea2f588))

## 3.0.0-beta.2 (2024-03-14)

Full Changelog: [v3.0.0-beta.1...v3.0.0-beta.2](https://github.com/cloudflare/cloudflare-typescript/compare/v3.0.0-beta.1...v3.0.0-beta.2)
Expand Down
8 changes: 4 additions & 4 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -4388,12 +4388,12 @@ Types:

- <code><a href="./src/resources/zero-trust/access/certificates/settings.ts">AccessSettings</a></code>
- <code><a href="./src/resources/zero-trust/access/certificates/settings.ts">SettingUpdateResponse</a></code>
- <code><a href="./src/resources/zero-trust/access/certificates/settings.ts">SettingListResponse</a></code>
- <code><a href="./src/resources/zero-trust/access/certificates/settings.ts">SettingGetResponse</a></code>

Methods:

- <code title="put /{account_or_zone}/{account_or_zone_id}/access/certificates/settings">client.zeroTrust.access.certificates.settings.<a href="./src/resources/zero-trust/access/certificates/settings.ts">update</a>({ ...params }) -> SettingUpdateResponse | null</code>
- <code title="get /{account_or_zone}/{account_or_zone_id}/access/certificates/settings">client.zeroTrust.access.certificates.settings.<a href="./src/resources/zero-trust/access/certificates/settings.ts">list</a>({ ...params }) -> SettingListResponse | null</code>
- <code title="get /{account_or_zone}/{account_or_zone_id}/access/certificates/settings">client.zeroTrust.access.certificates.settings.<a href="./src/resources/zero-trust/access/certificates/settings.ts">get</a>({ ...params }) -> SettingGetResponse | null</code>

### Groups

Expand Down Expand Up @@ -4450,13 +4450,13 @@ Methods:
Types:

- <code><a href="./src/resources/zero-trust/access/keys.ts">KeyUpdateResponse</a></code>
- <code><a href="./src/resources/zero-trust/access/keys.ts">KeyListResponse</a></code>
- <code><a href="./src/resources/zero-trust/access/keys.ts">KeyGetResponse</a></code>
- <code><a href="./src/resources/zero-trust/access/keys.ts">KeyRotateResponse</a></code>

Methods:

- <code title="put /accounts/{identifier}/access/keys">client.zeroTrust.access.keys.<a href="./src/resources/zero-trust/access/keys.ts">update</a>(identifier, { ...params }) -> KeyUpdateResponse</code>
- <code title="get /accounts/{identifier}/access/keys">client.zeroTrust.access.keys.<a href="./src/resources/zero-trust/access/keys.ts">list</a>(identifier) -> KeyListResponse</code>
- <code title="get /accounts/{identifier}/access/keys">client.zeroTrust.access.keys.<a href="./src/resources/zero-trust/access/keys.ts">get</a>(identifier) -> KeyGetResponse</code>
- <code title="post /accounts/{identifier}/access/keys/rotate">client.zeroTrust.access.keys.<a href="./src/resources/zero-trust/access/keys.ts">rotate</a>(identifier) -> KeyRotateResponse</code>

### Logs
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cloudflare",
"version": "3.0.0-beta.2",
"version": "3.0.0-beta.3",
"description": "The official TypeScript library for the Cloudflare API",
"author": "Cloudflare <api@cloudflare.com>",
"types": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion src/resources/zero-trust/access/access.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export namespace Access {
export import BookmarkDeleteResponse = BookmarksAPI.BookmarkDeleteResponse;
export import Keys = KeysAPI.Keys;
export import KeyUpdateResponse = KeysAPI.KeyUpdateResponse;
export import KeyListResponse = KeysAPI.KeyListResponse;
export import KeyGetResponse = KeysAPI.KeyGetResponse;
export import KeyRotateResponse = KeysAPI.KeyRotateResponse;
export import KeyUpdateParams = KeysAPI.KeyUpdateParams;
export import Logs = LogsAPI.Logs;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ export namespace Certificates {
export import Settings = SettingsAPI.Settings;
export import AccessSettings = SettingsAPI.AccessSettings;
export import SettingUpdateResponse = SettingsAPI.SettingUpdateResponse;
export import SettingListResponse = SettingsAPI.SettingListResponse;
export import SettingGetResponse = SettingsAPI.SettingGetResponse;
export import SettingUpdateParams = SettingsAPI.SettingUpdateParams;
export import SettingListParams = SettingsAPI.SettingListParams;
export import SettingGetParams = SettingsAPI.SettingGetParams;
}
4 changes: 2 additions & 2 deletions src/resources/zero-trust/access/certificates/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ export {
export {
AccessSettings,
SettingUpdateResponse,
SettingListResponse,
SettingGetResponse,
SettingUpdateParams,
SettingListParams,
SettingGetParams,
Settings,
} from './settings';
25 changes: 11 additions & 14 deletions src/resources/zero-trust/access/certificates/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,14 @@ export class Settings extends APIResource {
/**
* List all mTLS hostname settings for this account or zone.
*/
list(
params?: SettingListParams,
get(params?: SettingGetParams, options?: Core.RequestOptions): Core.APIPromise<SettingGetResponse | null>;
get(options?: Core.RequestOptions): Core.APIPromise<SettingGetResponse | null>;
get(
params: SettingGetParams | Core.RequestOptions = {},
options?: Core.RequestOptions,
): Core.APIPromise<SettingListResponse | null>;
list(options?: Core.RequestOptions): Core.APIPromise<SettingListResponse | null>;
list(
params: SettingListParams | Core.RequestOptions = {},
options?: Core.RequestOptions,
): Core.APIPromise<SettingListResponse | null> {
): Core.APIPromise<SettingGetResponse | null> {
if (isRequestOptions(params)) {
return this.list({}, params);
return this.get({}, params);
}
const { account_id, zone_id } = params;
if (!account_id && !zone_id) {
Expand All @@ -75,7 +72,7 @@ export class Settings extends APIResource {
this._client.get(
`/${accountOrZone}/${accountOrZoneId}/access/certificates/settings`,
options,
) as Core.APIPromise<{ result: SettingListResponse | null }>
) as Core.APIPromise<{ result: SettingGetResponse | null }>
)._thenUnwrap((obj) => obj.result);
}
}
Expand All @@ -102,7 +99,7 @@ export interface AccessSettings {

export type SettingUpdateResponse = Array<AccessSettings>;

export type SettingListResponse = Array<AccessSettings>;
export type SettingGetResponse = Array<AccessSettings>;

export interface SettingUpdateParams {
/**
Expand All @@ -123,7 +120,7 @@ export interface SettingUpdateParams {
zone_id?: string;
}

export interface SettingListParams {
export interface SettingGetParams {
/**
* The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
*/
Expand All @@ -138,7 +135,7 @@ export interface SettingListParams {
export namespace Settings {
export import AccessSettings = SettingsAPI.AccessSettings;
export import SettingUpdateResponse = SettingsAPI.SettingUpdateResponse;
export import SettingListResponse = SettingsAPI.SettingListResponse;
export import SettingGetResponse = SettingsAPI.SettingGetResponse;
export import SettingUpdateParams = SettingsAPI.SettingUpdateParams;
export import SettingListParams = SettingsAPI.SettingListParams;
export import SettingGetParams = SettingsAPI.SettingGetParams;
}
2 changes: 1 addition & 1 deletion src/resources/zero-trust/access/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,5 @@ export {
Tags,
} from './tags';
export { AccessUsers, UserListResponse, Users } from './users/index';
export { KeyUpdateResponse, KeyListResponse, KeyRotateResponse, KeyUpdateParams, Keys } from './keys';
export { KeyUpdateResponse, KeyGetResponse, KeyRotateResponse, KeyUpdateParams, Keys } from './keys';
export { Logs } from './logs/index';
8 changes: 4 additions & 4 deletions src/resources/zero-trust/access/keys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ export class Keys extends APIResource {
/**
* Gets the Access key rotation settings for an account.
*/
list(identifier: string, options?: Core.RequestOptions): Core.APIPromise<KeyListResponse> {
get(identifier: string, options?: Core.RequestOptions): Core.APIPromise<KeyGetResponse> {
return (
this._client.get(`/accounts/${identifier}/access/keys`, options) as Core.APIPromise<{
result: KeyListResponse;
result: KeyGetResponse;
}>
)._thenUnwrap((obj) => obj.result);
}
Expand All @@ -45,7 +45,7 @@ export class Keys extends APIResource {

export type KeyUpdateResponse = unknown | string;

export type KeyListResponse = unknown | string;
export type KeyGetResponse = unknown | string;

export type KeyRotateResponse = unknown | string;

Expand All @@ -58,7 +58,7 @@ export interface KeyUpdateParams {

export namespace Keys {
export import KeyUpdateResponse = KeysAPI.KeyUpdateResponse;
export import KeyListResponse = KeysAPI.KeyListResponse;
export import KeyGetResponse = KeysAPI.KeyGetResponse;
export import KeyRotateResponse = KeysAPI.KeyRotateResponse;
export import KeyUpdateParams = KeysAPI.KeyUpdateParams;
}
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const VERSION = '3.0.0-beta.2'; // x-release-please-version
export const VERSION = '3.0.0-beta.3'; // x-release-please-version
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ describe('resource settings', () => {
});

// skipped: tests are disabled for the time being
test.skip('list', async () => {
const responsePromise = cloudflare.zeroTrust.access.certificates.settings.list();
test.skip('get', async () => {
const responsePromise = cloudflare.zeroTrust.access.certificates.settings.get();
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
Expand All @@ -54,18 +54,18 @@ describe('resource settings', () => {
});

// skipped: tests are disabled for the time being
test.skip('list: request options instead of params are passed correctly', async () => {
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.zeroTrust.access.certificates.settings.list({ path: '/_stainless_unknown_path' }),
cloudflare.zeroTrust.access.certificates.settings.get({ path: '/_stainless_unknown_path' }),
).rejects.toThrow(Cloudflare.NotFoundError);
});

// skipped: tests are disabled for the time being
test.skip('list: request options and params are passed correctly', async () => {
test.skip('get: request options and 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.zeroTrust.access.certificates.settings.list(
cloudflare.zeroTrust.access.certificates.settings.get(
{ account_id: 'string', zone_id: 'string' },
{ path: '/_stainless_unknown_path' },
),
Expand Down
8 changes: 4 additions & 4 deletions tests/api-resources/zero-trust/access/keys.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ describe('resource keys', () => {
});

// skipped: tests are disabled for the time being
test.skip('list', async () => {
const responsePromise = cloudflare.zeroTrust.access.keys.list('023e105f4ecef8ad9ca31a8372d0c353');
test.skip('get', async () => {
const responsePromise = cloudflare.zeroTrust.access.keys.get('023e105f4ecef8ad9ca31a8372d0c353');
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
Expand All @@ -44,10 +44,10 @@ describe('resource keys', () => {
});

// skipped: tests are disabled for the time being
test.skip('list: request options instead of params are passed correctly', async () => {
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.zeroTrust.access.keys.list('023e105f4ecef8ad9ca31a8372d0c353', {
cloudflare.zeroTrust.access.keys.get('023e105f4ecef8ad9ca31a8372d0c353', {
path: '/_stainless_unknown_path',
}),
).rejects.toThrow(Cloudflare.NotFoundError);
Expand Down
Loading