Skip to content

Commit 3d6233f

Browse files
feat(api): api update
1 parent 2a65e03 commit 3d6233f

File tree

8 files changed

+42
-67
lines changed

8 files changed

+42
-67
lines changed

.stats.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 1713
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-27adcd4b160b0701a34b49d045d624f5a88fd893bbdebc363433ede03b31758f.yml
3-
openapi_spec_hash: f0a1bfe65b921a255db4b01b1149e550
1+
configured_endpoints: 1712
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-02cb7bd8a1baed68b87e707819810166d401aa56e91a9725fe7f0db76d810f82.yml
3+
openapi_spec_hash: 4e8d05399b256732a2d70c35c4950c56
44
config_hash: 4a6de620bf46745e17466ceac26f41d4

api.md

-4
Original file line numberDiff line numberDiff line change
@@ -5762,10 +5762,6 @@ Methods:
57625762

57635763
#### CustomCertificate
57645764

5765-
Methods:
5766-
5767-
- <code title="get /accounts/{account_id}/gateway/configuration/custom_certificate">client.zeroTrust.gateway.configurations.customCertificate.<a href="./src/resources/zero-trust/gateway/configurations/custom-certificate.ts">get</a>({ ...params }) -> CustomCertificateSettings | null</code>
5768-
57695765
### Lists
57705766

57715767
Types:

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

+3-1
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,9 @@ export interface CertificateCreateParams {
428428

429429
/**
430430
* Body param: Number of days the generated certificate will be valid, minimum 1
431-
* day and maximum 30 years. Defaults to 5 years.
431+
* day and maximum 30 years. Defaults to 5 years. In terraform,
432+
* validity_period_days can only be used while creating a certificate, and this CAN
433+
* NOT be used to extend the validity of an already generated certificate.
432434
*/
433435
validity_period_days?: number;
434436
}

src/resources/zero-trust/gateway/configurations/configurations.ts

+32-5
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import { APIResource } from '../../../../resource';
44
import * as Core from '../../../../core';
55
import * as CustomCertificateAPI from './custom-certificate';
6-
import { CustomCertificate, CustomCertificateGetParams } from './custom-certificate';
6+
import { CustomCertificate } from './custom-certificate';
77

88
export class Configurations extends APIResource {
99
customCertificate: CustomCertificateAPI.CustomCertificate = new CustomCertificateAPI.CustomCertificate(
@@ -454,6 +454,11 @@ export interface GatewayConfigurationSettings {
454454
*/
455455
fips?: FipsSettings | null;
456456

457+
/**
458+
* Setting to enable host selector in egress policies.
459+
*/
460+
host_selector?: GatewayConfigurationSettings.HostSelector | null;
461+
457462
/**
458463
* Protocol Detection settings.
459464
*/
@@ -484,6 +489,16 @@ export namespace GatewayConfigurationSettings {
484489
id: string;
485490
}
486491

492+
/**
493+
* Setting to enable host selector in egress policies.
494+
*/
495+
export interface HostSelector {
496+
/**
497+
* Enable filtering via hosts for egress policies.
498+
*/
499+
enabled?: boolean;
500+
}
501+
487502
/**
488503
* Sandbox settings.
489504
*/
@@ -551,6 +566,11 @@ export interface GatewayConfigurationSettingsParam {
551566
*/
552567
fips?: FipsSettingsParam | null;
553568

569+
/**
570+
* Setting to enable host selector in egress policies.
571+
*/
572+
host_selector?: GatewayConfigurationSettingsParam.HostSelector | null;
573+
554574
/**
555575
* Protocol Detection settings.
556576
*/
@@ -581,6 +601,16 @@ export namespace GatewayConfigurationSettingsParam {
581601
id: string;
582602
}
583603

604+
/**
605+
* Setting to enable host selector in egress policies.
606+
*/
607+
export interface HostSelector {
608+
/**
609+
* Enable filtering via hosts for egress policies.
610+
*/
611+
enabled?: boolean;
612+
}
613+
584614
/**
585615
* Sandbox settings.
586616
*/
@@ -785,8 +815,5 @@ export declare namespace Configurations {
785815
type ConfigurationGetParams as ConfigurationGetParams,
786816
};
787817

788-
export {
789-
CustomCertificate as CustomCertificate,
790-
type CustomCertificateGetParams as CustomCertificateGetParams,
791-
};
818+
export { CustomCertificate as CustomCertificate };
792819
}
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,5 @@
11
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
import { APIResource } from '../../../../resource';
4-
import * as Core from '../../../../core';
5-
import * as ConfigurationsAPI from './configurations';
64

7-
export class CustomCertificate extends APIResource {
8-
/**
9-
* Fetches the current Zero Trust certificate configuration.
10-
*/
11-
get(
12-
params: CustomCertificateGetParams,
13-
options?: Core.RequestOptions,
14-
): Core.APIPromise<ConfigurationsAPI.CustomCertificateSettings | null> {
15-
const { account_id } = params;
16-
return this._client.get(`/accounts/${account_id}/gateway/configuration/custom_certificate`, options);
17-
}
18-
}
19-
20-
export interface CustomCertificateGetParams {
21-
account_id: string;
22-
}
23-
24-
export declare namespace CustomCertificate {
25-
export { type CustomCertificateGetParams as CustomCertificateGetParams };
26-
}
5+
export class CustomCertificate extends APIResource {}

src/resources/zero-trust/gateway/configurations/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ export {
2121
type ConfigurationEditParams,
2222
type ConfigurationGetParams,
2323
} from './configurations';
24-
export { CustomCertificate, type CustomCertificateGetParams } from './custom-certificate';
24+
export { CustomCertificate } from './custom-certificate';

tests/api-resources/zero-trust/gateway/configurations/configurations.test.ts

+2
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ describe('resource configurations', () => {
5959
custom_certificate: { enabled: true, id: 'd1b364c5-1311-466e-a194-f0e943e0799f' },
6060
extended_email_matching: { enabled: true },
6161
fips: { tls: true },
62+
host_selector: { enabled: false },
6263
protocol_detection: { enabled: true },
6364
sandbox: { enabled: true, fallback_action: 'allow' },
6465
tls_decrypt: { enabled: true },
@@ -115,6 +116,7 @@ describe('resource configurations', () => {
115116
custom_certificate: { enabled: true, id: 'd1b364c5-1311-466e-a194-f0e943e0799f' },
116117
extended_email_matching: { enabled: true },
117118
fips: { tls: true },
119+
host_selector: { enabled: false },
118120
protocol_detection: { enabled: true },
119121
sandbox: { enabled: true, fallback_action: 'allow' },
120122
tls_decrypt: { enabled: true },

tests/api-resources/zero-trust/gateway/configurations/custom-certificate.test.ts

-31
This file was deleted.

0 commit comments

Comments
 (0)