Skip to content

Commit 2b08938

Browse files
feat(api): update via SDK Studio (#154)
1 parent eed8184 commit 2b08938

File tree

9 files changed

+35
-38
lines changed

9 files changed

+35
-38
lines changed

api.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4388,12 +4388,12 @@ Types:
43884388

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

43934393
Methods:
43944394

43954395
- <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>
4396-
- <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>
4396+
- <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>
43974397

43984398
### Groups
43994399

@@ -4450,13 +4450,13 @@ Methods:
44504450
Types:
44514451

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

44564456
Methods:
44574457

44584458
- <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>
4459-
- <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>
4459+
- <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>
44604460
- <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>
44614461

44624462
### Logs

src/resources/zero-trust/access/access.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export namespace Access {
7070
export import BookmarkDeleteResponse = BookmarksAPI.BookmarkDeleteResponse;
7171
export import Keys = KeysAPI.Keys;
7272
export import KeyUpdateResponse = KeysAPI.KeyUpdateResponse;
73-
export import KeyListResponse = KeysAPI.KeyListResponse;
73+
export import KeyGetResponse = KeysAPI.KeyGetResponse;
7474
export import KeyRotateResponse = KeysAPI.KeyRotateResponse;
7575
export import KeyUpdateParams = KeysAPI.KeyUpdateParams;
7676
export import Logs = LogsAPI.Logs;

src/resources/zero-trust/access/certificates/certificates.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ export namespace Certificates {
338338
export import Settings = SettingsAPI.Settings;
339339
export import AccessSettings = SettingsAPI.AccessSettings;
340340
export import SettingUpdateResponse = SettingsAPI.SettingUpdateResponse;
341-
export import SettingListResponse = SettingsAPI.SettingListResponse;
341+
export import SettingGetResponse = SettingsAPI.SettingGetResponse;
342342
export import SettingUpdateParams = SettingsAPI.SettingUpdateParams;
343-
export import SettingListParams = SettingsAPI.SettingListParams;
343+
export import SettingGetParams = SettingsAPI.SettingGetParams;
344344
}

src/resources/zero-trust/access/certificates/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ export {
1414
export {
1515
AccessSettings,
1616
SettingUpdateResponse,
17-
SettingListResponse,
17+
SettingGetResponse,
1818
SettingUpdateParams,
19-
SettingListParams,
19+
SettingGetParams,
2020
Settings,
2121
} from './settings';

src/resources/zero-trust/access/certificates/settings.ts

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,14 @@ export class Settings extends APIResource {
4242
/**
4343
* List all mTLS hostname settings for this account or zone.
4444
*/
45-
list(
46-
params?: SettingListParams,
45+
get(params?: SettingGetParams, options?: Core.RequestOptions): Core.APIPromise<SettingGetResponse | null>;
46+
get(options?: Core.RequestOptions): Core.APIPromise<SettingGetResponse | null>;
47+
get(
48+
params: SettingGetParams | Core.RequestOptions = {},
4749
options?: Core.RequestOptions,
48-
): Core.APIPromise<SettingListResponse | null>;
49-
list(options?: Core.RequestOptions): Core.APIPromise<SettingListResponse | null>;
50-
list(
51-
params: SettingListParams | Core.RequestOptions = {},
52-
options?: Core.RequestOptions,
53-
): Core.APIPromise<SettingListResponse | null> {
50+
): Core.APIPromise<SettingGetResponse | null> {
5451
if (isRequestOptions(params)) {
55-
return this.list({}, params);
52+
return this.get({}, params);
5653
}
5754
const { account_id, zone_id } = params;
5855
if (!account_id && !zone_id) {
@@ -75,7 +72,7 @@ export class Settings extends APIResource {
7572
this._client.get(
7673
`/${accountOrZone}/${accountOrZoneId}/access/certificates/settings`,
7774
options,
78-
) as Core.APIPromise<{ result: SettingListResponse | null }>
75+
) as Core.APIPromise<{ result: SettingGetResponse | null }>
7976
)._thenUnwrap((obj) => obj.result);
8077
}
8178
}
@@ -102,7 +99,7 @@ export interface AccessSettings {
10299

103100
export type SettingUpdateResponse = Array<AccessSettings>;
104101

105-
export type SettingListResponse = Array<AccessSettings>;
102+
export type SettingGetResponse = Array<AccessSettings>;
106103

107104
export interface SettingUpdateParams {
108105
/**
@@ -123,7 +120,7 @@ export interface SettingUpdateParams {
123120
zone_id?: string;
124121
}
125122

126-
export interface SettingListParams {
123+
export interface SettingGetParams {
127124
/**
128125
* The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
129126
*/
@@ -138,7 +135,7 @@ export interface SettingListParams {
138135
export namespace Settings {
139136
export import AccessSettings = SettingsAPI.AccessSettings;
140137
export import SettingUpdateResponse = SettingsAPI.SettingUpdateResponse;
141-
export import SettingListResponse = SettingsAPI.SettingListResponse;
138+
export import SettingGetResponse = SettingsAPI.SettingGetResponse;
142139
export import SettingUpdateParams = SettingsAPI.SettingUpdateParams;
143-
export import SettingListParams = SettingsAPI.SettingListParams;
140+
export import SettingGetParams = SettingsAPI.SettingGetParams;
144141
}

src/resources/zero-trust/access/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,5 +66,5 @@ export {
6666
Tags,
6767
} from './tags';
6868
export { AccessUsers, UserListResponse, Users } from './users/index';
69-
export { KeyUpdateResponse, KeyListResponse, KeyRotateResponse, KeyUpdateParams, Keys } from './keys';
69+
export { KeyUpdateResponse, KeyGetResponse, KeyRotateResponse, KeyUpdateParams, Keys } from './keys';
7070
export { Logs } from './logs/index';

src/resources/zero-trust/access/keys.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ export class Keys extends APIResource {
2323
/**
2424
* Gets the Access key rotation settings for an account.
2525
*/
26-
list(identifier: string, options?: Core.RequestOptions): Core.APIPromise<KeyListResponse> {
26+
get(identifier: string, options?: Core.RequestOptions): Core.APIPromise<KeyGetResponse> {
2727
return (
2828
this._client.get(`/accounts/${identifier}/access/keys`, options) as Core.APIPromise<{
29-
result: KeyListResponse;
29+
result: KeyGetResponse;
3030
}>
3131
)._thenUnwrap((obj) => obj.result);
3232
}
@@ -45,7 +45,7 @@ export class Keys extends APIResource {
4545

4646
export type KeyUpdateResponse = unknown | string;
4747

48-
export type KeyListResponse = unknown | string;
48+
export type KeyGetResponse = unknown | string;
4949

5050
export type KeyRotateResponse = unknown | string;
5151

@@ -58,7 +58,7 @@ export interface KeyUpdateParams {
5858

5959
export namespace Keys {
6060
export import KeyUpdateResponse = KeysAPI.KeyUpdateResponse;
61-
export import KeyListResponse = KeysAPI.KeyListResponse;
61+
export import KeyGetResponse = KeysAPI.KeyGetResponse;
6262
export import KeyRotateResponse = KeysAPI.KeyRotateResponse;
6363
export import KeyUpdateParams = KeysAPI.KeyUpdateParams;
6464
}

tests/api-resources/zero-trust/access/certificates/settings.test.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ describe('resource settings', () => {
4242
});
4343

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

5656
// skipped: tests are disabled for the time being
57-
test.skip('list: request options instead of params are passed correctly', async () => {
57+
test.skip('get: request options instead of params are passed correctly', async () => {
5858
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
5959
await expect(
60-
cloudflare.zeroTrust.access.certificates.settings.list({ path: '/_stainless_unknown_path' }),
60+
cloudflare.zeroTrust.access.certificates.settings.get({ path: '/_stainless_unknown_path' }),
6161
).rejects.toThrow(Cloudflare.NotFoundError);
6262
});
6363

6464
// skipped: tests are disabled for the time being
65-
test.skip('list: request options and params are passed correctly', async () => {
65+
test.skip('get: request options and params are passed correctly', async () => {
6666
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
6767
await expect(
68-
cloudflare.zeroTrust.access.certificates.settings.list(
68+
cloudflare.zeroTrust.access.certificates.settings.get(
6969
{ account_id: 'string', zone_id: 'string' },
7070
{ path: '/_stainless_unknown_path' },
7171
),

tests/api-resources/zero-trust/access/keys.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ describe('resource keys', () => {
3232
});
3333

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

4646
// skipped: tests are disabled for the time being
47-
test.skip('list: request options instead of params are passed correctly', async () => {
47+
test.skip('get: request options instead of params are passed correctly', async () => {
4848
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
4949
await expect(
50-
cloudflare.zeroTrust.access.keys.list('023e105f4ecef8ad9ca31a8372d0c353', {
50+
cloudflare.zeroTrust.access.keys.get('023e105f4ecef8ad9ca31a8372d0c353', {
5151
path: '/_stainless_unknown_path',
5252
}),
5353
).rejects.toThrow(Cloudflare.NotFoundError);

0 commit comments

Comments
 (0)